comparison core/util-linux/util-linux.sh @ 129:f55c9ef41a9a

vanilla: multiple fixes
author David Demelier <markand@malikania.fr>
date Sun, 10 Mar 2019 16:16:54 +0100
parents 5511fb992e74
children e737b80da269
comparison
equal deleted inserted replaced
128:fbebcfd7991c 129:f55c9ef41a9a
17 17
18 : ${CHOST:=$(uname -m)-linux-musl} 18 : ${CHOST:=$(uname -m)-linux-musl}
19 : ${CBUILD:=$(uname -m)-linux-musl} 19 : ${CBUILD:=$(uname -m)-linux-musl}
20 : ${CC:=gcc} 20 : ${CC:=gcc}
21 : ${CFLAGS:=-O2} 21 : ${CFLAGS:=-O2}
22 : ${NLS:=yes}
23 : ${PYTHON:=yes}
22 24
23 source ./util-linux.info 25 source ./util-linux.info
24 26
25 set -ex 27 set -ex
26 28
27 if [ "${BASHCMP:-yes}" = "no" ]; then 29 if [ "$NLS" = "yes" ]; then
28 with_bash="--disable-bash-completion" 30 with_nls="--enable-nls"
29 else 31 else
30 with_bash="--enable-bash-completion" 32 with_nls="--disable-nls"
31 fi 33 fi
32 if [ "${NLS:-yes}" = "no" ]; then 34 if [ "$PYTHON" = "yes" ]; then
33 with_nls="--disable-nls" 35 with_python="--with-python=3"
34 else 36 else
35 with_nls="--enable-nls"
36 fi
37 if [ "${PYTHON:-yes}" = "no" ]; then
38 with_python="--without-python" 37 with_python="--without-python"
39 else
40 with_python="--with-python=3"
41 fi 38 fi
42 39
43 rm -rf $PKGNAME-$PKGVERSION 40 rm -rf $PKGNAME-$PKGVERSION
44 tar xvaf $PKGNAME-$PKGVERSION.tar.xz 41 tar xvaf $PKGNAME-$PKGVERSION.tar.xz
45 pushd $PKGNAME-$PKGVERSION 42 pushd $PKGNAME-$PKGVERSION
47 CC="$CC" \ 44 CC="$CC" \
48 CFLAGS="$CFLAGS" \ 45 CFLAGS="$CFLAGS" \
49 ./configure \ 46 ./configure \
50 --build=$CBUILD \ 47 --build=$CBUILD \
51 --host=$CHOST \ 48 --host=$CHOST \
49 --bindir=/usr/bin \
50 --disable-static \
51 --disable-su \
52 --enable-shared \
53 --enable-usrdir-path \
54 --enable-vipw \
55 --libdir=/usr/lib \
52 --prefix=/usr \ 56 --prefix=/usr \
53 --libdir=/usr/lib \
54 --bindir=/usr/bin \
55 --sbindir=/usr/sbin \ 57 --sbindir=/usr/sbin \
56 --disable-static \
57 --enable-shared \
58 --enable-vipw \
59 --without-systemd \ 58 --without-systemd \
60 --enable-usrdir-path \
61 ${with_bash} \
62 ${with_nls} \ 59 ${with_nls} \
63 ${with_python} 60 ${with_python}
64 make 61 make
65 make install DESTDIR=$DESTDIR 62 make install DESTDIR=$DESTDIR
66 rm -f $DESTDIR/usr/lib/lib{fdisk,smartcols,mount,blkid,uuid}.la 63 rm -f $DESTDIR/usr/lib/lib{fdisk,smartcols,mount,blkid,uuid}.la