[packages/k9copy] - updated to 3.0.3

baggins baggins at pld-linux.org
Sun Dec 17 10:59:13 CET 2017


commit 2a826f0d4f549f101a12c05c4077a037ef31ea4e
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Dec 17 10:59:02 2017 +0100

    - updated to 3.0.3

 cxx.patch     | 11 +++++++++
 ffmpeg3.patch | 44 +++++++++++++++++++++++++++++++++++
 k9copy.spec   | 73 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
 kde4api.patch | 11 +++++++++
 qt5.patch     | 11 +++++++++
 5 files changed, 137 insertions(+), 13 deletions(-)
---
diff --git a/k9copy.spec b/k9copy.spec
index 17804b3..765ff32 100644
--- a/k9copy.spec
+++ b/k9copy.spec
@@ -1,22 +1,47 @@
+#
+# Conditional build:
+%bcond_with	qt5		# build with Qt5 and KDE5
+#
 Summary:	A vamps frontend
 Summary(pl.UTF-8):	Frontend do programu vamps
 Name:		k9copy
-Version:	2.3.8
+Version:	3.0.3
 Release:	1
 License:	GPL
 Group:		X11/Applications/Multimedia
-Source0:	http://downloads.sourceforge.net/k9copy/%{name}-%{version}-Source.tar.gz
-# Source0-md5:	584f6cc50f28befbeb0d5c1ec9476456
+Source0:	http://downloads.sourceforge.net/k9copy-reloaded/%{name}-%{version}.tar.gz
+# Source0-md5:	53158282e23a4aa4fb8f4336f1424521
 Patch0:		%{name}-desktop.patch
-URL:		http://k9copy.sourceforge.net/
+Patch1:		cxx.patch
+Patch2:		ffmpeg3.patch
+Patch3:		qt5.patch
+Patch4:		kde4api.patch
+URL:		http://k9copy-reloaded.sourceforge.net/
 BuildRequires:	OpenGL-GLU-devel
 BuildRequires:	automoc4
 BuildRequires:	ffmpeg-devel
-BuildRequires:	kde4-kdelibs-devel >= 4.1.0
 BuildRequires:	libdvdread-devel
 BuildRequires:	mpeg2dec-devel
-BuildRequires:	qt4-build
 BuildRequires:	xine-lib-devel
+%if %{with qt5}
+BuildRequires:	kf5-extra-cmake-modules
+BuildRequires:	kf5-kconfig-devel
+BuildRequires:	kf5-kcoreaddons-devel
+BuildRequires:	kf5-kdelibs4support
+BuildRequires:	kf5-kdesu-devel
+BuildRequires:	kf5-kdoctools-devel
+BuildRequires:	kf5-ki18n-devel
+BuildRequires:	kf5-kiconthemes-devel
+BuildRequires:	kf5-kio-devel
+BuildRequires:	kf5-kpty-devel
+BuildRequires:	kf5-kwidgetsaddons-devel
+BuildRequires:	kf5-kxmlgui-devel
+BuildRequires:	kf5-solid-devel
+BuildRequires:	qt5-build
+%else
+BuildRequires:	kde4-kdelibs-devel >= 4.1.0
+BuildRequires:	qt4-build
+%endif
 Requires:	dvd+rw-tools
 Requires:	dvdauthor
 Requires:	vamps
@@ -33,18 +58,26 @@ umożliwiający zmniejszanie obrazów płyt DVD z DVD 9 do DVD 5 w
 środowisku KDE pod Linuksem.
 
 %prep
-%setup -q -n %{name}-%{version}-Source
+%setup -q -c -T
+%{__tar} xmf %{SOURCE0}
+%{__mv} k9copy/* .
+%patch1 -p1
+%patch2 -p1
+%if %{with qt5}
+%patch3 -p1
+%else
+%patch4 -p1
+%endif
 
 %build
 install -d build
 cd build
 %cmake \
-        -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-        -LCMS_DIR=%{_libdir} \
-%if "%{_lib}" == "lib64"
-        -DLIB_SUFFIX=64 \
-%endif
-        ../
+	%{?with_qt5:-DQT5_BUILD:BOOL=ON} \
+	-DCMAKE_INSTALL_PREFIX=%{_prefix} \
+	-LCMS_DIR=%{_libdir} \
+	../
+
 %{__make}
 
 %install
@@ -67,9 +100,23 @@ rm -rf $RPM_BUILD_ROOT
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/*
+%if %{with qt5}
+%dir %{_datadir}/%{name}
+%{_datadir}/%{name}/adown.png
+%{_datadir}/%{name}/anim.mng
+%{_datadir}/%{name}/aright.png
+%{_datadir}/%{name}/icons
+%{_datadir}/%{name}/k9copyui.rc
+%{_datadir}/%{name}/mencoder.xml
+%{_desktopdir}/k9copy.desktop
+%{_desktopdir}/k9copy_assistant.desktop
+%{_datadir}/solid/actions/k9copy_assistant_open.desktop
+%{_datadir}/solid/actions/k9copy_open.desktop
+%else
 %{_datadir}/apps/k9copy
 %{_desktopdir}/kde4/k9copy.desktop
 %{_desktopdir}/kde4/k9copy_assistant.desktop
 %{_datadir}/apps/solid/actions/k9copy_assistant_open.desktop
 %{_datadir}/apps/solid/actions/k9copy_open.desktop
+%endif
 %{_iconsdir}/*/*x*/*/k9copy.png
diff --git a/cxx.patch b/cxx.patch
new file mode 100644
index 0000000..a5272cc
--- /dev/null
+++ b/cxx.patch
@@ -0,0 +1,11 @@
+--- k9copy-3.0.3/src/backup/k9dvdbackup.cpp~	2014-09-29 18:55:40.000000000 +0200
++++ k9copy-3.0.3/src/backup/k9dvdbackup.cpp	2017-12-17 09:51:56.091040526 +0100
+@@ -907,7 +907,7 @@
+ 
+ 
+         if ((vobu1 !=NULL) && (vobu2!=NULL)) {
+-            *_offset = abs(vobu1->newSector - vobu2->newSector)  | maskOffset1 ;
++            *_offset = abs((long int)vobu1->newSector - (long int)vobu2->newSector)  | maskOffset1 ;
+             *_offset |= maskOffset2;
+             return vobu2;
+         }
diff --git a/ffmpeg3.patch b/ffmpeg3.patch
new file mode 100644
index 0000000..be48d1b
--- /dev/null
+++ b/ffmpeg3.patch
@@ -0,0 +1,44 @@
+--- k9copy-3.0.3/src/import/k9avidecode.cpp.orig	2014-09-29 17:00:12.000000000 +0200
++++ k9copy-3.0.3/src/import/k9avidecode.cpp	2017-12-17 09:59:46.637474873 +0100
+@@ -26,7 +26,7 @@
+ void av_free_packet_internal(AVPacket *pkt)
+ {
+     if (pkt) {
+-        if (pkt->destruct) pkt->destruct(pkt);
++//        if (pkt->destruct) pkt->destruct(pkt);
+         pkt->data = NULL; pkt->size = 0;
+     }
+ }
+@@ -238,14 +238,14 @@
+ 
+     int numBytes;
+ // Determine required buffer size and allocate buffer
+-    numBytes=avpicture_get_size(PIX_FMT_RGB24, m_CodecCtx->width,
++    numBytes=avpicture_get_size(AV_PIX_FMT_RGB24, m_CodecCtx->width,
+                                 m_CodecCtx->height);
+     m_buffer=(uint8_t *)av_malloc(numBytes*sizeof(uint8_t));
+ 
+ // Assign appropriate parts of buffer to image planes in pFrameRGB
+ // Note that pFrameRGB is an AVFrame, but AVFrame is a superset
+ // of AVPicture
+-    avpicture_fill((AVPicture *)m_FrameRGB, m_buffer, PIX_FMT_RGB24,
++    avpicture_fill((AVPicture *)m_FrameRGB, m_buffer, AV_PIX_FMT_RGB24,
+                    m_CodecCtx->width, m_CodecCtx->height);
+ 
+  
+@@ -317,13 +317,13 @@
+                     bFound=true;
+ #ifndef HAVE_SWSCALE
+                   // Convert the image from its native format to RGB
+-                    img_convert((AVPicture *)m_FrameRGB, PIX_FMT_RGB24,
++                    img_convert((AVPicture *)m_FrameRGB, AV_PIX_FMT_RGB24,
+                                 (AVPicture*)m_Frame, m_CodecCtx->pix_fmt,
+                                 m_CodecCtx->width, m_CodecCtx->height);
+                     SaveFrame(m_FrameRGB, m_CodecCtx->width,
+                               m_CodecCtx->height);
+ #else
+-		    toRGB_convert_ctx=sws_getContext(m_CodecCtx->width, m_CodecCtx->height, m_CodecCtx->pix_fmt, m_CodecCtx->width, m_CodecCtx->height, PIX_FMT_RGB24, sws_flags,NULL,NULL,NULL);
++		    toRGB_convert_ctx=sws_getContext(m_CodecCtx->width, m_CodecCtx->height, m_CodecCtx->pix_fmt, m_CodecCtx->width, m_CodecCtx->height, AV_PIX_FMT_RGB24, sws_flags,NULL,NULL,NULL);
+         		   sws_scale(toRGB_convert_ctx, m_Frame->data, m_Frame->linesize, 0, m_CodecCtx->height, m_FrameRGB->data,m_FrameRGB->linesize);
+                     // convert frame to QImage
+                     SaveFrame(m_FrameRGB, m_CodecCtx->width,
diff --git a/kde4api.patch b/kde4api.patch
new file mode 100644
index 0000000..4a8c5ea
--- /dev/null
+++ b/kde4api.patch
@@ -0,0 +1,11 @@
+--- k9copy-3.0.3/src/core/k9tools.cpp~	2014-09-29 17:00:12.000000000 +0200
++++ k9copy-3.0.3/src/core/k9tools.cpp	2017-12-17 10:47:17.563718776 +0100
+@@ -88,7 +88,7 @@
+     #if QT_VERSION >= 0x050000
+     bool res=QStandardPaths::findExecutable( _progName) !=NULL ;
+     #else // Qt4 Code
+-    bool res= KStandardDirs::findExe( _progName,NULL,false) !=NULL ;
++    bool res= KStandardDirs::findExe( _progName,NULL) !=NULL ;
+     #endif
+     if (_msg && !res)
+         k9Dialogs::error(i18n("Error starting program %1").arg(_progName),i18n("Running program"));
diff --git a/qt5.patch b/qt5.patch
new file mode 100644
index 0000000..55435ee
--- /dev/null
+++ b/qt5.patch
@@ -0,0 +1,11 @@
+--- k9copy-3.0.3/src/backup/k9execcopy.cpp~	2014-09-29 17:00:12.000000000 +0200
++++ k9copy-3.0.3/src/backup/k9execcopy.cpp	2017-12-17 09:53:52.939272304 +0100
+@@ -306,7 +306,7 @@
+ 
+ #if QT_VERSION >= 0x050000
+     m_progressDialog=new QProgressDialog(k9Dialogs::getMainWidget() );
+-    m_progressDialog->setCancelButton(false);
++//    m_progressDialog->setCancelButton(false);
+ 
+ #else
+     m_progressDialog=new KProgressDialog(k9Dialogs::getMainWidget() );
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/k9copy.git/commitdiff/2a826f0d4f549f101a12c05c4077a037ef31ea4e



More information about the pld-cvs-commit mailing list