Page MenuHomeSolus

D3556.id8771.diff
No OneTemporary

D3556.id8771.diff

diff --git a/abi_used_libs b/abi_used_libs
--- a/abi_used_libs
+++ b/abi_used_libs
@@ -12,9 +12,9 @@
libX11.so.6
libXtst.so.6
libao.so.4
-libavcodec.so.57
-libavformat.so.57
-libavutil.so.55
+libavcodec.so.58
+libavformat.so.58
+libavutil.so.56
libbz2.so.1.0
libc.so.6
libgcc_s.so.1
diff --git a/files/ffmpeg4.patch b/files/ffmpeg4.patch
new file mode 100644
--- /dev/null
+++ b/files/ffmpeg4.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/files/qt5.11-1.patch b/files/qt5.11-1.patch
new file mode 100644
--- /dev/null
+++ b/files/qt5.11-1.patch
@@ -0,0 +1,34 @@
+From 3d4a468b6c8cb154c88cf4592a5845973999dc29 Mon Sep 17 00:00:00 2001
+From: Abs62 <ottomann@yandex.ru>
+Date: Tue, 10 Apr 2018 18:44:43 +0300
+Subject: [PATCH] Qt5: Fix compilation with Qt 5.11 (issue #991)
+
+---
+ fulltextsearch.hh | 1 +
+ initializing.cc | 1 +
+ 2 files changed, 2 insertions(+)
+
+diff --git a/fulltextsearch.hh b/fulltextsearch.hh
+index da7e2943..adf9619f 100644
+--- a/fulltextsearch.hh
++++ b/fulltextsearch.hh
+@@ -6,6 +6,7 @@
+ #include <QRegExp>
+ #include <QAbstractListModel>
+ #include <QList>
++#include <QAction>
+
+ #include "dictionary.hh"
+ #include "ui_fulltextsearch.h"
+diff --git a/initializing.cc b/initializing.cc
+index 0db6909b..59e605d6 100644
+--- a/initializing.cc
++++ b/initializing.cc
+@@ -1,6 +1,7 @@
+ /* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
+ * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */
+
++#include <QIcon>
+ #include "initializing.hh"
+ #include <QCloseEvent>
+
diff --git a/files/qt5.11-2.patch b/files/qt5.11-2.patch
new file mode 100644
--- /dev/null
+++ b/files/qt5.11-2.patch
@@ -0,0 +1,22 @@
+From a65967805ab424b299bdfa1d1f9c7ebb8a7fd517 Mon Sep 17 00:00:00 2001
+From: Perfect Gentleman <perfect007gentleman@gmail.com>
+Date: Wed, 11 Apr 2018 00:04:12 +0700
+Subject: [PATCH] Update groups_widgets.hh
+
+fixes https://github.com/goldendict/goldendict/issues/991
+---
+ groups_widgets.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/groups_widgets.hh b/groups_widgets.hh
+index ce442fa2..2064e3bb 100644
+--- a/groups_widgets.hh
++++ b/groups_widgets.hh
+@@ -8,6 +8,7 @@
+
+ #include <vector>
+
++#include <QAction>
+ #include <QListWidget>
+ #include <QSortFilterProxyModel>
+
diff --git a/package.yml b/package.yml
--- a/package.yml
+++ b/package.yml
@@ -1,30 +1,33 @@
name : goldendict
version : 1.5.0_rc2
-release : 2
+release : 3
source :
- https://github.com/goldendict/goldendict/archive/1.5.0-RC2.tar.gz : bccee0a3d3902f8fa31e439e220a405065fff774e5f8c581be2b0743d3f83fde
-license : GPL-3.0
+license : GPL-3.0-or-later
component : office
-summary : Feature-rich dictionary lookup program, supporting multiple dictionary
- formats
+summary : Feature-rich dictionary lookup program, supporting multiple dictionary formats
description: |
Feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained and allowing you to type in words without any accents or correct case.
builddeps :
+ - pkgconfig(Qt5Help)
+ - pkgconfig(Qt5Svg)
+ - pkgconfig(Qt5WebKit)
+ - pkgconfig(Qt5X11Extras)
- pkgconfig(ao)
- pkgconfig(glu)
- pkgconfig(hunspell)
- pkgconfig(libavutil)
- pkgconfig(libtiff-4)
- - pkgconfig(Qt5Help)
- - pkgconfig(Qt5Svg)
- - pkgconfig(Qt5WebKit)
- - pkgconfig(Qt5X11Extras)
- pkgconfig(vorbisfile)
- pkgconfig(xtst)
- bzip2-devel
- lzo-devel
setup : |
- %qmake "CONFIG+=no_epwing_support" PREFIX="/usr"
+ %patch -p1 < $pkgfiles/ffmpeg4.patch
+ %patch -p1 < $pkgfiles/qt5.11-1.patch
+ %patch -p1 < $pkgfiles/qt5.11-2.patch
+
+ %qmake "CONFIG+=no_epwing_support" PREFIX="%PREFIX%"
build : |
%make
install : |
diff --git a/pspec_x86_64.xml b/pspec_x86_64.xml
--- a/pspec_x86_64.xml
+++ b/pspec_x86_64.xml
@@ -2,42 +2,71 @@
<Source>
<Name>goldendict</Name>
<Packager>
- <Name>Peter O&apos;Connor</Name>
- <Email>peter@solus-project.com</Email>
+ <Name>Pierre-Yves</Name>
+ <Email>pyu@riseup.net</Email>
</Packager>
- <License>GPL-3.0</License>
+ <License>GPL-3.0-or-later</License>
<PartOf>office</PartOf>
- <Summary xml:lang="en">feature-rich dictionary lookup program, supporting multiple dictionary formats</Summary>
- <Description xml:lang="en">feature-rich dictionary lookup program, supporting multiple dictionary formats
-(StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect
-article rendering with the complete markup, illustrations and other content
-retained and allowing you to type in words without any accents or correct case
+ <Summary xml:lang="en">Feature-rich dictionary lookup program, supporting multiple dictionary formats</Summary>
+ <Description xml:lang="en">Feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained and allowing you to type in words without any accents or correct case.
</Description>
<Archive type="binary" sha1sum="79eb0752a961b8e0d15c77d298c97498fbc89c5a">https://solus-project.com/sources/README.Solus</Archive>
</Source>
<Package>
<Name>goldendict</Name>
- <Summary xml:lang="en">feature-rich dictionary lookup program, supporting multiple dictionary formats</Summary>
- <Description xml:lang="en">feature-rich dictionary lookup program, supporting multiple dictionary formats
-(StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect
-article rendering with the complete markup, illustrations and other content
-retained and allowing you to type in words without any accents or correct case
+ <Summary xml:lang="en">Feature-rich dictionary lookup program, supporting multiple dictionary formats</Summary>
+ <Description xml:lang="en">Feature-rich dictionary lookup program, supporting multiple dictionary formats (StarDict/Babylon/Lingvo/Dictd) and online dictionaries, featuring perfect article rendering with the complete markup, illustrations and other content retained and allowing you to type in words without any accents or correct case.
</Description>
<PartOf>office</PartOf>
<Files>
- <Path fileType="executable">/usr/bin</Path>
+ <Path fileType="executable">/usr/bin/goldendict</Path>
<Path fileType="data">/usr/share/applications/goldendict.desktop</Path>
- <Path fileType="data">/usr/share/goldendict</Path>
+ <Path fileType="data">/usr/share/goldendict/help/gdhelp_en.qch</Path>
+ <Path fileType="data">/usr/share/goldendict/help/gdhelp_ru.qch</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/ar_SA.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/ay_WI.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/be_BY.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/be_BY@latin.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/bg_BG.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/cs_CZ.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/de_DE.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/el_GR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/es_AR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/es_BO.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/es_ES.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/fa_IR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/fr_FR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/it_IT.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/ja_JP.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/ko_KR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/lt_LT.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/mk_MK.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/nl_NL.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/pl_PL.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/pt_BR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/qu_WI.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/ru_RU.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/sk_SK.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/sq_AL.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/sr_SR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/sv_SE.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/tg_TJ.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/tk_TM.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/tr_TR.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/uk_UA.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/vi_VN.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/zh_CN.qm</Path>
+ <Path fileType="data">/usr/share/goldendict/locale/zh_TW.qm</Path>
<Path fileType="data">/usr/share/pixmaps/goldendict.png</Path>
</Files>
</Package>
<History>
- <Update release="2">
- <Date>2018-03-23</Date>
+ <Update release="3">
+ <Date>2018-08-11</Date>
<Version>1.5.0_rc2</Version>
<Comment>Packaging update</Comment>
- <Name>Peter O&apos;Connor</Name>
- <Email>peter@solus-project.com</Email>
+ <Name>Pierre-Yves</Name>
+ <Email>pyu@riseup.net</Email>
</Update>
</History>
</PISI>
\ No newline at end of file

File Metadata

Mime Type
text/plain
Expires
Apr 29 2023, 7:53 PM (14 w, 6 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5803433
Default Alt Text
D3556.id8771.diff (16 KB)

Event Timeline