source: trunk/dports/graphics/inkscape/Portfile

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

inkscape: update livecheck regex.

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