aboutsummaryrefslogtreecommitdiff
path: root/editors/texworks
diff options
context:
space:
mode:
authorHiroki Sato <hrs@FreeBSD.org>2015-08-22 19:03:21 +0000
committerHiroki Sato <hrs@FreeBSD.org>2015-08-22 19:03:21 +0000
commit19bfc3e75d6978bc823b6c40a5f631d34f2e22d2 (patch)
treeb612432c18d5b715bec53162ceba1bef812c2351 /editors/texworks
parent27470e1676e69455acf06ae25ebd42ebd5bdecdb (diff)
downloadports-19bfc3e75d6978bc823b6c40a5f631d34f2e22d2.tar.gz
ports-19bfc3e75d6978bc823b6c40a5f631d34f2e22d2.zip
- Update to 0.4.6.
- Use libsynctex.so provided by devel/tex-synctex.
Notes
Notes: svn path=/head/; revision=395048
Diffstat (limited to 'editors/texworks')
-rw-r--r--editors/texworks/Makefile96
-rw-r--r--editors/texworks/distinfo4
-rw-r--r--editors/texworks/files/patch-TeXworks.pro45
3 files changed, 92 insertions, 53 deletions
diff --git a/editors/texworks/Makefile b/editors/texworks/Makefile
index 964126698e20..5d929972db6a 100644
--- a/editors/texworks/Makefile
+++ b/editors/texworks/Makefile
@@ -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>
-
-.if ${PORT_OPTIONS:MLUA}
-USES+= lua:51
-PLIST_FILES+= lib/texworks/libTWLuaPlugin.so
-.endif
+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: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|' \
+ @${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
- @${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
-
-post-configure:
-.if ${PORT_OPTIONS:MLUA}
+
+post-configure-LUA-on:
cd ${WRKSRC}/plugins-src/TWLuaPlugin && ${SETENV} ${CONFIGURE_ENV} \
- ${QMAKE} ${QMAKE_ARGS}
-.endif
-.if ${PORT_OPTIONS:MPYTHON}
+ ${QMAKE} ${QMAKE_ARGS}
+
+post-configure-PYTHON-on:
cd ${WRKSRC}/plugins-src/TWPythonPlugin && ${SETENV} ${CONFIGURE_ENV} \
- ${QMAKE} ${QMAKE_ARGS}
-.endif
+ ${QMAKE} ${QMAKE_ARGS}
-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
+ cd ${WRKSRC}/plugins-src/TWLuaPlugin && \
+ ${INSTALL_DATA} libTWLuaPlugin.so \
+ ${STAGEDIR}${PREFIX}/lib/texworks
+
+post-install-PYTHON-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/TWPythonPlugin && \
+ ${INSTALL_DATA} libTWPythonPlugin.so \
+ ${STAGEDIR}${PREFIX}/lib/texworks
.include <bsd.port.mk>
diff --git a/editors/texworks/distinfo b/editors/texworks/distinfo
index 3956bd67e181..00eea82cf6d9 100644
--- a/editors/texworks/distinfo
+++ b/editors/texworks/distinfo
@@ -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
diff --git a/editors/texworks/files/patch-TeXworks.pro b/editors/texworks/files/patch-TeXworks.pro
new file mode 100644
index 000000000000..a2b6ac58f1b8
--- /dev/null
+++ b/editors/texworks/files/patch-TeXworks.pro
@@ -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