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.

62 lines
1.7 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.7
  11. PKG_RELEASE:=$(AUTORELEASE)
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=@SF/$(PKG_NAME)
  14. PKG_HASH:=8f74a0a5920ba044b24e2ebeb0f1e5e36d85d5c23ed48d9fe328882b16130db8
  15. PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
  16. PKG_LICENSE:=BSD-2-Clause Apache-2.0
  17. PKG_LICENSE_FILES:=LICENSE
  18. CMAKE_INSTALL:=1
  19. include $(INCLUDE_DIR)/package.mk
  20. include $(INCLUDE_DIR)/host-build.mk
  21. include $(INCLUDE_DIR)/cmake.mk
  22. define Package/log4cplus
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=A simple to use C++ logging API
  26. URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
  27. DEPENDS:=+libstdcpp
  28. endef
  29. define Package/log4cplus/description
  30. log4cplus is a simple to use C++11 logging API providing thread--safe,
  31. flexible, and arbitrarily granular control over log management and
  32. configuration. It is modeled after the Java log4j API.
  33. endef
  34. OPTIONS:= \
  35. -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
  36. -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
  37. -DLOG4CPLUS_ENABLE_DECORATED_LIBRARY_NAME:BOOL=OFF \
  38. -DUNICODE:BOOL=OFF \
  39. -DWITH_ICONV:BOOL=OFF
  40. CMAKE_HOST_OPTIONS += $(OPTIONS) -DBUILD_SHARED_LIBS=OFF
  41. CMAKE_OPTIONS += $(OPTIONS) -DBUILD_SHARED_LIBS=ON
  42. TARGET_CFLAGS += -flto
  43. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  44. define Package/log4cplus/install
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
  47. endef
  48. $(eval $(call BuildPackage,log4cplus))
  49. $(eval $(call HostBuild))