Gentoo Archives: gentoo-commits

From: "Tiziano Mueller (dev-zero)" <dev-zero@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/dbxml: dbxml-2.5.16-r1.ebuild ChangeLog
Date: Tue, 01 Jun 2010 21:25:57
Message-Id: 20100601212555.161CE2CE14@corvid.gentoo.org
1 dev-zero 10/06/01 21:25:54
2
3 Modified: ChangeLog
4 Added: dbxml-2.5.16-r1.ebuild
5 Log:
6 EAPI bump. Use distutils instead of python eclass (bug #312181), thanks to Arfrever for the patch.
7 (Portage version: 2.2_rc67/cvs/Linux x86_64, RepoMan options: --force)
8
9 Revision Changes Path
10 1.9 dev-libs/dbxml/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/ChangeLog?rev=1.9&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/ChangeLog?rev=1.9&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/ChangeLog?r1=1.8&r2=1.9
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/dev-libs/dbxml/ChangeLog,v
19 retrieving revision 1.8
20 retrieving revision 1.9
21 diff -u -r1.8 -r1.9
22 --- ChangeLog 26 Feb 2010 05:40:16 -0000 1.8
23 +++ ChangeLog 1 Jun 2010 21:25:54 -0000 1.9
24 @@ -1,6 +1,13 @@
25 # ChangeLog for dev-libs/dbxml
26 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/dbxml/ChangeLog,v 1.8 2010/02/26 05:40:16 halcy0n Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/dbxml/ChangeLog,v 1.9 2010/06/01 21:25:54 dev-zero Exp $
29 +
30 +*dbxml-2.5.16-r1 (01 Jun 2010)
31 +
32 + 01 Jun 2010; Tiziano Müller <dev-zero@g.o>
33 + +dbxml-2.5.16-r1.ebuild:
34 + EAPI bump. Use distutils instead of python eclass (bug #312181), thanks to
35 + Arfrever for the patch.
36
37 26 Feb 2010; Mark Loeser <halcy0n@g.o>
38 -files/2.4.13-as_needed.patch, -dbxml-2.4.13.2.ebuild,
39
40
41
42 1.1 dev-libs/dbxml/dbxml-2.5.16-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/dbxml-2.5.16-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/dbxml-2.5.16-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: dbxml-2.5.16-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2010 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-libs/dbxml/dbxml-2.5.16-r1.ebuild,v 1.1 2010/06/01 21:25:54 dev-zero Exp $
52
53 EAPI="3"
54 PYTHON_DEPEND="python? 2"
55 SUPPORT_PYTHON_ABIS="1"
56 RESTRICT_PYTHON_ABIS="3.*"
57
58 inherit autotools distutils flag-o-matic perl-app eutils versionator libtool multilib java-pkg-opt-2
59
60 MY_PV="$(get_version_component_range 1-3)"
61 MY_P="${PN}-${MY_PV}"
62 PATCH_V="$(get_version_component_range 4)"
63 PATCH_V="${PATCH_V:-0}"
64 DB_VER="4.8"
65
66 DESCRIPTION="BerkeleyDB XML, a native XML database from the BerkeleyDB team"
67 HOMEPAGE="http://www.oracle.com/database/berkeley-db/xml/index.html"
68 SRC_URI="http://download-east.oracle.com/berkeley-db/${MY_P}.tar.gz
69 http://download-west.oracle.com/berkeley-db/${MY_P}.tar.gz
70 http://download-uk.oracle.com/berkeley-db/${MY_P}.tar.gz"
71 LICENSE="OracleDB Apache-1.1 BSD"
72 SLOT="0"
73 KEYWORDS="~amd64 ~x86"
74 IUSE="doc examples java perl python tcl"
75
76 RDEPEND="sys-libs/db:${DB_VER}[-nocxx,java?]
77 >=dev-libs/xerces-c-3
78 >=dev-libs/xqilla-2.1.2
79 sys-libs/zlib
80 perl? ( dev-lang/perl )
81 python? (
82 >=dev-python/bsddb3-4.8.0 )
83 tcl? ( dev-lang/tcl )
84 java? ( >=virtual/jre-1.5 )"
85 DEPEND="${RDEPEND}
86 sys-devel/libtool
87 java? ( >=virtual/jdk-1.5 )"
88
89 get_patches() {
90 local patches=""
91 local patch_v=1
92 while [ ${patch_v} -le ${PATCH_V} ] ; do
93 patches="${patches} patch.${MY_PV}.${patch_v}"
94 let "patch_v = ${patch_v} + 1"
95 done
96 echo ${patches}
97 }
98
99 for patch in $(get_patches) ; do
100 SRC_URI="${SRC_URI}
101 http://www.oracle.com/technology/products/berkeley-db/xml/update/${MY_PV}/${patch}"
102 done
103
104 S="${WORKDIR}/${MY_P}/dbxml"
105
106 src_unpack() {
107 tar xzpf "${DISTDIR}/${MY_P}.tar.gz" ${MY_P}/dbxml || die "unpacking package failed"
108 }
109
110 src_prepare() {
111 for patch in $(get_patches) ; do
112 edos2unix "${DISTDIR}/${patch}"
113 epatch "${DISTDIR}/${patch}"
114 done
115
116 # sys-libs/db is slotted on Gentoo
117 sed -i \
118 -e "s:db_version=.*:db_version=${DB_VER}:" \
119 dist/aclocal/options.ac configure || die "sed failed"
120
121 if use java ; then
122 sed -i \
123 -e "s|\$with_berkeleydb/lib/db.jar|$(java-pkg_getjars db-${DB_VER})|" \
124 dist/aclocal/options.ac configure || die "sed failed"
125 fi
126
127 # * Fix libraries to link
128 # * Strip "../../build_unix/.libs" from LIBPATH or it'll
129 # show up in the RPATH entry
130 sed -i \
131 -e "s|dbxml-2|dbxml-$(get_version_component_range 1-2)|" \
132 -e "s|db-4|db-${DB_VER}|" \
133 -e 's|dbxml_home = .*|dbxml_home = "../.."|' \
134 -e 's|"../../build_unix/.libs",||' \
135 src/python/setup.py.in || die "sed failed"
136
137 sed -i \
138 -e "s|dbxml-2|dbxml-$(get_version_component_range 1-2)|" \
139 -e "s|db_cxx-4|db_cxx-${DB_VER}|" \
140 -e "s|@DB_DIR@/lib|/usr/$(get_libdir)|" \
141 -e "s|@DB_DIR@/include|/usr/include/db${DB_VER}|" \
142 -e "s|@XERCES_DIR@/lib|/usr/$(get_libdir)|" \
143 -e "s|@XQILLA_DIR@/lib|/usr/$(get_libdir)|" \
144 src/perl/config.in || die "sed failed"
145
146 # avoid the automake/autoconf run in src_{configure,compile}
147 eautoreconf
148 }
149
150 src_configure() {
151 cd "${S}/build_unix"
152
153 #Needed despite db_version stuff above
154 append-flags -I/usr/include/db${DB_VER}
155
156 local myconf=""
157
158 # use_enable doesn't work here due to a different syntax
159 use java && myconf="${myconf} --enable-java"
160 use tcl && myconf="${myconf} --enable-tcl --with-tcl=/usr/$(get_libdir)"
161
162 export ac_cv_prog_path_strip="missing_strip"
163 ECONF_SOURCE="../" \
164 JAVAPREFIX="${JAVA_HOME}" \
165 econf \
166 --with-berkeleydb=/usr \
167 --with-xqilla=/usr \
168 --with-xerces=/usr \
169 ${myconf}
170 }
171
172 src_compile() {
173 cd "${S}/build_unix"
174
175 default
176
177 if use python ; then
178 einfo "Compiling python extension"
179 cd "${S}/src/python"
180 append-cflags "-I../../include"
181 append-ldflags "-L../../build_unix/.libs"
182 distutils_src_compile
183 fi
184
185 if use perl ; then
186 cd "${S}/src/perl"
187 perl-app_src_prep
188 perl-app_src_compile
189 fi
190 }
191
192 src_install() {
193 cd "${S}/build_unix"
194
195 # somewhat broken build system
196 emake DESTDIR="${D}" install || die "emake install failed"
197
198 use doc && dohtml -A pdf -r "${D}"/usr/docs/*
199 rm -rf "${D}/usr/docs"
200
201 if use java ; then
202 java-pkg_dojar "${D}/usr/$(get_libdir)/dbxml.jar"
203 rm "${D}/usr/$(get_libdir)/dbxml.jar"
204 fi
205
206 if use python ; then
207 cd "${S}/src/python"
208 distutils_src_install
209 fi
210
211 if use perl ; then
212 cd "${S}/src/perl"
213 emake DESTDIR="${D}" install || die "emake install perl module failed"
214 fixlocalpod
215 fi
216
217 if use examples ; then
218 insinto /usr/share/doc/${PF}
219 doins -r "${S}/examples"
220 fi
221
222 }
223
224 pkg_preinst() {
225 perl-module_pkg_preinst
226 java-pkg-opt-2_pkg_preinst
227 }
228
229 pkg_postinst() {
230 if use python ; then
231 python_mod_optimize dbxml.py
232 fi
233 }
234
235 pkg_postrm() {
236 if use python ; then
237 python_mod_cleanup dbxml.py
238 fi
239 }