diff text/libxml2/libxml2.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 e167885e987e
line wrap: on
line diff
--- a/text/libxml2/libxml2.sh	Fri Oct 15 16:07:30 2021 +0200
+++ b/text/libxml2/libxml2.sh	Wed Oct 27 11:32:16 2021 +0200
@@ -62,35 +62,38 @@
 	with_zlib="--without-zlib"
 fi
 
-rm -rf $PKGNAME-$PKGVERSION
-tar xvf $PKGNAME-$PKGVERSION.tar.gz
-cd $PKGNAME-$PKGVERSION
+build()
+{
+	rm -rf $PKGNAME-$PKGVERSION
+	tar xvf $PKGNAME-$PKGVERSION.tar.gz
+	cd $PKGNAME-$PKGVERSION
 
-sed -i -e '/SUBDIRS/ s/tests//' python/Makefile.am
-autoreconf -vif
-CC="$CC" \
-CFLAGS="$CFLAGS" \
-LDFLAGS="$LDFLAGS" \
-LIBS="$LIBS" \
-./configure \
-	--build=$CBUILD \
-	--host=$CHOST \
-	--prefix=/usr \
-	--docdir=/share/doc/$PKGNAME \
-	--with-html-dir=/share/doc/$PKGNAME/html \
-	--with-html-subdir="" \
-	--enable-shared \
-	$with_icu \
-	$with_lzma \
-	$with_python \
-	$with_zlib
-make
-make \
-	DESTDIR=$DESTDIR \
-	DOC_MODULE=$PKGNAME \
-	docsdir=/share/doc/$PKGNAME/python \
-	install
-find $DESTDIR -type f -name "*.la" -delete
+	sed -i -e '/SUBDIRS/ s/tests//' python/Makefile.am
+	autoreconf -vif
+	CC="$CC" \
+	CFLAGS="$CFLAGS" \
+	LDFLAGS="$LDFLAGS" \
+	LIBS="$LIBS" \
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix= \
+		--docdir=/share/doc/$PKGNAME \
+		--with-html-dir=/share/doc/$PKGNAME/html \
+		--with-html-subdir="" \
+		--enable-shared \
+		$with_icu \
+		$with_lzma \
+		$with_python \
+		$with_zlib
+	make
+	make \
+		DESTDIR=$DESTDIR \
+		DOC_MODULE=$PKGNAME \
+		docsdir=/share/doc/$PKGNAME/python \
+		install
+	find $DESTDIR -type f -name "*.la" -delete
 
-cd ..
-rm -rf $PKGNAME-$PKGVERSION
+	cd ..
+	rm -rf $PKGNAME-$PKGVERSION
+}