aboutsummaryrefslogtreecommitdiff
path: root/graphics/engauge-digitizer
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2018-06-20 07:55:30 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2018-06-20 07:55:30 +0000
commit146f5689b6f859edd204c64ed52bc510394901a5 (patch)
treee4c082b6a4d2e5fc86dc5b20ebaaeb923a5c06c7 /graphics/engauge-digitizer
parent5b365136aadeb3ebd2ed2d1d9b454f10b810d428 (diff)
downloadports-146f5689b6f859edd204c64ed52bc510394901a5.tar.gz
ports-146f5689b6f859edd204c64ed52bc510394901a5.zip
graphics/engauge-digitizer: Add translations
Port changes: * Add the NLS option * Build and install translations * Make help to build only when DOCS=on * Limit USE_QT5=help to DOCS=on
Notes
Notes: svn path=/head/; revision=472851
Diffstat (limited to 'graphics/engauge-digitizer')
-rw-r--r--graphics/engauge-digitizer/Makefile20
-rw-r--r--graphics/engauge-digitizer/pkg-plist16
2 files changed, 32 insertions, 4 deletions
diff --git a/graphics/engauge-digitizer/Makefile b/graphics/engauge-digitizer/Makefile
index f5f5f136c3d9..f5e144653c68 100644
--- a/graphics/engauge-digitizer/Makefile
+++ b/graphics/engauge-digitizer/Makefile
@@ -4,6 +4,7 @@ PORTNAME= engauge-digitizer
DISTVERSIONPREFIX= v
DISTVERSION= 10.7.6-2
DISTVERSIONSUFFIX= -g7ce911c2
+PORTREVISION= 1
CATEGORIES= graphics math science
MAINTAINER= yuri@FreeBSD.org
@@ -20,15 +21,24 @@ LIB_DEPENDS= libfftw3.so:math/fftw3 \
USES= desktop-file-utils qmake
USE_GITHUB= yes
GH_ACCOUNT= markummitchell
-USE_QT5= core gui help printsupport sql xml widgets buildtools_build linguist_build
+USE_QT5= core gui printsupport sql xml widgets buildtools_build linguist_build
USE_GL= gl
CONFIGURE_ENV= OPENJPEG_INCLUDE=${PREFIX}/include/openjpeg-2.3 OPENJPEG_LIB=${PREFIX}/lib \
POPPLER_INCLUDE=${PREFIX}/include/poppler/qt5 POPPLER_LIB=${PREFIX}/lib
QMAKE_ARGS= "CONFIG+=jpeg2000 pdf"
-OPTIONS_DEFINE= DOCS
+OPTIONS_DEFINE= NLS DOCS
+OPTIONS_SUB= yes
-post-build:
+DOCS_USE= QT5=help
+
+do-patch-NLS-on:
+ @${REINPLACE_CMD} -e 's|QCoreApplication::applicationDirPath () + "/translations",|"${DATADIR}/translations",|' ${WRKSRC}/src/Translator/TranslatorContainer.cpp
+
+post-build-NLS-on:
+ @cd ${WRKSRC} && lrelease engauge.pro
+
+post-build-DOCS-on:
@cd ${WRKSRC}/help && ./build
do-install:
@@ -37,6 +47,10 @@ do-install:
${GZIP_CMD} < ${WRKSRC}/src/img/${PORTNAME}.svg > ${STAGEDIR}${PREFIX}/share/icons/hicolor/scalable/apps/${PORTNAME}.svgz
${INSTALL_DATA} ${WRKSRC}/dev/${PORTNAME}.desktop ${STAGEDIR}${PREFIX}/share/applications/${PORTNAME}.desktop
+do-install-NLS-on:
+ @${MKDIR} ${STAGEDIR}${DATADIR}/translations
+ ${INSTALL_DATA} ${WRKSRC}/translations/*.qm ${STAGEDIR}${DATADIR}/translations
+
do-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/bin/documentation/engauge.qch ${STAGEDIR}${DOCSDIR}
diff --git a/graphics/engauge-digitizer/pkg-plist b/graphics/engauge-digitizer/pkg-plist
index a4c6131f5067..8ad8ee69a063 100644
--- a/graphics/engauge-digitizer/pkg-plist
+++ b/graphics/engauge-digitizer/pkg-plist
@@ -1,5 +1,19 @@
bin/engauge
-share/icons/hicolor/scalable/apps/engauge-digitizer.svgz
share/applications/engauge-digitizer.desktop
%%PORTDOCS%%%%DOCSDIR%%/engauge.qch
%%PORTDOCS%%%%DOCSDIR%%/engauge.qhc
+%%NLS%%%%DATADIR%%/translations/engauge_ar.qm
+%%NLS%%%%DATADIR%%/translations/engauge_cs.qm
+%%NLS%%%%DATADIR%%/translations/engauge_de.qm
+%%NLS%%%%DATADIR%%/translations/engauge_en.qm
+%%NLS%%%%DATADIR%%/translations/engauge_es.qm
+%%NLS%%%%DATADIR%%/translations/engauge_fr.qm
+%%NLS%%%%DATADIR%%/translations/engauge_hi.qm
+%%NLS%%%%DATADIR%%/translations/engauge_it.qm
+%%NLS%%%%DATADIR%%/translations/engauge_ja.qm
+%%NLS%%%%DATADIR%%/translations/engauge_kk.qm
+%%NLS%%%%DATADIR%%/translations/engauge_ko.qm
+%%NLS%%%%DATADIR%%/translations/engauge_pt.qm
+%%NLS%%%%DATADIR%%/translations/engauge_ru.qm
+%%NLS%%%%DATADIR%%/translations/engauge_zh.qm
+share/icons/hicolor/scalable/apps/engauge-digitizer.svgz