Blame SOURCES/0001-cmake.patch

20b247
--- orc-rel-release-1.6.6/c++/src/orcConfig.cmake.orig	2021-09-02 08:12:02.402411800 -0400
20b247
+++ orc-rel-release-1.6.6/c++/src/orcConfig.cmake	2021-09-02 08:11:53.797563660 -0400
20b247
@@ -0,0 +1 @@
20b247
+include("${CMAKE_CURRENT_LIST_DIR}/orcTargets.cmake")
b2a0d9
+++ orc-1.7.3/c++/src/CMakeLists.txt	2022-02-10 14:55:16.260729962 -0500
b2a0d9
@@ -236,15 +236,54 @@
20b247
   add_definitions(-DBUILD_LIBHDFSPP)
20b247
 endif(BUILD_LIBHDFSPP)
20b247
 
20b247
-add_library (orc STATIC ${SOURCE_FILES})
20b247
+add_library (orc SHARED ${SOURCE_FILES})
20b247
+
20b247
+set_target_properties(orc PROPERTIES
20b247
+  POSITION_INDEPENDENT_CODE ON
9a9889
+  VERSION 1.7.5
20b247
+  SOVERSION 1
20b247
+)
20b247
 
20b247
 target_link_libraries (orc
b2a0d9
-  orc::protobuf
b2a0d9
-  orc::zlib
b2a0d9
-  orc::snappy
b2a0d9
-  orc::lz4
b2a0d9
-  orc::zstd
b2a0d9
+  protobuf
b2a0d9
+  z
b2a0d9
+  snappy
b2a0d9
+  lz4
b2a0d9
+  zstd
20b247
   ${LIBHDFSPP_LIBRARIES}
20b247
   )
20b247
 
20b247
-install(TARGETS orc DESTINATION lib)
20b247
+install(TARGETS orc
20b247
+    EXPORT orcExports
20b247
+    DESTINATION ${LIB_INSTALL_DIR})
20b247
+
20b247
+include(CMakePackageConfigHelpers)
20b247
+write_basic_package_version_file(
20b247
+    "${CMAKE_CURRENT_BINARY_DIR}/orcConfigVersion.cmake"
20b247
+    VERSION ${orc_VERSION}
20b247
+    COMPATIBILITY SameMajorVersion
20b247
+    )
20b247
+
20b247
+# A Package Config file that works from the build directory
20b247
+export(EXPORT orcExports
20b247
+    FILE "${CMAKE_CURRENT_BINARY_DIR}/orcTargets.cmake"
20b247
+    NAMESPACE orc::
20b247
+    )
20b247
+configure_file(orcConfig.cmake
20b247
+    "${CMAKE_CURRENT_BINARY_DIR}/orcConfig.cmake"
20b247
+    COPYONLY
20b247
+    )
20b247
+
20b247
+# A Package Config file that works from the installation directory
20b247
+set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/orc)
20b247
+install(EXPORT orcExports
20b247
+    FILE orcTargets.cmake
20b247
+    NAMESPACE orc::
20b247
+    DESTINATION ${ConfigPackageLocation}
20b247
+    )
20b247
+install(FILES
20b247
+    orcConfig.cmake
20b247
+    "${CMAKE_CURRENT_BINARY_DIR}/orcConfigVersion.cmake"
20b247
+    DESTINATION ${ConfigPackageLocation}
20b247
+    )
20b247
+
b2a0d9
--- orc-1.7.3/cmake_modules/ThirdpartyToolchain.cmake.orig	2022-02-10 14:22:42.421782851 -0500
b2a0d9
+++ orc-1.7.3/cmake_modules/ThirdpartyToolchain.cmake	2022-02-10 15:31:26.865802496 -0500
b2a0d9
@@ -10,19 +10,19 @@
b2a0d9
 # See the License for the specific language governing permissions and
b2a0d9
 # limitations under the License.
b2a0d9
 
b2a0d9
-set(LZ4_VERSION "1.9.3")
b2a0d9
-set(SNAPPY_VERSION "1.1.7")
b2a0d9
-set(ZLIB_VERSION "1.2.11")
b2a0d9
-set(GTEST_VERSION "1.8.0")
b2a0d9
-set(PROTOBUF_VERSION "3.5.1")
b2a0d9
-set(ZSTD_VERSION "1.5.2")
b2a0d9
+#set(LZ4_VERSION "1.9.3")
b2a0d9
+#set(SNAPPY_VERSION "1.1.7")
b2a0d9
+#set(ZLIB_VERSION "1.2.11")
b2a0d9
+#set(GTEST_VERSION "1.8.0")
b2a0d9
+#set(PROTOBUF_VERSION "3.5.1")
b2a0d9
+#set(ZSTD_VERSION "1.5.2")
b2a0d9
 
b2a0d9
-option(ORC_PREFER_STATIC_PROTOBUF "Prefer static protobuf library, if available" ON)
b2a0d9
-option(ORC_PREFER_STATIC_SNAPPY   "Prefer static snappy library, if available"   ON)
b2a0d9
-option(ORC_PREFER_STATIC_LZ4      "Prefer static lz4 library, if available"      ON)
b2a0d9
-option(ORC_PREFER_STATIC_ZSTD     "Prefer static zstd library, if available"     ON)
b2a0d9
-option(ORC_PREFER_STATIC_ZLIB     "Prefer static zlib library, if available"     ON)
b2a0d9
-option(ORC_PREFER_STATIC_GMOCK    "Prefer static gmock library, if available"    ON)
b2a0d9
+option(ORC_PREFER_STATIC_PROTOBUF "Prefer static protobuf library, if available" OFF)
b2a0d9
+option(ORC_PREFER_STATIC_SNAPPY   "Prefer static snappy library, if available"   OFF)
b2a0d9
+option(ORC_PREFER_STATIC_LZ4      "Prefer static lz4 library, if available"      OFF)
b2a0d9
+option(ORC_PREFER_STATIC_ZSTD     "Prefer static zstd library, if available"     OFF)
b2a0d9
+option(ORC_PREFER_STATIC_ZLIB     "Prefer static zlib library, if available"     OFF)
b2a0d9
+option(ORC_PREFER_STATIC_GMOCK    "Prefer static gmock library, if available"    OFF)
b2a0d9
 
b2a0d9
 # zstd requires us to add the threads
b2a0d9
 FIND_PACKAGE(Threads REQUIRED)