@@ -184,10 +184,10 @@ termux_step_massage() {
184
184
fi
185
185
186
186
# Remove duplicate headers from `include32/` directory
187
- if [[ -d ./${ADDING_PREFIX} /include32 && -d ${TERMUX__PREFIX__BASE_INCLUDE_DIR} ]]; then
187
+ if [[ -d ./${ADDING_PREFIX} /${TERMUX__PREFIX__MULTI_INCLUDE_SUBDIR} && -d ${TERMUX__PREFIX__BASE_INCLUDE_DIR} ]]; then
188
188
local hpath
189
- for hpath in $( find ./${ADDING_PREFIX} /include32 -type f) ; do
190
- local h=$( sed " s|./${ADDING_PREFIX} /include32 /||g" <<< " $hpath" )
189
+ for hpath in $( find ./${ADDING_PREFIX} /${TERMUX__PREFIX__MULTI_INCLUDE_SUBDIR} -type f) ; do
190
+ local h=$( sed " s|./${ADDING_PREFIX} /${TERMUX__PREFIX__MULTI_INCLUDE_SUBDIR} /||g" <<< " $hpath" )
191
191
if [[ -f " ${TERMUX__PREFIX__BASE_INCLUDE_DIR} /${h} " && \
192
192
" $( md5sum < " ${hpath} " ) " = " $( md5sum < " ${TERMUX__PREFIX__BASE_INCLUDE_DIR} /${h} " ) " ]]; then
193
193
rm " ${hpath} "
@@ -196,17 +196,17 @@ termux_step_massage() {
196
196
fi
197
197
198
198
# Configure pkgconfig files for proper multilib-compilation
199
- if [[ -d ./${ADDING_PREFIX} /lib32 /pkgconfig ]]; then
199
+ if [[ -d ./${ADDING_PREFIX} /${TERMUX__PREFIX__MULTI_LIB_SUBDIR} /pkgconfig ]]; then
200
200
local pc
201
- for pc in $( grep -s -r -l " ^includedir=.*/include32 " ./${ADDING_PREFIX} /lib32 /pkgconfig) ; do
201
+ for pc in $( grep -s -r -l " ^includedir=.*/${TERMUX__PREFIX__MULTI_INCLUDE_SUBDIR} " ./${ADDING_PREFIX} /${TERMUX__PREFIX__MULTI_LIB_SUBDIR} /pkgconfig) ; do
202
202
local pc_cflags=" $( grep ' ^Cflags:' " ${pc} " | awk -F ' :' ' {printf $2 "\n"}' ) "
203
203
if ! grep -q ' -I' <<< " ${pc_cflags}" ; then
204
204
continue
205
205
fi
206
206
local pc_multilib_path=" $( grep ' ^includedir=' " ${pc} " | sed " s|${TERMUX_PREFIX} |\$ {prefix}|g" | awk -F ' {prefix}/include' ' {printf $2}' ) "
207
207
local pc_edit_cflags=" $( sed " s|\$ {includedir}|\$ {includedir}${pc_multilib_path} |g" <<< " ${pc_cflags}" ) "
208
208
local pc_new_cflags=" $( tr ' ' ' \n' <<< " ${pc_edit_cflags}" | sed ' s|\({includedir}\)32|\1|gp; s|\(/include\)32|\1|gp; d' | tr ' \n' ' ' ) "
209
- sed -i -e " s|\(^includedir=.*/\)include32 \(.*\)|\1include|g" \
209
+ sed -i -e " s|\(^includedir=.*/\)${TERMUX__PREFIX__MULTI_INCLUDE_SUBDIR} \(.*\)|\1include|g" \
210
210
-e " s|^Cflags:${pc_cflags} $|Cflags:${pc_edit_cflags} ${pc_new_cflags::- 1} |g" \
211
211
" ${pc} "
212
212
# Apply the modified pkgconfig to the system for proper multilib-compilation work
0 commit comments