[129412] users/devans/dports/graphics/inkscape
devans at macports.org
devans at macports.org
Fri Dec 12 17:34:04 PST 2014
Revision: 129412
https://trac.macports.org/changeset/129412
Author: devans at macports.org
Date: 2014-12-12 17:34:04 -0800 (Fri, 12 Dec 2014)
Log Message:
-----------
devans/dports: inkscape, sync with trunk, patch to build with poppler 0.29 and increment revision.
Modified Paths:
--------------
users/devans/dports/graphics/inkscape/Portfile
Added Paths:
-----------
users/devans/dports/graphics/inkscape/files/patch-poppler-0.29.0.diff
users/devans/dports/graphics/inkscape/files/patch-r10041-thru-r10043.diff
Modified: users/devans/dports/graphics/inkscape/Portfile
===================================================================
--- users/devans/dports/graphics/inkscape/Portfile 2014-12-12 23:20:27 UTC (rev 129411)
+++ users/devans/dports/graphics/inkscape/Portfile 2014-12-13 01:34:04 UTC (rev 129412)
@@ -6,6 +6,7 @@
name inkscape
conflicts inkscape-devel
version 0.48.5
+revision 6
license GPL-2 LGPL-2.1
maintainers devans
categories graphics gnome
@@ -46,25 +47,26 @@
port:libwpg \
port:gtkspell2
-patchfiles patch-python-configure.ac.diff
+patchfiles patch-python-configure.ac.diff \
+ patch-r10041-thru-r10043.diff \
+ patch-poppler-0.29.0.diff
-variant python26 conflicts python27 description {Configure to use Python version 2.6} {
- depends_lib-append \
- port:py26-lxml \
- port:py26-numpy
+use_autoreconf yes
+autoreconf.args -fvi
- post-patch {
- reinplace "s|@@MP_PYTHON_VERSION@@|2.6|" configure.ac
- reinplace "s|\"python-interpreter\", \"python\"|\"python-interpreter\", \"python2.6\"|g" ${worksrcpath}/src/extension/implementation/script.cpp
- reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.h
- reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.cpp
- }
+configure.args --without-gnome-vfs \
+ --without-python \
+ --enable-lcms \
+ --enable-poppler-cairo
- configure.python \
- ${prefix}/bin/python2.6
+configure.cppflags-append \
+ -I${worksrcpath}/src/extension/script
+
+if {[string match "*clang*" ${configure.compiler}]} {
+ configure.cxxflags-append -std=c++11
}
-variant python27 conflicts python26 description {Configure to use Python version 2.7} {
+variant python27 description {Configure to use Python version 2.7} {
depends_lib-append \
port:py27-lxml \
port:py27-numpy
@@ -78,27 +80,15 @@
configure.python \
${prefix}/bin/python2.7
+
+ configure.args-replace \
+ --without-python --with-python
}
-use_autoreconf yes
-autoreconf.args -fvi
+# enable optional python support by default
-configure.args --without-gnome-vfs \
- --with-python \
- --enable-lcms \
- --enable-poppler-cairo
+default_variants +python27
-configure.cppflags-append \
- -I${worksrcpath}/src/extension/script
-
-if {[string match "*clang*" ${configure.compiler}]} {
- configure.cxxflags-append -std=c++11
-}
-
-if {![variant_isset python26] && ![variant_isset python27]} {
- default_variants +python27
-}
-
#
# the following dummy variants are used
# to identify this port's binary dependencies
Added: users/devans/dports/graphics/inkscape/files/patch-poppler-0.29.0.diff
===================================================================
--- users/devans/dports/graphics/inkscape/files/patch-poppler-0.29.0.diff (rev 0)
+++ users/devans/dports/graphics/inkscape/files/patch-poppler-0.29.0.diff 2014-12-13 01:34:04 UTC (rev 129412)
@@ -0,0 +1,98 @@
+=== modified file 'configure.ac'
+--- configure.ac 2014-06-20 21:38:59 +0000
++++ configure.ac 2014-12-10 20:32:33 +0000
+@@ -593,6 +593,11 @@
+ AC_DEFINE(POPPLER_EVEN_NEWER_COLOR_SPACE_API, 1, [Use even newer color space API from Poppler >= 0.26.0])
+ fi
+
++PKG_CHECK_MODULES(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, poppler >= 0.29.0, popplernewernewcolorspaceapi=yes, popplernewernewcolorspaceapi=no)
++if test "x$popplernewernewcolorspaceapi" = "xyes"; then
++ AC_DEFINE(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API, 1, [Use even newer new color space API from Poppler >= 0.29.0])
++fi
++
+ # Poppler's b604a008 commit changes this
+ AC_MSG_CHECKING([whether Poppler's GfxPatch no longer uses GfxColor])
+ popplergfxcolor="no"
+=== modified file 'src/extension/internal/pdfinput/pdf-parser.cpp'
+--- src/extension/internal/pdfinput/pdf-parser.cpp 2014-06-03 15:44:09 +0000
++++ src/extension/internal/pdfinput/pdf-parser.cpp 2014-12-10 20:32:30 +0000
+@@ -860,7 +860,9 @@
+ blendingColorSpace = NULL;
+ isolated = knockout = gFalse;
+ if (!obj4.dictLookup(const_cast<char*>("CS"), &obj5)->isNull()) {
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ blendingColorSpace = GfxColorSpace::parse(NULL, &obj5, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ blendingColorSpace = GfxColorSpace::parse(&obj5, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ blendingColorSpace = GfxColorSpace::parse(&obj5, NULL);
+@@ -1085,7 +1087,13 @@
+
+ state->setFillPattern(NULL);
+ res->lookupColorSpace(args[0].getName(), &obj);
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ if (obj.isNull()) {
++ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL);
++ } else {
++ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL);
++ }
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ if (obj.isNull()) {
+ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
+ } else {
+@@ -1126,7 +1134,13 @@
+
+ state->setStrokePattern(NULL);
+ res->lookupColorSpace(args[0].getName(), &obj);
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ if (obj.isNull()) {
++ colorSpace = GfxColorSpace::parse(NULL, &args[0], NULL, NULL);
++ } else {
++ colorSpace = GfxColorSpace::parse(NULL, &obj, NULL, NULL);
++ }
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ if (obj.isNull()) {
+ colorSpace = GfxColorSpace::parse(&args[0], NULL, NULL);
+ } else {
+@@ -2756,8 +2770,10 @@
+ }
+ }
+ if (!obj1.isNull()) {
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+- colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ colorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++ colorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ colorSpace = GfxColorSpace::parse(&obj1, NULL);
+ #else
+@@ -2847,8 +2863,10 @@
+ obj2.free();
+ }
+ }
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+- GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ GfxColorSpace *maskColorSpace = GfxColorSpace::parse(NULL, &obj1, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++ GfxColorSpace *maskColorSpace = GfxColorSpace::parse(&obj1, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ maskColorSpace = GfxColorSpace::parse(&obj1, NULL);
+ #else
+@@ -3040,7 +3058,9 @@
+ if (obj1.dictLookup(const_cast<char*>("S"), &obj2)->isName(const_cast<char*>("Transparency"))) {
+ transpGroup = gTrue;
+ if (!obj1.dictLookup(const_cast<char*>("CS"), &obj3)->isNull()) {
+-#if defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
++#if defined(POPPLER_EVEN_NEWER_NEW_COLOR_SPACE_API)
++ blendingColorSpace = GfxColorSpace::parse(NULL, &obj3, NULL, NULL);
++#elif defined(POPPLER_EVEN_NEWER_COLOR_SPACE_API)
+ blendingColorSpace = GfxColorSpace::parse(&obj3, NULL, NULL);
+ #elif defined(POPPLER_NEW_COLOR_SPACE_API) || defined(POPPLER_NEW_ERRORAPI)
+ blendingColorSpace = GfxColorSpace::parse(&obj3, NULL);
+
+
Added: users/devans/dports/graphics/inkscape/files/patch-r10041-thru-r10043.diff
===================================================================
--- users/devans/dports/graphics/inkscape/files/patch-r10041-thru-r10043.diff (rev 0)
+++ users/devans/dports/graphics/inkscape/files/patch-r10041-thru-r10043.diff 2014-12-13 01:34:04 UTC (rev 129412)
@@ -0,0 +1,47 @@
+=== modified file 'src/color-profile.cpp'
+--- src/color-profile.cpp 2014-03-18 11:45:34 +0000
++++ src/color-profile.cpp 2014-10-30 18:35:32 +0000
+@@ -13,6 +13,7 @@
+ #include <gtk/gtk.h>
+ #endif // DEBUG_LCMS
+
++#include <unistd.h>
+ #include <cstring>
+ #include <string>
+ #include <io/sys.h>
+
+=== modified file 'src/io/inkjar.cpp'
+--- src/io/inkjar.cpp 2013-11-12 20:52:11 +0000
++++ src/io/inkjar.cpp 2014-09-12 15:05:40 +0000
+@@ -107,7 +107,7 @@
+
+ bool JarFile::open()
+ {
+- if ((fd = fopen(_filename, O_RDONLY)) < 0) {
++ if (!(fd = fopen(_filename, "r"))) {
+ fprintf(stderr, "open failed.\n");
+ return false;
+ }
+@@ -119,7 +119,7 @@
+
+ bool JarFile::close()
+ {
+- if (fd >= 0 && !fclose(fd)) {
++ if (fd && !fclose(fd)) {
+ inflateEnd(&_zs);
+ return true;
+ }
+
+=== modified file 'src/object-snapper.cpp'
+--- src/object-snapper.cpp 2010-07-19 06:51:04 +0000
++++ src/object-snapper.cpp 2014-09-12 15:05:40 +0000
+@@ -561,7 +561,7 @@
+ // When it's within snapping range, then return it
+ // (within snapping range == between p_min_on_cl and p_max_on_cl == 0 < ta < 1)
+ Geom::Coord dist = Geom::L2(_snapmanager->getDesktop()->dt2doc(p_proj_on_cl) - p_inters);
+- SnappedPoint s(_snapmanager->getDesktop()->doc2dt(p_inters), p.getSourceType(), p.getSourceNum(), k->target_type, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), true, k->target_bbox);
++ SnappedPoint s(_snapmanager->getDesktop()->doc2dt(p_inters), p.getSourceType(), p.getSourceNum(), k->target_type, dist, getSnapperTolerance(), getSnapperAlwaysSnap(), true, false, k->target_bbox);
+ sc.points.push_back(s);
+ }
+ }
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141212/0cb02c9b/attachment.html>
More information about the macports-changes
mailing list