From 93885afd50ff1a1408e1785dceffb01ff648c7d9 Mon Sep 17 00:00:00 2001 From: Be Date: Wed, 22 Sep 2021 15:00:06 -0500 Subject: [libdjinterop] update to 0.16.0 (#20136) * [libdjinterop] update to 0.16.0 * [sqlite3] add pkgconfig file Linux distributions typically use the SQLite autoconf package, but this port uses the SQLite amalgamation package with a custom CMakeLists.txt so the port needs to take care of installing the pkgconfig file. --- ports/libdjinterop/portfile.cmake | 16 ++++++++-------- ports/libdjinterop/vcpkg.json | 10 +++++++++- ports/sqlite3/CMakeLists.txt | 8 ++++++++ ports/sqlite3/portfile.cmake | 9 ++++++++- ports/sqlite3/sqlite3.pc.in | 11 +++++++++++ ports/sqlite3/vcpkg.json | 1 + versions/baseline.json | 4 ++-- versions/l-/libdjinterop.json | 5 +++++ versions/s-/sqlite3.json | 5 +++++ 9 files changed, 57 insertions(+), 12 deletions(-) create mode 100644 ports/sqlite3/sqlite3.pc.in diff --git a/ports/libdjinterop/portfile.cmake b/ports/libdjinterop/portfile.cmake index 484238b84..9f5981d25 100644 --- a/ports/libdjinterop/portfile.cmake +++ b/ports/libdjinterop/portfile.cmake @@ -1,18 +1,18 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO xsco/libdjinterop - REF 0.14.6 - SHA512 3d05bc882ddc309a1b0d5e97572ede1aa826b662a19ffd8ee874c13ead668d1c3f14d59bf861ae3880588e1a9b94e4a92ccdbb5df71bfb7ffe28f57a1b123f18 + REF 0.16.0 + SHA512 7653e3752b8d597a967fb5f83f8b14c0db5d9cdb05a9bb22f6d9f34a890327fafdbd81996ce9af09552b69da4b9f7f0b41d631b1704b11e46e335f205c6886bf HEAD_REF master ) -vcpkg_configure_cmake( - SOURCE_PATH ${SOURCE_PATH} - PREFER_NINJA -) -vcpkg_install_cmake() +vcpkg_cmake_configure(SOURCE_PATH "${SOURCE_PATH}") +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/DjInterop) +vcpkg_fixup_pkgconfig() vcpkg_copy_pdbs() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/ports/libdjinterop/vcpkg.json b/ports/libdjinterop/vcpkg.json index 533f90d86..7ccfa916e 100644 --- a/ports/libdjinterop/vcpkg.json +++ b/ports/libdjinterop/vcpkg.json @@ -1,11 +1,19 @@ { "name": "libdjinterop", - "version-string": "0.14.6", + "version": "0.16.0", "description": "C++ library for access to DJ record libraries. Currently only supports Denon Engine Prime databases", "homepage": "https://github.com/xsco/libdjinterop", "license": "LGPL-3.0-or-later", "dependencies": [ "sqlite3", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, "zlib" ] } diff --git a/ports/sqlite3/CMakeLists.txt b/ports/sqlite3/CMakeLists.txt index 6250eb711..7c1099bdb 100644 --- a/ports/sqlite3/CMakeLists.txt +++ b/ports/sqlite3/CMakeLists.txt @@ -63,3 +63,11 @@ install( install(FILES sqlite3.h sqlite3ext.h DESTINATION include CONFIGURATIONS Release) install(EXPORT unofficial-sqlite3-targets NAMESPACE unofficial::sqlite3:: FILE unofficial-sqlite3-targets.cmake DESTINATION share/unofficial-sqlite3) + +if(UNIX) + set(PKGCONFIG_LIBS_PRIVATE "-lm -ldl -lpthread") +else() + set(PKGCONFIG_LIBS_PRIVATE "") +endif() +configure_file(sqlite3.pc.in sqlite3.pc @ONLY) +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/sqlite3.pc" DESTINATION "${CMAKE_INSTALL_PREFIX}/lib/pkgconfig") diff --git a/ports/sqlite3/portfile.cmake b/ports/sqlite3/portfile.cmake index d843ee537..329b1dbd5 100644 --- a/ports/sqlite3/portfile.cmake +++ b/ports/sqlite3/portfile.cmake @@ -1,4 +1,6 @@ +# Be sure to update both of these versions together. set(SQLITE_VERSION 3360000) +set(PKGCONFIG_VERSION 3.36.0) set(SQLITE_HASH 5c18f158a599b1e91d95c91de3aa5c5de52f986845ad0cb49dfd56b650587e55e24d469571b5b864229b870d0eaf85d78893f61ef950b95389cb41692be37f58) vcpkg_download_distfile(ARCHIVE @@ -15,6 +17,7 @@ vcpkg_extract_source_archive_ex( ) file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") +file(COPY "${CMAKE_CURRENT_LIST_DIR}/sqlite3.pc.in" DESTINATION "${SOURCE_PATH}") vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES @@ -26,7 +29,9 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" - OPTIONS ${FEATURE_OPTIONS} + OPTIONS + ${FEATURE_OPTIONS} + -DPKGCONFIG_VERSION=${PKGCONFIG_VERSION} OPTIONS_DEBUG -DSQLITE3_SKIP_TOOLS=ON ) @@ -46,6 +51,8 @@ configure_file( @ONLY ) +vcpkg_fixup_pkgconfig() + if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic") vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/sqlite3.h" "# define SQLITE_API\n" "# define SQLITE_API __declspec(dllimport)\n") endif() diff --git a/ports/sqlite3/sqlite3.pc.in b/ports/sqlite3/sqlite3.pc.in new file mode 100644 index 000000000..d265632d1 --- /dev/null +++ b/ports/sqlite3/sqlite3.pc.in @@ -0,0 +1,11 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix} +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: SQLite +Description: SQL database engine +Version: @PKGCONFIG_VERSION@ +Libs: -L${libdir} -lsqlite3 +Libs.private: @PKGCONFIG_LIBS_PRIVATE@ +Cflags: -I${includedir} diff --git a/ports/sqlite3/vcpkg.json b/ports/sqlite3/vcpkg.json index f5054f6f8..d998070e0 100644 --- a/ports/sqlite3/vcpkg.json +++ b/ports/sqlite3/vcpkg.json @@ -1,6 +1,7 @@ { "name": "sqlite3", "version": "3.36.0", + "port-version": 1, "description": "SQLite is a software library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.", "homepage": "https://sqlite.org/", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 5307c8cc2..9e66a9973 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3265,7 +3265,7 @@ "port-version": 1 }, "libdjinterop": { - "baseline": "0.14.6", + "baseline": "0.16.0", "port-version": 0 }, "libdshowcapture": { @@ -6246,7 +6246,7 @@ }, "sqlite3": { "baseline": "3.36.0", - "port-version": 0 + "port-version": 1 }, "sqlitecpp": { "baseline": "3.1.1", diff --git a/versions/l-/libdjinterop.json b/versions/l-/libdjinterop.json index 02fe1f1f7..324976efb 100644 --- a/versions/l-/libdjinterop.json +++ b/versions/l-/libdjinterop.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "c1c63ff4c5483425a19992ddefa98a3c1e2fabf3", + "version": "0.16.0", + "port-version": 0 + }, { "git-tree": "f880d97fbd6043537231fcd201e5df71dc8b51f6", "version-string": "0.14.6", diff --git a/versions/s-/sqlite3.json b/versions/s-/sqlite3.json index 2154ae868..664d54a35 100644 --- a/versions/s-/sqlite3.json +++ b/versions/s-/sqlite3.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "e0395ce17570ddb92d952ca5f8be1953ec4c8325", + "version": "3.36.0", + "port-version": 1 + }, { "git-tree": "c23525b0204e11a56d40cbb0b7fa68861450df04", "version": "3.36.0", -- cgit v1.2.3