blob: f6bfae883291475856879a3604b1a46f9c8431d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/app-misc/subsurface/subsurface-3.0.2.ebuild,v 1.1 2013/03/28 19:17:56 tomwij Exp $
EAPI="5"
if [[ ${PV} = *9999* ]]; then
EGIT_REPO_URI="git://subsurface.hohndel.org/subsurface.git"
GIT_ECLASS="git-2"
KEYWORDS=""
SRC_URI=""
LIBDC_V="0.3.0"
else
#SRC_URI="http://git.hohndel.org/?p=subsurface.git;a=snapshot;h=v${PV};sf=tgz -> ${P}.tar.gz"
SRC_URI="http://subsurface.hohndel.org/downloads/Subsurface-${PV}.tgz -> ${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
LIBDC_V="0.3.0"
fi
inherit eutils gnome2-utils ${GIT_ECLASS}
DESCRIPTION="An open source dive log program"
HOMEPAGE="http://subsurface.hohndel.org"
LICENSE="GPL-2"
SLOT="0"
IUSE="doc map usb"
RDEPEND="dev-libs/glib:2
dev-libs/libxml2
dev-libs/libxslt
dev-libs/libzip
gnome-base/gconf:2
map? ( sci-geosciences/osm-gps-map )
net-libs/libsoup:2.4
virtual/libusb
x11-libs/cairo
x11-libs/gdk-pixbuf:2
x11-libs/gtk+:2
x11-libs/pango
"
DEPEND="${RDEPEND}
>=dev-libs/libdivecomputer-${LIBDC_V}[static-libs,usb?]
virtual/pkgconfig
doc? ( app-text/asciidoc )
"
src_unpack() {
if [[ ${PV} = *9999* ]]; then
git-2_src_unpack
elif [[ "${SRC_URI}" == *git* ]]; then
unpack ${A}
mv subsurface-v${PV}-* ${P} || die "failed to mv the failes to ${P}"
else
mkdir "${P}" && cd "${P}" || die "failed to create/change to ${P}"
unpack ${A}
fi
}
src_prepare() {
# don't hardcode gcc
sed -i 's|CC\=gcc||' Makefile || die "failed to fix gcc hardcode issues"
# don't hardcode CFLAGS
sed -i 's|CFLAGS\=.*||' Makefile || die "failed to fix hardcoded CFLAGS"
# don't call gtk_update_icon_cache
sed -i -e "s|\$(gtk_update_icon_cache)|:|" Makefile || die "failed to disable gtk_update_icon_cache call"
}
src_compile() {
emake CC=$(tc-getCC)
if use doc; then
emake doc
fi
}
src_install() {
default
# Remove unwanted linguas
local del
for LANG in $(ls "${D}/usr/share/locale"); do
del=1
for LINGUA in ${LINGUAS}; do
if [[ ${LANG/.UTF-8/} == ${LINGUA} ]]; then
if use linguas_${LINGUA}; then
del=0
fi
break
fi
done
if [[ ${del} == 1 ]]; then
rm -r "${D}/usr/share/locale/${LANG}" || die "Removing language ${LANG} failed."
fi
done
if use doc; then
dohtml -r "${S}/Documentation/"
fi
}
pkg_postinst() {
gnome2_icon_cache_update
}
pkg_postrm() {
gnome2_icon_cache_update
}
|