Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

duckdb: add version 1.0.0 #24084

Merged
merged 2 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions recipes/duckdb/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.0.0":
url: "https://github.com/duckdb/duckdb/archive/refs/tags/v1.0.0.tar.gz"
sha256: "04e472e646f5cadd0a3f877a143610674b0d2bcf9f4102203ac3c3d02f1c5f26"
"0.10.2":
url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.10.2.tar.gz"
sha256: "662a0ba5c35d678ab6870db8f65ffa1c72e6096ad525a35b41b275139684cea6"
Expand Down Expand Up @@ -30,6 +33,13 @@ sources:
url: "https://github.com/duckdb/duckdb/archive/refs/tags/v0.5.1.tar.gz"
sha256: "3dab7ba0d0f8d024d3c73fd3d4fb8834203c31d7b0ddb1e8539ee266e11b0e9b"
patches:
"1.0.0":
- patch_file: "patches/1.0.0-0001-fix-cmake.patch"
patch_description: "install static of shared library, add installation for odbc extention"
patch_type: "portability"
- patch_file: "patches/1.0.0-0002-msvc-bicobj.patch"
patch_description: "add /bigobj flag"
patch_type: "portability"
"0.10.2":
- patch_file: "patches/0.10.2-0001-fix-cmake.patch"
patch_description: "install static of shared library, add installation for odbc extention"
Expand Down
4 changes: 3 additions & 1 deletion recipes/duckdb/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,8 @@ def package_info(self):
self.cpp_info.libs.append("duckdb_fsst")
if Version(self.version) >= "0.10.0":
self.cpp_info.libs.append("duckdb_skiplistlib")
if Version(self.version) >= "0.10.3":
self.cpp_info.libs.append("duckdb_yyjson")

if self.options.with_autocomplete:
self.cpp_info.libs.append("autocomplete_extension")
Expand All @@ -232,7 +234,7 @@ def package_info(self):
self.cpp_info.libs.append("visualizer_extension")
if self.options.with_httpfs:
self.cpp_info.libs.append("httpfs_extension")
if (Version(self.version) >= "0.6.0" and self.settings.os == "Linux" and
if (Version(self.version) >= "0.6.0" and self.settings.os == "Linux" and
(Version(self.version) < "0.10.1" or self.settings.arch == "x86_64")):
self.cpp_info.libs.append("jemalloc_extension")
if self.options.with_json:
Expand Down
125 changes: 125 additions & 0 deletions recipes/duckdb/all/patches/1.0.0-0001-fix-cmake.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ec66b57..6321321 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -843,12 +843,12 @@ function(build_loadable_extension_directory NAME OUTPUT_DIRECTORY EXTENSION_VERS
COMMAND emcc $<TARGET_FILE:${TARGET_NAME}> -o $<TARGET_FILE:${TARGET_NAME}>.wasm -O3 -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="_${NAME}_init,_${NAME}_version" ${WASM_THREAD_FLAGS} ${TO_BE_LINKED}
)
endif()
- add_custom_command(
- TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND
- ${CMAKE_COMMAND} -DEXTENSION=$<TARGET_FILE:${TARGET_NAME}>${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DDUCKDB_VERSION="${DUCKDB_NORMALIZED_VERSION}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake
- )
+ # add_custom_command(
+ # TARGET ${TARGET_NAME}
+ # POST_BUILD
+ # COMMAND
+ # ${CMAKE_COMMAND} -DEXTENSION=$<TARGET_FILE:${TARGET_NAME}>${EXTENSION_POSTFIX} -DPLATFORM_FILE=${DuckDB_BINARY_DIR}/duckdb_platform_out -DDUCKDB_VERSION="${DUCKDB_NORMALIZED_VERSION}" -DEXTENSION_VERSION="${EXTENSION_VERSION}" -DNULL_FILE=${DUCKDB_MODULE_BASE_DIR}/scripts/null.txt -P ${DUCKDB_MODULE_BASE_DIR}/scripts/append_metadata.cmake
+ # )
add_dependencies(${TARGET_NAME} duckdb_platform)
if (NOT EXTENSION_CONFIG_BUILD AND NOT ${EXTENSION_TESTS_ONLY} AND NOT CLANG_TIDY)
add_dependencies(duckdb_local_extension_repo ${TARGET_NAME})
@@ -869,7 +869,7 @@ function(build_static_extension NAME PARAMETERS)
set(FILES "${ARGV}")
list(REMOVE_AT FILES 0)
add_library(${NAME}_extension STATIC ${FILES})
- target_link_libraries(${NAME}_extension duckdb_static)
+# target_link_libraries(${NAME}_extension duckdb_static)
endfunction()

# Internal extension register function
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 06c0c9a..ac1c4ad 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -93,21 +93,21 @@ else()
duckdb_skiplistlib
duckdb_mbedtls
duckdb_yyjson)
-
+ if(BUILD_SHARED_LIBS)
add_library(duckdb SHARED ${ALL_OBJECT_FILES})
target_link_libraries(duckdb ${DUCKDB_LINK_LIBS})
link_threads(duckdb)
link_extension_libraries(duckdb)
-
+ endif()
add_library(duckdb_static STATIC ${ALL_OBJECT_FILES})
target_link_libraries(duckdb_static ${DUCKDB_LINK_LIBS})
link_threads(duckdb_static)
link_extension_libraries(duckdb_static)
-
+ if(BUILD_SHARED_LIBS)
target_include_directories(
duckdb PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
-
+ endif()
target_include_directories(
duckdb_static PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
@@ -123,10 +123,18 @@ else()
DESTINATION "${INSTALL_INCLUDE_DIR}")

endif()
-
+if(BUILD_SHARED_LIBS)
install(
- TARGETS duckdb duckdb_static
+ TARGETS duckdb
EXPORT "${DUCKDB_EXPORT_SET}"
LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
RUNTIME DESTINATION "${INSTALL_BIN_DIR}")
+else()
+install(
+ TARGETS duckdb_static
+ EXPORT "${DUCKDB_EXPORT_SET}"
+ LIBRARY DESTINATION "${INSTALL_LIB_DIR}"
+ ARCHIVE DESTINATION "${INSTALL_LIB_DIR}"
+ RUNTIME DESTINATION "${INSTALL_BIN_DIR}")
+endif()
diff --git a/tools/odbc/CMakeLists.txt b/tools/odbc/CMakeLists.txt
index baf7823..4447d26 100644
--- a/tools/odbc/CMakeLists.txt
+++ b/tools/odbc/CMakeLists.txt
@@ -37,6 +37,13 @@ add_library(duckdb_odbc SHARED ${ALL_OBJECT_FILES} duckdb_odbc.def)

set_target_properties(duckdb_odbc PROPERTIES DEFINE_SYMBOL "DUCKDB_ODBC_API")
target_link_libraries(duckdb_odbc ${LINK_LIB_LIST} duckdb_static)
+install(
+ TARGETS duckdb_odbc
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
+)

if(NOT CLANG_TIDY)
add_subdirectory(test)
diff --git a/tools/sqlite3_api_wrapper/CMakeLists.txt b/tools/sqlite3_api_wrapper/CMakeLists.txt
index e29c33e..9e387f9 100644
--- a/tools/sqlite3_api_wrapper/CMakeLists.txt
+++ b/tools/sqlite3_api_wrapper/CMakeLists.txt
@@ -26,12 +26,12 @@ if(NOT AMALGAMATION_BUILD)
endif()
link_threads(sqlite3_api_wrapper_static)

-if(NOT WIN32 AND NOT ZOS)
+if(BUILD_SHARED_LIBS AND NOT WIN32 AND NOT ZOS)
add_library(sqlite3_api_wrapper SHARED ${SQLITE_API_WRAPPER_FILES})
target_link_libraries(sqlite3_api_wrapper duckdb ${DUCKDB_EXTRA_LINK_FLAGS})
link_threads(sqlite3_api_wrapper)
endif()
-
+if(0)
include_directories(../../third_party/catch)

include_directories(test/include)
@@ -43,3 +43,4 @@ if(WIN32 OR ZOS)
else()
target_link_libraries(test_sqlite3_api_wrapper sqlite3_api_wrapper)
endif()
+endif()
13 changes: 13 additions & 0 deletions recipes/duckdb/all/patches/1.0.0-0002-msvc-bicobj.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 50d10e8..a06f30c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -537,7 +537,7 @@ if(NOT MSVC)
endif()
else()
set(CMAKE_CXX_WINDOWS_FLAGS
- "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+ "/wd4244 /wd4267 /wd4200 /wd26451 /wd26495 /D_CRT_SECURE_NO_WARNINGS /utf-8 /bigobj")
if(TREAT_WARNINGS_AS_ERRORS)
set(CMAKE_CXX_WINDOWS_FLAGS "${CMAKE_CXX_WINDOWS_FLAGS} /WX")
endif()
2 changes: 2 additions & 0 deletions recipes/duckdb/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"1.0.0":
folder: "all"
"0.10.2":
folder: "all"
"0.10.1":
Expand Down
Loading