summaryrefslogtreecommitdiff
path: root/mpfr/build.sh
blob: 25a0a617d53e18895de9ea14ead538a7a9feb694 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash
name=mpfr
version=3.1.4
revision=0
sources=(
    "https://gcc.gnu.org/pub/gcc/infrastructure/${name}-${version}.tar.bz2"
)
build_depends=(
    "bzip2"
)
depends=(
    "gmp"
)

function prepare() {
    tar xf ${name}-${version}.tar.bz2
    cd ${name}-${version}
    if [[ $(uname -s) == Darwin ]]; then
        LDFLAGS="-L${_runtime}/lib"
    fi
}

function build() {
    ./configure --prefix=${_prefix}
    make -j${_maxjobs}
}

function package() {
    make install DESTDIR="${_pkgdir}"
}