source: trunk/dports/graphics/librsvg/Portfile

Last change on this file was 149597, checked in by devans@…, 17 months ago

librsvg: update to version 2.40.16, drop patch now incorporated upstream.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.3 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 149597 2016-06-27 20:46:33Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           gobject_introspection 1.0
6
7name                librsvg
8version             2.40.16
9license             {GPL-2+ LGPL-2+}
10set branch          [join [lrange [split ${version} .] 0 1] .]
11categories          graphics gnome
12platforms           darwin
13maintainers         devans pixilla openmaintainer
14description         GNOME implementation of rsvg.
15
16long_description    ${description}
17
18homepage            https://wiki.gnome.org/Projects/LibRsvg
19master_sites        gnome:sources/${name}/${branch}/
20use_xz              yes
21
22checksums           rmd160  f192a28c33a16aa645e3121f0554ea6de6e66d94 \
23                    sha256  d48bcf6b03fa98f07df10332fb49d8c010786ddca6ab34cbba217684f533ff2e
24
25depends_build       port:pkgconfig \
26                    port:gtk-doc
27
28depends_lib         path:lib/pkgconfig/glib-2.0.pc:glib2 \
29                    path:lib/pkgconfig/cairo.pc:cairo \
30                    path:lib/pkgconfig/pangocairo.pc:pango \
31                    port:libcroco \
32                    port:libxml2 \
33                    port:gdk-pixbuf2 \
34                    port:vala
35
36set pyversion 2.7
37depends_run         port:python[join [split ${pyversion} "."] ""]
38
39gobject_introspection yes
40
41configure.args      --enable-vala=yes \
42                    --disable-silent-rules \
43                    --disable-Bsymbolic
44
45set buildpath ${worksrcpath}/macports
46post-build {
47    xinstall -d ${buildpath}
48    set fp [open ${buildpath}/svg2pdf w]
49    puts $fp "#!/bin/sh"
50    puts $fp "if \[ \$# -lt 2 -o \"\$1\" = \"-h\" -o \"\$1\" = \"--help\" \] ; then"
51    puts $fp "  echo \"FAIL: usage: \$0 input_file.svg output_file.pdf\""
52    puts $fp "  exit 255;"
53    puts $fp "fi"
54    puts $fp "rsvg-convert -f pdf -o \"\$2\" \"\$1\""
55    close $fp
56}
57
58test.run            yes
59test.dir            ${worksrcpath}/tests
60test.target         check
61
62# variant viewer disabled by default in an attempt to avoid loading
63# gtk3 by those who are using it strictly as a library outside of GTK+/GNOME.
64# https://trac.macports.org/ticket/43328
65# https://trac.macports.org/ticket/47443
66# https://trac.macports.org/ticket/47596
67
68variant viewer description "Build the rsvg-view-3 viewer utility." {
69    depends_lib-append  port:gtk3
70}
71
72if {![variant_isset viewer]} {
73    patchfiles-append   patch-disable-viewer.diff
74
75    use_autoreconf      yes
76    autoreconf.args     -fvi
77}
78
79post-destroot {
80    set python.branch ${pyversion}
81    set python.bin ${frameworks_dir}/Python.framework/Versions/${python.branch}/bin/python${python.branch}
82
83    set docdir ${prefix}/share/doc/${name}
84    xinstall -d ${destroot}${docdir}
85    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.LIB NEWS README \
86        ${destroot}${docdir}
87    xinstall -m 755 -W ${buildpath} svg2pdf \
88        ${destroot}${prefix}/bin
89    set badfile ${prefix}/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.a
90    if {[file exists ${destroot}${badfile}]} {
91        file delete ${destroot}${badfile}
92    }
93}
94
95post-activate {
96    system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache"
97}
98
99post-deactivate {
100    system "${prefix}/bin/gdk-pixbuf-query-loaders --update-cache"
101}
102
103variant x11 conflicts quartz {}
104variant quartz conflicts x11 {}
105
106livecheck.type      gnome
Note: See TracBrowser for help on using the repository browser.