# $Id$ # Maintainer: Christian Hesse # Contributor: Alexandre Boily # Contributor: Illarion Kovalchuk # Contributor: totoloco # Contributor: Ionut Biru # ALARM: Kevin Mihelich # - use our cxxflags plus -fsigned-char pkgname=mysql-workbench pkgver=6.3.6 pkgrel=1 pkgdesc='A cross-platform, visual database design tool developed by MySQL' arch=('i686' 'x86_64') url='https://www.mysql.com/products/workbench/' license=('GPL2') depends=('python2' 'libzip' 'libmariadbclient' 'gtkmm' 'ctemplate' 'libgnome-keyring' 'libgl' 'python2-paramiko' 'python2-pexpect' 'gdal' 'pcre' 'tinyxml' 'libxml2' 'mysql-python' 'cairo' 'python2-cairo' 'hicolor-icon-theme' 'desktop-file-utils' 'libiodbc' 'mysql-connector-c++' 'vsqlite++' 'unixodbc' 'freetype2' 'libantlr3c') optdepends=('gnome-keyring: store SSH/MySQL passwords in GNOME password manager' 'python2-pyodbc: database migration') makedepends=('cmake' 'boost' 'curl' 'mesa' 'swig' 'java-runtime' 'imagemagick') install=mysql-workbench.install validpgpkeys=('A4A9406876FCBD3C456770C88C718D3B5072E1F5') source=("http://cdn.mysql.com/Downloads/MySQLGUITools/mysql-workbench-community-${pkgver}-src.tar.gz"{,.asc} 'http://www.antlr3.org/download/antlr-3.4-complete.jar' '0001-mysql-workbench-no-check-for-updates.patch' '0007-mysql-workbench-no-set-gtid-purged.patch' '0009-mysql-workbench-gnome-keyring.patch' '0010-mysql-workbench-object.patch' '0013-mysql-workbench-no-json.patch' 'arch_linux_profile.xml') sha256sums=('c51fce1a3fd9425dd9adf4d16e24e84f92e2f8374b43a956f580fd84d03afe62' 'SKIP' '9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7' 'b189e15c6b6f5a707357d9a9297f39ee3a33264fd28b44d5de6f537f851f82cf' 'b49d4ea352d2c2013b9c5834668c44521a0a2c5f9c7e3fe746ad94ce0d2bb865' '9c2ae2fe7a4f59502bdcf591a07353c350b0ba29c3935c8242d97848cc0e50d3' '2bc79f935cd5059409d32aa64832b7aa2c49ba533cc93d40a063bcbfe01a4485' '663b6eed3715988e16a695f5810bdfb7e76aaeb28baaf4b11b2a73ee2bcb403d' '28724c4b4cec29ce19aada08279df1b086381cd788fef7ae07c1860f7d17af7e') prepare() { cd "${srcdir}/mysql-workbench-community-${pkgver}-src/" # Disable 'Help' -> 'Check for Updates' # Updates are provided via Arch Linux packages patch -Np1 < "${srcdir}"/0001-mysql-workbench-no-check-for-updates.patch # mysqldump from mariadb (currently 1.0.16) does not support --set-gtid-purged patch -Np1 < "${srcdir}"/0007-mysql-workbench-no-set-gtid-purged.patch # fix gnome-keyring patch -Np1 < "${srcdir}"/0009-mysql-workbench-gnome-keyring.patch # fix cannot call member function without object patch -Np1 < "${srcdir}"/0010-mysql-workbench-object.patch # we have no JSON, probably missing in mariadb patch -Np1 < "${srcdir}"/0013-mysql-workbench-no-json.patch # make cmake happy with mariadb sed -i '/^find_package(MySQL /c find_package(MySQL REQUIRED)' \ CMakeLists.txt # we need python 2.x sed -i '/^FIND_PROGRAM(PYTHON_EXEC /c FIND_PROGRAM(PYTHON_EXEC "python2")' \ CMakeLists.txt # fix the swig workaround sed -i '/SWIG_VERSION/s/0x030008/0x030006/' \ library/forms/mforms/textbox.h \ library/forms/swig/mforms.i # fix GDAL sed -i '/#include/s|gdal/||' \ backend/wbpublic/grtui/geom_draw_box.h \ backend/wbpublic/grt/spatial_handler.h \ backend/wbpublic/objimpl/db.query/db_query_Resultset.cpp # put antlr into place install -D ${srcdir}/antlr-3.4-complete.jar ${srcdir}/linux-res/bin/antlr-3.4-complete.jar } build() { cd "${srcdir}/mysql-workbench-community-${pkgver}-src/" # link to libsigc++, which requires ISO C++ 2011 standard # so add the flag to enable c++11 cmake . \ -DCMAKE_INSTALL_PREFIX:PATH=/usr \ -DCMAKE_CXX_FLAGS="${CXXFLAGS} -std=c++11 -fsigned-char" make } package() { cd "${srcdir}/mysql-workbench-community-${pkgver}-src" make DESTDIR="${pkgdir}" install # icons for SIZE in 16 24 32 48 64 96 128; do convert -scale ${SIZE} \ images/icons/linux/128x128/apps/mysql-workbench.png \ ${srcdir}/mysql-workbench.png install -D -m0644 ${srcdir}/mysql-workbench.png "${pkgdir}/usr/share/icons/hicolor/${SIZE}x${SIZE}/apps/mysql-workbench.png" done install -D -m 0644 "${srcdir}"/arch_linux_profile.xml \ "${pkgdir}"/usr/share/mysql-workbench/mysql.profiles/Arch_Linux_\(MariaDB_5.5_Package\).xml }