summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-09-16 10:22:50 +0100
committerSam James <sam@gentoo.org>2023-09-16 10:26:33 +0100
commit7722a685bdf969114f18a1286932b0778736783e (patch)
tree146eedd6c38c4edcd0a2414d6fd3f3453e1fd584 /dev-perl/DBD-MariaDB
parentdev-perl/Net-DNS-SEC: add 1.220.0 (diff)
downloadgentoo-7722a685bdf969114f18a1286932b0778736783e.tar.gz
gentoo-7722a685bdf969114f18a1286932b0778736783e.tar.bz2
gentoo-7722a685bdf969114f18a1286932b0778736783e.zip
dev-perl/DBD-MariaDB: add 1.230.0
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-perl/DBD-MariaDB')
-rw-r--r--dev-perl/DBD-MariaDB/DBD-MariaDB-1.230.0.ebuild134
-rw-r--r--dev-perl/DBD-MariaDB/Manifest1
2 files changed, 135 insertions, 0 deletions
diff --git a/dev-perl/DBD-MariaDB/DBD-MariaDB-1.230.0.ebuild b/dev-perl/DBD-MariaDB/DBD-MariaDB-1.230.0.ebuild
new file mode 100644
index 000000000000..65e1b804bf49
--- /dev/null
+++ b/dev-perl/DBD-MariaDB/DBD-MariaDB-1.230.0.ebuild
@@ -0,0 +1,134 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DIST_AUTHOR=PALI
+DIST_VERSION=1.23
+DIST_WIKI=tests
+inherit perl-module
+
+DESCRIPTION="MariaDB and MySQL driver for the Perl5 Database Interface (DBI)"
+
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="+mariadb mysql minimal"
+REQUIRED_USE="^^ ( mysql mariadb )"
+
+RDEPEND="
+ >=dev-perl/DBI-1.608.0
+ virtual/perl-XSLoader
+ mysql? ( dev-db/mysql-connector-c:= )
+ mariadb? ( dev-db/mariadb-connector-c:= )
+"
+DEPEND="
+ mysql? ( dev-db/mysql-connector-c:= )
+ mariadb? ( dev-db/mariadb-connector-c:= )
+"
+# New test-harness needed for parallel testing to work
+BDEPEND="
+ ${RDEPEND}
+ virtual/perl-Data-Dumper
+ >=dev-perl/Devel-CheckLib-1.120.0
+ virtual/perl-ExtUtils-MakeMaker
+ virtual/perl-File-Spec
+ virtual/perl-Getopt-Long
+ test? (
+ !minimal? (
+ >=dev-perl/Net-SSLeay-1.430.0
+ dev-perl/Proc-ProcessTable
+ virtual/perl-Storable
+ )
+ mariadb? ( dev-db/mariadb:* )
+ mysql? ( dev-db/mysql:* )
+ virtual/perl-Encode
+ virtual/perl-File-Temp
+ dev-perl/Test-Deep
+ >=virtual/perl-Test-Harness-3.310.0
+ >=virtual/perl-Test-Simple-0.900.0
+ virtual/perl-Time-HiRes
+ virtual/perl-bignum
+ )
+"
+
+PERL_RM_FILES=(
+ "t/pod.t"
+ "t/manifest.t"
+)
+
+src_configure() {
+ local impl=$(usex mariadb mariadb mysql)
+
+ # These must be set at configure time
+ export DBD_MARIADB_TESTDB=test
+ export DBD_MARIADB_TESTSOCKET="${T}"/mysqld.sock
+ export DBD_MARIADB_TESTAUTHPLUGIN=mysql_native_password
+ export DBD_MARIADB_TESTUSER=root
+
+ myconf=( --${impl}_config="${BROOT}"/usr/bin/${impl}_config )
+
+ perl-module_src_configure
+}
+
+src_test() {
+ local -x USER=$(whoami)
+
+ einfo "Creating mysql test instance ..."
+ mkdir -p "${T}"/mysql || die
+ if use mariadb ; then
+ local -x PATH="${BROOT}/usr/share/mariadb/scripts:${PATH}"
+
+ mysql_install_db \
+ --no-defaults \
+ --auth-root-authentication-method=normal \
+ --basedir="${EPREFIX}/usr" \
+ --datadir="${T}"/mysql 1>"${T}"/mysqld_install.log || die
+ else
+ mysqld \
+ --no-defaults \
+ --initialize-insecure \
+ --user ${USER} \
+ --basedir="${EPREFIX}/usr" \
+ --datadir="${T}"/mysql 1>"${T}"/mysqld_install.log || die
+ fi
+
+ einfo "Starting mysql test instance ..."
+ mysqld \
+ --no-defaults \
+ --character-set-server=utf8 \
+ --bind-address=127.0.0.1 \
+ --pid-file="${T}"/mysqld.pid \
+ --socket="${T}"/mysqld.sock \
+ --datadir="${T}"/mysql 1>"${T}"/mysqld.log 2>&1 &
+
+ # Wait for it to start
+ local i
+ for (( i = 0; i < 10; i++ )); do
+ [[ -S ${T}/mysqld.sock ]] && break
+ sleep 1
+ done
+ [[ ! -S ${T}/mysqld.sock ]] && die "mysqld failed to start"
+
+ einfo "Configuring test mysql instance ..."
+ mysql -u root \
+ -e 'CREATE DATABASE /*M!50701 IF NOT EXISTS */ test' \
+ -S "${T}"/mysqld.sock || die "Failed to create test database"
+
+ # Don't be a hero and try to do EXTENDED_TESTING=1 unless you can figure
+ # out why 60leaks.t fails
+ nonfatal perl-module_src_test
+ ret=$?
+
+ einfo "Stopping mysql test instance ..."
+ pkill -F "${T}"/mysqld.pid || die
+ # wait for it to stop
+ local i
+ for (( i = 0; i < 10; i++ )); do
+ [[ -S ${T}/mysqld.sock ]] || break
+ sleep 1
+ done
+
+ rm -rf "${T}"/mysql || die
+
+ [[ ${ret} -ne 0 ]] && die
+}
diff --git a/dev-perl/DBD-MariaDB/Manifest b/dev-perl/DBD-MariaDB/Manifest
index 7ab66d85ce36..267d760d3a66 100644
--- a/dev-perl/DBD-MariaDB/Manifest
+++ b/dev-perl/DBD-MariaDB/Manifest
@@ -1,2 +1,3 @@
DIST DBD-MariaDB-1.21.tar.gz 179911 BLAKE2B dac1a868d64e792dc86ab46cea1fe2578ae691b9d6713cd83971c9ba0a3e2a0d8031c7be10dc66e4269c142aec1c54859e0e285faf9a29dc3cec7e3d8ad82a0e SHA512 0378b33e9cd31ced6f2331967c7ea63a233340bb4a60ef2bbece4843b3a62624875aa1a5e61a9fa1b709ecc8d67810c6fa4fb9ccc01df341e6d94325078f360a
DIST DBD-MariaDB-1.22.tar.gz 180783 BLAKE2B 8125c0a1ce6858e29c894ea4e11a10fc8e3776cbf016537e6d4d492773690b915dc249ddeca881fa42b229597727602209487dcdb1af03da098e38f2652d5934 SHA512 f2bd16fa609b94bd5eb538b38b122dec6a4484da062f2cc84fa6ca4a5dfc30e7ff754a00ece22a3a30297c92b4fd3f878ab0e2a581b7082cd1b9a00f33e2b2c7
+DIST DBD-MariaDB-1.23.tar.gz 186522 BLAKE2B 4202146d0c73d2e3259e54085d390d9769b46f0771b3a83a05b0203f6589ffe0f189008453448d71b5f07e8419e038ad32a1ed968c8ceffd836fb9f9cad1c9f7 SHA512 2217f36606caab477b8fa931a69b53b7f706a25cf013e4b62aa1b0b48905aba24b724604b4b99e83dea08d967848119447f35ff8e6b5eb80c7fea4e8c084de16