Ticket #17308: Portfile

File Portfile, 1.9 KB (added by hamish@…, 15 years ago)

Portfile for 0.10.0

Line 
1# $Id: Portfile 38017 2008-07-02 21:06:50Z gwright@macports.org $
2
3PortSystem 1.0
4
5name            gtk2hs
6version         0.10.0
7                categories      devel graphics
8platforms       darwin
9maintainers     gwright@macports.org
10
11description     Portable and native GUI library for Haskell
12long_description        \
13                gtk2hs is a Haskell binding to GTK, a comprehensive     \
14                C GUI library that is portable across many platforms.
15
16homepage        http://www.haskell.org/gtk2hs
17master_sites    sourceforge
18
19extract.suffix  .tar.gz
20checksums       md5     08df47256cbcd5668e82b9f8beb621ab                \
21                sha1    de502c153d571b662c3a296baec659f129a8964d        \
22                rmd160  945f94e78b1ed462be3f6100b7541b385d6b3d35
23
24depends_lib     port:ghc                \
25                port:gtk2               \
26                port:cairo              \
27                port:librsvg            \
28                port:libglade2          \
29                port:gtkglext           \
30                port:gtksourceview2
31
32configure.args  --with-hc=${prefix}/bin/ghc     \
33                --enable-gtk                    \
34                --enable-gio                    \
35                --enable-profiling              \
36                --enable-packager-mode          \
37                --enable-libglade               \
38                --enable-gconf                  \
39                --enable-gtksourceview2         \
40                --enable-cairo                  \
41                --enable-svg                    \
42                --enable-opengl                 \
43                --without-pkgreg
44
45variant no_x11 description "Remove X11 support (disables gtkglext)" {
46depends_lib-delete port:gtkglext
47configure.args-delete --enable-opengl
48}
49
50# Fix gtk.package.conf to allow interoperating with non-MacPorts
51# ghc. (MacPorts' ghc adds ${prefix}/lib to the linker path
52# automatically.)
53
54post-destroot   { reinplace "s|library-dirs: |library-dirs: \"${prefix}/lib\",|" \
55                        ${destroot}${prefix}/lib/${name}/gtk.package.conf
56                }
57
58# Note that the order of package registration is important: certain
59# packages must be registered before the packages that depend on them.
60
61post-activate   { set pkgs {glib cairo svgcairo gtk gconf glade gtksourceview2 soegtk}
62                  foreach pkg ${pkgs} {
63                        system "ghc-pkg update ${destroot}${prefix}/lib/${name}/${pkg}.package.conf"
64                  }
65                  if {![variant_isset no_x11]} {
66                        system "ghc-pkg update ${destroot}${prefix}/lib/${name}/gtkglext.package.conf"
67                  }
68                }
69