24351403 pkg:/library/apr-util-15/dbd-mysql depends on pkg:/database/mysql-55/library
authorPetr Sumbera <petr.sumbera@oracle.com>
Tue, 02 Aug 2016 04:53:05 -0700
changeset 6547 293f85a96c96
parent 6546 b7f8bb4a1c18
child 6548 24913c16931e
24351403 pkg:/library/apr-util-15/dbd-mysql depends on pkg:/database/mysql-55/library
components/apr-util-1_5/Makefile
components/apr-util-1_5/apr-util-15-dbd-mysql.p5m
components/apr-util-1_5/patches/mysql.patch
--- a/components/apr-util-1_5/Makefile	Fri Jul 29 01:30:50 2016 -0700
+++ b/components/apr-util-1_5/Makefile	Tue Aug 02 04:53:05 2016 -0700
@@ -48,7 +48,11 @@
 
 CONFIGURE_PREFIX=$(USRDIR)/apr-util/1.5
 
+ifeq ($(BUILD_TYPE), evaluation)
 CONFIGURE_OPTIONS +=	--with-mysql=$(USRDIR)/mysql/5.5
+else
+CONFIGURE_OPTIONS.64 +=	--with-mysql=$(USRDIR)/mysql/5.7
+endif
 CONFIGURE_OPTIONS +=	--with-expat=$(USRDIR)
 CONFIGURE_OPTIONS +=	--with-sqlite3=$(USRDIR)
 CONFIGURE_OPTIONS +=	--with-ldap=ldap_r-2.4
@@ -58,7 +62,9 @@
 CONFIGURE_OPTIONS.64 +=	--enable-layout=Solaris-$(MACH64)
 CONFIGURE_OPTIONS.32 +=	--with-apr=$(USRDIR)/apr/1.5/bin/apr-1-config
 CONFIGURE_OPTIONS.64 +=	--with-apr=$(USRDIR)/apr/1.5/bin/$(MACH64)/apr-1-config
+ifeq ($(BUILD_TYPE), evaluation)
 CONFIGURE_OPTIONS.32 +=	MYSQL_CONFIG=$(USRDIR)/mysql/5.5/bin/$(MACH32)/mysql_config
+endif
 
 ifeq   ($(strip $(PARFAIT_BUILD)),yes)
 PATH=$(PARFAIT_TOOLS):$(SPRO_VROOT)/bin:$(USRBINDIR):$(GNUBIN)
@@ -78,8 +84,13 @@
 
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
+ifeq ($(BUILD_TYPE), evaluation)
 REQUIRED_PACKAGES += database/mysql-55
 REQUIRED_PACKAGES += database/mysql-55/library
+else
+REQUIRED_PACKAGES += database/mysql-57
+REQUIRED_PACKAGES += database/mysql-57/library
+endif
 REQUIRED_PACKAGES += database/sqlite-3
 REQUIRED_PACKAGES += developer/documentation-tool/doxygen
 REQUIRED_PACKAGES += library/apr-15
--- a/components/apr-util-1_5/apr-util-15-dbd-mysql.p5m	Fri Jul 29 01:30:50 2016 -0700
+++ b/components/apr-util-1_5/apr-util-15-dbd-mysql.p5m	Tue Aug 02 04:53:05 2016 -0700
@@ -18,7 +18,7 @@
 #
 # CDDL HEADER END
 #
-# Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.
 #
 set name=pkg.fmri \
     value=pkg:/library/apr-util-15/dbd-mysql@$(IPS_COMPONENT_VERSION),$(BUILD_VERSION)
@@ -36,7 +36,7 @@
 file path=usr/apr-util/1.5/lib/$(MACH64)/apr-util-1/apr_dbd_mysql-1.so
 link path=usr/apr-util/1.5/lib/$(MACH64)/apr-util-1/apr_dbd_mysql.so \
     target=apr_dbd_mysql-1.so
-file path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql-1.so
-link path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql.so \
+$(SOLARIS_11_ONLY)file path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql-1.so
+$(SOLARIS_11_ONLY)link path=usr/apr-util/1.5/lib/apr-util-1/apr_dbd_mysql.so \
     target=apr_dbd_mysql-1.so
 license apr-util.license license="Apache v2.0"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/apr-util-1_5/patches/mysql.patch	Tue Aug 02 04:53:05 2016 -0700
@@ -0,0 +1,47 @@
+Patch origin: in-house
+Patch status: submitted to upstream
+
+https://bz.apache.org/bugzilla/show_bug.cgi?id=59927
+
+--- build/dbd.m4
++++ build/dbd.m4
+@@ -177,12 +177,12 @@
+       fi
+ 
+       AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h],
+-                       AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
++                       AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+                        [apu_have_mysql=0; break],
+                        [#include <my_global.h>])
+       if test "$apu_have_mysql" = "0"; then
+         AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h],
+-                         AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
++                         AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+                          [apu_have_mysql=0; break],
+                          [#include <mysql/my_global.h>])
+       fi
+@@ -208,13 +208,13 @@
+ 
+       AC_MSG_NOTICE(checking for mysql in $withval)
+       AC_CHECK_HEADERS([mysql.h my_global.h my_sys.h],
+-                       AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
++                       AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+                        [apu_have_mysql=0; break],
+                        [#include <my_global.h>])
+ 
+       if test "$apu_have_mysql" != "1"; then
+         AC_CHECK_HEADERS([mysql/mysql.h mysql/my_global.h mysql/my_sys.h],
+-                         AC_CHECK_LIB(mysqlclient_r, mysql_init, [apu_have_mysql=1]),
++                         AC_CHECK_LIB(mysqlclient, mysql_init, [apu_have_mysql=1]),
+                          [apu_have_mysql=0; break],
+                          [#include <mysql/my_global.h>])
+       fi
+@@ -229,7 +229,7 @@
+   dnl Since we have already done the AC_CHECK_LIB tests, if we have it, 
+   dnl we know the library is there.
+   if test "$apu_have_mysql" = "1"; then
+-    APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS -lmysqlclient_r $mysql_LIBS])
++    APR_ADDTO(LDADD_dbd_mysql, [$mysql_LDFLAGS -lmysqlclient $mysql_LIBS])
+   fi
+   AC_SUBST(LDADD_dbd_mysql)
+