master chld/ports-heresy / net / gnutls / ndmake.sh
 1#!/bin/sh -ue
 2NAME=gnutls
 3VERSION=3.8.13
 4RELEASE=1
 5SOURCE="https://gnupg.org/ftp/gcrypt/${NAME}/v3.8/${NAME}-${VERSION}.tar.xz"
 6
 7build(){
 8    CFLAGS='-static' LDFLAGS='-static' DESTDIR="$PKG" PREFIX="$PREFIX" ./configure --prefix="$PREFIX" \
 9		--bindir=/bin \
10		--sbindir=/bin \
11		--libdir=/lib \
12		--includedir=/include \
13		--sysconfdir=/etc \
14		--with-included-libtasn1 \
15		--without-p11-kit \
16		--without-pop \
17		--without-mailutils \
18		--without-x \
19		--without-pgtk \
20		--without-gnutls \
21	       	--without-dbus \
22		--without-nls \
23		--with-nettle-mini \
24		--with-zlib \
25		--without-lcms2 \
26		--disable-shared \
27		--without-w32 \
28		--disable-largefile \
29		--enable-static \
30		--without-gnutls || die "configure failed"
31
32    sed -i 's/gcc/gcc -static/g' `find . -name Makefile -type f`
33    gmake CFLAGS='-static' LDFLAGS='-static -all-static' PREFIX="$PREFIX" DESTDIR="$PKG" || die "make failed"
34    gmake CFLAGS='-static' LDFLAGS='-static' PREFIX="$PREFIX" DESTDIR="$PKG" install || die "install failed"
35}
36
37. ${0%/*}/../../libsh/libdmake.sh