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-r2.ebuild ChangeLog
Date: Fri, 03 Sep 2010 20:02:32
Message-Id: 20100903200228.7BA3520051@flycatcher.gentoo.org
1 dev-zero 10/09/03 20:02:28
2
3 Modified: ChangeLog
4 Added: dbxml-2.5.16-r2.ebuild
5 Log:
6 respect LDFLAGS (bug #335312)
7
8 (Portage version: 2.2_rc74/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.11 dev-libs/dbxml/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/ChangeLog?rev=1.11&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/ChangeLog?rev=1.11&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/ChangeLog?r1=1.10&r2=1.11
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/dbxml/ChangeLog,v
20 retrieving revision 1.10
21 retrieving revision 1.11
22 diff -u -r1.10 -r1.11
23 --- ChangeLog 3 Jun 2010 06:07:41 -0000 1.10
24 +++ ChangeLog 3 Sep 2010 20:02:28 -0000 1.11
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-libs/dbxml
27 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/dbxml/ChangeLog,v 1.10 2010/06/03 06:07:41 grobian Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/dbxml/ChangeLog,v 1.11 2010/09/03 20:02:28 dev-zero Exp $
30 +
31 +*dbxml-2.5.16-r2 (03 Sep 2010)
32 +
33 + 03 Sep 2010; Tiziano Müller <dev-zero@g.o>
34 + +files/2.5.16-respect-ldflags-no-rpath.patch, +dbxml-2.5.16-r2.ebuild:
35 + respect LDFLAGS (bug #335312)
36
37 02 Jun 2010; Fabian Groffen <grobian@g.o> dbxml-2.5.16-r1.ebuild:
38 Make ebuild Prefix aware
39
40
41
42 1.1 dev-libs/dbxml/dbxml-2.5.16-r2.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/dbxml-2.5.16-r2.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/dbxml/dbxml-2.5.16-r2.ebuild?rev=1.1&content-type=text/plain
46
47 Index: dbxml-2.5.16-r2.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-r2.ebuild,v 1.1 2010/09/03 20:02:28 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/technetwork/database/berkeleydb/index-083851.html
68 http://download.oracle.com/otndocs/products/berkeleydb/html/$(get_version_component_range 1-2).html"
69 SRC_URI="http://download-east.oracle.com/berkeley-db/${MY_P}.tar.gz
70 http://download-west.oracle.com/berkeley-db/${MY_P}.tar.gz
71 http://download-uk.oracle.com/berkeley-db/${MY_P}.tar.gz"
72 LICENSE="OracleDB Apache-1.1 BSD"
73 SLOT="0"
74 KEYWORDS="~amd64 ~x86"
75 IUSE="doc examples java perl python tcl"
76
77 RDEPEND="sys-libs/db:${DB_VER}[-nocxx,java?]
78 >=dev-libs/xerces-c-3
79 >=dev-libs/xqilla-2.1.2
80 sys-libs/zlib
81 perl? ( dev-lang/perl )
82 python? (
83 >=dev-python/bsddb3-4.8.0 )
84 tcl? ( dev-lang/tcl )
85 java? ( >=virtual/jre-1.5 )"
86 DEPEND="${RDEPEND}
87 sys-devel/libtool
88 java? ( >=virtual/jdk-1.5 )"
89
90 # return a list of patches calculated using the micro-version
91 get_patches() {
92 local patches=""
93 for (( patch_v=1 ; patch_v <= ${PATCH_V} ; patch_v++ )) ; do
94 patches="${patches} patch.${MY_PV}.${patch_v}"
95 done
96 echo ${patches}
97 }
98 PATCHES="$(get_patches)"
99
100 for patch in ${PATCHES} ; do
101 SRC_URI="${SRC_URI} 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 for patch in ${PATCHES} ; do
109 cp "${DISTDIR}/${patch}" ${WORKDIR} || die "copying patch ${patch} failed"
110 done
111 }
112
113 src_prepare() {
114 for patch in ${PATCHES} ; do
115 edos2unix "${WORKDIR}/${patch}"
116 epatch "${WORKDIR}/${patch}"
117 done
118
119 epatch "${FILESDIR}/${PV}-respect-ldflags-no-rpath.patch"
120
121 # sys-libs/db is slotted on Gentoo
122 sed -i \
123 -e "s:db_version=.*:db_version=${DB_VER}:" \
124 dist/aclocal/options.ac configure || die "sed failed"
125
126 if use java ; then
127 sed -i \
128 -e "s|\$with_berkeleydb/lib/db.jar|$(java-pkg_getjars db-${DB_VER})|" \
129 dist/aclocal/options.ac configure || die "sed failed"
130 fi
131
132 # * Fix libraries to link
133 # * Strip "../../build_unix/.libs" from LIBPATH or it'll
134 # show up in the RPATH entry
135 sed -i \
136 -e "s|dbxml-2|dbxml-$(get_version_component_range 1-2)|" \
137 -e "s|db-4|db-${DB_VER}|" \
138 -e 's|dbxml_home = .*|dbxml_home = "../.."|' \
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 # avoid the automake/autoconf run in src_{configure,compile}
152 eautoreconf
153 }
154
155 src_configure() {
156 cd "${S}/build_unix"
157
158 #Needed despite db_version stuff above
159 append-flags -I"${EPREFIX}"/usr/include/db${DB_VER}
160
161 local myconf=""
162
163 # use_enable doesn't work here due to a different syntax
164 use java && myconf="${myconf} --enable-java"
165 use tcl && myconf="${myconf} --enable-tcl --with-tcl=${EPREFIX}/usr/$(get_libdir)"
166
167 export ac_cv_prog_path_strip="missing_strip"
168 ECONF_SOURCE="../" \
169 JAVAPREFIX="${JAVA_HOME}" \
170 econf \
171 --with-berkeleydb="${EPREFIX}"/usr \
172 --with-xqilla="${EPREFIX}"/usr \
173 --with-xerces="${EPREFIX}"/usr \
174 ${myconf}
175 }
176
177 src_compile() {
178 cd "${S}/build_unix"
179
180 default
181
182 if use python ; then
183 einfo "Compiling python extension"
184 cd "${S}/src/python"
185 append-cflags "-I../../include"
186 append-ldflags "-L../../build_unix/.libs"
187 distutils_src_compile
188 fi
189
190 if use perl ; then
191 cd "${S}/src/perl"
192 perl-app_src_prep
193 perl-app_src_compile
194 fi
195 }
196
197 src_install() {
198 cd "${S}/build_unix"
199
200 # somewhat broken build system
201 emake DESTDIR="${D}" install || die "emake install failed"
202
203 use doc && dohtml -A pdf -r "${ED}"/usr/docs/*
204 rm -rf "${ED}/usr/docs"
205
206 if use java ; then
207 java-pkg_dojar "${ED}/usr/$(get_libdir)/dbxml.jar"
208 rm "${ED}/usr/$(get_libdir)/dbxml.jar"
209 fi
210
211 if use python ; then
212 cd "${S}/src/python"
213 distutils_src_install
214 fi
215
216 if use perl ; then
217 cd "${S}/src/perl"
218 emake DESTDIR="${D}" install || die "emake install perl module failed"
219 fixlocalpod
220 fi
221
222 if use examples ; then
223 insinto /usr/share/doc/${PF}
224 doins -r "${S}/examples"
225 fi
226
227 }
228
229 pkg_preinst() {
230 perl-module_pkg_preinst
231 java-pkg-opt-2_pkg_preinst
232 }
233
234 pkg_postinst() {
235 if use python ; then
236 python_mod_optimize dbxml.py
237 fi
238 }
239
240 pkg_postrm() {
241 if use python ; then
242 python_mod_cleanup dbxml.py
243 fi
244 }