浏览代码

coreutils: add optionals, use single binary

Add proper support for optional libraries: acl, attr, gmp & libcap.

Also build the single binary as pointed out by Pádraig Brady for some
neat space savings.
Use the shebang (default) method since it allows us to move binaries
into other directories to suit our needs whereas for symlink that
wouldn't be so easy.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Gustavo Zacarias 10 年之前
父节点
当前提交
03f87430e5
共有 1 个文件被更改,包括 25 次插入1 次删除
  1. 25 1
      package/coreutils/coreutils.mk

+ 25 - 1
package/coreutils/coreutils.mk

@@ -20,6 +20,30 @@ ifeq ($(BR2_PACKAGE_BUSYBOX),y)
 COREUTILS_DEPENDENCIES = busybox
 COREUTILS_DEPENDENCIES = busybox
 endif
 endif
 
 
+ifeq ($(BR2_PACKAGE_ACL),y)
+COREUTILS_DEPENDENCIES += acl
+else
+COREUTILS_CONF_OPTS += --disable-acl
+endif
+
+ifeq ($(BR2_PACKAGE_ATTR),y)
+COREUTILS_DEPENDENCIES += attr
+else
+COREUTILS_CONF_OPTS += --disable-xattr
+endif
+
+ifeq ($(BR2_PACKAGE_GMP),y)
+COREUTILS_DEPENDENCIES += gmp
+else
+COREUTILS_CONF_OPTS += --without-gmp
+endif
+
+ifeq ($(BR2_PACKAGE_LIBCAP),y)
+COREUTILS_DEPENDENCIES += libcap
+else
+COREUTILS_CONF_OPTS += --disable-libcap
+endif
+
 COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \
 COREUTILS_BIN_PROGS = cat chgrp chmod chown cp date dd df dir echo false \
 	ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \
 	ln ls mkdir mknod mv pwd rm rmdir vdir sleep stty sync touch true \
 	uname join
 	uname join
@@ -61,7 +85,7 @@ COREUTILS_CONF_ENV = ac_cv_c_restrict=no \
 		utils_cv_localtime_cache=no \
 		utils_cv_localtime_cache=no \
 		PERL=missing
 		PERL=missing
 
 
-COREUTILS_CONF_OPTS = --disable-rpath
+COREUTILS_CONF_OPTS = --disable-rpath --enable-single-binary=shebangs
 
 
 define COREUTILS_POST_INSTALL
 define COREUTILS_POST_INSTALL
 	# some things go in root rather than usr
 	# some things go in root rather than usr