diff options
author | Vadim A. Misbakh-Soloviov <git@mva.name> | 2018-02-12 01:25:23 +0700 |
---|---|---|
committer | Vadim A. Misbakh-Soloviov <git@mva.name> | 2018-02-12 01:29:12 +0700 |
commit | 90253e08abbd1ca1dd18f3296c4057ab6e47f5fe (patch) | |
tree | d499804dfad463360846082ece73f596a17d7c25 | |
parent | defcon: ebuild fix by email request of "R Moog" (diff) | |
download | gamerlay-90253e08abbd1ca1dd18f3296c4057ab6e47f5fe.tar.gz gamerlay-90253e08abbd1ca1dd18f3296c4057ab6e47f5fe.tar.bz2 gamerlay-90253e08abbd1ca1dd18f3296c4057ab6e47f5fe.zip |
mariadb-connector-c: bump
-rw-r--r-- | dev-db/mariadb-connector-c/Manifest | 2 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/fix-libdir.patch | 58 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch | 13 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/fix-mariadb_config.patch | 25 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch | 24 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/gentoo-layout.patch | 60 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/multilib-install.patch | 16 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/patches/3.0.3/gentoo-layout.patch | 55 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/files/patches/9999/gentoo-layout.patch | 55 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild (renamed from dev-db/mariadb-connector-c/mariadb-connector-c-2.3.1.ebuild) | 51 | ||||
-rw-r--r-- | dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild | 62 | ||||
-rw-r--r-- | eclass/patches.eclass | 60 |
12 files changed, 225 insertions, 256 deletions
diff --git a/dev-db/mariadb-connector-c/Manifest b/dev-db/mariadb-connector-c/Manifest index ba14626..25f7f94 100644 --- a/dev-db/mariadb-connector-c/Manifest +++ b/dev-db/mariadb-connector-c/Manifest @@ -1 +1 @@ -DIST mariadb-connector-c-2.3.1-src.tar.gz 536755 SHA256 6ab7e1477ae1484939675a3b499f98148980a0bd340d15d22df00a5c6656c633 SHA512 ecf2e1bafd8208f0fa43ac6b96da5accbb0385b3851154f420143ef9d24ba430b0ae2210ba0bede31fd85eb576b8ca5ff5cf4e5461f7d919715cb613d47c1953 WHIRLPOOL 61a7ead0cce3ba8a3a32612535f205c4e8a6a5c7e0aa6758ccd8a22eaf129a1412768ae055b49165de039188667aecb5a89da0b2e3b9dfa0759e37f45fa0e7f8 +DIST mariadb-connector-c-3.0.3-src.tar.gz 666928 SHA256 210f0ee3414b235d3db8e98e9e5a0a98381ecf771e67ca4a688036368984eeea SHA512 6da66a32165cb74b106bf94e13a35d4bb38f05e5d2b3ff3740862dfc0892a7705977c1394b4f84b8e1f1e50a59a3fadbc62e7733b1feb532c6368a9fc262db04 WHIRLPOOL 808428dbf05546a2066ce8198e9713bc5e86caf068ed3ab308ee8e912d39248e1c0d7ddc912d8d12ec77411a744c8db5b3dc2351329b06e28ef5be22b5bc8790 diff --git a/dev-db/mariadb-connector-c/files/fix-libdir.patch b/dev-db/mariadb-connector-c/files/fix-libdir.patch deleted file mode 100644 index c7ade92..0000000 --- a/dev-db/mariadb-connector-c/files/fix-libdir.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff -aurN mariadb_client-2.0.0-src/CMakeLists.txt mariadb_client-2.0.0-src.new/CMakeLists.txt ---- mariadb_client-2.0.0-src/CMakeLists.txt 2014-04-01 11:14:40.000000000 -0400 -+++ mariadb_client-2.0.0-src.new/CMakeLists.txt 2014-04-03 16:12:55.163032445 -0400 -@@ -27,8 +27,19 @@ - - OPTION(WITH_SQLITE "Enables Sqlite support" OFF) - OPTION(WITH_EXTERNAL_ZLIB "Enables use of external zlib" OFF) -+OPTION(INSTALL_LIBDIR "Library install location" OFF) - ############### - -+IF(NOT INSTALL_LIBDIR) -+ # Some distros can set this in a global cmake config -+ IF(CMAKE_INSTALL_LIBDIR) -+ SET(INSTALL_LIBDIR "${CMAKE_INSTALL_LIBDIR}") -+ ELSE() -+ # Provide a sane default -+ SET(INSTALL_LIBDIR "lib/mariadb") -+ ENDIF() -+ENDIF() -+ - IF(WITH_RTC) - SET(RTC_OPTIONS "/RTC1 /RTCc") - ENDIF() -diff -aurN mariadb_client-2.0.0-src/libmariadb/CMakeLists.txt mariadb_client-2.0.0-src.new/libmariadb/CMakeLists.txt ---- mariadb_client-2.0.0-src/libmariadb/CMakeLists.txt 2014-03-18 11:01:05.000000000 -0400 -+++ mariadb_client-2.0.0-src.new/libmariadb/CMakeLists.txt 2014-04-03 16:15:49.417626907 -0400 -@@ -210,15 +210,15 @@ - - INSTALL(TARGETS - libmariadb mariadbclient -- RUNTIME DESTINATION "lib/mariadb" -- LIBRARY DESTINATION "lib/mariadb" -- ARCHIVE DESTINATION "lib/mariadb") -+ RUNTIME DESTINATION "${INSTALL_LIBDIR}" -+ LIBRARY DESTINATION "${INSTALL_LIBDIR}" -+ ARCHIVE DESTINATION "${INSTALL_LIBDIR}") - IF(NOT WIN32 AND WITH_MYSQLCOMPAT) - INSTALL(FILES "${CMAKE_BINARY_DIR}/libmariadb/libmysql${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient_r${CMAKE_SHARED_LIBRARY_SUFFIX}" - "${CMAKE_BINARY_DIR}/libmariadb/libmysqlclient${CMAKE_STATIC_LIBRARY_SUFFIX}" -- DESTINATION lib/mariadb) -+ DESTINATION ${INSTALL_LIBDIR}) - ENDIF() - - INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include/ -diff -aurN mariadb_client-2.0.0-src/mariadb_config/mariadb_config.c.in mariadb_client-2.0.0-src.new/mariadb_config/mariadb_config.c.in ---- mariadb_client-2.0.0-src/mariadb_config/mariadb_config.c.in 2014-03-18 11:01:05.000000000 -0400 -+++ mariadb_client-2.0.0-src.new/mariadb_config/mariadb_config.c.in 2014-04-03 16:16:52.455669572 -0400 -@@ -4,7 +4,7 @@ - #include <stdio.h> - - #define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/include/mariadb" --#define LIBS "-L@CMAKE_INSTALL_PREFIX@/lib/mariadb -lmariadb" \ -+#define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@ -lmariadb" \ - "@extra_dynamic_LDFLAGS@" - #define CFLAGS INCLUDE "@CMAKE_C_FLAGS@" - #define VERSION "@MYSQL_CLIENT_VERSION@" diff --git a/dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch b/dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch deleted file mode 100644 index 8a54d02..0000000 --- a/dev-db/mariadb-connector-c/files/fix-mariadb_config-2.1.0.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -aruN a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in ---- a/mariadb_config/mariadb_config.c.in 2015-01-29 13:21:48.000000000 -0500 -+++ b/mariadb_config/mariadb_config.c.in 2015-01-30 13:03:01.312548413 -0500 - -@@ -6,7 +6,7 @@ - #define INCLUDE "-I@PREFIX_INSTALL_DIR@/@INCLUDE_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@ -I@PREFIX_INSTALL_DIR@/@INCLUDE_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@/mysql" - #define LIBS "-L@PREFIX_INSTALL_DIR@/@LIB_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@ -lmariadb" \ - "@extra_dynamic_LDFLAGS@" --#define CFLAGS INCLUDE " @CMAKE_C_FLAGS@" -+#define CFLAGS INCLUDE - #define VERSION "@MYSQL_CLIENT_VERSION@" - #define PLUGIN_DIR "@PREFIX_INSTALL_DIR@/@SUFFIX_INSTALL_DIR@/@PLUGIN_INSTALL_DIR@" - #define SOCKET "@MYSQL_UNIX_ADDR@" diff --git a/dev-db/mariadb-connector-c/files/fix-mariadb_config.patch b/dev-db/mariadb-connector-c/files/fix-mariadb_config.patch deleted file mode 100644 index 444c877..0000000 --- a/dev-db/mariadb-connector-c/files/fix-mariadb_config.patch +++ /dev/null @@ -1,25 +0,0 @@ -diff -aurN a/mariadb_config/CMakeLists.txt b/mariadb_config/CMakeLists.txt ---- a/mariadb_config/CMakeLists.txt 2014-04-29 12:44:35.309693578 -0400 -+++ b/mariadb_config/CMakeLists.txt 2014-04-29 12:43:25.511924411 -0400 -@@ -19,7 +19,8 @@ - SEARCH_LIBRARY(LIBDL dlopen "dl") - SEARCH_LIBRARY(LIBM floor m) - FOREACH(lib ${EXTRA_LIBS}) -- SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -l${lib}") -+ STRING(REPLACE "-l" "" clean_lib ${lib}) -+ SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -l${clean_lib}") - ENDFOREACH() - IF(WITH_SQLITE) - SET(extra_dynamic_LDFLAGS "${extra_dynamic_LDFLAGS} -lsqlite") -diff -aurN a/mariadb_config/mariadb_config.c.in b/mariadb_config/mariadb_config.c.in ---- a/mariadb_config/mariadb_config.c.in 2014-04-29 12:44:22.320108741 -0400 -+++ b/mariadb_config/mariadb_config.c.in 2014-04-29 12:41:54.934819014 -0400 -@@ -6,7 +6,7 @@ - #define INCLUDE "-I@CMAKE_INSTALL_PREFIX@/include/mariadb" - #define LIBS "-L@CMAKE_INSTALL_PREFIX@/@INSTALL_LIBDIR@ -lmariadb" \ - "@extra_dynamic_LDFLAGS@" --#define CFLAGS INCLUDE "@CMAKE_C_FLAGS@" -+#define CFLAGS INCLUDE " @CMAKE_C_FLAGS@" - #define VERSION "@MYSQL_CLIENT_VERSION@" - #define SOCKET "@MYSQL_UNIX_ADDR@" - #define PORT "@MYSQL_PORT@" diff --git a/dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch b/dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch deleted file mode 100644 index dd43133..0000000 --- a/dev-db/mariadb-connector-c/files/gentoo-layout-2.2.2.patch +++ /dev/null @@ -1,24 +0,0 @@ -diff -aurN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-12-08 02:50:35.000000000 -0500 -+++ b/cmake/install.cmake 2016-02-12 21:40:46.599011426 -0500 -@@ -120,12 +120,6 @@ - SET(PREFIX_INSTALL_DIR_${INSTALL_LAYOUT} ${PREFIX_INSTALL_DIR}) - ENDIF() - --IF(NOT SUFFIX_INSTALL_DIR) -- SET(SUFFIX_INSTALL_DIR_${INSTALL_LAYOUT} "mariadb") --ELSE() -- SET(SUFFIX_INSTALL_DIR_${INSTALL_LAYOUT} ${SUFFIX_INSTALL_DIR}) --ENDIF() -- - FOREACH(dir "BIN" "LIB" "INCLUDE" "DOCS" "PREFIX" "SUFFIX" "PLUGIN") - SET(${dir}_INSTALL_DIR ${${dir}_INSTALL_DIR_${INSTALL_LAYOUT}}) - MARK_AS_ADVANCED(${dir}_INSTALL_DIR) ---- a/mariadb_config/CMakeLists.txt 2016-02-12 21:21:06.981021227 -0500 -+++ b/mariadb_config/CMakeLists.txt 2016-02-12 22:06:02.397130410 -0500 -@@ -33,4 +33,4 @@ - # Installation - # - INSTALL(TARGETS mariadb_config -- DESTINATION "bin") -+ DESTINATION ${BIN_INSTALL_DIR}) diff --git a/dev-db/mariadb-connector-c/files/gentoo-layout.patch b/dev-db/mariadb-connector-c/files/gentoo-layout.patch deleted file mode 100644 index 5663a37..0000000 --- a/dev-db/mariadb-connector-c/files/gentoo-layout.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff -uarN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 -+++ b/cmake/install.cmake 2015-03-18 14:43:14.682768210 -0400 -@@ -39,12 +39,14 @@ - ENDIF() - - SET(INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE -- STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip) and RPM") -+ STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), GENTOO, and RPM") - - # On Windows we only provide zip and .msi. Latter one uses a different packager. - IF(UNIX) - IF(INSTALL_LAYOUT MATCHES "RPM") - SET(libmariadb_prefix "/usr") -+ ELSEIF(INSTALL_LAYOUT MATCHES "GENTOO") -+ SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX}) - ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT") - SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX}) - ENDIF() -@@ -55,7 +57,7 @@ - ENDIF() - - # check if the specified installation layout is valid --SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM") -+SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "GENTOO") - LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" layout_no) - IF(layout_no EQUAL -1) - MESSAGE(FATAL_ERROR "Invalid installation layout. Please specify one of the following layouts: ${VALID_INSTALL_LAYOUTS}") -diff -uarN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 -+++ b/cmake/install.cmake 2015-03-18 14:39:35.240617655 -0400 -@@ -79,6 +79,16 @@ - SET(PLUGIN_INSTALL_DIR_DEFAULT "lib/plugin") - - # -+# Gentoo layout -+# -+SET(SUFFIX_INSTALL_DIR_GENTOO "") -+SET(BIN_INSTALL_DIR_GENTOO "bin") -+SET(LIB_INSTALL_DIR_GENTOO "lib") -+SET(INCLUDE_INSTALL_DIR_GENTOO "include/mariadb") -+SET(DOCS_INSTALL_DIR_GENTOO "share/docs") -+SET(PLUGIN_INSTALL_DIR_GENTOO "lib/mariadb/plugin") -+ -+# - # RPM layout - # - SET(SUFFIX_INSTALL_DIR_RPM "mariadb") -diff -uarN a/cmake/install.cmake b/cmake/install.cmake ---- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 -+++ b/cmake/install.cmake 2015-03-18 14:31:56.156920869 -0400 -@@ -118,8 +118,5 @@ - SET(PREFIX_INSTALL_DIR_${INSTALL_LAYOUT} ${libmariadb_prefix}) - ENDIF() - --IF(NOT SUFFIX_INSTALL_DIR) -- SET(SUFFIX_INSTALL_DIR_${INSTALL_LAYOUT} "mariadb") --ENDIF() - - FOREACH(dir "BIN" "LIB" "INCLUDE" "DOCS" "PREFIX" "SUFFIX" "PLUGIN") diff --git a/dev-db/mariadb-connector-c/files/multilib-install.patch b/dev-db/mariadb-connector-c/files/multilib-install.patch deleted file mode 100644 index 6dfa270..0000000 --- a/dev-db/mariadb-connector-c/files/multilib-install.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff -aruN a/CMakeLists.txt b/CMakeLists.txt ---- a/libmysql/CMakeLists.txt 2013-05-17 14:16:47.621519747 -0400 -+++ b/libmysql/CMakeLists.txt 2013-05-17 14:18:04.570428917 -0400 -@@ -166,9 +166,9 @@ - - INSTALL(TARGETS - libmariadb mariadbclient -- RUNTIME DESTINATION "lib" -- LIBRARY DESTINATION "lib" -- ARCHIVE DESTINATION "lib") -+ RUNTIME DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}") - - INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/include - DESTINATION mariadbclient) diff --git a/dev-db/mariadb-connector-c/files/patches/3.0.3/gentoo-layout.patch b/dev-db/mariadb-connector-c/files/patches/3.0.3/gentoo-layout.patch new file mode 100644 index 0000000..428c91e --- /dev/null +++ b/dev-db/mariadb-connector-c/files/patches/3.0.3/gentoo-layout.patch @@ -0,0 +1,55 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +--- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 ++++ b/cmake/install.cmake 2015-03-18 14:43:14.682768210 -0400 +@@ -31,12 +31,12 @@ + ENDIF() + + SET(INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE +- STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), RPM and DEB") ++ STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), GENTOO, DEB, and RPM") + + # On Windows we only provide zip and .msi. Latter one uses a different packager. + IF(UNIX) + IF(INSTALL_LAYOUT MATCHES "RPM") + SET(libmariadb_prefix "/usr") +- ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT|DEB") ++ ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT|DEB|GENTOO") + SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX}) + ENDIF() + ENDIF() +@@ -47,7 +47,7 @@ + ENDIF() + + # check if the specified installation layout is valid +-SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "DEB") ++SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "DEB" "GENTOO") + LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" layout_no) + IF(layout_no EQUAL -1) + MESSAGE(FATAL_ERROR "Invalid installation layout ${INSTALL_LAYOUT}. Please specify one of the following layouts: ${VALID_INSTALL_LAYOUTS}") +@@ -71,6 +71,16 @@ + SET(INSTALL_PLUGINDIR_DEFAULT "lib/mariadb/plugin") + SET(LIBMARIADB_STATIC_DEFAULT "mariadbclient") + # ++# Gentoo layout ++# ++SET(SUFFIX_INSTALL_DIR_GENTOO "") ++SET(BIN_INSTALL_DIR_GENTOO "bin") ++SET(LIB_INSTALL_DIR_GENTOO "lib") ++SET(INCLUDE_INSTALL_DIR_GENTOO "include/mariadb") ++SET(DOCS_INSTALL_DIR_GENTOO "share/docs") ++SET(PLUGIN_INSTALL_DIR_GENTOO "lib/mariadb/plugin") ++SET(LIBMARIADB_STATIC_GENTOO "mariadbclient") ++# + # RPM layout + # + SET(INSTALL_BINDIR_RPM "bin") +@@ -121,9 +131,6 @@ + SET(INSTALL_PREFIXDIR_${INSTALL_LAYOUT} ${INSTALL_PREFIXDIR}) + ENDIF() + +-IF(DEFINED INSTALL_SUFFIXDIR) +- SET(INSTALL_SUFFIXDIR_${INSTALL_LAYOUT} ${INSTALL_SUFFIXDIR}) +-ENDIF() + + FOREACH(dir "BIN" "LIB" "INCLUDE" "DOCS" "PLUGIN") + SET(INSTALL_${dir}DIR ${INSTALL_${dir}DIR_${INSTALL_LAYOUT}}) diff --git a/dev-db/mariadb-connector-c/files/patches/9999/gentoo-layout.patch b/dev-db/mariadb-connector-c/files/patches/9999/gentoo-layout.patch new file mode 100644 index 0000000..428c91e --- /dev/null +++ b/dev-db/mariadb-connector-c/files/patches/9999/gentoo-layout.patch @@ -0,0 +1,55 @@ +diff --git a/cmake/install.cmake b/cmake/install.cmake +--- a/cmake/install.cmake 2015-01-29 13:21:48.000000000 -0500 ++++ b/cmake/install.cmake 2015-03-18 14:43:14.682768210 -0400 +@@ -31,12 +31,12 @@ + ENDIF() + + SET(INSTALL_LAYOUT ${INSTALL_LAYOUT} CACHE +- STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), RPM and DEB") ++ STRING "Installation layout. Currently supported options are DEFAULT (tar.gz and zip), GENTOO, DEB, and RPM") + + # On Windows we only provide zip and .msi. Latter one uses a different packager. + IF(UNIX) + IF(INSTALL_LAYOUT MATCHES "RPM") + SET(libmariadb_prefix "/usr") +- ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT|DEB") ++ ELSEIF(INSTALL_LAYOUT MATCHES "DEFAULT|DEB|GENTOO") + SET(libmariadb_prefix ${CMAKE_INSTALL_PREFIX}) + ENDIF() + ENDIF() +@@ -47,7 +47,7 @@ + ENDIF() + + # check if the specified installation layout is valid +-SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "DEB") ++SET(VALID_INSTALL_LAYOUTS "DEFAULT" "RPM" "DEB" "GENTOO") + LIST(FIND VALID_INSTALL_LAYOUTS "${INSTALL_LAYOUT}" layout_no) + IF(layout_no EQUAL -1) + MESSAGE(FATAL_ERROR "Invalid installation layout ${INSTALL_LAYOUT}. Please specify one of the following layouts: ${VALID_INSTALL_LAYOUTS}") +@@ -71,6 +71,16 @@ + SET(INSTALL_PLUGINDIR_DEFAULT "lib/mariadb/plugin") + SET(LIBMARIADB_STATIC_DEFAULT "mariadbclient") + # ++# Gentoo layout ++# ++SET(SUFFIX_INSTALL_DIR_GENTOO "") ++SET(BIN_INSTALL_DIR_GENTOO "bin") ++SET(LIB_INSTALL_DIR_GENTOO "lib") ++SET(INCLUDE_INSTALL_DIR_GENTOO "include/mariadb") ++SET(DOCS_INSTALL_DIR_GENTOO "share/docs") ++SET(PLUGIN_INSTALL_DIR_GENTOO "lib/mariadb/plugin") ++SET(LIBMARIADB_STATIC_GENTOO "mariadbclient") ++# + # RPM layout + # + SET(INSTALL_BINDIR_RPM "bin") +@@ -121,9 +131,6 @@ + SET(INSTALL_PREFIXDIR_${INSTALL_LAYOUT} ${INSTALL_PREFIXDIR}) + ENDIF() + +-IF(DEFINED INSTALL_SUFFIXDIR) +- SET(INSTALL_SUFFIXDIR_${INSTALL_LAYOUT} ${INSTALL_SUFFIXDIR}) +-ENDIF() + + FOREACH(dir "BIN" "LIB" "INCLUDE" "DOCS" "PLUGIN") + SET(INSTALL_${dir}DIR ${INSTALL_${dir}DIR_${INSTALL_LAYOUT}}) diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-2.3.1.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild index 5c7f0f6..d07b484 100644 --- a/dev-db/mariadb-connector-c/mariadb-connector-c-2.3.1.ebuild +++ b/dev-db/mariadb-connector-c/mariadb-connector-c-3.0.3.ebuild @@ -1,29 +1,31 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ EAPI=6 VCS_INHERIT="" if [[ "${PV}" == 9999 ]] ; then VCS_INHERIT="git-r3" - EGIT_REPO_URI="https://github.com/MariaDB/connector-c.git" + EGIT_REPO_URI="https://github.com/MariaDB/mariadb-connector-c.git" KEYWORDS="" else MY_PN=${PN#mariadb-} SRC_URI="https://downloads.mariadb.org/f/${MY_PN}-${PV}/${P}-src.tar.gz?serve -> ${P}-src.tar.gz" S="${WORKDIR}" KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${P}-src" fi -inherit cmake-utils multilib-minimal ${VCS_INHERIT} +inherit cmake-utils multilib-minimal patches ${VCS_INHERIT} -MULTILIB_CHOST_TOOLS=( /usr/sbin/mariadb_config ) +MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config ) MULTILIB_WRAPPED_HEADERS+=( /usr/include/mariadb/my_config.h + /usr/include/mariadb/mariadb_version.h ) + DESCRIPTION="C client library for MariaDB/MySQL" HOMEPAGE="http://mariadb.org/" LICENSE="LGPL-2.1" @@ -31,34 +33,33 @@ LICENSE="LGPL-2.1" SLOT="0/2" IUSE="mysqlcompat +ssl static-libs" -DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}] +DEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] virtual/libiconv:=[${MULTILIB_USEDEP}] ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - " -RDEPEND="${DEPEND} - mysqlcompat? ( - !dev-db/mysql - !dev-db/mysql-cluster !dev-db/mariadb - !dev-db/mariadb-galera - !dev-db/percona-server - !dev-db/mysql-connector-c ) " -PATCHES=( "${FILESDIR}/fix-mariadb_config-2.1.0.patch" - "${FILESDIR}/gentoo-layout-2.2.2.patch" ) - -S="${WORKDIR}/${P}-src" +RDEPEND=" + ${DEPEND} + mysqlcompat? ( + !dev-db/mysql + !dev-db/mysql-cluster + !dev-db/mariadb-galera + !dev-db/percona-server + !dev-db/mysql-connector-c + ) +" multilib_src_configure() { mycmakeargs+=( - -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DMARIADB_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" -DWITH_EXTERNAL_ZLIB=ON - -DWITH_OPENSSL=$(usex ssl ON OFF) + -DWITH_SSL=$(usex ssl ON OFF) -DWITH_MYSQLCOMPAT=$(usex mysqlcompat ON OFF) - -DLIB_INSTALL_DIR=$(get_libdir) - -DPLUGIN_INSTALL_DIR=$(get_libdir)/mariadb/plugin - -DDOCS_INSTALL_DIR=share/docs - -DBIN_INSTALL_DIR=sbin + -DINSTALL_LIBDIR=$(get_libdir) + -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin + -DINSTALL_DOCSDIR=share/docs + -DINSTALL_BINDIR=bin ) cmake-utils_src_configure } @@ -68,7 +69,7 @@ multilib_src_install_all() { find "${D}" -name "*.a" -delete || die fi if use mysqlcompat ; then - dosym /usr/sbin/mariadb_config /usr/bin/mysql_config + dosym /usr/bin/mariadb_config /usr/bin/mysql_config dosym mariadb /usr/include/mysql fi } diff --git a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild index 497147f..d07b484 100644 --- a/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild +++ b/dev-db/mariadb-connector-c/mariadb-connector-c-9999.ebuild @@ -1,8 +1,7 @@ -# Copyright 1999-2015 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ -EAPI=5 +EAPI=6 VCS_INHERIT="" if [[ "${PV}" == 9999 ]] ; then @@ -11,23 +10,22 @@ if [[ "${PV}" == 9999 ]] ; then KEYWORDS="" else MY_PN=${PN#mariadb-} - SRC_URI=" - http://ftp.osuosl.org/pub/mariadb/${MY_PN}-${PV}/source-tgz/${P}-src.tar.gz - http://mirrors.fe.up.pt/pub/mariadb/${MY_PN}-${PV}/source-tgz/${P}-src.tar.gz - http://ftp-stud.hs-esslingen.de/pub/Mirrors/mariadb/${MY_PN}-${PV}/source-tgz/${P}-src.tar.gz - " - S="${WORKDIR}/${P}-src" + SRC_URI="https://downloads.mariadb.org/f/${MY_PN}-${PV}/${P}-src.tar.gz?serve -> ${P}-src.tar.gz" + S="${WORKDIR}" KEYWORDS="~amd64 ~x86" + S="${WORKDIR}/${P}-src" fi -inherit cmake-multilib eutils ${VCS_INHERIT} +inherit cmake-utils multilib-minimal patches ${VCS_INHERIT} MULTILIB_CHOST_TOOLS=( /usr/bin/mariadb_config ) MULTILIB_WRAPPED_HEADERS+=( /usr/include/mariadb/my_config.h + /usr/include/mariadb/mariadb_version.h ) + DESCRIPTION="C client library for MariaDB/MySQL" HOMEPAGE="http://mariadb.org/" LICENSE="LGPL-2.1" @@ -35,37 +33,33 @@ LICENSE="LGPL-2.1" SLOT="0/2" IUSE="mysqlcompat +ssl static-libs" -DEPEND="sys-libs/zlib:=[${MULTILIB_USEDEP}] +DEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] virtual/libiconv:=[${MULTILIB_USEDEP}] ssl? ( dev-libs/openssl:0=[${MULTILIB_USEDEP}] ) - " -# Block server packages due to /usr/bin/mariadb_config symlink there -# TODO: make server package block only when mysqlcompat is enabled -RDEPEND="${DEPEND} - !dev-db/mysql - !dev-db/mysql-cluster !dev-db/mariadb - !dev-db/mariadb-galera - !dev-db/percona-server - mysqlcompat? ( !dev-db/mysql-connector-c ) " - -src_prepare() { - epatch \ - "${FILESDIR}/fix-mariadb_config-2.1.0.patch" \ - "${FILESDIR}/gentoo-layout.patch" - epatch_user -} +RDEPEND=" + ${DEPEND} + mysqlcompat? ( + !dev-db/mysql + !dev-db/mysql-cluster + !dev-db/mariadb-galera + !dev-db/percona-server + !dev-db/mysql-connector-c + ) +" multilib_src_configure() { mycmakeargs+=( - -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DMARIADB_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" -DWITH_EXTERNAL_ZLIB=ON - $(cmake-utils_use_with ssl OPENSSL) - $(cmake-utils_use_with mysqlcompat MYSQLCOMPAT) - -DLIB_INSTALL_DIR=$(get_libdir) - -DPLUGIN_INSTALL_DIR=$(get_libdir)/mariadb/plugin - -DINSTALL_LAYOUT=GENTOO + -DWITH_SSL=$(usex ssl ON OFF) + -DWITH_MYSQLCOMPAT=$(usex mysqlcompat ON OFF) + -DINSTALL_LIBDIR=$(get_libdir) + -DINSTALL_PLUGINDIR=$(get_libdir)/mariadb/plugin + -DINSTALL_DOCSDIR=share/docs + -DINSTALL_BINDIR=bin ) cmake-utils_src_configure } @@ -75,7 +69,7 @@ multilib_src_install_all() { find "${D}" -name "*.a" -delete || die fi if use mysqlcompat ; then - dosym mariadb_config /usr/bin/mysql_config + dosym /usr/bin/mariadb_config /usr/bin/mysql_config dosym mariadb /usr/include/mysql fi } diff --git a/eclass/patches.eclass b/eclass/patches.eclass new file mode 100644 index 0000000..d8173cd --- /dev/null +++ b/eclass/patches.eclass @@ -0,0 +1,60 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# @ECLASS: patches.eclass +# @MAINTAINER: +# mva +# @AUTHOR: +# mva +# @BLURB: +# @DESCRIPTION: +# Eclass that checks for patches directories existance and auto-add them into PATCHES=() + +EXPORT_FUNCTIONS src_prepare + +PATCHDIR="${FILESDIR}/patches/${PV}" +[[ -z ${PATCHES[@]} ]] && PATCHES=() + +patches_src_prepare() { + if [[ -d "${PATCHDIR}" ]]; then + _patchdir_not_empty() { + local has_files + local LC_ALL=POSIX + local prev_shopt=$(shopt -p nullglob) + shopt -s nullglob + local f + for f in "${1:-${PATCHDIR}}"/*; do + if [[ "${f}" == *.diff || "${f}" == *.patch ]] && [[ -f "${f}" || -L "${f}" ]]; then + has_files=1 + elif [[ -d "${f}" ]]; then + # recursion + _patchdir_not_empty "${f}" && has_files=1 + fi + done + ${prev_shopt} + [[ -n "${has_files}" ]]; return $? + } + + _patchdir_not_empty && PATCHES+=("${PATCHDIR}") + + if [[ -d "${PATCHDIR}/conditional" ]]; then + pushd "${PATCHDIR}/conditional" &>/dev/null + for d in *; do + if [[ -d ${d} ]]; then + if [[ "${d##no-}" == ${d} ]]; then + (use "${d}" && _patchdir_not_empty "${d}") && PATCHES+=("${PATCHDIR}/conditional/${d}") + else + (use "${d##no-}" && _patchdir_not_empty "${d}") || PATCHES+=("${PATCHDIR}/conditional/${d}") + fi + fi + done + popd &>/dev/null + fi + fi + if declare -f cmake-utils_src_prepare &>/dev/null; then + # cmake-utils_src_prepare support (to decrease kludges in the ebuilds) + cmake-utils_src_prepare + else + default_src_prepare + fi +} |