[crux-commits] ports/contrib (refs/remotes/origin/3.6): inkscape: update for poppler 21.04.0 and fix build with glib 2.68.0

crux at crux.nu crux at crux.nu
Sat Apr 10 19:05:39 UTC 2021


commit 706727c012191da8821225c8798710e878a32df7
Author: Danny Rawlins <contact at romster.me>
Date:   Sat Apr 3 11:51:15 2021 +1100

    inkscape: update for poppler 21.04.0 and fix build with glib 2.68.0

diff --git a/inkscape/.signature b/inkscape/.signature
index 100cc8810..9f02f5380 100644
--- a/inkscape/.signature
+++ b/inkscape/.signature
@@ -1,7 +1,9 @@
 untrusted comment: verify with /etc/ports/contrib.pub
-RWSagIOpLGJF34c6mJb7XCf3V1tTB13KBHSI8c4B3z7tUU/szeHZ/QkwtZZDIVaoJ7YsjotkcK5HzsklYfsh/zeRuoAVbVP4NQQ=
-SHA256 (Pkgfile) = 34be6e87e3933a6498ea076f97d680b2d87943852a3efb549aadee0674fc786f
+RWSagIOpLGJF3/Qj8GaqJ/m2S0S1iYpfLeTUUBCmiW3JRjh8y2Gz38XvmiLCipZS3YIwaHQE2PwnUxWhaVO3c5EgyTYc1aPHogY=
+SHA256 (Pkgfile) = 16d65e6a4a455abf4b1b1c2b5678e6206110b9b5e1fdfa533a438019a672c890
 SHA256 (.footprint) = a24437cdb60a602d0ed1b310589bc543f0144abb6e7790630cab834fc4128dd3
 SHA256 (inkscape-1.0.2.tar.xz) = da3e230511a08cbf21e86710d161458594fea87867e9157b67ed01a04ea2798a
-SHA256 (poppler-21.03.0.tar.xz) = fd51ead4aac1d2f4684fa6e7b0ec06f0233ed21667e720a4e817e4455dd63d27
-SHA256 (inkscape.patch) = 0cb8b48ace0fb6756c931312591b5ad7681bd95e0a6eb40ad2639daca6d3603c
+SHA256 (poppler-21.04.0.tar.xz) = 5e2219656c6bbd36154133fef2e12b7d0938464518827098b29a10b1697ea79c
+SHA256 (avoid-syntaxwarning-in-python-extension.patch) = 266a1f8ad9ef8f457b334532e7a0ca8523a577ff09909ac6926120e79de41221
+SHA256 (check-for-atomic.patch) = 0cb8b48ace0fb6756c931312591b5ad7681bd95e0a6eb40ad2639daca6d3603c
+SHA256 (python3.patch) = 42fd4106576cbdbbdae8566326cace33669740cc066487d637b9797c71d62b96
diff --git a/inkscape/Pkgfile b/inkscape/Pkgfile
index 9ea63ffc9..ad575d918 100644
--- a/inkscape/Pkgfile
+++ b/inkscape/Pkgfile
@@ -5,12 +5,14 @@
 
 name=inkscape
 version=1.0.2
-_pversion=21.03.0
-_psoversion=108
-release=3
+_pversion=21.04.0
+_psoversion=109
+release=4
 source=(https://media.inkscape.org/dl/resources/file/$name-$version.tar.xz
 	https://poppler.freedesktop.org/poppler-$_pversion.tar.xz
-	inkscape.patch)
+	avoid-syntaxwarning-in-python-extension.patch
+	check-for-atomic.patch
+	python3.patch)
 
 poppler() {
 	cmake -S poppler-$_pversion -B build-poppler -G Ninja \
@@ -42,7 +44,13 @@ poppler() {
 build() {
 	[ ! -e "/usr/lib/libpoppler.so.$_psoversion" ] && poppler
 
-	patch -d $name-${version}_* -p1 -i $SRC/inkscape.patch
+	patch -d $name-${version}_* -p1 -i $SRC/avoid-syntaxwarning-in-python-extension.patch
+	patch -d $name-${version}_* -p1 -i $SRC/check-for-atomic.patch
+	patch -d $name-${version}_* -p1 -i $SRC/python3.patch
+
+	# https://gitlab.gnome.org/GNOME/glib/-/issues/2331
+	CFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'
+	CXXFLAGS+=' -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_46 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_66'
 
 	cmake -S $name-${version}_* -B build -G Ninja \
 		-D CMAKE_INSTALL_PREFIX=/usr \
diff --git a/inkscape/avoid-syntaxwarning-in-python-extension.patch b/inkscape/avoid-syntaxwarning-in-python-extension.patch
new file mode 100644
index 000000000..c8556d4f5
--- /dev/null
+++ b/inkscape/avoid-syntaxwarning-in-python-extension.patch
@@ -0,0 +1,26 @@
+Author: Mattia Rizzolo <mattia at debian.org>
+Description: Avoid SyntaxWarning in a python extension
+ I also reckon the chances of the check actually passing while using `is` to be quite low…
+Forwarded: no, this is already upstream but not (yet) in the 1.0.x branch.
+Last-Updated: 2020-09-10
+
+--- a/share/extensions/interp.py
++++ b/share/extensions/interp.py
+@@ -112,7 +112,7 @@
+                 else:
+                     fillstyle = 'color'
+ 
+-                if strokestyle is 'color':
++                if strokestyle == 'color':
+                     if sst['stroke'] == 'none':
+                         sst['stroke-width'] = '0.0'
+                         sst['stroke-opacity'] = '0.0'
+@@ -122,7 +122,7 @@
+                         est['stroke-opacity'] = '0.0'
+                         est['stroke'] = sst['stroke']
+ 
+-                if fillstyle is 'color':
++                if fillstyle == 'color':
+                     if sst['fill'] == 'none':
+                         sst['fill-opacity'] = '0.0'
+                         sst['fill'] = est['fill']
diff --git a/inkscape/inkscape.patch b/inkscape/check-for-atomic.patch
similarity index 100%
rename from inkscape/inkscape.patch
rename to inkscape/check-for-atomic.patch
diff --git a/inkscape/python3.patch b/inkscape/python3.patch
new file mode 100644
index 000000000..16c431c0e
--- /dev/null
+++ b/inkscape/python3.patch
@@ -0,0 +1,23 @@
+Description: Don't consider `python` a valid python[23]? interpreter.
+ Just to be safe, don't even try to look it up.
+ Should be safe to drop the patch once python2 is not around anymore.
+Author: Mattia Rizzolo <mattia at debian.org>
+Forwarded: not-needed
+Last-Update: 2020-05-07
+
+--- a/src/extension/implementation/script.cpp
++++ b/src/extension/implementation/script.cpp
+@@ -80,9 +80,11 @@
+         { "python",  {"python-interpreter",  {"python3"           }}},
+ #else
+         { "perl",    {"perl-interpreter",    {"perl"              }}},
+-        { "python",  {"python-interpreter",  {"python3", "python" }}},
++        /* don't consider `python` a valid python(3) interpreter */
++        { "python",  {"python-interpreter",  {"python3"           }}},
+ #endif
+-        { "python2", {"python2-interpreter", {"python2", "python" }}},
++        /* don't consider `python` a valid python(2) interpreter either */
++        { "python2", {"python2-interpreter", {"python2" }}},
+         { "ruby",    {"ruby-interpreter",    {"ruby"    }}},
+         { "shell",   {"shell-interpreter",   {"sh"      }}},
+ };


More information about the crux-commits mailing list