source: trunk/dports/multimedia/libgpod/Portfile

Last change on this file was 141861, checked in by ryandesign@…, 2 years ago

libgpod: needs swig-python (#49384)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# -*- 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
2# $Id: Portfile 141861 2015-10-29 23:14:56Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                libgpod
7version             0.8.3
8set branch          [join [lrange [split ${version} .] 0 1] .]
9categories          multimedia
10platforms           darwin
11maintainers         nomaintainer
12license             LGPL-2.1+ GPL-2+
13
14description         libgpod is a library to access the contents of an iPod.
15
16long_description    ${description} This library is based on code used in the \
17                    gtkpod project. Starting with V0.96.CVS gtkpod depends \
18                    on this library.
19
20homepage            http://www.gtkpod.org/libgpod/
21master_sites        sourceforge:project/gtkpod/libgpod/libgpod-${branch}
22use_bzip2           yes
23
24checksums           rmd160  96a2b0e48c0af6ecc62fc4aba4e38e8d0579c6cd \
25                    sha256  638a7959d04e95f1e62abad02bd33702e4e8dfef98485ac7d9d50395c37e955d
26
27depends_build       port:pkgconfig \
28                    port:intltool \
29                    port:gtk-doc \
30                    port:gnome-common \
31                    port:autoconf \
32                    port:automake \
33                    port:libtool
34
35depends_lib         port:libplist \
36                    port:libpng \
37                    port:gdk-pixbuf2 \
38                    port:taglib \
39                    path:lib/pkgconfig/libusb-1.0.pc:libusb
40
41patchfiles-append   patch-bindings-python-gpod.i.in.diff
42patchfiles-append   patch-tools-generic-callout.c.diff
43
44# reconfigure using upstream autogen.sh for intltool 0.51 compatibility
45
46post-patch {
47    xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath}
48}
49
50configure.cmd       ./autogen.sh
51
52# make sure to not use already-installed files,
53# to the best of our ability
54configure.ldflags-delete "-L${prefix}/lib"
55configure.cppflags-delete "-I${prefix}/include"
56
57variant python27 conflicts python26 \
58description {Build Bindings for Python 2.7} {}
59
60variant python26 conflicts python27 \
61description {Build Bindings for Python 2.6} {}
62
63# default to python27 bindings
64if {![variant_isset python27] && ![variant_isset python26]} {
65    default_variants +python27
66}
67
68# allow for -python27 to disable all Python support
69
70set python.branch ""
71if {[variant_isset python27]} {
72    set python.branch 2.7
73} elseif {[variant_isset python26]} {
74    set python.branch 2.6
75}
76
77if {${python.branch} != ""} {
78    set python.prefix ${frameworks_dir}/Python.framework/Versions/${python.branch}
79    set pyver [join [split ${python.branch} "."] ""]
80    depends_build-append port:swig-python
81    depends_lib-append  port:py${pyver}-gobject port:py${pyver}-mutagen
82    configure.env-append PYGOBJECT_CODEGEN=${python.prefix}/bin/pygobject-codegen-2.0
83    configure.pkg_config_path ${python.prefix}/lib/pkgconfig
84    configure.env-append PYTHON=${prefix}/bin/python${python.branch}
85} else {
86    configure.args-append --disable-pygobject --with-python=no
87}
88
89configure.args-append \
90                    --disable-more-warnings \
91                    --disable-silent-rules \
92                    --disable-udev
93
94post-destroot {
95    # fix install location of Python stuff, if variant is selected
96    if {${python.branch} != ""} {
97        set dr_python_dir ${destroot}${python.prefix}/lib
98        xinstall -m 755 -d ${dr_python_dir}
99        move ${destroot}${prefix}/lib/python${python.branch} \
100            ${dr_python_dir}
101    }
102}
103
104livecheck.type          regex
105livecheck.url           http://sourceforge.net/projects/gtkpod/files/${name}
106livecheck.regex     "${name}-(\\d+(?:\\.\\d+)*)"
Note: See TracBrowser for help on using the repository browser.