Contents of /trunk/core/gmp/gmp-6.2.1-r1.smage2
Parent Directory | Revision Log
Revision 33329 -
(show annotations)
(download)
Tue Jul 11 12:10:42 2023 UTC (10 months, 2 weeks ago) by niro
File size: 2010 byte(s)
Tue Jul 11 12:10:42 2023 UTC (10 months, 2 weeks ago) by niro
File size: 2010 byte(s)
-ver bump to 6.2.1
1 | # $Id$ |
2 | |
3 | PNAME="gmp" |
4 | PVER="6.2.1" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="dev-libs" |
8 | |
9 | DESCRIPTION="GMP is a free library for arbitrary precision arithmetic, operating on signed integers, rational numbers, and floating point numbers." |
10 | HOMEPAGE="http://gmplib.org/" |
11 | |
12 | DEPEND=">= virtual/glibc |
13 | >= sys-libs/libstdc++-13.1" |
14 | |
15 | SRCFILE="${PNAME}-${PVER}.tar.xz" |
16 | SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" |
17 | |
18 | # not multilib.sminc compat, don't use it! |
19 | sminclude mbuild mtools |
20 | |
21 | SRC_URI=( |
22 | https://gmplib.org/download/${PNAME}/${SRCFILE} |
23 | mirror://${PNAME}/${SRCFILE} |
24 | ) |
25 | |
26 | UP2DATE="updatecmd_gnu ${PNAME}" |
27 | |
28 | src_compile() |
29 | { |
30 | # build 32bit libraries for multilib systems |
31 | if [[ ${ARCH} = x86_64 ]] |
32 | then |
33 | install -d ${SRCDIR}/build-m32 |
34 | cd ${SRCDIR}/build-m32 |
35 | ABI=32 \ |
36 | CC="gcc -m${ABI}" \ |
37 | CXX="g++ -m${ABI}" \ |
38 | PKG_CONFIG_PATH="/usr/$(ARCH=i686 mlibdir)/pkgconfig" \ |
39 | ../configure \ |
40 | --build=${CHOST} \ |
41 | --host=${CHOST} \ |
42 | --prefix=/usr \ |
43 | --mandir=/usr/share/man \ |
44 | --infodir=/usr/share/info \ |
45 | --libdir=/usr/$(ARCH=i686 mlibdir) \ |
46 | --includedir=/usr/include/m32 \ |
47 | --enable-cxx \ |
48 | --enable-fat \ |
49 | || die |
50 | |
51 | # use includedir for gmp.h as well |
52 | sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile || die |
53 | |
54 | mmake || die |
55 | fi |
56 | |
57 | install -d ${SRCDIR}/build |
58 | cd ${SRCDIR}/build |
59 | CC="gcc" \ |
60 | CXX="g++" \ |
61 | PKG_CONFIG_PATH="/usr/$(mlibdir)/pkgconfig" \ |
62 | ../configure \ |
63 | --build=${CHOST} \ |
64 | --host=${CHOST} \ |
65 | --prefix=/usr \ |
66 | --mandir=/usr/share/man \ |
67 | --infodir=/usr/share/info \ |
68 | --libdir=/usr/$(mlibdir) \ |
69 | --enable-cxx \ |
70 | --enable-fat \ |
71 | || die |
72 | mmake || die |
73 | } |
74 | |
75 | src_check() |
76 | { |
77 | if [[ ${ARCH} = x86_64 ]] |
78 | then |
79 | cd ${SRCDIR}/build-m32 |
80 | make -k check || die |
81 | fi |
82 | |
83 | cd ${SRCDIR}/build |
84 | make -k check || die |
85 | } |
86 | |
87 | src_install() |
88 | { |
89 | # install 32bit libraries for multilib systems |
90 | if [[ ${ARCH} = x86_64 ]] |
91 | then |
92 | cd ${SRCDIR}/build-m32 |
93 | make DESTDIR=${BINDIR} install || die |
94 | fi |
95 | |
96 | cd ${SRCDIR}/build |
97 | make DESTDIR=${BINDIR} install || die |
98 | |
99 | cd ${SRCDIR} |
100 | minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die |
101 | } |