b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | # |
| 2 | # Copyright (C) 2019 Daniel Engberg <daniel.engberg.lists@pyret.net> |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | include $(TOPDIR)/rules.mk |
| 9 | |
| 10 | PKG_NAME:=jsoncpp |
| 11 | PKG_VERSION:=1.9.5 |
| 12 | PKG_RELEASE:=1 |
| 13 | |
| 14 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 15 | PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)? |
| 16 | PKG_HASH:=f409856e5920c18d0c2fb85276e24ee607d2a09b5e7d5f0a371368903c275da2 |
| 17 | |
| 18 | PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com> |
| 19 | PKG_LICENSE:=MIT |
| 20 | PKG_LICENSE_FILES:=LICENSE |
| 21 | PKG_CPE_ID:=cpe:/a:jsoncpp_project:jsoncpp |
| 22 | |
| 23 | include $(INCLUDE_DIR)/package.mk |
| 24 | include $(INCLUDE_DIR)/meson.mk |
| 25 | |
| 26 | define Package/jsoncpp |
| 27 | SECTION:=libs |
| 28 | CATEGORY:=Libraries |
| 29 | TITLE:=jsoncpp |
| 30 | URL:=https://github.com/open-source-parsers/jsoncpp |
| 31 | DEPENDS:=+libstdcpp |
| 32 | endef |
| 33 | |
| 34 | define Package/jsoncpp/description |
| 35 | JsonCpp is a C++ library that allows manipulating |
| 36 | JSON values, including serialization and |
| 37 | deserialization to and from strings. It can also |
| 38 | preserve existing comment in |
| 39 | unserialization/serialization steps, making it a |
| 40 | convenient format to store user input files. |
| 41 | endef |
| 42 | |
| 43 | MESON_ARGS += \ |
| 44 | -Db_lto=true \ |
| 45 | -Dtests=false |
| 46 | |
| 47 | TARGET_LDFLAGS += -Wl,--gc-sections |
| 48 | |
| 49 | define Build/InstallDev |
| 50 | $(INSTALL_DIR) $(1)/usr/include |
| 51 | $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/ |
| 52 | $(INSTALL_DIR) $(1)/usr/lib |
| 53 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/ |
| 54 | $(INSTALL_DIR) $(1)/usr/lib/pkgconfig |
| 55 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/ |
| 56 | endef |
| 57 | |
| 58 | define Package/jsoncpp/install |
| 59 | $(INSTALL_DIR) $(1)/usr/lib/ |
| 60 | $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/ |
| 61 | endef |
| 62 | |
| 63 | $(eval $(call BuildPackage,jsoncpp)) |