From 78c7fb3f72423ba06b94f223e1ae2c3650d79e35 Mon Sep 17 00:00:00 2001 From: Nagy Karoly Gabriel Date: Thu, 29 Mar 2012 20:09:01 +0200 Subject: [PATCH] mysql: Updated (5.5.11 -> 5.5.22) --- ...sql-5.5.17-embedded-library-shared-1.patch | 67 +++++++++++++++ database/mysql/mysql.conf | 85 +++++++++++-------- database/mysql/mysql.desc | 8 +- 3 files changed, 119 insertions(+), 41 deletions(-) create mode 100644 database/mysql/mysql-5.5.17-embedded-library-shared-1.patch diff --git a/database/mysql/mysql-5.5.17-embedded-library-shared-1.patch b/database/mysql/mysql-5.5.17-embedded-library-shared-1.patch new file mode 100644 index 000000000..c6d26c8b4 --- /dev/null +++ b/database/mysql/mysql-5.5.17-embedded-library-shared-1.patch @@ -0,0 +1,67 @@ +# --- SDE-COPYRIGHT-NOTE-BEGIN --- +# This copyright note is auto-generated by ./scripts/Create-CopyPatch. +# +# Filename: package/.../mysql/mysql-5.5.17-embedded-library-shared-1.patch +# Copyright (C) 2012 The OpenSDE Project +# +# More information can be found in the files COPYING and README. +# +# This patch file is dual-licensed. It is available under the license the +# patched project is licensed under, as long as it is an OpenSource license +# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms +# of the GNU General Public License as published by the Free Software +# Foundation; either version 2 of the License, or (at your option) any later +# version. +# --- SDE-COPYRIGHT-NOTE-END --- + +Submitted By: Ragnar Thomsen (rthomsen at linuxfromscratch dot org) +Date: 2012-03-21 +Initial Package Version: 5.5.17 +Origin: Gentoo Git +Description: Fixes mysql to build a shared version of the embedded server library (libmysqld.so) used by amarok2 + +=== modified file 'cmake/libutils.cmake' +--- a/cmake/libutils.cmake 2010-01-26 12:47:34 +0000 ++++ b/cmake/libutils.cmake 2010-03-04 21:19:38 +0000 +@@ -268,6 +268,16 @@ MACRO(MERGE_LIBRARIES) + MYSQL_INSTALL_TARGETS(${TARGET} DESTINATION "${INSTALL_LIBDIR}" ${COMP}) + ENDIF() + SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_INTERFACE_LIBRARIES "") ++ ++ IF(ARG_SHARED AND LINK_FLAG_NO_UNDEFINED) ++ # Do not allow undefined symbols in shared libraries ++ GET_TARGET_PROPERTY(TARGET_LINK_FLAGS ${TARGET} LINK_FLAGS) ++ IF(NOT TARGET_LINK_FLAGS) ++ SET(TARGET_LINK_FLAGS) ++ ENDIF() ++ SET_TARGET_PROPERTIES(${TARGET} PROPERTIES LINK_FLAGS ++ "${TARGET_LINK_FLAGS} ${LINK_FLAG_NO_UNDEFINED}") ++ ENDIF() + ENDMACRO() + + FUNCTION(GET_DEPENDEND_OS_LIBS target result) + +=== modified file 'libmysqld/CMakeLists.txt' +--- a/libmysqld/CMakeLists.txt 2010-02-20 19:40:03 +0000 ++++ b/libmysqld/CMakeLists.txt 2010-03-04 21:19:38 +0000 +@@ -138,7 +138,17 @@ IF(MSVC) + ${CMAKE_STATIC_LIBRARY_PREFIX}mysqld-debug) + ENDIF() + +-IF(MSVC AND NOT DISABLE_SHARED) +- MERGE_LIBRARIES(libmysqld SHARED ${LIBS} EXPORTS ${CLIENT_API_FUNCTIONS} +- COMPONENT Embedded) ++IF(NOT DISABLE_SHARED) ++ MERGE_LIBRARIES(libmysqld SHARED mysqlserver EXPORTS ${CLIENT_API_FUNCTIONS}) ++ IF(UNIX) ++ # Name the shared library, handle versioning (provides same api as client library ++ # hence the same version) ++ SET_TARGET_PROPERTIES(libmysqld PROPERTIES ++ OUTPUT_NAME mysqld ++ VERSION "${SHARED_LIB_MAJOR_VERSION}.0.0" ++ SOVERSION "${SHARED_LIB_MAJOR_VERSION}") ++ # Clean direct output flags, as 2 targets have the same base name (libmysqld) ++ SET_TARGET_PROPERTIES(libmysqld PROPERTIES CLEAN_DIRECT_OUTPUT 1) ++ SET_TARGET_PROPERTIES(mysqlserver PROPERTIES CLEAN_DIRECT_OUTPUT 1) ++ ENDIF() + ENDIF() diff --git a/database/mysql/mysql.conf b/database/mysql/mysql.conf index e856a62a6..395c5bf69 100644 --- a/database/mysql/mysql.conf +++ b/database/mysql/mysql.conf @@ -2,7 +2,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../mysql/mysql.conf -# Copyright (C) 2007 - 2011 The OpenSDE Project +# Copyright (C) 2007 - 2012 The OpenSDE Project # Copyright (C) 2004 - 2006 The T2 SDE Project # Copyright (C) 1998 - 2003 Clifford Wolf # @@ -14,64 +14,75 @@ # GNU General Public License can be found in the file COPYING. # --- SDE-COPYRIGHT-NOTE-END --- -# Select a predefined installation layout to avoid the installation -# of strange '$prefix/data' which is used when using the default -# STANDALONE layout. -var_append cmakeopt ' ' "-DINSTALL_LAYOUT=DEB" +makeinstopt= -# tweaking install directories +# tweaking install directories and stuff +var_append cmakeopt ' ' "-DBUILD_CONFIG=mysql_release" +var_append cmakeopt ' ' "-DFEATURE_SET='community'" +var_append cmakeopt ' ' "-DCMAKE_INSTALL_PREFIX=/" +var_append cmakeopt ' ' "-DCMAKE_BUILD_TYPE=Release" var_append cmakeopt ' ' "-DINSTALL_INCLUDEDIR=$includedir/$pkg" var_append cmakeopt ' ' "-DINSTALL_MYSQLSHAREDIR=$datadir/$pkg" var_append cmakeopt ' ' "-DINSTALL_SUPPORTFILESDIR=$datadir/$pkg" -var_append cmakeopt ' ' "-DINSTALL_MYSQLTESTDIR=$datadir/$pkg/test" var_append cmakeopt ' ' "-DINSTALL_PLUGINDIR=$libdir/$pkg/plugin" +var_append cmakeopt ' ' "-DINSTALL_LIBDIR=$libdir" var_append cmakeopt ' ' "-DINSTALL_SCRIPTDIR=$bindir" -var_append cmakeopt ' ' "-DINSTALL_SQLBENCHDIR=$datadir/$pkg" +var_append cmakeopt ' ' "-DINSTALL_BINDIR=$bindir" +var_append cmakeopt ' ' "-DINSTALL_SBINDIR=$sbindir" var_append cmakeopt ' ' "-DINSTALL_MANDIR=$mandir" -var_append cmakeopt ' ' "-DINSTALL_INFODIR=$infodir" -var_append cmakeopt ' ' "-DINSTALL_DOCDIR=$docdir" -var_append cmakeopt ' ' "-DINSTALL_DOCREADMEDIR=$docdir" -var_append cmakeopt ' ' "-DINSTALL_MYSQLDATADIR=$localstatedir" +var_append cmakeopt ' ' "-DINSTALL_INFODIR=$datadir/$pkg/docs" +var_append cmakeopt ' ' "-DINSTALL_DOCDIR=$datadir/$pkg/docs" +var_append cmakeopt ' ' "-DINSTALL_DOCREADMEDIR=$datadir/$pkg" +var_append cmakeopt ' ' "-DINSTALL_MYSQLDATADIR=$localstatedir/lib/$pkg" var_append cmakeopt ' ' "-DMYSQL_DATADIR=$localstatedir/lib/$pkg" var_append cmakeopt ' ' "-DMYSQL_UNIX_ADDR=$localstatedir/lib/$pkg/mysql.sock" +var_append cmakeopt ' ' "-DWITH_EXTRA_CHARSETS=complex" +var_append cmakeopt ' ' "-DWITH_INNOBASE_STORAGE_ENGINE=1" +var_append cmakeopt ' ' "-DWITH_PARTITION_STORAGE_ENGINE=1" +var_append cmakeopt ' ' "-DWITHOUT_EXAMPLE_STORAGE_ENGINE=1" +var_append cmakeopt ' ' "-DWITHOUT_ARCHIVE_STORAGE_ENGINE=1" +var_append cmakeopt ' ' "-DWITHOUT_BLACKHOLE_STORAGE_ENGINE=1" +var_append cmakeopt ' ' "-DWITHOUT_FEDERATED_STORAGE_ENGINE=1" +var_append cmakeopt ' ' "-DWITH_DEBUG=OFF" -# Configure the source with the same build options used by Oracle to produce -# binary distributions for official MySQL releases. -var_insert cmakeopt ' ' "-DBUILD_CONFIG=mysql_release" - -# using community feature set -# alternative sets: xsmall, small, classic, large, xlarge -var_insert cmakeopt ' ' "-DFEATURE_SET='community'" +# using UTF8 +var_append cmakeopt ' ' "-DDEFAULT_CHARSET=utf8" +var_append cmakeopt ' ' "-DDEFAULT_COLLATION=utf8_general_ci" # build the libmysqld embedded server library var_append cmakeopt ' ' "-DWITH_EMBEDDED_SERVER=ON" +# wether to use or not the bundles stuff in mysql +for x in openssl:SSL zlib:ZLIB; do + if ! pkginstalled -f "${x%:*}"; then + echo_status "Could not detect ${x%:*} package (using bundled ${x%:*}" + var_append cmakeopt ' ' "-DWITH_${x#*:}=bundled" + else + var_append cmakeopt ' ' "-DWITH_${x#*:}=system" + fi +done + # whether to use the readline library bundled with mysql if ! pkginstalled -f readline; then echo_status "Could not detect readline package (using bundled readline)" var_append cmakeopt ' ' "-DWITH_READLINE=ON" fi -# SSL support -if ! pkginstalled -f openssl; then - echo_status "Could not detect openssl package (using bundled openssl)" - var_append cmakeopt ' ' "-DWITH_SSL=bundled" -else - var_append cmakeopt ' ' "-DWITH_SSL=system" -fi - -# zlib compression support -if ! pkginstalled -f zlib; then - echo_status "Could not detect zlib package (using bundled zlib)" - var_append cmakeopt ' ' "-DWITH_ZLIB=bundled" -else - var_append cmakeopt ' ' "-DWITH_ZLIB=system" -fi - if [ "$SDECFG_PKG_MYSQL_CLIENTONLY" = "1" ]; then var_append extraconfopt ' ' "--without-server" fi -#hook_add postmake 5 "sed 's/\(.*MYSQL\)/#\1/' $root/$prefix/support-files/my-medium.cnf \ -# > $root$sysconfdir/my.cnf" + +make_install() { +SEGMENTS="Client Server IniFiles Embedded ManPages SharedLibraries Development Documentation Info Readme Server_Scripts" +# We left out the following :"DataFiles SqlBench SupportFiles Test Unspecified" +for segment in $SEGMENTS; do + cmake -DCMAKE_INSTALL_COMPONENT=$segment -P cmake_install.cmake +done + +unset SEGMENTS + +} + +hook_add postmake 9 'make_install' diff --git a/database/mysql/mysql.desc b/database/mysql/mysql.desc index 5e4477251..bf52ba2f0 100644 --- a/database/mysql/mysql.desc +++ b/database/mysql/mysql.desc @@ -2,7 +2,7 @@ [COPY] This copyright note is auto-generated by ./scripts/Create-CopyPatch. [COPY] [COPY] Filename: package/.../mysql/mysql.desc -[COPY] Copyright (C) 2006 - 2011 The OpenSDE Project +[COPY] Copyright (C) 2006 - 2012 The OpenSDE Project [COPY] Copyright (C) 2004 - 2006 The T2 SDE Project [COPY] Copyright (C) 1998 - 2003 Clifford Wolf [COPY] @@ -25,7 +25,7 @@ [T] also a MySQL server is needed. If you are running a server, it's [T] recommended to build MySQL manually. -[U] http://www.mysql.com/ +[U] https://www.mysql.com/products/community/ [A] User List {Support List} [M] The OpenSDE Community @@ -36,7 +36,7 @@ [L] LGPL [S] Stable -[V] 5.5.11 +[V] 5.5.22 [P] X -----5---9 123.500 -[D] 3423118479 mysql-5.5.11.tar.gz http://www.mysql.org/Downloads/MySQL-5.5/ +[D] 2919690506 mysql-5.5.22.tar.gz http://ftp.gwdg.de/pub/misc/mysql/Downloads/MySQL-5.5/