From 3d565d0efe48e8f43d675edd839bd2bd80e95f33 Mon Sep 17 00:00:00 2001 From: BangLang Huang Date: Thu, 12 Oct 2017 16:37:55 +0800 Subject: [PATCH] log4cplus: add new package log4cplus is a simple to use C++11 logging API providing thread--safe, flexible, and arbitrarily granular control over log management and configuration. It is modeled after the Java log4j API. wiki: https://sourceforge.net/p/log4cplus/wiki/Home/ github: https://github.com/log4cplus/log4cplus Signed-off-by: BangLang Huang --- libs/log4cplus/Makefile | 64 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 libs/log4cplus/Makefile diff --git a/libs/log4cplus/Makefile b/libs/log4cplus/Makefile new file mode 100644 index 000000000..9167da74f --- /dev/null +++ b/libs/log4cplus/Makefile @@ -0,0 +1,64 @@ +# +# Copyright (C) 2019 Banglang Huang +# Copyright (C) 2019 Rosy Song +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=log4cplus +PKG_VERSION:=2.0.3 +PKG_RELEASE:=1 +PKG_MAINTAINER:=BangLang Huang , Rosy Song + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz +PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/ +PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73 + +PKG_LICENSE_FILE:=LICENSE +CMAKE_INSTALL:=1 + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/host-build.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/log4cplus + SECTION:=libs + CATEGORY:=Libraries + TITLE:=A simple to use C++ logging API + URL:=https://sourceforge.net/p/log4cplus/wiki/Home/ + DEPENDS:=+libstdcpp +endef + +define Package/log4cplus/description + log4cplus is a simple to use C++11 logging API providing thread--safe, + flexible, and arbitrarily granular control over log management and + configuration. It is modeled after the Java log4j API. +endef + +TARGET_CFLAGS += -flto + +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed + +CMAKE_OPTIONS += \ + -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \ + -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \ + -DUNICODE:BOOL=OFF \ + -DWITH_ICONV:BOOL=OFF + +define Build/InstallDev + $(INSTALL_DIR) $(1)/usr/include + $(CP) $(PKG_INSTALL_DIR)/usr/include/log4cplus $(1)/usr/include/ + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib +endef + +define Package/log4cplus/install + $(INSTALL_DIR) $(1)/usr/lib + $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib +endef + +$(eval $(call HostBuild)) +$(eval $(call BuildPackage,log4cplus))