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.

60 lines
2.1 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=libfolly
  3. PKG_VERSION:=2019.10.07.00
  4. PKG_RELEASE:=1
  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:=3c8ab22e551ff73509aa008454d5e15da9a05b64bc20450459c3da2471729fff
  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-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. -DBUILD_SHARED_LIBS=ON \
  34. -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
  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. TARGET_CXXFLAGS += -ffunction-sections -fdata-sections -flto
  44. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  45. define Package/libfolly/install
  46. $(INSTALL_DIR) $(1)/usr/lib
  47. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfolly*.so* $(1)/usr/lib/
  48. endef
  49. $(eval $(call BuildPackage,libfolly))