Mercurial > vanilla
changeset 91:c430ad34da57
core/xz: add NLS option and cleanup
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 07 Mar 2019 20:36:00 +0100 |
parents | c00f1a00d2de |
children | 8ca2a0576f25 |
files | core/xz/xz.info core/xz/xz.sh |
diffstat | 2 files changed, 23 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/core/xz/xz.info Thu Mar 07 20:30:00 2019 +0100 +++ b/core/xz/xz.info Thu Mar 07 20:36:00 2019 +0100 @@ -21,3 +21,8 @@ PKGLICENSE="LGPLv21 GPLv2 GPLv3" PKGSUMMARY="XZ and LZMA compression tools" PKGDOWNLOAD="https://tukaani.org/$PKGNAME/$PKGNAME-$PKGVERSION.tar.gz" +PKGOPTIONS="NLS" + +if [ "${NLS:-yes}" = "yes" ]; then + PKGDEPENDS="core/gettext $PKGDEPENDS" +fi
--- a/core/xz/xz.sh Thu Mar 07 20:30:00 2019 +0100 +++ b/core/xz/xz.sh Thu Mar 07 20:36:00 2019 +0100 @@ -15,24 +15,32 @@ # 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 ./xz.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 --disable-static +./configure \ + --build=${CBUILD} \ + --host=${CHOST} \ + --prefix=/usr \ + --disable-static \ + --enable-shared \ + ${with_nls} make make install DESTDIR=$DESTDIR rm -f $DESTDIR/usr/lib/liblzma.la