git » mariadb.git » commit f26a8c5

add workaround for packages expecting old library names

author Christian Hesse
2017-05-25 22:38:26 UTC
committer Christian Hesse
2017-05-25 22:38:26 UTC
parent 458ecd1052b405bf61b66f08131317a553131d10

add workaround for packages expecting old library names

PKGBUILD +8 -1

diff --git a/PKGBUILD b/PKGBUILD
index ac3932f..527efa4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
 pkgbase=mariadb
 pkgname=('libmariadb' 'mariadb-clients' 'mytop' 'mariadb')
 pkgver=10.2.6
-pkgrel=1
+pkgrel=2
 arch=('i686' 'x86_64')
 license=('GPL')
 url='http://mariadb.org/'
@@ -98,6 +98,13 @@ package_libmariadb() {
     make -C $dir DESTDIR="$pkgdir" install
   done
 
+  # A lot of packages use hard coded library names and link with
+  # -lmysqlclient. As upstream renamed the library from
+  # libmysqlclient.so to libmariadb.so... Add a workaround for 
+  # these packages by providing backward compatibility.
+  echo 'INPUT(-lmariadb)' > "$pkgdir"/usr/lib/libmysqlclient.so
+  ln -s libmysqlclient.so "$pkgdir"/usr/lib/libmysqlclient_r.so
+
   install -Dm0755 scripts/mysql_config "$pkgdir"/usr/bin/mysql_config
 
   for man in mysql_config mysql_client_test_embedded mysqltest_embedded; do