changeset 85:23a0cb054ba8

core/acl: add NLS option and cleanup
author David Demelier <markand@malikania.fr>
date Thu, 07 Mar 2019 20:19:00 +0100
parents 91dce8ec3969
children b00538982dce
files core/acl/acl.info core/acl/acl.sh
diffstat 2 files changed, 26 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/core/acl/acl.info	Thu Mar 07 20:10:00 2019 +0100
+++ b/core/acl/acl.info	Thu Mar 07 20:19:00 2019 +0100
@@ -21,4 +21,9 @@
 PKGLICENSE="GPLv2+"
 PKGSUMMARY="ACL utilities and libraries"
 PKGDOWNLOAD="https://download.savannah.gnu.org/releases/$PKGNAME/$PKGNAME-$PKGVERSION.tar.gz"
-PKGDEPENDS="system/attr"
+PKGDEPENDS="core/attr"
+PKGOPTIONS="NLS"
+
+if [ "${NLS:-yes}" = "yes" ]; then
+	PKGDEPENDS="core/gettext $PKGDEPENDS"
+fi
--- a/core/acl/acl.sh	Thu Mar 07 20:10:00 2019 +0100
+++ b/core/acl/acl.sh	Thu Mar 07 20:19:00 2019 +0100
@@ -15,24 +15,34 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
+: ${CHOST:=$(uname -m)-linux-musl}
+: ${CBUILD:=$(uname -m)-linux-musl}
+: ${CC:=gcc}
+: ${CFLAGS:=-O2}
+
 source ./acl.info
 
-case $(uname -m) in
-x86_64)
-	CFLAGS="-O2 -fPIC"
-	;;
-*)
-	CFLAGS="-O2"
-	;;
-esac
+set -ex
 
-set -e
+if [ "${NLS:-yes}" = "no" ]; then
+	with_nls="--disable-nls"
+else
+	with_nls="--enable-nls"
+fi
 
 rm -rf $PKGNAME-$PKGVERSION
 tar xvaf $PKGNAME-$PKGVERSION.tar.gz
 pushd $PKGNAME-$PKGVERSION
 
-CFLAGS="$CFLAGS" ./configure --prefix=/usr
+CC="$CC" \
+CFLAGS="$CFLAGS" \
+./configure \
+	--build=$CBUILD \
+	--host=$CHOST \
+	--prefix=/usr \
+	--disable-static \
+	--enable-shared \
+	${with_nls}
 make
 make install DESTDIR=$DESTDIR
 rm -f $DESTDIR/usr/lib/libacl.la