source: users/devans/dports/graphics/inkscape-devel/Portfile @ 126093

Last change on this file since 126093 was 126093, checked in by devans@…, 6 years ago

devans/dports: inkscape-devel, update to trunk bzr 13577 for testing.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 126093 2014-10-03 15:49:12Z devans@macports.org $
3
4PortSystem      1.0
5
6name            inkscape-devel
7conflicts       inkscape inkscape-experimental inkscape-prerelease
8set bzr_rev     13577
9version         0.48.99.${bzr_rev}
10epoch           1
11license         GPL-2 LGPL-2.1
12maintainers     devans
13categories      graphics gnome
14platforms       darwin
15description     Unstable development version of Inkscape from \
16                recent BZR trunk leading up to release of version 0.91.
17
18long_description \
19                Inkscape is an open source SVG editor with \
20                capabilities similar to Illustrator, CorelDraw, \
21                Visio, etc. Supported SVG features include basic \
22                shapes, paths, text, alpha blending, transforms, \
23                gradients, node editing, svg-to-png export, \
24                grouping, and more.
25homepage        http://www.inkscape.org/
26master_sites    file:///Users/devans/macports/distfiles/${name}
27
28checksums       rmd160  707ecaf4b2ab376c30ff91495c9af7dc03b37f4a \
29                sha256  4e0f547a247215d9b4767b0f32b1854832108d1b1eb4d6dfb941c720f21010ae
30
31worksrcdir      inkscape
32
33depends_build   port:pkgconfig \
34                port:autoconf \
35                port:automake \
36                port:libtool \
37                port:intltool \
38                path:bin/perl:perl5
39
40depends_lib     port:desktop-file-utils \
41                port:popt \
42                path:lib/libgc.dylib:boehmgc \
43                port:gsl \
44                port:gtkmm \
45                port:dbus-glib \
46                port:lcms \
47                port:poppler \
48                port:boost \
49                port:ImageMagick \
50                port:libcdr \
51                port:libexif \
52                port:libvisio \
53                port:libwpg \
54                port:gtkspell2
55
56variant revenge description {Experimental upstream patch to build with latest libcdr, libvisio, libwpg based on librevenge} {
57    patchfiles-append   patch-librevenge.diff
58    depends_lib-delete  port:libcdr \
59                        port:libvisio \
60                        port:libwpg
61    depends_lib-append  port:libcdr-0.1 \
62                        port:libvisio-0.1 \
63                        port:libwpg-0.3
64}
65
66variant python26 conflicts python27 description {Configure to use Python version 2.6} {
67    depends_lib-append \
68        port:py26-lxml \
69        port:py26-numpy
70
71    post-patch {
72        reinplace "s|\"python-interpreter\", \"python\"|\"python-interpreter\", \"python2.6\"|g" ${worksrcpath}/src/extension/implementation/script.cpp
73        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.h
74        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.cpp
75    }
76
77    configure.python \
78        ${prefix}/bin/python2.6
79}
80
81variant python27 conflicts python26 description {Configure to use Python version 2.7} {
82    depends_lib-append \
83        port:py27-lxml \
84        port:py27-numpy
85
86    post-patch {
87        reinplace "s|\"python-interpreter\", \"python\"|\"python-interpreter\", \"python2.7\"|g" ${worksrcpath}/src/extension/implementation/script.cpp
88        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.h
89        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.cpp
90    }
91
92    configure.python \
93        ${prefix}/bin/python2.7
94}
95
96variant gtk3 description {Enable experimental GTK+ 3 build} {
97    depends_lib-delete  port:gtkspell2 \
98                        port:gtk2 \
99                        port:gtkmm
100    depends_lib-append  port:gtkspell3 \
101                        port:gtk3 \
102                        port:gtkmm3 \
103                        port:gdl3
104
105    configure.args-append --enable-gtk3-experimental
106}
107
108variant svg2 description {Enable experimental SVG level 2 proposed features} {
109    configure.cppflags-append \
110                        "-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE"
111}
112
113configure.cmd   ./autogen.sh && ./configure
114
115configure.args  --without-gnome-vfs \
116                --enable-lcms \
117                --enable-poppler-cairo \
118                --enable-dbusapi \
119                --disable-silent-rules \
120                --disable-strict-build
121
122configure.cppflags-append \
123    -I${worksrcpath}/src/extension/script
124
125if {[string match "*clang*" ${configure.compiler}]} {
126    configure.cxxflags-append -std=c++11
127}
128
129if {![variant_isset python26] && ![variant_isset python27]} {
130    default_variants +python27
131}
132
133variant strict description {Enable strict build} {
134    configure.args-replace  --disable-strict-build --enable-strict-build
135}
136
137#
138# the following dummy variants are used
139# to identify this port's binary dependencies
140# based on which variant of gtkmm is used for the build
141#
142
143variant x11 conflicts quartz {}
144variant quartz conflicts x11 {}
145
146if {![variant_isset quartz]} {
147    default_variants +x11
148}
149
150if {[variant_isset gtk3]} {
151    post-activate {
152        system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
153        system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
154    }
155} else {
156    post-activate {
157        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
158        system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
159    }
160}
161
162livecheck.type  none
Note: See TracBrowser for help on using the repository browser.