libports: mke2fs and resize2fs as standalone apps

This patch makes the e2fsprogs 'mke2fs' and 'resize2fs' available as
standalone components that can be used by Sculpt OS directly without
a Unix emulation environment.
This commit is contained in:
Norman Feske 2020-03-19 13:34:52 +01:00 committed by Christian Helmuth
parent 150d143755
commit 330672e030
4 changed files with 39 additions and 6 deletions

View File

@ -1 +1 @@
caa34f01d1f0afe9d9bd5d6ea2f997e7b86cc4ee
9b9fa07e2adce25d2ca5adf9b80c7fce6a5556fe

View File

@ -22,16 +22,18 @@ DIR_CONTENT($(INCLUDE_DIR)) := \
# Generate header files
#
BLKID_HEADER := $(INCLUDE_DIR)/blkid/blkid.h
EXT2FS_HEADER := $(INCLUDE_DIR)/ext2fs/ext2_types.h
INTL_HEADER := $(INCLUDE_DIR)/libgnuintl.h
UUID_HEADER := $(INCLUDE_DIR)/uuid/uuid.h
BLKID_HEADER := $(INCLUDE_DIR)/blkid/blkid.h
EXT2FS_HEADER := $(INCLUDE_DIR)/ext2fs/ext2_types.h
INTL_HEADER := $(INCLUDE_DIR)/libgnuintl.h
UUID_HEADER := $(INCLUDE_DIR)/uuid/uuid.h
DEFAULT_PROFILE_C := $(addsuffix /misc/default_profile.c, $(E2FSPROGS_DIR))
_dirs: \
$(BLKID_HEADER) \
$(EXT2FS_HEADER) \
$(INTL_HEADER) \
$(UUID_HEADER)
$(UUID_HEADER) \
$(DEFAULT_PROFILE_C)
$(INTL_HEADER):
@$(MSG_GENERATE)$(notdir $@)
@ -88,3 +90,9 @@ $(EXT2FS_HEADER):
< $(E2FSPROGS_DIR)/lib/ext2fs/ext2_types.h.in > $@
@echo '#define HAVE_SYS_TYPES_H 1' >> $@
@echo '#undef WORDS_BIGENDIAN' >> $@
$(DEFAULT_PROFILE_C):
@$(MSG_GENERATE)$(notdir $@)
@gawk -f $(E2FSPROGS_DIR)/misc/profile-to-c.awk \
< $(E2FSPROGS_DIR)/misc/mke2fs.conf.in \
> $@

View File

@ -0,0 +1,15 @@
TARGET := mke2fs
LIBS := posix e2fsprogs
E2FS_DIR := $(addsuffix /src/lib/e2fsprogs, $(call select_from_ports,e2fsprogs-lib))
INC_DIR += $(E2FS_DIR)/e2fsck
CC_DEF += -DROOT_SYSCONFDIR=\"/etc\"
SRC_C := $(addprefix misc/, mke2fs.c util.c default_profile.c)
SRC_C += $(addprefix e2fsck/, profile.c prof_err.c)
vpath %.c $(E2FS_DIR)
CC_CXX_WARN_STRICT =

View File

@ -0,0 +1,10 @@
TARGET := resize2fs
LIBS := posix e2fsprogs
E2FS_DIR := $(addsuffix /src/lib/e2fsprogs, $(call select_from_ports,e2fsprogs-lib))
SRC_C := $(addprefix resize/, extent.c resize2fs.c main.c online.c \
resource_track.c sim_progress.c)
vpath %.c $(E2FS_DIR)
CC_CXX_WARN_STRICT =