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

Last change on this file was 154263, checked in by devans@…, 11 months ago

inkscape-devel: switch from trunk to release branch inkscape-0.92.x and update to latest 0.92pre2 prerelease, patch to build using a specific perl rather than an indeterminate one, currently perl5.24, mutually sync with port inkscape.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 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 154263 2016-10-25 17:47:54Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                inkscape-devel
7conflicts           inkscape
8set bzr_rev         15137
9epoch               1
10version             0.92pre2-${bzr_rev}
11license             GPL-2 LGPL-2.1
12maintainers         devans
13categories          graphics gnome
14platforms           darwin
15homepage            http://www.inkscape.org/
16
17description         This is the current pre-release development version of Inkscape taken from \
18                    the upstream bzr release branch.
19
20long_description    Inkscape is an multi-platform, Open-Source Vector Graphics Editor \
21                    that uses SVG as its native file format. \
22                    ${description}
23
24fetch.type          bzr
25bzr.url             lp:~inkscape.dev/inkscape/0.92.x
26bzr.revision        ${bzr_rev}
27
28set perl_version    5.24
29
30depends_build       port:pkgconfig \
31                    port:autoconf \
32                    port:automake \
33                    port:libtool \
34                    port:intltool \
35                    port:perl${perl_version}
36
37depends_lib         port:desktop-file-utils \
38                    port:popt \
39                    path:lib/libgc.dylib:boehmgc \
40                    port:gsl \
41                    port:gtkmm \
42                    port:dbus-glib \
43                    port:lcms2 \
44                    port:poppler \
45                    port:boost \
46                    port:ImageMagick \
47                    port:libcdr-0.1 \
48                    port:libexif \
49                    port:libvisio-0.1 \
50                    port:libwpg-0.3 \
51                    port:aspell \
52                    port:gtkspell2 \
53                    port:potrace \
54                    port:py27-lxml \
55                    port:py27-numpy
56
57pre-fetch {
58    ui_msg "--->  Fetching source from bzr repository: this may take a while"
59}
60
61patchfiles          patch-use-configured-perl.diff
62
63post-patch {
64    reinplace "s|@@MP_PERL@@|${prefix}/bin/perl${perl_version}|" ${worksrcpath}/Makefile.am
65    reinplace "s|\"python-interpreter\", \"python\"|\"python-interpreter\", \"python2.7\"|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# py27-numpy is currently not universal (#48263).
71
72universal_variant no
73
74variant gtk3 description {Enable experimental GTK+ 3 build} {
75    depends_lib-delete \
76                    port:gtkspell2 \
77                    port:gtk2 \
78                    port:gtkmm
79
80    depends_lib-append \
81                    port:gtkspell3 \
82                    port:gtk3 \
83                    port:gtkmm3 \
84                    port:gdl3
85
86    configure.args-append \
87                    --enable-gtk3-experimental
88}
89
90configure.cmd       ./autogen.sh && ./configure
91
92configure.python    ${prefix}/bin/python2.7
93
94configure.args      --without-gnome-vfs \
95                    --enable-lcms \
96                    --enable-poppler-cairo \
97                    --enable-dbusapi \
98                    --disable-silent-rules \
99                    --disable-strict-build
100
101configure.cppflags-append \
102                    -I${worksrcpath}/src/extension/script
103
104platform darwin {
105    if {[string match "*clang*" ${configure.compiler}]} {
106        if {${configure.cxx_stdlib} eq "libstdc++"} {
107            configure.cxxflags-append -std=c++98
108        } else {
109            configure.cxxflags-append -std=c++11
110        }
111    }
112}
113
114variant strict description {Enable strict build} {
115    configure.args-replace  --disable-strict-build --enable-strict-build
116}
117
118# don't build strict by default after upgrade of glib2 to 2.48.2
119# https://trac.macports.org/ticket/52248
120# default_variants    +strict
121
122#
123# the following dummy variants are used
124# to identify this port's binary dependencies
125# based on which variant of gtkmm is used for the build
126#
127
128variant x11 conflicts quartz {}
129variant quartz conflicts x11 {}
130
131if {![variant_isset quartz]} {
132    default_variants +x11
133}
134
135if {[variant_isset gtk3]} {
136    post-activate {
137        system "${prefix}/bin/gtk-update-icon-cache-3.0 -f -t ${prefix}/share/icons/hicolor"
138        system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
139    }
140} else {
141    post-activate {
142        system "${prefix}/bin/gtk-update-icon-cache -f -t ${prefix}/share/icons/hicolor"
143        system "${prefix}/bin/update-desktop-database ${prefix}/share/applications"
144    }
145}
146
147livecheck.type      none
Note: See TracBrowser for help on using the repository browser.