commit 4f0755f058d98c6aaba943aebd005e5b20faafbd
Author: Sérgio M. Basto <sergio(a)serjux.com>
Date: Wed May 30 02:11:30 2018 +0100
Revert "Update to 2.3"
This reverts commit b0fe7aac7ee792acb49a64aeea4fd56c99697236.
xpra 2.3 needs ffmpeg 4.x API, so we need revert it
.gitignore | 1 -
sources | 2 +-
xpra-codecs-freeworld-ffmpeg35.patch | 173 +++++++++++++++++++++++++++++++++++
xpra-codecs-freeworld.spec | 44 ++++-----
4 files changed, 197 insertions(+), 23 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index ed9b751..309786e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,4 +17,3 @@ xpra-0.16.3.tar.xz
/xpra-2.2.4.tar.xz
/xpra-2.2.5.tar.xz
/xpra-2.2.6.tar.xz
-/xpra-2.3.tar.xz
diff --git a/sources b/sources
index 115be2f..fa6e37d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-d08309f3ed6b5b6a4a365a60504ba0dc xpra-2.3.tar.xz
+22c032c29be6d22fa7e21405792a1372 xpra-2.2.6.tar.xz
diff --git a/xpra-codecs-freeworld-ffmpeg35.patch b/xpra-codecs-freeworld-ffmpeg35.patch
new file mode 100644
index 0000000..04abf51
--- /dev/null
+++ b/xpra-codecs-freeworld-ffmpeg35.patch
@@ -0,0 +1,173 @@
+--- src/xpra/codecs/enc_ffmpeg/encoder.pyx (revision 18087)
++++ src/xpra/codecs/enc_ffmpeg/encoder.pyx (revision 18088)
+@@ -135,42 +135,34 @@
+ int FF_PROFILE_H264_CAVLC_444
+
+- int CODEC_FLAG_UNALIGNED
+- int CODEC_FLAG_QSCALE
+- int CODEC_FLAG_4MV
+- int CODEC_FLAG_OUTPUT_CORRUPT
+- int CODEC_FLAG_QPEL
+- int CODEC_FLAG_GMC
+- int CODEC_FLAG_MV0
+- int CODEC_FLAG_INPUT_PRESERVED
+- int CODEC_FLAG_PASS1
+- int CODEC_FLAG_PASS2
+- int CODEC_FLAG_GRAY
+- int CODEC_FLAG_EMU_EDGE
+- int CODEC_FLAG_PSNR
+- int CODEC_FLAG_TRUNCATED
+- int CODEC_FLAG_NORMALIZE_AQP
+- int CODEC_FLAG_INTERLACED_DCT
+- int CODEC_FLAG_GLOBAL_HEADER
+-
+- int CODEC_FLAG2_FAST
+-
+- int CODEC_CAP_DRAW_HORIZ_BAND
+- int CODEC_CAP_DR1
+- int CODEC_CAP_TRUNCATED
+- int CODEC_CAP_HWACCEL
+- int CODEC_CAP_DELAY
+- int CODEC_CAP_SMALL_LAST_FRAME
+- int CODEC_CAP_HWACCEL_VDPAU
+- int CODEC_CAP_SUBFRAMES
+- int CODEC_CAP_EXPERIMENTAL
+- int CODEC_CAP_CHANNEL_CONF
+- int CODEC_CAP_NEG_LINESIZES
+- int CODEC_CAP_FRAME_THREADS
+- int CODEC_CAP_SLICE_THREADS
+- int CODEC_CAP_PARAM_CHANGE
+- int CODEC_CAP_AUTO_THREADS
+- int CODEC_CAP_VARIABLE_FRAME_SIZE
+- int CODEC_CAP_INTRA_ONLY
+- int CODEC_CAP_LOSSLESS
++ int AV_CODEC_FLAG_UNALIGNED
++ int AV_CODEC_FLAG_QSCALE
++ int AV_CODEC_FLAG_4MV
++ int AV_CODEC_FLAG_OUTPUT_CORRUPT
++ int AV_CODEC_FLAG_QPEL
++ int AV_CODEC_FLAG_PASS1
++ int AV_CODEC_FLAG_PASS2
++ int AV_CODEC_FLAG_GRAY
++ int AV_CODEC_FLAG_PSNR
++ int AV_CODEC_FLAG_TRUNCATED
++ int AV_CODEC_FLAG_INTERLACED_DCT
++ int AV_CODEC_FLAG_GLOBAL_HEADER
++
++ int AV_CODEC_FLAG2_FAST
++
++ int AV_CODEC_CAP_DRAW_HORIZ_BAND
++ int AV_CODEC_CAP_DR1
++ int AV_CODEC_CAP_TRUNCATED
++ int AV_CODEC_CAP_DELAY
++ int AV_CODEC_CAP_SMALL_LAST_FRAME
++ int AV_CODEC_CAP_SUBFRAMES
++ int AV_CODEC_CAP_EXPERIMENTAL
++ int AV_CODEC_CAP_CHANNEL_CONF
++ int AV_CODEC_CAP_FRAME_THREADS
++ int AV_CODEC_CAP_SLICE_THREADS
++ int AV_CODEC_CAP_PARAM_CHANGE
++ int AV_CODEC_CAP_AUTO_THREADS
++ int AV_CODEC_CAP_VARIABLE_FRAME_SIZE
++ int AV_CODEC_CAP_INTRA_ONLY
++ int AV_CODEC_CAP_LOSSLESS
+
+ ctypedef struct AVFrame:
+@@ -386,5 +378,4 @@
+ int AVFMT_NEEDNUMBER #Needs '%d' in filename
+ int AVFMT_SHOW_IDS #Show format stream IDs numbers
+- int AVFMT_RAWPICTURE #Format wants AVPicture structure for raw picture
data. @deprecated Not used anymore
+ int AVFMT_GLOBALHEADER #Format wants global header
+ int AVFMT_NOTIMESTAMPS #Format does not need / have any timestamps
+@@ -490,25 +481,20 @@
+
+ CODEC_FLAGS = {
+- CODEC_FLAG_UNALIGNED : "UNALIGNED",
+- CODEC_FLAG_QSCALE : "QSCALE",
+- CODEC_FLAG_4MV : "4MV",
+- CODEC_FLAG_OUTPUT_CORRUPT : "OUTPUT_CORRUPT",
+- CODEC_FLAG_QPEL : "QPEL",
+- CODEC_FLAG_GMC : "GMC",
+- CODEC_FLAG_MV0 : "MV0",
+- CODEC_FLAG_INPUT_PRESERVED : "INPUT_PRESERVED",
+- CODEC_FLAG_PASS1 : "PASS1",
+- CODEC_FLAG_PASS2 : "PASS2",
+- CODEC_FLAG_GRAY : "GRAY",
+- CODEC_FLAG_EMU_EDGE : "EMU_EDGE",
+- CODEC_FLAG_PSNR : "PSNR",
+- CODEC_FLAG_TRUNCATED : "TRUNCATED",
+- CODEC_FLAG_NORMALIZE_AQP : "NORMALIZE_AQP",
+- CODEC_FLAG_INTERLACED_DCT : "INTERLACED_DCT",
+- CODEC_FLAG_GLOBAL_HEADER : "GLOBAL_HEADER",
++ AV_CODEC_FLAG_UNALIGNED : "UNALIGNED",
++ AV_CODEC_FLAG_QSCALE : "QSCALE",
++ AV_CODEC_FLAG_4MV : "4MV",
++ AV_CODEC_FLAG_OUTPUT_CORRUPT : "OUTPUT_CORRUPT",
++ AV_CODEC_FLAG_QPEL : "QPEL",
++ AV_CODEC_FLAG_PASS1 : "PASS1",
++ AV_CODEC_FLAG_PASS2 : "PASS2",
++ AV_CODEC_FLAG_GRAY : "GRAY",
++ AV_CODEC_FLAG_PSNR : "PSNR",
++ AV_CODEC_FLAG_TRUNCATED : "TRUNCATED",
++ AV_CODEC_FLAG_INTERLACED_DCT : "INTERLACED_DCT",
++ AV_CODEC_FLAG_GLOBAL_HEADER : "GLOBAL_HEADER",
+ }
+
+ CODEC_FLAGS2 = {
+- CODEC_FLAG2_FAST : "FAST",
++ AV_CODEC_FLAG2_FAST : "FAST",
+ }
+
+@@ -536,5 +522,4 @@
+ AVFMT_NEEDNUMBER : "NEEDNUMBER",
+ AVFMT_SHOW_IDS : "SHOW_IDS",
+- AVFMT_RAWPICTURE : "RAWPICTURE",
+ AVFMT_GLOBALHEADER : "GLOBALHEADER",
+ AVFMT_NOTIMESTAMPS : "NOTIMESTAMPS",
+@@ -555,22 +540,19 @@
+
+ CAPS = {
+- CODEC_CAP_DRAW_HORIZ_BAND : "DRAW_HORIZ_BAND",
+- CODEC_CAP_DR1 : "DR1",
+- CODEC_CAP_TRUNCATED : "TRUNCATED",
+- CODEC_CAP_HWACCEL : "HWACCEL",
+- CODEC_CAP_DELAY : "DELAY",
+- CODEC_CAP_SMALL_LAST_FRAME : "SMALL_LAST_FRAME",
+- CODEC_CAP_HWACCEL_VDPAU : "HWACCEL_VDPAU",
+- CODEC_CAP_SUBFRAMES : "SUBFRAMES",
+- CODEC_CAP_EXPERIMENTAL : "EXPERIMENTAL",
+- CODEC_CAP_CHANNEL_CONF : "CHANNEL_CONF",
+- CODEC_CAP_NEG_LINESIZES : "NEG_LINESIZES",
+- CODEC_CAP_FRAME_THREADS : "FRAME_THREADS",
+- CODEC_CAP_SLICE_THREADS : "SLICE_THREADS",
+- CODEC_CAP_PARAM_CHANGE : "PARAM_CHANGE",
+- CODEC_CAP_AUTO_THREADS : "AUTO_THREADS",
+- CODEC_CAP_VARIABLE_FRAME_SIZE : "VARIABLE_FRAME_SIZE",
+- CODEC_CAP_INTRA_ONLY : "INTRA_ONLY",
+- CODEC_CAP_LOSSLESS : "LOSSLESS",
++ AV_CODEC_CAP_DRAW_HORIZ_BAND : "DRAW_HORIZ_BAND",
++ AV_CODEC_CAP_DR1 : "DR1",
++ AV_CODEC_CAP_TRUNCATED : "TRUNCATED",
++ AV_CODEC_CAP_DELAY : "DELAY",
++ AV_CODEC_CAP_SMALL_LAST_FRAME : "SMALL_LAST_FRAME",
++ AV_CODEC_CAP_SUBFRAMES : "SUBFRAMES",
++ AV_CODEC_CAP_EXPERIMENTAL : "EXPERIMENTAL",
++ AV_CODEC_CAP_CHANNEL_CONF : "CHANNEL_CONF",
++ AV_CODEC_CAP_FRAME_THREADS : "FRAME_THREADS",
++ AV_CODEC_CAP_SLICE_THREADS : "SLICE_THREADS",
++ AV_CODEC_CAP_PARAM_CHANGE : "PARAM_CHANGE",
++ AV_CODEC_CAP_AUTO_THREADS : "AUTO_THREADS",
++ AV_CODEC_CAP_VARIABLE_FRAME_SIZE : "VARIABLE_FRAME_SIZE",
++ AV_CODEC_CAP_INTRA_ONLY : "INTRA_ONLY",
++ AV_CODEC_CAP_LOSSLESS : "LOSSLESS",
+ }
+ log("CODEC_CAP:")
+@@ -891,6 +873,6 @@
+ self.video_ctx.thread_count = THREAD_COUNT #0=auto
+ #if oformat.flags & AVFMT_GLOBALHEADER:
+- self.video_ctx.flags |= CODEC_FLAG_GLOBAL_HEADER
+- self.video_ctx.flags2 |= CODEC_FLAG2_FAST #may cause "no deblock across
slices" - which should be fine
++ self.video_ctx.flags |= AV_CODEC_FLAG_GLOBAL_HEADER
++ self.video_ctx.flags2 |= AV_CODEC_FLAG2_FAST #may cause "no deblock
across slices" - which should be fine
+ if self.encoding.startswith("h264") and profile:
+ r = av_dict_set(&opts, b"vprofile", strtobytes(profile), 0)
diff --git a/xpra-codecs-freeworld.spec b/xpra-codecs-freeworld.spec
index ce9c29e..fc3f548 100644
--- a/xpra-codecs-freeworld.spec
+++ b/xpra-codecs-freeworld.spec
@@ -18,7 +18,7 @@
%endif
Name: xpra-codecs-freeworld
-Version: 2.3
+Version: 2.2.6
Release: 1%{?dist}
Summary: Additional codecs for xpra using x264 and ffmpeg
@@ -26,12 +26,16 @@ License: GPLv2+
URL:
http://www.xpra.org/
Source0:
http://xpra.org/src/xpra-%{version}.tar.xz
-BuildRequires: python3-devel pygobject3-devel pygtk2-devel
-BuildRequires: gtk3-devel
+#
http://xpra.org/trac/changeset/18086/xpra
+#
http://xpra.org/trac/changeset/18088/xpra
+# Build fix for ffmpeg-3.5
+Patch0: %{name}-ffmpeg35.patch
+
+BuildRequires: python2-devel pygobject2-devel pygtk2-devel
BuildRequires: libXtst-devel, uglify-js
BuildRequires: libxkbfile-devel, libvpx-devel
BuildRequires: xvidcore-devel, x265-devel
-BuildRequires: python3-Cython, ack
+BuildRequires: python2-Cython, ack
BuildRequires: gcc
BuildRequires: libwebp-devel
BuildRequires: libXdamage-devel
@@ -52,9 +56,12 @@ x264 and ffmpeg.
%prep
%setup -q -n xpra-%{version}
+%if 0%{?fedora} > 27
+%patch0 -p1
+%endif
%build
-CFLAGS="%{optflags}" %{__python3} setup.py build
--executable="%{__python3} -s" \
+CFLAGS="%{optflags}" %{__python2} setup.py build
--executable="%{__python2} -s" \
%{?_with_enc_x264} \
%{?_with_dec_avcodec2} \
%{?_with_csc_swscale} \
@@ -70,12 +77,12 @@ CFLAGS="%{optflags}" %{__python3} setup.py build
--executable="%{__python3} -s"
--without-html5_gzip --without-html5_brotli
%install
-%{__python3} setup.py install -O1 --skip-build --root destdir \
+%{__python2} setup.py install -O1 --skip-build --root destdir \
--without-html5_gzip --without-html5_brotli
## We are interested to additional codecs only
-mkdir -p %{buildroot}%{python3_sitearch}/xpra/codecs/
-pushd destdir%{python3_sitearch}/xpra/codecs/
+mkdir -p %{buildroot}%{python2_sitearch}/xpra/codecs/
+pushd destdir%{python2_sitearch}/xpra/codecs/
cp -pr \
%if %{with csc_swscale}
csc_swscale \
@@ -86,32 +93,27 @@ cp -pr \
%if %{with enc_x264}
enc_x264 \
%endif
- libav_common enc_ffmpeg enc_x265 %{buildroot}%{python3_sitearch}/xpra/codecs/
+ libav_common enc_ffmpeg enc_x265 %{buildroot}%{python2_sitearch}/xpra/codecs/
popd
-#fix shebangs from python3_sitearch
-find %{buildroot}%{python3_sitearch}/xpra -name '*.py' | xargs sed -i
'1s|^#!/usr/bin/env python|#!%{__python3}|'
-for i in `ack -rl '^#!/.*python' %{buildroot}%{python3_sitearch}/xpra`; do
+#fix shebangs from python2_sitearch
+find %{buildroot}%{python2_sitearch}/xpra -name '*.py' | xargs sed -i
'1s|^#!/usr/bin/env python|#!%{__python2}|'
+for i in `ack -rl '^#!/.*python' %{buildroot}%{python2_sitearch}/xpra`; do
chmod 0755 $i
done
#fix permissions on shared objects
-find %{buildroot}%{python3_sitearch}/xpra -name '*.so' \
+find %{buildroot}%{python2_sitearch}/xpra -name '*.so' \
-exec chmod 0755 {} \;
%files
-%dir %{python3_sitearch}/xpra
-%dir %{python3_sitearch}/xpra/codecs
-%{python3_sitearch}/xpra/codecs/*
+%dir %{python2_sitearch}/xpra
+%dir %{python2_sitearch}/xpra/codecs
+%{python2_sitearch}/xpra/codecs/*
%doc README NEWS
%license COPYING
%changelog
-* Thu May 10 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 2.3-1
-- Update to 2.3
-- Switch to Python3
-- Drop obsolete patch
-
* Tue Apr 03 2018 Antonio Trande <sagitter(a)fedoraproject.org> - 2.2.6-1
- Update to 2.2.6