source: trunk/dports/graphics/inkscape-devel/Portfile @ 120957

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

inkscape-devel: update to bzr 13407, delete patch now handled upstream, supports poppler 0.26 in addition to previous versions.

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