Skip to content

Commit

Permalink
3.1.68.2bi
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Sep 24, 2024
1 parent cb43f62 commit 4ceaf3c
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 41 deletions.
12 changes: 6 additions & 6 deletions scripts/emsdk-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ fi
wget https://github.com/pmp-p/emscripten/pull/3.diff
patch -p1 < 3.diff

echo "FIXME: remove XHR for .data and use fetch"
wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/22016.diff
patch -p1 < 22016.diff
#echo "FIXME: remove XHR for .data and use fetch" MERGED
#wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/22016.diff
#patch -p1 < 22016.diff

echo "FIXME: scriptDirectory workaround"
wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/22605.diff
patch -p1 < 22605.diff
#echo "FIXME: scriptDirectory workaround" MERGER
#wget https://patch-diff.githubusercontent.com/raw/emscripten-core/emscripten/pull/22605.diff
#patch -p1 < 22605.diff
popd


Expand Down
79 changes: 44 additions & 35 deletions sources.wasm/9000-uuid-ossp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,48 +15,57 @@ else
git clone https://github.com/pygame-web/ossp-uuid uuid-1.6.2
fi

if [ -f $PREFIX/lib/libossp-uuid.a ]
INCDIR=$EMSDK/upstream/emscripten/cache/sysroot/include
LIBDIR=$EMSDK/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten

if [ -f $LIBDIR/pic/libossp-uuid.a ]
then
echo "
already built in $PREFIX/lib/
"
else

mkdir -p $ROOT/build/libuuid
cat > config.site <<END
ac_cv_prog_ac_ct_STRIP=/bin/true
ac_cv_prog_STRIP=/bin/true

for mode in "--without-pic" "--with-pic"
do
rm -rf $ROOT/build/libuuid/*
pushd $ROOT/build/libuuid
cat > config.site << END
ac_cv_exeext=.cjs
END
pushd $ROOT/build/libuuid
mkdir -p bin
ln -sf /bin/true bin/strip
export PATH=$(pwd)/bin:$PATH
if STRIP=/bin/true CONFIG_SITE=config.site emconfigure ../../src/uuid-1.6.2/configure --with-gnu-ld --with-pic --disable-shared --prefix=$PREFIX
then
emmake make
sed -i 's|luuid|lossp-uuid|g' uuid.pc
cp uuid.pc ../../src/uuid-1.6.2/
echo "------ installing uuid ---------"
emmake make install
INCDIR=$EMSDK/upstream/emscripten/cache/sysroot/include
LIBDIR=$EMSDK/upstream/emscripten/cache/sysroot/lib/wasm32-emscripten
mkdir -p ${INCDIR}/ossp
mv $PREFIX/include/uuid.h ${INCDIR}/ossp/

cp -r ${INCDIR}/ossp $PREFIX/include/
mv $PREFIX/lib/libuuid.a $PREFIX/lib/libossp-uuid.a
# FIXME: non pic version is not built
cp $PREFIX/lib/libossp-uuid.a $LIBDIR
cp $PREFIX/lib/libossp-uuid.a $LIBDIR/pic
rm $PREFIX/lib/libuuid.la
else
echo "
failed to build uuid-ossp
"
exit 44
fi
popd
mkdir -p bin
ln -sf /bin/true bin/strip
export PATH=$(pwd)/bin:$PATH

if CONFIG_SIZE=$(pwd)/config.site emconfigure ../../src/uuid-1.6.2/configure --with-gnu-ld $mode --disable-shared --prefix=$PREFIX
then
emmake make
sed -i 's|luuid|lossp-uuid|g' uuid.pc
cp uuid.pc ../../src/uuid-1.6.2/
echo "------ installing uuid ---------"
emmake make install
mkdir -p ${INCDIR}/ossp
mv $PREFIX/include/uuid.h ${INCDIR}/ossp/

cp -r ${INCDIR}/ossp $PREFIX/include/

if echo $mode | grep -q with-pic
then
mv $PREFIX/lib/libuuid.a $LIBDIR/pic/libossp-uuid.a
else
mv $PREFIX/lib/libuuid.a $LIBDIR/libossp-uuid.a
fi
rm $PREFIX/lib/libuuid.la
else
echo "
failed to build uuid-ossp
"
exit 44
fi
popd
done
fi

0 comments on commit 4ceaf3c

Please sign in to comment.