Skip to content

Commit

Permalink
Fixing setup for simplicity.
Browse files Browse the repository at this point in the history
  • Loading branch information
alainjobart committed Jul 14, 2016
1 parent be12cf9 commit ddf2e8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
9 changes: 6 additions & 3 deletions bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,17 @@ cp $VTTOP/config/gomysql.pc.tmpl $VTROOT/lib/gomysql.pc
myversion=`$VT_MYSQL_ROOT/bin/mysql_config --version`
echo "Version:" "$myversion" >> $VTROOT/lib/gomysql.pc
echo "Cflags:" "$($VT_MYSQL_ROOT/bin/mysql_config --cflags) -ggdb -fPIC" >> $VTROOT/lib/gomysql.pc
# Note we add $VT_MYSQL_ROOT/lib as an extra path in the case where
# we installed the standard MySQL packages from a distro into a sub-directory
# and the provided mysql_config assumes the <root>/lib directory
# is already in the library path.
if [[ "$MYSQL_FLAVOR" == "MariaDB" || "$myversion" =~ ^5\.7\. ]]; then
# Use static linking because the shared library doesn't export
# some internal functions we use, like cli_safe_read.
echo "Libs:" "$($VT_MYSQL_ROOT/bin/mysql_config --libs_r | sed -r 's,-lmysqlclient(_r)?,-l:libmysqlclient.a -lstdc++,')" >> $VTROOT/lib/gomysql.pc
echo "Libs:" "-L$VT_MYSQL_ROOT/lib $($VT_MYSQL_ROOT/bin/mysql_config --libs_r | sed -r 's,-lmysqlclient(_r)?,-l:libmysqlclient.a -lstdc++,')" >> $VTROOT/lib/gomysql.pc
else
echo "Libs:" "$($VT_MYSQL_ROOT/bin/mysql_config --libs_r)" >> $VTROOT/lib/gomysql.pc
echo "Libs:" "-L$VT_MYSQL_ROOT/lib $($VT_MYSQL_ROOT/bin/mysql_config --libs_r)" >> $VTROOT/lib/gomysql.pc
fi
echo PKG_CONFIG_PATH set to: $PKG_CONFIG_PATH

# install mock
mock_dist=$VTROOT/dist/py-mock-1.0.1
Expand Down
10 changes: 0 additions & 10 deletions dev.env
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,6 @@ fi
if [ -z "$MYSQL_FLAVOR" ]; then
export MYSQL_FLAVOR=MariaDB
fi
case "$MYSQL_FLAVOR" in
"MySQL56")
;;
"MariaDB")
export LD_LIBRARY_PATH=$(prepend_path $LD_LIBRARY_PATH $VT_MYSQL_ROOT/lib)
;;
*)
echo "Unsupported MYSQL_FLAVOR $MYSQL_FLAVOR"
;;
esac
export PKG_CONFIG_PATH=$(prepend_path $PKG_CONFIG_PATH $VTROOT/lib)

# needed to correctly import grpc if it's not installed globally
Expand Down

0 comments on commit ddf2e8a

Please sign in to comment.