On Fri, Jul 17, 2015 at 05:45:14PM +0300, Vadim Zhukov wrote:
> This enables testing for p5-DBD-mysql, allowing it to pass all
> tests non-interactively. Okay?

I like it! Will have to continue shaving the yaks in the way of my
p5-DBIx-Class update and try it out there.

Non maintainer OK afresh1@


> 
> --
> WBR,
>   Vadim Zhukov
> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/databases/p5-DBD-mysql/Makefile,v
> retrieving revision 1.42
> diff -u -p -r1.42 Makefile
> --- Makefile  17 Jan 2015 00:42:16 -0000      1.42
> +++ Makefile  17 Jul 2015 14:43:22 -0000
> @@ -9,7 +9,7 @@ CATEGORIES=           databases
>  
>  MAINTAINER=          Giovanni Bechis <giova...@openbsd.org>
>  
> -MODULES=             cpan
> +MODULES=             cpan databases/mariadb
>  CPAN_AUTHOR=         CAPTTOFU
>  
>  # Perl
> @@ -23,11 +23,5 @@ LIB_DEPENDS=               databases/mariadb
>  TEST_DEPENDS=                databases/mariadb,-server \
>                       devel/p5-Test-Deep
>  WANTLIB +=           lib/mysql/mysqlclient
> -
> -TEST_IS_INTERACTIVE= Yes
> -
> -pre-test:
> -     @mysqladmin ping >/dev/null 2>&1 || (echo 'MySQL needs to be running'; 
> exit 1)
> -     -@mysqladmin create test >/dev/null 2>&1
>  
>  .include <bsd.port.mk>
> Index: patches/patch-Makefile_PL
> ===================================================================
> RCS file: /cvs/ports/databases/p5-DBD-mysql/patches/patch-Makefile_PL,v
> retrieving revision 1.3
> diff -u -p -r1.3 patch-Makefile_PL
> --- patches/patch-Makefile_PL 6 Dec 2014 14:26:44 -0000       1.3
> +++ patches/patch-Makefile_PL 17 Jul 2015 14:43:22 -0000
> @@ -2,72 +2,34 @@ $OpenBSD: patch-Makefile_PL,v 1.3 2014/1
>  
>  remove MariaDB mysql_config invalid options
>  
> ---- Makefile.PL.orig Wed Jul 30 00:14:24 2014
> -+++ Makefile.PL      Thu Nov 20 17:26:17 2014
> -@@ -19,23 +19,9 @@ our $opt = { "help" => \&Usage, };
> - Getopt::Long::GetOptions(
> -     $opt,
> -     "help",
> --    "testdb=s",
> --    "testhost=s",
> --    "testport=s",
> --    "testuser=s",
> --    "testpassword=s",
> --    "testsocket=s",
> -     "cflags=s",
> -     "libs=s",
> --    "verbose",
> --    "ps-protocol",
> --    "bind-type-guessing",
> --    "nocatchstderr",
> --    "ssl!",
> --    "nofoundrows!",
> --    "embedded=s",
> -     "mysql_config=s",
> --    "force-embedded",
> +--- Makefile.PL.orig Sat Nov 15 03:04:16 2014
> ++++ Makefile.PL      Thu Jan 22 00:26:27 2015
> +@@ -39,6 +39,12 @@ Getopt::Long::GetOptions(
>       "with-mysql=s"
>       ) || die Usage();
>   
> -@@ -78,9 +64,7 @@ MSG
> -     $opt->{'mysql_config'} = "mysql_config";
> -   }
> - 
> --for my $key (qw/testdb testhost testuser testpassword testsocket testport
> --                    cflags embedded libs nocatchstderr ssl nofoundrows
> --                    ps-protocol bind-type-guessing force-embedded/)
> -+for my $key (qw/cflags embedded libs/)
> - {
> -   Configure($opt, $source, $key);
> - }
> -@@ -175,15 +159,6 @@ for my $key (sort { $a cmp $b} keys %$opt)
> -      $key, $source->{$key}, $opt->{$key})
> - }
> - 
> --print <<"MSG";
> --
> --To change these settings, see 'perl Makefile.PL --help' and
> --'perldoc DBD::mysql::INSTALL'.
> --
> --MSG
> --
> --sleep 5;
> --
> - eval { require File::Spec };
> - my $dsn= '';
> - if (exists $opt->{'ps-protocol'}) {
> -@@ -430,7 +405,6 @@ it can be found):
> -   mysql_config --cflags
> -   mysql_config --libs
> -   mysql_config --embedded
> --  mysql_config --testdb
> ++my %mysql_config_opts = map { $_ => 1 } (
> ++    "help",
> ++    "cflags",
> ++    "libs"
> ++    );
> ++
> + my $source = {};
>   
> - and so on. See DBD::mysql::INSTALL for details.
> - USAGE
> -@@ -467,6 +441,7 @@ sub Configure {
> +   #Check for mysql_config first
> +@@ -467,6 +473,7 @@ sub Configure {
>       }
>   
>   # First try to get options values from mysql_config
> -+
> ++if (exists $mysql_config_opts{$param}) {
>       my $command = $opt->{'mysql_config'} . " --$param";
>       eval
>       {
> +@@ -506,6 +513,7 @@ sub Configure {
> +     else {
> +         print "Can't find mysql_config. Use --mysql_config option to 
> specify where mysql_config is located\n";
> +     }
> ++}
> + 
> + # Ok, mysql_config doesn't work. We need to do our best
> + # First check environment variables
> 

-- 
andrew - http://afresh1.com

Computer analyst to programmer:
               "You start coding. I'll go find out what they want."

Reply via email to