Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 521522
Collapse All | Expand All

(-)stfl-0.22-r1.ebuild (-28 / +21 lines)
Lines 1-12 Link Here
1
# Copyright 1999-2012 Gentoo Foundation
1
# Copyright 1999-2014 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/stfl-0.22-r1.ebuild,v 1.1 2012/10/26 16:07:24 scarabeus Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/stfl-0.22-r1.ebuild,v 1.1 2012/10/26 16:07:24 scarabeus Exp $
4
4
5
EAPI="4"
5
EAPI=5
6
SUPPORT_PYTHON_ABIS="1"
6
PYTHON_COMPAT=( python{2_7,3_3} )
7
RESTRICT_PYTHON_ABIS="*-jython"
7
GENTOO_DEPEND_ON_PERL=no
8
8
inherit eutils multilib perl-module python-r1 toolchain-funcs
9
inherit eutils multilib perl-module python toolchain-funcs
10
9
11
DESCRIPTION="A library which implements a curses-based widget set for text terminals"
10
DESCRIPTION="A library which implements a curses-based widget set for text terminals"
12
HOMEPAGE="http://www.clifford.at/stfl/"
11
HOMEPAGE="http://www.clifford.at/stfl/"
Lines 14-27 Link Here
14
13
15
LICENSE="LGPL-3"
14
LICENSE="LGPL-3"
16
SLOT="0"
15
SLOT="0"
17
KEYWORDS="amd64 ~ppc x86"
16
KEYWORDS="~amd64 ~ppc ~x86"
18
17
19
IUSE="examples perl python ruby static-libs"
18
IUSE="examples perl python ruby static-libs"
20
19
21
COMMON_DEPEND="sys-libs/ncurses[unicode]
20
COMMON_DEPEND="sys-libs/ncurses[unicode]
22
	perl? ( dev-lang/perl )
21
	perl? ( dev-lang/perl:= )
23
	ruby? ( dev-lang/ruby )
22
	ruby? ( dev-lang/ruby )
24
	python? ( dev-lang/python )"
23
	python? ( ${PYTHON_DEPS} )"
25
24
26
DEPEND="${COMMON_DEPEND}
25
DEPEND="${COMMON_DEPEND}
27
	perl? ( dev-lang/swig )
26
	perl? ( dev-lang/swig )
Lines 30-39 Link Here
30
29
31
RDEPEND="${COMMON_DEPEND}"
30
RDEPEND="${COMMON_DEPEND}"
32
31
33
pkg_setup() {
34
	use python && python_pkg_setup
35
}
36
37
src_prepare() {
32
src_prepare() {
38
	sed -i \
33
	sed -i \
39
		-e 's/-Os -ggdb//' \
34
		-e 's/-Os -ggdb//' \
Lines 72-87 Link Here
72
	emake CC="$(tc-getCC)"
67
	emake CC="$(tc-getCC)"
73
68
74
	if use python ; then
69
	if use python ; then
75
		python_copy_sources python
70
		local BUILD_DIR="${S}/python"
71
		python_copy_sources
76
72
77
		# Based on code from python/Makefile.snippet.
73
		# Based on code from python/Makefile.snippet.
78
		building() {
74
		building() {
75
			pushd "${BUILD_DIR}" &>/dev/null || die
79
			echo swig -python -threads stfl.i
76
			echo swig -python -threads stfl.i
80
			swig -python -threads stfl.i
77
			swig -python -threads stfl.i || die
81
			echo "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
78
			echo "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
82
			"$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
79
			"$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so || die
80
			popd &>/dev/null || die
83
		}
81
		}
84
		python_execute_function -s --source-dir python building
82
		python_foreach_impl building
85
	fi
83
	fi
86
}
84
}
87
85
Lines 89-99 Link Here
89
	emake prefix="/usr" DESTDIR="${D}" libdir="$(get_libdir)" install
87
	emake prefix="/usr" DESTDIR="${D}" libdir="$(get_libdir)" install
90
88
91
	if use python ; then
89
	if use python ; then
90
		local BUILD_DIR="${S}/python"
91
92
		installation() {
92
		installation() {
93
			insinto $(python_get_sitedir)
93
			pushd "${BUILD_DIR}" &>/dev/null || die
94
			doins stfl.py _stfl.so
94
			python_domodule stfl.py _stfl.so
95
			popd &>/dev/null || die
95
		}
96
		}
96
		python_execute_function -s --source-dir python installation
97
		python_foreach_impl installation
97
	fi
98
	fi
98
99
99
	dodoc README
100
	dodoc README
Lines 116-126 Link Here
116
117
117
	fixlocalpod
118
	fixlocalpod
118
}
119
}
119
120
pkg_postinst() {
121
	use python && python_mod_optimize stfl.py
122
}
123
124
pkg_postrm() {
125
	use python && python_mod_cleanup stfl.py
126
}

Return to bug 521522