ports: Add librsvg port

We use version 2.40.21 as that is the last version that does not need a
rust toolchain
This commit is contained in:
2026-08-24 20:58:21 +03:00
parent d22ff2cbc4
commit c6536260c3
4 changed files with 83 additions and 0 deletions
+15
View File
@@ -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'
)
@@ -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"
@@ -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
@@ -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 <libxml/SAX.h>
+#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <pango/pango.h>
#include <glib.h>