blob: e60e1e9cb178fd05ba4ec735575ed3766c5287c6 (
plain)
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
|
PORTNAME= sqlitestudio
DISTVERSION= 3.3.3
PORTREVISION= 1
CATEGORIES= databases
MAINTAINER= yuri@FreeBSD.org
COMMENT= SQLite database GUI manager
WWW= https://sqlitestudio.pl/
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/../LICENSE
OPTIONS_GROUP= PLUGINS
OPTIONS_DEFAULT= ${OPTIONS_GROUP_PLUGINS}
OPTIONS_SUB= yes
PLUGINS_DESC= Install plugins:
ALL_PLUGINS= CsvImport CsvExport DbSqliteCipher HtmlExport JsonExport MultiEditorImage PdfExport Printing \
RegExpImport SqlFormatterSimple SqlExport SqlEnterpriseFormatter XmlExport
.for p in ${ALL_PLUGINS}
OPTIONS_GROUP_PLUGINS+= PLUGIN${p:C/([A-Z])/_\1/g:tu}
PLUGIN${p:C/([A-Z])/_\1/g:tu}_DESC= ${p} plugin
PLUGIN${p:C/([A-Z])/_\1/g:tu}_VARS= PLUGIN_DIRS+=${p}
.endfor
PLUGIN_DB_SQLITE_CIPHER_USES= ssl
PLUGIN_PRINTING_USE= QT=printsupport
USES= compiler:c++17-lang gl gmake ncurses qmake qt:5 readline sqlite
USE_GITHUB= yes
GH_ACCOUNT= pawelsalawa
USE_QT= core concurrent gui network script sql sql-sqlite3:run svg widgets xml \
uitools buildtools:build linguisttools:build
USE_GL= gl
WRKSRC_SUBDIR= SQLiteStudio3
CXXFLAGS+= -I${WRKSRC}/coreSQLiteStudio
DESKTOP_ENTRIES= "SQLite database manager" \
"Advanced SQLite database manager" \
"SQLiteStudio" \
"SQLiteStudio" \
"Database;Viewer;DataVisualization;Development;Qt;" \
""
post-patch:
@${REINPLACE_CMD} -e 's|/usr/|${LOCALBASE}/|' \
${WRKSRC}/dirs.pri
@${REINPLACE_CMD} -e 's|pluginDirs += QDir(CFG->getConfigDir()).absoluteFilePath("plugins");|pluginDirs += "${LOCALBASE}/lib/sqlitestudio";|' \
${WRKSRC}/coreSQLiteStudio/services/impl/pluginmanagerimpl.cpp
post-configure:
# Fix for a suspected bug in qmake: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210418
@${REINPLACE_CMD} -E 's|SUBLIBS) -L[^ ]+|SUBLIBS) |' ${WRKSRC}/sqlitestudio/Makefile
@${REINPLACE_CMD} -E 's|LIBS)$$|LIBS) -L${PREFIX}/lib|' ${WRKSRC}/sqlitestudio/Makefile
@for plugin in ${PLUGIN_DIRS}; do \
cd ${WRKSRC}/../Plugins/$$plugin && \
${SETENV} ${QMAKE_ENV} ${_QMAKE} ${QMAKE_ARGS} ${QMAKE_SOURCE_PATH}; \
done;
post-build:
@for plugin in ${PLUGIN_DIRS}; do \
cd ${WRKSRC}/../Plugins/$$plugin && \
${DO_MAKE_BUILD} ${ALL_TARGET}; \
done;
post-install:
@for plugin in ${PLUGIN_DIRS}; do \
cd ${WRKSRC}/../Plugins/$$plugin && \
${SETENV} ${MAKE_ENV} ${FAKEROOT} ${MAKE_CMD} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET}; \
done;
# install icons for the .desktop file to work
@${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps
${INSTALL_DATA} \
${WRKSRC}/guiSQLiteStudio/img/sqlitestudio.svg \
${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/SQLiteStudio.svg
# add the lowercase link to the executable for convenience
@cd ${STAGEDIR}${PREFIX}/bin && ${LN} -s SQLiteStudio sqlitestudio
.include <bsd.port.mk>
|