- Update to 0.4.6.

- Use libsynctex.so provided by devel/tex-synctex.
This commit is contained in:
Hiroki Sato 2015-08-22 19:03:21 +00:00
parent 27470e1676
commit 19bfc3e75d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=395048
3 changed files with 92 additions and 53 deletions

View file

@ -2,23 +2,21 @@
# $FreeBSD$
PORTNAME= texworks
PORTVERSION= 0.4.5
DISTVERSIONSUFFIX= -r${VCS_REVISION}
PORTREVISION= 5
PORTVERSION= 0.4.6
CATEGORIES= editors
MASTER_SITES= GOOGLE_CODE
MAINTAINER= ports@FreeBSD.org
MAINTAINER= hrs@FreeBSD.org
COMMENT= Simple TeX front-end program
LICENSE= GPLv2
OPTIONS_DEFINE= DOCS LUA PYTHON
BUILD_DEPENDS= hunspell:${PORTSDIR}/textproc/hunspell
LIB_DEPENDS= libpoppler-qt4.so:${PORTSDIR}/graphics/poppler-qt4
USES= pkgconfig qmake
USE_GITHUB= yes
GH_ACCOUNT= TeXworks
GH_TAGNAME= release-${PORTVERSION}
USE_QT4= gui corelib rcc_build moc_build uic_build \
dbus xml scripttools designer_build
QMAKE_ARGS= INSTALL_PREFIX=${PREFIX} \
@ -30,10 +28,7 @@ QMAKE_ARGS= INSTALL_PREFIX=${PREFIX} \
TW_DICPATH=${LOCALBASE}/share/hunspell \
TW_HELPPATH=${DOCSDIR} \
TW_PLUGINPATH=${PREFIX}/lib/texworks
LDFLAGS+= -lz
VCS_REVISION= 1281
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_TEX= synctex
DESKTOP_ENTRIES="TexWorks" \
"Lowering the entry barrier to the TeX world" \
@ -48,58 +43,57 @@ PLIST_FILES= bin/texworks \
PLIST_DIRS= lib/texworks
PORTDOCS= *
.include <bsd.port.options.mk>
OPTIONS_DEFINE= DOCS LUA PYTHON
OPTIONS_DEFAULT=DOCS
LUA_USES= lua:51
LUA_PLIST_FILES=lib/texworks/libTWLuaPlugin.so
PYTHON_USES= python:3
PYTHON_PLIST_FILES=lib/texworks/libTWPythonPlugin.so
.if ${PORT_OPTIONS:MLUA}
USES+= lua:51
PLIST_FILES+= lib/texworks/libTWLuaPlugin.so
.endif
.if ${PORT_OPTIONS:MPYTHON}
USES+= python:3
PLIST_FILES+= lib/texworks/libTWPythonPlugin.so
.endif
post-extract:
cd ${WRKSRC} && ${INSTALL_DATA} GitArchiveInfo.txt src/GitRev.h
post-patch:
@${REINPLACE_CMD} -e '/zlib/d; s|COPYING ||; /manual.path/s|TW_HELPPATH|DOCS_DIR|' \
${WRKSRC}/TeXworks.pro
@${REINPLACE_CMD} -e 's|/usr/share|${LOCALBASE}/share|' \
@${REINPLACE_CMD} -e 's,/usr/share,${LOCALBASE}/share,' \
${WRKSRC}/src/TWUtils.cpp
@${REINPLACE_CMD} -e 's|lua5.1|lua-5.1|' \
@${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}|' \
@${REINPLACE_CMD} -e '53,54s,^,#,' \
-e '57,59s,#,,' \
-e '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
post-configure:
.if ${PORT_OPTIONS:MLUA}
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}
.endif
.if ${PORT_OPTIONS:MPYTHON}
post-configure-PYTHON-on:
cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${SETENV} ${CONFIGURE_ENV} \
${QMAKE} ${QMAKE_ARGS}
.endif
post-build:
.if ${PORT_OPTIONS:MLUA}
post-build-LUA-on:
cd ${WRKSRC}/plugins-src/TWLuaPlugin && ${MAKE}
.endif
.if ${PORT_OPTIONS:MPYTHON}
post-build-PYTHON-on:
cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${MAKE}
.endif
post-install:
@${MKDIR} ${STAGEDIR}${PREFIX}/lib/texworks
.if ${PORT_OPTIONS:MLUA}
post-install-LUA-on:
${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
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>

View file

@ -1,2 +1,2 @@
SHA256 (texworks-0.4.5-r1281.tar.gz) = dd30ce417ff8241083b6894395489bc529660a46bcb45b7d82d4c6a3f8e6e2de
SIZE (texworks-0.4.5-r1281.tar.gz) = 5335925
SHA256 (TeXworks-texworks-0.4.6-release-0.4.6_GH0.tar.gz) = 58650574c1e3234c38cddc3375f8043a83cc65075839030fc7089471af6a3bde
SIZE (TeXworks-texworks-0.4.6-release-0.4.6_GH0.tar.gz) = 11271881

View file

@ -0,0 +1,45 @@
--- TeXworks.pro.orig 2015-04-03 18:05:39 UTC
+++ TeXworks.pro
@@ -108,7 +108,8 @@ unix:!macx { # on Unix-ish platforms we
CONFIG += link_pkgconfig
PKGCONFIG += hunspell
PKGCONFIG += poppler-qt4
- PKGCONFIG += zlib
+ PKGCONFIG += synctex
+ LIBS += -lz
# Enclose the path in \\\" (which later gets expanded to \", which in turn
# gets expanded to " in the c++ code)
@@ -180,8 +181,7 @@ HEADERS += src/TWApp.h \
src/TWVersion.h \
src/TWTextCodecs.h \
src/SvnRev.h \
- src/synctex_parser.h \
- src/synctex_parser_utils.h \
+ src/TWSynchronizer.h \
src/ClickableLabel.h \
src/ConfigurableApp.h \
src/TWSystemCmd.h
@@ -225,8 +225,7 @@ SOURCES += src/main.cpp \
src/ResourcesDialog.cpp \
src/ScriptManager.cpp \
src/ConfirmDelete.cpp \
- src/synctex_parser.c \
- src/synctex_parser_utils.c
+ src/TWSynchronizer.cpp
RESOURCES += res/resources.qrc \
res/resfiles.qrc
@@ -259,10 +258,10 @@ unix:!macx { # installation on Unix-ish
isEmpty(DESKTOP_DIR):DESKTOP_DIR = $$DATA_DIR/applications
target.path = $$BIN_DIR
- documentation.files = COPYING README NEWS
+ documentation.files = README NEWS
documentation.path = $$DOCS_DIR
manual.files = manual/*
- manual.path = $$TW_HELPPATH
+ manual.path = DOCS_DIR
icon.files = res/images/TeXworks.png
icon.path = $$ICON_DIR
man.files = man/texworks.1