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 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name libgpod |
---|
7 | version 0.8.3 |
---|
8 | set branch [join [lrange [split ${version} .] 0 1] .] |
---|
9 | categories multimedia |
---|
10 | platforms darwin |
---|
11 | maintainers nomaintainer |
---|
12 | license LGPL-2.1+ GPL-2+ |
---|
13 | |
---|
14 | description libgpod is a library to access the contents of an iPod. |
---|
15 | |
---|
16 | long_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 | |
---|
20 | homepage http://www.gtkpod.org/libgpod/ |
---|
21 | master_sites sourceforge:project/gtkpod/libgpod/libgpod-${branch} |
---|
22 | use_bzip2 yes |
---|
23 | |
---|
24 | checksums rmd160 96a2b0e48c0af6ecc62fc4aba4e38e8d0579c6cd \ |
---|
25 | sha256 638a7959d04e95f1e62abad02bd33702e4e8dfef98485ac7d9d50395c37e955d |
---|
26 | |
---|
27 | depends_build port:pkgconfig \ |
---|
28 | port:intltool \ |
---|
29 | port:gtk-doc \ |
---|
30 | port:gnome-common \ |
---|
31 | port:autoconf \ |
---|
32 | port:automake \ |
---|
33 | port:libtool |
---|
34 | |
---|
35 | depends_lib port:libplist \ |
---|
36 | port:libpng \ |
---|
37 | port:gdk-pixbuf2 \ |
---|
38 | port:taglib \ |
---|
39 | path:lib/pkgconfig/libusb-1.0.pc:libusb |
---|
40 | |
---|
41 | patchfiles-append patch-bindings-python-gpod.i.in.diff |
---|
42 | patchfiles-append patch-tools-generic-callout.c.diff |
---|
43 | |
---|
44 | # reconfigure using upstream autogen.sh for intltool 0.51 compatibility |
---|
45 | |
---|
46 | post-patch { |
---|
47 | xinstall -m 755 ${filespath}/autogen.sh ${worksrcpath} |
---|
48 | } |
---|
49 | |
---|
50 | configure.cmd ./autogen.sh |
---|
51 | |
---|
52 | # make sure to not use already-installed files, |
---|
53 | # to the best of our ability |
---|
54 | configure.ldflags-delete "-L${prefix}/lib" |
---|
55 | configure.cppflags-delete "-I${prefix}/include" |
---|
56 | |
---|
57 | variant python27 conflicts python26 \ |
---|
58 | description {Build Bindings for Python 2.7} {} |
---|
59 | |
---|
60 | variant python26 conflicts python27 \ |
---|
61 | description {Build Bindings for Python 2.6} {} |
---|
62 | |
---|
63 | # default to python27 bindings |
---|
64 | if {![variant_isset python27] && ![variant_isset python26]} { |
---|
65 | default_variants +python27 |
---|
66 | } |
---|
67 | |
---|
68 | # allow for -python27 to disable all Python support |
---|
69 | |
---|
70 | set python.branch "" |
---|
71 | if {[variant_isset python27]} { |
---|
72 | set python.branch 2.7 |
---|
73 | } elseif {[variant_isset python26]} { |
---|
74 | set python.branch 2.6 |
---|
75 | } |
---|
76 | |
---|
77 | if {${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 | |
---|
89 | configure.args-append \ |
---|
90 | --disable-more-warnings \ |
---|
91 | --disable-silent-rules \ |
---|
92 | --disable-udev |
---|
93 | |
---|
94 | post-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 | |
---|
104 | livecheck.type regex |
---|
105 | livecheck.url http://sourceforge.net/projects/gtkpod/files/${name} |
---|
106 | livecheck.regex "${name}-(\\d+(?:\\.\\d+)*)" |
---|