blob: 916b930ef56e248e5fe2121af50f005fdedc3036 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
# Created by: Maxim Ignatenko
# $FreeBSD$
PORTNAME= mysql-workbench-gpl
PORTVERSION= 5.2.47
PORTREVISION= 4
DISTVERSIONSUFFIX= -src
CATEGORIES= databases
MASTER_SITES= MYSQL/MySQLGUITools
PKGNAMESUFFIX= 52
MAINTAINER= ports@FreeBSD.org
COMMENT= Visual database design tool
LICENSE= GPLv2 LGPL21
LICENSE_COMB= multi
LIB_DEPENDS= libzip.so:${PORTSDIR}/archivers/libzip \
libboost_system.so:${PORTSDIR}/devel/boost-libs \
libsigc-2.0.so:${PORTSDIR}/devel/libsigc++20 \
libpcre.so:${PORTSDIR}/devel/pcre \
libcairo.so:${PORTSDIR}/graphics/cairo \
libuuid.so:${PORTSDIR}/misc/e2fsprogs-libuuid \
libgnome-keyring.so:${PORTSDIR}/security/libgnome-keyring \
libctemplate.so:${PORTSDIR}/textproc/google-ctemplate \
libtinyxml.so:${PORTSDIR}/textproc/tinyxml \
libgtkmm-2.4.so:${PORTSDIR}/x11-toolkits/gtkmm24
RUN_DEPENDS= xdg-open:${PORTSDIR}/devel/xdg-utils \
${PYTHON_PKGNAMEPREFIX}sqlite3>0:${PORTSDIR}/databases/py-sqlite3 \
${PYTHON_PKGNAMEPREFIX}pexpect>0:${PORTSDIR}/misc/py-pexpect \
${PYTHON_PKGNAMEPREFIX}paramiko>0:${PORTSDIR}/security/py-paramiko
OPTIONS_DEFINE= PYTHON_UTILS UNIXODBC
PYTHON_UTILS_DESC= Python scripts useful for administering MySQL
USES= desktop-file-utils gettext gmake libtool lua:51 pathfix pkgconfig \
shebangfix shared-mime-info
SHEBANG_FILES= ext/ctemplate/ctemplate-src/src/htmlparser/*.py \
ext/mysql-utilities/*.py \
ext/mysql-utilities/scripts/*.py \
ext/scintilla/qt/ScintillaEditPy/*.py \
library/sshtunnel/*.py \
plugins/wb.admin/backend/config/gen-opt/*.py \
plugins/wb.admin/gen-opt/*.py \
plugins/wb.admin/gen-opt/new/*.py \
plugins/wb.admin/gen-opt/recat/*.py \
plugins/wb.query.analysis/*.py \
po/*.py
USE_GCC= any
USE_GL= gl
USE_GNOME= gnomehier gtk20 libxml2
USE_PYTHON= 2
USE_MYSQL= client
USE_SQLITE= 3
USE_AUTOTOOLS= libtoolize aclocal automake autoheader autoconf
LIBTOOLIZE_ARGS=--copy --force
AUTOMAKE_ARGS= --add-missing --copy --force-missing --foreign
CONFIGURE_ENV= LUA_CFLAGS="$$(pkg-config --cflags lua-${LUA_VER})" \
LUA_LIBS="$$(pkg-config --libs lua-${LUA_VER})" \
TINYXML_CFLAGS="-I${LOCALBASE}/include" \
TINYXML_LIBS="-L${LOCALBASE}/lib -ltinyxml" \
ac_cv_header_netinet_tcp_h=yes
CONFIGURE_ARGS= --docdir=${WRKDIR}/fakeroot
USE_LDCONFIG= ${PREFIX}/lib/mysql-workbench
INSTALLS_ICONS= yes
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_SUB= VERSION="${PORTVERSION}" PYTHON_VER="${PYTHON_VER}"
CONFLICTS= mysql-workbench-oss*
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPYTHON_UTILS}
CONFIGURE_ARGS+=--enable-mysql-utilities
PLIST_SUB+= PYTHON_UTILS=""
.else
PLIST_SUB+= PYTHON_UTILS="@comment "
.endif
LIB_DEPENDS+= libodbc.so:${PORTSDIR}/databases/unixODBC
CONFIGURE_ARGS+=--with-unixodbc
post-patch:
@${REINPLACE_CMD} -e \
's|/bin/bash|/bin/sh|' \
${WRKSRC}/build/build_freetds.sh
@${REINPLACE_CMD} -e \
's| $$(pkgdatadir)| $$(DESTDIR)$$(pkgdatadir)|' \
${WRKSRC}/ext/Makefile.am
@${REINPLACE_CMD} -e \
'/spawn/s|/bin/bash|/bin/sh|' \
${WRKSRC}/ext/python/pexpect/pexpect.py
@${REINPLACE_CMD} -e \
's|-O0 -g3||' \
${WRKSRC}/ext/scintilla/gtk/Makefile.am
@${REINPLACE_CMD} -e \
'/f.write/s|bash -i|sh -i| ; \
/call/s|/bin/bash|/bin/sh| ; \
/paths/s|/usr/local|${LOCALBASE}|' \
${WRKSRC}/modules/wb.utils/wb_utils_grt.py
@${REINPLACE_CMD} -e \
'/spawn/s|/bin/bash|/bin/sh|' \
${WRKSRC}/plugins/wb.admin/backend/wb_server_management.py
@${REINPLACE_CMD} -e \
's|/usr/bin/sudo|${LOCALBASE}/bin/sudo| ; \
s|/bin/bash|/bin/sh|' \
${WRKSRC}/plugins/wb.admin/frontend/wb_admin_grt.py
post-install:
.for i in lib/mysql-workbench/modules share/mysql-workbench/libraries
@(cd ${STAGEDIR}/${PREFIX} && ${PYTHON_CMD} -m compileall \
-d ${PREFIX} -f ${i})
.endfor
.if ${PORT_OPTIONS:MPYTHON_UTILS}
(cd ${WRKSRC}/ext && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_FLAGS} \
${MAKEFILE} ${MAKE_ARGS} install-utils install-connector)
@(cd ${STAGEDIR}/${PREFIX} && ${PYTHON_CMD} -m compileall \
-d ${PREFIX} -f share/mysql-workbench/python)
.endif
.include <bsd.port.mk>
|