forked from hasufell/hasufell-repository
107 lines
2.9 KiB
Bash
107 lines
2.9 KiB
Bash
# Copyright 2017 Julian Ospald <hasufell@posteo.de>
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
WORK=${WORKBASE}/${PN}-community-${PV}-src
|
|
|
|
require cmake [ api=2 ]
|
|
|
|
SUMMARY="MySQL Workbench"
|
|
HOMEPAGE="https://www.mysql.com/products/workbench/"
|
|
DOWNLOADS="https://dev.mysql.com/get/Downloads/MySQLGUITools/${PN}-community-${PV}-src.tar.gz"
|
|
|
|
LICENCES="GPL-2"
|
|
SLOT="0"
|
|
PLATFORMS="~amd64 ~x86"
|
|
MYOPTIONS=""
|
|
|
|
# not 100% sure about tinyxml and net-tools
|
|
DEPENDENCIES="
|
|
build:
|
|
dev-lang/swig
|
|
virtual/jre
|
|
virtual/pkg-config
|
|
build+run:
|
|
app-arch/libzip
|
|
dev-cpp/cairomm:1.0
|
|
dev-cpp/ctemplate
|
|
dev-cpp/libsigc++:2
|
|
dev-db/libiodbc
|
|
dev-db/mysql-connector-c++[>=${PV}]
|
|
dev-db/vsqlite++
|
|
dev-java/antlr:4
|
|
dev-lang/python:2.7[sqlite]
|
|
dev-libs/antlr4-cpp
|
|
dev-libs/boost
|
|
dev-libs/glib:2
|
|
dev-libs/libsecret:1
|
|
dev-libs/libxml2:2.0
|
|
dev-libs/pcre
|
|
dev-libs/tinyxml
|
|
dev-python/paramiko[python_abis:2.7]
|
|
dev-python/pycairo[python_abis:2.7]
|
|
gnome-bindings/atkmm:1.6
|
|
gnome-bindings/glibmm:2.4
|
|
gnome-bindings/gtkmm:3
|
|
gnome-bindings/pangomm:1.4
|
|
gnome-desktop/libgnome-keyring
|
|
gnome-platform/libglade:2
|
|
net-libs/libssh
|
|
sci-libs/gdal
|
|
virtual/mysql
|
|
x11-dri/mesa
|
|
x11-libs/cairo
|
|
x11-libs/gdk-pixbuf:2.0
|
|
x11-libs/gtk+:3
|
|
x11-libs/libX11
|
|
x11-libs/pango
|
|
run:
|
|
sys-apps/net-tools
|
|
"
|
|
|
|
BUGS_TO="hasufell@posteo.de"
|
|
|
|
src_prepare() {
|
|
# fix gdal includes
|
|
edo sed -i \
|
|
-e 's|#include <gdal/|#include <|' \
|
|
"${CMAKE_SOURCE}"/backend/wbpublic/grt/*.h \
|
|
"${CMAKE_SOURCE}"/backend/wbpublic/grtui/*.h \
|
|
"${CMAKE_SOURCE}"/backend/wbpublic/objimpl/db.query/*.cpp
|
|
|
|
# fix python detection
|
|
edo sed -i \
|
|
-e '/find_package(PythonLibs 2.6)/d' \
|
|
-e '/pkg_check_modules/s#python#python-2.7#' \
|
|
"${CMAKE_SOURCE}"/CMakeLists.txt
|
|
|
|
# rm -Werror, fails due to -Wdeprecated
|
|
edo sed -i \
|
|
-e 's/\-Werror//' \
|
|
"${CMAKE_SOURCE}"/CMakeLists.txt
|
|
|
|
# fix mysql-connector-c++ detection
|
|
edo sed -i \
|
|
-e '/MySQLCppConn_INCLUDE_DIR NAMES/s#/usr/include#/usr/include/jdbc#' \
|
|
"${CMAKE_SOURCE}"/build/cmake/Modules/FindMySQLCppConn.cmake
|
|
|
|
# fix antl4 jar detection
|
|
edo sed -i \
|
|
-e '/ANTLR_JAR_FILENAME/s/antlr-4.7.1-complete.jar/antlr-complete.jar/' \
|
|
"${CMAKE_SOURCE}"/CMakeLists.txt
|
|
|
|
cmake_src_prepare
|
|
}
|
|
|
|
src_configure() {
|
|
CMAKE_SRC_CONFIGURE_PARAMS=(
|
|
-DIODBC_CONFIG_PATH="/usr/$(exhost --target)/bin/iodbc-config"
|
|
-DLIB_INSTALL_DIR="/usr/$(exhost --target)/lib"
|
|
-DSHARE_INSTALL_PREFIX=/usr/share
|
|
-DANTLR_JAR_PATH="/usr/share/antlr-4"
|
|
-DANTLR_JAR_FILENAME="antlr-complete.jar"
|
|
)
|
|
|
|
cmake_src_configure
|
|
}
|
|
|