Gentoo Archives: gentoo-commits

From: "Thomas Kahle (tomka)" <tomka@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/singular: ChangeLog singular-3.1.3.3.ebuild
Date: Fri, 23 Dec 2011 12:49:34
Message-Id: 20111223124925.603932004B@flycatcher.gentoo.org
1 tomka 11/12/23 12:49:25
2
3 Modified: ChangeLog
4 Added: singular-3.1.3.3.ebuild
5 Log:
6 Import 3.1.3.3 from sage-on-gentoo. Thanks François Bissey
7
8 (Portage version: 2.1.10.41/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.48 sci-mathematics/singular/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/singular/ChangeLog?rev=1.48&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/singular/ChangeLog?rev=1.48&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/singular/ChangeLog?r1=1.47&r2=1.48
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v
20 retrieving revision 1.47
21 retrieving revision 1.48
22 diff -u -r1.47 -r1.48
23 --- ChangeLog 3 May 2011 14:51:47 -0000 1.47
24 +++ ChangeLog 23 Dec 2011 12:49:25 -0000 1.48
25 @@ -1,6 +1,14 @@
26 # ChangeLog for sci-mathematics/singular
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.47 2011/05/03 14:51:47 tomka Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/ChangeLog,v 1.48 2011/12/23 12:49:25 tomka Exp $
30 +
31 +*singular-3.1.3.3 (23 Dec 2011)
32 +
33 + 23 Dec 2011; Thomas Kahle <tomka@g.o> +singular-3.1.3.3.ebuild,
34 + +files/singular-3.1.3.3-Minor.h.patch,
35 + +files/singular-3.1.3.3-os_x_ppc.patch,
36 + +files/singular-3.1.3.3.make_parallel.2.patch:
37 + Import 3.1.3.3 from sage-on-gentoo. Thanks François Bissey
38
39 *singular-3.1.3.1 (03 May 2011)
40
41
42
43
44 1.1 sci-mathematics/singular/singular-3.1.3.3.ebuild
45
46 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/singular/singular-3.1.3.3.ebuild?rev=1.1&view=markup
47 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/singular/singular-3.1.3.3.ebuild?rev=1.1&content-type=text/plain
48
49 Index: singular-3.1.3.3.ebuild
50 ===================================================================
51 # Copyright 1999-2011 Gentoo Foundation
52 # Distributed under the terms of the GNU General Public License v2
53 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/singular/singular-3.1.3.3.ebuild,v 1.1 2011/12/23 12:49:25 tomka Exp $
54
55 EAPI="3"
56 WANT_AUTOCONF="2.1" # Upstream ticket 240 -> wontfix
57
58 # Upstream does not care about tests.
59 RESTRICT="test"
60
61 inherit autotools eutils elisp-common flag-o-matic multilib prefix versionator
62
63 MY_PN=Singular
64 MY_PV=$(replace_all_version_separators -)
65 MY_DIR=$(get_version_component_range 1-3 ${MY_PV})
66 # There 'share' tarball does not get updated on every release
67 MY_SHARE_DIR="3-1-3"
68 MY_PV_SHARE="${MY_PV}"
69
70 DESCRIPTION="Computer algebra system for polynomial computations"
71 HOMEPAGE="http://www.singular.uni-kl.de/"
72 SRC_COM="http://www.mathematik.uni-kl.de/ftp/pub/Math/${MY_PN}/SOURCES/"
73 # Share stuff did not see a new version:
74 SRC_URI="${SRC_COM}${MY_DIR}/${MY_PN}-${MY_PV}.tar.gz
75 ${SRC_COM}${MY_SHARE_DIR}/Singular-${MY_PV_SHARE}-share.tar.gz"
76
77 LICENSE="GPL-2"
78 SLOT="0"
79 KEYWORDS="~amd64 ~ppc ~x86 ~x86-linux ~x86-macos"
80 IUSE="boost doc emacs examples +readline test"
81
82 RDEPEND="dev-libs/gmp
83 >=dev-libs/ntl-5.5.1
84 emacs? ( >=virtual/emacs-22 )"
85
86 DEPEND="${RDEPEND}
87 dev-lang/perl
88 boost? ( dev-libs/boost )
89 readline? ( sys-libs/readline )
90 test? ( dev-util/cmake
91 dev-util/cppunit )"
92
93 S="${WORKDIR}"/${MY_PN}-${MY_DIR}
94 SITEFILE=60${PN}-gentoo.el
95
96 pkg_setup() {
97 append-flags "-fPIC"
98 append-ldflags "-fPIC"
99 tc-export CC CPP CXX
100
101 # Ensure that >=emacs-22 is selected
102 if use emacs; then
103 elisp-need-emacs 22 || die "Emacs version too low"
104 fi
105 }
106
107 src_prepare () {
108 epatch "${FILESDIR}"/${PN}-3.1.0-gentoo.patch
109 epatch "${FILESDIR}"/${PN}-3.1.0-emacs-22.patch
110 epatch "${FILESDIR}"/${PN}-3.0.4.4-nostrip.patch
111 epatch "${FILESDIR}"/${PN}-3.1.3.3-Minor.h.patch
112 # fix parallel make issue reported upstream http://www.singular.uni-kl.de:8002/trac/ticket/395
113 epatch "${FILESDIR}"/${PN}-3.1.3.3.make_parallel.2.patch
114
115 if [[ ${CHOST} == *-darwin* ]] ; then
116 epatch "${FILESDIR}"/${PN}-3.1.3.3-os_x_ppc.patch
117 fi
118
119 eprefixify kernel/feResource.cc
120
121 sed -i \
122 -e "/CXXFLAGS/ s/--no-exceptions//g" \
123 -e "s/SLDFLAGS=-shared/SLDFLAGS=\"$(raw-ldflags) -shared\"/" \
124 "${S}"/Singular/configure.in || die
125
126 cd "${S}"/Singular || die "failed to cd into Singular/"
127 eautoconf
128 }
129
130 src_configure() {
131
132 econf \
133 --prefix="${S}"/build \
134 --exec-prefix="${S}"/build \
135 --bindir="${S}"/build/bin \
136 --libdir="${S}"/build/lib \
137 --libexecdir="${S}"/build/lib \
138 --includedir="${S}"/build/include \
139 --with-apint=gmp \
140 --with-gmp="${EPREFIX}"/usr \
141 --disable-NTL \
142 --disable-debug \
143 --disable-doc \
144 --without-MP \
145 --enable-factory \
146 --enable-libfac \
147 --enable-IntegerProgramming \
148 --enable-Singular \
149 $(use_with boost Boost) \
150 $(use_enable emacs) \
151 $(use_with readline) || die "configure failed"
152 }
153
154 src_compile() {
155 emake || die "emake failed"
156
157 if use emacs; then
158 cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}/emacs/
159 elisp-compile *.el || die "elisp-compile failed"
160 fi
161 }
162
163 src_test() {
164 # Tests fail to link -lsingular, upstream ticket #243
165 emake test || die "tests failed"
166 }
167
168 src_install () {
169 dodoc README
170 # execs and libraries
171 cd "${S}"/build/bin
172 dobin ${MY_PN}* gen_test change_cost solve_IP toric_ideal LLL \
173 || die "failed to install binaries"
174 insinto /usr/$(get_libdir)/${PN}
175 # fix install_name on macos, the build system is buggy enough not to add extra for OS X.
176 if [[ ${CHOST} == *-darwin* ]] ; then
177 for d in *.so ; do
178 install_name_tool -id "${EPREFIX}/usr/$(get_libdir)/${PN}/${d}" "${d}"
179 done
180 fi
181 doins *.so || die "failed to install libraries"
182
183 dosym ${MY_PN}-${MY_DIR} /usr/bin/${MY_PN} \
184 || die "failed to create symbolic link"
185
186 # stuff from the share tar ball
187 cd "${WORKDIR}"/${MY_PN}/${MY_SHARE_DIR}
188 insinto /usr/share/${PN}
189 doins -r LIB || die "failed to install lib files"
190 if use examples; then
191 insinto /usr/share/doc/${PF}
192 doins -r examples || die "failed to install examples"
193 fi
194 if use doc; then
195 dohtml -r html/* || die "failed to install html docs"
196 insinto /usr/share/${PN}
197 doins doc/singular.idx || die "failed to install idx file"
198 cp info/${PN}.hlp info/${PN}.info &&
199 doinfo info/${PN}.info \
200 || die "failed to install info files"
201 fi
202 if use emacs; then
203 elisp-install ${PN} emacs/*.el emacs/*.elc emacs/.emacs* \
204 || die "elisp-install failed"
205 elisp-site-file-install "${FILESDIR}/${SITEFILE}"
206 fi
207 }
208
209 pkg_postinst() {
210 einfo "The authors ask you to register as a SINGULAR user."
211 einfo "Please check the license file for details."
212
213 if use emacs; then
214 echo
215 ewarn "Please note that the ESingular emacs wrapper has been"
216 ewarn "removed in favor of full fledged singular support within"
217 ewarn "Gentoo's emacs infrastructure; i.e. just fire up emacs"
218 ewarn "and you should be good to go! See bug #193411 for more info."
219 echo
220 fi
221
222 use emacs && elisp-site-regen
223 }
224
225 pkg_postrm() {
226 use emacs && elisp-site-regen
227 }