Line 0
Link Here
|
|
|
1 |
# Copyright 1999-2008 Gentoo Foundation |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/gammu/gammu-1.21.0.ebuild,v 1.1 2008/11/02 12:46:58 mrness Exp $ |
4 |
|
5 |
inherit cmake-utils |
6 |
|
7 |
DESCRIPTION="a fork of the gnokii project, a tool to handle your cellular phone" |
8 |
HOMEPAGE="http://www.gammu.org" |
9 |
SRC_URI="ftp://dl.cihar.com/gammu/releases/${P}.tar.bz2" |
10 |
|
11 |
LICENSE="GPL-2" |
12 |
SLOT="0" |
13 |
KEYWORDS="~amd64 ~ppc ~x86" |
14 |
IUSE="debug bluetooth irda mysql postgres nls" |
15 |
|
16 |
RDEPEND="bluetooth? ( >=net-wireless/bluez-4.26 ) |
17 |
mysql? ( virtual/mysql ) |
18 |
postgres? ( virtual/postgresql-server ) |
19 |
dev-util/dialog" |
20 |
DEPEND="${RDEPEND} |
21 |
irda? ( virtual/os-headers ) |
22 |
nls? ( sys-devel/gettext ) |
23 |
dev-util/cmake" |
24 |
|
25 |
# sys-devel/gettext is needed for creating .mo files |
26 |
# Supported languages and translated documentation |
27 |
# Be sure all languages are prefixed with a single space! |
28 |
MY_AVAILABLE_LINGUAS=" cs de es id it pl ru" |
29 |
IUSE="${IUSE} ${MY_AVAILABLE_LINGUAS// / linguas_}" |
30 |
|
31 |
src_unpack() { |
32 |
unpack ${A} |
33 |
|
34 |
pushd "${S}"/locale || die "locale directory not found" |
35 |
local lang support_linguas=no |
36 |
for lang in ${MY_AVAILABLE_LINGUAS} ; do |
37 |
if use linguas_${lang} ; then |
38 |
support_linguas=yes |
39 |
break |
40 |
fi |
41 |
done |
42 |
# install all languages when all selected LINGUAS aren't supported |
43 |
if [ "${support_linguas}" = "yes" ]; then |
44 |
for lang in ${MY_AVAILABLE_LINGUAS} ; do |
45 |
if ! use linguas_${lang} ; then |
46 |
sed -i -e "/^[[:space:]]*${lang}[[:space:]]*$/d" CMakeLists.txt |
47 |
fi |
48 |
done |
49 |
fi |
50 |
popd |
51 |
} |
52 |
|
53 |
src_compile() { |
54 |
# debug flag is used inside cmake-utils.eclass |
55 |
local mycmakeargs="$(cmake-utils_use_with bluetooth Bluez) \ |
56 |
$(cmake-utils_use_with irda IrDA) \ |
57 |
$(cmake-utils_use_with mysql MySQL) \ |
58 |
$(cmake-utils_use_with postgres Postgres) \ |
59 |
-DENABLE_SHARED=ON" |
60 |
cmake-utils_src_compile |
61 |
} |
62 |
|
63 |
src_test() { |
64 |
LD_LIBRARY_PATH="${WORKDIR}"/${PN}_build/common cmake-utils_src_test |
65 |
} |