Hi everyone,
I hope you are all enjoying the holidays!
On Mon, Dec 10, 2018 at 12:13:46PM +0100, Landry Breuil wrote:
> > > editors/texworks
> >
> > https://github.com/TeXworks/texworks/releases seem to say that qt5 is
> > supported
>
> Our version is from 2012, and qt5 is the default since 0.6 per
> https://raw.githubusercontent.com/TeXworks/texworks/release-0.6.2/NEWS -
> edd@, care to update it ?
Here's an update to TeX Works, now using QT5. It wasn't totally
straightforward, but I got there in the end.
Notes:
- Build system switched to cmake.
- Docs no longer distributed with TeX Works (other than a small man page).
- This update will break TeX Live 2018 (not yet committed) due to a synctex
API change. I have patches to fix this when the time comes.
Comments / OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/editors/texworks/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- Makefile 1 Jul 2018 09:02:40 -0000 1.41
+++ Makefile 27 Dec 2018 17:09:51 -0000
@@ -4,21 +4,18 @@ COMMENT-main = easy to use LaTeX and Co
COMMENT-python = Python scripting for TeXworks
COMMENT-lua = Lua scripting for TeXworks
-V = 0.4.4
-R = 1004
-DISTNAME = texworks-${V}-r${R}
+V = 0.6.2
+GH_ACCOUNT = TeXworks
+GH_PROJECT = texworks
+GH_TAGNAME = release-${V}
PKGNAME-main = texworks-${V}
PKGNAME-lua = texworks-lua-${V}
PKGNAME-python = texworks-python-${V}
-REVISION-main = 5
-REVISION-lua = 3
-REVISION-python = 3
-
EPOCH = 0
-WRKDIST = ${WRKDIR}/texworks-${V}
+WRKDIST = ${WRKDIR}/texworks-release-${V}
CATEGORIES = editors print
HOMEPAGE = http://www.tug.org/texworks/
@@ -27,39 +24,31 @@ MAINTAINER = Edd Barrett <edd@openbsd.o
# GPLv2
PERMIT_PACKAGE_CDROM = Yes
-MODULES = devel/qmake \
- lang/python \
+MODULES = lang/python \
lang/lua \
- x11/qt4
-
-MODQMAKE_PROJECTS = plugins-src/TWLuaPlugin/TWLuaPlugin.pro \
- plugins-src/TWPythonPlugin/TWPythonPlugin.pro \
- TeXworks.pro
+ x11/qt5 \
+ devel/cmake
# c++-11 required for poppler
COMPILER = base-clang ports-gcc
-WANTLIB += ${COMPILER_LIBCXX}
-WANTLIB += ICE QtDBus QtGui QtScript QtScriptTools QtXml SM X11
-WANTLIB += Xext Xi Xinerama Xrender c fontconfig freetype hunspell-1.6
-WANTLIB += m poppler-qt4 pthread z
-
-WANTLIB-lua = ${MODLUA_WANTLIB}
-WANTLIB-lua += ICE QtCore QtGui QtXml SM X11 Xext Xi Xinerama Xrender
-WANTLIB-lua += fontconfig freetype m pthread ${COMPILER_LIBCXX}
-
-WANTLIB-python = ${MODPY_WANTLIB}
-WANTLIB-python += ICE QtCore QtGui QtXml SM X11 Xext Xi Xinerama Xrender
-WANTLIB-python += fontconfig freetype m pthread ${COMPILER_LIBCXX}
+WANTLIB += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5DBus Qt5Gui
+WANTLIB += Qt5Script Qt5ScriptTools Qt5Widgets Qt5Xml c hunspell-1.6
+WANTLIB += m poppler poppler-qt5 synctex z
-MULTI_PACKAGES = -main -lua -python
+WANTLIB-lua += ${COMPILER_LIBCXX} ${MODLUA_WANTLIB} Qt5Concurrent Qt5Core
+WANTLIB-lua += Qt5DBus Qt5Gui Qt5Script Qt5ScriptTools Qt5Widgets Qt5Xml m
-MASTER_SITES = ${MASTER_SITE_GOOGLECODE:=texworks/}
+WANTLIB-python += ${COMPILER_LIBCXX} Qt5Concurrent Qt5Core Qt5DBus Qt5Gui
+WANTLIB-python += Qt5Script Qt5ScriptTools Qt5Widgets Qt5Xml m python2.7
+MULTI_PACKAGES = -main -lua -python
+
+LIB_DEPENDS = ${MODQT5_LIB_DEPENDS} \
+ x11/qt5/qtscript
LIB_DEPENDS-main = ${LIB_DEPENDS} \
- qt4->=4.8.2:${MODQT4_LIB_DEPENDS} \
textproc/hunspell \
- print/poppler,,-qt4
+ print/poppler,-qt5
LIB_DEPENDS-lua = ${LIB_DEPENDS} \
${MODLUA_LIB_DEPENDS}
LIB_DEPENDS-python = ${LIB_DEPENDS} \
@@ -75,9 +64,14 @@ MODLUA_SA = Yes
USE_GMAKE = Yes
NO_TEST = Yes
-SUBST_VARS += WRKINST
+SUBST_VARS += MODLUA-VERSION
+
+CONFIGURE_STYLE = cmake
+CONFIGURE_ARGS += -DWITH_PYTHON=ON \
+ -DTeXworks_MAN_DIR=man \
+ -DTeXworks_DIC_DIR=${TRUEPREFIX}/share/mozilla-dicts
pre-configure:
- cd ${WRKSRC}; ${SUBST_CMD} ${MODQMAKE_PROJECTS}
+ ${SUBST_CMD} ${WRKSRC}/CMakeLists.txt
.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/editors/texworks/distinfo,v
retrieving revision 1.6
diff -u -p -r1.6 distinfo
--- distinfo 18 Jan 2015 03:13:50 -0000 1.6
+++ distinfo 12 Dec 2018 17:21:48 -0000
@@ -1,2 +1,2 @@
-SHA256 (texworks-0.4.4-r1004.tar.gz) = WlGGfLiN0UlsiGZLSE2bi24mfmi+yWeooLRdPHe/9bQ=
-SIZE (texworks-0.4.4-r1004.tar.gz) = 5305883
+SHA256 (texworks-release-0.6.2.tar.gz) = IohcEdkmVLDLofSAj8mqPC/dPlQ1/Ynf+aoeZ2WKYzk=
+SIZE (texworks-release-0.6.2.tar.gz) = 11508277
Index: patches/patch-CMakeLists_txt
===================================================================
RCS file: patches/patch-CMakeLists_txt
diff -N patches/patch-CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-CMakeLists_txt 27 Dec 2018 16:37:39 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Find the right version of Lua.
+
+Index: CMakeLists.txt
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -327,7 +327,7 @@ ENDIF ()
+ # -------------------------------
+
+ IF ( WITH_LUA )
+- FIND_PACKAGE(Lua)
++ FIND_PACKAGE(Lua "${MODLUA_VERSION}" EXACT REQUIRED)
+ ENDIF()
+
+ IF ( WITH_PYTHON )
Index: patches/patch-TeXworks_pro
===================================================================
RCS file: patches/patch-TeXworks_pro
diff -N patches/patch-TeXworks_pro
--- patches/patch-TeXworks_pro 10 Jul 2012 15:22:45 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,35 +0,0 @@
-$OpenBSD: patch-TeXworks_pro,v 1.5 2012/07/10 15:22:45 jasper Exp $
---- TeXworks.pro.orig Wed Jun 29 19:03:14 2011
-+++ TeXworks.pro Mon Jul 9 16:00:26 2012
-@@ -47,11 +47,11 @@ QMAKE_CXXFLAGS_WARN_ON += -Wno-unknown-pragmas
-
- unix:!macx {
- TARGET = texworks
-- isEmpty(INSTALL_PREFIX):INSTALL_PREFIX = /usr/local
-+ isEmpty(INSTALL_PREFIX):INSTALL_PREFIX = ${PREFIX}
- isEmpty(DATA_DIR):DATA_DIR = $$INSTALL_PREFIX/share
- isEmpty(TW_HELPPATH):TW_HELPPATH = $$DATA_DIR/texworks-help
- isEmpty(TW_PLUGINPATH):TW_PLUGINPATH = $$INSTALL_PREFIX/lib/texworks
-- isEmpty(TW_DICPATH):TW_DICPATH = /usr/share/myspell/dicts
-+ isEmpty(TW_DICPATH):TW_DICPATH = ${LOCALBASE}/share/mozilla-dicts
- } else {
- TARGET = TeXworks
- QMAKE_CXXFLAGS += -fexceptions
-@@ -144,7 +144,7 @@ win32 { # paths here are specific to my setup
- QMAKE_CXXFLAGS += -DSTATIC_SCRIPTING_PLUGINS
-
- LIBS += -Lplugins-src/TWLuaPlugin/release -lTWLuaPlugin
-- LIBS += -llua
-+ LIBS += ${MODLUA_LIB}
-
- LIBS += -Lplugins-src/TWPythonPlugin/release -lTWPythonPlugin
- LIBS += -Lc:/Python26/libs -lpython26
-@@ -243,7 +243,7 @@ unix:!macx { # installation on Unix-ish platforms
- isEmpty(BIN_DIR):BIN_DIR = $$INSTALL_PREFIX/bin
- isEmpty(DOCS_DIR):DOCS_DIR = $$DATA_DIR/doc/texworks
- isEmpty(ICON_DIR):ICON_DIR = $$DATA_DIR/pixmaps
-- isEmpty(MAN_DIR):MAN_DIR = $$DATA_DIR/man/man1
-+ isEmpty(MAN_DIR):MAN_DIR = $$INSTALL_PREFIX/man/man1
- isEmpty(DESKTOP_DIR):DESKTOP_DIR = $$DATA_DIR/applications
-
- target.path = $$BIN_DIR
Index: patches/patch-plugins-src_TWLuaPlugin_TWLuaPlugin_pro
===================================================================
RCS file: patches/patch-plugins-src_TWLuaPlugin_TWLuaPlugin_pro
diff -N patches/patch-plugins-src_TWLuaPlugin_TWLuaPlugin_pro
--- patches/patch-plugins-src_TWLuaPlugin_TWLuaPlugin_pro 10 Jul 2012 15:22:45 -0000 1.4
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-plugins-src_TWLuaPlugin_TWLuaPlugin_pro,v 1.4 2012/07/10 15:22:45 jasper Exp $
---- plugins-src/TWLuaPlugin/TWLuaPlugin.pro.orig Wed Jun 29 19:03:14 2011
-+++ plugins-src/TWLuaPlugin/TWLuaPlugin.pro Mon Jul 9 16:08:24 2012
-@@ -46,7 +46,7 @@ macx {
-
- unix:!macx { # on Unix-ish platforms we rely on pkgconfig
- CONFIG += link_pkgconfig
-- PKGCONFIG += lua5.1
-+ PKGCONFIG += ${MODLUA_DEP}
-
- isEmpty(INSTALL_PREFIX):INSTALL_PREFIX = /usr/local
- isEmpty(TW_PLUGINPATH):TW_PLUGINPATH = $$INSTALL_PREFIX/lib/texworks
Index: patches/patch-plugins-src_TWPythonPlugin_TWPythonPlugin_pro
===================================================================
RCS file: patches/patch-plugins-src_TWPythonPlugin_TWPythonPlugin_pro
diff -N patches/patch-plugins-src_TWPythonPlugin_TWPythonPlugin_pro
--- patches/patch-plugins-src_TWPythonPlugin_TWPythonPlugin_pro 14 Jun 2012 09:40:58 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-plugins-src_TWPythonPlugin_TWPythonPlugin_pro,v 1.5 2012/06/14 09:40:58 espie Exp $
---- plugins-src/TWPythonPlugin/TWPythonPlugin.pro.orig Wed Jun 29 18:03:14 2011
-+++ plugins-src/TWPythonPlugin/TWPythonPlugin.pro Mon Mar 12 12:02:28 2012
-@@ -50,8 +50,8 @@ macx {
-
- unix:!macx { # on Unix-ish platforms we should rely on pkgconfig
- # Python prior to 3.x doesn't register properly with pkg-config
-- INCLUDEPATH += /usr/include/python2.6/
-- LIBS += -lpython2.6
-+ INCLUDEPATH += ${LOCALBASE}/include/python${MODPY_VERSION}/
-+ LIBS += -lpython${MODPY_VERSION}
-
- # uncomment these lines (and comment those above) to use Python 3
- # CONFIG += link_pkgconfig
Index: patches/patch-src_CMakeLists_txt
===================================================================
RCS file: patches/patch-src_CMakeLists_txt
diff -N patches/patch-src_CMakeLists_txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_CMakeLists_txt 27 Dec 2018 16:53:51 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Fix man path, fix undefined symbols for plugins.
+
+Index: src/CMakeLists.txt
+--- src/CMakeLists.txt.orig
++++ src/CMakeLists.txt
+@@ -159,6 +159,8 @@ ADD_EXECUTABLE( ${EXE_NAME} ${GUI_TYPE}
+ # Specify libraries to be linked to TeXworks.
+ TARGET_LINK_LIBRARIES( ${EXE_NAME} ${MODULE_LIBS} ${TeXworks_LIBS} )
+
++SET_TARGET_PROPERTIES(${EXE_NAME} PROPERTIES LINK_FLAGS -rdynamic)
++
+ # For OS X, generate `Info.plist` and add it to the `.app` bundle.
+ IF (APPLE)
+ SET(VER ${TeXworks_VERSION})
+@@ -192,7 +194,7 @@ IF ( UNIX AND NOT APPLE )
+ ${TeXworks_SOURCE_DIR}/README.md
+ ${TeXworks_SOURCE_DIR}/NEWS
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/${TeXworks_DOCS_DIR})
+- INSTALL(FILES ${TeXworks_SOURCE_DIR}/man/texworks.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/${TeXworks_MAN_DIR})
++ INSTALL(FILES ${TeXworks_SOURCE_DIR}/man/texworks.1 DESTINATION ${CMAKE_INSTALL_PREFIX}/man/man1)
+ INSTALL(FILES ${TeXworks_SOURCE_DIR}/texworks.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/${TeXworks_DESKTOP_DIR})
+ INSTALL(FILES ${TeXworks_SOURCE_DIR}/texworks.appdata.xml DESTINATION ${CMAKE_INSTALL_PREFIX}/${TeXworks_APPDATA_DIR})
+ ENDIF ( UNIX AND NOT APPLE )
Index: pkg/PLIST-main
===================================================================
RCS file: /cvs/ports/editors/texworks/pkg/PLIST-main,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST-main
--- pkg/PLIST-main 27 Jun 2018 21:03:42 -0000 1.5
+++ pkg/PLIST-main 12 Dec 2018 17:21:49 -0000
@@ -3,103 +3,13 @@
@bin bin/texworks
lib/texworks/
@man man/man1/texworks.1
+share/appdata/
+share/appdata/texworks.appdata.xml
share/applications/texworks.desktop
share/doc/texworks/
share/doc/texworks/COPYING
share/doc/texworks/NEWS
-share/doc/texworks/README
+share/doc/texworks/README.md
share/pixmaps/
share/pixmaps/TeXworks.png
-share/texworks-help/
-share/texworks-help/en/
-share/texworks-help/en/Acknowledgements.html
-share/texworks-help/en/AdvanceduseScripting.html
-share/texworks-help/en/Beyondthismanual.html
-share/texworks-help/en/CompilingTw.html
-share/texworks-help/en/CustomizingTw.html
-share/texworks-help/en/Firststeps.html
-share/texworks-help/en/GoingfurtherEditingtools.html
-share/texworks-help/en/GoingfurtherOthertools.html
-share/texworks-help/en/Installation.html
-share/texworks-help/en/Introduction.html
-share/texworks-help/en/Regularexpressions.html
-share/texworks-help/en/TeXworks-manual.pdf
-share/texworks-help/en/bibname.html
-share/texworks-help/en/contentsname.html
-share/texworks-help/en/images/
-share/texworks-help/en/images/LMB.png
-share/texworks-help/en/images/Linux.png
-share/texworks-help/en/images/Mac.png
-share/texworks-help/en/images/MacCmdKey.png
-share/texworks-help/en/images/MacOptKey.png
-share/texworks-help/en/images/RMB.png
-share/texworks-help/en/images/TeXworks.png
-share/texworks-help/en/images/Windows.png
-share/texworks-help/en/images/cmsy10-c-41.png
-share/texworks-help/en/images/cmsy10-c-4d.png
-share/texworks-help/en/images/cmsy10-c-53.png
-share/texworks-help/en/images/consoleOutput.png
-share/texworks-help/en/images/errorParsingScript.png
-share/texworks-help/en/images/example.png
-share/texworks-help/en/images/iconAbortTypesetting.png
-share/texworks-help/en/images/iconTypeset.png
-share/texworks-help/en/images/index0x.png
-share/texworks-help/en/images/index1x.png
-share/texworks-help/en/images/index2x.png
-share/texworks-help/en/images/index3x.png
-share/texworks-help/en/images/index4x.png
-share/texworks-help/en/images/index5x.png
-share/texworks-help/en/images/index6x.png
-share/texworks-help/en/images/index7x.png
-share/texworks-help/en/images/index8x.png
-share/texworks-help/en/images/interface-summary.png
-share/texworks-help/en/images/replaceDialog.png
-share/texworks-help/en/images/screenshotHardWrapDlg.png
-share/texworks-help/en/images/toolbar1.png
-share/texworks-help/en/images/toolbar2.png
-share/texworks-help/en/index.css
-share/texworks-help/en/index.html
-share/texworks-help/en/index10.html
-share/texworks-help/en/index12.html
-share/texworks-help/en/index13.html
-share/texworks-help/en/index14.html
-share/texworks-help/en/index15.html
-share/texworks-help/en/index16.html
-share/texworks-help/en/index17.html
-share/texworks-help/en/index18.html
-share/texworks-help/en/index19.html
-share/texworks-help/en/index2.html
-share/texworks-help/en/index20.html
-share/texworks-help/en/index21.html
-share/texworks-help/en/index23.html
-share/texworks-help/en/index24.html
-share/texworks-help/en/index25.html
-share/texworks-help/en/index26.html
-share/texworks-help/en/index27.html
-share/texworks-help/en/index28.html
-share/texworks-help/en/index29.html
-share/texworks-help/en/index30.html
-share/texworks-help/en/index32.html
-share/texworks-help/en/index33.html
-share/texworks-help/en/index34.html
-share/texworks-help/en/index36.html
-share/texworks-help/en/index37.html
-share/texworks-help/en/index40.html
-share/texworks-help/en/index41.html
-share/texworks-help/en/index42.html
-share/texworks-help/en/index43.html
-share/texworks-help/en/index44.html
-share/texworks-help/en/index45.html
-share/texworks-help/en/index46.html
-share/texworks-help/en/index47.html
-share/texworks-help/en/index48.html
-share/texworks-help/en/index49.html
-share/texworks-help/en/index5.html
-share/texworks-help/en/index50.html
-share/texworks-help/en/index6.html
-share/texworks-help/en/index8.html
-share/texworks-help/en/index9.html
-share/texworks-help/en/indexname.html
-share/texworks-help/en/manual.css
-share/texworks-help/en/tw-help-title.txt
@tag update-desktop-database
--
Best Regards
Edd Barrett
http://www.theunixzoo.co.uk
No comments:
Post a Comment