commit 195a17498a0ce1eed1c4c53894ea46e4259f76fd
Author: FeRD (Frank Dana) <ferdnyc(a)gmail.com>
Date: Fri Aug 30 00:04:18 2019 -0400
Remaining fixes for rawhide / F31 builds
cinelerra-gg-gettid-check.patch | 29 +++++++++++++++++++++++++++++
cinelerra-gg.spec | 16 ++++++++++++++--
2 files changed, 43 insertions(+), 2 deletions(-)
---
diff --git a/cinelerra-gg-gettid-check.patch b/cinelerra-gg-gettid-check.patch
new file mode 100644
index 0000000..d3b74bb
--- /dev/null
+++ b/cinelerra-gg-gettid-check.patch
@@ -0,0 +1,29 @@
+From 846c2679997e939ff84d709a8270a425375ccaf6 Mon Sep 17 00:00:00 2001
+From: "FeRD (Frank Dana)" <ferdnyc(a)gmail.com>
+Date: Thu, 29 Aug 2019 22:48:58 -0400
+Subject: [PATCH] Don't redefine gettid() on glibc 2.30+
+
+---
+ cinelerra-5.1/guicast/thread.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/cinelerra-5.1/guicast/thread.h b/cinelerra-5.1/guicast/thread.h
+index 216ecd2..b6a1be8 100644
+--- a/cinelerra-5.1/guicast/thread.h
++++ b/cinelerra-5.1/guicast/thread.h
+@@ -27,7 +27,11 @@
+ #include <unistd.h>
+ #include <sys/syscall.h>
+
+-static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
++// Newer glibc >= 2.30 provides gettid() in unistd
++#if !defined(__GLIBC_PREREQ) || !__GLIBC_PREREQ(2, 30)
++ static inline int gettid() { return syscall(SYS_gettid, 0, 0, 0); }
++#endif
++
+
+ // The thread does not autodelete by default.
+ // If autodelete is 1 the thread autodeletes.
+--
+2.21.0
+
diff --git a/cinelerra-gg.spec b/cinelerra-gg.spec
index 805095a..0081b2d 100644
--- a/cinelerra-gg.spec
+++ b/cinelerra-gg.spec
@@ -18,6 +18,10 @@ Source0:
https://git.cinelerra-gg.org/git/?p=goodguy/cinelerra.git;a=snap
# CrystalHD is fouling the ffmpeg build
Patch0: cinelerra-gg-Disable-crystalhd-in-ffmpeg.patch
+# glibc 2.30+ provides gettid(), protect against redefining in guicast
+# Submitted upstream:
https://www.cinelerra-gg.org/bugtracker/view.php?id=290
+Patch1: cinelerra-gg-gettid-check.patch
+
# Only tested on x86_64
ExclusiveArch: x86_64
@@ -57,6 +61,7 @@ BuildRequires: pkgconfig(libdv)
BuildRequires: pkgconfig(libjpeg)
BuildRequires: pkgconfig(libtiff-4)
BuildRequires: pkgconfig(liblzma)
+BuildRequires: pkgconfig(libusb)
BuildRequires: pkgconfig(libv4l2)
BuildRequires: pkgconfig(libxml-2.0)
BuildRequires: pkgconfig(lv2)
@@ -113,9 +118,13 @@ BuildArch: noarch
%setup -q -n cinelerra-%{shortcommit0}/cinelerra-%{version}
%patch0 -p2 -b.crystal
+%patch1 -p2 -b.gettid
./autogen.sh
+# Fedora 31+ won't have a "python" command
+sed -i 's/\<python\>/python3/' guicast/Makefile
+
%build
%configure \
@@ -183,9 +192,12 @@ desktop-file-validate
$RPM_BUILD_ROOT%{_datadir}/applications/%{name}.desktop
%changelog
-* Thu Aug 29 2019 FeRD (Frank Dana) <ferdnyc(a)gmail.com> -
5.1-56.20190801gitb8cd5c4
+* Fri Aug 30 2019 FeRD (Frank Dana) <ferdnyc(a)gmail.com> -
5.1-56.20190801gitb8cd5c4
- Update to 2019-08 snapshot version
-- Remove crystalhd from ffmpeg (build fails), turn off CUDA
+- Add libusb build req
+- Remove crystalhd from ffmpeg (build fails), turn off CUDA checks (no compiler)
+- Replace 'python' command with 'python3' in guicast Makefile
+- Add patch for glibc >= 2.30 gettid() (submitted upstream)
* Mon Aug 26 2019 FeRD (Frank Dana) <ferdnyc(a)gmail.com> -
5.1-55.20181217gitd5a0afb
- Update to 5.1 snapshot with python3 build process