Skip to content

Commit

Permalink
add libxslt and mpdecimal
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 24, 2024
1 parent ba9411c commit f1aeda6
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 8 deletions.
8 changes: 5 additions & 3 deletions python-wasi-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@ END
fi

# pack extra build scripts
tar -cpRz ./scripts/emsdk-extra.sh ./sources.extra/* > /tmp/sdk/sdk-extra.tar.gz
pushd /
tar -cpPRz ${SDKROOT}/scripts/emsdk-extra.sh ${SDKROOT}/sources.extra/* > /tmp/sdk/sdk-extra.tar.gz

# pack sdl as minimal prebuilt tar, and use lz4 compression on it
. ${SDKROOT}/scripts/pack-sdk.sh
# pack sdl as minimal prebuilt tar, and use lz4 compression on it
. ${SDKROOT}/scripts/pack-sdk.sh
popd

else
echo "cd failed" 1>&2
Expand Down
8 changes: 5 additions & 3 deletions python-wasm-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -216,10 +216,12 @@ END
fi

# pack extra build scripts
tar -cpRz ./scripts/emsdk-extra.sh ./sources.extra/* > /tmp/sdk/sdk-extra.tar.gz
pushd /
tar -cpPRz ${SDKROOT}/scripts/emsdk-extra.sh ${SDKROOT}/sources.extra/* > /tmp/sdk/sdk-extra.tar.gz

# pack sdl as minimal prebuilt tar, and use lz4 compression on it
. ${SDKROOT}/scripts/pack-sdk.sh
# pack sdl as minimal prebuilt tar, and use lz4 compression on it
. ${SDKROOT}/scripts/pack-sdk.sh
popd

else
echo "cd failed" 1>&2
Expand Down
1 change: 1 addition & 0 deletions scripts/emsdk-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,7 @@ END
export EMCC_SKIP_SANITY_CHECK=1
export EM_IGNORE_SANITY=1

export SYSROOT=$EMSDK/upstream/emscripten/cache/sysroot

else
echo "emsdk: config already set !" 1>&2
Expand Down
4 changes: 2 additions & 2 deletions scripts/pack-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ fi

echo "making $TAG tarball" 1>&2

cd /
pushd /
mkdir -p /tmp/sdk
tar -cpPR \
${SDKROOT}/config \
Expand All @@ -22,4 +22,4 @@ tar -cpPR \
> /tmp/sdk/python${PYBUILD}-${TAG}-sdk-${CIVER}.tar.lz4

echo "done" 1>&2

popd
44 changes: 44 additions & 0 deletions sources.wasm/3000-libxslt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash

. ${CONFIG:-config}

PKG=libxslt

if [ -d src/${PKG} ]
then
echo ok
else
pushd src
wget -c https://github.com/sailfishos-mirror/${PKG}/archive/refs/tags/v1.1.42.tar.gz -O${PKG}-v1.1.42.tar.gz
tar xfz ${PKG}-v1.1.42.tar.gz
mv ${PKG}-1.1.42 ${PKG}
pushd ${PKG}
autoreconf -ivf
popd
popd
fi



if [ -f $PREFIX/lib/${PKG}.a ]
then
echo "
${PKG} already built at $PREFIX/lib/${PKG}.a + sysroot
"
else
. scripts/emsdk-fetch.sh

mkdir -p $ROOT/build/${PKG}
pushd $ROOT/build/${PKG}

emconfigure ${ROOT}/src/${PKG}/configure --prefix=$PREFIX --with-libxml-prefix=$PREFIX \
--without-python --without-crypto --without-debug --without-debugger --without-profiler \
--without-plugins --with-pic --enable-static --disable-shared --program-suffix=.cjs
emmake make install
cp -r $PREFIX/include/${PKG}* $SYSROOT/include/
cp -r $PREFIX/lib/${PKG}* $SYSROOT/lib/
popd
fi



46 changes: 46 additions & 0 deletions sources.wasm/4000-mpdecimal.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash

. ${CONFIG:-config}

PKG=mpdecimal


if [ -d src/${PKG} ]
then
echo ok
else
pushd src
wget -c https://www.bytereef.org/software/${PKG}/releases/${PKG}-4.0.0.tar.gz
tar xfz ${PKG}-4.0.0.tar.gz

mv ${PKG}-4.0.0 ${PKG}

pushd ${PKG}
# patch
popd

popd
fi



if [ -f $PREFIX/lib/lib${PKG}.a ]
then
echo "
${PKG} already built at $PREFIX/lib/lib${PKG}.a
"
else
. scripts/emsdk-fetch.sh

mkdir -p $ROOT/build/${PKG}
pushd $ROOT/build/${PKG}
# --with-pic
emconfigure ${ROOT}/src/${PKG}/configure --prefix=$PREFIX --enable-static --disable-shared --program-suffix=.cjs
emmake make install
#cp -r $PREFIX/include/libmpdec $SYSROOT/include/
#cp -r $PREFIX/lib/libmpdec* $SYSROOT/lib/
popd
fi



0 comments on commit f1aeda6

Please sign in to comment.