[113527] trunk/dports/gnome

devans at macports.org devans at macports.org
Mon Nov 18 21:46:14 PST 2013


Revision: 113527
          https://trac.macports.org/changeset/113527
Author:   devans at macports.org
Date:     2013-11-18 21:46:13 -0800 (Mon, 18 Nov 2013)
Log Message:
-----------
gexiv2: new port, a GObject based wrapper for exiv2 with introspection support.

Added Paths:
-----------
    trunk/dports/gnome/gexiv2/
    trunk/dports/gnome/gexiv2/Portfile
    trunk/dports/gnome/gexiv2/files/
    trunk/dports/gnome/gexiv2/files/patch-Makefile.diff
    trunk/dports/gnome/gexiv2/files/patch-configure.diff

Added: trunk/dports/gnome/gexiv2/Portfile
===================================================================
--- trunk/dports/gnome/gexiv2/Portfile	                        (rev 0)
+++ trunk/dports/gnome/gexiv2/Portfile	2013-11-19 05:46:13 UTC (rev 113527)
@@ -0,0 +1,68 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem      1.0
+
+name            gexiv2
+version         0.7.0
+license         GPL-2
+set branch      [join [lrange [split ${version} .] 0 1] .]
+description     gexiv2 is a GObject-based wrapper around the exiv2 library.
+long_description \
+                ${description} \
+                It makes the basic features of exiv2 available to GNOME applications. \
+                Thanks to GObject Introspection support, gexiv2 has excellent support \
+                for Python 2 & 3, and can also be accessed by any other programming \
+                language that supports GI.
+maintainers     devans openmaintainer
+categories      gnome graphics
+platforms       darwin
+homepage        https://wiki.gnome.org/${name}
+master_sites    gnome:sources/${name}/${branch}/
+
+use_xz          yes
+
+checksums       rmd160  1a94722c86544c5b788364b60ec178e631809222 \
+                sha256  b631fe02402014cb52f22647b384972776ada31cbd3c3f187014b6535461ee8a
+
+depends_build   port:pkgconfig \
+                port:libtool
+
+depends_lib     path:lib/pkgconfig/glib-2.0.pc:glib2 \
+                port:gobject-introspection \
+                port:vala \
+                port:exiv2
+
+patchfiles      patch-configure.diff \
+                patch-Makefile.diff
+
+configure.args  --enable-introspection \
+                --with-libtool=${prefix}/bin/glibtool
+
+# gobject-introspection uses g-ir-scanner, which uses $CC from env
+build.args-append       CC="${configure.cc} ${configure.cc_archflags}"
+
+# one each of python2 python3 allowed
+
+variant python27 description {Build with support for Python 2.7} {
+    depends_lib-append      port:py27-gobject3
+    configure.env-append    PYTHON2=${prefix}/bin/python2.7
+}
+
+variant python32 conflicts python33 description {Build with support for Python 3.2} {
+    depends_lib-append      port:py32-gobject3
+    configure.env-append    PYTHON3=${prefix}/bin/python3.2
+}
+
+variant python33 conflicts python32 description {Build with support for Python 3.3} {
+    depends_lib-append      port:py33-gobject3
+    configure.env-append    PYTHON3=${prefix}/bin/python3.3
+}
+
+if {![variant_isset python33]} {
+    default_variants +python32
+}
+
+default_variants +python27
+
+livecheck.type  gnome-with-unstable


Property changes on: trunk/dports/gnome/gexiv2/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/gnome/gexiv2/files/patch-Makefile.diff
===================================================================
--- trunk/dports/gnome/gexiv2/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/gnome/gexiv2/files/patch-Makefile.diff	2013-11-19 05:46:13 UTC (rev 113527)
@@ -0,0 +1,106 @@
+--- Makefile.orig	2013-10-03 16:16:08.000000000 -0700
++++ Makefile	2013-11-17 11:51:19.000000000 -0800
+@@ -24,14 +24,17 @@
+ BUILD_RELEASE=1
+ BUILD_DIR=gexiv2
+ LIB=lib
++LIBTOOL=libtool
++PYTHON2=python2
++PYTHON3=python3
+ 
+ -include configure.mk
+ 
+ # Used to determine where Python wants the .gi file to be installed ... if Python is not installed,
+-# PYTHON2 and PYTHON3 will be empty
++# PYTHON2_OVERRIDES_DIR and PYTHON3_OVERRIDES_DIR will be empty
+ PYTHON="import gi; print(gi._overridesdir)"
+-PYTHON2=$(shell python2 -c $(PYTHON) 2> /dev/null)
+-PYTHON3=$(shell python3 -c $(PYTHON) 2> /dev/null)
++PYTHON2_OVERRIDES_DIR=$(shell $(PYTHON2) -c $(PYTHON) 2> /dev/null)
++PYTHON3_OVERRIDES_DIR=$(shell $(PYTHON3) -c $(PYTHON) 2> /dev/null)
+ 
+ TYPELIB=`pkg-config gobject-introspection-no-export-1.0 --variable typelibdir`
+ 
+@@ -133,7 +136,7 @@
+ endif
+ endif
+ 
+-CFLAGS += $(REQUIRED_CFLAGS)
++#CFLAGS += $(REQUIRED_CFLAGS)
+ 
+ all: $(LIBRARY_BIN) $(PC_FILE) $(TYPELIB_FILE)
+ 
+@@ -152,7 +155,7 @@
+ 		$(EXPANDED_INSTALLED_HEADER_FILES)      \
+ 		$(EXPANDED_SRC_FILES)                   \
+ 		--library $(LIBRARY_BIN)                \
+-		$(LIBTOOL)                              \
++		--libtool=$(LIBTOOL)                              \
+ 		--pkg=gobject-2.0
+ 
+ clean:
+@@ -181,7 +184,7 @@
+ .PHONY: install
+ install:
+ 	@mkdir -p $(DESTDIR)$(PREFIX)/$(LIB)
+-	libtool --mode=install $(INSTALL_PROGRAM) $(LIBRARY).la $(DESTDIR)$(PREFIX)/$(LIB)
++	$(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(LIBRARY).la $(DESTDIR)$(PREFIX)/$(LIB)
+ 	@mkdir -p $(DESTDIR)$(PREFIX)/include/$(PKGNAME)
+ 	$(INSTALL_DATA) $(EXPANDED_INSTALLED_HEADER_FILES) $(DESTDIR)$(PREFIX)/include/$(PKGNAME)
+ 	@mkdir -p $(DESTDIR)$(PREFIX)/$(LIB)/pkgconfig
+@@ -194,13 +197,13 @@
+ 	@mkdir -p $(DESTDIR)$(TYPELIB)
+ 	$(INSTALL_DATA) GExiv2-$(GIR_VERSION).typelib $(DESTDIR)$(TYPELIB)
+ # No introspection, no .gi file for the Python module to call into
+-ifneq "$(PYTHON2)" ""
+-	@mkdir -p $(DESTDIR)$(PYTHON2)
+-	$(INSTALL_DATA) GExiv2.py $(DESTDIR)$(PYTHON2)
+-endif
+-ifneq "$(PYTHON3)" ""
+-	@mkdir -p $(DESTDIR)$(PYTHON3)
+-	$(INSTALL_DATA) GExiv2.py $(DESTDIR)$(PYTHON3)
++ifneq "$(PYTHON2_OVERRIDES_DIR)" ""
++	@mkdir -p $(DESTDIR)$(PYTHON2_OVERRIDES_DIR)
++	$(INSTALL_DATA) GExiv2.py $(DESTDIR)$(PYTHON2_OVERRIDES_DIR)
++endif
++ifneq "$(PYTHON3_OVERRIDES_DIR)" ""
++	@mkdir -p $(DESTDIR)$(PYTHON3_OVERRIDES_DIR)
++	$(INSTALL_DATA) GExiv2.py $(DESTDIR)$(PYTHON3_OVERRIDES_DIR)
+ endif
+ endif
+ 
+@@ -209,18 +212,18 @@
+ 	$(INSTALL_DATA) $(VAPI_FILE) $(DESTDIR)$(PREFIX)/share/vala/vapi
+ 
+ uninstall:
+-	libtool --mode=uninstall rm -f $(DESTDIR)$(PREFIX)/$(LIB)/$(LIBRARY).la
++	$(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(PREFIX)/$(LIB)/$(LIBRARY).la
+ 	rm -rf $(DESTDIR)$(PREFIX)/include/$(PKGNAME)
+ 	rm -f $(DESTDIR)$(PREFIX)/$(LIB)/pkgconfig/$(PKGNAME).pc
+ 	rm -f $(DESTDIR)$(PREFIX)/share/vala/vapi/$(PKGNAME).vapi
+ ifdef ENABLE_INTROSPECTION
+ 	rm -f $(DESTDIR)$(PREFIX)/share/gir-1.0/GExiv2-$(GIR_VERSION).gir
+ 	rm -f $(DESTDIR)$(TYPELIB)/GExiv2-$(GIR_VERSION).typelib
+-ifneq "$(PYTHON2)" ""
+-	rm -rf $(DESTDIR)$(PYTHON2)/GExiv2.py
++ifneq "$(PYTHON2_OVERRIDES_DIR)" ""
++	rm -rf $(DESTDIR)$(PYTHON2_OVERRIDES_DIR)/GExiv2.py
+ endif
+-ifneq "$(PYTHON3)" ""
+-	rm -rf $(DESTDIR)$(PYTHON3)/GExiv2.py
++ifneq "$(PYTHON3_OVERRIDES_DIR)" ""
++	rm -rf $(DESTDIR)$(PYTHON3_OVERRIDES_DIR)/GExiv2.py
+ endif
+ endif
+ 
+@@ -236,8 +239,8 @@
+ $(EXPANDED_LO_FILES): $(BUILD_DIR)/%.lo: gexiv2/%.cpp $(EXPANDED_HEADER_FILES) $(CONFIG_IN) Makefile
+ 	@pkg-config --print-errors --exists '$(EXT_PKG_VERSIONS)'
+ 	@mkdir -p $(BUILD_DIR)
+-	libtool --mode=compile --tag=CC $(CXX) -c $(EXT_PKGS_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I. -o $@ $<
++	$(LIBTOOL) --mode=compile --tag=CC $(CXX) -c $(EXT_PKGS_CFLAGS) $(CFLAGS) $(CPPFLAGS) -I. -o $@ $<
+ 
+ $(LIBRARY_BIN): $(EXPANDED_LO_FILES)
+-	libtool --mode=link --tag=CC $(CXX) -rpath $(PREFIX)/$(LIB) $(EXPANDED_LO_FILES) $(EXT_PKGS_LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -version-info $(VERSION_INFO) -o $(LIBRARY_BIN)
++	$(LIBTOOL) --mode=link --tag=CC $(CXX) -rpath $(PREFIX)/$(LIB) $(EXPANDED_LO_FILES) $(EXT_PKGS_LDFLAGS) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -version-info $(VERSION_INFO) -o $(LIBRARY_BIN)
+ 

Added: trunk/dports/gnome/gexiv2/files/patch-configure.diff
===================================================================
--- trunk/dports/gnome/gexiv2/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/gnome/gexiv2/files/patch-configure.diff	2013-11-19 05:46:13 UTC (rev 113527)
@@ -0,0 +1,26 @@
+--- configure.orig	2013-06-06 16:44:40.000000000 -0700
++++ configure	2013-11-17 11:53:19.000000000 -0800
+@@ -60,7 +60,7 @@
+                                 abort $1
+                             fi
+                             
+-                            variables="${variables}LIBTOOL=--libtool=$value\n"
++                            variables="${variables}LIBTOOL=$value\n"
+                             ;;
+         
+         --assume-pkgs)      variables="${variables}ASSUME_PKGS=1\n"
+@@ -97,6 +97,14 @@
+ then
+     echo -e -n $variables > $CONFIG_IN
+ fi
++
++echo "CXX=${CXX}" >> $CONFIG_IN
++echo "CPPFLAGS=${CPPFLAGS}" >> $CONFIG_IN
++echo "CFLAGS=${CXXFLAGS}" >> $CONFIG_IN
++echo "LDFLAGS=${CXXFLAGS}" >> $CONFIG_IN
++echo "PYTHON2=${PYTHON2}" >> $CONFIG_IN
++echo "PYTHON3=${PYTHON3}" >> $CONFIG_IN
++
+ echo "CONFIG_IN=${CONFIG_IN}" >> $CONFIG_IN
+ 
+ printf "Configured.  Type 'make' to build, 'make install' to install.\n"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131118/d4c0b8a3/attachment-0001.html>


More information about the macports-changes mailing list