Bug 183001 - [MAINTAINER] databases/mariadb55-{client,server}: Fix all mysql-dependent ports build
Summary: [MAINTAINER] databases/mariadb55-{client,server}: Fix all mysql-dependent por...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Florian Smeets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-15 20:00 UTC by never
Modified: 2013-10-17 06:20 UTC (History)
0 users

See Also:


Attachments
file.diff (2.96 KB, patch)
2013-10-15 20:00 UTC, never
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description never 2013-10-15 20:00:00 UTC
Build of all mysql-dependent ports (if mariadb55 was used as mysql port) was
broken on all OSVERSION < 1000052 systems by introduction of libexecinfo
library support.

This patch fixes the issue by adding ${LOCALBASE}/lib to output of respective
options of mysql_config (--libs, --libs_r, --libmysqld-libs).

Fix: Apply patch attached.

P.S. Not sure if patch file is really needed for -server port, but it won't
harm to add it.
How-To-Repeat: Install databases/mariadb55-client and try to build databases/php53-mysqli (for
example) without MYSQLND (thus - depenent on port's libmysqlclient).
Comment 1 Michael Gmelin 2013-10-15 21:37:02 UTC
I tested the patch on 9.1-RELEASE + clang + libc++, it builds and runs
fine. Since I was just preparing another patch for PR 182547 I merged
this with your patch and posted it here

http://www.freebsd.org/cgi/query-pr.cgi?pr=182547&cat=#reply15

-- 
Michael Gmelin
Comment 2 never 2013-10-15 22:37:28 UTC
Thanks for testing, Michael!

But I think there is no need to merge this one into your patch, as
this one is simple and urgent and need to be commited ASAP, while
yours is more complex and I'm still going to test it extensively
before giving my maintainer's approval :)

Cheers,
Alexandr.

On Tue, Oct 15, 2013 at 11:37 PM, Michael Gmelin <freebsd@grem.de> wrote:
> I tested the patch on 9.1-RELEASE + clang + libc++, it builds and runs
> fine. Since I was just preparing another patch for PR 182547 I merged
> this with your patch and posted it here
>
> http://www.freebsd.org/cgi/query-pr.cgi?pr=182547&cat=#reply15
>
> --
> Michael Gmelin
Comment 3 Florian Smeets freebsd_committer 2013-10-16 00:25:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->flo

I'll take it.
Comment 4 dfilter service freebsd_committer 2013-10-17 06:16:52 UTC
Author: flo
Date: Thu Oct 17 05:16:44 2013
New Revision: 330601
URL: http://svnweb.freebsd.org/changeset/ports/330601

Log:
  Fix linking to mariadb libs [1]
  
  PR:		ports/183001 [1]
  PR:		ports/182565 [2]
  Submitted by:	Alexandr Kovalenko <never@nevermind.kiev.ua> [1]
  Reported by:	Vincent Hoffman-Kazlauskas <vince@unsane.co.uk> [2]

Added:
  head/databases/mariadb55-client/files/patch-scripts_mysql_config.sh   (contents, props changed)
  head/databases/mariadb55-server/files/patch-scripts_mysql_config.sh   (contents, props changed)
Modified:
  head/databases/mariadb55-client/Makefile
  head/databases/mariadb55-server/Makefile

Modified: head/databases/mariadb55-client/Makefile
==============================================================================
--- head/databases/mariadb55-client/Makefile	Thu Oct 17 04:01:01 2013	(r330600)
+++ head/databases/mariadb55-client/Makefile	Thu Oct 17 05:16:44 2013	(r330601)
@@ -1,6 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	mariadb
+PORTREVISION=	1
 PKGNAMESUFFIX=	55-client
 
 COMMENT=	Multithreaded SQL database (client)

Added: head/databases/mariadb55-client/files/patch-scripts_mysql_config.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb55-client/files/patch-scripts_mysql_config.sh	Thu Oct 17 05:16:44 2013	(r330601)
@@ -0,0 +1,14 @@
+--- scripts/mysql_config.sh.orig	2013-09-20 01:34:23.000000000 +0300
++++ scripts/mysql_config.sh	2013-10-15 21:23:34.000000000 +0300
+@@ -108,8 +108,11 @@
+ # We intentionally add a space to the beginning and end of lib strings, simplifies replace later
+ libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
+ libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
++libs="$libs -L%%LOCALBASE%%/lib "
+ libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
++libs_r="$libs_r -L%%LOCALBASE%%/lib "
+ embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
++embedded_libs="$embedded_libs -L%%LOCALBASE%%/lib "
+ 
+ if [ -r "$pkglibdir/libmygcc.a" ]; then
+   # When linking against the static library with a different version of GCC

Modified: head/databases/mariadb55-server/Makefile
==============================================================================
--- head/databases/mariadb55-server/Makefile	Thu Oct 17 04:01:01 2013	(r330600)
+++ head/databases/mariadb55-server/Makefile	Thu Oct 17 05:16:44 2013	(r330601)
@@ -2,7 +2,7 @@
 
 PORTNAME?=	mariadb
 PORTVERSION=	5.5.33a
-PORTREVISION?=	0
+PORTREVISION?=	1
 CATEGORIES=	databases ipv6
 MASTER_SITES=	http://ftp.osuosl.org/pub/mariadb/${PORTNAME}-${PORTVERSION}/kvm-tarbake-jaunty-x86/ \
 		http://mirrors.supportex.net/mariadb/${PORTNAME}-${PORTVERSION}/kvm-tarbake-jaunty-x86/ \
@@ -133,6 +133,7 @@ EXTRA_PATCHES+=	${FILESDIR}/extra-patch-
 
 post-patch:
 	@${REINPLACE_CMD} 's/*.1/${MAN1}/' ${WRKSRC}/man/CMakeLists.txt
+	@${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' ${WRKSRC}/scripts/mysql_config.sh
 
 .include <bsd.port.pre.mk>
 

Added: head/databases/mariadb55-server/files/patch-scripts_mysql_config.sh
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/mariadb55-server/files/patch-scripts_mysql_config.sh	Thu Oct 17 05:16:44 2013	(r330601)
@@ -0,0 +1,14 @@
+--- scripts/mysql_config.sh.orig	2013-09-20 01:34:23.000000000 +0300
++++ scripts/mysql_config.sh	2013-10-15 21:23:34.000000000 +0300
+@@ -108,8 +108,11 @@
+ # We intentionally add a space to the beginning and end of lib strings, simplifies replace later
+ libs=" $ldflags -L$pkglibdir -lmysqlclient @ZLIB_DEPS@ @NON_THREADED_LIBS@"
+ libs="$libs @openssl_libs@ @STATIC_NSS_FLAGS@ "
++libs="$libs -L%%LOCALBASE%%/lib "
+ libs_r=" $ldflags -L$pkglibdir -lmysqlclient_r @ZLIB_DEPS@ @CLIENT_LIBS@ @openssl_libs@ "
++libs_r="$libs_r -L%%LOCALBASE%%/lib "
+ embedded_libs=" $ldflags -L$pkglibdir -lmysqld @LIBDL@ @ZLIB_DEPS@ @LIBS@ @WRAPLIBS@ @openssl_libs@ "
++embedded_libs="$embedded_libs -L%%LOCALBASE%%/lib "
+ 
+ if [ -r "$pkglibdir/libmygcc.a" ]; then
+   # When linking against the static library with a different version of GCC
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 Florian Smeets freebsd_committer 2013-10-17 06:17:29 UTC
State Changed
From-To: open->closed

Committed. Thanks!