Skip to content

Commit

Permalink
upgrade SDL_image to 2.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Aug 16, 2022
1 parent f01b170 commit fe5132d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion config
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export CPOPTS="-Os -g0 -fPIC"

if [ -f ${ROOT}/dev ]
then
export COPTS="-O0 -g3 -fPIC"
export COPTS="-O1 -g3 -fPIC"
export QUIET=""
else
export COPTS="-Os -g0 -fPIC"
Expand Down
2 changes: 1 addition & 1 deletion python-wasm-sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ORIGIN=$(pwd)

# 3.12 3.11 3.10

BUILDS=${BUILDS:-3.12 3.11}
BUILDS=${BUILDS:-3.12 3.11 3.10}

for PYBUILD in $BUILDS
do
Expand Down
12 changes: 7 additions & 5 deletions scripts/cpython-build-emsdk-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cd $ROOT
# http://code.google.com/intl/en-US/speed/webp/index.html

ALL="-fPIC -s USE_SDL=2 -sUSE_LIBPNG -sUSE_LIBJPEG $CPPFLAGS"
CNF="emconfigure ./configure --prefix=$PREFIX --with-pic --disable-shared"
CNF="emconfigure ./configure --prefix=$PREFIX --with-pic --disable-shared --host $(clang -dumpmachine)"

# ncurses ncursesw

Expand Down Expand Up @@ -110,17 +110,19 @@ then
"
else
#[ -d SDL_image ] || git clone https://github.com/libsdl-org/SDL_image
if [ -d SDL2_image-2.5.1 ]
if [ -d SDL2_image-2.6.1 ]
then
echo "
* build SDL2_image pre release
" 1>&2
else
wget -c -q https://github.com/libsdl-org/SDL_image/releases/download/candidate-2.5.1/SDL2_image-2.5.1.tar.gz
tar xfz SDL2_image-2.5.1.tar.gz
#bad png+grayscale https://github.com/libsdl-org/SDL_image/releases/download/candidate-2.5.1/SDL2_image-2.5.1.tar.gz
wget -c -q https://github.com/libsdl-org/SDL_image/releases/download/release-2.6.1/SDL2_image-2.6.1.tar.gz

tar xfz SDL2_image-2.6.1.tar.gz
fi

pushd SDL2_image-2.5.1
pushd SDL2_image-2.6.1
CFLAGS=$CPOPTS EMCC_CFLAGS="$ALL" CC=emcc $CNF \
--disable-sdltest --disable-jpg-shared --disable-png-shared
#--disable-tif-shared
Expand Down
9 changes: 5 additions & 4 deletions scripts/cpython-build-emsdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,10 +244,11 @@ fi
cp -Rfv $ROOT/support/__EMSCRIPTEN__.patches/${PYBUILD}/. $PREFIX/lib/python${PYBUILD}/

cp -vf build/cpython-wasm/libpython${PYBUILD}.a prebuilt/emsdk/
if [ -f build/cpython-wasm/Modules/expat/libexpat.a ]
then
cp build/cpython-wasm/Modules/expat/libexpat.a prebuilt/emsdk/libexpat${PYBUILD}.a
fi
for lib in $(find build/cpython-wasm/|grep lib.*.a$)
do
name=$(basename $lib .a)
cp $lib prebuilt/emsdk/${name}${PYBUILD}.a
done
rmdir $PREFIX/lib/python${PYBUILD}/lib-dynload
fi
fi
Expand Down
1 change: 1 addition & 0 deletions scripts/emsdk-fetch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ else
fi
END

cat emsdk/upstream/emscripten/emcc > emsdk/upstream/emscripten/em++

cat > emsdk/upstream/emscripten/emar <<END
Expand Down

0 comments on commit fe5132d

Please sign in to comment.