fbthrift: Update to 2019.10.07.00
authorRosen Penev <rosenp@gmail.com>
Mon, 7 Oct 2019 17:54:24 +0000 (10:54 -0700)
committerRosen Penev <rosenp@gmail.com>
Tue, 8 Oct 2019 21:48:51 +0000 (14:48 -0700)
Added patch to remove boost-thread dependency.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry-picked from dbfea329d31ca699b3a5cbde311c59bde2473832)

libs/fbthrift/Makefile
libs/fbthrift/patches/010-boost.patch [deleted file]
libs/fbthrift/patches/010-no-boost-thread.patch [new file with mode: 0644]
libs/fbthrift/patches/020-compiler.patch [new file with mode: 0644]

index d21b6dcd13cdf6f163e5c9b372a32b4023aae93c..3ea2999f32b9914bc9983d041a7a57e05e4f7e68 100644 (file)
@@ -1,22 +1,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=fbthrift
-PKG_SOURCE_DATE:=2019-09-22
-PKG_SOURCE_VERSION:=2f9839604e2569120cc4876c667388da6d7342f2
+PKG_VERSION:=2019.10.07.00
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_DATE).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/$(PKG_SOURCE_VERSION)?
-PKG_HASH:=339a73610ad19070d33151127966aaf56e5df3640c238292fc74658c3075da3a
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_SOURCE_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://codeload.github.com/facebook/fbthrift/tar.gz/v$(PKG_VERSION)?
+PKG_HASH:=91403f96a8dc49bc25791fe2836587e644d3e96c55b08e7dfe8bb0075c45a472
 
 PKG_MAINTAINER:=Amol Bhave <ambhave@fb.com>
 PKG_LICENSE:=Apache-2.0
 PKG_LICENSE_FILES:=LICENSE
 
-HOST_BUILD_DEPENDS:=libmstch/host
-PKG_BUILD_DEPENDS:=fbthrift/host libwangle librsocket-cpp
+HOST_BUILD_DEPENDS:=boost/host
+PKG_BUILD_DEPENDS:=fbthrift/host
 
 HOST_BUILD_PARALLEL:=1
 PKG_BUILD_PARALLEL:=1
@@ -31,7 +28,7 @@ define Package/fbthrift
   CATEGORY:=Libraries
   TITLE:=Facebook's branch of Apache Thrift, including a new C++ server.
   URL:=https://github.com/facebook/fbthrift
-  DEPENDS:=+libfmt +libfolly
+  DEPENDS:=+libfmt +libwangle +librsocket-cpp
 endef
 
 define Package/fbthrift/description
@@ -42,25 +39,24 @@ CMAKE_HOST_OPTIONS += \
        -DBUILD_SHARED_LIBS=ON \
        -DCMAKE_SKIP_RPATH=OFF \
        -DCMAKE_INSTALL_RPATH="${STAGING_DIR_HOSTPKG}/lib" \
+       -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON \
        -Dcompiler_only=ON
 
 CMAKE_OPTIONS += \
+       -DBUILD_SHARED_LIBS=ON \
        -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
        -DCXX_STD=c++14 \
        -Dlib_only=ON \
-       -DTHRIFT1="$(STAGING_DIR_HOSTPKG)/bin/thrift1" \
        -DTHRIFT_COMPILER_INCLUDE="$(STAGING_DIR_HOSTPKG)/include/" \
        -Dpython-six_DIR=OFF
 
-# This should not be necessary as it is supposed to be done above.
-# Someone broke something.
-HOST_LDFLAGS += -Wl,-rpath="$(STAGING_DIR_HOSTPKG)/lib"
-
-# GCC9 bug
-TARGET_LDFLAGS += -fno-lto
-
-TARGET_CFLAGS += -ffunction-sections -fdata-sections
+TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
 TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
 
+define Package/fbthrift/install
+       $(INSTALL_DIR) $(1)/usr/lib
+       $(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
+endef
+
 $(eval $(call BuildPackage,fbthrift))
 $(eval $(call HostBuild))
diff --git a/libs/fbthrift/patches/010-boost.patch b/libs/fbthrift/patches/010-boost.patch
deleted file mode 100644 (file)
index a393683..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -44,7 +44,11 @@ endif(MSVC)
- find_package(
-   Boost 1.54.0 REQUIRED #1.54.0 or greater
-   COMPONENTS
-+    context
-+    date_time
-     filesystem
-+    program_options
-+    regex
-     system
-     thread
- )
diff --git a/libs/fbthrift/patches/010-no-boost-thread.patch b/libs/fbthrift/patches/010-no-boost-thread.patch
new file mode 100644 (file)
index 0000000..cf7a4dd
--- /dev/null
@@ -0,0 +1,10 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -49,7 +49,6 @@ find_package(
+     program_options
+     regex
+     system
+-    thread
+ )
+ include_directories(${Boost_INCLUDE_DIRS})
diff --git a/libs/fbthrift/patches/020-compiler.patch b/libs/fbthrift/patches/020-compiler.patch
new file mode 100644 (file)
index 0000000..b1182dd
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/thrift/cmake/FBThriftConfig.cmake.in
++++ b/thrift/cmake/FBThriftConfig.cmake.in
+@@ -20,7 +20,7 @@ set_and_check(FBTHRIFT_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
+ if (WIN32)
+   set_and_check(FBTHRIFT_COMPILER "@PACKAGE_BIN_INSTALL_DIR@/thrift1.exe")
+ else()
+-  set_and_check(FBTHRIFT_COMPILER "@PACKAGE_BIN_INSTALL_DIR@/thrift1")
++#  set_and_check(FBTHRIFT_COMPILER "@PACKAGE_BIN_INSTALL_DIR@/thrift1")
+ endif()
+ if (NOT TARGET FBThrift::thriftcpp2)