# -*- 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
set branch [join [lrange [split ${version} .] 0 1] .]
description libgpod is a library to access the contents of an iPod.
long_description ${description} This library is based on code used in the \
gtkpod project. Starting with V0.96.CVS gtkpod depends \
homepage http://www.gtkpod.org/libgpod/
master_sites sourceforge:project/gtkpod/libgpod/libgpod-${branch}
checksums rmd160 96a2b0e48c0af6ecc62fc4aba4e38e8d0579c6cd \
sha256 638a7959d04e95f1e62abad02bd33702e4e8dfef98485ac7d9d50395c37e955d
depends_build port:pkgconfig \
depends_lib port:libplist \
path:lib/pkgconfig/libusb-1.0.pc:libusb
patchfiles-append patch-bindings-python-gpod.i.in.diff
patchfiles-append patch-tools-generic-callout.c.diff
# reconfigure using upstream autogen.sh for intltool 0.51 compatibility
xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
configure.cmd ./autogen.sh
# 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 python27 conflicts python26 \
description {Build Bindings for Python 2.7} {}
variant python26 conflicts python27 \
description {Build Bindings for Python 2.6} {}
# default to python27 bindings
if {![variant_isset python27] && ![variant_isset python26]} {
default_variants +python27
# allow for -python27 to disable all Python support
if {[variant_isset python27]} {
} elseif {[variant_isset python26]} {
if {${python.branch} != ""} {
set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
set pyver [join [split ${python.branch} "."] ""]
depends_build-append port:swig-python
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}
configure.args-append --disable-pygobject --with-python=no
--disable-more-warnings \