diff gnu/libidn2/libidn2.sh @ 1222:325631424c65

misc: bring back build function
author David Demelier <markand@malikania.fr>
date Wed, 27 Oct 2021 11:32:16 +0200
parents a47aaf9743a0
children b811a6479213
line wrap: on
line diff
--- a/gnu/libidn2/libidn2.sh	Fri Oct 15 16:07:30 2021 +0200
+++ b/gnu/libidn2/libidn2.sh	Wed Oct 27 11:32:16 2021 +0200
@@ -39,23 +39,26 @@
 	with_nls="--disable-nls"
 fi
 
-rm -rf $PKGNAME-2.1.1
-tar xvf $PKGNAME-$PKGVERSION.tar.gz
-cd $PKGNAME-2.1.1
+build()
+{
+	rm -rf $PKGNAME-2.1.1
+	tar xvf $PKGNAME-$PKGVERSION.tar.gz
+	cd $PKGNAME-2.1.1
 
-CC="$CC" \
-CFLAGS="$CFLAGS" \
-LDFLAGS="$LDFLAGS" \
-LIBS="$LIBS" \
-./configure \
-	--build=$CBUILD \
-	--host=$CHOST \
-	--prefix=/usr \
-	--enable-shared \
-	$with_nls
-make
-make install DESTDIR=$DESTDIR
-find $DESTDIR -type f -name "*.la" -delete
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--enable-shared \
+		$with_nls
+	make
+	make install DESTDIR=$DESTDIR
+	find $DESTDIR -type f -name "*.la" -delete
 
-cd ..
-rm -rf $PKGNAME-2.1.1
+	cd ..
+	rm -rf $PKGNAME-2.1.1
+}