Merge pull request #8518 from neheb/i
[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.3
13 PKG_RELEASE:=2
14 PKG_MAINTAINER:=BangLang Huang <banglang.huang@foxmail.com>, Rosy Song <rosysong@rosinson.com>
15
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_SOURCE_URL:=https://github.com/log4cplus/log4cplus/releases/download/REL_2_0_3/
18 PKG_HASH:=c55742c348d09b33219eea00d65b05bdd78ea967761b980b7134855fe24c5f73
19
20 PKG_LICENSE_FILES:=LICENSE
21 CMAKE_INSTALL:=1
22
23 include $(INCLUDE_DIR)/package.mk
24 include $(INCLUDE_DIR)/host-build.mk
25 include $(INCLUDE_DIR)/cmake.mk
26
27 define Package/log4cplus
28 SECTION:=libs
29 CATEGORY:=Libraries
30 TITLE:=A simple to use C++ logging API
31 URL:=https://sourceforge.net/p/log4cplus/wiki/Home/
32 DEPENDS:=+libstdcpp
33 endef
34
35 define Package/log4cplus/description
36 log4cplus is a simple to use C++11 logging API providing thread--safe,
37 flexible, and arbitrarily granular control over log management and
38 configuration. It is modeled after the Java log4j API.
39 endef
40
41 TARGET_CFLAGS += -flto
42
43 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
44
45 CMAKE_OPTIONS += \
46 -DLOG4CPLUS_BUILD_LOGGINGSERVER:BOOL=OFF \
47 -DLOG4CPLUS_BUILD_TESTING:BOOL=OFF \
48 -DUNICODE:BOOL=OFF \
49 -DWITH_ICONV:BOOL=OFF
50
51 define Build/InstallDev
52 $(INSTALL_DIR) $(1)/usr/include
53 $(CP) $(PKG_INSTALL_DIR)/usr/include/log4cplus $(1)/usr/include/
54 $(INSTALL_DIR) $(1)/usr/lib
55 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
56 endef
57
58 define Package/log4cplus/install
59 $(INSTALL_DIR) $(1)/usr/lib
60 $(CP) $(PKG_INSTALL_DIR)/usr/lib/liblog4cplus*.so* $(1)/usr/lib
61 endef
62
63 $(eval $(call HostBuild))
64 $(eval $(call BuildPackage,log4cplus))