Ticket #31724: Portfile

File Portfile, 3.7 KB (added by royliu@…, 13 years ago)

The Portfile.

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$
3
4PortSystem 1.0
5
6name            gtk-mac-integration
7version         1.0.1
8set branch      [join [lrange [split ${version} .] 0 1] .]
9categories      devel
10maintainers     nomaintainer
11
12description     Mac OS X menu bar integration library for GTK2 Quartz
13
14long_description \
15    A simple library whose purpose is to allow GTK2 Quartz applications to \
16    integrate with the Mac OS X menu bar. Requires the gtk2 port and its \
17    dependencies to be built with variants +no_x11 +quartz.
18
19homepage        http://live.gnome.org/GTK%2B/OSX/Integration
20master_sites    gnome:sources/gtk-mac-integration/${branch}/
21
22platforms       darwin
23
24distname        gtk-mac-integration-${version}
25use_bzip2       yes
26
27checksums       md5     9706d7f55ed82b3d838c48968060b54d \
28                sha1    57d7adad87c596242f8413ec40191a5b93aad0f6 \
29                rmd160  3ffc7919d56eb284ca30e2416870614b9b9f3561
30
31depends_build   port:pkgconfig
32
33pre-configure {
34    if {![file exists ${prefix}/lib/pkgconfig/gdk-quartz-2.0.pc]} {
35        ui_error "
36
37****
38**** gtk-mac-integration is meant to be used only in a GTK2 Quartz development
39**** environment, but your version of GTK2 does not support Quartz. Please make
40**** sure that the gtk2 port and all its dependencies are built with variants
41**** +no_x11 +quartz and try again.
42****
43"
44        error "gtk2 +no_x11 +quartz not installed."
45    }
46}
47
48variant python25 conflicts python26 conflicts python27 description {Use Python 2.5} {
49    depends_lib-append          port:py25-gtk
50    set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.5
51
52    configure.python            ${python_prefix}/bin/python2.5
53    configure.env-append        PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
54    configure.env-append        PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
55    configure.pkg_config_path   ${python_prefix}/lib/pkgconfig/
56    configure.pre_args          --prefix=${python_prefix}
57}
58
59variant python26 conflicts python25 conflicts python27 description {Use Python 2.6} {
60    depends_lib-append          port:py26-gtk
61    set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.6
62
63    configure.python            ${python_prefix}/bin/python2.6
64    configure.env-append        PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
65    configure.env-append        PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
66    configure.pkg_config_path   ${python_prefix}/lib/pkgconfig/
67    configure.pre_args          --prefix=${python_prefix}
68}
69
70variant python27 conflicts python25 conflicts python26 description {Use Python 2.7} {
71    depends_lib-append          port:py27-gtk
72    set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.7
73
74    configure.python            ${python_prefix}/bin/python2.7
75    configure.env-append        PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
76    configure.env-append        PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
77    configure.pkg_config_path   ${python_prefix}/lib/pkgconfig/
78    configure.pre_args          --prefix=${python_prefix}
79}
80
81if {![variant_isset python25] && ![variant_isset python26] && ![variant_isset python27]} {
82    default_variants +python27
83}
84
85configure.ccache    no
86configure.args-append \
87                    --libdir=${prefix}/lib --includedir=${prefix}/include
88
89patchfiles-append   patch-bindings-python-gtk_osxapplication-Makefile-in.diff \
90                    patch-bindings-python-gtk_osxapplication-Makefile-am.diff \
91                    patch-bindings-python-gtkmacintegration-Makefile-in.diff \
92                    patch-bindings-python-gtkmacintegration-Makefile-am.diff