Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 458192 | Differences between
and this patch

Collapse All | Expand All

(-)a/gx86/dev-vcs/subversion/subversion-1.7.7-r1.ebuild (-82 / +63 lines)
Lines 3-14 Link Here
3
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.7.7.ebuild,v 1.12 2013/01/26 17:44:46 grobian Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-vcs/subversion/subversion-1.7.7.ebuild,v 1.12 2013/01/26 17:44:46 grobian Exp $
4
4
5
EAPI=5
5
EAPI=5
6
SUPPORT_PYTHON_ABIS="1"
6
PYTHON_COMPAT=( python{2_5,2_6,2_7} )
7
RESTRICT_PYTHON_ABIS="3.* *-jython *-pypy-*"
7
DISTUTILS_OPTIONAL=1
8
WANT_AUTOMAKE="none"
8
WANT_AUTOMAKE="none"
9
MY_P="${P/_/-}"
9
MY_P="${P/_/-}"
10
10
11
inherit autotools bash-completion-r1 db-use depend.apache elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module python eutils
11
inherit autotools bash-completion-r1 db-use depend.apache distutils-r1 elisp-common flag-o-matic java-pkg-opt-2 libtool multilib perl-module eutils
12
12
13
DESCRIPTION="Advanced version control system"
13
DESCRIPTION="Advanced version control system"
14
HOMEPAGE="http://subversion.apache.org/"
14
HOMEPAGE="http://subversion.apache.org/"
Lines 26-36 COMMON_DEPEND=">=dev-db/sqlite-3.4 Link Here
26
	dev-libs/expat
26
	dev-libs/expat
27
	sys-libs/zlib
27
	sys-libs/zlib
28
	berkdb? ( >=sys-libs/db-4.0.14 )
28
	berkdb? ( >=sys-libs/db-4.0.14 )
29
	ctypes-python? ( =dev-lang/python-2* )
29
	ctypes-python? ( ${PYTHON_DEPS} )
30
	gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring )
30
	gnome-keyring? ( dev-libs/glib:2 sys-apps/dbus gnome-base/gnome-keyring )
31
	kde? ( sys-apps/dbus x11-libs/qt-core:4 x11-libs/qt-dbus:4 x11-libs/qt-gui:4 >=kde-base/kdelibs-4:4 )
31
	kde? ( sys-apps/dbus x11-libs/qt-core:4 x11-libs/qt-dbus:4 x11-libs/qt-gui:4 >=kde-base/kdelibs-4:4 )
32
	perl? ( dev-lang/perl )
32
	perl? ( dev-lang/perl )
33
	python? ( =dev-lang/python-2* )
33
	python? ( ${PYTHON_DEPS} )
34
	ruby? ( >=dev-lang/ruby-1.8.2:1.8 )
34
	ruby? ( >=dev-lang/ruby-1.8.2:1.8 )
35
	sasl? ( dev-libs/cyrus-sasl )
35
	sasl? ( dev-libs/cyrus-sasl )
36
	webdav-neon? ( >=net-libs/neon-0.28 )
36
	webdav-neon? ( >=net-libs/neon-0.28 )
Lines 41-47 RDEPEND="${COMMON_DEPEND} Link Here
41
	kde? ( kde-base/kwalletd )
41
	kde? ( kde-base/kwalletd )
42
	nls? ( virtual/libintl )
42
	nls? ( virtual/libintl )
43
	perl? ( dev-perl/URI )"
43
	perl? ( dev-perl/URI )"
44
# Note: ctypesgen doesn't need PYTHON_USEDEP, it's used once
44
DEPEND="${COMMON_DEPEND}
45
DEPEND="${COMMON_DEPEND}
46
	${PYTHON_DEPS}
45
	!!<sys-apps/sandbox-1.6
47
	!!<sys-apps/sandbox-1.6
46
	ctypes-python? ( dev-python/ctypesgen )
48
	ctypes-python? ( dev-python/ctypesgen )
47
	doc? ( app-doc/doxygen )
49
	doc? ( app-doc/doxygen )
Lines 85-91 pkg_setup() { Link Here
85
	java-pkg-opt-2_pkg_setup
87
	java-pkg-opt-2_pkg_setup
86
88
87
	if use ctypes-python || use python; then
89
	if use ctypes-python || use python; then
88
		python_pkg_setup
90
		# for build-time scripts
91
		python_export_best
89
	fi
92
	fi
90
93
91
	if ! use webdav-neon && ! use webdav-serf; then
94
	if ! use webdav-neon && ! use webdav-serf; then
Lines 118-125 src_prepare() { Link Here
118
		-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
121
		-e "s/\(BUILD_RULES=.*\) bdb-test\(.*\)/\1\2/g" \
119
		-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
122
		-e "s/\(BUILD_RULES=.*\) test\(.*\)/\1\2/g" configure.ac
120
123
121
	sed -e "/SWIG_PY_INCLUDES=/s/\$ac_cv_python_includes/\\\\\$(PYTHON_INCLUDES)/" -i build/ac-macros/swig.m4 || die "sed failed"
122
123
	# this bites us in particular on Solaris
124
	# this bites us in particular on Solaris
124
	sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \
125
	sed -i -e '1c\#!/usr/bin/env sh' build/transform_libtool_scripts.sh || \
125
		die "/bin/sh is not POSIX shell!"
126
		die "/bin/sh is not POSIX shell!"
Lines 127-133 src_prepare() { Link Here
127
	eautoconf
128
	eautoconf
128
	elibtoolize
129
	elibtoolize
129
130
130
	sed -e "s/libsvn_swig_py-1\.la/libsvn_swig_py-\$(PYTHON_VERSION)-1.la/" -i build-outputs.mk || die "sed failed"
131
	sed -e 's/\(libsvn_swig_py\)-\(1\.la\)/\1-$(EPYTHON)-\2/g' \
132
		-i build-outputs.mk || die "sed failed"
133
134
	if use python; then
135
		# XXX: make python_copy_sources accept path
136
		S=${S}/subversion/bindings/swig/python python_copy_sources
137
		rm -r "${S}"/subversion/bindings/swig/python || die
138
	fi
131
}
139
}
132
140
133
src_configure() {
141
src_configure() {
Lines 182-188 src_configure() { Link Here
182
	myconf+=" --disable-disallowing-of-undefined-references"
190
	myconf+=" --disable-disallowing-of-undefined-references"
183
191
184
	#force ruby-1.8 for bug 399105
192
	#force ruby-1.8 for bug 399105
193
	#allow overriding Python include directory
185
	ac_cv_path_RUBY="${EPREFIX}"/usr/bin/ruby18 ac_cv_path_RDOC="${EPREFIX}"/usr/bin/rdoc18 \
194
	ac_cv_path_RUBY="${EPREFIX}"/usr/bin/ruby18 ac_cv_path_RDOC="${EPREFIX}"/usr/bin/rdoc18 \
195
	ac_cv_python_includes='-I$(PYTHON_INCLUDEDIR)' \
186
	econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
196
	econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
187
		$(use_with apache2 apxs "${APXS}") \
197
		$(use_with apache2 apxs "${APXS}") \
188
		$(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
198
		$(use_with berkdb berkeley-db "db.h:${EPREFIX}/usr/include/db${SVN_BDB_VERSION}::db-${SVN_BDB_VERSION}") \
Lines 208-244 src_configure() { Link Here
208
src_compile() {
218
src_compile() {
209
	emake local-all
219
	emake local-all
210
220
211
	if use ctypes-python; then
221
	my_py_compile() {
212
		python_copy_sources subversion/bindings/ctypes-python
222
		if use ctypes-python; then
213
		rm -fr subversion/bindings/ctypes-python
223
			pushd subversion/bindings/ctypes-python >/dev/null || die
214
		ctypes_python_bindings_building() {
224
			distutils-r1_python_compile
215
			rm -f subversion/bindings/ctypes-python
225
			popd >/dev/null || die
216
			ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python
226
		fi
217
			emake ctypes-python
218
		}
219
		python_execute_function \
220
			--action-message 'Building of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \
221
			--failure-message 'Building of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \
222
			ctypes_python_bindings_building
223
	fi
224
227
225
	if use python; then
228
		if use python; then
226
		python_copy_sources subversion/bindings/swig/python
229
			local p=subversion/bindings/swig/python
227
		rm -fr subversion/bindings/swig/python
230
			ln -fs "${BUILD_DIR}" ${p} || die
228
		swig_python_bindings_building() {
231
229
			rm -f subversion/bindings/swig/python
232
			python_export PYTHON_INCLUDEDIR
230
			ln -s python-${PYTHON_ABI} subversion/bindings/swig/python
233
			emake swig-py \
231
			emake \
234
				swig_pydir="$(python_get_sitedir)/libsvn" \
232
				PYTHON_INCLUDES="-I${EPREFIX}$(python_get_includedir)" \
235
				swig_pydir_extra="$(python_get_sitedir)/svn"
233
				PYTHON_VERSION="$(python_get_version)" \
236
234
				swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \
237
			rm ${p} || die
235
				swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \
238
		fi
236
				swig-py
239
	}
237
		}
240
238
		python_execute_function \
241
	if use ctypes-python || use python; then
239
			--action-message 'Building of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \
242
		# pre-generate .py files
240
			--failure-message 'Building of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \
243
		use ctypes-python && emake ctypes-python
241
			swig_python_bindings_building
244
		# this will give us proper BUILD_DIR for symlinking
245
		BUILD_DIR=python \
246
		python_foreach_impl my_py_compile
242
	fi
247
	fi
243
248
244
	if use perl; then
249
	if use perl; then
Lines 269-305 src_compile() { Link Here
269
src_install() {
274
src_install() {
270
	emake -j1 DESTDIR="${D}" local-install
275
	emake -j1 DESTDIR="${D}" local-install
271
276
272
	if use ctypes-python; then
277
	my_py_install() {
273
		ctypes_python_bindings_installation() {
278
		if use ctypes-python; then
274
			rm -f subversion/bindings/ctypes-python
279
			pushd subversion/bindings/ctypes-python >/dev/null || die
275
			ln -s ctypes-python-${PYTHON_ABI} subversion/bindings/ctypes-python
280
			distutils-r1_python_install
276
			emake DESTDIR="${D}" install-ctypes-python
281
			popd >/dev/null || die
277
		}
282
		fi
278
		python_execute_function \
283
279
			--action-message 'Installation of Subversion Ctypes Python bindings with $(python_get_implementation) $(python_get_version)' \
284
		if use python; then
280
			--failure-message 'Installation of Subversion Ctypes Python bindings failed with $(python_get_implementation) $(python_get_version)' \
285
			local p=subversion/bindings/swig/python
281
			ctypes_python_bindings_installation
286
			ln -s "${BUILD_DIR}" ${p} || die
282
	fi
283
287
284
	if use python; then
285
		swig_python_bindings_installation() {
286
			rm -f subversion/bindings/swig/python
287
			ln -s python-${PYTHON_ABI} subversion/bindings/swig/python
288
			emake \
288
			emake \
289
				DESTDIR="${D}" \
289
				DESTDIR="${D}" \
290
				PYTHON_VERSION="$(python_get_version)" \
290
				swig_pydir="$(python_get_sitedir)/libsvn" \
291
				swig_pydir="${EPREFIX}$(python_get_sitedir)/libsvn" \
291
				swig_pydir_extra="$(python_get_sitedir)/svn" \
292
				swig_pydir_extra="${EPREFIX}$(python_get_sitedir)/svn" \
293
				install-swig-py
292
				install-swig-py
294
		}
293
295
		python_execute_function \
294
			rm ${p} || die
296
			--action-message 'Installation of Subversion SWIG Python bindings with $(python_get_implementation) $(python_get_version)' \
295
		fi
297
			--failure-message 'Installation of Subversion SWIG Python bindings failed with $(python_get_implementation) $(python_get_version)' \
296
	}
298
			swig_python_bindings_installation
299
	fi
300
297
301
	if use ctypes-python || use python; then
298
	if use ctypes-python || use python; then
302
		python_clean_installation_image -q
299
		BUILD_DIR=python \
300
		python_foreach_impl my_py_install
303
	fi
301
	fi
304
302
305
	if use perl; then
303
	if use perl; then
Lines 369-375 EOF Link Here
369
		rm -fr tools/{buildbot,dev,diff,po}
367
		rm -fr tools/{buildbot,dev,diff,po}
370
368
371
		insinto /usr/share/${PN}
369
		insinto /usr/share/${PN}
372
		python_convert_shebangs -r 2 tools
370
		find tools -name '*.py' -exec sed -i -e '1s:python:&2:' {} + || die
373
		doins -r tools
371
		doins -r tools
374
	fi
372
	fi
375
373
Lines 403-416 pkg_preinst() { Link Here
403
pkg_postinst() {
401
pkg_postinst() {
404
	use perl && perl-module_pkg_postinst
402
	use perl && perl-module_pkg_postinst
405
403
406
	if use ctypes-python; then
407
		python_mod_optimize csvn
408
	fi
409
410
	if use python; then
411
		python_mod_optimize libsvn svn
412
	fi
413
414
	if [[ -n "${CHANGED_BDB_VERSION}" ]]; then
404
	if [[ -n "${CHANGED_BDB_VERSION}" ]]; then
415
		ewarn "You upgraded from an older version of Berkeley DB and may experience"
405
		ewarn "You upgraded from an older version of Berkeley DB and may experience"
416
		ewarn "problems with your repository. Run the following commands as root to fix it:"
406
		ewarn "problems with your repository. Run the following commands as root to fix it:"
Lines 423-436 pkg_postinst() { Link Here
423
413
424
pkg_postrm() {
414
pkg_postrm() {
425
	use perl && perl-module_pkg_postrm
415
	use perl && perl-module_pkg_postrm
426
427
	if use ctypes-python; then
428
		python_mod_cleanup csvn
429
	fi
430
431
	if use python; then
432
		python_mod_cleanup libsvn svn
433
	fi
434
}
416
}
435
417
436
pkg_config() {
418
pkg_config() {
437
- 

Return to bug 458192