1 # Build recipe for gmp.
3 # Copyright (c) 2015-2017 Matias Fonzo, <selk@dragora.org>.
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/libs"
24 tarname=${program}-${version}.tar.lz
27 fetch=ftp://ftp.gnu.org/gnu/gmp/$tarname
30 GNU multiple precision arithmetic library.
32 GMP is a free library for arbitrary precision arithmetic, operating
33 on signed integers, rational numbers, and floating-point numbers.
34 There is no practical limit to the precision except the ones implied
35 by the available memory in the machine GMP runs on.
37 GMP has a rich set of functions, and the functions have a regular
41 homepage=http://gmplib.org
42 license="GPLv2+, GPLv3+, LGPLv3+"
44 # Source documentation
45 docs="AUTHORS COPYING* ChangeLog NEWS README"
46 docsdir="${docdir}/${program}-${version}"
52 unpack "${tardir}/$tarname"
56 # Set sane permissions
57 chmod -R u+w,go-w,a+rX-s .
59 # Update for hosts based on musl
60 cp -f "${worktree}/archive/common/config.guess" config.guess
61 cp -f "${worktree}/archive/common/config.sub" config.sub
64 CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
66 --libdir=/usr/lib${libSuffix} \
73 --build="$(cc -dumpmachine)"
77 make -j${jobs} DESTDIR="$destdir" install-strip
79 # Compress info documents deleting index file for the package
80 if test -d "${destdir}/$infodir"
82 rm -f "${destdir}/${infodir}/dir"
83 lzip -9 "${destdir}/${infodir}"/*
87 mkdir -p "${destdir}${docsdir}"
88 cp -p $docs "${destdir}${docsdir}"