Index: editors/texworks/Makefile =================================================================== --- editors/texworks/Makefile +++ editors/texworks/Makefile @@ -2,101 +2,56 @@ # $FreeBSD$ PORTNAME= texworks -PORTVERSION= 0.4.6 DISTVERSIONPREFIX= release- -PORTREVISION= 7 +DISTVERSION= 0.6.2 CATEGORIES= editors MAINTAINER= hrs@FreeBSD.org COMMENT= Simple TeX front-end program -LICENSE= GPLv2 - -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 *' +LICENSE= GPLv2+ +LICENSE_FILE= ${WRKSRC}/COPYING 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} + +FLAVORS= qt4 qt5 +FLAVOR?= ${FLAVORS:[1]} + +qt4_PKGNAMESUFFIX= -qt4 +qt5_PKGNAMESUFFIX= -qt5 + +qt4_CONFLICTS_INSTALL= texworks-qt5 +qt5_CONFLICTS_INSTALL= texworks-qt4 -USES= compiler:c++11-lang pkgconfig qmake qt:4 +USES= cmake:outsource desktop-file-utils pkgconfig USE_GITHUB= yes 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_LDCONFIG= yes -DESKTOP_ENTRIES="TexWorks" \ - "Lowering the entry barrier to the TeX world" \ - "TeXworks" \ - "${PORTNAME}" \ - "Utility;Qt;" \ - true - -PLIST_FILES= bin/texworks \ - man/man1/texworks.1.gz \ - share/pixmaps/TeXworks.png -PLIST_DIRS= lib/texworks -PORTDOCS= * +.if ${FLAVOR:Mqt4} +USES+= qt:4 +USE_QT= designer_build moc_build qmake_build rcc_build uic_build \ + corelib dbus gui script scripttools xml +CMAKE_ARGS+= -DDESIRED_QT_VERSION=4 +.elif ${FLAVOR:Mqt5} +USES+= qt:5 +USE_QT= buildtools_build designer_build qmake_build \ + core concurrent dbus gui linguisttools script \ + scripttools uitools widgets xml +.endif OPTIONS_DEFINE= DOCS LUA PYTHON -LUA_USES= lua:51 -LUA_PLIST_FILES=lib/texworks/libTWLuaPlugin.so -PYTHON_USES= python:3.4+ -PYTHON_PLIST_FILES=lib/texworks/libTWPythonPlugin.so - -post-extract: - cd ${WRKSRC} && ${INSTALL_DATA} GitArchiveInfo.txt src/GitRev.h - -post-patch: - @${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,' \ - ${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 +OPTIONS_SUB= yes + +LUA_USES= lua +LUA_CMAKE_BOOL= WITH_LUA + +PYTHON_USES= python:3.4+ +PYTHON_CMAKE_BOOL= WITH_PYTHON .include Index: editors/texworks/distinfo =================================================================== --- editors/texworks/distinfo +++ editors/texworks/distinfo @@ -1,2 +1,3 @@ -SHA256 (TeXworks-texworks-release-0.4.6_GH0.tar.gz) = 58650574c1e3234c38cddc3375f8043a83cc65075839030fc7089471af6a3bde -SIZE (TeXworks-texworks-release-0.4.6_GH0.tar.gz) = 11271881 +TIMESTAMP = 1536894823 +SHA256 (TeXworks-texworks-release-0.6.2_GH0.tar.gz) = 22885c11d92654b0cba1f4808fc9aa3c2fdd3e5435fd89dff9aa1e67658a6339 +SIZE (TeXworks-texworks-release-0.6.2_GH0.tar.gz) = 11508277 Index: editors/texworks/files/patch-CMakeLists.txt =================================================================== --- /dev/null +++ editors/texworks/files/patch-CMakeLists.txt @@ -0,0 +1,11 @@ +--- CMakeLists.txt.orig 2018-09-14 18:22:06 UTC ++++ CMakeLists.txt +@@ -168,7 +168,7 @@ IF (UNIX AND NOT APPLE) + SET(TeXworks_DIC_DIR /usr/share/myspell/dicts CACHE PATH "Path where TeXworks looks for spellchecking dictionaries") + SET(TeXworks_DOCS_DIR share/doc/texworks CACHE PATH "Path in which documentation files are installed") + SET(TeXworks_ICON_DIR share/pixmaps CACHE PATH "Path in which icons are installed") +- SET(TeXworks_MAN_DIR share/man/man1 CACHE PATH "Path in which manpages are installed") ++ SET(TeXworks_MAN_DIR man/man1 CACHE PATH "Path in which manpages are installed") + SET(TeXworks_DESKTOP_DIR share/applications CACHE PATH "Path in which .desktop files are installed") + SET(TeXworks_APPDATA_DIR share/appdata CACHE PATH "Path in which .appdata.xml files are installed") + MARK_AS_ADVANCED(TeXworks_HELP_DIR) Index: editors/texworks/pkg-plist =================================================================== --- /dev/null +++ editors/texworks/pkg-plist @@ -0,0 +1,10 @@ +bin/texworks +%%LUA%%%%LUA_LIBDIR%%/texworks/libTWLuaPlugin.so +%%PYTHON%%%%PYTHON_LIBDIR%%/texworks/libTWPythonPlugin.so +man/man1/texworks.1.gz +share/appdata/texworks.appdata.xml +share/applications/texworks.desktop +%%PORTDOCS%%%%DOCSDIR%%/COPYING +%%PORTDOCS%%%%DOCSDIR%%/NEWS +%%PORTDOCS%%%%DOCSDIR%%/README.md +share/pixmaps/TeXworks.png