Gentoo Archives: gentoo-commits

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