diff --git a/ports/libwebp/build.sh b/ports/libwebp/build.sh new file mode 100755 index 00000000..5be41f5b --- /dev/null +++ b/ports/libwebp/build.sh @@ -0,0 +1,19 @@ +#!/bin/bash ../install.sh + +NAME='libwebp' +VERSION='1.5.0' +DOWNLOAD_URL="https://storage.googleapis.com/downloads.webmproject.org/releases/webp/libwebp-$VERSION.tar.gz#7d6fab70cf844bf6769077bd5d7a74893f8ffd4dfb42861745750c63c2a5c92c" +DEPENDENCIES=('libpng' 'libjpeg' 'libtiff') +CONFIGURE_OPTIONS=( + "--with-pngincludedir=$BANAN_SYSROOT/usr/include" + "--with-pnglibdir=$BANAN_SYSROOT/usr/lib" +) + +install() { + make install DESTDIR="$BANAN_SYSROOT" || exit 1 + + # remove libtool files + rm -f $BANAN_SYSROOT/usr/lib/libwebp.la + rm -f $BANAN_SYSROOT/usr/lib/libwebpdemux.la + rm -f $BANAN_SYSROOT/usr/lib/libwebpmux.la +} diff --git a/ports/libwebp/patches/0001-add-banan_os-target.patch b/ports/libwebp/patches/0001-add-banan_os-target.patch new file mode 100644 index 00000000..142d0106 --- /dev/null +++ b/ports/libwebp/patches/0001-add-banan_os-target.patch @@ -0,0 +1,12 @@ +diff -ruN libwebp-1.5.0/config.sub libwebp-1.5.0-banan_os/config.sub +--- libwebp-1.5.0/config.sub 2024-12-20 03:52:53.000000000 +0200 ++++ libwebp-1.5.0-banan_os/config.sub 2025-06-11 12:46:06.199497350 +0300 +@@ -1754,7 +1754,7 @@ + | onefs* | tirtos* | phoenix* | fuchsia* | redox* | bme* \ + | midnightbsd* | amdhsa* | unleashed* | emscripten* | wasi* \ + | nsk* | powerunix* | genode* | zvmoe* | qnx* | emx* | zephyr* \ +- | fiwix* ) ++ | fiwix* | banan_os* ) + ;; + # This one is extra strict with allowed versions + sco3.2v2 | sco3.2v[4-9]* | sco5v6*) diff --git a/ports/libwebp/patches/0002-build-shared-libraries.patch b/ports/libwebp/patches/0002-build-shared-libraries.patch new file mode 100644 index 00000000..6c7db9a7 --- /dev/null +++ b/ports/libwebp/patches/0002-build-shared-libraries.patch @@ -0,0 +1,31 @@ +diff -ruN libwebp-1.5.0/configure libwebp-1.5.0-banan_os/configure +--- libwebp-1.5.0/configure 2024-12-20 03:52:53.000000000 +0200 ++++ libwebp-1.5.0-banan_os/configure 2025-06-11 15:06:04.232055731 +0300 +@@ -6104,6 +6104,10 @@ + lt_cv_deplibs_check_method=pass_all + ;; + ++banan_os*) ++ lt_cv_deplibs_check_method=pass_all ++ ;; ++ + beos*) + lt_cv_deplibs_check_method=pass_all + ;; +@@ -11469,6 +11473,16 @@ + esac + ;; + ++banan_os*) ++ version_type=linux # correct to gnu/linux during the next big refactor ++ need_lib_prefix=no ++ need_version=no ++ library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ++ soname_spec='$libname$release$shared_ext$major' ++ dynamic_linker="$host_os DynamicLoader.so" ++ shlibpath_var=LD_LIBRARY_PATH ++ ;; ++ + beos*) + library_names_spec='$libname$shared_ext' + dynamic_linker="$host_os ld.so"