Skip to content

Commit

Permalink
tools/bzip2: switch to cmake
Browse files Browse the repository at this point in the history
Fixes portability issues on macOS.
CMakeLists.txt is a stripped-down backport from bzip2 upstream

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
nbd168 committed Apr 3, 2024
1 parent 7a78b22 commit 1f3e017
Show file tree
Hide file tree
Showing 3 changed files with 384 additions and 423 deletions.
24 changes: 2 additions & 22 deletions tools/bzip2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,31 +22,11 @@ PKG_CPE_ID:=cpe:/a:bzip:bzip2
HOST_BUILD_PARALLEL:=1

include $(INCLUDE_DIR)/host-build.mk
include $(INCLUDE_DIR)/cmake.mk

HOSTCC := $(HOSTCC_NOCACHE)
HOST_CFLAGS += $(HOST_FPIC)

HOST_MAKE_FLAGS+= \
CFLAGS="$(HOST_CFLAGS)" \
LDFLAGS="$(HOST_LDFLAGS)" \
ENABLE_BIN_SHARED=1 \
ENABLE_BIN_STATIC=0 \
ENABLE_LIB_SHARED=1 \
ENABLE_LIB_STATIC=1 \
ENABLE_DEV=1 \
ENABLE_DOCS=1 \
ENABLE_TESTS=0 \
PREFIX="$(HOST_BUILD_PREFIX)"

define Host/Configure
endef

define Host/Uninstall
$(call Host/Compile/Default,uninstall)
$(call Host/Compile/Default,clean)
endef

define Host/Clean
endef
CMAKE_HOST_OPTIONS += -DENABLE_EXAMPLES=off

$(eval $(call HostBuild))
Loading

0 comments on commit 1f3e017

Please sign in to comment.