Skip to content

Apache DataFusion SQL Query Engine

ARROW-11293: [C++] Don't require Boost and gflags with find_package(Arrow)

Sutou Kouhei1f7209ef984f
diff --git a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-bionic/Dockerfile b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-bionic/Dockerfile
index f0596ced9d..79292cb762 100644
--- a/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-bionic/Dockerfile
+++ b/dev/tasks/linux-packages/apache-arrow/apt/ubuntu-bionic/Dockerfile
@@ -68,6 +68,15 @@ RUN \
rapidjson-dev \
tzdata \
zlib1g-dev && \
+ (echo "includedir=/usr/include" && \
+ echo "libdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" && \
+ echo "" && \
+ echo "Name: re2" && \
+ echo "Description: RE2 is a fast, safe, thread-friendly regular expression engine." && \
+ echo "Version: 0.0.0" && \
+ echo "Cflags: -std=c++11 -pthread -I\${includedir}" && \
+ echo "Libs: -pthread -L\${libdir} -lre2") | \
+ tee "/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/pkgconfig/re2.pc" && \
if apt list | grep '^nvidia-cuda-toolkit/'; then \
apt install -y -V ${quiet} nvidia-cuda-toolkit; \
fi && \
diff --git a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control
index 64fdbf11f5..c9734f9c27 100644
--- a/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control
+++ b/dev/tasks/linux-packages/apache-arrow/debian.ubuntu-xenial/control
@@ -16,7 +16,6 @@ Build-Depends:
libbrotli-dev,
libbz2-dev,
libcurl4-openssl-dev,
- libgflags-dev,
libgirepository1.0-dev,
libgoogle-glog-dev,
liblz4-dev,
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/control.in b/dev/tasks/linux-packages/apache-arrow/debian/control.in
index 3c1166992c..e032c8b488 100644
--- a/dev/tasks/linux-packages/apache-arrow/debian/control.in
+++ b/dev/tasks/linux-packages/apache-arrow/debian/control.in
@@ -14,7 +14,6 @@ Build-Depends:
libbrotli-dev,
libbz2-dev,
libcurl4-openssl-dev,
- libgflags-dev,
libgirepository1.0-dev,
libgoogle-glog-dev,
libgtest-dev,
diff --git a/dev/tasks/linux-packages/apache-arrow/debian/rules b/dev/tasks/linux-packages/apache-arrow/debian/rules
index 760687be24..2adf2add08 100755
--- a/dev/tasks/linux-packages/apache-arrow/debian/rules
+++ b/dev/tasks/linux-packages/apache-arrow/debian/rules
@@ -21,11 +21,6 @@ override_dh_auto_configure:
ARROW_CUDA=OFF; \
ARROW_PLASMA=OFF; \
fi; \
- if pkg-config --exists re2; then \
- ARROW_RE2_SOURCE=; \
- else \
- ARROW_RE2_SOURCE=BUNDLED; \
- fi; \
dh_auto_configure \
--sourcedirectory=cpp \
--builddirectory=cpp_build \
@@ -51,8 +46,7 @@ override_dh_auto_configure:
-DCMAKE_UNITY_BUILD=ON \
-DPARQUET_REQUIRE_ENCRYPTION=ON \
-DPythonInterp_FIND_VERSION=ON \
- -DPythonInterp_FIND_VERSION_MAJOR=3 \
- -Dre2_SOURCE=$${ARROW_RE2_SOURCE}
+ -DPythonInterp_FIND_VERSION_MAJOR=3
override_dh_auto_build:
dh_auto_build \
diff --git a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
index 85f20c0f8f..2b00578464 100644
--- a/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
+++ b/dev/tasks/linux-packages/apache-arrow/yum/arrow.spec.in
@@ -234,10 +234,8 @@ This package contains the libraries for Apache Arrow C++.
Summary: Libraries and header files for Apache Arrow C++
License: Apache-2.0
Requires: %{name}-libs = %{version}-%{release}
-Requires: boost%{boost_version}-devel
Requires: brotli-devel
Requires: bzip2-devel
-Requires: gflags-devel
Requires: libzstd-devel
Requires: lz4-devel
Requires: openssl-devel
@@ -268,11 +266,13 @@ Libraries and header files for Apache Arrow C++.
%{_libdir}/cmake/arrow/ArrowConfig*.cmake
%{_libdir}/cmake/arrow/ArrowOptions.cmake
%{_libdir}/cmake/arrow/ArrowTargets*.cmake
-%{_libdir}/cmake/arrow/Find*Alt.cmake
%{_libdir}/cmake/arrow/FindArrow.cmake
%{_libdir}/cmake/arrow/FindBrotli.cmake
%{_libdir}/cmake/arrow/FindLz4.cmake
%{_libdir}/cmake/arrow/FindSnappy.cmake
+%if %{have_re2}
+%{_libdir}/cmake/arrow/Findre2Alt.cmake
+%endif
%if %{have_utf8proc}
%{_libdir}/cmake/arrow/Findutf8proc.cmake
%endif