summaryrefslogtreecommitdiff
path: root/app-pda/barry/barry-0.18.3.ebuild
blob: 2162d8fc9d85dad24d107c69b13af9b9e364fe37 (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
# Copyright 1999-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=7

inherit bash-completion-r1 desktop udev xdg

DESCRIPTION="Sync, backup, program management, and charging for BlackBerry devices"
HOMEPAGE="http://www.netdirect.ca/software/packages/barry/"
SRC_URI="mirror://sourceforge/barry/${P}.tar.bz2"

LICENSE="CC-BY-SA-3.0 GPL-2" #See logo/README for CCPL
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="boost doc gui nls"

RDEPEND="
	>=dev-cpp/libxmlpp-2.6:2.6
	dev-libs/glib:2
	>=dev-libs/libtar-1.2.11-r2
	>=media-libs/libsdl-1.2
	>=sys-fs/fuse-2.5:=
	sys-libs/zlib
	virtual/libusb:1
	boost? ( dev-libs/boost:= )
	gui? (
		dev-cpp/glibmm:2
		dev-cpp/gtkmm:2.4
		dev-cpp/libglademm:2.4
	)"
DEPEND="${RDEPEND}"
BDEPEND="
	virtual/pkgconfig
	doc? ( >=app-doc/doxygen-1.5.6 )
	nls? ( >=sys-devel/gettext-0.18.1.1 )"

PATCHES=( "${FILESDIR}"/${PN}-0.18.4-shared_ptr.patch )

src_prepare() {
	default

	sed -e 's:plugdev:usb:g' -i udev/99-blackberry-perms.rules || die
	sed -e '/Icon/s:=.*:=barry:' -i menu/*.desktop || die
}

src_configure() {
	econf \
		$(use_enable nls) \
		$(use_enable boost) \
		$(use_enable gui) \
		--disable-desktop \
		--disable-rpath \
		--disable-static
}

src_compile() {
	default

	if use doc; then
		doxygen || die
		# clean out cruft
		find doc/www/doxygen/html/ \( \
			-iname '*.map*' -o \
			-iname '*.md5' -o \
			-iname '*.php' -o \
			-iname '*.sh' \) -delete || die
	fi
}

src_install() {
	default

	# docs
	dodoc KnownBugs
	use doc && dodoc -r doc/www/doxygen/html
	rm -rf doc/www || die
	dodoc -r doc/.

	# Skipping different (old Fedora) rules 69-blackberry.rules in purpose
	udev_dorules udev/10-blackberry.rules udev/99-blackberry-perms.rules

	# blacklist for BERRY_CHARGE kernel module
	insinto /lib/modprobe.d
	doins modprobe/blacklist-berry_charge.conf

	# pppd options files
	docinto ppp
	dodoc -r ppp/.

	dobashcomp bash/btool bash/bjavaloader

	newicon -s scalable logo/${PN}_logo_icon.svg ${PN}.svg
	use gui && domenu menu/barrybackup.desktop

	find "${ED}" -name '*.la' -delete || die
}