37a6cd6ec7e426cf52c5db0abe4520d4328361c1
[feed/packages.git] / libs / libfolly / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=libfolly
4 PKG_VERSION:=2019.09.22.00
5 PKG_RELEASE:=1
6
7 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
8 PKG_SOURCE_VERSION:=af2373b9858c61685eb6eb2f1db99d9a31edd58e
9 PKG_SOURCE_URL:=https://codeload.github.com/facebook/folly/tar.gz/$(PKG_SOURCE_VERSION)?
10 PKG_HASH:=fbf25a96e5487fcd959ff50ff1c5413c8e18b8aaa9af3d2406156d750167affd
11 PKG_BUILD_DIR:=$(BUILD_DIR)/folly-$(PKG_SOURCE_VERSION)
12
13 PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
14 PKG_LICENSE:=Apache-2.0
15 PKG_LICENSE_FILES:=LICENSE
16
17 PKG_BUILD_PARALLEL:=1
18 CMAKE_INSTALL:=1
19
20 include $(INCLUDE_DIR)/package.mk
21 include $(INCLUDE_DIR)/cmake.mk
22
23 define Package/libfolly
24 SECTION:=libs
25 CATEGORY:=Libraries
26 TITLE:=An open-source C++ library developed and used at Facebook.
27 URL:=https://github.com/facebook/folly
28 DEPENDS:=+boost +boost-context +boost-date_time +boost-filesystem +boost-program_options +boost-regex \
29 +libopenssl +libdouble-conversion +libevent2 +glog +libsodium +libaio +libatomic \
30 +libbz2 +zlib +libzstd +liblzma +liblz4 +PACKAGE_libunwind:libunwind
31 endef
32
33 define Package/libfolly/description
34 An open-source C++ library developed and used at Facebook.
35 Folly (acronymed loosely after Facebook Open Source Library) is a library of
36 C++14 components designed with practicality and efficiency in mind.
37 Folly contains a variety of core library components used extensively at Facebook.
38 This package includes the shared library.
39 endef
40
41 CMAKE_OPTIONS += \
42 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
43 -DCXX_STD=c++14 \
44 -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE=OFF \
45 -DFOLLY_HAVE_UNALIGNED_ACCESS_EXITCODE__TRYRUN_OUTPUT=OFF \
46 -DFOLLY_HAVE_LINUX_VDSO_EXITCODE=OFF \
47 -DFOLLY_HAVE_LINUX_VDSO_EXITCODE__TRYRUN_OUTPUT=OFF \
48 -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE=OFF \
49 -DFOLLY_HAVE_WCHAR_SUPPORT_EXITCODE__TRYRUN_OUTPUT=OFF \
50 -DHAVE_VSNPRINTF_ERRORS_EXITCODE=OFF \
51 -DHAVE_VSNPRINTF_ERRORS_EXITCODE__TRYRUN_OUTPUT=OFF \
52 -DBUILD_SHARED_LIBS=ON
53
54 TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
55 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
56
57 define Package/libfolly/install
58 $(INSTALL_DIR) $(1)/usr/lib
59 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfolly*.so* $(1)/usr/lib/
60 endef
61
62 $(eval $(call BuildPackage,libfolly))