diff --git a/ports/librsvg/build.sh b/ports/librsvg/build.sh new file mode 100755 index 00000000..e0c88b8f --- /dev/null +++ b/ports/librsvg/build.sh @@ -0,0 +1,15 @@ +#!/bin/bash ../install.sh + +NAME='librsvg' # last pre-rust version +VERSION='2.40.21' +DOWNLOAD_URL="https://download.gnome.org/sources/librsvg/${VERSION%.*}/librsvg-$VERSION.tar.xz#f7628905f1cada84e87e2b14883ed57d8094dca3281d5bcb24ece4279e9a92ba" +DEPENDENCIES=('gdk-pixbuf' 'glib' 'libxml2' 'libcroco' 'cairo' 'pango') +CONFIG_SUB=('config.sub') +CONFIGURE_OPTIONS=( + '--disable-static' + '--enable-shared' + '--enable-pixbuf-loader' + '--disable-introspection' + '--disable-installed-tests' + '--disable-always-build-tests' +) diff --git a/ports/librsvg/patches/0001-add-shared-library-support.patch b/ports/librsvg/patches/0001-add-shared-library-support.patch new file mode 100644 index 00000000..c09b9c1a --- /dev/null +++ b/ports/librsvg/patches/0001-add-shared-library-support.patch @@ -0,0 +1,31 @@ +diff -ruN librsvg-2.40.21/configure librsvg-2.40.21-banan_os/configure +--- librsvg-2.40.21/configure 2020-02-26 19:45:16.000000000 +0200 ++++ librsvg-2.40.21-banan_os/configure 2026-08-24 18:34:52.949804530 +0300 +@@ -6802,6 +6802,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 + ;; +@@ -12275,6 +12279,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" diff --git a/ports/librsvg/patches/0002-fix-gdk-pixbuf-path.patch b/ports/librsvg/patches/0002-fix-gdk-pixbuf-path.patch new file mode 100644 index 00000000..6f709f30 --- /dev/null +++ b/ports/librsvg/patches/0002-fix-gdk-pixbuf-path.patch @@ -0,0 +1,13 @@ +diff -ruN librsvg-2.40.21/configure librsvg-2.40.21-banan_os/configure +--- librsvg-2.40.21/configure 2020-02-26 19:45:16.000000000 +0200 ++++ librsvg-2.40.21-banan_os/configure 2026-08-24 19:52:43.388200018 +0300 +@@ -14745,6 +14745,9 @@ + gdk_pixbuf_binarydir="`$PKG_CONFIG --variable=gdk_pixbuf_binarydir gdk-pixbuf-2.0`" + gdk_pixbuf_moduledir=`$PKG_CONFIG --variable gdk_pixbuf_moduledir gdk-pixbuf-2.0` + gdk_pixbuf_cache_file=`$PKG_CONFIG --variable gdk_pixbuf_cache_file gdk-pixbuf-2.0` ++ gdk_pixbuf_binarydir="${gdk_pixbuf_binarydir#$PKG_CONFIG_SYSROOT_DIR}" ++ gdk_pixbuf_moduledir="${gdk_pixbuf_moduledir#$PKG_CONFIG_SYSROOT_DIR}" ++ gdk_pixbuf_cache_file="${gdk_pixbuf_cache_file#$PKG_CONFIG_SYSROOT_DIR}" + fi + + diff --git a/ports/librsvg/patches/0003-fix-compilation-with-new-libxml.patch b/ports/librsvg/patches/0003-fix-compilation-with-new-libxml.patch new file mode 100644 index 00000000..17c0a7d8 --- /dev/null +++ b/ports/librsvg/patches/0003-fix-compilation-with-new-libxml.patch @@ -0,0 +1,24 @@ +diff -ruN librsvg-2.40.21/rsvg-css.c librsvg-2.40.21-banan_os/rsvg-css.c +--- librsvg-2.40.21/rsvg-css.c 2018-10-02 01:50:22.000000000 +0300 ++++ librsvg-2.40.21-banan_os/rsvg-css.c 2026-08-24 18:45:05.745087552 +0300 +@@ -839,7 +839,7 @@ + } + + static void +-rsvg_xml_noerror (void *data, xmlErrorPtr error) ++rsvg_xml_noerror (void *data, const xmlError* error) + { + } + +diff -ruN librsvg-2.40.21/rsvg-private.h librsvg-2.40.21-banan_os/rsvg-private.h +--- librsvg-2.40.21/rsvg-private.h 2020-02-26 19:40:25.000000000 +0200 ++++ librsvg-2.40.21-banan_os/rsvg-private.h 2026-08-24 18:45:12.583727389 +0300 +@@ -31,7 +31,7 @@ + + #include "rsvg.h" + +-#include ++#include + #include + #include + #include