Changeset View
Changeset View
Standalone View
Standalone View
editors/texworks/Makefile
# Created by: Diego Depaoli <trebestie@gmail.com> | # Created by: Diego Depaoli <trebestie@gmail.com> | ||||
# $FreeBSD$ | # $FreeBSD$ | ||||
PORTNAME= texworks | PORTNAME= texworks | ||||
PORTVERSION= 0.4.6 | |||||
DISTVERSIONPREFIX= release- | DISTVERSIONPREFIX= release- | ||||
PORTREVISION= 7 | DISTVERSION= 0.6.2 | ||||
CATEGORIES= editors | CATEGORIES= editors | ||||
mat: It is better to use the flavor helpers and use static strings. | |||||
MAINTAINER= hrs@FreeBSD.org | MAINTAINER= hrs@FreeBSD.org | ||||
COMMENT= Simple TeX front-end program | COMMENT= Simple TeX front-end program | ||||
LICENSE= GPLv2 | LICENSE= GPLv2+ | ||||
LICENSE_FILE= ${WRKSRC}/COPYING | |||||
BROKEN_armv6= fails to install: PDFDocument.cpp:1836:39: cannot initialize a parameter of type 'qreal *' with an rvalue of type 'double *' | |||||
BROKEN_armv7= fails to install: PDFDocument.cpp:1836:39: cannot initialize a parameter of type 'qreal *' with an rvalue of type 'double *' | |||||
BUILD_DEPENDS= hunspell:textproc/hunspell | BUILD_DEPENDS= hunspell:textproc/hunspell | ||||
LIB_DEPENDS= libpoppler-qt4.so:graphics/poppler-qt4 | LIB_DEPENDS= libhunspell-1.6.so:textproc/hunspell \ | ||||
libpoppler.so:graphics/poppler \ | |||||
libpoppler-${FLAVOR}.so:graphics/poppler-${FLAVOR} | |||||
Done Inline ActionsFlavors are local to a port and is not transitive. FLAVOR cannot be used in dependencies lines. qt4_LIB_DEPENDS= libpoppler-qt4.so:graphics/poppler-qt4 qt5_LIB_DEPENDS= libpoppler-qt5.so:graphics/poppler-qt5 mat: Flavors are local to a port and is not transitive. FLAVOR cannot be used in dependencies lines. | |||||
USES= compiler:c++11-lang pkgconfig qmake qt:4 | FLAVORS= qt4 qt5 | ||||
FLAVOR?= ${FLAVORS:[1]} | |||||
qt4_PKGNAMESUFFIX= -qt4 | |||||
qt5_PKGNAMESUFFIX= -qt5 | |||||
qt4_CONFLICTS_INSTALL= texworks-qt5 | |||||
qt5_CONFLICTS_INSTALL= texworks-qt4 | |||||
USES= cmake:outsource desktop-file-utils pkgconfig | |||||
USE_GITHUB= yes | USE_GITHUB= yes | ||||
GH_ACCOUNT= TeXworks | GH_ACCOUNT= TeXworks | ||||
USE_QT= gui corelib rcc_build moc_build uic_build \ | |||||
dbus xml scripttools designer_build | |||||
QMAKE_ARGS= INSTALL_PREFIX=${PREFIX} \ | |||||
DATA_DIR=${DATADIR} \ | |||||
DOCS_DIR=${DOCSDIR} \ | |||||
ICON_DIR=${PREFIX}/share/pixmaps \ | |||||
DESKTOP_DIR=${PREFIX}/share/applications \ | |||||
MAN_DIR=${PREFIX}/man/man1 \ | |||||
TW_DICPATH=${LOCALBASE}/share/hunspell \ | |||||
TW_HELPPATH=${DOCSDIR} \ | |||||
TW_PLUGINPATH=${PREFIX}/lib/texworks | |||||
USE_TEX= synctex | USE_TEX= synctex | ||||
USE_LDCONFIG= yes | |||||
DESKTOP_ENTRIES="TexWorks" \ | .if ${FLAVOR:Mqt4} | ||||
Not Done Inline Actions^ no need for += tcberner: ^ no need for += | |||||
"Lowering the entry barrier to the TeX world" \ | USES+= qt:4 | ||||
"TeXworks" \ | USE_QT= designer_build moc_build qmake_build rcc_build uic_build \ | ||||
Done Inline Actions^qmake should probably be _build only. tcberner: ^qmake should probably be _build only. | |||||
"${PORTNAME}" \ | corelib dbus gui script scripttools xml | ||||
"Utility;Qt;" \ | CMAKE_ARGS+= -DDESIRED_QT_VERSION=4 | ||||
true | .elif ${FLAVOR:Mqt5} | ||||
USES+= qt:5 | |||||
USE_QT= buildtools_build designer_build qmake_build \ | |||||
core concurrent dbus gui linguisttools script \ | |||||
Done Inline Actions^ same here tcberner: ^ same here | |||||
scripttools uitools widgets xml | |||||
.endif | |||||
PLIST_FILES= bin/texworks \ | |||||
man/man1/texworks.1.gz \ | |||||
share/pixmaps/TeXworks.png | |||||
PLIST_DIRS= lib/texworks | |||||
PORTDOCS= * | |||||
OPTIONS_DEFINE= DOCS LUA PYTHON | OPTIONS_DEFINE= DOCS LUA PYTHON | ||||
LUA_USES= lua:51 | OPTIONS_SUB= yes | ||||
LUA_PLIST_FILES=lib/texworks/libTWLuaPlugin.so | |||||
PYTHON_USES= python:3.4+ | |||||
PYTHON_PLIST_FILES=lib/texworks/libTWPythonPlugin.so | |||||
post-extract: | LUA_USES= lua | ||||
cd ${WRKSRC} && ${INSTALL_DATA} GitArchiveInfo.txt src/GitRev.h | LUA_CMAKE_BOOL= WITH_LUA | ||||
post-patch: | PYTHON_USES= python:3.4+ | ||||
@${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,' \ | PYTHON_CMAKE_BOOL= WITH_PYTHON | ||||
${WRKSRC}/src/TWUtils.cpp | |||||
@${REINPLACE_CMD} -e 's,lua5.1,lua-5.1,' \ | |||||
${WRKSRC}/plugins-src/TWLuaPlugin/TWLuaPlugin.pro | |||||
@${REINPLACE_CMD} -e '53,54s,^,#,' \ | |||||
-e '57,59s,#,,' \ | |||||
-e 's,python3,python-${PYTHON_VER},' \ | |||||
${WRKSRC}/plugins-src/TWPythonPlugin/TWPythonPlugin.pro | |||||
post-patch-DOCS-off: | |||||
@${REINPLACE_CMD} -e '/INSTALLS/s,documentation manual ,,' \ | |||||
${WRKSRC}/TeXworks.pro | |||||
post-configure-LUA-on: | |||||
cd ${WRKSRC}/plugins-src/TWLuaPlugin && ${SETENV} ${CONFIGURE_ENV} \ | |||||
${QMAKE} ${QMAKE_ARGS} | |||||
post-configure-PYTHON-on: | |||||
cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${SETENV} ${CONFIGURE_ENV} \ | |||||
${QMAKE} ${QMAKE_ARGS} | |||||
post-build-LUA-on: | |||||
cd ${WRKSRC}/plugins-src/TWLuaPlugin && ${MAKE} | |||||
post-build-PYTHON-on: | |||||
cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${MAKE} | |||||
post-install: | |||||
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/texworks | |||||
post-install-LUA-on: | |||||
${MKDIR} ${STAGEDIR}${PREFIX}/lib/texworks | |||||
cd ${WRKSRC}/plugins-src/TWLuaPlugin && \ | |||||
${INSTALL_DATA} libTWLuaPlugin.so \ | |||||
${STAGEDIR}${PREFIX}/lib/texworks | |||||
post-install-PYTHON-on: | |||||
${MKDIR} ${STAGEDIR}${PREFIX}/lib/texworks | |||||
cd ${WRKSRC}/plugins-src/TWPythonPlugin && \ | |||||
${INSTALL_DATA} libTWPythonPlugin.so \ | |||||
${STAGEDIR}${PREFIX}/lib/texworks | |||||
.include <bsd.port.mk> | .include <bsd.port.mk> |
It is better to use the flavor helpers and use static strings.