Skip to content

Commit

Permalink
databases/tiledb: Fix configure with CMake >= 3.27
Browse files Browse the repository at this point in the history
After [1], CMake trusts OPENSSL_ROOT_DIR implicitly, so if isn't set
right, OpenSSL may not be found.

This project uses OPENSSL_PATHS to set OPENSSL_ROOT_DIR, so CMake tries
to find OpenSSL in TILEDB_EP_INSTALL_PREFIX which is problably not where
we want to look. Pass ${OPENSSLBASE} to set OPENSSL_PATHS so we are
looking in the right location.

[1] Kitware/CMake@5cc8a69

PR:		274225
Approved by:	portmgr (blanket build fix)
  • Loading branch information
BSDKaffee committed Nov 8, 2023
1 parent 3c5f96d commit 78447ad
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions databases/tiledb/Makefile
Expand Up @@ -31,6 +31,7 @@ CFLAGS_armv6+= -Wno-c++11-narrowing
CFLAGS_armv7+= -Wno-c++11-narrowing
CFLAGS_i386+= -Wno-c++11-narrowing
CMAKE_ARGS= -DCATCH_INCLUDE_DIR=${LOCALBASE}/include/catch2 \
-DFREEBSD_OPENSSLBASE=${OPENSSLBASE} \
-Dlibmagic_DICTIONARY=/usr/share/misc/magic.mgc
CMAKE_OFF= TILEDB_ABSEIL \
TILEDB_ALLOW_REGEX_CHAR_PATH \
Expand Down
15 changes: 15 additions & 0 deletions databases/tiledb/files/patch-cmake_Modules_FindOpenSSL__EP.cmake
@@ -0,0 +1,15 @@
Fix search for OpenSSL with CMake >= 3.27. This port uses OPENSSL_PATHS to set
OPENSSL_ROOT_DIR, so CMake tries to find OpenSSL in TILEDB_EP_INSTALL_PREFIX
which is problably not where we want to look.

--- cmake/Modules/FindOpenSSL_EP.cmake.orig 2023-10-25 06:36:39 UTC
+++ cmake/Modules/FindOpenSSL_EP.cmake
@@ -41,7 +41,7 @@ endif()
endif()

# Search the path set during the superbuild for the EP.
-set(OPENSSL_PATHS ${TILEDB_EP_INSTALL_PREFIX})
+set(OPENSSL_PATHS ${FREEBSD_OPENSSLBASE})

# Add /usr/local/opt, as Homebrew sometimes installs it there.
set (HOMEBREW_BASE "/usr/local/opt/openssl")

0 comments on commit 78447ad

Please sign in to comment.