Skip to content

Commit

Permalink
adding prebuilding for SDL2 and SDL2 image
Browse files Browse the repository at this point in the history
  • Loading branch information
jhay06 committed Sep 9, 2024
1 parent 29d7420 commit 18451f9
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 6 deletions.
22 changes: 16 additions & 6 deletions clickable.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,35 @@ clickable_minimum_required: 7
framework: "ubuntu-sdk-20.04"
builder: "cmake"
build_dir: "build.clickable"

prebuild:
- "/bin/bash -c '../install_sdl2.sh'"
dependencies_target:
- "libogg-dev"
- "libvorbis-dev"
- "libopenal-dev"
- "libsdl2-dev"
- "libsdl2-image-dev"
# - "libsdl2-dev"
# - "libsdl2-image-dev"
- "libfreetype6-dev"
- "libcurl4-openssl-dev"
- "libharfbuzz-dev"
- "libfribidi-dev"
- "libglm-dev"
- "zlib1g-dev"
- "libpulse-dev"
- "libmirclient-dev"
- "libraqm-dev"


install_lib:
- "/usr/lib/${ARCH_TRIPLET}/libogg.so*"
- "/usr/lib/${ARCH_TRIPLET}/libvorbis.so*"
- "/usr/lib/${ARCH_TRIPLET}/libvorbisfile.so*"
- "/usr/lib/${ARCH_TRIPLET}/libopenal.so*"
- "/usr/lib/${ARCH_TRIPLET}/libSDL2.so*"
- "/usr/lib/${ARCH_TRIPLET}/libSDL2-2.0.so*"
- "/usr/lib/${ARCH_TRIPLET}/libSDL2_image.so*"
- "/usr/lib/${ARCH_TRIPLET}/libSDL2_image-2.0.so*"
- "./SDL2_build/${ARCH_TRIPLET}/lib/libSDL2.so*"
- "./SDL2_build/${ARCH_TRIPLET}/lib/libSDL2-2.0.so*"
- "./SDL2_build/${ARCH_TRIPLET}/lib/libSDL2_image.so*"
- "./SDL2_build/${ARCH_TRIPLET}/lib/libSDL2_image-2.0.so*"
- "/usr/lib/${ARCH_TRIPLET}/libfreetype.so*"
- "/usr/lib/${ARCH_TRIPLET}/libcurl.so*"
- "/usr/lib/${ARCH_TRIPLET}/libharfbuzz.so*"
Expand All @@ -37,3 +45,5 @@ build_args:
- "-DWERROR=ON"
- "-DCLICK_ARCH=${ARCH}"
- "-DCLICK_FRAMEWORK=ubuntu-sdk-20.04"
- "-DSDL2_INCLUDE_DIRS=${PWD}/SDL2_build/${ARCH_TRIPLET}/include/SDL2"
- "-DSDL2IMAGE_INCLUDE_DIRS=${PWD}/SDL2_build/${ARCH_TRIPLET}/include/SDL2"
28 changes: 28 additions & 0 deletions install_sdl2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

[ ! -d "build_SDL2" ] && mkdir "build_SDL2"
[ ! -d "build_SDL2_image" ] && mkdir "build_SDL2_image"
export ROOT=${PWD}
export PKG_CONFIG_PATH=${ROOT}/SDL2_build/${ARCH_TRIPLET}
export SDL2_CONFIG=${PKG_CONFIG_PATH}/bin/sdl2-config
git clone https://github.com/libsdl-org/SDL SDL2
cd SDL2
git reset c49ecf6f7c10b668ebd87b89dfc3c7bfd215cb75 --hard
cd ../build_SDL2
../SDL2/configure --enable-video-mir --disable-mir-shared --disable-video-x11 --enable-shared --disable-atomic --disable-joystick --disable-video-dummy --disable-video-dummy --disable-video-opengl --disable-video-opengles1 --enable-video-opengles2 --disable-dbus --disable-ibus --disable-diskaudio --disable-dummyaudio --disable-oss --disable-alsa --disable-esd --disable-arts --disable-nas --disable-sndio --enable-pulseaudio --disable-pulseaudio-shared --host=${ARCH_TRIPLET} --prefix=${ROOT}/SDL2_build/${ARCH_TRIPLET}
make -j4
make install

echo "DONE SDL2"

echo "Building SDL Image"
cd ..
git clone https://github.com/libsdl-org/SDL_image SDL2_image
cd SDL2_image
git reset a21dc0ae4e2bec35be108ffd1040969fce5a3ec0 --hard
cd ../build_SDL2_image
../SDL2_image/configure --disable-shared --enable-static --disable-bmp --disable-gif --disable-jpg --disable-lbm --disable-pcx --enable-png --disable-png-shared --disable-pnm --disable-tga --disable-tif --disable-xcf --disable-xpm --disable-xv --disable-webp --host=${ARCH_TRIPLET} --prefix=${ROOT}/SDL2_build/${ARCH_TRIPLET}
make -j4
make install

echo "DONE SDL2 image"

0 comments on commit 18451f9

Please sign in to comment.