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.

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