[csw-devel] SF.net SVN: gar:[15330] csw/mgar/pkg/rbgems/mysql/trunk
bdwalton at users.sourceforge.net
bdwalton at users.sourceforge.net
Sun Aug 14 04:07:06 CEST 2011
Revision: 15330
http://gar.svn.sourceforge.net/gar/?rev=15330&view=rev
Author: bdwalton
Date: 2011-08-14 02:07:06 +0000 (Sun, 14 Aug 2011)
Log Message:
-----------
rbgems/mysql/trunk: use a custom mysql_config wrapper to filter output of --libs
Modified Paths:
--------------
csw/mgar/pkg/rbgems/mysql/trunk/Makefile
Added Paths:
-----------
csw/mgar/pkg/rbgems/mysql/trunk/mysql_config_wrapper
Modified: csw/mgar/pkg/rbgems/mysql/trunk/Makefile
===================================================================
--- csw/mgar/pkg/rbgems/mysql/trunk/Makefile 2011-08-14 00:54:01 UTC (rev 15329)
+++ csw/mgar/pkg/rbgems/mysql/trunk/Makefile 2011-08-14 02:07:06 UTC (rev 15330)
@@ -11,4 +11,6 @@
RUNTIME_DEP_PKGS += CSWgem-rake-compiler
RUNTIME_DEP_PKGS += CSWgem-hoe
+GEM_BUILD_FLAGS = --with-mysql-config=$(abspath $(CURDIR))/mysql_config_wrapper
+
include gar/category.mk
Added: csw/mgar/pkg/rbgems/mysql/trunk/mysql_config_wrapper
===================================================================
--- csw/mgar/pkg/rbgems/mysql/trunk/mysql_config_wrapper (rev 0)
+++ csw/mgar/pkg/rbgems/mysql/trunk/mysql_config_wrapper 2011-08-14 02:07:06 UTC (rev 15330)
@@ -0,0 +1,28 @@
+#!/opt/csw/bin/bash
+
+# Due to the way the gem command works, patching the source doesn't
+# help. We need a way to filter the output of mysql_config directly.
+# This is ugly, but mysql_config --libs passes values like -m32,
+# -xarch= and -norunpath that make ld barf. This is likely a mysql
+# bug but I need to do further investigation before filing it and want
+# to proceed with other tasks first
+
+case "$(uname -p)" in
+ sparc) MC=/opt/csw/mysql5/bin/sparcv8/mysql_config;;
+ *) MC=/opt/csw/mysql5/bin/i386/mysql_config;;
+esac
+
+case "$1" in
+ --libs)
+ _l=$(${MC} --libs)
+ LIBS=
+ for l in ${_l}; do
+ case "${l}" in
+ -m*|*norunpath|*xarch*) ;;
+ *) LIBS="${LIBS} ${l}";;
+ esac
+ done
+ echo ${LIBS}
+ ;;
+ *) "${MC}" $@;;
+esac
Property changes on: csw/mgar/pkg/rbgems/mysql/trunk/mysql_config_wrapper
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list