[138006] users/elelay/ports
elelay at macports.org
elelay at macports.org
Thu Jun 25 12:28:42 PDT 2015
Revision: 138006
https://trac.macports.org/changeset/138006
Author: elelay at macports.org
Date: 2015-06-25 12:28:41 -0700 (Thu, 25 Jun 2015)
Log Message:
-----------
new gtk-osx-application as subports
Added Paths:
-----------
users/elelay/ports/devel/
users/elelay/ports/devel/gtk-osx-application/
users/elelay/ports/devel/gtk-osx-application/Portfile
users/elelay/ports/devel/gtk-osx-application/files/
users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtk_osxapplication-Makefile-in.diff
users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff
Added: users/elelay/ports/devel/gtk-osx-application/Portfile
===================================================================
--- users/elelay/ports/devel/gtk-osx-application/Portfile (rev 0)
+++ users/elelay/ports/devel/gtk-osx-application/Portfile 2015-06-25 19:28:41 UTC (rev 138006)
@@ -0,0 +1,185 @@
+# -*- 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
+# $Id$
+
+PortSystem 1.0
+PortGroup active_variants 1.1
+
+name gtk-osx-application
+conflicts ige-mac-integration
+version 2.0.8
+license LGPL-2.1
+set branch [join [lrange [split ${version} .] 0 1] .]
+categories devel
+maintainers elelay openmaintainer
+
+description Mac OS X menu bar integration library for GTK2 quartz
+
+long_description \
+ A simple library whose purpose is to \
+ allow GTK2 quartz applications to integrate with \
+ the Mac OS X menu bar. Requires gtk2 and its \
+ dependencies to be built with variants +no_x11 +quartz
+
+homepage https://wiki.gnome.org/Projects/GTK%2B/OSX/Integration
+
+platforms darwin
+
+set myname gtk-mac-integration
+master_sites gnome:sources/gtk-mac-integration/${branch}/
+distname ${myname}-${version}
+use_xz yes
+
+# sha256 from upstream, rmd160 computed locally
+checksums sha256 74fce9dbc5efe4e3d07a20b24796be1b1d6c3ac10a0ee6b1f1d685c809071b79 \
+ rmd160 53fd44172a3fa076e4401b6aac1adb10b76a5b7c
+
+
+depends_build port:pkgconfig
+
+variant gtk2 description {Dummy gtk2 variant} {
+}
+
+variant gtk3 description {Dummy gtk3 variant} {
+}
+
+set gtk_version gtk2
+
+pre-configure {
+
+ if {${name} eq ${subport}} {
+ ui_error "
+*** The gtk-osx-application port has been replaced by 'gtk-osx-application-gtk2'
+*** and 'gtk-osx-application-gtk3'. Please `sudo port deactivate gtk-osx-application`
+*** followed by the `sudo port upgrade -u outdated` or another command to update.
+*** Then if all works as intended `sudo port uninstall gtk-osx-application`
+***"
+ return -code error
+ }
+
+ if {![active_variants $gtk_version quartz x11]} {
+ ui_error "
+
+****
+**** gtk-osx-application is meant to be used only in a GTK quartz
+**** development environment but your version of GTK does not
+**** support quartz. Please make sure that port $gtk_version and all its
+**** dependencies are built with variants +no_x11 +quartz and try again.
+****
+"
+ error "$gtk_version +no_x11 +quartz not installed."
+ }
+}
+
+# py27-gtk-osx-application-gtk3 is not needed (only gir matters).
+# If a python gtk3 program requires gtk-osx-application, add
+# depends_lib-append port:gtk-osx-application-gtk3 \
+# port:py27-gobject3
+
+subport py27-gtk-osx-application-gtk2 {
+ set gtk_version gtk2
+
+ depends_lib-append port:py27-pygtk \
+ port:gtk-osx-application-gtk2
+
+ set python_prefix ${frameworks_dir}/Python.framework/Versions/2.7
+
+ configure.python ${python_prefix}/bin/python2.7
+ configure.env-append PYGTK_CODEGEN=${python_prefix}/bin/pygtk-codegen-2.0
+ configure.env-append PYGOBJECT_CODEGEN=${python_prefix}/bin/pygobject-codegen-2.0
+ configure.pkg_config_path ${python_prefix}/lib/pkgconfig/
+ configure.pre_args --prefix=${python_prefix}
+
+
+ configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
+
+ # enable-python defaults to all, but it must be set to
+ # 'yes' otherwise pygtk bindings are not built.
+ # By the way, I had no success configuring with --python=all
+ # as per README (configure rejected the option).
+ # So no gir for gtk2 variant
+ configure.args-append --enable-python=yes
+
+ post-destroot {
+ delete ${destroot}${prefix}/include
+ delete ${destroot}${prefix}/lib
+ delete ${destroot}${prefix}/share
+ }
+}
+
+subport gtk-osx-application-gtk3 {
+ set gtk_version gtk3
+
+ depends_lib-append port:gtk3 \
+ path:include/gtkmacintegration/gtk-mac-bundle.h:gtk-osx-application-common-gtk3
+
+
+ # force gtk version
+ configure.args-append --with-gtk3 --without-gtk2
+
+ configure.args-append --enable-python=no
+
+ post-destroot {
+ delete ${destroot}${prefix}/include
+ delete ${destroot}${prefix}/lib/pkgconfig/gtk-mac-integration.pc
+ delete ${destroot}${prefix}/share/strings
+ }
+}
+
+subport gtk-osx-application-common-gtk3 {
+ set gtk_version gtk3
+
+ depends_lib-append port:gtk3
+
+
+ # force gtk version
+ configure.args-append --with-gtk3 --without-gtk2
+
+ configure.args-append --enable-python=no
+
+ post-destroot {
+ delete ${destroot}${prefix}/lib
+ delete ${destroot}${prefix}/share/gir-1.0
+ }
+}
+
+subport gtk-osx-application-gtk2 {
+ set gtk_version gtk2
+
+ depends_lib-append port:gtk2 \
+ path:include/gtkmacintegration/gtk-mac-bundle.h:gtk-osx-application-common-gtk2
+
+ # force gtk version to 2.0
+ configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
+
+ configure.args-append --enable-python=no
+
+ post-destroot {
+ delete ${destroot}${prefix}/include
+ delete ${destroot}${prefix}/lib/pkgconfig/gtk-mac-integration.pc
+ delete ${destroot}${prefix}/share/strings
+ }
+}
+
+subport gtk-osx-application-common-gtk2 {
+ set gtk_version gtk2
+
+ depends_lib-append port:gtk2
+
+ # force gtk version to 2.0
+ configure.args-append --with-gtk2 --without-gtk3 --disable-introspection
+
+ configure.args-append --enable-python=no
+
+ post-destroot {
+ delete ${destroot}${prefix}/lib
+ }
+}
+
+configure.ccache no
+configure.cmd-append --libdir=${prefix}/lib --includedir=${prefix}/include
+
+patchfiles-append patch-bindings-python-gtkmacintegration-Makefile-in.diff \
+ patch-bindings-python-gtk_osxapplication-Makefile-in.diff
+
+livecheck.type gnome
+livecheck.name ${myname}
Property changes on: users/elelay/ports/devel/gtk-osx-application/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtk_osxapplication-Makefile-in.diff
===================================================================
--- users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtk_osxapplication-Makefile-in.diff (rev 0)
+++ users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtk_osxapplication-Makefile-in.diff 2015-06-25 19:28:41 UTC (rev 138006)
@@ -0,0 +1,11 @@
+--- bindings/python/gtkosx_application/Makefile.in.old 2013-01-25 08:40:08.000000000 +0100
++++ bindings/python/gtkosx_application/Makefile.in 2013-01-25 08:41:39.000000000 +0100
+@@ -344,7 +344,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AM_CPPFLAGS = -I$(top_srcdir)/src $(PYTHON_INCLUDES)
+-gtkosx_applicationdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/gtkosx_application
++gtkosx_applicationdir = @pythondir@/gtkosx_application
+ gtkosx_application_PYTHON = __init__.py
+ gtkosx_application_LTLIBRARIES = _gtkosx_application.la
+ headers = $(top_srcdir)/src/gtkosxapplication.h
Added: users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff
===================================================================
--- users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff (rev 0)
+++ users/elelay/ports/devel/gtk-osx-application/files/patch-bindings-python-gtkmacintegration-Makefile-in.diff 2015-06-25 19:28:41 UTC (rev 138006)
@@ -0,0 +1,11 @@
+--- bindings/python/gtkmacintegration/Makefile.in.orig 2015-06-22 19:51:48.000000000 +0200
++++ bindings/python/gtkmacintegration/Makefile.in 2015-06-22 19:48:03.000000000 +0200
+@@ -399,7 +399,7 @@
+ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AM_CPPFLAGS = -I$(top_srcdir)/src $(PYTHON_INCLUDES)
+-gtkmacintegrationdir = $(libdir)/python$(PYTHON_VERSION)/site-packages/gtkmacintegration
++gtkmacintegrationdir = @pythondir@/gtkmacintegration
+ gtkmacintegration_PYTHON = __init__.py
+ gtkmacintegration_LTLIBRARIES = $(am__append_1) $(am__append_2)
+ headers = \
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150625/5f530718/attachment.html>
More information about the macports-changes
mailing list