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.

64 lines
1.8 KiB

  1. #
  2. # Copyright (C) 2019 Banglang Huang <banglang.huang@foxmail.com>
  3. # Copyright (C) 2019 Rosy Song <rosysong@rosinson.com>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=log4cplus
  10. PKG_VERSION:=2.0.3
  11. PKG_RELEASE:=2
  12. PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  14. PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/
  15. PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73
  16. PKG_LICENSE_FILES:=LICENSE
  17. CMAKE_INSTALL:=1
  18. include $(INCLUDE_DIR)/package.mk
  19. include $(INCLUDE_DIR)/host-build.mk
  20. include $(INCLUDE_DIR)/cmake.mk
  21. define Package/log4cplus
  22. SECTION:=libs
  23. CATEGORY:=Libraries
  24. TITLE:=A simple to use C++ logging API
  25. URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
  26. DEPENDS:=+libstdcpp
  27. endef
  28. define Package/log4cplus/description
  29. log4cplus is a simple to use C++11 logging API providing thread--safe,
  30. flexible, and arbitrarily granular control over log management and
  31. configuration. It is modeled after the Java log4j API.
  32. endef
  33. TARGET_CFLAGS += -flto
  34. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  35. CMAKE_OPTIONS += \
  36. -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
  37. -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
  38. -DUNICODE:BOOL=OFF \
  39. -DWITH_ICONV:BOOL=OFF
  40. define Build/InstallDev
  41. $(INSTALL_DIR) $(1)/usr/include
  42. $(CP) $(PKG_INSTALL_DIR)/usr/include/log4cplus $(1)/usr/include/
  43. $(INSTALL_DIR) $(1)/usr/lib
  44. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
  45. endef
  46. define Package/log4cplus/install
  47. $(INSTALL_DIR) $(1)/usr/lib
  48. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
  49. endef
  50. $(eval $(call HostBuild))
  51. $(eval $(call BuildPackage,log4cplus))