graphics/inkscape: Patch for glib2 >= 2.67.3.

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
ArTourter 2021-04-02 09:15:59 +02:00 committed by Robby Workman
parent 0d78202036
commit df0128f99e
2 changed files with 83 additions and 14 deletions

View file

@ -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 */

View file

@ -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
patch -p1 < $CWD/glib-2.68.patch
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
# strip invalid tag
sed -i /url/d org.inkscape.Inkscape.appdata.xml.in
make
make install DESTDIR=$PKG
# 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