Changeset 120168


Ignore:
Timestamp:
May 18, 2014, 6:03:17 AM (5 years ago)
Author:
davidnichols@…
Message:

added mysql51, mysql55, percona variants
ensure that source is configured to use the includes and libs corresponding to the select variant

Location:
trunk/dports/lang/qore-mysql-module
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/lang/qore-mysql-module/Portfile

    r120162 r120168  
    66name                qore-mysql-module
    77version             2.0.1
     8revision            1
    89categories          lang
    910license             LGPL-2.1
    1011maintainers         davidnichols
    1112description         MySQL module for Qore
    12 long_description    Module allowing communication with MySQL DBs from the Qore Programming Language
     13long_description    Module allowing communication with MySQL and MySQL-compatible DBs from the Qore Programming Language
    1314use_bzip2           yes
    1415homepage            http://qore.org
     
    2021                    rmd160 172c9f9ebee4b638e470e096e1537d6decff3af3
    2122
    22 depends_lib         port:qore
    23 
    24 configure.args      --disable-debug
    25 
    2623patchfiles          patch-configure
    2724
    28 variant mariadb {
    29     depends_lib-append      port:mariadb
     25variant mariadb conflicts mysql51 mysql55 mysql56 percona description {use mariadb} {}
     26variant mysql51 conflicts mariadb mysql55 mysql56 percona description {use mysql 5.1} {}
     27variant mysql55 conflicts mariadb mysql51 mysql56 percona description {use mysql 5.5} {}
     28variant mysql56 conflicts mariadb mysql51 mysql55 percona description {use mysql 5.6} {}
     29variant percona conflicts mariadb mysql51 mysql55 mysql56 description {use percona} {}
     30
     31if {![variant_isset mariadb] && ![variant_isset mysql51] && ![variant_isset mysql55] && ![variant_isset mysql56] && ![variant_isset percona]} {
     32    default_variants +mariadb
    3033}
    3134
    32 variant mysql56 {
    33     depends_lib-append      port:mysql56
     35if {[variant_isset mariadb]} {
     36    set mysql_port "mariadb"
     37} elseif {[variant_isset mysql51]} {
     38    set mysql_port "mysql51"
     39} elseif {[variant_isset mysql55]} {
     40    set mysql_port "mysql55"
     41} elseif {[variant_isset mysql56]} {
     42    set mysql_port "mysql56"
     43} elseif {[variant_isset percona]} {
     44    set mysql_port "percona"
    3445}
    3546
    36 if {![variant_isset mariadb] && ![variant_isset mysql56]} {
    37     default_variants +mariadb
    38 }
     47depends_lib         port:qore \
     48                    port:${mysql_port}
     49
     50configure.args      --disable-debug \
     51                    --with-mysql-libs=${prefix}/lib/${mysql_port} --with-mysql-includes=${prefix}/include/${mysql_port}
  • trunk/dports/lang/qore-mysql-module/files/patch-configure

    r120162 r120168  
    1 --- configure.orig      2014-05-17 17:13:57.000000000 +0200
    2 +++ configure   2014-05-17 17:14:12.000000000 +0200
    3 @@ -1,6 +1,6 @@
    4  #! /bin/sh
    5  # Guess values for system-dependent variables and create Makefiles.
    6 -# Generated by GNU Autoconf 2.69 for qore-mysql-module 2.0.1.
    7 +# Generated by GNU Autoconf 2.69 for qore-mysql-module 2.0.2.
    8  #
    9  # Report bugs to <David Nichols <david@qore.org>>.
    10  #
    11 @@ -590,8 +590,8 @@
    12  # Identity of this package.
    13  PACKAGE_NAME='qore-mysql-module'
    14  PACKAGE_TARNAME='qore-mysql-module'
    15 -PACKAGE_VERSION='2.0.1'
    16 -PACKAGE_STRING='qore-mysql-module 2.0.1'
    17 +PACKAGE_VERSION='2.0.2'
    18 +PACKAGE_STRING='qore-mysql-module 2.0.2'
    19  PACKAGE_BUGREPORT='David Nichols <david@qore.org>'
    20  PACKAGE_URL=''
    21  
     1--- configure.orig      2014-05-18 07:58:22.000000000 +0200
     2+++ configure   2014-05-18 08:00:00.000000000 +0200
    223@@ -713,6 +713,10 @@
    234 LDFLAGS
     
    3920 enable_static
    4021 enable_shared
    41 @@ -1348,7 +1353,7 @@
    42    # Omit some internal or obsolete options to make the list less imposing.
    43    # This message is too long to be a string in the A/UX 3.1 sh.
    44    cat <<_ACEOF
    45 -\`configure' configures qore-mysql-module 2.0.1 to adapt to many kinds of systems.
    46 +\`configure' configures qore-mysql-module 2.0.2 to adapt to many kinds of systems.
    47  
    48  Usage: $0 [OPTION]... [VAR=VALUE]...
    49  
    50 @@ -1419,7 +1424,7 @@
    51  
    52  if test -n "$ac_init_help"; then
    53    case $ac_init_help in
    54 -     short | recursive ) echo "Configuration of qore-mysql-module 2.0.1:";;
    55 +     short | recursive ) echo "Configuration of qore-mysql-module 2.0.2:";;
    56     esac
    57    cat <<\_ACEOF
    58  
    59 @@ -1427,6 +1432,8 @@
     22@@ -790,6 +795,8 @@
     23 enable_single_compilation_unit
     24 with_doxygen
     25 with_mysql
     26+with_mysql_libs
     27+with_mysql_includes
     28 with_qore_dir
     29 enable_profile
     30 enable_debug
     31@@ -1427,6 +1434,8 @@
    6032   --disable-option-checking  ignore unrecognized --enable/--with options
    6133   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
     
    6638                           do not reject slow dependency extractors
    6739   --disable-dependency-tracking
    68 @@ -1536,7 +1543,7 @@
    69  test -n "$ac_init_help" && exit $ac_status
    70  if $ac_init_version; then
    71    cat <<\_ACEOF
    72 -qore-mysql-module configure 2.0.1
    73 +qore-mysql-module configure 2.0.2
    74  generated by GNU Autoconf 2.69
    75  
    76  Copyright (C) 2012 Free Software Foundation, Inc.
    77 @@ -2046,7 +2053,7 @@
    78  This file contains any messages produced by compilers while
    79  running configure, to aid debugging if configure makes a mistake.
    80  
    81 -It was created by qore-mysql-module $as_me 2.0.1, which was
    82 +It was created by qore-mysql-module $as_me 2.0.2, which was
    83  generated by GNU Autoconf 2.69.  Invocation command line was
    84  
    85    $ $0 $@
    86 @@ -2394,7 +2401,7 @@
     40@@ -1455,6 +1464,9 @@
     41   --with-lib-prefix[=DIR] generic search prefix for libraries, includes, etc
     42   --with-doxygen[=PATH]   path to doxygen binary
     43   --with-mysql[=DIR]      MySQL base directory
     44+  --with-mysql-libs[=DIR] MySQL library base directory
     45+  --with-mysql-includes[=DIR]
     46+                          MySQL includes base directory
     47   --with-qore-dir[=DIR]   Qore directory
     48 
     49 Some influential environment variables:
     50@@ -2394,7 +2406,7 @@
    8751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
    8852 
     
    9357 ac_aux_dir=
    9458 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
    95 @@ -2607,8 +2614,8 @@
     59@@ -2607,8 +2619,8 @@
    9660   esac
    9761 fi
     
    10468   am_missing_run=
    10569   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
    106 @@ -2848,6 +2855,45 @@
     70@@ -2848,6 +2860,45 @@
    10771 fi
    10872 rmdir .tst 2>/dev/null
     
    150114   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
    151115   # is not polluted with repeated "-I."
    152 @@ -2870,7 +2916,7 @@
    153  
    154  # Define the identity of the package.
    155   PACKAGE='qore-mysql-module'
    156 - VERSION='2.0.1'
    157 + VERSION='2.0.2'
    158  
    159  
    160  cat >>confdefs.h <<_ACEOF
    161 @@ -2911,92 +2957,173 @@
     116@@ -2911,92 +2962,173 @@
    162117 AMTAR='$${TAR-tar}'
    163118 
     
    393348 
    394349 
    395 @@ -4243,6 +4370,65 @@
     350@@ -4243,6 +4375,65 @@
    396351 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
    397352 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     
    459414 
    460415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
    461 @@ -15864,10 +16050,18 @@
     416@@ -15849,6 +16040,29 @@
     417 fi
     418 
     419 
     420+
     421+# Check whether --with-mysql-libs was given.
     422+if test "${with_mysql_libs+set}" = set; then :
     423+  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
     424+fi
     425+
     426+
     427+
     428+# Check whether --with-mysql-includes was given.
     429+if test "${with_mysql_includes+set}" = set; then :
     430+  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
     431+fi
     432+
     433+
     434+check_mysql_includes() {
     435+   if test "$with_mysql_includes" != "/usr/include"; then
     436+      mysql_app_includes=true
     437+   fi
     438+   if test "$with_mysql_libs" != "/lib${LIBSUFFIX}"; then
     439+      mysql_app_libs=true
     440+   fi
     441+}
     442+
     443 check_mysql() {
     444     a="$1"
     445     if test \( "$a" = "/" -o -z "$a" \) -a -h "$a/lib${LIBSUFFIX}"; then
     446@@ -15864,10 +16078,18 @@
    462447        with_mysql_includes=$inc
    463448     elif test -f "$inc/mysql/mysql.h"; then
     
    478463     fi
    479464 
    480 @@ -15880,6 +16074,10 @@
     465@@ -15880,6 +16102,10 @@
    481466        with_mysql_libs=$lib
    482467     elif test -f "$lib/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
     
    489474        with_mysql_libs=$lib
    490475        mysql_static=1
    491 @@ -15894,6 +16092,10 @@
     476@@ -15894,6 +16120,10 @@
    492477        if test -n "$mld"; then
    493478           if test -f "$mld/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
     
    500485             with_mysql_libs="$mld/mysql"
    501486             mysql_static=1
    502 @@ -16680,13 +16882,9 @@
     487@@ -15904,12 +16134,7 @@
     488     if test -z "$with_mysql_libs"; then
     489        unset with_mysql_includes
     490     else
     491-       if test "$with_mysql_includes" != "/usr/include"; then
     492-          mysql_app_includes=true
     493-        fi
     494-       if test "$with_mysql_libs" != "/lib${LIBSUFFIX}"; then
     495-          mysql_app_libs=true
     496-       fi
     497+        check_mysql_includes
     498     fi
     499 }
     500 
     501@@ -15918,19 +16143,50 @@
     502    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mysql includes and libraries" >&5
     503 $as_echo_n "checking for mysql includes and libraries... " >&6; }
     504 
     505-   if test -n "$with_mysql"; then
     506-      check_mysql "$with_mysql"
     507-      if test -z "$with_mysql_includes"; then
     508-        as_fn_error $? "not found in $with_mysql" "$LINENO" 5
     509+   if test -n "${with_mysql_includes}"; then
     510+      if test ! -f "${with_mysql_includes}/mysql.h"; then
     511+         if test -f "${with_mysql_includes}/mysql/mysql.h"; then
     512+           with_mysql_includes="${with_mysql_includes}/mysql"
     513+            check_mysql_includes
     514+         else
     515+            as_fn_error $? "mysql.h not found in $with_mysql_includes" "$LINENO" 5
     516+         fi
     517       fi
     518-   fi
     519-
     520-   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
     521-      check_mysql $dir
     522-      if test -n "$with_mysql_includes"; then
     523-        break;
     524+      if test -n "${with_mysql_libs}"; then
     525+         if test ! -f "${with_mysql_libs}/libmysqlclient_r.${SHLIB_SUFFIX}"; then
     526+           if test ! -f "${with_mysql_libs}/mysql/libmysqlclient_r.${SHLIB_SUFFIX}"; then
     527+               with_mysql_libs="${with_mysql_libs}/mysql"
     528+            else
     529+               if test -f "${with_mysql_libs}/libmysqlclient_r.a"; then
     530+                  mysql_static=1
     531+               elif test -f "${with_mysql_libs}/mysql/libmysqlclient_r.a"; then
     532+                  with_mysql_libs="${with_mysql_libs}/mysql"
     533+                  mysql_static=1
     534+              else
     535+                  as_fn_error $? "mysql client library not found in $with_mysql_libs" "$LINENO" 5
     536+               fi
     537+            fi
     538+         fi
     539+      else
     540+         as_fn_error $? "--with-mysql-libs must also be used when --with-mysql-incudes is used" "$LINENO" 5
     541       fi
     542-   done
     543+   elif test -n "${with_mysql_libs}"; then
     544+      as_fn_error $? "--with-mysql-includes must also be used when --with-mysql-libs is used" "$LINENO" 5
     545+   else
     546+      if test -n "$with_mysql"; then
     547+         check_mysql "$with_mysql"
     548+         if test -z "$with_mysql_includes"; then
     549+           as_fn_error $? "not found in $with_mysql" "$LINENO" 5
     550+         fi
     551+      else
     552+         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
     553+            check_mysql $dir
     554+            if test -n "$with_mysql_includes"; then
     555+              break;
     556+            fi
     557+         done
     558+      fi
     559+   fi
     560 
     561    if test -n "$with_mysql_includes"; then
     562       if test -n "$mysql_static"; then
     563@@ -16680,13 +16936,9 @@
    503564     fi
    504565 fi
     
    517578 # turn on warnings if we know how
    518579 if test "$GXX" = "yes"; then
    519 @@ -17333,7 +17531,7 @@
    520  # report actual input values of CONFIG_FILES etc. instead of their
    521  # values after options handling.
    522  ac_log="
    523 -This file was extended by qore-mysql-module $as_me 2.0.1, which was
    524 +This file was extended by qore-mysql-module $as_me 2.0.2, which was
    525  generated by GNU Autoconf 2.69.  Invocation command line was
    526  
    527    CONFIG_FILES    = $CONFIG_FILES
    528 @@ -17399,7 +17597,7 @@
    529  cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
    530  ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
    531  ac_cs_version="\\
    532 -qore-mysql-module config.status 2.0.1
    533 +qore-mysql-module config.status 2.0.2
    534  configured by $0, generated by GNU Autoconf 2.69,
    535    with options \\"\$ac_cs_config\\"
    536  
    537 @@ -18504,7 +18702,7 @@
     580@@ -18504,7 +18756,7 @@
    538581 
    539582   case $ac_file$ac_mode in
     
    544587   # if we detect the quoting.
    545588   case $CONFIG_FILES in
    546 @@ -18555,7 +18753,7 @@
     589@@ -18555,7 +18807,7 @@
    547590     DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
    548591     test -z "$DEPDIR" && continue
Note: See TracChangeset for help on using the changeset viewer.