diff --git a/ports/libmariadb/CONTROL b/ports/libmariadb/CONTROL index 540cfb43fa8..9041841a108 100644 --- a/ports/libmariadb/CONTROL +++ b/ports/libmariadb/CONTROL @@ -1,5 +1,6 @@ Source: libmariadb Version: 3.1.9 +Port-Version: 1 Homepage: https://github.com/MariaDB/mariadb-connector-c Description: MariaDB Connector/C is used to connect C/C++ applications to MariaDB and MySQL databases Default-Features: zlib, openssl diff --git a/ports/libmariadb/fix-InstallPath.patch b/ports/libmariadb/fix-InstallPath.patch index 667a428f07b..7deaf173113 100644 --- a/ports/libmariadb/fix-InstallPath.patch +++ b/ports/libmariadb/fix-InstallPath.patch @@ -1,49 +1,50 @@ -diff --git a/cmake/install_plugins.cmake b/cmake/install_plugins.cmake -index cd5616c..d058a5c 100644 ---- a/cmake/install_plugins.cmake -+++ b/cmake/install_plugins.cmake -@@ -8,7 +8,7 @@ - # plugin installation - - MACRO(INSTALL_PLUGIN name binary_dir) -- INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}) -+ INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}/../../../bin/plugin) - IF(WIN32) - FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") - FILE(APPEND ${CC_BINARY_DIR}/win/packaging/plugin.conf "\n") -diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt -index a1f039e..03a3a6f 100644 ---- a/libmariadb/CMakeLists.txt -+++ b/libmariadb/CMakeLists.txt -@@ -386,10 +386,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) - TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) - - IF(UNIX) -- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) -+ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) - SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") - ELSE() -- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} mariadbclient.def) -+ ADD_LIBRARY(libmariadb ${libmariadb_RC} mariadbclient.def) - TARGET_LINK_LIBRARIES(libmariadb mariadbclient) - SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) - ENDIF() -@@ -441,13 +441,14 @@ ENDIF() - - INSTALL(TARGETS mariadbclient - COMPONENT Development -- DESTINATION ${INSTALL_LIBDIR}) -+ LIBRARY DESTINATION lib) - INSTALL(TARGETS libmariadb - COMPONENT SharedLibraries -- DESTINATION ${INSTALL_LIBDIR}) -+ RUNTIME DESTINATION bin -+ LIBRARY DESTINATION lib -+ ARCHIVE DESTINATION lib) - -- --IF(WIN32) -+IF(0) - # On Windows, install PDB - INSTALL(FILES $ DESTINATION "${INSTALL_LIBDIR}" - CONFIGURATIONS Debug RelWithDebInfo +diff --git a/cmake/install_plugins.cmake b/cmake/install_plugins.cmake +index b8d15ba..7f59db7 100644 +--- a/cmake/install_plugins.cmake ++++ b/cmake/install_plugins.cmake +@@ -8,7 +8,7 @@ + # plugin installation + + MACRO(INSTALL_PLUGIN name binary_dir) +- INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}) ++ INSTALL(TARGETS ${name} COMPONENT ClientPlugins DESTINATION ${INSTALL_PLUGINDIR}/../../../bin/plugin) + IF(MSVC) + INSTALL(FILES $ COMPONENT Debuginfo + DESTINATION symbols CONFIGURATIONS Debug RelWithDebInfo) +diff --git a/libmariadb/CMakeLists.txt b/libmariadb/CMakeLists.txt +index f406b37..a9ae9d7 100644 +--- a/libmariadb/CMakeLists.txt ++++ b/libmariadb/CMakeLists.txt +@@ -395,10 +395,10 @@ ADD_LIBRARY(mariadbclient STATIC ${MARIADB_OBJECTS} ${EMPTY_FILE}) + TARGET_LINK_LIBRARIES(mariadbclient ${SYSTEM_LIBS}) + + IF(UNIX) +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) ++ ADD_LIBRARY(libmariadb ${libmariadb_RC} ${MARIADB_OBJECTS} ${EMPTY_FILE}) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}") + ELSE() +- ADD_LIBRARY(libmariadb SHARED ${libmariadb_RC} mariadbclient.def) ++ ADD_LIBRARY(libmariadb ${libmariadb_RC} mariadbclient.def) + TARGET_LINK_LIBRARIES(libmariadb LINK_PRIVATE mariadbclient) + SET_TARGET_PROPERTIES(libmariadb PROPERTIES LINKER_LANGUAGE C) + ENDIF() +@@ -452,13 +452,14 @@ ENDIF() + + INSTALL(TARGETS mariadbclient + COMPONENT Development +- DESTINATION ${INSTALL_LIBDIR}) ++ LIBRARY DESTINATION lib) + INSTALL(TARGETS libmariadb +- COMPONENT SharedLibraries +- DESTINATION ${INSTALL_LIBDIR}) ++ COMPONENT SharedLibraries ++ RUNTIME DESTINATION bin ++ LIBRARY DESTINATION lib ++ ARCHIVE DESTINATION lib) + +- +-IF(MSVC) ++IF(0) + # On Windows, install PDB + INSTALL(FILES $ DESTINATION "${INSTALL_LIBDIR}" + CONFIGURATIONS Debug RelWithDebInfo diff --git a/ports/libmariadb/portfile.cmake b/ports/libmariadb/portfile.cmake index d3987bc3841..3d41f64bca5 100644 --- a/ports/libmariadb/portfile.cmake +++ b/ports/libmariadb/portfile.cmake @@ -1,10 +1,7 @@ - if (EXISTS "${CURRENT_INSTALLED_DIR}/share/libmysql") message(FATAL_ERROR "FATAL ERROR: libmysql and libmariadb are incompatible.") endif() -include(vcpkg_common_functions) - vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO MariaDB/mariadb-connector-c @@ -12,9 +9,9 @@ vcpkg_from_github( SHA512 6f200b984b0642bd75dd8b1ca8f6b996c4b9236c4180255d15dee369a10b3b802c0e8e1942135aeb3c279f3087ff4b19096e5fef15935f4b76cf4fcb344d9133 HEAD_REF master PATCHES - md.patch - disable-test-build.patch - fix-InstallPath.patch + md.patch + disable-test-build.patch + fix-InstallPath.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -64,6 +61,4 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/include/mariadb ${CURRENT_PACKAGES_DIR}/include/mysql) -# copy license file -file(COPY ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/libmariadb) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libmariadb/COPYING.LIB ${CURRENT_PACKAGES_DIR}/share/libmariadb/copyright) +file(INSTALL ${SOURCE_PATH}/COPYING.LIB DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)