Mercurial > vanilla
diff core/attr/attr.sh @ 86:b00538982dce
core/attr: add NLS option and cleanup
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 07 Mar 2019 20:21:00 +0100 |
parents | 0468f47a45ce |
children | e737b80da269 |
line wrap: on
line diff
--- a/core/attr/attr.sh Thu Mar 07 20:19:00 2019 +0100 +++ b/core/attr/attr.sh Thu Mar 07 20:21:00 2019 +0100 @@ -15,24 +15,35 @@ # 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 ./attr.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 --sysconfdir=/etc +CC="$CC" \ +CFLAGS="$CFLAGS" \ +./configure \ + --build=${CBUILD} \ + --host=${CHOST} \ + --prefix=/usr \ + --sysconfdir=/etc \ + --disable-static \ + --enable-shared \ + ${with_nls} make make install DESTDIR=$DESTDIR rm -f $DESTDIR/usr/lib/libattr.la