98ecdd1d11
zerofree is a utility which scans the free blocks in an ext2 filesystem and fills any non-zero blocks with zeroes. https://frippery.org/uml/ The ext2fs/ext2fs.h header guards the inclusion of <sys/types.h> behind HAVE_SYS_TYPES_H, which is an autotools-defined macro that is only supposed to be defined by the package itself, i.e. e2fsprogs, and that should not leak into installed headers. However, e2fsprogs does leak it, so we work it around, liek gentoo does. Tested-by: Julien Olivain <ju.o@free.fr> Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> [yann.morin.1998@free.fr: - fix MMU dependency for comment; reword comment - fix multi-line assignment of ZEROFREE_CFLAGS - do not add comment trailing after assignment - extend commit log to explain why we need the workaround - use TARGET_CONFIGURE_OPTS, drop explicit CC= - install to explicit destination file ] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
29 lines
815 B
Makefile
29 lines
815 B
Makefile
################################################################################
|
|
#
|
|
# zerofree
|
|
#
|
|
################################################################################
|
|
|
|
ZEROFREE_VERSION = 1.1.1
|
|
ZEROFREE_SOURCE = zerofree-$(ZEROFREE_VERSION).tgz
|
|
ZEROFREE_SITE = https://frippery.org/uml
|
|
ZEROFREE_LICENSE = GPL-2.0
|
|
ZEROFREE_LICENSE_FILE = COPYING
|
|
ZEROFREE_DEPENDENCIES = e2fsprogs
|
|
|
|
# We use the same workaround as in https://bugs.gentoo.org/716136
|
|
# to build with musl.
|
|
ZEROFREE_CFLAGS = \
|
|
$(TARGET_CFLAGS) \
|
|
$(if $(BR2_TOOLCHAIN_USES_MUSL),-DHAVE_SYS_TYPES_H)
|
|
|
|
define ZEROFREE_BUILD_CMDS
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) CFLAGS="$(ZEROFREE_CFLAGS)" -C $(@D)
|
|
endef
|
|
|
|
define ZEROFREE_INSTALL_TARGET_CMDS
|
|
$(INSTALL) -D -m 0755 $(@D)/zerofree $(TARGET_DIR)/usr/bin/zerofree
|
|
endef
|
|
|
|
$(eval $(generic-package))
|