media-video/smplayer: Unbundle quazip (bug #383309)
authorSebastian Pipping <sping@gentoo.org>
Wed, 21 Sep 2011 13:13:19 +0000 (13:13 +0000)
committerSebastian Pipping <sping@gentoo.org>
Wed, 21 Sep 2011 13:13:19 +0000 (13:13 +0000)
Package-Manager: portage-2.1.10.19/cvs/Linux x86_64

media-video/smplayer/ChangeLog
media-video/smplayer/Manifest
media-video/smplayer/files/smplayer-0.6.9-quazip.patch [new file with mode: 0644]
media-video/smplayer/smplayer-0.6.9-r2.ebuild [new file with mode: 0644]

index be3aa969b89fcc36d67aa4a715fa239fa5cc5d19..148856e668b81672153e7a3ae0392687ebdd961d 100644 (file)
@@ -1,6 +1,12 @@
 # ChangeLog for media-video/smplayer
 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-video/smplayer/ChangeLog,v 1.94 2011/09/17 00:10:13 beandog Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-video/smplayer/ChangeLog,v 1.95 2011/09/21 13:13:19 sping Exp $
+
+*smplayer-0.6.9-r2 (21 Sep 2011)
+
+  21 Sep 2011; Sebastian Pipping <sping@gentoo.org> +smplayer-0.6.9-r2.ebuild,
+  +files/smplayer-0.6.9-quazip.patch:
+  Unbundle quazip (bug #383309), re-keywording requested (bug #383945)
 
 *smplayer-0.6.9-r1 (16 Sep 2011)
 
index 2b6e5e01d53f243d212e2ec9d38b01c25c80a50b..3391f8852341d97b76b82be06e2372cad79f3e64 100644 (file)
@@ -1,8 +1,20 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 AUX smplayer-0.6.8-quit.patch 559 RMD160 57a13ce73bf1bc42ff84afa93740b2b91979c68a SHA1 cd6747917b8a8a71d46b8841d7924c4e304bb636 SHA256 52bd82633b4561613675121ae10af12ef25a11b7343eea043a3a70dd32aa999a
+AUX smplayer-0.6.9-quazip.patch 3078 RMD160 e45f97595a53ee2eae603ca41d14e680ac504f76 SHA1 dee5b27bf1bf7cb4784d38bfc07cad6c13504a44 SHA256 4f2004a512879e3e0cf8f497a5c9218c662b3e8986e81797b7f3eebe77445c5a
 DIST smplayer-0.6.8.tar.bz2 1670580 RMD160 10db255b8e21658b03fcff66de5554acaf29782e SHA1 0f7d53babe1fd71ea9eddb448622d112495242e7 SHA256 466b589ee2d3944b2e3b8f3a6dae436f7d31f054912cfe56f8d93454594c4ca2
 DIST smplayer-0.6.9.tar.bz2 1723032 RMD160 8e47e88b9fddc56d66c338c1886a5079ab279854 SHA1 1879839c229b7ef2dcd6d7e34e2e2057fae5182c SHA256 b91009b6dc2a3cdd5acc2bdacc3cf6870fce8f63d8e6ef9cfe8e199f1acc2e35
 EBUILD smplayer-0.6.8.ebuild 2786 RMD160 04e67cf905669d4a708ec51b1b0572767750fa1c SHA1 590323851d451026bd18fa51c2ca5cba7ab69952 SHA256 c7a407f5e0c93acf87d5c22670f079311a65cc04d938e40d26a93ad71e709ebe
 EBUILD smplayer-0.6.9-r1.ebuild 2677 RMD160 e1e59e769b0429f15cf1d6bf8621779796ca350e SHA1 e70b0a7ceb19ccef0b0c18e2fa33c10004c1f22a SHA256 e8a0a306afd925e88fcb3842a4bb3a1e6d8c7e6a49f33a339636bc0c09d231ed
+EBUILD smplayer-0.6.9-r2.ebuild 2754 RMD160 066f96e7d1ffd0f1b26995fb23600aea887de0fc SHA1 f7fd269dab83c78b8c43cb455d91ef477e99cc3f SHA256 0521740a68ec3d660692f60c8679e5994d8f62f8e4c00c1b1bfcda57468c7dc0
 EBUILD smplayer-0.6.9.ebuild 2559 RMD160 5dec7b33269b7fef6ade928df0be224232f1a1bc SHA1 838c5877a376b5f3a004175833e3fdbdb037ba00 SHA256 00306f46e88c9c1eaa617b788f9dfc2a99150c8e82ecee54e0b53d9edd0fd1ae
-MISC ChangeLog 12992 RMD160 b4f09f82968792908a50061ff6cb987c9598b492 SHA1 274b7683aff7c083595382c1d97cd846bae0a0fa SHA256 9063a5241a766cf5b391904d51990fbee7efadb3c88e93c9149719035f9abce4
+MISC ChangeLog 13213 RMD160 b41586ac0f6820776387846c8b9f500086ab407b SHA1 8303cef620f2cb1bb7faf8a8ab96da650b01b7fa SHA256 c6a6ffe46977ba49851cc678a629a127ffe2aa7720e534e67c4c9dba6f33ccdb
 MISC metadata.xml 174 RMD160 0a13b88e8a29e1544788c6a992ec89f0596ce194 SHA1 aba42874330898fd11455305dc72f5c3be472565 SHA256 89d4f3510de4db0434e0b3794ed9bef3e603217ca0cb195d3e817c208239f6fa
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.18 (GNU/Linux)
+
+iEYEARECAAYFAk554u8ACgkQsAvGakAaFgBLSACgiNQvIzPXytYD5Th/Kluxv24P
+QHAAnjCDFEmA93GulGtRnQRg2ThXodWB
+=/CVa
+-----END PGP SIGNATURE-----
diff --git a/media-video/smplayer/files/smplayer-0.6.9-quazip.patch b/media-video/smplayer/files/smplayer-0.6.9-quazip.patch
new file mode 100644 (file)
index 0000000..7e32c4b
--- /dev/null
@@ -0,0 +1,96 @@
+From 6350ac5b99cccf4e45e334512bc64b5c71b06135 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Wed, 21 Sep 2011 14:23:08 +0200
+Subject: [PATCH] Move to system's quazip
+
+---
+ src/findsubtitles/findsubtitles.pro       |   11 ++---------
+ src/findsubtitles/findsubtitleswindow.cpp |    4 ++--
+ src/smplayer.pro                          |   11 ++---------
+ 3 files changed, 6 insertions(+), 20 deletions(-)
+
+diff --git a/src/findsubtitles/findsubtitles.pro b/src/findsubtitles/findsubtitles.pro
+index bbfa8a1..ad0cefa 100644
+--- a/src/findsubtitles/findsubtitles.pro
++++ b/src/findsubtitles/findsubtitles.pro
+@@ -28,8 +28,8 @@ FORMS += ../filechooser.ui findsubtitleswindow.ui findsubtitlesconfigdialog.ui
+ DEFINES += NO_SMPLAYER_SUPPORT DOWNLOAD_SUBS
+ contains( DEFINES, DOWNLOAD_SUBS ) {
+-      INCLUDEPATH += filedownloader quazip
+-      DEPENDPATH += filedownloader quazip
++      INCLUDEPATH += filedownloader
++      DEPENDPATH += filedownloader
+       HEADERS += filedownloader.h subchooserdialog.h
+       SOURCES += filedownloader.cpp subchooserdialog.cpp
+@@ -38,17 +38,2 @@ contains( DEFINES, DOWNLOAD_SUBS ) {
+-      HEADERS += crypt.h \
+-                 ioapi.h \
+-                 quazip.h \
+-                 quazipfile.h \
+-                 quazipfileinfo.h \
+-                 quazipnewinfo.h \
+-                 unzip.h \
+-                 zip.h
+-
+-      SOURCES += ioapi.c \
+-                 quazip.cpp \
+-                 quazipfile.cpp \
+-                 quazipnewinfo.cpp \
+-                 unzip.c \
+-                 zip.c
+diff --git a/src/findsubtitles/findsubtitleswindow.cpp b/src/findsubtitles/findsubtitleswindow.cpp
+index 6d1d2c7..6defa5d 100644
+--- a/src/findsubtitles/findsubtitleswindow.cpp
++++ b/src/findsubtitles/findsubtitleswindow.cpp
+@@ -36,8 +36,8 @@
+ #ifdef DOWNLOAD_SUBS
+ #include "filedownloader.h"
+ #include "subchooserdialog.h"
+-#include "quazip.h"
+-#include "quazipfile.h"
++#include <quazip/quazip.h>
++#include <quazip/quazipfile.h>
+ #include <QTemporaryFile>
+ #include <QBuffer>
+ #endif
+diff --git a/src/smplayer.pro b/src/smplayer.pro
+index 9020e6c..9e995fc 100644
+--- a/src/smplayer.pro
++++ b/src/smplayer.pro
+@@ -249,8 +249,8 @@ TRANSLATIONS = translations/smplayer_es.ts translations/smplayer_de.ts \
+                translations/smplayer_et.ts translations/smplayer_lt.ts
+ contains( DEFINES, DOWNLOAD_SUBS ) {
+-      INCLUDEPATH += findsubtitles/filedownloader findsubtitles/quazip
+-      DEPENDPATH += findsubtitles/filedownloader findsubtitles/quazip
++      INCLUDEPATH += findsubtitles/filedownloader
++      DEPENDPATH += findsubtitles/filedownloader
+       HEADERS += filedownloader.h subchooserdialog.h
+       SOURCES += filedownloader.cpp subchooserdialog.cpp
+@@ -259,17 +259,3 @@ contains( DEFINES, DOWNLOAD_SUBS ) {
+-      HEADERS += crypt.h \
+-                 ioapi.h \
+-                 quazip.h \
+-                 quazipfile.h \
+-                 quazipfileinfo.h \
+-                 quazipnewinfo.h \
+-                 unzip.h \
+-                 zip.h
+-
+-      SOURCES += ioapi.c \
+-                 quazip.cpp \
+-                 quazipfile.cpp \
+-                 quazipnewinfo.cpp \
+-                 unzip.c \
+-                 zip.c
++      LIBS += -lquazip
+-- 
+1.7.6.1
+
diff --git a/media-video/smplayer/smplayer-0.6.9-r2.ebuild b/media-video/smplayer/smplayer-0.6.9-r2.ebuild
new file mode 100644 (file)
index 0000000..aaa4d23
--- /dev/null
@@ -0,0 +1,106 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-video/smplayer/smplayer-0.6.9-r2.ebuild,v 1.1 2011/09/21 13:13:19 sping Exp $
+
+EAPI="2"
+LANGS="bg ca cs de en_US es et eu fi fr gl hu it ja ka ko ku mk nl pl pt_BR
+pt sk sr sv tr zh_CN zh_TW"
+LANGSLONG="ar_SY el_GR ro_RO ru_RU sl_SI uk_UA vi_VN"
+
+inherit eutils qt4-r2
+
+MY_PV=${PV##*_p}
+if [[ "${MY_PV}" != "${PV}" ]]; then
+       # svn snapshot
+       MY_PV=r${MY_PV}
+       MY_P=${PN}-${MY_PV}
+       S="${WORKDIR}/${MY_P}"
+       SRC_URI="mirror://gentoo/${MY_P}.tar.bz2"
+else
+       # regular upstream release
+       SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2"
+fi
+
+DESCRIPTION="Great Qt4 GUI front-end for mplayer"
+HOMEPAGE="http://smplayer.berlios.de/"
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug"
+
+DEPEND="x11-libs/qt-gui:4
+       dev-libs/quazip"
+MPLAYER_USE="[ass,png]"
+RDEPEND="${DEPEND}
+       || ( media-video/mplayer${MPLAYER_USE} media-video/mplayer2[libass,png] media-video/mplayer2${MPLAYER_USE} )"
+
+src_prepare() {
+       # Force Ctrl+Q as default quit shortcut
+       epatch "${FILESDIR}/${PN}-0.6.8-quit.patch"
+
+       # Unbundle dev-libs/quazip
+       rm -R src/findsubtitles/quazip/ || die
+       epatch "${FILESDIR}"/${P}-quazip.patch
+
+       # Upstream Makefile sucks
+       sed -i -e "/^PREFIX=/s:/usr/local:/usr:" \
+               -e "/^DOC_PATH=/s:packages/smplayer:${PF}:" \
+               -e '/\.\/get_svn_revision\.sh/,+2c\
+       cd src && $(DEFS) $(MAKE)' \
+               "${S}"/Makefile || die "sed failed"
+
+       # Turn debug message flooding off
+       if ! use debug ; then
+               sed -i 's:#\(DEFINES += NO_DEBUG_ON_CONSOLE\):\1:' \
+                       "${S}"/src/smplayer.pro || die "sed failed"
+       fi
+}
+
+src_configure() {
+       cd "${S}"/src
+       echo "#define SVN_REVISION \"SVN-${MY_PV} (Gentoo)\"" > svn_revision.h
+       eqmake4
+}
+
+gen_translation() {
+       ebegin "Generating $1 translation"
+       lrelease ${PN}_${1}.ts
+       eend $? || die "failed to generate $1 translation"
+}
+
+src_compile() {
+       emake || die
+
+       # Generate translations
+       cd "${S}"/src/translations
+       local lang= nolangs= x=
+       for lang in ${LINGUAS}; do
+               if has ${lang} ${LANGS}; then
+                       gen_translation ${lang}
+                       continue
+               elif [[ " ${LANGSLONG} " == *" ${lang}_"* ]]; then
+                       for x in ${LANGSLONG}; do
+                               if [[ "${lang}" == "${x%_*}" ]]; then
+                                       gen_translation ${x}
+                                       continue 2
+                               fi
+                       done
+               fi
+               nolangs="${nolangs} ${lang}"
+       done
+       [[ -n ${nolangs} ]] && ewarn "Sorry, but ${PN} does not support the LINGUAS:" ${nolangs}
+       # install fails when no translation is present (bug 244370)
+       [[ -z $(ls *.qm 2>/dev/null) ]] && gen_translation en_US
+}
+
+src_install() {
+       # remove unneeded copies of GPL
+       rm -f Copying.txt docs/{cs,en,ja,ru}/gpl.html
+       rm -rf docs/{de,es,nl,ro}
+
+       # remove windows-only files
+       rm "${S}"/*.bat
+
+       emake DESTDIR="${D}" install || die
+       prepalldocs
+}