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