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

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=fbthrift
  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/fbthrift/tar.gz/v$(PKG_VERSION)?
  7. PKG_HASH:=91403f96a8dc49bc25791fe2836587e644d3e96c55b08e7dfe8bb0075c45a472
  8. PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
  9. PKG_LICENSE:=Apache-2.0
  10. PKG_LICENSE_FILES:=LICENSE
  11. HOST_BUILD_DEPENDS:=boost/host
  12. PKG_BUILD_DEPENDS:=fbthrift/host
  13. HOST_BUILD_PARALLEL:=1
  14. PKG_BUILD_PARALLEL:=1
  15. CMAKE_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. include $(INCLUDE_DIR)/host-build.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/fbthrift
  20. SECTION:=libs
  21. CATEGORY:=Libraries
  22. TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
  23. URL:=https://github.com/facebook/fbthrift
  24. DEPENDS:=+libfmt +libwangle +librsocket-cpp
  25. endef
  26. define Package/fbthrift/description
  27. Facebook's branch of Apache Thrift, including a new C++ server.
  28. endef
  29. CMAKE_HOST_OPTIONS += \
  30. -DBUILD_SHARED_LIBS=ON \
  31. -DCMAKE_SKIP_RPATH=OFF \
  32. -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" \
  33. -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
  34. -Dcompiler_only=ON
  35. CMAKE_OPTIONS += \
  36. -DBUILD_SHARED_LIBS=ON \
  37. -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
  38. -DCXX_STD=c++14 \
  39. -Dlib_only=ON \
  40. -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/" \
  41. -Dpython-six_DIR=OFF
  42. TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
  43. TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
  44. define Package/fbthrift/install
  45. $(INSTALL_DIR) $(1)/usr/lib
  46. $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
  47. endef
  48. $(eval $(call BuildPackage,fbthrift))
  49. $(eval $(call HostBuild))