master chld/ports-heresy / lib / nettle / ndmake.sh
 1#!/bin/sh -ue
 2NAME=nettle
 3VERSION=4.0
 4RELEASE=1
 5SOURCE="https://ftp.gnu.org/gnu/${NAME}/${NAME}-${VERSION}.tar.gz"
 6
 7build(){
 8    CFLAGS='-static' LDFLAGS='-static' DESTDIR="$PKG" PREFIX="$PREFIX" ./configure --prefix="$PREFIX" \
 9		--bindir=/bin \
10		--sbindir=/bin \
11		--libdir=/lib \
12		--without-p11-kit \
13		--disable-nls \
14		--includedir=/include \
15		--sysconfdir=/etc \
16		--enable-static \
17		--disable-shared \
18		--enable-mini-gmp \
19		--disable-largefile || die "configure failed"
20    
21    sed -i 's/gcc/gcc -static/g' config.make
22    gmake CFLAGS='-static' LDFLAGS='-static' PREFIX="$PREFIX" DESTDIR="$PKG" || die "make failed"
23    gmake CFLAGS='-static' LDFLAGS='-static' PREFIX="$PREFIX" DESTDIR="$PKG" install || die "install failed"
24}
25
26. ${0%/*}/../../libsh/libdmake.sh