qi: make release of qi 1.1
[dragora.git] / recipes / libs / gmp / recipe
blobbf26d62dd99361093769237d30c1dedbbe3bbbd7
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.
17 program=gmp
18 version=6.1.2
19 release=1
21 # Set 'outdir' for a nice and well-organized output directory
22 outdir="${outdir}/${arch}/libs"
24 tarname=${program}-${version}.tar.lz
26 # Remote source(s)
27 fetch=ftp://ftp.gnu.org/gnu/gmp/$tarname
29 description="
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
38 interface.
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}"
48 build()
50     set -e
52     unpack "${tardir}/$tarname"
54     cd "$srcdir"
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
63     ./configure \
64     CFLAGS="$QICFLAGS" CXXFLAGS="$QICXXFLAGS" LDFLAGS="$QILDFLAGS" \
65      $configure_args \
66      --libdir=/usr/lib${libSuffix} \
67      --infodir=$infodir \
68      --docdir=$docsdir \
69      --enable-cxx \
70      --enable-static \
71      --enable-shared \
72      --without-readline \
73      --build="$(cc -dumpmachine)"
75     make -j${jobs}
76     make -j${jobs} check
77     make -j${jobs} DESTDIR="$destdir" install-strip
79     # Compress info documents deleting index file for the package
80     if test -d "${destdir}/$infodir"
81     then
82         rm -f "${destdir}/${infodir}/dir"
83         lzip -9 "${destdir}/${infodir}"/*
84     fi
86     # Copy documentation
87     mkdir -p "${destdir}${docsdir}"
88     cp -p $docs "${destdir}${docsdir}"