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

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

inkscape-devel: update to bzr 13294, fixes quartz default window size bug among others, update description, drop unnecessary extra cflags.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.0 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 119233 2014-04-21 03:17:54Z devans@macports.org $
3
4PortSystem      1.0
5
6name            inkscape-devel
7conflicts       inkscape
8set bzr_rev     13294
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
59patchfiles      patch-revert-r13232.diff
60
61variant python26 conflicts python27 description {Configure to use Python version 2.6} {
62    depends_lib-append \
63        port:py26-lxml \
64        port:py26-numpy
65
66    post-patch {
67        reinplace "s|\"python-interpreter\", \"python\"|\"python-interpreter\", \"python2.6\"|g" ${worksrcpath}/src/extension/implementation/script.cpp
68        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.h
69        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.cpp
70    }
71
72    configure.python \
73        ${prefix}/bin/python2.6
74}
75
76variant python27 conflicts python26 description {Configure to use Python version 2.7} {
77    depends_lib-append \
78        port:py27-lxml \
79        port:py27-numpy
80
81    post-patch {
82        reinplace "s|\"python-interpreter\", \"python\"|\"python-interpreter\", \"python2.7\"|g" ${worksrcpath}/src/extension/implementation/script.cpp
83        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.h
84        reinplace "s|^#include \"Object.h\"|#include \"${prefix}/include/poppler/Object.h\"|" ${worksrcpath}/src/extension/internal/pdfinput/pdf-parser.cpp
85    }
86
87    configure.python \
88        ${prefix}/bin/python2.7
89}
90
91variant gtk3 description {Enable experimental GTK+ 3 build} {
92    depends_lib-delete  port:gtkspell2 \
93                        port:gtk2 \
94                        port:gtkmm
95    depends_lib-append  port:gtkspell3 \
96                        port:gtk3 \
97                        port:gtkmm3 \
98                        port:gdl3
99
100    configure.args-append --enable-gtk3-experimental
101}
102
103variant svg2 description {Enable experimental SVG level 2 proposed features} {
104    configure.cppflags-append \
105                        "-DWITH_MESH -DWITH_CSSBLEND -DWITH_CSSCOMPOSITE"
106}
107
108configure.cmd   ./autogen.sh && ./configure
109
110configure.args  --without-gnome-vfs \
111                --enable-lcms \
112                --enable-poppler-cairo \
113                --enable-dbusapi \
114                --disable-silent-rules \
115                --disable-strict-build
116
117configure.cppflags-append \
118    -I${worksrcpath}/src/extension/script
119
120if {[string match "*clang*" ${configure.compiler}]} {
121    configure.cxxflags-append -std=c++11
122}
123
124if {![variant_isset python26] && ![variant_isset python27]} {
125    default_variants +python27
126}
127
128#
129# the following dummy variants are used
130# to identify this port's binary dependencies
131# based on which variant of gtkmm is used for the build
132#
133
134variant x11 conflicts quartz {}
135variant quartz conflicts x11 {}
136
137if {![variant_isset quartz]} {
138    default_variants +x11
139}
140
141if {[variant_isset gtk3]} {
142    post-activate {
143        system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
144        system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
145    }
146} else {
147    post-activate {
148        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
149        system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
150    }
151}
152
153livecheck.type  none
Note: See TracBrowser for help on using the repository browser.