[120168] trunk/dports/lang/qore-mysql-module
davidnichols at macports.org
davidnichols at macports.org
Sat May 17 23:03:17 PDT 2014
Revision: 120168
https://trac.macports.org/changeset/120168
Author: davidnichols at macports.org
Date: 2014-05-17 23:03:17 -0700 (Sat, 17 May 2014)
Log Message:
-----------
added mysql51, mysql55, percona variants
ensure that source is configured to use the includes and libs corresponding to the select variant
Modified Paths:
--------------
trunk/dports/lang/qore-mysql-module/Portfile
trunk/dports/lang/qore-mysql-module/files/patch-configure
Modified: trunk/dports/lang/qore-mysql-module/Portfile
===================================================================
--- trunk/dports/lang/qore-mysql-module/Portfile 2014-05-17 21:10:28 UTC (rev 120167)
+++ trunk/dports/lang/qore-mysql-module/Portfile 2014-05-18 06:03:17 UTC (rev 120168)
@@ -5,11 +5,12 @@
name qore-mysql-module
version 2.0.1
+revision 1
categories lang
license LGPL-2.1
maintainers davidnichols
description MySQL module for Qore
-long_description Module allowing communication with MySQL DBs from the Qore Programming Language
+long_description Module allowing communication with MySQL and MySQL-compatible DBs from the Qore Programming Language
use_bzip2 yes
homepage http://qore.org
platforms darwin
@@ -19,20 +20,32 @@
sha1 4c219ce39d2fc0c025e1dc46fe7a6a8bff5f0020 \
rmd160 172c9f9ebee4b638e470e096e1537d6decff3af3
-depends_lib port:qore
+patchfiles patch-configure
-configure.args --disable-debug
+variant mariadb conflicts mysql51 mysql55 mysql56 percona description {use mariadb} {}
+variant mysql51 conflicts mariadb mysql55 mysql56 percona description {use mysql 5.1} {}
+variant mysql55 conflicts mariadb mysql51 mysql56 percona description {use mysql 5.5} {}
+variant mysql56 conflicts mariadb mysql51 mysql55 percona description {use mysql 5.6} {}
+variant percona conflicts mariadb mysql51 mysql55 mysql56 description {use percona} {}
-patchfiles patch-configure
-
-variant mariadb {
- depends_lib-append port:mariadb
+if {![variant_isset mariadb] && ![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset mysql56] && ![variant_isset percona]} {
+ default_variants +mariadb
}
-variant mysql56 {
- depends_lib-append port:mysql56
+if {[variant_isset mariadb]} {
+ set mysql_port "mariadb"
+} elseif {[variant_isset mysql51]} {
+ set mysql_port "mysql51"
+} elseif {[variant_isset mysql55]} {
+ set mysql_port "mysql55"
+} elseif {[variant_isset mysql56]} {
+ set mysql_port "mysql56"
+} elseif {[variant_isset percona]} {
+ set mysql_port "percona"
}
-if {![variant_isset mariadb] && ![variant_isset mysql56]} {
- default_variants +mariadb
-}
+depends_lib port:qore \
+ port:${mysql_port}
+
+configure.args --disable-debug \
+ --with-mysql-libs=${prefix}/lib/${mysql_port} --with-mysql-includes=${prefix}/include/${mysql_port}
Modified: trunk/dports/lang/qore-mysql-module/files/patch-configure
===================================================================
--- trunk/dports/lang/qore-mysql-module/files/patch-configure 2014-05-17 21:10:28 UTC (rev 120167)
+++ trunk/dports/lang/qore-mysql-module/files/patch-configure 2014-05-18 06:03:17 UTC (rev 120168)
@@ -1,24 +1,5 @@
---- configure.orig 2014-05-17 17:13:57.000000000 +0200
-+++ configure 2014-05-17 17:14:12.000000000 +0200
-@@ -1,6 +1,6 @@
- #! /bin/sh
- # Guess values for system-dependent variables and create Makefiles.
--# Generated by GNU Autoconf 2.69 for qore-mysql-module 2.0.1.
-+# Generated by GNU Autoconf 2.69 for qore-mysql-module 2.0.2.
- #
- # Report bugs to <David Nichols <david at qore.org>>.
- #
-@@ -590,8 +590,8 @@
- # Identity of this package.
- PACKAGE_NAME='qore-mysql-module'
- PACKAGE_TARNAME='qore-mysql-module'
--PACKAGE_VERSION='2.0.1'
--PACKAGE_STRING='qore-mysql-module 2.0.1'
-+PACKAGE_VERSION='2.0.2'
-+PACKAGE_STRING='qore-mysql-module 2.0.2'
- PACKAGE_BUGREPORT='David Nichols <david at qore.org>'
- PACKAGE_URL=''
-
+--- configure.orig 2014-05-18 07:58:22.000000000 +0200
++++ configure 2014-05-18 08:00:00.000000000 +0200
@@ -713,6 +713,10 @@
LDFLAGS
CXXFLAGS
@@ -38,25 +19,16 @@
enable_dependency_tracking
enable_static
enable_shared
-@@ -1348,7 +1353,7 @@
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat <<_ACEOF
--\`configure' configures qore-mysql-module 2.0.1 to adapt to many kinds of systems.
-+\`configure' configures qore-mysql-module 2.0.2 to adapt to many kinds of systems.
-
- Usage: $0 [OPTION]... [VAR=VALUE]...
-
-@@ -1419,7 +1424,7 @@
-
- if test -n "$ac_init_help"; then
- case $ac_init_help in
-- short | recursive ) echo "Configuration of qore-mysql-module 2.0.1:";;
-+ short | recursive ) echo "Configuration of qore-mysql-module 2.0.2:";;
- esac
- cat <<\_ACEOF
-
-@@ -1427,6 +1432,8 @@
+@@ -790,6 +795,8 @@
+ enable_single_compilation_unit
+ with_doxygen
+ with_mysql
++with_mysql_libs
++with_mysql_includes
+ with_qore_dir
+ enable_profile
+ enable_debug
+@@ -1427,6 +1434,8 @@
--disable-option-checking ignore unrecognized --enable/--with options
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
@@ -65,25 +37,17 @@
--enable-dependency-tracking
do not reject slow dependency extractors
--disable-dependency-tracking
-@@ -1536,7 +1543,7 @@
- test -n "$ac_init_help" && exit $ac_status
- if $ac_init_version; then
- cat <<\_ACEOF
--qore-mysql-module configure 2.0.1
-+qore-mysql-module configure 2.0.2
- generated by GNU Autoconf 2.69
+@@ -1455,6 +1464,9 @@
+ --with-lib-prefix[=DIR] generic search prefix for libraries, includes, etc
+ --with-doxygen[=PATH] path to doxygen binary
+ --with-mysql[=DIR] MySQL base directory
++ --with-mysql-libs[=DIR] MySQL library base directory
++ --with-mysql-includes[=DIR]
++ MySQL includes base directory
+ --with-qore-dir[=DIR] Qore directory
- Copyright (C) 2012 Free Software Foundation, Inc.
-@@ -2046,7 +2053,7 @@
- This file contains any messages produced by compilers while
- running configure, to aid debugging if configure makes a mistake.
-
--It was created by qore-mysql-module $as_me 2.0.1, which was
-+It was created by qore-mysql-module $as_me 2.0.2, which was
- generated by GNU Autoconf 2.69. Invocation command line was
-
- $ $0 $@
-@@ -2394,7 +2401,7 @@
+ Some influential environment variables:
+@@ -2394,7 +2406,7 @@
ac_compiler_gnu=$ac_cv_c_compiler_gnu
@@ -92,7 +56,7 @@
ac_aux_dir=
for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
-@@ -2607,8 +2614,8 @@
+@@ -2607,8 +2619,8 @@
esac
fi
# Use eval to expand $SHELL
@@ -103,7 +67,7 @@
else
am_missing_run=
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
-@@ -2848,6 +2855,45 @@
+@@ -2848,6 +2860,45 @@
fi
rmdir .tst 2>/dev/null
@@ -149,16 +113,7 @@
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
-@@ -2870,7 +2916,7 @@
-
- # Define the identity of the package.
- PACKAGE='qore-mysql-module'
-- VERSION='2.0.1'
-+ VERSION='2.0.2'
-
-
- cat >>confdefs.h <<_ACEOF
-@@ -2911,92 +2957,173 @@
+@@ -2911,92 +2962,173 @@
AMTAR='$${TAR-tar}'
@@ -392,7 +347,7 @@
ac_config_headers="$ac_config_headers config.h"
-@@ -4243,6 +4370,65 @@
+@@ -4243,6 +4375,65 @@
ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
@@ -458,7 +413,37 @@
depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-@@ -15864,10 +16050,18 @@
+@@ -15849,6 +16040,29 @@
+ fi
+
+
++
++# Check whether --with-mysql-libs was given.
++if test "${with_mysql_libs+set}" = set; then :
++ withval=$with_mysql_libs; if test ! -d "${with_mysql_libs}"; then as_fn_error $? "directory ${with_mysql_livs} does not exist for --with-mysql-libs" "$LINENO" 5; unset with_mysql_libs; fi
++fi
++
++
++
++# Check whether --with-mysql-includes was given.
++if test "${with_mysql_includes+set}" = set; then :
++ withval=$with_mysql_includes; if test ! -d "${with_mysql_includes}"; then as_fn_error $? "directory ${with_mysql_includes} does not exist for --with-mysql-includes" "$LINENO" 5; unset with_mysql_includes; fi
++fi
++
++
++check_mysql_includes() {
++ if test "$with_mysql_includes" != "/usr/include"; then
++ mysql_app_includes=true
++ fi
++ if test "$with_mysql_libs" != "/lib${LIBSUFFIX}"; then
++ mysql_app_libs=true
++ fi
++}
++
+ check_mysql() {
+ a="$1"
+ if test \( "$a" = "/" -o -z "$a" \) -a -h "$a/lib${LIBSUFFIX}"; then
+@@ -15864,10 +16078,18 @@
with_mysql_includes=$inc
elif test -f "$inc/mysql/mysql.h"; then
with_mysql_includes=$inc/mysql
@@ -477,7 +462,7 @@
fi
fi
-@@ -15880,6 +16074,10 @@
+@@ -15880,6 +16102,10 @@
with_mysql_libs=$lib
elif test -f "$lib/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
with_mysql_libs=$lib/mysql
@@ -488,7 +473,7 @@
elif test -f "$lib/libmysqlclient_r.a"; then
with_mysql_libs=$lib
mysql_static=1
-@@ -15894,6 +16092,10 @@
+@@ -15894,6 +16120,10 @@
if test -n "$mld"; then
if test -f "$mld/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
with_mysql_libs="$mld/mysql"
@@ -499,8 +484,84 @@
elif test -f "$mld/mysql/libmysqlclient_r.a"; then
with_mysql_libs="$mld/mysql"
mysql_static=1
-@@ -16680,13 +16882,9 @@
+@@ -15904,12 +16134,7 @@
+ if test -z "$with_mysql_libs"; then
+ unset with_mysql_includes
+ else
+- if test "$with_mysql_includes" != "/usr/include"; then
+- mysql_app_includes=true
+- fi
+- if test "$with_mysql_libs" != "/lib${LIBSUFFIX}"; then
+- mysql_app_libs=true
+- fi
++ check_mysql_includes
fi
+ }
+
+@@ -15918,19 +16143,50 @@
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql includes and libraries" >&5
+ $as_echo_n "checking for mysql includes and libraries... " >&6; }
+
+- if test -n "$with_mysql"; then
+- check_mysql "$with_mysql"
+- if test -z "$with_mysql_includes"; then
+- as_fn_error $? "not found in $with_mysql" "$LINENO" 5
++ if test -n "${with_mysql_includes}"; then
++ if test ! -f "${with_mysql_includes}/mysql.h"; then
++ if test -f "${with_mysql_includes}/mysql/mysql.h"; then
++ with_mysql_includes="${with_mysql_includes}/mysql"
++ check_mysql_includes
++ else
++ as_fn_error $? "mysql.h not found in $with_mysql_includes" "$LINENO" 5
++ fi
+ fi
+- fi
+-
+- for dir in $MYSQL_DIR "${with_lib_prefix}" "${find_prefix}" / /usr /usr/local/mysql /opt/mysql /usr/mysql /sw /opt/local /opt/sfw /usr/sfw; do
+- check_mysql $dir
+- if test -n "$with_mysql_includes"; then
+- break;
++ if test -n "${with_mysql_libs}"; then
++ if test ! -f "${with_mysql_libs}/libmysqlclient_r.${SHLIB_SUFFIX}"; then
++ if test ! -f "${with_mysql_libs}/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
++ with_mysql_libs="${with_mysql_libs}/mysql"
++ else
++ if test -f "${with_mysql_libs}/libmysqlclient_r.a"; then
++ mysql_static=1
++ elif test -f "${with_mysql_libs}/mysql/libmysqlclient_r.a"; then
++ with_mysql_libs="${with_mysql_libs}/mysql"
++ mysql_static=1
++ else
++ as_fn_error $? "mysql client library not found in $with_mysql_libs" "$LINENO" 5
++ fi
++ fi
++ fi
++ else
++ as_fn_error $? "--with-mysql-libs must also be used when --with-mysql-incudes is used" "$LINENO" 5
+ fi
+- done
++ elif test -n "${with_mysql_libs}"; then
++ as_fn_error $? "--with-mysql-includes must also be used when --with-mysql-libs is used" "$LINENO" 5
++ else
++ if test -n "$with_mysql"; then
++ check_mysql "$with_mysql"
++ if test -z "$with_mysql_includes"; then
++ as_fn_error $? "not found in $with_mysql" "$LINENO" 5
++ fi
++ else
++ for dir in $MYSQL_DIR "${with_lib_prefix}" "${find_prefix}" / /usr /usr/local/mysql /opt/mysql /usr/mysql /sw /opt/local /opt/sfw /usr/sfw; do
++ check_mysql $dir
++ if test -n "$with_mysql_includes"; then
++ break;
++ fi
++ done
++ fi
++ fi
+
+ if test -n "$with_mysql_includes"; then
+ if test -n "$mysql_static"; then
+@@ -16680,13 +16936,9 @@
+ fi
fi
-# turn on some build flags for non-debugging, non-profiling builds
@@ -516,26 +577,8 @@
# turn on warnings if we know how
if test "$GXX" = "yes"; then
-@@ -17333,7 +17531,7 @@
- # report actual input values of CONFIG_FILES etc. instead of their
- # values after options handling.
- ac_log="
--This file was extended by qore-mysql-module $as_me 2.0.1, which was
-+This file was extended by qore-mysql-module $as_me 2.0.2, which was
- generated by GNU Autoconf 2.69. Invocation command line was
+@@ -18504,7 +18756,7 @@
- CONFIG_FILES = $CONFIG_FILES
-@@ -17399,7 +17597,7 @@
- cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
- ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
- ac_cs_version="\\
--qore-mysql-module config.status 2.0.1
-+qore-mysql-module config.status 2.0.2
- configured by $0, generated by GNU Autoconf 2.69,
- with options \\"\$ac_cs_config\\"
-
-@@ -18504,7 +18702,7 @@
-
case $ac_file$ac_mode in
"depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
@@ -543,7 +586,7 @@
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
-@@ -18555,7 +18753,7 @@
+@@ -18555,7 +18807,7 @@
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140517/d37722f4/attachment-0001.html>
More information about the macports-changes
mailing list