source: users/devans/dports/graphics/inkscape-experimental/Portfile @ 125550

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

devans/dports: inkscape-experimental, update to experimental bzr 13554 for testing.

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