On Fri, 15 Apr 2011, Edd Barrett wrote: > Hi, > > New texworks with lua and python scripting engines (as multipackages). > > Tested amd64. OK?
Please do not hardcode python 2.6 everywhere, use the MODULE stuff instead. e.g. MODPY_LIB_DEPENDS > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/editors/texworks/Makefile,v > retrieving revision 1.9 > diff -u -p -u -r1.9 Makefile > --- Makefile 15 Nov 2010 23:22:07 -0000 1.9 > +++ Makefile 15 Apr 2011 12:13:47 -0000 > @@ -1,9 +1,18 @@ > # $OpenBSD: Makefile,v 1.9 2010/11/15 23:22:07 espie Exp $ > > -COMMENT = easy to use LaTeX and ConTeXt editor > +COMMENT-main = easy to use LaTeX and ConTeXt editor > +COMMENT-python = Python scripting for TeXworks > +COMMENT-lua = Lua scripting for TeXworks > + > +V = 0.4.0 > +DISTNAME = texworks-${V}-r759 > + > +PKGNAME-main = texworks-${V} > +PKGNAME-lua = texworks-lua-${V} > +PKGNAME-python = texworks-python-${V} > + > +WRKDIST = ${WRKDIR}/texworks-${V} > > -DISTNAME = texworks-0.2.3 > -REVISION = 0 > CATEGORIES = editors print > HOMEPAGE = http://www.tug.org/texworks/ > MAINTAINER = Edd Barrett <e...@openbsd.org> > @@ -14,28 +23,57 @@ PERMIT_PACKAGE_FTP = Yes > PERMIT_DISTFILES_CDROM =Yes > PERMIT_DISTFILES_FTP = Yes > > -WANTLIB += QtDBus QtGui QtXml c dbus-1 hunspell-1.2 m poppler \ > - poppler-qt4 pthread stdc++ z > +MODULES = x11/qt4 > + > +SHARED_ONLY = Yes > +WANTLIB += QtDBus QtGui QtScript QtScriptTools QtXml c \ > + hunspell-1.2 m poppler poppler-qt4 pthread stdc++ z > +WANTLIB-lua = QtCore QtGui QtXml lua m stdc++ > +WANTLIB-python = QtCore QtGui QtXml python2.6 stdc++ m > + > +MULTI_PACKAGES = -main -lua -python > > MASTER_SITES = http://texworks.googlecode.com/files/ > > -MODULES = x11/qt4 > -LIB_DEPENDS = textproc/hunspell \ > +BUILD_DEPENDS += lang/lua \ > + lang/python/2.6 > + > +LIB_DEPENDS-main += textproc/hunspell \ > x11/dbus \ > print/poppler,-qt4 > -RUN_DEPENDS = print/texlive/base > +LIB_DEPENDS-lua += ${MODQT4_LIB_DEPENDS} lang/lua > +LIB_DEPENDS-python += ${MODQT4_LIB_DEPENDS} lang/python/2.6 > > -USE_GMAKE = Yes > +RUN_DEPENDS-main = print/texlive/base > +RUN_DEPENDS-lua = editors/texworks,-main > +RUN_DEPENDS-python = editors/texworks,-main > > +USE_GMAKE = Yes > NO_REGRESS = Yes > +VMEM_WARNING = Yes > + > +SUBST_VARS += WRKINST > > pre-configure: > - ${SUBST_CMD} ${WRKSRC}/src/TWUtils.cpp > + ${SUBST_CMD} ${WRKSRC}/TeXworks.pro > > +PLUGIN_SRC = ${WRKSRC}/plugins-src > do-configure: > + cd ${PLUGIN_SRC}/TWPythonPlugin && qmake4 > + cd ${PLUGIN_SRC}/TWLuaPlugin && qmake4 > cd ${WRKSRC} && qmake4 > > -do-install: > - ${INSTALL_PROGRAM} ${WRKSRC}/texworks ${PREFIX}/bin > +# build plugins first > +pre-build: > + cd ${PLUGIN_SRC}/TWPythonPlugin && gmake > + cd ${PLUGIN_SRC}/TWLuaPlugin && gmake > + > +# install extra bits > +post-install: > + ${INSTALL_DATA_DIR} ${PREFIX}/lib/texworks > + ${INSTALL_DATA} ${PLUGIN_SRC}/TWPythonPlugin/libTWPythonPlugin.so \ > + ${PREFIX}/lib/texworks/ > + ${INSTALL_DATA} ${PLUGIN_SRC}/TWLuaPlugin/libTWLuaPlugin.so \ > + ${PREFIX}/lib/texworks/ > > .include <bsd.port.mk> > Index: distinfo > =================================================================== > RCS file: /cvs/ports/editors/texworks/distinfo,v > retrieving revision 1.2 > diff -u -p -u -r1.2 distinfo > --- distinfo 13 Oct 2009 14:36:26 -0000 1.2 > +++ distinfo 15 Apr 2011 12:13:47 -0000 > @@ -1,5 +1,5 @@ > -MD5 (texworks-0.2.3.tar.gz) = /rh/25ByXdt132lWZWJT/g== > -RMD160 (texworks-0.2.3.tar.gz) = b1DcETH4+mFLdyC79gNmZapMr74= > -SHA1 (texworks-0.2.3.tar.gz) = Tg4XTPhSTELhNH8qqLrXt4Aaqos= > -SHA256 (texworks-0.2.3.tar.gz) = iBOqnb1OcW1fQeVFEyPTOLwFIcJgwVaBoVn0Hcl+5H8= > -SIZE (texworks-0.2.3.tar.gz) = 1898960 > +MD5 (texworks-0.4.0-r759.tar.gz) = iq/66ZklO3zOalYxvLoyTA== > +RMD160 (texworks-0.4.0-r759.tar.gz) = PP+93b13cSV2yvmy/6gG53ydicc= > +SHA1 (texworks-0.4.0-r759.tar.gz) = rfhl9jxFfcX3KofHe7Qe70pjVm4= > +SHA256 (texworks-0.4.0-r759.tar.gz) = > tOSYzHM7pX9i770v0pEZw2g0Lv9xTm6WCyayOvIufk0= > +SIZE (texworks-0.4.0-r759.tar.gz) = 5018740 > Index: patches/patch-TeXworks_pro > =================================================================== > RCS file: patches/patch-TeXworks_pro > diff -N patches/patch-TeXworks_pro > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-TeXworks_pro 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,46 @@ > +$OpenBSD$ > +--- TeXworks.pro.orig Sat Mar 19 16:12:51 2011 > ++++ TeXworks.pro Thu Apr 14 18:20:45 2011 > +@@ -96,6 +96,10 @@ unix:!macx { # on Unix-ish platforms we rely on pkgcon > + # gets expanded to " in the c++ code) > + QMAKE_CXXFLAGS += -DTW_HELPPATH=\\\"/usr/local/share/texworks-help\\\" > + QMAKE_CXXFLAGS += -DTW_PLUGINPATH=\\\"/usr/local/lib/texworks\\\" > ++} > ++ > ++# openbsd uses the mozilla dicts > ++unix:!openbsd-g++* { > + QMAKE_CXXFLAGS += -DTW_DICPATH=\\\"/usr/share/myspell/dicts\\\" > + } > + > +@@ -107,10 +111,11 @@ linux-g++ { > + LIBS += -lz > + } > + > +-openbsd-g++ { > ++openbsd-g++* { > + # Same bug exists in OpenBSD/qt4 > + LIBS += -lQtDBus > + INCLUDEPATH += /usr/local/include/X11/qt4/QtDBus > ++ QMAKE_CXXFLAGS += -DTW_DICPATH=\\\"${LOCALBASE}/share/mozilla-dicts\\\" > + } > + > + win32 { # paths here are specific to my setup > +@@ -224,13 +229,17 @@ TRANSLATIONS += trans/TeXworks_af.ts \ > + trans/TeXworks_tr.ts \ > + trans/TeXworks_zh_CN.ts > + > ++# OpenBSD ports specific > ++INSTALL_PREFIX = ${WRKINST}/${PREFIX} > ++ > + unix:!macx { # installation on Unix-ish platforms > + isEmpty(INSTALL_PREFIX):INSTALL_PREFIX = /usr/local > + isEmpty(BIN_DIR):BIN_DIR = $$INSTALL_PREFIX/bin > + isEmpty(DATA_DIR):DATA_DIR = $$INSTALL_PREFIX/share > + 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 = $$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 > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-plugins-src_TWLuaPlugin_TWLuaPlugin_pro 15 Apr 2011 > 12:13:47 -0000 > @@ -0,0 +1,15 @@ > +$OpenBSD$ > +--- plugins-src/TWLuaPlugin/TWLuaPlugin.pro.orig Wed Apr 13 11:30:27 2011 > ++++ plugins-src/TWLuaPlugin/TWLuaPlugin.pro Wed Apr 13 11:32:44 2011 > +@@ -44,6 +44,11 @@ macx { > + INCLUDEPATH += /usr/local/include > + } > + > ++openbsd-g++* { > ++ LIBS += -L/usr/local/lib -llua > ++} > ++ > ++ > + unix:!macx { # on Unix-ish platforms we rely on pkgconfig > + CONFIG += link_pkgconfig > + PKGCONFIG += lua5.1 > 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 > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ patches/patch-plugins-src_TWPythonPlugin_TWPythonPlugin_pro 15 Apr > 2011 12:13:47 -0000 > @@ -0,0 +1,14 @@ > +$OpenBSD$ > +--- plugins-src/TWPythonPlugin/TWPythonPlugin.pro.orig Wed Apr 13 > 10:10:02 2011 > ++++ plugins-src/TWPythonPlugin/TWPythonPlugin.pro Wed Apr 13 10:11:08 2011 > +@@ -59,6 +59,10 @@ unix:!macx { # on Unix-ish platforms we should rely on > + INSTALLS += target > + } > + > ++openbsd-g++* { > ++ INCLUDEPATH += ${LOCALBASE}/include/python2.6/ > ++} > ++ > + win32 { # paths here are specific to my setup > + INCLUDEPATH += c:/MinGW514/local/include > + INCLUDEPATH += c:/Python26/include > Index: patches/patch-src_TWUtils_cpp > =================================================================== > RCS file: patches/patch-src_TWUtils_cpp > diff -N patches/patch-src_TWUtils_cpp > --- patches/patch-src_TWUtils_cpp 23 Jun 2009 08:30:00 -0000 1.2 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,14 +0,0 @@ > -$OpenBSD: patch-src_TWUtils_cpp,v 1.2 2009/06/23 08:30:00 ajacoutot Exp $ > ---- src/TWUtils.cpp.orig Wed Jun 17 13:46:06 2009 > -+++ src/TWUtils.cpp Wed Jun 17 13:47:38 2009 > -@@ -81,7 +81,9 @@ const QString TWUtils::getLibraryPath(const QString& s > - #endif > - #ifdef Q_WS_X11 > - if (subdir == "dictionaries") > -- libPath = "/usr/share/myspell/dicts"; > -+ // OpenBSD mozilla dictionary paths > -+ // libPath = "/usr/share/myspell/dicts"; > -+ libPath = "${LOCALBASE}/share/mozilla-dicts"; > - else > - libPath = QDir::homePath() + "/." + TEXWORKS_NAME + "/" > + subdir; > - #endif > Index: pkg/DESCR > =================================================================== > RCS file: pkg/DESCR > diff -N pkg/DESCR > --- pkg/DESCR 22 Jun 2009 20:51:10 -0000 1.1.1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,7 +0,0 @@ > -The TeXworks project is an effort to build a simple TeX front-end > -program (working environment) that will be available for all today's > -major desktop operating systems-in particular, MS Windows (XP and > -Vista), typical GNU/Linux distros and other X11-based systems, and Mac > -OS X. It is deliberately modeled on Dick Koch's award-winning TeXShop > -for Mac OS X, which is credited with a resurgence of TeX usage on the > -Mac platform. > Index: pkg/DESCR-lua > =================================================================== > RCS file: pkg/DESCR-lua > diff -N pkg/DESCR-lua > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/DESCR-lua 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,3 @@ > +Lua scripting backend for TeXworks. Current uses range from simple > +formatting over automation tasks to the implementation of new dialogs > +and auto-completion methods. > Index: pkg/DESCR-main > =================================================================== > RCS file: pkg/DESCR-main > diff -N pkg/DESCR-main > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/DESCR-main 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,7 @@ > +The TeXworks project is an effort to build a simple TeX front-end > +program (working environment) that will be available for all today's > +major desktop operating systems-in particular, MS Windows (XP and > +Vista), typical GNU/Linux distros and other X11-based systems, and Mac > +OS X. It is deliberately modeled on Dick Koch's award-winning TeXShop > +for Mac OS X, which is credited with a resurgence of TeX usage on the > +Mac platform. > Index: pkg/DESCR-python > =================================================================== > RCS file: pkg/DESCR-python > diff -N pkg/DESCR-python > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/DESCR-python 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,3 @@ > +Python scripting backend for TeXworks. Current uses range from simple > +formatting over automation tasks to the implementation of new dialogs > +and auto-completion methods. > Index: pkg/PFRAG.shared-lua > =================================================================== > RCS file: pkg/PFRAG.shared-lua > diff -N pkg/PFRAG.shared-lua > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/PFRAG.shared-lua 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,2 @@ > +@comment $OpenBSD$ > +lib/texworks/libTWLuaPlugin.so > Index: pkg/PFRAG.shared-python > =================================================================== > RCS file: pkg/PFRAG.shared-python > diff -N pkg/PFRAG.shared-python > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/PFRAG.shared-python 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,2 @@ > +@comment $OpenBSD$ > +lib/texworks/libTWPythonPlugin.so > Index: pkg/PLIST > =================================================================== > RCS file: pkg/PLIST > diff -N pkg/PLIST > --- pkg/PLIST 22 Jun 2009 20:51:10 -0000 1.1.1.1 > +++ /dev/null 1 Jan 1970 00:00:00 -0000 > @@ -1,2 +0,0 @@ > -@comment $OpenBSD: PLIST,v 1.1.1.1 2009/06/22 20:51:10 sthen Exp $ > -@bin bin/texworks > Index: pkg/PLIST-lua > =================================================================== > RCS file: pkg/PLIST-lua > diff -N pkg/PLIST-lua > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/PLIST-lua 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,2 @@ > +@comment $OpenBSD$ > +%%SHARED%% > Index: pkg/PLIST-main > =================================================================== > RCS file: pkg/PLIST-main > diff -N pkg/PLIST-main > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/PLIST-main 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,14 @@ > +@comment $OpenBSD$ > +@pkgpath editors/texworks > +@bin bin/texworks > +lib/texworks/ > +share/applications/ > +share/applications/texworks.desktop > +share/doc/texworks/ > +share/doc/texworks/COPYING > +share/doc/texworks/README > +@man man/man1/texworks.1 > +share/pixmaps/ > +share/pixmaps/TeXworks.png > +@exec %D/bin/update-desktop-database > +@unexec-delete %D/bin/update-desktop-database > Index: pkg/PLIST-python > =================================================================== > RCS file: pkg/PLIST-python > diff -N pkg/PLIST-python > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ pkg/PLIST-python 15 Apr 2011 12:13:47 -0000 > @@ -0,0 +1,2 @@ > +@comment $OpenBSD$ > +%%SHARED%% > > -- Antoine