summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/stfl')
-rw-r--r--dev-libs/stfl/ChangeLog6
-rw-r--r--dev-libs/stfl/stfl-0.21.ebuild58
2 files changed, 50 insertions, 14 deletions
diff --git a/dev-libs/stfl/ChangeLog b/dev-libs/stfl/ChangeLog
index 7a47b4fbad81..fcabbfb6910f 100644
--- a/dev-libs/stfl/ChangeLog
+++ b/dev-libs/stfl/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-libs/stfl
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/ChangeLog,v 1.27 2010/06/15 16:54:35 arfrever Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/ChangeLog,v 1.28 2010/06/15 16:58:00 arfrever Exp $
+
+ 15 Jun 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
+ stfl-0.21.ebuild:
+ Set SUPPORT_PYTHON_ABIS (bug #312203). Respect LDFLAGS during building libstfl.so.
15 Jun 2010; Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
stfl-0.19.ebuild:
diff --git a/dev-libs/stfl/stfl-0.21.ebuild b/dev-libs/stfl/stfl-0.21.ebuild
index 6accdb737f92..f7b2b58f88cd 100644
--- a/dev-libs/stfl/stfl-0.21.ebuild
+++ b/dev-libs/stfl/stfl-0.21.ebuild
@@ -1,9 +1,11 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/stfl-0.21.ebuild,v 1.3 2010/06/05 15:30:26 phajdan.jr Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/stfl-0.21.ebuild,v 1.4 2010/06/15 16:58:00 arfrever Exp $
EAPI="3"
-inherit eutils multilib perl-module python
+SUPPORT_PYTHON_ABIS="1"
+
+inherit eutils multilib perl-module python toolchain-funcs
DESCRIPTION="A library which implements a curses-based widget set for text terminals"
HOMEPAGE="http://www.clifford.at/stfl/"
@@ -26,34 +28,64 @@ DEPEND="${COMMON_DEPEND}
RDEPEND="${COMMON_DEPEND}"
+pkg_setup() {
+ if use python; then
+ python_pkg_setup
+ fi
+}
+
src_prepare() {
sed -i \
- -e "s!-Os -ggdb!!" \
- -e "s!^\(all:.*\) example!\1!" \
- Makefile
+ -e 's/-Os -ggdb//' \
+ -e 's/^\(all:.*\) example/\1/' \
+ -e 's/$(CC) -shared/$(CC) $(LDFLAGS) -shared/' \
+ Makefile || die "sed failed"
epatch "${FILESDIR}/${P}-python.patch"
- if ! use perl; then
- echo "FOUND_PERL5=0" >>Makefile.cfg
+ if use perl; then
+ echo "FOUND_PERL5=1" >> Makefile.cfg
+ else
+ echo "FOUND_PERL5=0" >> Makefile.cfg
fi
- if ! use ruby; then
- echo "FOUND_RUBY=0" >>Makefile.cfg
+ if use ruby; then
+ echo "FOUND_RUBY=1" >> Makefile.cfg
+ else
+ echo "FOUND_RUBY=0" >> Makefile.cfg
fi
- if ! use python; then
- echo "FOUND_PYTHON=0" >>Makefile.cfg
- fi
+ echo "FOUND_PYTHON=0" >> Makefile.cfg
}
src_compile() {
emake CC="$(tc-getCC)" || die "make failed"
+
+ if use python; then
+ python_copy_sources python
+
+ # Based on code from python/Makefile.snippet.
+ building() {
+ echo swig -python -threads stfl.i
+ swig -python -threads stfl.i
+ echo "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
+ "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
+ }
+ python_execute_function -s --source-dir python building
+ fi
}
src_install() {
emake prefix="/usr" DESTDIR="${D}" libdir="$(get_libdir)" install || die "make install failed"
+ if use python; then
+ installation() {
+ insinto $(python_get_sitedir)
+ doins stfl.py _stfl.so
+ }
+ python_execute_function -s --source-dir python installation
+ fi
+
dodoc README
local exdir="/usr/share/doc/${PF}/examples"
@@ -80,5 +112,5 @@ pkg_postinst() {
}
pkg_postrm() {
- python_mod_cleanup stfl.py
+ use python && python_mod_cleanup stfl.py
}