From: Daniel Golle Date: Thu, 14 Nov 2024 03:42:48 +0000 (+0000) Subject: unifdef: add package X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=2697c6e6205772df8559580080912400a54c5285;p=feed%2Fpackages.git unifdef: add package The unifdef utility selectively processes conditional C preprocessor #if and #ifdef directives. It is required to build WebKit ports. Signed-off-by: Daniel Golle --- diff --git a/devel/unifdef/Makefile b/devel/unifdef/Makefile new file mode 100644 index 0000000000..a0eceef35f --- /dev/null +++ b/devel/unifdef/Makefile @@ -0,0 +1,49 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=unifdef +PKG_VERSION:=2.12 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://dotat.at/prog/$(PKG_NAME) +PKG_HASH:=fba564a24db7b97ebe9329713ac970627b902e5e9e8b14e19e024eb6e278d10b + +PKG_MAINTAINER:=Daniel Golle +PKG_LICENSE:=BSD-2-clause + +PKG_HOST_ONLY:=1 +HOST_BUILD_PARALLEL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk + +define Package/unifdef + SECTION:=devel + CATEGORY:=Development + TITLE:=selectively remove C preprocessor conditionals + URL:=https://dotat.at/prog/unifdef + BUILDONLY:=1 +endef + +define Package/unifdef/description + The unifdef utility selectively processes conditional C preprocessor #if and + #ifdef directives. It removes from a file both the directives and the + additional text that they delimit, while otherwise leaving the file alone. +endef + +define Host/Install + $(INSTALL_DIR) $(1)/bin + $(INSTALL_BIN) $(HOST_BUILD_DIR)/unifdef $(1)/bin +endef + +define Host/Uninstall + $(RM) $(1)/bin/unifdef +endef + +define Package/unifdef/install + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/unifdef $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,unifdef)) +$(eval $(call HostBuild))