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
2.1 KiB

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