forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libopensync-0.22-r1.ebuild
97 lines (76 loc) · 2.08 KB
/
libopensync-0.22-r1.ebuild
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
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="3"
SUPPORT_PYTHON_ABIS="1"
RESTRICT_PYTHON_ABIS="3.* *-jython 2.7-pypy-*"
inherit autotools eutils python
DESCRIPTION="OpenSync synchronisation framework library"
HOMEPAGE="http://www.opensync.org/"
SRC_URI="http://www.opensync.org/download/releases/${PV}/${P}.tar.bz2"
KEYWORDS="amd64 hppa ppc ppc64 x86"
SLOT="0"
LICENSE="LGPL-2.1"
IUSE="debug doc python"
RDEPEND="dev-db/sqlite:3
dev-libs/glib:2
dev-libs/libxml2"
DEPEND="${RDEPEND}
virtual/pkgconfig
doc? ( app-doc/doxygen )
python? ( >=dev-lang/swig-1.3.17 )"
# test? ( >=dev-libs/check-0.9.2 )"
# Tests don't pass
RESTRICT="test"
src_prepare() {
epatch "${FILESDIR}"/${P}-fbsd.patch
epatch "${FILESDIR}"/${P}-pythonpath.patch
epatch "${FILESDIR}"/${P}-swig-typeerror.patch
epatch "${FILESDIR}"/${P}-Makefile.patch
eautoreconf
find "${S}" -name Makefile.in -print0 | xargs -0 sed -i -e 's: -Werror::' \
-e 's: -R $(libdir)::g'
use python && python_copy_sources
}
src_configure() {
do_configure() {
econf \
--enable-engine \
--enable-tools \
$(use_enable python) \
$(use_enable debug) \
$(use_enable debug tracing)
#$(use_enable test unit-tests)
sed -i -e 's:^\(hardcode_libdir_flag_spec=\).*:\1"":g' \
-e 's:^\(runpath_var=\).*:\1DIE_RPATH_DIE:g' \
-e 's:func_apped:func_append:g' \
libtool
}
use python && python_execute_function -s do_configure
do_configure # do this even when USE=python - we need to generate Doxyfile
}
src_compile() {
use python \
&& python_execute_function -d -s \
|| default
if use doc; then
doxygen Doxyfile || die
fi
}
src_install() {
do_install() {
emake DESTDIR="${D}" install || die
}
use python \
&& python_execute_function -s do_install \
|| do_install
find "${D}" -name '*.la' -exec rm -f {} + || die
dodoc AUTHORS NEWS README TODO
if use doc; then
dohtml docs/html/* || die
fi
}
pkg_postinst() {
elog "Enabling the 'debug' useflag is required for bug reports."
elog "Also see: http://www.opensync.org/wiki/tracing"
}