Changeset 138229


Ignore:
Timestamp:
Jul 2, 2015, 6:59:53 PM (2 years ago)
Author:
elelay@…
Message:

gtk-osx-application: replaced by {py27-,}gtk-osx-application-{common-,}gtk{2,3}

Location:
trunk/dports/devel/gtk-osx-application
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/devel/gtk-osx-application/Portfile

    r131076 r138229  
    77name            gtk-osx-application
    88conflicts       ige-mac-integration
    9 version         2.0.7
     9version         2.0.8
    1010license         LGPL-2.1
    1111set branch      [join [lrange [split ${version} .] 0 1] .]
     
    1717long_description \
    1818                A simple library whose purpose is to \
    19                 allow GTK2 quartz applications to integrate with \
    20                 the Mac OS X menu bar. Requires gtk2 and its \
    21                 dependencies to be built with variants +no_x11 +quartz
     19                allow GTK quartz applications to integrate with \
     20                the Mac OS X menu bar. Requires gtk2 or gtk3 and its \
     21                dependencies to be built with variant +quartz
    2222
    2323homepage        https://wiki.gnome.org/Projects/GTK%2B/OSX/Integration
     
    3131
    3232# sha256 from upstream, rmd160 computed locally
    33 checksums       sha256    e6de70da740b452f18c113a7ebb6772936a0fb9873137514090849820e296eb7 \
    34                 rmd160    495f68d23e45306ddc6e5a05ed665f5af187c062
     33checksums       sha256    74fce9dbc5efe4e3d07a20b24796be1b1d6c3ac10a0ee6b1f1d685c809071b79 \
     34                rmd160    53fd44172a3fa076e4401b6aac1adb10b76a5b7c
    3535
    3636
    3737depends_build   port:pkgconfig
    3838
     39set gtk_version gtk2
     40
    3941pre-configure {
    4042
    41   if {![active_variants $gtk_version quartz x11]} {
     43  if {${name} eq ${subport}} {
    4244    ui_error "
     45The gtk-osx-application port has been replaced by 'gtk-osx-application-gtk2'
     46and 'gtk-osx-application-gtk3'.
     47Please `sudo port deactivate gtk-osx-application`
     48followed by `sudo port upgrade -u outdated` or another command to update.
     49Then if all works as intended `sudo port uninstall gtk-osx-application`
     50"
     51    return -code error
     52  }
    4353
    44 ****
    45 **** gtk-osx-application is meant to be used only in a GTK quartz
    46 **** development environment but your version of GTK does not
    47 **** support quartz.  Please make sure that port $gtk_version and all its
    48 **** dependencies are built with variants +no_x11 +quartz and try again.
    49 ****
     54  if {![active_variants $gtk_version quartz ""]} {
     55    ui_error "
     56${subport} is meant to be used only in a GTK quartz
     57development environment but your version of GTK does not
     58support quartz.  Please make sure that port $gtk_version and all its
     59dependencies are built with variants +quartz and try again.
    5060"
    51     error "$gtk_version +no_x11 +quartz not installed."
     61    error "$gtk_version +quartz not installed."
    5262  }
    5363}
    5464
    55 variant python26 conflicts python27 description {Use Python 2.6} {
     65# py27-gtk-osx-application-gtk3 is not needed (only gir matters).
     66# If a python gtk3 program requires gtk-osx-application, add
     67#    depends_lib-append port:gtk-osx-application-gtk3 \
     68#                       port:py27-gobject3
    5669
    57     if {[variant_isset gtk3]} {
     70subport py27-gtk-osx-application-gtk2 {
     71    set gtk_version gtk2
    5872
    59         depends_lib-append port:py26-gobject3
     73    depends_lib-append port:py27-pygtk \
     74                       port:gtk-osx-application-gtk2
     75   
     76    set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.7
    6077
    61         # don't bother configuring python because it's not needed (only gir matters)
    62 
    63     } else {
    64 
    65         depends_lib-append port:py26-pygtk
    66         set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.6
    67 
    68         configure.python            ${python_prefix}/bin/python2.6
    69         configure.env-append        PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
    70         configure.env-append        PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
    71         configure.pkg_config_path   ${python_prefix}/lib/pkgconfig/
    72         configure.pre_args           --prefix=${python_prefix}
    73 
    74     }
    75 
    76 }
    77 
    78 variant python27 conflicts python26 description {Use Python 2.7} {
    79 
    80     if {[variant_isset gtk3]} {
    81 
    82         depends_lib-append port:py27-gobject3
    83 
    84         # don't bother configuring python because it's not needed (only gir matters)
    85 
    86     } else {
    87 
    88         depends_lib-append port:py27-pygtk
    89        
    90         set python_prefix           ${frameworks_dir}/Python.framework/Versions/2.7
    91 
    92         configure.python            ${python_prefix}/bin/python2.7
    93         configure.env-append        PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
    94         configure.env-append        PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
    95         configure.pkg_config_path   ${python_prefix}/lib/pkgconfig/
    96         configure.pre_args          --prefix=${python_prefix}
    97 
    98     }
    99 
    100 }
    101 
    102 variant no_python conflicts python26 conflicts python27 description {
    103         Don't build python bindings, don't require any python} {
    104 }
    105 
    106 if {![variant_isset python26] && ![variant_isset python27] && ![variant_isset no_python]} {
    107     default_variants +python27
    108 }
     78    configure.python            ${python_prefix}/bin/python2.7
     79    configure.env-append        PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
     80    configure.env-append        PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
     81    configure.pkg_config_path   ${python_prefix}/lib/pkgconfig/
     82    configure.pre_args          --prefix=${python_prefix}
    10983
    11084
    111 variant gtk3 description {Use gtk3} {
    112    
    113     depends_lib-append port:gtk3
    114    
    115     # force gtk version
    116     configure.args-append --with-gtk=gtk+-3.0
     85    configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
    11786
    118     # to put strings folder in /opt/local/share, not in python Framework share
    119     configure.args-append --datadir=${prefix}/share
    120 
    121 }
    122 
    123 if {[variant_isset gtk3]} {
    124     set gtk_version gtk3
    125 } else {
    126     set gtk_version gtk2
    127 
    128     # force gtk version to 2.0
    129     configure.args-append --with-gtk=gtk+-2.0
    13087    # enable-python defaults to all, but it must be set to
    13188    # 'yes' otherwise pygtk bindings are not built.
     
    13390    # as per README (configure rejected the option).
    13491    # So no gir for gtk2 variant
    135     if {[variant_isset python26] || [variant_isset python27]} {
    136       configure.args-append --enable-python=yes
     92    configure.args-append --enable-python=yes
     93   
     94    post-destroot {
     95        delete ${destroot}${prefix}/include
     96        delete ${destroot}${prefix}/lib
     97        delete ${destroot}${prefix}/share
     98    }
     99}
     100
     101subport gtk-osx-application-gtk3 {
     102    set gtk_version gtk3
     103   
     104    depends_lib-append port:gtk3 \
     105                       path:include/gtkmacintegration/gtk-mac-bundle.h:gtk-osx-application-common-gtk3
     106
     107   
     108    # force gtk version
     109    configure.args-append --with-gtk3 --without-gtk2
     110
     111    configure.args-append --enable-python=no
     112
     113    post-destroot {
     114        delete ${destroot}${prefix}/include
     115        delete ${destroot}${prefix}/lib/pkgconfig/gtk-mac-integration.pc
     116        delete ${destroot}${prefix}/share/strings
     117    }
     118}
     119
     120subport gtk-osx-application-common-gtk3 {
     121    set gtk_version gtk3
     122   
     123    depends_lib-append port:gtk3
     124
     125   
     126    # force gtk version
     127    configure.args-append --with-gtk3 --without-gtk2
     128
     129    configure.args-append --enable-python=no
     130
     131    post-destroot {
     132        delete ${destroot}${prefix}/lib
     133        delete ${destroot}${prefix}/share/gir-1.0
     134    }
     135}
     136
     137subport gtk-osx-application-gtk2 {
     138    set gtk_version gtk2
     139
     140    depends_lib-append port:gtk2 \
     141                       path:include/gtkmacintegration/gtk-mac-bundle.h:gtk-osx-application-common-gtk2
     142
     143    # force gtk version to 2.0
     144    configure.args-append --with-gtk2 --without-gtk3  --disable-introspection
     145
     146    configure.args-append --enable-python=no
     147
     148    post-destroot {
     149        delete ${destroot}${prefix}/include
     150        delete ${destroot}${prefix}/lib/pkgconfig/gtk-mac-integration.pc
     151        delete ${destroot}${prefix}/share/strings
     152    }
     153}
     154
     155subport gtk-osx-application-common-gtk2 {
     156    set gtk_version gtk2
     157
     158    depends_lib-append port:gtk2
     159
     160    # force gtk version to 2.0
     161    configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
     162
     163    configure.args-append --enable-python=no
     164
     165    post-destroot {
     166        delete ${destroot}${prefix}/lib
    137167    }
    138168}
  • trunk/dports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff

    r115510 r138229  
    1 --- bindings/python/gtkmacintegration/Makefile.in.old   2013-01-19 17:30:25.000000000 +0100
    2 +++ bindings/python/gtkmacintegration/Makefile.in       2013-01-19 17:31:37.000000000 +0100
    3 @@ -344,7 +344,7 @@
    4  top_build_prefix = @top_build_prefix@
     1--- bindings/python/gtkmacintegration/Makefile.in.orig  2015-06-22 19:51:48.000000000 +0200
     2+++ bindings/python/gtkmacintegration/Makefile.in       2015-06-22 19:48:03.000000000 +0200
     3@@ -399,7 +399,7 @@
    54 top_builddir = @top_builddir@
    65 top_srcdir = @top_srcdir@
     
    98+gtkmacintegrationdir = @pythondir@/gtkmacintegration
    109 gtkmacintegration_PYTHON = __init__.py
    11  gtkmacintegration_LTLIBRARIES = _gtkmacintegration.la
     10 gtkmacintegration_LTLIBRARIES = $(am__append_1) $(am__append_2)
    1211 headers = \
Note: See TracChangeset for help on using the changeset viewer.