Ports: Build shared libraries for a few more ports

This manually builds shared libraries for a bunch of ports. Using
libtool would be preferable but that's currently broken so I'm
linking the shared libraries manually.
This commit is contained in:
Gunnar Beutner 2021-04-15 15:46:40 +02:00 committed by Andreas Kling
parent c9d5358685
commit da92c0e1ca
10 changed files with 50 additions and 2 deletions

View file

@ -6,3 +6,8 @@ files="https://downloads.sourceforge.net/project/sdl2gfx/SDL2_gfx-${version}.tar
depends="SDL2"
useconfigure=true
configopts="--with-sdl-prefix=${SERENITY_BUILD_DIR}/Root/usr/local"
install() {
run make install DESTDIR=$DESTDIR $installopts
run ${CC} -shared -o $DESTDIR/usr/local/lib/libSDL2_gfx.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libSDL2_gfx.a -Wl,--no-whole-archive
}

View file

@ -19,4 +19,6 @@ build() {
install() {
run make -k DESTDIR="${SERENITY_BUILD_DIR}/Root" install
${CC} -shared -o $DESTDIR/usr/local/lib/libSDL2_image.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libSDL2_image.a -Wl,--no-whole-archive
rm -f $DESTDIR/usr/local/lib/libSDL2_image.la
}

View file

@ -20,4 +20,6 @@ build() {
install() {
run make -k DESTDIR="${SERENITY_BUILD_DIR}/Root" install
${CC} -shared -o $DESTDIR/usr/local/lib/libSDL2_mixer.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libSDL2_mixer.a -Wl,--no-whole-archive -Wl,--no-as-needed -lvorbis -lvorbisfile
rm -f $DESTDIR/usr/local/lib/libSDL2_mixer.la
}

View file

@ -13,3 +13,8 @@ configure() {
FT2_CFLAGS="-I${SERENITY_BUILD_DIR}/Root/usr/local/include/freetype2" \
LIBS="-lgui -lgfx -lipc -lcore -lcompress"
}
install() {
run make install DESTDIR=$DESTDIR $installopts
run ${CC} -shared -o $DESTDIR/usr/local/lib/libSDL2_ttf.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libSDL2_ttf.a -Wl,--no-whole-archive
}

View file

@ -13,5 +13,4 @@ auth_opts="--keyring ./gnu-keyring.gpg libiconv-${version}.tar.gz.sig"
install() {
run make DESTDIR=$DESTDIR $installopts install
run ${SERENITY_ARCH}-pc-serenity-gcc -shared -o $DESTDIR/usr/local/lib/libiconv.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libiconv.a -Wl,--no-whole-archive
run ln -sf ../local/lib/libiconv.so $DESTDIR/usr/lib/libiconv.so
}

View file

@ -5,3 +5,9 @@ useconfigure=true
files="https://ijg.org/files/jpegsrc.v${version}.tar.gz jpeg-${version}.tar.gz ad7e40dedc268f97c44e7ee3cd54548a"
auth_type="md5"
workdir="jpeg-$version"
install() {
run make DESTDIR=$DESTDIR $installopts install
${CC} -shared -o $DESTDIR/usr/local/lib/libjpeg.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libjpeg.a -Wl,--no-whole-archive
rm -f $DESTDIR/usr/local/lib/libjpeg.la
}

View file

@ -3,3 +3,9 @@ port=libogg
version=1.3.4
useconfigure=true
files="https://github.com/xiph/ogg/releases/download/v${version}/libogg-${version}.tar.gz libogg-${version}.tar.gz"
install() {
run make DESTDIR=$DESTDIR $installopts install
${CC} -shared -o $DESTDIR/usr/local/lib/libogg.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libogg.a -Wl,--no-whole-archive
rm -f $DESTDIR/usr/local/lib/libogg.la
}

View file

@ -4,3 +4,10 @@ version=1.6.37
useconfigure=true
files="https://download.sourceforge.net/libpng/libpng-${version}.tar.gz libpng-${version}.tar.gz"
depends="zlib"
install() {
run make DESTDIR=$DESTDIR $installopts install
${CC} -shared -o $DESTDIR/usr/local/lib/libpng16.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libpng16.a -Wl,--no-whole-archive -lz
ln -sf libpng16.so $DESTDIR/usr/local/lib/libpng.so
rm -f $DESTDIR/usr/local/lib/libpng16.la $DESTDIR/usr/local/lib/libpng.la
}

View file

@ -4,3 +4,13 @@ version=1.3.7
useconfigure=true
files="https://github.com/xiph/vorbis/releases/download/v${version}/libvorbis-${version}.tar.gz libvorbis-${version}.tar.gz"
depends=libogg
install() {
run make DESTDIR=$DESTDIR $installopts install
${CC} -shared -o $DESTDIR/usr/local/lib/libvorbis.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libvorbis.a -Wl,--no-whole-archive -logg
rm -f $DESTDIR/usr/local/lib/libvorbis.la
${CC} -shared -o $DESTDIR/usr/local/lib/libvorbisenc.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libvorbisenc.a -Wl,--no-whole-archive -lvorbis
rm -f $DESTDIR/usr/local/lib/libvorbisenc.la
${CC} -shared -o $DESTDIR/usr/local/lib/libvorbisfile.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libvorbisfile.a -Wl,--no-whole-archive -lvorbis
rm -f $DESTDIR/usr/local/lib/libvorbisfile.la
}

View file

@ -10,5 +10,11 @@ auth_import_key="783FCD8E58BCAFBA"
auth_opts="zlib-${version}.tar.gz.asc"
configure() {
run ./configure --static
run ./configure
}
install() {
run make DESTDIR=$DESTDIR $installopts install
${CC} -shared -o $DESTDIR/usr/local/lib/libz.so -Wl,--whole-archive $DESTDIR/usr/local/lib/libz.a -Wl,--no-whole-archive
rm -f $DESTDIR/usr/local/lib/libz.la
}