aboutsummaryrefslogtreecommitdiffstats
path: root/editors
diff options
context:
space:
mode:
authorgahr <gahr@FreeBSD.org>2013-11-14 17:54:07 +0800
committergahr <gahr@FreeBSD.org>2013-11-14 17:54:07 +0800
commit20331c0af6f2df0912f12baef79e116896154c2d (patch)
tree280c535ebae6253014ca67b106579e8c8da2cd0f /editors
parent804be44f638a31d94de9cec54d7f90864676fdb8 (diff)
downloadfreebsd-ports-gnome-20331c0af6f2df0912f12baef79e116896154c2d.tar.gz
freebsd-ports-gnome-20331c0af6f2df0912f12baef79e116896154c2d.tar.zst
freebsd-ports-gnome-20331c0af6f2df0912f12baef79e116896154c2d.zip
- Update to 0.4.5
- Add optional support for Lua and Python scripting
Diffstat (limited to 'editors')
-rw-r--r--editors/texworks/Makefile80
-rw-r--r--editors/texworks/distinfo4
2 files changed, 62 insertions, 22 deletions
diff --git a/editors/texworks/Makefile b/editors/texworks/Makefile
index 04282272fc98..8c4f6eab8f27 100644
--- a/editors/texworks/Makefile
+++ b/editors/texworks/Makefile
@@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= texworks
-PORTVERSION= 0.4.4
-PORTREVISION= 3
+PORTVERSION= 0.4.5
CATEGORIES= editors
MASTER_SITES= GOOGLE_CODE
DISTNAME= ${PORTNAME}-${PORTVERSION}-r${VCS_REVISION}
@@ -13,23 +12,26 @@ COMMENT= Simple TeX front-end program
LICENSE= GPLv2
+OPTIONS_DEFINE= DOCS LUA PYTHON
+
BUILD_DEPENDS= hunspell:${PORTSDIR}/textproc/hunspell
-LIB_DEPENDS= poppler-qt4:${PORTSDIR}/graphics/poppler-qt4
+LIB_DEPENDS= libpoppler-qt4.so:${PORTSDIR}/graphics/poppler-qt4
USES= pkgconfig
USE_QT4= qmake_build gui corelib rcc_build moc_build uic_build \
dbus xml scripttools designer_build
QMAKEFLAGS= QMAKE_LFLAGS="-lz"
-QMAKE_ARGS= INSTALL_PREFIX=${PREFIX} \
- DATA_DIR=${DATADIR} \
- DOCS_DIR=${DOCSDIR} \
- ICON_DIR=${PREFIX}/share/pixmaps \
- DESKTOP_DIR=${PREFIX}/share/applications \
- MAN_DIR=${MAN1PREFIX}/man/man1 \
+QMAKE_ARGS= INSTALL_PREFIX=${STAGEDIR}${PREFIX} \
+ DATA_DIR=${STAGEDIR}${DATADIR} \
+ DOCS_DIR=${STAGEDIR}${DOCSDIR} \
+ ICON_DIR=${STAGEDIR}${PREFIX}/share/pixmaps \
+ DESKTOP_DIR=${STAGEDIR}${PREFIX}/share/applications \
+ MAN_DIR=${STAGEDIR}${PREFIX}/man/man1 \
TW_DICPATH=${LOCALBASE}/share/hunspell \
- TW_HELPPATH=${DOCSDIR}
+ TW_HELPPATH=${DOCSDIR} \
+ TW_PLUGINPATH=${PREFIX}/lib/texworks
-VCS_REVISION= 1004
+VCS_REVISION= 1281
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
DESKTOP_ENTRIES="TexWorks" \
@@ -39,27 +41,65 @@ DESKTOP_ENTRIES="TexWorks" \
"Utility;Qt;" \
true
-MAN1= texworks.1
PLIST_FILES= bin/texworks \
+ man/man1/texworks.1.gz \
share/pixmaps/TeXworks.png
+PLIST_DIRS= lib/texworks
PORTDOCS= *
-OPTIONS_DEFINE= DOCS
-
-NO_STAGE= yes
.include <bsd.port.options.mk>
+.if ${PORT_OPTIONS:MLUA}
+USE_LUA= 5.1
+PLIST_FILES+= lib/texworks/libTWLuaPlugin.so
+.endif
+
+.if ${PORT_OPTIONS:MPYTHON}
+USE_PYTHON= 3
+PLIST_FILES+= lib/texworks/libTWPythonPlugin.so
+.endif
+
post-patch:
@${REINPLACE_CMD} -e '/zlib/d; s|COPYING ||' ${WRKSRC}/TeXworks.pro
-.if ! ${PORT_OPTIONS:MDOCS}
+ @${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|^|#|; 57,59s|#||; s|python3|python-${PYTHON_VER}|' \
+ ${WRKSRC}/plugins-src/TWPythonPlugin/TWPythonPlugin.pro
+.if !${PORT_OPTIONS:MDOCS}
@${REINPLACE_CMD} -e '/INSTALLS/s|documentation manual ||' \
${WRKSRC}/TeXworks.pro
.endif
- @${REINPLACE_CMD} -e 's|/usr/share|${LOCALBASE}/share|' \
- ${WRKSRC}/src/TWUtils.cpp
do-configure:
- @cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
- ${QMAKE} ${QMAKEFLAGS} ${QMAKE_ARGS} TeXworks.pro
+ cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} \
+ ${QMAKE} ${QMAKEFLAGS} ${QMAKE_ARGS} TeXworks.pro
+.if ${PORT_OPTIONS:MLUA}
+ cd ${WRKSRC}/plugins-src/TWLuaPlugin && ${SETENV} ${CONFIGURE_ENV} \
+ ${QMAKE} ${QMAKEFLAGS} ${QMAKE_ARGS}/TWLuaPlugin.pro
+.endif
+.if ${PORT_OPTIONS:MPYTHON}
+ cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${SETENV} ${CONFIGURE_ENV} \
+ ${QMAKE} ${QMAKEFLAGS} ${QMAKE_ARGS}/TWPythonPlugin.pro
+.endif
+
+post-build:
+.if ${PORT_OPTIONS:MLUA}
+ cd ${WRKSRC}/plugins-src/TWLuaPlugin && ${MAKE}
+.endif
+.if ${PORT_OPTIONS:MPYTHON}
+ cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${MAKE}
+.endif
+
+post-install:
+ @${MKDIR} ${STAGEDIR}${PREFIX}/lib/texworks
+.if ${PORT_OPTIONS:MLUA}
+ ${MKDIR} ${STAGEDIR}${PREFIX}/lib/texworks
+ ${INSTALL_DATA} ${WRKSRC}/plugins-src/TWLuaPlugin/libTWLuaPlugin.so ${STAGEDIR}${PREFIX}/lib/texworks
+.endif
+.if ${PORT_OPTIONS:MPYTHON}
+ ${INSTALL_DATA} ${WRKSRC}/plugins-src/TWPythonPlugin/libTWPythonPlugin.so ${STAGEDIR}${PREFIX}/lib/texworks
+.endif
.include <bsd.port.mk>
diff --git a/editors/texworks/distinfo b/editors/texworks/distinfo
index 4355fc7947f9..3956bd67e181 100644
--- a/editors/texworks/distinfo
+++ b/editors/texworks/distinfo
@@ -1,2 +1,2 @@
-SHA256 (texworks-0.4.4-r1004.tar.gz) = 5a51867cb88dd1496c88664b484d9b8b6e267e68bec967a8a0b45d3c77bff5b4
-SIZE (texworks-0.4.4-r1004.tar.gz) = 5305883
+SHA256 (texworks-0.4.5-r1281.tar.gz) = dd30ce417ff8241083b6894395489bc529660a46bcb45b7d82d4c6a3f8e6e2de
+SIZE (texworks-0.4.5-r1281.tar.gz) = 5335925