1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00

databases/tiledb: Update to 2.10.1

Changes:	https://github.com/TileDB-Inc/TileDB/releases
This commit is contained in:
Po-Chuan Hsieh 2022-06-30 00:27:55 +08:00
parent 40a0259f0c
commit 86e63837db
No known key found for this signature in database
GPG Key ID: 9A4BD10F002DD04B
5 changed files with 188 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
PORTNAME= tiledb
PORTVERSION= 2.8.3
PORTVERSION= 2.10.1
CATEGORIES= databases
MAINTAINER= sunpoet@FreeBSD.org
@ -19,6 +19,7 @@ LIB_DEPENDS= libcapnp.so:devel/capnproto080 \
RUN_DEPENDS= capnproto080>=0.8.0:devel/capnproto080 \
catch>=2.13.8:devel/catch \
clipp>=1.2.3:devel/clipp \
curl>=7.74.0:ftp/curl \
liblz4>=1.9.3,1:archivers/liblz4 \
spdlog>=1.9.0:devel/spdlog \
zstd>=1.4.8:archivers/zstd
@ -26,8 +27,8 @@ RUN_DEPENDS= capnproto080>=0.8.0:devel/capnproto080 \
USES= cmake compiler:c++17-lang localbase:ldflags pkgconfig ssl
CFLAGS+= -DSPDLOG_FMT_EXTERNAL=1
CMAKE_ARGS= -DCATCH_INCLUDE_DIR=${LOCALBASE}/include/catch2
CMAKE_OFF= TILEDB_ALLOW_REGEX_CHAR_PATH TILEDB_ARROW_TESTS TILEDB_AZURE TILEDB_CMAKE_IDE TILEDB_FORCE_ALL_DEPS TILEDB_GCS TILEDB_HDFS TILEDB_S3 TILEDB_SKIP_S3AWSSDK_DIR_LENGTH_CHECK TILEDB_SUPERBUILD TILEDB_TESTS_AWS_S3_CONFIG TILEDB_TESTS_ENABLE_REST TILEDB_VERBOSE TILEDB_WERROR
CMAKE_ARGS= -DCATCH_INCLUDE_DIR=${LOCALBASE}/include/catch2 -Dlibmagic_DICTIONARY=/usr/share/misc/magic.mgc
CMAKE_OFF= TILEDB_ALLOW_REGEX_CHAR_PATH TILEDB_ARROW_TESTS TILEDB_AZURE TILEDB_CMAKE_IDE TILEDB_FORCE_ALL_DEPS TILEDB_GCS TILEDB_HDFS TILEDB_INSTALL_STATIC_DEPS TILEDB_S3 TILEDB_SKIP_S3AWSSDK_DIR_LENGTH_CHECK TILEDB_SUPERBUILD TILEDB_TESTS_AWS_S3_CONFIG TILEDB_TESTS_ENABLE_REST TILEDB_VERBOSE TILEDB_WERROR
CMAKE_ON= TILEDB_CCACHE TILEDB_CPP_API TILEDB_LOG_OUTPUT_ON_FAILURE TILEDB_SERIALIZATION TILEDB_STATIC TILEDB_STATS TILEDB_TESTS TILEDB_TOOLS
LDFLAGS+= -lfmt

View File

@ -1,3 +1,3 @@
TIMESTAMP = 1652446240
SHA256 (TileDB-Inc-TileDB-2.8.3_GH0.tar.gz) = 802e366bc166d34a7e8111a23c5ab782f0b406038607fcb76cd8fb536619a74a
SIZE (TileDB-Inc-TileDB-2.8.3_GH0.tar.gz) = 2328582
TIMESTAMP = 1656092914
SHA256 (TileDB-Inc-TileDB-2.10.1_GH0.tar.gz) = ec215a28b116cc596da749451990fa11f0e8860ab576e6cb7d3e68b81eda2ef4
SIZE (TileDB-Inc-TileDB-2.10.1_GH0.tar.gz) = 2810234

View File

@ -0,0 +1,170 @@
Obtained from: https://github.com/TileDB-Inc/TileDB/pull/3270
--- cmake/Modules/FindMagic_EP.cmake.orig 2022-06-24 19:24:23 UTC
+++ cmake/Modules/FindMagic_EP.cmake
@@ -3,7 +3,7 @@
#
# The MIT License
#
-# Copyright (c) 2018-2021 TileDB, Inc.
+# Copyright (c) 2022 TileDB, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
@@ -34,47 +34,47 @@
# Include some common helper functions.
include(TileDBCommon)
-# Search the path set during the superbuild for the EP.
-set(LIBMAGIC_PATHS ${TILEDB_EP_INSTALL_PREFIX})
+# First check for a static version in the EP prefix.
+find_library(libmagic_LIBRARIES
+ NAMES
+ magic${CMAKE_STATIC_LIBRARY_SUFFIX}
+ libmagic${CMAKE_STATIC_LIBRARY_SUFFIX}
+ PATHS ${TILEDB_EP_INSTALL_PREFIX}
+ PATH_SUFFIXES lib
+ NO_DEFAULT_PATH
+)
-if(TILEDB_LIBMAGIC_EP_BUILT)
- find_package(libmagic PATHS ${TILEDB_EP_INSTALL_PREFIX} ${TILEDB_DEPS_NO_DEFAULT_PATH})
-endif()
-
-if (TILEDB_LIBMAGIC_EP_BUILT)
+if (libmagic_LIBRARIES)
+ set(libmagic_STATIC_EP_FOUND TRUE)
find_path(libmagic_INCLUDE_DIR
- NAMES magic.h
- PATHS ${LIBMAGIC_PATHS}
- PATH_SUFFIXES include
- ${NO_DEFAULT_PATH}
- )
-
- if (NOT libmagic_INCLUDE_DIR)
- find_path(libmagic_INCLUDE_DIR
- NAMES file/file.h
- PATHS ${LIBMAGIC_PATHS}
- PATH_SUFFIXES include
- ${NO_DEFAULT_PATH}
- )
- endif()
-
- # Link statically if installed with the EP.
+ NAMES magic.h
+ PATHS ${TILEDB_EP_INSTALL_PREFIX}
+ PATH_SUFFIXES include
+ NO_DEFAULT_PATH
+ )
+elseif(NOT TILEDB_FORCE_ALL_DEPS)
+ set(libmagic_STATIC_EP_FOUND FALSE)
+ # Static EP not found, search in system paths.
find_library(libmagic_LIBRARIES
- libmagic
- PATHS ${LIBMAGIC_PATHS}
- PATH_SUFFIXES lib a
- #${TILEDB_DEPS_NO_DEFAULT_PATH}
- ${NO_DEFAULT_PATH}
- )
-
- include(FindPackageHandleStandardArgs)
- FIND_PACKAGE_HANDLE_STANDARD_ARGS(libmagic
- REQUIRED_VARS libmagic_LIBRARIES libmagic_INCLUDE_DIR
- )
+ NAMES
+ magic libmagic
+ PATH_SUFFIXES lib bin
+ ${TILEDB_DEPS_NO_DEFAULT_PATH}
+ )
+ find_path(libmagic_INCLUDE_DIR
+ NAMES magic.h
+ PATH_SUFFIXES include
+ ${TILEDB_DEPS_NO_DEFAULT_PATH}
+ )
endif()
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(libmagic
+ REQUIRED_VARS libmagic_LIBRARIES libmagic_INCLUDE_DIR
+)
+
# if not yet built add it as an external project
-if(NOT TILEDB_LIBMAGIC_EP_BUILT)
+if(NOT libmagic_FOUND)
if (TILEDB_SUPERBUILD)
message(STATUS "Adding Magic as an external project")
@@ -115,11 +115,22 @@ if(NOT TILEDB_LIBMAGIC_EP_BUILT)
endif()
endif()
-find_file(libmagic_DICTIONARY magic.mgc
- PATHS ${LIBMAGIC_PATHS}
- PATH_SUFFIXES bin share
- ${NO_DEFAULT_PATH}
-)
+if(TILEDB_LIBMAGIC_EP_BUILT)
+ find_file(libmagic_DICTIONARY magic.mgc
+ PATHS ${LIBMAGIC_PATHS}
+ PATH_SUFFIXES bin share misc
+ ${TILEDB_DEPS_NO_DEFAULT_PATH}
+ )
+else()
+ find_file(libmagic_DICTIONARY magic.mgc
+ PATH_SUFFIXES bin share misc share/misc
+ ${TILEDB_DEPS_NO_DEFAULT_PATH}
+ )
+endif()
+
+if(NOT TILEDB_SUPERBUILD AND NOT libmagic_DICTIONARY)
+ message(FATAL_ERROR "Unable to find libmagic dictionary")
+endif()
if (libmagic_FOUND AND NOT TARGET libmagic)
message(STATUS "Found Magic, adding imported target: ${libmagic_LIBRARIES}")
--- tiledb/CMakeLists.txt.orig 2022-06-24 19:24:23 UTC
+++ tiledb/CMakeLists.txt
@@ -336,18 +336,22 @@ add_library(TILEDB_CORE_OBJECTS OBJECT
############################################################
# provide actions/target for preparation of magic.mgc data for embedding/build
-#set(MGC_GZIPPED_BIN_PATH3 "${CMAKE_CURRENT_SOURCE_DIR}/sm/misc/magic_mgc_gzipped.bin")
-set(MGC_GZIPPED_BIN_OUTPUT_DIRECTORY "${TILEDB_EP_BASE}/install/include")
+set(MGC_GZIPPED_BIN_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/sm/misc")
set(MGC_GZIPPED_BIN_OUTPUT_FILE "${MGC_GZIPPED_BIN_OUTPUT_DIRECTORY}/magic_mgc_gzipped.bin")
set(MGC_GZIPPED_BIN_INPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/sm/misc")
set(MGC_GZIPPED_BIN_INPUT_FILE "${MGC_GZIPPED_BIN_INPUT_DIRECTORY}/magic_mgc_gzipped.bin.tar.bz2")
+# Create the output directory if it does not exist
+add_custom_target(create_magic_bin_output_directory ALL
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${MGC_GZIPPED_BIN_OUTPUT_DIRECTORY})
+
add_custom_command(
OUTPUT "${MGC_GZIPPED_BIN_OUTPUT_FILE}"
- DEPENDS "${MGC_GZIPPED_BIN_INPUT_FILE}"
+ DEPENDS "${MGC_GZIPPED_BIN_INPUT_FILE}" create_magic_bin_output_directory
COMMAND ${CMAKE_COMMAND} -E tar x "${MGC_GZIPPED_BIN_INPUT_FILE}"
WORKING_DIRECTORY "${MGC_GZIPPED_BIN_OUTPUT_DIRECTORY}"
)
+
add_custom_target(gen_mgc_unarch ALL
DEPENDS ${MGC_GZIPPED_BIN_OUTPUT_FILE}
)
@@ -360,7 +364,7 @@ add_custom_target(
WORKING_DIRECTORY "${MGC_GZIPPED_BIN_OUTPUT_DIRECTORY}"
COMMAND ${CMAKE_COMMAND} -E tar cvj "magic_mgc_gzipped.bin.tar.bz2" "magic_mgc_gzipped.bin"
COMMAND ${CMAKE_COMMAND} -E copy "magic_mgc_gzipped.bin.tar.bz2" "${MGC_GZIPPED_BIN_INPUT_FILE}"
- DEPENDS "${libmagic_DICTIONARY}"
+ DEPENDS "${libmagic_DICTIONARY}" create_magic_bin_output_directory
COMMENT "Re-generate ${MGC_GZIPPED_BIN_INPUT_FILE} for embedded magic.mgc support"
)
@@ -374,6 +378,8 @@ target_include_directories(TILEDB_CORE_OBJECTS
"${TILEDB_EXTERNALS_INCLUDE_DIRS}"
# to pickup <build_dir>/tiledb for capnp gen'd files
"${CMAKE_CURRENT_BINARY_DIR}/.."
+ # For libmagic binary data include
+ "${CMAKE_CURRENT_BINARY_DIR}/sm/misc"
)
# Build a separate copy of the object library for use with static TileDB

View File

@ -0,0 +1,10 @@
--- tiledb/type/range/CMakeLists.txt.orig 2022-06-24 19:24:23 UTC
+++ tiledb/type/range/CMakeLists.txt
@@ -29,6 +29,7 @@ include(common NO_POLICY_SCOPE)
# Range library
add_library(range OBJECT range.h)
+set_target_properties(range PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(range PUBLIC baseline $<TARGET_OBJECTS:baseline>)
# Test-compile of object library ensures link-completeness

View File

@ -37,6 +37,7 @@ include/tiledb/utils.h
include/tiledb/version.h
include/tiledb/vfs.h
lib/cmake/TileDB/TileDBConfig.cmake
lib/cmake/TileDB/TileDBConfigVersion.cmake
lib/cmake/TileDB/TileDBTargets-%%CMAKE_BUILD_TYPE%%.cmake
lib/cmake/TileDB/TileDBTargets.cmake
lib/libtiledb.a