1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-01 05:45:45 +00:00

databases/duckdb: Add pre-compiled sqlite extension; Fix version reported by DuckDB

Other extensions should be added as pre-compiled extensions the same way,
because otherwise DuckDB attempts to download pre-compiled extensions
as binaries which only works for Linux, and is also very insecure.
This commit is contained in:
Yuri Victorovich 2023-11-15 22:37:35 -08:00
parent 38c961aac5
commit a313aafb0e
3 changed files with 41 additions and 3 deletions

View File

@ -1,6 +1,7 @@
PORTNAME= duckdb
DISTVERSIONPREFIX= v
DISTVERSION= 0.9.2
PORTREVISION= 1
CATEGORIES= databases
MAINTAINER= yuri@FreeBSD.org
@ -12,6 +13,7 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
USES= cmake:testing compiler:c++11-lang ssl
USE_GITHUB= yes
GH_TUPLE= duckdb:sqlite_scanner:ef91604:sqlite/extension/sqlite_scanner
CMAKE_ON= BUILD_SHARED_LIBS
CMAKE_OFF= BUILD_UNITTESTS
@ -23,7 +25,8 @@ BINARY_ALIAS= git=false
OPTIONS_DEFINE= TPCE
OPTIONS_DEFAULT= TPCE
OPTIONS_GROUP= EXTENSIONS
OPTIONS_GROUP_EXTENSIONS= AUTOCOMPLETE EXCEL FTS HTTPFS ICU INET JEMALLOC JSON PARQUET SQLSMITH TPCDS TPCH VISUALIZER
OPTIONS_GROUP_EXTENSIONS= AUTOCOMPLETE EXCEL FTS HTTPFS ICU INET JEMALLOC JSON PARQUET SQLSMITH TPCDS TPCH VISUALIZER \
SQLITE_SCANNER
EXTENSIONS_DESC= Extensions:
@ -36,7 +39,12 @@ DUCKDB_EXTENSIONS+= ;${opt:tl}
${opt}_PLIST_FILES= lib/lib${opt:tl}_extension.a
.endfor
CMAKE_ARGS= -DBUILD_EXTENSIONS="${DUCKDB_EXTENSIONS:tW:S/ //g:S/^;//}"
CMAKE_ARGS= -DBUILD_EXTENSIONS="${DUCKDB_EXTENSIONS:tW:S/ //g:S/^;//}" \
-DDUCKDB_MAJOR_VERSION=${PORTVERSION:R:R} \
-DDUCKDB_MINOR_VERSION=${PORTVERSION:R:E} \
-DDUCKDB_PATCH_VERSION=${PORTVERSION:E}
SQLITE_SCANNER_CXXFLAGS= -I${WRKSRC}/extension/sqlite_scanner/src/include # workaround for the header not being found
TPCE_DESC= Enable building of the TPC-E tool
TPCE_CMAKE_BOOL= BUILD_TPCE

View File

@ -1,3 +1,5 @@
TIMESTAMP = 1700026259
TIMESTAMP = 1700111325
SHA256 (duckdb-duckdb-v0.9.2_GH0.tar.gz) = afff7bd925a98dc2af4039b8ab2159b0705cbf5e0ee05d97f7bb8dce5f880dc2
SIZE (duckdb-duckdb-v0.9.2_GH0.tar.gz) = 75296956
SHA256 (duckdb-sqlite_scanner-ef91604_GH0.tar.gz) = 935698a7fde1ec5b5dd94dfd0e02e89a331ca732f6c07add76307839382491cc
SIZE (duckdb-sqlite_scanner-ef91604_GH0.tar.gz) = 4648835

View File

@ -0,0 +1,28 @@
--- CMakeLists.txt.orig 2023-11-13 18:58:24 UTC
+++ CMakeLists.txt
@@ -240,7 +240,7 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "SunOS")
endif()
find_package(Git)
-if(Git_FOUND)
+if(FALSE AND Git_FOUND)
if (NOT DEFINED GIT_COMMIT_HASH)
execute_process(
COMMAND ${GIT_EXECUTABLE} log -1 --format=%h
@@ -279,11 +279,11 @@ if(GIT_RESULT EQUAL "0")
endif()
else()
# fallback for when building from tarball
- set(DUCKDB_MAJOR_VERSION 0)
- set(DUCKDB_MINOR_VERSION 0)
- set(DUCKDB_PATCH_VERSION 1)
- set(DUCKDB_DEV_ITERATION 0)
- set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}-dev${DUCKDB_DEV_ITERATION}")
+ #set(DUCKDB_MAJOR_VERSION 0)
+ #set(DUCKDB_MINOR_VERSION 0)
+ #set(DUCKDB_PATCH_VERSION 1)
+ #set(DUCKDB_DEV_ITERATION 0)
+ set(DUCKDB_VERSION "v${DUCKDB_MAJOR_VERSION}.${DUCKDB_MINOR_VERSION}.${DUCKDB_PATCH_VERSION}")
endif()
message(STATUS "git hash ${GIT_COMMIT_HASH}, version ${DUCKDB_VERSION}")