Browse Source

graphics/librsvg2: fix build with newer libxml2

- explicitly #include <libxml/tree.h>, probably from <libxml/SAX.h> before
- account for changed xmlStructuredErrorFunc typedef in <libxml/xmlerror.h>

While here, cosmetic ordering and fix gtk-doc typo; bump PORTREVISION
for that.

PR: 279705
Co-authored-by: vvd
overlay
Charlie Li 2 days ago
parent
commit
9acdf260ed
No known key found for this signature in database GPG Key ID: CFFB5727EEC96A04
  1. 38
      graphics/librsvg2/Makefile
  2. 6
      graphics/librsvg2/distinfo
  3. 14
      graphics/librsvg2/files/patch-rsvg-css.c
  4. 10
      graphics/librsvg2/files/patch-rsvg-private.h

38
graphics/librsvg2/Makefile

@ -1,10 +1,10 @@
PORTNAME= librsvg
PORTVERSION= 2.40.21
PORTREVISION= 4
PORTREVISION= 5
CATEGORIES= graphics gnome
MASTER_SITES= GNOME
PKGNAMESUFFIX= 2
DIST_SUBDIR= gnome2
DIST_SUBDIR= gnome
MAINTAINER= desktop@FreeBSD.org
COMMENT= Library for parsing and rendering SVG vector-graphic files
@ -13,8 +13,6 @@ WWW= https://live.gnome.org/LibRsvg
LICENSE= GPLv2 LGPL20
LICENSE_COMB= multi
BROKEN= Fails to build with libxml2 2.13+, error: unknown type name 'xmlParserCtxtPtr'
LIB_DEPENDS= libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig \
libpng.so:graphics/png \
@ -22,21 +20,6 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 \
USES= cpe gmake gnome libtool localbase pathfix pkgconfig tar:xz
CONFLICTS_INSTALL= librsvg2-rust
# librsvg2 2.42+ needs rust to build, which is not available on all
# FreeBSD archs. So limit pure C version 2.40.x.
PORTSCOUT= limit:^2\.40\.
OPTIONS_DEFINE= DOCS VAPI
OPTIONS_DEFAULT= DOCS VAPI
OPTIONS_SUB= yes
DOCS_CONFIGURE_ENABLE= grk-doc-html
VAPI_USES= vala:build
VAPI_CONFIGURE_ON= --enable-vala=yes
VAPI_CONFIGURE_OFF= --enable-vala=no
USE_GNOME= cairo gnomeprefix gdkpixbuf introspection:build \
libxml2 pango
CPE_VENDOR= gnome
@ -44,6 +27,7 @@ USE_LDCONFIG= yes
GNU_CONFIGURE= yes
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
INSTALL_TARGET= install-strip
TEST_TARGET= check
CONFIGURE_ARGS= --disable-Bsymbolic
DOCSDIR?= ${PREFIX}/share/doc
@ -51,6 +35,22 @@ GNOME_HTML_DIR= ${DOCSDIR}
PLIST_SUB+= PORTVERSION=${PORTVERSION}
CONFLICTS_INSTALL= librsvg2-rust
# librsvg2 2.42+ needs rust to build, which is not available on all
# FreeBSD archs. So limit pure C version 2.40.x.
PORTSCOUT= limit:^2\.40\.
OPTIONS_DEFINE= DOCS VAPI
OPTIONS_DEFAULT= DOCS VAPI
OPTIONS_SUB= yes
DOCS_BUILD_DEPENDS= gtkdocize:textproc/gtk-doc
DOCS_CONFIGURE_ENABLE= gtk-doc gtk-doc-html
VAPI_USES= vala:build
VAPI_CONFIGURE_ON= --enable-vala=yes
VAPI_CONFIGURE_OFF= --enable-vala=no
post-patch:
@${REINPLACE_CMD} -e 's|GTK3_REQUIRED=3.[0-9][0-9].[0-9]|GTK3_REQUIRED=9.90.0|g' \
${WRKSRC}/configure

6
graphics/librsvg2/distinfo

@ -1,3 +1,3 @@
TIMESTAMP = 1583164702
SHA256 (gnome2/librsvg-2.40.21.tar.xz) = f7628905f1cada84e87e2b14883ed57d8094dca3281d5bcb24ece4279e9a92ba
SIZE (gnome2/librsvg-2.40.21.tar.xz) = 1655860
TIMESTAMP = 1750895954
SHA256 (gnome/librsvg-2.40.21.tar.xz) = f7628905f1cada84e87e2b14883ed57d8094dca3281d5bcb24ece4279e9a92ba
SIZE (gnome/librsvg-2.40.21.tar.xz) = 1655860

14
graphics/librsvg2/files/patch-rsvg-css.c

@ -0,0 +1,14 @@
--- rsvg-css.c.orig 2018-10-01 22:50:22 UTC
+++ rsvg-css.c
@@ -839,7 +839,11 @@ static void
}
static void
+#if LIBXML_VERSION < 21200
rsvg_xml_noerror (void *data, xmlErrorPtr error)
+#else
+rsvg_xml_noerror (void *data, const xmlError *error)
+#endif
{
}

10
graphics/librsvg2/files/patch-rsvg-private.h

@ -0,0 +1,10 @@
--- rsvg-private.h.orig 2020-02-26 17:40:25 UTC
+++ rsvg-private.h
@@ -32,6 +32,7 @@
#include "rsvg.h"
#include <libxml/SAX.h>
+#include <libxml/tree.h>
#include <libxml/xmlmemory.h>
#include <pango/pango.h>
#include <glib.h>
Loading…
Cancel
Save