Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-libs/stfl: stfl-0.22.ebuild ChangeLog
Date: Tue, 01 Nov 2011 07:37:12
Message-Id: 20111101073702.D1B2C2004B@flycatcher.gentoo.org
1 radhermit 11/11/01 07:37:02
2
3 Modified: ChangeLog
4 Added: stfl-0.22.ebuild
5 Log:
6 Version bump. Add static-libs use flag.
7
8 (Portage version: 2.2.0_alpha70/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.33 dev-libs/stfl/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/stfl/ChangeLog?rev=1.33&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/stfl/ChangeLog?rev=1.33&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/stfl/ChangeLog?r1=1.32&r2=1.33
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-libs/stfl/ChangeLog,v
20 retrieving revision 1.32
21 retrieving revision 1.33
22 diff -u -r1.32 -r1.33
23 --- ChangeLog 13 Sep 2011 20:12:20 -0000 1.32
24 +++ ChangeLog 1 Nov 2011 07:37:02 -0000 1.33
25 @@ -1,6 +1,12 @@
26 # ChangeLog for dev-libs/stfl
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/ChangeLog,v 1.32 2011/09/13 20:12:20 radhermit Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/ChangeLog,v 1.33 2011/11/01 07:37:02 radhermit Exp $
30 +
31 +*stfl-0.22 (01 Nov 2011)
32 +
33 + 01 Nov 2011; Tim Harder <radhermit@g.o> +stfl-0.22.ebuild,
34 + +files/stfl-0.22-soname-symlink.patch:
35 + Version bump. Add static-libs use flag.
36
37 13 Sep 2011; Tim Harder <radhermit@g.o> metadata.xml:
38 Take over as maintainer.
39
40
41
42 1.1 dev-libs/stfl/stfl-0.22.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/stfl/stfl-0.22.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/stfl/stfl-0.22.ebuild?rev=1.1&content-type=text/plain
46
47 Index: stfl-0.22.ebuild
48 ===================================================================
49 # Copyright 1999-2011 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/dev-libs/stfl/stfl-0.22.ebuild,v 1.1 2011/11/01 07:37:02 radhermit Exp $
52
53 EAPI="3"
54 SUPPORT_PYTHON_ABIS="1"
55
56 inherit eutils multilib perl-module python toolchain-funcs
57
58 DESCRIPTION="A library which implements a curses-based widget set for text terminals"
59 HOMEPAGE="http://www.clifford.at/stfl/"
60 SRC_URI="http://www.clifford.at/${PN}/${P}.tar.gz"
61
62 LICENSE="LGPL-3"
63 SLOT="0"
64 KEYWORDS="~amd64 ~ppc ~x86"
65
66 IUSE="examples perl python ruby static-libs"
67
68 COMMON_DEPEND="sys-libs/ncurses[unicode]
69 perl? ( dev-lang/perl )
70 ruby? ( dev-lang/ruby )
71 python? ( dev-lang/python )"
72
73 DEPEND="${COMMON_DEPEND}
74 perl? ( dev-lang/swig )
75 python? ( >=dev-lang/swig-1.3.40 )
76 ruby? ( dev-lang/swig )"
77
78 RDEPEND="${COMMON_DEPEND}"
79
80 pkg_setup() {
81 use python && python_pkg_setup
82 }
83
84 src_prepare() {
85 sed -i \
86 -e 's/-Os -ggdb//' \
87 -e 's/^\(all:.*\) example/\1/' \
88 -e 's/$(CC) -shared/$(CC) $(LDFLAGS) -shared/' \
89 Makefile || die "sed failed"
90
91 if ! use static-libs ; then
92 sed -i -e "/install .* libstfl.a/d" Makefile
93 fi
94
95 epatch "${FILESDIR}"/${PN}-0.21-python.patch
96 epatch "${FILESDIR}"/${P}-soname-symlink.patch
97
98 if use perl ; then
99 echo "FOUND_PERL5=1" >> Makefile.cfg
100 else
101 echo "FOUND_PERL5=0" >> Makefile.cfg
102 fi
103
104 if use ruby ; then
105 echo "FOUND_RUBY=1" >> Makefile.cfg
106 else
107 echo "FOUND_RUBY=0" >> Makefile.cfg
108 fi
109
110 echo "FOUND_PYTHON=0" >> Makefile.cfg
111 }
112
113 src_compile() {
114 local targets="libstfl.so.${PV}"
115 use static-libs && targets+=" libstfl.a"
116 emake CC="$(tc-getCC)" ${targets} || die "emake failed"
117
118 if use python ; then
119 python_copy_sources python
120
121 # Based on code from python/Makefile.snippet.
122 building() {
123 echo swig -python -threads stfl.i
124 swig -python -threads stfl.i
125 echo "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
126 "$(tc-getCC)" ${CFLAGS} ${LDFLAGS} -shared -pthread -fPIC stfl_wrap.c -I$(python_get_includedir) -I.. ../libstfl.so.${PV} -lncursesw -o _stfl.so
127 }
128 python_execute_function -s --source-dir python building
129 fi
130 }
131
132 src_install() {
133 emake prefix="/usr" DESTDIR="${D}" libdir="$(get_libdir)" install || die "emake install failed"
134
135 if use python ; then
136 installation() {
137 insinto $(python_get_sitedir)
138 doins stfl.py _stfl.so
139 }
140 python_execute_function -s --source-dir python installation
141 fi
142
143 dodoc README
144
145 local exdir="/usr/share/doc/${PF}/examples"
146 if use examples ; then
147 insinto ${exdir}
148 doins example.{c,stfl}
149 insinto ${exdir}/python
150 doins python/example.py
151 if use perl ; then
152 insinto ${exdir}/perl
153 doins perl5/example.pl
154 fi
155 if use ruby ; then
156 insinto ${exdir}/ruby
157 doins ruby/example.rb
158 fi
159 fi
160
161 fixlocalpod
162 }
163
164 pkg_postinst() {
165 use python && python_mod_optimize stfl.py
166 }
167
168 pkg_postrm() {
169 use python && python_mod_cleanup stfl.py
170 }