Skip to content

Commit

Permalink
use parameterized args
Browse files Browse the repository at this point in the history
  • Loading branch information
bjia56 committed Nov 30, 2024
1 parent 7642034 commit e244ebc
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions scripts/build_linux_zig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,7 @@ else
download_verify_extract libffi-3.4.6.tar.gz
cd libffi*
fi
if [[ "${ARCH}" == "mips64el" ]]; then
CFLAGS="${CFLAGS} -Wl,--undefined-version" ./configure --host=${CHOST} --enable-shared --disable-static --prefix=${DEPSDIR}
else
CFLAGS="${CFLAGS} -Wl,--undefined-version" ./configure --host=${CHOST} --prefix=${DEPSDIR}
fi
CFLAGS="${CFLAGS} -Wl,--undefined-version" ./configure --host=${CHOST} --prefix=${DEPSDIR}
make -j4
make install
install_license
Expand Down Expand Up @@ -573,7 +569,7 @@ ffiparams=(-DLibFFI_INCLUDE_DIR:PATH=${DEPSDIR}/include)
if [[ "${ARCH}" == "mips64el" ]]; then
# use shared object
ffiparams+=(
-DLibFFI_LIBRARY:FILEPATH=${DEPSDIR}/lib/libffi.so.1
-DLibFFI_LIBRARY:FILEPATH=${DEPSDIR}/lib/libffi.so
)
else
ffiparams+=(
Expand Down Expand Up @@ -605,6 +601,7 @@ LDFLAGS="${LDFLAGS} -lfontconfig -lfreetype" cmake \
-DINSTALL_MANUAL=OFF \
"${additionalparams[@]}" \
"${opensslparams[@]}" \
"${ffiparams[@]}" \
-DSQLite3_INCLUDE_DIR:PATH=${DEPSDIR}/include \
-DSQLite3_LIBRARY:FILEPATH=${DEPSDIR}/lib/libsqlite3.a \
-DZLIB_INCLUDE_DIR:PATH=${DEPSDIR}/include \
Expand All @@ -613,8 +610,6 @@ LDFLAGS="${LDFLAGS} -lfontconfig -lfreetype" cmake \
-DLZMA_LIBRARY:FILEPATH=${DEPSDIR}/lib/liblzma.a \
-DBZIP2_INCLUDE_DIR:PATH=${DEPSDIR}/include \
-DBZIP2_LIBRARIES:FILEPATH=${DEPSDIR}/lib/libbz2.a \
-DLibFFI_INCLUDE_DIR:PATH=${DEPSDIR}/include \
-DLibFFI_LIBRARY:FILEPATH=${DEPSDIR}/lib/libffi.a \
-DREADLINE_INCLUDE_PATH:PATH=${DEPSDIR}/include \
-DREADLINE_LIBRARY:FILEPATH=${DEPSDIR}/lib/libreadline.a \
-DUUID_LIBRARY:FILEPATH=${DEPSDIR}/lib/libuuid.a \
Expand All @@ -636,7 +631,7 @@ if [[ "${DISTRIBUTION}" != "headless" ]]; then
cp -r ${DEPSDIR}/lib/tk8.6 ./python-install/lib
fi
if [[ "${ARCH}" == "mips64el" ]]; then
cp ${DEPSDIR}/lib/libffi.so.* ./python-install/lib
cp ${DEPSDIR}/lib/libffi.so* ./python-install/lib
fi
cp -r ${LICENSEDIR} ./python-install

Expand Down

0 comments on commit e244ebc

Please sign in to comment.