source: trunk/dports/gnome/gtksourceview2/Portfile

Last change on this file was 139554, checked in by devans@…, 2 years ago

gtksourceview2: reintroduce +quartz variant removed in r139437 and only depend on gtk-osx-application-gtk2 if it is set, fixes possible build failures when building with gtk2 +x11, check variant of the active gtk2 to make sure it matches the intended build, see comments for rationale, increment revision to correctly tag archived binaries.

  • 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:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 139554 2015-08-20 09:26:26Z ryandesign@macports.org $
3
4PortSystem      1.0
5PortGroup       active_variants 1.1
6
7name                gtksourceview2
8set my_name     gtksourceview
9version             2.10.5
10revision        9
11license         LGPL-2.1+
12# respository indicates they were in process of shift
13# from LGPL-2+ to LGPL-2.1+
14set branch      [join [lrange [split ${version} .] 0 1] .]
15maintainers         mit.edu:wdc openmaintainer
16categories          gnome
17platforms           darwin
18description         GtkSourceView is a text widget
19
20long_description \
21        GtkSourceView is a text widget that extends the standard \
22        gtk+ 2.x text widget GtkTextView. It improves GtkTextView \
23        by implementing syntax highlighting and other features \
24        typical of a source editor. This port contains version 2 of the \
25        GtkSourceView widget. Port GtkSourceView contains version 1 of the \
26        widget.
27
28homepage            https://wiki.gnome.org/Projects/GtkSourceView
29master_sites    gnome:sources/${my_name}/${branch}/
30distname            ${my_name}-${version}
31use_bzip2           yes
32
33checksums       md5     1219ad1694df136f126507466aeb41aa \
34                sha1    5081dc7a081954d0af73852c22e874a746bda30e \
35                rmd160  081679debc8ca021749136e952329bb3ea0aa4f2
36
37depends_build   port:intltool \
38                port:pkgconfig \
39                port:gnome-common \
40                port:gtk-doc \
41                port:autoconf \
42                port:automake \
43                port:libtool
44
45depends_lib \
46    path:lib/pkgconfig/glib-2.0.pc:glib2 \
47    port:gettext \
48    port:gtk2 \
49    port:libxml2
50
51patchfiles      patch-configure.ac.diff \
52                patch-gtkosxapplication.diff
53
54# reconfigure using upstream autogen.sh for intltool 0.51 compatibility
55
56post-patch {
57    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
58}
59
60configure.cmd   ./autogen.sh
61
62configure.args  --enable-compile-warnings=minimum
63
64test.run        yes
65test.target     check
66
67post-destroot {
68    set docdir ${prefix}/share/doc/${name}
69    xinstall -d ${destroot}${docdir}
70    xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING COPYING.lib MAINTAINERS \
71        NEWS README ${destroot}${docdir}
72
73# glade-3 expects catalog modules and libraries to have a .so suffix
74
75    if {[variant_isset glade]} {
76        set libdir ${prefix}/lib
77        ln -s ${libdir}/libgtksourceview-2.0.dylib ${destroot}${libdir}/libgtksourceview-2.0.so
78    }
79}
80
81# although this port correctly senses the installed variant of gtk2 and configures accordingly,
82# gtk-osx-application-gtk2 only builds with gtk2 +quartz and will fail to build if gtk2 +x11
83# is active. Since this can break the x11 build of this port, only depend on it if +quartz
84# is set. It's not used when building with gtk2 +x11 anyway.
85 
86variant quartz {
87    depends_lib-append  port:gtk-osx-application-gtk2
88}
89
90# make sure the right variant of gtk2 is installed for the intended build
91
92if {[variant_isset quartz]} {
93    require_active_variants gtk2 quartz
94} else {
95    require_active_variants gtk2 x11
96}
97
98variant glade description {Build glade catalog} {
99    depends_lib-append port:glade3
100    configure.args-append   --enable-glade-catalog
101}
102
103livecheck.type  regex
104livecheck.url   http://ftp.gnome.org/pub/gnome/sources/${my_name}/${branch}/
105livecheck.regex {LATEST-IS-(\d+(?:\.\d+)*)}
Note: See TracBrowser for help on using the repository browser.