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.2 KiB

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