public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: app-text/goldendict/files/, app-text/goldendict/
@ 2016-11-26 18:45 Michael Palimaka
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Palimaka @ 2016-11-26 18:45 UTC (permalink / raw
  To: gentoo-commits

commit:     f76f3775cec41cc173da7815c77b344ba5c93299
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Sun Nov 20 23:16:46 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Nov 26 18:45:50 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f76f3775

app-text/goldendict: Add 1.5.0_rc2 to have a Qt5 version

Ebuild taken from qt overlay.

Package-Manager: portage-2.3.0

 app-text/goldendict/Manifest                       |  1 +
 ...endict-1.5.0-qtsingleapplication-unbundle.patch | 18 +++++
 app-text/goldendict/goldendict-1.5.0_rc2.ebuild    | 87 ++++++++++++++++++++++
 app-text/goldendict/metadata.xml                   |  2 +-
 4 files changed, 107 insertions(+), 1 deletion(-)

diff --git a/app-text/goldendict/Manifest b/app-text/goldendict/Manifest
index 1a5b715..57ad4cc 100644
--- a/app-text/goldendict/Manifest
+++ b/app-text/goldendict/Manifest
@@ -1 +1,2 @@
 DIST goldendict-1.0.1-src.tar.bz2 2705932 SHA256 b3fb0405a5edb38f02ef881b48c36e46e2eacf641b0caf8d99403f595a4be9a6 SHA512 6c35f804063e14ffc9fe9fbd86e710582c550d10fcabb83e7fb0f65ccad1e18eaa31578a96f0aea67276453239b8035f5a694c7d081f9a6f7a822d2b75ebce55 WHIRLPOOL f642692c5ac921d031e89a4512ac63eb665d5b3d02f2a4aea911566131188f877c173d4624eef073e3580e30d8291c1f0196d870738daf2be469783838305c4c
+DIST goldendict-1.5.0_rc2.tar.gz 19413751 SHA256 bccee0a3d3902f8fa31e439e220a405065fff774e5f8c581be2b0743d3f83fde SHA512 b88067a90df42b07d926231f624be8796f031b872443a45f9744ceeea27f39325bc665090f773528a26ad8391ae2423a29c602068bf2cc4ed5870a07646d2362 WHIRLPOOL f385a8536360b9401a67284d95be65d98d5f6b57d5af73852f5ec1af95c4ce36c9903e9ed04dbd67e7bf035b5b6745378344cc5efbb4923ce4ea31988f95f6ff

diff --git a/app-text/goldendict/files/goldendict-1.5.0-qtsingleapplication-unbundle.patch b/app-text/goldendict/files/goldendict-1.5.0-qtsingleapplication-unbundle.patch
new file mode 100644
index 00000000..01fdb3b
--- /dev/null
+++ b/app-text/goldendict/files/goldendict-1.5.0-qtsingleapplication-unbundle.patch
@@ -0,0 +1,18 @@
+--- a/goldendict.pro
++++ b/goldendict.pro
+@@ -36,7 +36,8 @@
+ QT += sql
+ CONFIG += exceptions \
+     rtti \
+-    stl
++    stl \
++    qtsingleapplication
+ OBJECTS_DIR = build
+ UI_DIR = build
+ MOC_DIR = build
+@@ -632,5 +633,3 @@
+ TS_OUT ~= s/.ts/.qm/g
+ PRE_TARGETDEPS += $$TS_OUT
+ 
+-include( qtsingleapplication/src/qtsingleapplication.pri )
+-

diff --git a/app-text/goldendict/goldendict-1.5.0_rc2.ebuild b/app-text/goldendict/goldendict-1.5.0_rc2.ebuild
new file mode 100644
index 00000000..fa47bf4
--- /dev/null
+++ b/app-text/goldendict/goldendict-1.5.0_rc2.ebuild
@@ -0,0 +1,87 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+MY_PV=${PV^^}
+MY_PV=${MY_PV/_/-}
+inherit eutils qmake-utils
+
+DESCRIPTION="Feature-rich dictionary lookup program"
+HOMEPAGE="http://goldendict.org/"
+SRC_URI="https://github.com/${PN}/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug ffmpeg libav"
+
+RDEPEND="
+	app-arch/bzip2
+	>=app-text/hunspell-1.2:=
+	dev-libs/eb
+	dev-libs/lzo
+	dev-qt/qtcore:5
+	dev-qt/qtgui:5
+	dev-qt/qthelp:5
+	dev-qt/qtnetwork:5
+	dev-qt/qtprintsupport:5
+	dev-qt/qtsingleapplication[qt5]
+	dev-qt/qtsvg:5
+	dev-qt/qtwebkit:5
+	dev-qt/qtwidgets:5
+	dev-qt/qtx11extras:5
+	dev-qt/qtxml:5
+	media-libs/libvorbis
+	media-libs/tiff:0
+	sys-libs/zlib
+	x11-libs/libX11
+	x11-libs/libXtst
+	ffmpeg? (
+		media-libs/libao
+		libav? ( media-video/libav:0= )
+		!libav? ( media-video/ffmpeg:0= )
+	)
+"
+DEPEND="${RDEPEND}
+	virtual/pkgconfig
+"
+
+PATCHES=( "${FILESDIR}/${PN}-1.5.0-qtsingleapplication-unbundle.patch" )
+
+S="${WORKDIR}/${PN}-${MY_PV}"
+
+src_prepare() {
+	default
+
+	# fix installation path
+	sed -i \
+		-e '/PREFIX = /s:/usr/local:/usr:' \
+		${PN}.pro || die
+
+	# add trailing semicolon
+	sed -i -e '/^Categories/s/$/;/' redist/${PN}.desktop || die
+}
+
+src_configure() {
+	local myconf=()
+
+	if ! use ffmpeg && ! use libav ; then
+		myconf+=( DISABLE_INTERNAL_PLAYER=1 )
+	fi
+
+	eqmake5 "${myconf[@]}"
+}
+
+src_install() {
+	dobin ${PN}
+	domenu redist/${PN}.desktop
+	doicon redist/icons/${PN}.png
+
+	insinto /use/share/apps/${PN}/locale
+	doins locale/*.qm
+
+	insinto /usr/share/${PN}/help
+	doins help/*.qch
+}

diff --git a/app-text/goldendict/metadata.xml b/app-text/goldendict/metadata.xml
index 0746d64..fce1000 100644
--- a/app-text/goldendict/metadata.xml
+++ b/app-text/goldendict/metadata.xml
@@ -14,6 +14,6 @@
 		<name>Proxy Maintainers</name>
 	</maintainer>
 	<upstream>
-		<remote-id type="sourceforge">goldendict</remote-id>
+		<remote-id type="github">goldendict/goldendict</remote-id>
 	</upstream>
 </pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: app-text/goldendict/files/, app-text/goldendict/
@ 2018-09-16 11:23 Andreas Sturmlechner
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Sturmlechner @ 2018-09-16 11:23 UTC (permalink / raw
  To: gentoo-commits

commit:     6ebfc3cd8d03ca088b865189634c5fc0efc7b9bd
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 16 10:38:55 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sun Sep 16 11:23:02 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ebfc3cd

app-text/goldendict: Fix build with ffmpeg-4

Closes: https://bugs.gentoo.org/654882
Package-Manager: Portage-2.3.49, Repoman-2.3.10

 .../files/goldendict-1.5.0-ffmpeg-4.patch          | 167 +++++++++++++++++++++
 app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild |   1 +
 2 files changed, 168 insertions(+)

diff --git a/app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch b/app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch
new file mode 100644
index 00000000000..6e6d03675a4
--- /dev/null
+++ b/app-text/goldendict/files/goldendict-1.5.0-ffmpeg-4.patch
@@ -0,0 +1,167 @@
+From 03bbe01b79a1f07a6780cb60f23a087104c5d77b Mon Sep 17 00:00:00 2001
+From: Abs62 <ottomann@yandex.ru>
+Date: Fri, 30 Mar 2018 22:53:24 +0300
+Subject: [PATCH] Fix warnings while compile with FFMpeg 3.4.2 (issue #978)
+
+---
+ ffmpegaudio.cc | 68 +++++++++++++++++++++++++++++++++++++++++++++-----
+ 1 file changed, 62 insertions(+), 6 deletions(-)
+
+diff --git a/ffmpegaudio.cc b/ffmpegaudio.cc
+index ed1172bd..56e8f788 100644
+--- a/ffmpegaudio.cc
++++ b/ffmpegaudio.cc
+@@ -91,6 +91,7 @@ struct DecoderContext
+   QByteArray audioData_;
+   QDataStream audioDataStream_;
+   AVFormatContext * formatContext_;
++  AVCodec * codec_;
+   AVCodecContext * codecContext_;
+   AVIOContext * avioContext_;
+   AVStream * audioStream_;
+@@ -114,6 +115,7 @@ DecoderContext::DecoderContext( QByteArray const & audioData, QAtomicInt & isCan
+   audioData_( audioData ),
+   audioDataStream_( audioData_ ),
+   formatContext_( NULL ),
++  codec_( NULL ),
+   codecContext_( NULL ),
+   avioContext_( NULL ),
+   audioStream_( NULL ),
+@@ -143,7 +145,11 @@ bool DecoderContext::openCodec( QString & errorString )
+     return false;
+   }
+ 
++#if LIBAVCODEC_VERSION_MAJOR < 56 || ( LIBAVCODEC_VERSION_MAJOR == 56 && LIBAVCODEC_VERSION_MINOR < 56 )
+   unsigned char * avioBuffer = ( unsigned char * )av_malloc( kBufferSize + FF_INPUT_BUFFER_PADDING_SIZE );
++#else
++  unsigned char * avioBuffer = ( unsigned char * )av_malloc( kBufferSize + AV_INPUT_BUFFER_PADDING_SIZE );
++#endif
+   if ( !avioBuffer )
+   {
+     errorString = QObject::tr( "av_malloc() failed." );
+@@ -186,7 +192,11 @@ bool DecoderContext::openCodec( QString & errorString )
+   // Find audio stream, use the first audio stream if available
+   for ( unsigned i = 0; i < formatContext_->nb_streams; i++ )
+   {
++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 33 )
+     if ( formatContext_->streams[i]->codec->codec_type == AVMEDIA_TYPE_AUDIO )
++#else
++      if ( formatContext_->streams[i]->codecpar->codec_type == AVMEDIA_TYPE_AUDIO )
++#endif
+     {
+       audioStream_ = formatContext_->streams[i];
+       break;
+@@ -198,22 +208,38 @@ bool DecoderContext::openCodec( QString & errorString )
+     return false;
+   }
+ 
++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 33 )
+   codecContext_ = audioStream_->codec;
+-  AVCodec * codec = avcodec_find_decoder( codecContext_->codec_id );
+-  if ( !codec )
++  codec_ = avcodec_find_decoder( codecContext_->codec_id );
++  if ( !codec_ )
+   {
+     errorString = QObject::tr( "Codec [id: %1] not found." ).arg( codecContext_->codec_id );
+     return false;
+   }
++#else
++  codec_ = avcodec_find_decoder( audioStream_->codecpar->codec_id );
++  if ( !codec_ )
++  {
++    errorString = QObject::tr( "Codec [id: %1] not found." ).arg( audioStream_->codecpar->codec_id );
++    return false;
++  }
++  codecContext_ = avcodec_alloc_context3( codec_ );
++  if ( !codecContext_ )
++  {
++    errorString = QObject::tr( "avcodec_alloc_context3() failed." );
++    return false;
++  }
++  avcodec_parameters_to_context( codecContext_, audioStream_->codecpar );
++#endif
+ 
+-  ret = avcodec_open2( codecContext_, codec, NULL );
++  ret = avcodec_open2( codecContext_, codec_, NULL );
+   if ( ret < 0 )
+   {
+     errorString = QObject::tr( "avcodec_open2() failed: %1." ).arg( avErrorString( ret ) );
+     return false;
+   }
+ 
+-  av_log( NULL, AV_LOG_INFO, "Codec open: %s: channels: %d, rate: %d, format: %s\n", codec->long_name,
++  av_log( NULL, AV_LOG_INFO, "Codec open: %s: channels: %d, rate: %d, format: %s\n", codec_->long_name,
+           codecContext_->channels, codecContext_->sample_rate, av_get_sample_fmt_name( codecContext_->sample_fmt ) );
+   return true;
+ }
+@@ -252,10 +278,13 @@ void DecoderContext::closeCodec()
+ 
+   // Closing a codec context without prior avcodec_open2() will result in
+   // a crash in ffmpeg
+-  if ( audioStream_ && audioStream_->codec && audioStream_->codec->codec )
++  if ( audioStream_ && codecContext_ && codec_ )
+   {
+     audioStream_->discard = AVDISCARD_ALL;
+-    avcodec_close( audioStream_->codec );
++    avcodec_close( codecContext_ );
++#if LIBAVCODEC_VERSION_MAJOR > 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR >= 33 )
++    avcodec_free_context( &codecContext_ );
++#endif
+   }
+ 
+   avformat_close_input( &formatContext_ );
+@@ -356,6 +385,7 @@ bool DecoderContext::play( QString & errorString )
+     if ( packet.stream_index == audioStream_->index )
+     {
+       AVPacket pack = packet;
++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 37 )
+       int gotFrame = 0;
+       do
+       {
+@@ -370,6 +400,19 @@ bool DecoderContext::play( QString & errorString )
+         pack.data += len;
+       }
+       while( pack.size > 0 );
++#else
++      int ret = avcodec_send_packet( codecContext_, &pack );
++      /* read all the output frames (in general there may be any number of them) */
++      while( ret >= 0 )
++      {
++        ret = avcodec_receive_frame( codecContext_, frame);
++
++        if ( Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) || ret < 0 )
++          break;
++
++        playFrame( frame );
++      }
++#endif
+     }
+     // av_free_packet() must be called after each call to av_read_frame()
+ #if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 7 )
+@@ -379,6 +422,7 @@ bool DecoderContext::play( QString & errorString )
+ #endif
+   }
+ 
++#if LIBAVCODEC_VERSION_MAJOR < 57 || ( LIBAVCODEC_VERSION_MAJOR == 57 && LIBAVCODEC_VERSION_MINOR < 37 )
+   if ( !Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) &&
+        codecContext_->codec->capabilities & CODEC_CAP_DELAY )
+   {
+@@ -391,6 +435,18 @@ bool DecoderContext::play( QString & errorString )
+       playFrame( frame );
+     }
+   }
++#else
++  /* flush the decoder */
++  av_init_packet( &packet );
++  int ret = avcodec_send_packet(codecContext_, &packet );
++  while( ret >= 0 )
++  {
++    ret = avcodec_receive_frame(codecContext_, frame);
++    if ( Qt4x5::AtomicInt::loadAcquire( isCancelled_ ) || ret < 0 )
++      break;
++    playFrame( frame );
++  }
++#endif
+ 
+ #if LIBAVCODEC_VERSION_MAJOR < 54
+   av_free( frame );

diff --git a/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild b/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild
index e25c25eb062..866b4e88ea6 100644
--- a/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild
+++ b/app-text/goldendict/goldendict-1.5.0_rc2-r2.ebuild
@@ -51,6 +51,7 @@ DEPEND="${RDEPEND}
 PATCHES=(
 	"${FILESDIR}/${PN}-1.5.0-qtsingleapplication-unbundle.patch"
 	"${FILESDIR}/${PN}-1.5.0-qt-5.11.patch"
+	"${FILESDIR}/${PN}-1.5.0-ffmpeg-4.patch"
 )
 
 S="${WORKDIR}/${PN}-${MY_PV}"


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-09-16 11:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-26 18:45 [gentoo-commits] repo/gentoo:master commit in: app-text/goldendict/files/, app-text/goldendict/ Michael Palimaka
  -- strict thread matches above, loose matches on Subject: below --
2018-09-16 11:23 Andreas Sturmlechner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox