Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-mathematics/pari: ChangeLog pari-2.5.0-r1.ebuild pari-2.5.0.ebuild
Date: Wed, 27 Jul 2011 20:02:17
Message-Id: 20110727190356.328B92004B@flycatcher.gentoo.org
1 bicatali 11/07/27 19:03:56
2
3 Modified: ChangeLog
4 Added: pari-2.5.0-r1.ebuild
5 Removed: pari-2.5.0.ebuild
6 Log:
7 Split up data to another pari-data packages, due to upstream not updating its package names. Added a few patches submitted by Francois Bissey: one for parallel make, one for sage compatibility and one for ppc-macos
8
9 (Portage version: 2.1.10.7/cvs/Linux x86_64)
10
11 Revision Changes Path
12 1.84 sci-mathematics/pari/ChangeLog
13
14 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/ChangeLog?rev=1.84&view=markup
15 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/ChangeLog?rev=1.84&content-type=text/plain
16 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/ChangeLog?r1=1.83&r2=1.84
17
18 Index: ChangeLog
19 ===================================================================
20 RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v
21 retrieving revision 1.83
22 retrieving revision 1.84
23 diff -u -r1.83 -r1.84
24 --- ChangeLog 26 Jul 2011 19:30:38 -0000 1.83
25 +++ ChangeLog 27 Jul 2011 19:03:56 -0000 1.84
26 @@ -1,6 +1,15 @@
27 # ChangeLog for sci-mathematics/pari
28 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
29 -# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v 1.83 2011/07/26 19:30:38 bicatali Exp $
30 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/ChangeLog,v 1.84 2011/07/27 19:03:56 bicatali Exp $
31 +
32 +*pari-2.5.0-r1 (27 Jul 2011)
33 +
34 + 27 Jul 2011; Sébastien Fabbro <bicatali@g.o> -pari-2.5.0.ebuild,
35 + +pari-2.5.0-r1.ebuild, +files/pari-2.5.0-doc-make.patch,
36 + +files/pari-2.5.0-macos.patch, +files/pari-2.5.0-mp.c.patch:
37 + Split up data to another pari-data packages, due to upstream not updating its
38 + package names. Added a few patches submitted by Francois Bissey: one for
39 + parallel make, one for sage compatibility and one for ppc-macos
40
41 *pari-2.5.0 (26 Jul 2011)
42
43
44
45
46 1.1 sci-mathematics/pari/pari-2.5.0-r1.ebuild
47
48 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/pari-2.5.0-r1.ebuild?rev=1.1&view=markup
49 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/pari/pari-2.5.0-r1.ebuild?rev=1.1&content-type=text/plain
50
51 Index: pari-2.5.0-r1.ebuild
52 ===================================================================
53 # Copyright 1999-2011 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 # $Header: /var/cvsroot/gentoo-x86/sci-mathematics/pari/pari-2.5.0-r1.ebuild,v 1.1 2011/07/27 19:03:56 bicatali Exp $
56
57 EAPI="4"
58
59 inherit eutils flag-o-matic toolchain-funcs
60
61 DESCRIPTION="A software package for computer-aided number theory"
62 HOMEPAGE="http://pari.math.u-bordeaux.fr/"
63 SRC_URI="http://pari.math.u-bordeaux.fr/pub/${PN}/unix/${P}.tar.gz"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris"
68 IUSE="doc data fltk gmp X"
69
70 RDEPEND="sys-libs/readline
71 fltk? ( x11-libs/fltk:1 )
72 gmp? ( dev-libs/gmp )
73 X? ( x11-libs/libX11 )
74 doc? ( X? ( x11-misc/xdg-utils ) )
75 data? ( sci-mathematics/pari-data )"
76 DEPEND="${RDEPEND}
77 doc? ( virtual/latex-base )"
78
79 SITEFILE=50${PN}-gentoo.el
80
81 get_compile_dir() {
82 pushd "${S}/config" > /dev/null
83 local fastread=yes
84 source ./get_archos
85 popd > /dev/null
86 echo "O${osname}-${arch}"
87 }
88
89 src_prepare() {
90 epatch "${FILESDIR}/${PN}"-2.3.2-strip.patch
91 epatch "${FILESDIR}/${PN}"-2.3.2-ppc-powerpc-arch-fix.patch
92 # fix parallel make
93 epatch "${FILESDIR}/${PN}"-2.5.0-doc-make.patch
94 # sage error handling patch
95 epatch "${FILESDIR}/${PN}"-2.5.0-mp.c.patch
96 # OS X: add -install_name to the linker option
97 epatch "${FILESDIR}/${PN}"-2.5.0-macos.patch
98
99 # disable default building of docs during install
100 sed -i \
101 -e "s:install-doc install-examples:install-examples:" \
102 config/Makefile.SH || die "Failed to fix makefile"
103
104 # propagate ldflags
105 sed -i \
106 -e 's/$shared $extra/$shared $extra \\$(LDFLAGS)/' \
107 config/get_dlld || die "failed to fix LDFLAGS"
108 # move doc dir to a gentoo doc dir and replace acroread by xdg-open
109 sed -i \
110 -e "s:\$d = \$0:\$d = '${EPREFIX}/usr/share/doc/${PF}':" \
111 -e 's:"acroread":"xdg-open":' \
112 doc/gphelp.in || die "Failed to fix doc dir"
113
114 sed -i "s:/usr:${EPREFIX}/usr:g" config/get_X11 \
115 || die "Failed to fix get_X11"
116
117 # usersch3.tex is generated
118 rm -f doc/usersch3.tex || die "failed to remove generated file"
119 }
120
121 src_configure() {
122 tc-export CC
123
124 # need to force optimization here, as it breaks without
125 if is-flag -O0; then
126 replace-flags -O0 -O2
127 elif ! is-flag -O?; then
128 append-flags -O2
129 fi
130
131 local myconfig
132 if use gmp ; then
133 myconfig="--with-gmp=${EPREFIX}/usr"
134 else
135 myconfig="--with-gmp=no"
136 fi
137
138 # sysdatadir installs a pari.cfg stuff which is informative only
139 ./Configure \
140 --prefix="${EPREFIX}"/usr \
141 --datadir="${EPREFIX}"/usr/share/${PN} \
142 --libdir="${EPREFIX}"/usr/$(get_libdir) \
143 --sysdatadir="${EPREFIX}"/usr/share/doc/${PF} \
144 --mandir="${EPREFIX}"/usr/share/man/man1 \
145 --with-readline="${EPREFIX}"/usr \
146 --with-ncurses-lib="${EPREFIX}"/usr/$(get_libdir) \
147 $myconfig \
148 || die "./Configure failed"
149 }
150
151 src_compile() {
152 if use hppa; then
153 mymake=DLLD\="${EPREFIX}"/usr/bin/gcc\ DLLDFLAGS\=-shared\ -Wl,-soname=\$\(LIBPARI_SONAME\)\ -lm
154 fi
155
156 local installdir=$(get_compile_dir)
157 cd "${installdir}" || die "failed to change directory"
158
159 # upstream set -fno-strict-aliasing.
160 # aliasing is a known issue on amd64, work on x86 by sheer luck
161 emake ${mymake} \
162 CFLAGS="${CFLAGS} -fno-strict-aliasing -DGCC_INLINE -fPIC" lib-dyn
163 emake ${mymake} \
164 CFLAGS="${CFLAGS} -DGCC_INLINE" gp ../gp
165
166 if use doc; then
167 cd "${S}" || die "failed to change directory"
168 # To prevent sandbox violations by metafont
169 VARTEXFONTS="${T}"/fonts emake docpdf
170 fi
171 }
172
173 src_test() {
174 emake dobench
175 }
176
177 src_install() {
178 default
179 dodoc MACHINES COMPAT
180 if use doc; then
181 # install gphelp and the pdf documentations manually.
182 # the install-doc target is overkill.
183 dodoc doc/*.pdf
184 dobin doc/gphelp
185 insinto /usr/share/doc/${PF}
186 # gphelp looks for some of the tex sources...
187 doins doc/*.tex doc/translations
188 # Install the examples - for real.
189 local installdir=$(get_compile_dir)
190 cd "${installdir}" || die "failed to change directory"
191 emake EXDIR="${ED}/usr/share/doc/${PF}/examples" install-examples
192 fi
193 }