[packages/mythtv] - fix building with gcc 11 and glibc 2.34 - fix shebangs and stop install messing them up again - fi
baggins
baggins at pld-linux.org
Sun Sep 26 11:58:32 CEST 2021
commit 5bbebe7d90c1777ede19a3d4acbf07d348cfe043
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sun Sep 26 11:57:36 2021 +0200
- fix building with gcc 11 and glibc 2.34
- fix shebangs and stop install messing them up again
- fix rpm macro quoting
- rel 12
gcc11.patch | 35 ++++++++++++++++++++++
install.patch | 90 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
mythtv.spec | 28 +++++++++++++++--
sys_siglist.patch | 11 +++++++
4 files changed, 162 insertions(+), 2 deletions(-)
---
diff --git a/mythtv.spec b/mythtv.spec
index 36bfa01..567b8b2 100644
--- a/mythtv.spec
+++ b/mythtv.spec
@@ -49,7 +49,7 @@ Summary: A personal video recorder (PVR) application
Summary(pl.UTF-8): Osobista aplikacja do nagrywania obrazu (PVR)
Name: mythtv
Version: 0.26.1
-Release: 11
+Release: 12
License: GPL v2
Group: Applications/Multimedia
Source0: ftp://ftp.osuosl.org/pub/mythtv/%{name}-%{version}.tar.bz2
@@ -70,6 +70,9 @@ Patch2: python-install.patch
Patch3: moc.patch
Patch4: cxx11.patch
Patch5: major-minor.patch
+Patch6: sys_siglist.patch
+Patch7: gcc11.patch
+Patch8: install.patch
Patch20: %{name}-compile_fixes_for_qt_4_7.patch
Patch30: %{name}-dshowserver-0.22.patch
URL: http://www.mythtv.org/
@@ -356,11 +359,14 @@ Ten pakiet zawiera moduły PHP do tworzenia dodatków dla mythtv.
%patch3 -p1
%patch4 -p1
%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
%{?with_dshowserver:%patch20 -p1}
#%patch30 -p1
# lib64 fix - enable to update patch
-%if %{_lib} != "lib" && 0
+%if "%{_lib}" != "lib" && 0
find '(' -name '*.[ch]' -o -name '*.cpp' -o -name '*.pro' ')' | \
xargs grep -l /lib . | xargs sed -i -e '
s,/''usr/lib/,/%{_libdir}/,g
@@ -407,6 +413,20 @@ chmod +x qmake-wrapper.sh
%{__sed} -i -e 's#perl Makefile.PL#%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="$RPM_OPT_FLAGS -Wno-narrowing"#' \
bindings/perl/Makefile
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python(\s|$),#!%{__python}\1,' -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
+ programs/scripts/internetcontent/*.py \
+ programs/scripts/internetcontent/*/*.py \
+ programs/scripts/internetcontent/*/*/*.py \
+ programs/scripts/internetcontent/*/*/*/*.py \
+ programs/scripts/metadata/Movie/*.py \
+ programs/scripts/metadata/Television/*.py \
+ programs/scripts/hardwareprofile/*.py \
+ programs/scripts/hardwareprofile/*/*.py \
+ programs/scripts/hardwareprofile/*/*/*.py \
+
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+perl(\s|$),#!%{__perl}\1,' \
+ programs/scripts/internetcontent/*.pl
+
%build
%if %{with cpu_autodetect}
# Make sure we have /proc mounted
@@ -482,6 +502,10 @@ install -d $RPM_BUILD_ROOT/etc/{logrotate.d,sysconfig} \
py_sitedir=%{py_sitedir} \
INSTALL_ROOT=$RPM_BUILD_ROOT
+%{__sed} -E -i -e '1s,#!\s*/usr/bin/python(\s|$),#!%{__python}\1,' \
+ $RPM_BUILD_ROOT%{_bindir}/mythpython \
+ $RPM_BUILD_ROOT%{_bindir}/mythwikiscripts
+
# omitted by make install
%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
#TODO: py_postclean if possible (or comment why not)
diff --git a/gcc11.patch b/gcc11.patch
new file mode 100644
index 0000000..e808b45
--- /dev/null
+++ b/gcc11.patch
@@ -0,0 +1,35 @@
+--- mythtv-0.26.1/libs/libmythtv/videosource.cpp~ 2021-09-26 10:48:30.000000000 +0200
++++ mythtv-0.26.1/libs/libmythtv/videosource.cpp 2021-09-26 10:52:24.567959263 +0200
+@@ -379,7 +379,7 @@
+ void DataDirect_config::Load()
+ {
+ VerticalConfigurationGroup::Load();
+- bool is_sd_userid = userid->getValue().contains('@') > 0;
++ bool is_sd_userid = userid->getValue().contains('@') != 0;
+ bool match = ((is_sd_userid && (source == DD_SCHEDULES_DIRECT)) ||
+ (!is_sd_userid && (source == DD_ZAP2IT)));
+ if (((userid->getValue() != lastloadeduserid) ||
+--- mythtv-0.26.1/programs/mythlcdserver/lcdprocclient.cpp~ 2013-08-15 16:44:02.000000000 +0200
++++ mythtv-0.26.1/programs/mythlcdserver/lcdprocclient.cpp 2021-09-26 11:05:59.118439631 +0200
+@@ -2104,7 +2104,7 @@
+
+ for (int x = 0; x < text.length(); x++)
+ {
+- if (separators.contains(text[x]) > 0)
++ if (separators.contains(text[x]) != 0)
+ lastSplit = line.length();
+
+ line += text[x];
+--- mythtv-0.26.1/programs/mythbackend/httpstatus.cpp~ 2013-08-15 16:44:02.000000000 +0200
++++ mythtv-0.26.1/programs/mythbackend/httpstatus.cpp 2021-09-26 11:09:22.088415336 +0200
+@@ -1478,8 +1478,8 @@
+
+ // Only include HTML line break if display value doesn't already
+ // contain breaks.
+- if ((display.contains("<p>", Qt::CaseInsensitive) > 0) ||
+- (display.contains("<br", Qt::CaseInsensitive) > 0))
++ if ((display.contains("<p>", Qt::CaseInsensitive) != 0) ||
++ (display.contains("<br", Qt::CaseInsensitive) != 0))
+ {
+ // matches <BR> or <br /
+ linebreak = "\r\n";
diff --git a/install.patch b/install.patch
new file mode 100644
index 0000000..095f93c
--- /dev/null
+++ b/install.patch
@@ -0,0 +1,90 @@
+--- mythtv-0.26.1/programs/scripts/cpsvndir~ 2013-08-15 16:44:02.000000000 +0200
++++ mythtv-0.26.1/programs/scripts/cpsvndir 2021-09-26 11:35:55.589813037 +0200
+@@ -37,12 +37,6 @@
+
+ IFS='
+ '
+-if [ ! -z ${MYTHPYTHON} ]; then
+- if [ ! -f ${MYTHPYTHON} ]; then
+- MYTHPYTHON="/usr/bin/env ${MYTHPYTHON}"
+- fi
+-fi
+-
+ # Copy all files and directories except .svn
+ cd "$SRC"
+ for file in $(find . -name .svn -prune -or -print); do
+@@ -51,14 +45,6 @@
+ mkdir -p "$DEST/$file"
+ else
+ cp -pR "$file" "$DEST/$file"
+- ext=${file##*.}
+- if [ "x$ext" = "xpy" ]; then
+- sed "1s%^#.*%#!${MYTHPYTHON}%" "$file" > "$DEST/$file"
+-# elif [ "x$ext" = "xpl" ]; then
+-# do some perly stuff
+- fi
+- chown -h $EUID:$EGID "$DEST/$file"
+- chmod +r "$DEST/$file" &> /dev/null
+ fi
+ done
+
+--- mythtv-0.26.1/html/cpsvndir~ 2013-08-15 16:44:02.000000000 +0200
++++ mythtv-0.26.1/html/cpsvndir 2021-09-26 11:36:41.033320614 +0200
+@@ -37,12 +37,6 @@
+
+ IFS='
+ '
+-if [ ! -z ${MYTHPYTHON} ]; then
+- if [ ! -f ${MYTHPYTHON} ]; then
+- MYTHPYTHON="/usr/bin/env ${MYTHPYTHON}"
+- fi
+-fi
+-
+ # Copy all files and directories except .svn
+ cd "$SRC"
+ for file in $(find . -name .svn -prune -or -print); do
+@@ -51,14 +45,6 @@
+ mkdir -p "$DEST/$file"
+ else
+ cp -pR "$file" "$DEST/$file"
+- ext=${file##*.}
+- if [ "x$ext" = "xpy" ]; then
+- sed "1s%^#.*%#!${MYTHPYTHON}%" "$file" > "$DEST/$file"
+-# elif [ "x$ext" = "xpl" ]; then
+-# do some perly stuff
+- fi
+- chown -h $EUID:$EGID "$DEST/$file"
+- chmod +r "$DEST/$file" &> /dev/null
+ fi
+ done
+
+--- mythtv-0.26.1/themes/cpsvndir~ 2013-08-15 16:44:02.000000000 +0200
++++ mythtv-0.26.1/themes/cpsvndir 2021-09-26 11:37:24.483482680 +0200
+@@ -37,12 +37,6 @@
+
+ IFS='
+ '
+-if [ ! -z ${MYTHPYTHON} ]; then
+- if [ ! -f ${MYTHPYTHON} ]; then
+- MYTHPYTHON="/usr/bin/env ${MYTHPYTHON}"
+- fi
+-fi
+-
+ # Copy all files and directories except .svn
+ cd "$SRC"
+ for file in $(find . -name .svn -prune -or -print); do
+@@ -51,14 +45,6 @@
+ mkdir -p "$DEST/$file"
+ else
+ cp -pR "$file" "$DEST/$file"
+- ext=${file##*.}
+- if [ "x$ext" = "xpy" ]; then
+- sed "1s%^#.*%#!${MYTHPYTHON}%" "$file" > "$DEST/$file"
+-# elif [ "x$ext" = "xpl" ]; then
+-# do some perly stuff
+- fi
+- chown -h $EUID:$EGID "$DEST/$file"
+- chmod +r "$DEST/$file" &> /dev/null
+ fi
+ done
+
diff --git a/sys_siglist.patch b/sys_siglist.patch
new file mode 100644
index 0000000..1bee804
--- /dev/null
+++ b/sys_siglist.patch
@@ -0,0 +1,11 @@
+--- mythtv-0.26.1/libs/libmythtv/util-xv.cpp~ 2013-08-15 16:44:02.000000000 +0200
++++ mythtv-0.26.1/libs/libmythtv/util-xv.cpp 2021-09-26 10:55:55.896532947 +0200
+@@ -23,7 +23,7 @@
+
+ void close_all_xv_ports_signal_handler(int sig)
+ {
+- LOG(VB_GENERAL, LOG_CRIT, QString("Signal: %1").arg(sys_siglist[sig]));
++ LOG(VB_GENERAL, LOG_CRIT, QString("Signal: %1").arg(strsignal(sig)));
+ QMap<int,port_info>::iterator it;
+ for (it = open_xv_ports.begin(); it != open_xv_ports.end(); ++it)
+ {
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/mythtv.git/commitdiff/5bbebe7d90c1777ede19a3d4acbf07d348cfe043
More information about the pld-cvs-commit
mailing list