diff options
author | Tianling Shen <cnsztl@immortalwrt.org> | 2023-05-22 12:29:27 +0800 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2023-05-24 06:03:22 +0300 |
commit | abfe6272cd7dbb04f3cdc884eaf9febe3a96fe16 (patch) | |
tree | 79080534c7711410edd1a18b366ee7b6a941d185 | |
parent | ea3063826112c8e64f22f0ad902a2a798e3a9a55 (diff) |
inih: add new package
It's required by next xfsprogs update.
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
-rw-r--r-- | libs/inih/Makefile | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/libs/inih/Makefile b/libs/inih/Makefile new file mode 100644 index 000000000..c499b22ac --- /dev/null +++ b/libs/inih/Makefile @@ -0,0 +1,75 @@ +include $(TOPDIR)/rules.mk + +PKG_NAME:=inih +PKG_VERSION:=r56 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=https://codeload.github.com/benhoyt/inih/tar.gz/$(PKG_VERSION)? +PKG_HASH:=4f2ba6bd122d30281a8c7a4d5723b7af90b56aa828c0e88256d7fceda03a491a + +PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org> +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE.txt + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/meson.mk + +define Package/libinih/Default + SECTION:=libs + CATEGORY:=Libraries + URL:=https://github.com/benhoyt/inih +endef + +define Package/libinih + $(call Package/libinih/Default) + TITLE:=Simple .INI file parser in C +endef + +define Package/libinireader + $(call Package/libinih/Default) + TITLE:=C++ library and API for inih + DEPENDS:=+libinih +libstdcpp +endef + +define Package/libinih/description + inih (INI Not Invented Here) is a simple .INI file parser written + in C. It's only a couple of pages of code, and it was designed to + be small and simple, so it's good for embedded systems. It's also + more or less compatible with Python's ConfigParser style of .INI + files, including RFC 822-style multi-line syntax and name: value + entries. +endef + +Package/libinireader/description = $(Package/libinih/description) + +MESON_ARGS += \ + -Ddefault_library=both \ + -Ddistro_install=true \ + -Dwith_INIReader=true \ + -Dmulti-line_entries=true \ + -Dutf-8_bom=true \ + -Dinline_comments=true \ + -Duse_heap=false + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/{ini,INIReader}.h $(1)/usr/include + $(INSTALL_DIR) $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/{inih,INIReader}.pc $(1)/usr/lib/pkgconfig + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{inih,INIReader}.a $(1)/usr/lib/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib{inih,INIReader}.so* $(1)/usr/lib/ +endef + +define Package/libinih/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libinih.so* $(1)/usr/lib/ +endef + +define Package/libinireader/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/libINIReader.so* $(1)/usr/lib/ +endef + +$(eval $(call BuildPackage,libinih)) +$(eval $(call BuildPackage,libinireader)) |