[73979] trunk/dports/multimedia/libgpod/Portfile
michaelld at macports.org
michaelld at macports.org
Tue Nov 30 14:09:04 PST 2010
Revision: 73979
http://trac.macports.org/changeset/73979
Author: michaelld at macports.org
Date: 2010-11-30 14:08:58 -0800 (Tue, 30 Nov 2010)
Log Message:
-----------
libgpod changes:
* revert primary install location back to ${prefix} because only the
Python parts should be installed there;
* allow for python variants (25, 26, others if required);
default is python26;
* allow for not using Python at all;
* allow for use of LIBUSB 1.0 if requested, correctly;
* do universal install correctly; and
* fix port dependencies.
Modified Paths:
--------------
trunk/dports/multimedia/libgpod/Portfile
Modified: trunk/dports/multimedia/libgpod/Portfile
===================================================================
--- trunk/dports/multimedia/libgpod/Portfile 2010-11-30 22:06:10 UTC (rev 73978)
+++ trunk/dports/multimedia/libgpod/Portfile 2010-11-30 22:08:58 UTC (rev 73979)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id$
PortSystem 1.0
@@ -4,7 +5,7 @@
name libgpod
version 0.8.0
-revision 1
+revision 2
categories multimedia
platforms darwin
maintainers rmstonecipher openmaintainer
@@ -22,17 +23,69 @@
depends_build path:bin/pkg-config:pkgconfig
depends_lib port:p5-xml-parser \
- port:py26-gobject \
- port:libplist
+ port:libplist \
+ port:gdk-pixbuf2 \
+ port:taglib
-set python.branch 2.6
-set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
-set python.bin ${python.prefix}/bin/python${python.branch}
+universal_variant yes
-configure.args-append --prefix=${python.prefix}
-configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
-configure.pkg_config_path ${python.prefix}/lib/pkgconfig
+# make sure to not use already-installed files,
+# to the best of our ability
+configure.ldflags-delete "-L${prefix}/lib"
+configure.cppflags-delete "-I${prefix}/include"
+variant python25 conflicts python26 \
+description {Build Bindings for Python 2.5} {}
+
+variant python26 conflicts python25 \
+description {Build Bindings for Python 2.6} {}
+
+# default to python26 bindings
+if {![variant_isset python25] && ![variant_isset python26]} {
+ default_variants +python26
+}
+
+set python.branch ""
+if {[variant_isset python25]} {
+ set python.branch 2.5
+} elseif {[variant_isset python26]} {
+ set python.branch 2.6
+}
+
+if {${python.branch} != ""} {
+ set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
+ set pyver [join [split ${python.branch} "."] ""]
+ depends_lib-append port:py${pyver}-gobject port:py${pyver}-mutagen
+ configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
+ configure.pkg_config_path ${python.prefix}/lib/pkgconfig
+ configure.env-append PYTHON=${prefix}/bin/python${python.branch}
+} else {
+ configure.args-append --disable-pygobject --with-python=no
+}
+
+configure.args-append --disable-silent-rules
+
+variant libusb description {Include enhanced USB support} {
+ depends_lib-append port:libusb
+}
+
+post-patch {
+ if {![variant_isset libusb]} {
+ reinplace "/have_libusb/s@=yes@=no at g" \
+ ${worksrcpath}/configure
+ }
+}
+
+post-destroot {
+ # fix instal location of Python stuff, if installed
+ if {${python.branch} != ""} {
+ set dr_python_dir ${destroot}${python.prefix}/lib
+ xinstall -m 755 -d ${dr_python_dir}
+ move ${destroot}${prefix}/lib/python${python.branch} \
+ ${dr_python_dir}
+ }
+}
+
livecheck.type regex
livecheck.url http://sourceforge.net/projects/gtkpod/files/
livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)${extract.suffix}"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20101130/5543b647/attachment.html>
More information about the macports-changes
mailing list