kumquat-buildroot/package/quota/quota.mk
Bernd Kuhls 0d592e6fe8 package/quota: add optional support for e2fsprogs
When e2fsprogs was compiled before, quota will use it as optional
dependency:

$ output/host/usr/bin/x86_64-linux-readelf -a output/target/usr/sbin/quotacheck | grep NEEDED | sort
 0x0000000000000001 (NEEDED)             Shared library: [libcom_err.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libext2fs.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [libintl.so.8]

Quote from configure log before this patch when e2fsprogs were missing:

checking ext2fs/ext2fs.h usability... no
checking ext2fs/ext2fs.h presence... no
checking for ext2fs/ext2fs.h... no
checking for com_err in -lcom_err... no
checking for ext2fs_initialize in -lext2fs... no
configure: WARNING: Ext2 direct support won't be compiled. Libraries not found.

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-02-21 14:39:46 +01:00

44 lines
1.2 KiB
Makefile

################################################################################
#
# quota
#
################################################################################
QUOTA_VERSION = 4.01
QUOTA_SITE = http://downloads.sourceforge.net/project/linuxquota/quota-tools/$(QUOTA_VERSION)
QUOTA_DEPENDENCIES = host-gettext
QUOTA_AUTORECONF = YES
QUOTA_LICENSE = GPLv2+
QUOTA_CONF_OPTS = --disable-strip-binaries
QUOTA_CFLAGS = $(TARGET_CFLAGS)
ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
QUOTA_DEPENDENCIES += gettext
QUOTA_LIBS += -lintl
endif
ifeq ($(BR2_PACKAGE_E2FSPROGS),y)
QUOTA_DEPENDENCIES += e2fsprogs
QUOTA_CONF_OPTS += --enable-ext2direct
else
QUOTA_CONF_OPTS += --disable-ext2direct
endif
ifeq ($(BR2_PACKAGE_LIBTIRPC),y)
QUOTA_DEPENDENCIES += libtirpc host-pkgconf
QUOTA_CFLAGS += `$(PKG_CONFIG_HOST_BINARY) --cflags libtirpc`
QUOTA_LIBS += `$(PKG_CONFIG_HOST_BINARY) --libs libtirpc`
endif
QUOTA_MAKE_OPTS = $(TARGET_CONFIGURE_OPTS) CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LIBS="$(QUOTA_LIBS)"
QUOTA_CONF_ENV = \
CFLAGS="$(QUOTA_CFLAGS) -D_GNU_SOURCE" LIBS="$(QUOTA_LIBS)"
# Package uses autoconf but not automake.
QUOTA_INSTALL_TARGET_OPTS = \
ROOTDIR=$(TARGET_DIR) \
install
$(eval $(autotools-package))