Use https by default
[gentoo.git] / app-pda / gtkpod / gtkpod-2.1.4.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=5
6
7 inherit autotools eutils gnome2-utils
8
9 DESCRIPTION="A graphical user interface to the Apple productline"
10 HOMEPAGE="http://gtkpod.sourceforge.net/"
11 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz
12         https://dev.gentoo.org/~ssuominen/gst-element-check-0.10.m4.xz"
13
14 LICENSE="GPL-2 FDL-1.2"
15 SLOT="0"
16 KEYWORDS="amd64 x86"
17 IUSE="aac clutter curl cdr flac gstreamer mp3 vorbis webkit"
18
19 # watch out for possible musicbrainz:5 compability in next version?
20 COMMON_DEPEND="
21         >=dev-libs/gdl-3.6:3
22         >=dev-libs/glib-2.31
23         >=dev-libs/libxml2-2.7.7
24         >=dev-util/anjuta-3.6
25         >=media-libs/libgpod-0.8.2:=
26         >=media-libs/libid3tag-0.15
27         >=x11-libs/gtk+-3.0.8:3
28         aac? ( media-libs/faad2 )
29         clutter? ( >=media-libs/clutter-gtk-1.2:1.0 )
30         curl? ( >=net-misc/curl-7.10 )
31         flac? ( media-libs/flac )
32         gstreamer? (
33                 >=media-libs/gstreamer-0.10.25:0.10
34                 >=media-libs/gst-plugins-base-0.10.25:0.10
35                 cdr? (
36                         >=app-cdr/brasero-3
37                         media-libs/musicbrainz:3
38                         )
39                 )
40         mp3? ( media-sound/lame )
41         vorbis? (
42                 media-libs/libvorbis
43                 media-sound/vorbis-tools
44                 )
45         webkit? ( >=net-libs/webkit-gtk-1.3:3 )"
46 # to pull in at least -flac and -vorbis plugins , but others at the same time
47 RDEPEND="${COMMON_DEPEND}
48         gstreamer? ( media-plugins/gst-plugins-meta:0.10 )"
49 DEPEND="${COMMON_DEPEND}
50         dev-util/intltool
51         sys-devel/flex
52         sys-devel/gettext
53         virtual/os-headers
54         virtual/pkgconfig"
55 REQUIRED_USE="cdr? ( gstreamer )"
56
57 src_prepare() {
58         epatch "${FILESDIR}"/${PN}-2.1.3-gold.patch
59
60         sed -i -e 's:python:python2:' scripts/sync-palm-jppy.py || die
61         # punt deprecated flags for forward compability
62         # use more widely used musicbrainz:3 instead of :4
63         # use AC_CONFIG_HEADERS for automake-1.13 compability wrt #467598
64         sed -e 's:CLEANLINESS_FLAGS=".*:CLEANLINESS_FLAGS="":' \
65                 -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' \
66                 -e '/PKG_CHECK_MODULES/s:libmusicbrainz4:&sLoT4iSdEpReCaTeD:' \
67                 -i configure.ac || die
68         # /path/to/install: '/path/to/app-pda/gtkpod-2.1.2_beta2/image/usr/share/gtkpod/data/rhythmbox.gep’: File exists
69         sed -i -e '/^dist_profiles_DATA/s:=.*:=:' plugins/sjcd/data/Makefile.am || die
70
71         # m4dir for gst-element-check-0.10.m4
72         AT_M4DIR=${WORKDIR} eautoreconf
73 }
74
75 src_configure() {
76         export GST_INSPECT=true #420279
77
78         econf \
79                 --disable-static \
80                 $(use_enable webkit plugin-coverweb) \
81                 $(use_enable clutter plugin-clarity) \
82                 $(use_enable gstreamer plugin-media-player) \
83                 $(use_enable cdr plugin-sjcd) \
84                 $(use_with curl) \
85                 $(use_with vorbis ogg) \
86                 $(use_with flac) \
87                 $(use_with aac mp4)
88 }
89
90 src_install() {
91         emake \
92                 DESTDIR="${D}" \
93                 docdir=/usr/share/doc/${PF}/html \
94                 figuresdir=/usr/share/doc/${PF}/html/figures \
95                 install
96
97         prune_libtool_files --all
98
99         dodoc AUTHORS ChangeLog NEWS README TODO TROUBLESHOOTING
100         rm -f "${ED}"/usr/share/gtkpod/data/{AUTHORS,COPYING} || die
101 }
102
103 pkg_preinst() {
104         gnome2_icon_savelist
105         gnome2_schemas_savelist
106 }
107
108 pkg_postinst() {
109         gnome2_icon_cache_update
110         gnome2_schemas_update
111 }
112
113 pkg_postrm() {
114         gnome2_icon_cache_update
115         gnome2_schemas_update
116 }