From 66182220e8b1133af83f58e40d9d3fa3d358299a Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Sun, 28 Sep 2014 02:19:41 -0400 Subject: mariadb: drop the anonymous function and use proper install layout The anonymous function redefined bindir to bindir_noprefix (and others), which broke the sstate between build dirs. The redefined *_noprefix was to used to pass to the INSTALL_* variables to change the layout as we want, but in fact we can do this in other ways instead of the pain one: 1) Change the default layout and a little adjustment. There are 4 install layout: STANDALONE(default), RPM, DEB and SVR4. And RPM is the one close to what we are using. 2) Don't use prefix and pass full paths to INSTALL_*. The mariadb's cmake define some of the INSTALL_* relative to CMAKE_INSTALL_PREFIX, So we can use empty CMAKE_INSTALL_PREFIX, then we can pass our full paths to INSTALL_* directly. This patch set the default layout to RPM and pass paths only for: - INSTALL_DOCDIR: no prefix prepending, so ${datadir} works. - INSTALL_LIBDIR/INSTALL_PLUGINDIR: use ${baselib}. The mysql-test is moved from /usr to /usr/share which is more reasonable, fix the FILES inclusion accordingly. Signed-off-by: Jackie Huang Signed-off-by: Martin Jansa --- meta-oe/recipes-support/mysql/mariadb_5.5.39.inc | 27 +++++------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'meta-oe') diff --git a/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc b/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc index 4d7499dc30..ae2e92b5d1 100644 --- a/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc +++ b/meta-oe/recipes-support/mysql/mariadb_5.5.39.inc @@ -35,19 +35,6 @@ SYSTEMD_AUTO_ENABLE_mariadb-server = "disable" EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" -python __anonymous() { - # This is a pain but it's the only way to pass these in since - # MariaDB's cmake scripts insist on prepending the prefix to the - # specified values for INSTALL_* - localdata = d.createCopy() - localdata.setVar('prefix', '') - localdata.setVar('exec_prefix', '') - d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/')) - d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/')) - d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/')) - d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/')) -} - PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" PACKAGECONFIG_class-native = "" PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" @@ -64,15 +51,11 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ -DNROFF=FALSE \ -DENABLE_DTRACE=FALSE \ -DWITH_PIC=ON \ - -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \ - -DINSTALL_BINDIR:PATH=${bindir_noprefix} \ - -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \ - -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \ - -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \ - -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \ + -DINSTALL_LAYOUT=RPM \ + -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \ + -DINSTALL_LIBDIR:PATH=${baselib} \ + -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \ -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ - -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \ - -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \ -DMYSQL_DATADIR:PATH=/var/mysql \ -DCAT_EXECUTABLE=`which cat` \ -DCMAKE_AR:FILEPATH=${AR}" @@ -177,7 +160,7 @@ FILES_libmysqlclient-dev = " \ FILES_libmysqlclient-staticdev = "\ ${libdir}/*.a" FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ - /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" + ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 # which are intentionally non-PIC on 32-bit x86 (see e.g. -- cgit v1.2.3-54-g00ecf