| 1 |
# Copyright 1999-2012 Gentoo Foundation |
| 2 |
# Distributed under the terms of the GNU General Public License v2 |
| 3 |
# $Header: /var/cvsroot/gentoo-x86/net-libs/libproxy/libproxy-0.4.7.ebuild,v 1.12 2012/10/16 08:04:33 tetromino Exp $ |
| 4 |
|
| 5 |
EAPI=4 |
| 6 |
PYTHON_DEPEND="python? 2:2.6" |
| 7 |
|
| 8 |
inherit cmake-utils eutils mono python |
| 9 |
|
| 10 |
DESCRIPTION="Library for automatic proxy configuration management" |
| 11 |
HOMEPAGE="http://code.google.com/p/libproxy/" |
| 12 |
SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" |
| 13 |
|
| 14 |
LICENSE="LGPL-2.1+" |
| 15 |
SLOT="0" |
| 16 |
KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc x86 ~x86-fbsd ~x86-linux" |
| 17 |
IUSE="gnome kde mono networkmanager perl python test" |
| 18 |
|
| 19 |
# FIXME: Disable webkit support due problems like bug #366791 |
| 20 |
# FIXME: Also disable xulrunner support due bug #360893, will be readded |
| 21 |
# in the future when only spidermonkey mozjs is provided. |
| 22 |
# NOTE: USE=xulrunner also causes problems like bug 373397, re-add carefully. |
| 23 |
|
| 24 |
RDEPEND="gnome? ( >=dev-libs/glib-2.26:2 ) |
| 25 |
kde? ( >=kde-base/kdelibs-4.4.5 ) |
| 26 |
mono? ( dev-lang/mono ) |
| 27 |
networkmanager? ( net-misc/networkmanager ) |
| 28 |
perl? ( dev-lang/perl )" |
| 29 |
# xulrunner? ( >=net-libs/xulrunner-1.9.1:1.9 ) |
| 30 |
# webkit? ( net-libs/webkit-gtk:2 ) |
| 31 |
# Since 0.4.7, webkit gtk3 support is also available |
| 32 |
DEPEND="${RDEPEND} |
| 33 |
virtual/pkgconfig" |
| 34 |
|
| 35 |
pkg_setup() { |
| 36 |
DOCS="AUTHORS ChangeLog NEWS README" |
| 37 |
|
| 38 |
if use python; then |
| 39 |
python_set_active_version 2 |
| 40 |
python_pkg_setup |
| 41 |
fi |
| 42 |
} |
| 43 |
|
| 44 |
src_prepare() { |
| 45 |
epatch "${FILESDIR}/${P}-gcc-4.7.patch" |
| 46 |
} |
| 47 |
|
| 48 |
src_configure() { |
| 49 |
# WITH_VALA just copies the .vapi file over and needs no deps, |
| 50 |
# hence always enable it unconditionally |
| 51 |
local mycmakeargs=( |
| 52 |
-DPERL_VENDORINSTALL=ON |
| 53 |
-DCMAKE_C_FLAGS="${CFLAGS}" |
| 54 |
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" |
| 55 |
$(cmake-utils_use_with gnome GNOME) |
| 56 |
$(cmake-utils_use_with gnome GNOME3) |
| 57 |
$(cmake-utils_use_with kde KDE4) |
| 58 |
$(cmake-utils_use_with mono DOTNET) |
| 59 |
$(cmake-utils_use_with networkmanager NM) |
| 60 |
$(cmake-utils_use_with perl PERL) |
| 61 |
$(cmake-utils_use_with python PYTHON) |
| 62 |
-DWITH_VALA=ON |
| 63 |
-DWITH_WEBKIT=OFF |
| 64 |
-DWITH_WEBKIT3=OFF |
| 65 |
-DWITH_MOZJS=OFF |
| 66 |
$(cmake-utils_use test BUILD_TESTING) |
| 67 |
) |
| 68 |
#$(cmake-utils_use_with webkit WEBKIT) |
| 69 |
#$(cmake-utils_use_with xulrunner MOZJS) |
| 70 |
cmake-utils_src_configure |
| 71 |
} |
| 72 |
|
| 73 |
pkg_postinst() { |
| 74 |
use python && python_mod_optimize ${PN}.py |
| 75 |
} |
| 76 |
|
| 77 |
pkg_postrm() { |
| 78 |
use python && python_mod_cleanup ${PN}.py |
| 79 |
} |