From 79e7dd9f875702b93f2eca7bb39c4e773bfde000 Mon Sep 17 00:00:00 2001 From: Thomas Zander Date: Tue, 30 Dec 2014 13:47:40 +0000 Subject: [PATCH] - Update to upstream version 2.0.1 - add NLS option - switch to vendor install + post-install - move .svg icon to hicolor theme as well - unbreak USES=qmake:outsource (unused) PR: 196371 Submitted by: jbeich@vfemail.net (maintainer) --- multimedia/baka-mplayer/Makefile | 44 +++++++-------- multimedia/baka-mplayer/distinfo | 4 +- .../files/patch-src_Baka-MPlayer.pro | 55 ++++++++++++++++--- multimedia/baka-mplayer/pkg-plist | 6 +- 4 files changed, 73 insertions(+), 36 deletions(-) diff --git a/multimedia/baka-mplayer/Makefile b/multimedia/baka-mplayer/Makefile index 56584e5050d9..7382f347bb5b 100644 --- a/multimedia/baka-mplayer/Makefile +++ b/multimedia/baka-mplayer/Makefile @@ -1,7 +1,7 @@ # $FreeBSD$ PORTNAME= baka-mplayer -DISTVERSION= 2.0.0 +DISTVERSION= 2.0.1 CATEGORIES= multimedia audio MAINTAINER= jbeich@vfemail.net @@ -15,42 +15,38 @@ USE_GITHUB= yes GH_ACCOUNT= u8sand GH_PROJECT= Baka-MPlayer GH_TAGNAME= v${DISTVERSION} -GH_COMMIT= 0393546 +GH_COMMIT= a76ef8d USES= compiler:c++11-lib pkgconfig qmake -USE_QT5= qmake_build buildtools_build gui network svg_run widgets x11extras -QMAKE_ARGS= src/${GH_PROJECT}.pro +USE_QT5= qmake_build buildtools_build gui network svg widgets x11extras +QMAKE_SOURCE_PATH=${WRKSRC}/src +QMAKE_ARGS= lupdate="${LUPDATE}" lrelease="${LRELEASE}" \ + MEDIADIR="${PREFIX}/share/icons/hicolor/scalable/apps" INSTALLS_ICONS= yes -OPTIONS_DEFINE= NOTO +OPTIONS_DEFINE= DOCS NLS NOTO +OPTIONS_SUB= yes + +NLS_USE= QT5=linguisttools_build +NLS_QMAKE_ON= CONFIG+="install_translations" NOTO_DESC= Original look with Noto Sans font NOTO_RUN_DEPENDS= noto>0:${PORTSDIR}/x11-fonts/noto -.include - post-patch: ${REINPLACE_CMD} '/^Comment/s,=.*,=${COMMENT},' \ - ${WRKSRC}/arch/${PORTNAME}.desktop + ${WRKSRC}/etc/${PORTNAME}.desktop + ${REINPLACE_CMD} -e 's,/usr,${PREFIX},' \ + -e 's,share/man,man,' \ + ${WRKSRC}/src/Baka-MPlayer.pro -do-install: - ${INSTALL_PROGRAM} ${WRKSRC}/build/${PORTNAME} \ - ${STAGEDIR}${PREFIX}/bin +post-install: +# XXX vendor install_man is too broken ${INSTALL_MAN} ${WRKSRC}/etc/doc/${PORTNAME}.man \ ${STAGEDIR}${MAN1PREFIX}/man/man1/${PORTNAME}.1 - ${INSTALL_DATA} ${WRKSRC}/arch/${PORTNAME}.desktop \ - ${STAGEDIR}${DESKTOPDIR} -.if ${PORT_OPTIONS:MDOCS} - @${MKDIR} ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} - ${INSTALL_DATA} ${WRKSRC}/etc/doc/${PORTNAME}.md \ - ${STAGEDIR}${PREFIX}/share/doc/${PORTNAME} -.endif - @cd ${WRKSRC}/etc/logo && for f in *.png; do \ + @(cd ${WRKSRC}/etc/logo && for f in *.png; do \ ${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%.*}/apps; \ ${INSTALL_DATA} -v $$f \ - ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%.*}/apps/${PORTNAME}.$${f#*.}; \ - done - @${MKDIR} ${STAGEDIR}${PREFIX}/share/icons/scalable/apps - ${INSTALL_DATA} ${WRKSRC}/etc/logo/${PORTNAME}-icon.svg \ - ${STAGEDIR}${PREFIX}/share/icons/scalable/apps/${PORTNAME}.svg + ${STAGEDIR}${PREFIX}/share/icons/hicolor/$${f%.*}/apps/${PORTNAME}.$${f#*.}; \ + done) .include diff --git a/multimedia/baka-mplayer/distinfo b/multimedia/baka-mplayer/distinfo index cd9b0dcc981e..48a938fe8d19 100644 --- a/multimedia/baka-mplayer/distinfo +++ b/multimedia/baka-mplayer/distinfo @@ -1,2 +1,2 @@ -SHA256 (baka-mplayer-2.0.0.tar.gz) = 38d3726047a80115d902cc62ce2c22db709a0ec513d71003a6be99cf203568c4 -SIZE (baka-mplayer-2.0.0.tar.gz) = 416005 +SHA256 (baka-mplayer-2.0.1.tar.gz) = 0007ede896d3721d6fc7296e1b0b15f21386ddcc539cd72f3b63f922178f74bd +SIZE (baka-mplayer-2.0.1.tar.gz) = 439926 diff --git a/multimedia/baka-mplayer/files/patch-src_Baka-MPlayer.pro b/multimedia/baka-mplayer/files/patch-src_Baka-MPlayer.pro index 55379204eafa..eae65484cf22 100644 --- a/multimedia/baka-mplayer/files/patch-src_Baka-MPlayer.pro +++ b/multimedia/baka-mplayer/files/patch-src_Baka-MPlayer.pro @@ -1,13 +1,50 @@ -# https://github.com/u8sand/Baka-MPlayer/commit/ddb1dcf +commit 12cacc9 +Author: Daniel Clarke +Date: Sun Dec 28 23:00:42 2014 -0500 ---- src/Baka-MPlayer.pro~ + .pro adjustment to deal with INSTROOT +--- + src/Baka-MPlayer.pro | 30 +++++++++++++++--------------- + 1 file changed, 15 insertions(+), 15 deletions(-) + +diff --git src/Baka-MPlayer.pro src/Baka-MPlayer.pro +index 22c5901..8508447 100644 +--- src/Baka-MPlayer.pro +++ src/Baka-MPlayer.pro -@@ -8,7 +8,7 @@ QT += core gui network +@@ -38,21 +38,21 @@ win32 { + } - greaterThan(QT_MAJOR_VERSION, 4): QT += widgets - --TARGET = Baka-MPlayer -+TARGET = baka-mplayer - DEFINES += 'BAKA_MPLAYER_VERSION=\\"2.0.0\\"' \ - 'SETTINGS_FILE=\\"bakamplayer\\"' + # INSTROOT is the installation root directory, leave empty if not using a package management system +-isEmpty(BINDIR):BINDIR=$$INSTROOT/usr/bin +-isEmpty(MEDIADIR):MEDIADIR=$$INSTROOT/usr/share/pixmaps +-isEmpty(APPDIR):APPDIR=$$INSTROOT/usr/share/applications +-isEmpty(DOCDIR):DOCDIR=$$INSTROOT/usr/share/doc +-isEmpty(MANDIR):MANDIR=$$INSTROOT/usr/share/man +-isEmpty(LICENSEDIR):LICENSEDIR=$$INSTROOT/usr/share/licenses +-isEmpty(BAKADIR):BAKADIR=$$INSTROOT/usr/share/baka-mplayer +- +-target.path = $$BINDIR +-logo.path = $$MEDIADIR +-desktop.path = $$APPDIR +-manual.path = $$DOCDIR/baka-mplayer +-man.path = $$MANDIR/man1 +-license.path = $$LICENSEDIR/baka-mplayer +-translations.path = $$BAKADIR/translations ++isEmpty(BINDIR):BINDIR=/usr/bin ++isEmpty(MEDIADIR):MEDIADIR=/usr/share/pixmaps ++isEmpty(APPDIR):APPDIR=/usr/share/applications ++isEmpty(DOCDIR):DOCDIR=/usr/share/doc ++isEmpty(MANDIR):MANDIR=/usr/share/man ++isEmpty(LICENSEDIR):LICENSEDIR=/usr/share/licenses ++isEmpty(BAKADIR):BAKADIR=/usr/share/baka-mplayer ++ ++target.path = $$INSTROOT$$BINDIR ++logo.path = $$INSTROOT$$MEDIADIR ++desktop.path = $$INSTROOT$$APPDIR ++manual.path = $$INSTROOT$$DOCDIR/baka-mplayer ++man.path = $$INSTROOT$$MANDIR/man1 ++license.path = $$INSTROOT$$LICENSEDIR/baka-mplayer ++translations.path = $$INSTROOT$$BAKADIR/translations + logo.files = ../etc/logo/baka-mplayer.svg + desktop.files = ../etc/baka-mplayer.desktop diff --git a/multimedia/baka-mplayer/pkg-plist b/multimedia/baka-mplayer/pkg-plist index 0006a03c5fa4..04c76ae99f65 100644 --- a/multimedia/baka-mplayer/pkg-plist +++ b/multimedia/baka-mplayer/pkg-plist @@ -1,6 +1,10 @@ bin/baka-mplayer man/man1/baka-mplayer.1.gz share/applications/baka-mplayer.desktop +%%NLS%%%%DATADIR%%/translations/baka-mplayer_ko.qm +%%NLS%%%%DATADIR%%/translations/baka-mplayer_pt.qm +%%NLS%%%%DATADIR%%/translations/baka-mplayer_ru.qm +%%NLS%%%%DATADIR%%/translations/baka-mplayer_zh.qm %%PORTDOCS%%%%DOCSDIR%%/baka-mplayer.md share/icons/hicolor/128x128/apps/baka-mplayer.png share/icons/hicolor/16x16/apps/baka-mplayer.png @@ -11,4 +15,4 @@ share/icons/hicolor/48x48/apps/baka-mplayer.png share/icons/hicolor/512x512/apps/baka-mplayer.png share/icons/hicolor/64x64/apps/baka-mplayer.png share/icons/hicolor/96x96/apps/baka-mplayer.png -share/icons/scalable/apps/baka-mplayer.svg +share/icons/hicolor/scalable/apps/baka-mplayer.svg