diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2014-09-28 02:19:41 -0400 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-04 00:28:30 +0200 |
commit | 66182220e8b1133af83f58e40d9d3fa3d358299a (patch) | |
tree | c1ed9e8eebe48eac15971f79df1b36cd1152a2b1 /meta-oe/recipes-support | |
parent | 047058ac18f8d26247c9cd394b3748b9eee8aadb (diff) | |
download | meta-openembedded-66182220e8b1133af83f58e40d9d3fa3d358299a.tar.gz |
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 <jackie.huang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support')
-rw-r--r-- | meta-oe/recipes-support/mysql/mariadb_5.5.39.inc | 27 |
1 files changed, 5 insertions, 22 deletions
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" | |||
35 | 35 | ||
36 | EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" | 36 | EXTRA_OEMAKE = "'GEN_LEX_HASH=${STAGING_BINDIR_NATIVE}/gen_lex_hash'" |
37 | 37 | ||
38 | python __anonymous() { | ||
39 | # This is a pain but it's the only way to pass these in since | ||
40 | # MariaDB's cmake scripts insist on prepending the prefix to the | ||
41 | # specified values for INSTALL_* | ||
42 | localdata = d.createCopy() | ||
43 | localdata.setVar('prefix', '') | ||
44 | localdata.setVar('exec_prefix', '') | ||
45 | d.setVar('bindir_noprefix', localdata.getVar('bindir', True).lstrip('/')) | ||
46 | d.setVar('sbindir_noprefix', localdata.getVar('sbindir', True).lstrip('/')) | ||
47 | d.setVar('datadir_noprefix', localdata.getVar('datadir', True).lstrip('/')) | ||
48 | d.setVar('libdir_noprefix', localdata.getVar('libdir', True).lstrip('/')) | ||
49 | } | ||
50 | |||
51 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" | 38 | PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" |
52 | PACKAGECONFIG_class-native = "" | 39 | PACKAGECONFIG_class-native = "" |
53 | PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" | 40 | PACKAGECONFIG[pam] = ",-DWITHOUT_AUTH_PAM=TRUE,libpam" |
@@ -64,15 +51,11 @@ EXTRA_OECMAKE = "-DWITH_EMBEDDED_SERVER=ON \ | |||
64 | -DNROFF=FALSE \ | 51 | -DNROFF=FALSE \ |
65 | -DENABLE_DTRACE=FALSE \ | 52 | -DENABLE_DTRACE=FALSE \ |
66 | -DWITH_PIC=ON \ | 53 | -DWITH_PIC=ON \ |
67 | -DINSTALL_DOCDIR:PATH=${datadir_noprefix}/doc/${BPN} \ | 54 | -DINSTALL_LAYOUT=RPM \ |
68 | -DINSTALL_BINDIR:PATH=${bindir_noprefix} \ | 55 | -DINSTALL_DOCDIR:PATH=${datadir}/doc/${BPN} \ |
69 | -DINSTALL_SBINDIR:PATH=${sbindir_noprefix} \ | 56 | -DINSTALL_LIBDIR:PATH=${baselib} \ |
70 | -DINSTALL_SCRIPTDIR:PATH=${bindir_noprefix} \ | 57 | -DINSTALL_PLUGINDIR:PATH=${baselib}/plugin \ |
71 | -DINSTALL_LIBDIR:PATH=${libdir_noprefix} \ | ||
72 | -DINSTALL_PLUGINDIR:PATH=${libdir_noprefix}/plugin \ | ||
73 | -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ | 58 | -DINSTALL_SYSCONFDIR:PATH=${sysconfdir} \ |
74 | -DINSTALL_MYSQLSHAREDIR:PATH=${datadir_noprefix}/mysql \ | ||
75 | -DINSTALL_SUPPORTFILESDIR:PATH=${datadir_noprefix}/mysql-support-files \ | ||
76 | -DMYSQL_DATADIR:PATH=/var/mysql \ | 59 | -DMYSQL_DATADIR:PATH=/var/mysql \ |
77 | -DCAT_EXECUTABLE=`which cat` \ | 60 | -DCAT_EXECUTABLE=`which cat` \ |
78 | -DCMAKE_AR:FILEPATH=${AR}" | 61 | -DCMAKE_AR:FILEPATH=${AR}" |
@@ -177,7 +160,7 @@ FILES_libmysqlclient-dev = " \ | |||
177 | FILES_libmysqlclient-staticdev = "\ | 160 | FILES_libmysqlclient-staticdev = "\ |
178 | ${libdir}/*.a" | 161 | ${libdir}/*.a" |
179 | FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ | 162 | FILES_libmysqlclient-dbg = "${libdir}/plugin/.debug/ \ |
180 | /usr/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" | 163 | ${datadir}/mysql-test/lib/My/SafeProcess/.debug/my_safe_process" |
181 | 164 | ||
182 | # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 | 165 | # Avoid warnings about ha_xtradb.so.0.0.0 and ha_innodb_plugin.so.0.0.0 |
183 | # which are intentionally non-PIC on 32-bit x86 (see e.g. | 166 | # which are intentionally non-PIC on 32-bit x86 (see e.g. |