aboutsummaryrefslogtreecommitdiff
path: root/graphics/inkscape
diff options
context:
space:
mode:
authorArTourter <artourter@gmail.com>2021-04-02 09:15:59 +0200
committerRobby Workman <rworkman@slackbuilds.org>2021-04-17 23:30:57 -0500
commitdf0128f99e97ce6716342e61190dc344d57427fe (patch)
treee0dc3e9184bb372452a6d8180955083c99bcc5a0 /graphics/inkscape
parent0d782020366bb6b5d5ee34849ebb37cc15faaaa0 (diff)
graphics/inkscape: Patch for glib2 >= 2.67.3.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
Diffstat (limited to 'graphics/inkscape')
-rw-r--r--graphics/inkscape/glib-2.68.patch47
-rw-r--r--graphics/inkscape/inkscape.SlackBuild54
2 files changed, 85 insertions, 16 deletions
diff --git a/graphics/inkscape/glib-2.68.patch b/graphics/inkscape/glib-2.68.patch
new file mode 100644
index 0000000000000..bc23d7df01748
--- /dev/null
+++ b/graphics/inkscape/glib-2.68.patch
@@ -0,0 +1,47 @@
+diff --git a/src/3rdparty/autotrace/autotrace.h b/src/3rdparty/autotrace/autotrace.h
+index 2ce6f272a997cee8c7839412a520106d5584ce4c..e56be9a74c4308cacc4043ef0855edae9cdef0a6 100644
+--- a/src/3rdparty/autotrace/autotrace.h
++++ b/src/3rdparty/autotrace/autotrace.h
+@@ -23,6 +23,9 @@
+
+ #include <stdio.h>
+
++#include "types.h"
++#include "color.h"
++
+ #ifdef __cplusplus
+ extern "C" {
+ #endif /* __cplusplus */
+@@ -35,9 +38,6 @@ extern "C" {
+ * Typedefs
+ * ===================================================================== */
+
+-#include "types.h"
+-#include "color.h"
+-
+ /* Third degree is the highest we deal with. */
+ enum _at_polynomial_degree {
+ AT_LINEARTYPE = 1,
+diff --git a/src/3rdparty/autotrace/color.h b/src/3rdparty/autotrace/color.h
+index e50ab30ae04d1861c4d9aa0f393650d2f2c102da..88651db9f73571cdc5f14cdf4645e8fa69e03912 100644
+--- a/src/3rdparty/autotrace/color.h
++++ b/src/3rdparty/autotrace/color.h
+@@ -24,6 +24,10 @@
+ #include <glib.h>
+ #include <glib-object.h>
+
++#ifdef __cplusplus
++extern "C" {
++#endif /* __cplusplus */
++
+ typedef struct _at_color at_color;
+ struct _at_color {
+ guint8 r;
+@@ -43,4 +47,7 @@ void at_color_free(at_color * color);
+ GType at_color_get_type(void);
+ #define AT_TYPE_COLOR (at_color_get_type ())
+
++#ifdef __cplusplus
++}
++#endif /* __cplusplus */
+ #endif /* not AT_COLOR_H */
diff --git a/graphics/inkscape/inkscape.SlackBuild b/graphics/inkscape/inkscape.SlackBuild
index 4471bf3c1b5bc..9380191a412c7 100644
--- a/graphics/inkscape/inkscape.SlackBuild
+++ b/graphics/inkscape/inkscape.SlackBuild
@@ -69,22 +69,44 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-./autogen.sh
-
-CFLAGS="$SLKCFLAGS" \
-CXXFLAGS="$SLKCFLAGS -std=c++11" \
-./configure \
- --enable-strict-build=no \
- --prefix=/usr \
- --libdir=/usr/lib${LIBDIRSUFFIX} \
- --sysconfdir=/etc \
- --localstatedir=/var \
- --mandir=/usr/man \
- --docdir=/usr/doc/$PRGNAM-$VERSION \
- --build=$ARCH-slackware-linux
-
-make
-make install DESTDIR=$PKG
+patch -p1 < $CWD/glib-2.68.patch
+
+# strip invalid tag
+sed -i /url/d org.inkscape.Inkscape.appdata.xml.in
+
+# https://bugs.launchpad.net/inkscape/+bug/314381
+# a couple of files have executable bits set,
+# despite not being executable
+find . -name '*.cpp' | xargs chmod -x
+find . -name '*.h' | xargs chmod -x
+# Fix end of line encodings
+dos2unix -k -q share/extensions/*.py
+
+# Fix man page location:
+sed -i CMakeScripts/Pod2man.cmake -e "s/SHARE_INSTALL/CMAKE_INSTALL_PREFIX/g"
+
+mkdir -p build
+cd build
+ # imagemagick >= 7.x is unsupported yet, so use GraphicsMagick
+ cmake \
+ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \
+ -DCMAKE_C_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_CXX_FLAGS_RELEASE:STRING="$SLKCFLAGS" \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DCMAKE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ -DCMAKE_INSTALL_MANDIR=/usr/man \
+ -DCMAKE_INSTALL_SYSCONFDIR=/etc \
+ -DINKSCAPE_INSTALL_LIBDIR=/usr/lib${LIBDIRSUFFIX} \
+ -DBUILD_SHARED_LIBS=ON \
+ -DWITH_DBUS=ON \
+ -DWITH_GRAPHICS_MAGICK=ON \
+ -DWITH_IMAGE_MAGICK=OFF \
+ ..
+ make
+ make install DESTDIR=$PKG
+cd ..
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true