You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
1.8 KiB

  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. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=jsoncpp
  9. PKG_VERSION:=1.9.4
  10. PKG_RELEASE:=3
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://codeload.github.com/open-source-parsers/jsoncpp/tar.gz/$(PKG_VERSION)?
  13. PKG_HASH:=e34a628a8142643b976c7233ef381457efad79468c67cb1ae0b83a33d7493999
  14. PKG_MAINTAINER:=Jan Pavlinec <jan.pavlinec1@gmail.com>
  15. PKG_LICENSE:=MIT
  16. PKG_LICENSE_FILES:=LICENSE
  17. PKG_BUILD_DEPENDS:=meson/host
  18. include $(INCLUDE_DIR)/package.mk
  19. include ../../devel/meson/meson.mk
  20. HOSTCC=$(HOSTCC_NOCACHE)
  21. HOSTCXX=$(HOSTCXX_NOCACHE)
  22. define Package/jsoncpp
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=jsoncpp
  26. URL:=https://github.com/open-source-parsers/jsoncpp
  27. DEPENDS:=+libstdcpp
  28. endef
  29. define Package/jsoncpp/description
  30. JsonCpp is a C++ library that allows manipulating
  31. JSON values, including serialization and
  32. deserialization to and from strings. It can also
  33. preserve existing comment in
  34. unserialization/serialization steps, making it a
  35. convenient format to store user input files.
  36. endef
  37. MESON_ARGS += \
  38. -Db_lto=true \
  39. -Dtests=false
  40. TARGET_LDFLAGS += -Wl,--gc-sections
  41. define Build/InstallDev
  42. $(INSTALL_DIR) $(1)/usr/include
  43. $(CP) $(PKG_INSTALL_DIR)/usr/include/json $(1)/usr/include/
  44. $(INSTALL_DIR) $(1)/usr/lib
  45. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
  46. $(INSTALL_DIR) $(1)/usr/lib/pkgconfig
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/jsoncpp.pc $(1)/usr/lib/pkgconfig/
  48. endef
  49. define Package/jsoncpp/install
  50. $(INSTALL_DIR) $(1)/usr/lib/
  51. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libjsoncpp.so* $(1)/usr/lib/
  52. endef
  53. $(eval $(call BuildPackage,jsoncpp))