Magellan Linux

Contents of /smage/trunk/core/gmp/gmp-6.2.1-r3.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 15672 - (show annotations) (download)
Wed Dec 21 09:32:47 2022 UTC (16 months ago) by niro
File size: 2201 byte(s)
auto added: ver bump to 6.2.1-r3
1 # $Id$
2
3 PNAME="gmp"
4 PVER="6.2.1"
5 PBUILD="r3"
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++-12.2"
14
15 ALX_DEV_DEPEND=">= sys-libs/libstdc++-dev-12.2"
16
17 SRCFILE="${PNAME}-${PVER}.tar.bz2"
18 SRCDIR="${BUILDDIR}/${PNAME}-${PVER}"
19
20 ALX_PKG_KEEP="usr/$(mlibdir)/*.so.*"
21
22 # not multilib.sminc compat, don't use it!
23 sminclude mbuild mtools alx-split
24
25 SRC_URI=(
26 gnu://${PNAME}/${SRCFILE}
27 mirror://${PNAME}/${SRCFILE}
28 )
29
30 UP2DATE="updatecmd_gnu ${PNAME}"
31
32 src_compile()
33 {
34 # build 32bit libraries for multilib systems
35 if [[ ${ARCH} = x86_64 ]]
36 then
37 install -d ${SRCDIR}/build-m32
38 cd ${SRCDIR}/build-m32
39
40 ABI=32 \
41 CC="gcc -m${ABI}" \
42 CXX="g++ -m${ABI}" \
43 PKG_CONFIG_PATH="/usr/lib/pkgconfig" \
44 CFLAGS="${CFLAGS//-march=x86-64/-march=i686} -mtune=generic" \
45 CXXFLAGS="${CXXFLAGS//-march=x86-64/-march=i686} -mtune=generic" \
46 ../configure \
47 --build=${CHOST} \
48 --host=i686-pc-linux-gnu \
49 --prefix=/usr \
50 --mandir=/usr/share/man \
51 --infodir=/usr/share/info \
52 --libdir=/usr/lib \
53 --includedir=/usr/lib/m32/gmp \
54 --enable-cxx \
55 --disable-static \
56 || die
57
58 # fix include dir location, both headers should use the same folder
59 sed -i 's/$(exec_prefix)\/include/$\(includedir\)/' Makefile || die
60
61 mmake || die
62 fi
63
64 install -d ${SRCDIR}/build
65 cd ${SRCDIR}/build
66 CC="gcc" \
67 CXX="g++" \
68 ../configure \
69 --build=${CHOST} \
70 --host=${CHOST} \
71 --prefix=/usr \
72 --mandir=/usr/share/man \
73 --infodir=/usr/share/info \
74 --libdir=/usr/$(mlibdir) \
75 --enable-cxx \
76 --disable-static \
77 || die
78
79 mmake || die
80 }
81
82 src_check()
83 {
84 if [[ ${ARCH} = x86_64 ]]
85 then
86 cd ${SRCDIR}/build-m32
87 make -k check || die
88 fi
89
90 cd ${SRCDIR}/build
91 make -k check || die
92 }
93
94 alx_generic_src_install()
95 {
96 # build 32bit libraries for multilib systems
97 if [[ ${ARCH} = x86_64 ]]
98 then
99 cd ${SRCDIR}/build-m32
100 make DESTDIR=${BINDIR} install || die
101 fi
102
103 cd ${SRCDIR}/build
104 make DESTDIR=${BINDIR} install || die
105
106 cd ${SRCDIR}
107 minstalldocs AUTHORS COPYING* ChangeLog NEWS README || die
108 }