Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unifdef: add package #25341

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions devel/unifdef/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
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 <[email protected]>
PKG_LICENSE:=BSD-2-clause

PKG_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
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))