public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Jörg Bornkessel" <hd_brummy@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/vdr/, media-video/vdr/files/
Date: Mon,  2 Mar 2020 20:05:46 +0000 (UTC)	[thread overview]
Message-ID: <1583179515.1a77777812a5edfdb1f6a9676fc035fe91dc1032.hd_brummy@gentoo> (raw)

commit:     1a77777812a5edfdb1f6a9676fc035fe91dc1032
Author:     Joerg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  2 20:05:15 2020 +0000
Commit:     Jörg Bornkessel <hd_brummy <AT> gentoo <DOT> org>
CommitDate: Mon Mar  2 20:05:15 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a777778

media-video/vdr: segfault in ttxtsub patch uses fixed

reported by several users
in IRC #gentoo-vdr
vdr-portal.de

Package-Manager: Portage-2.3.90, Repoman-2.3.20
Signed-off-by: Joerg Bornkessel <hd_brummy <AT> gentoo.org>

 .../vdr/files/vdr-2.4.1_ttxtsubs_segfault.patch    |  49 +++++
 media-video/vdr/vdr-2.4.1-r2.ebuild                | 198 +++++++++++++++++++++
 2 files changed, 247 insertions(+)

diff --git a/media-video/vdr/files/vdr-2.4.1_ttxtsubs_segfault.patch b/media-video/vdr/files/vdr-2.4.1_ttxtsubs_segfault.patch
new file mode 100644
index 00000000000..deba0197961
--- /dev/null
+++ b/media-video/vdr/files/vdr-2.4.1_ttxtsubs_segfault.patch
@@ -0,0 +1,49 @@
+fixing segfault, reported on IRC #gentoo-vdr & vdr-portal.de
+https://www.vdr-portal.de/forum/index.php?thread/132017-videotextuntertitel-f%C3%BCr-vdr-2-4-0/&postID=1306478#post1306478
+
+Signed-Off-By: Joerg Bornkessel <hd_brummy@gentoo.org> ( 2020 Mar 02 )
+diff -Naur vdr-2.4.1.orig/channels.c vdr-2.4.1/channels.c
+--- vdr-2.4.1.orig/channels.c	2020-03-02 19:52:51.052496538 +0100
++++ vdr-2.4.1/channels.c	2020-03-02 19:54:05.096496538 +0100
+@@ -429,7 +429,7 @@
+   return Modified;
+ }
+ 
+-void cChannel::SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages)
++bool cChannel::SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages)
+ {
+   int mod = CHANNELMOD_NONE;
+   LOCK_CHANNELS_WRITE;
+@@ -447,7 +447,7 @@
+       totalTtxtSubtitlePages++;
+       }
+   modification |= mod;
+-  Channels->SetModified();
++  return true;
+ }
+ 
+ void cChannel::SetSeen(void)
+diff -Naur vdr-2.4.1.orig/channels.h vdr-2.4.1/channels.h
+--- vdr-2.4.1.orig/channels.h	2020-03-02 19:52:51.052496538 +0100
++++ vdr-2.4.1/channels.h	2020-03-02 19:54:31.745496538 +0100
+@@ -212,7 +212,7 @@
+   bool SetName(const char *Name, const char *ShortName, const char *Provider);
+   bool SetPortalName(const char *PortalName);
+   bool SetPids(int Vpid, int Ppid, int Vtype, int *Apids, int *Atypes, char ALangs[][MAXLANGCODE2], int *Dpids, int *Dtypes, char DLangs[][MAXLANGCODE2], int *Spids, char SLangs[][MAXLANGCODE2], int Tpid);
+-  void SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages);
++  bool SetTeletextSubtitlePages(tTeletextSubtitlePage pages[], int numberOfPages);
+   bool SetCaIds(const int *CaIds); // list must be zero-terminated
+   bool SetCaDescriptors(int Level);
+   bool SetLinkChannels(cLinkChannels *LinkChannels);
+diff -Naur vdr-2.4.1.orig/pat.c vdr-2.4.1/pat.c
+--- vdr-2.4.1.orig/pat.c	2020-03-02 19:52:51.053496538 +0100
++++ vdr-2.4.1/pat.c	2020-03-02 19:55:40.819496538 +0100
+@@ -649,7 +649,7 @@
+               if (manualPageNumber)
+                  TeletextSubtitlePages[NumTPages++] = tTeletextSubtitlePage(manualPageNumber);
+               }
+-           Channel->SetTeletextSubtitlePages(TeletextSubtitlePages, NumTPages);
++           ChannelsModified |= Channel->SetTeletextSubtitlePages(TeletextSubtitlePages, NumTPages);
+            ChannelsModified |= Channel->SetCaIds(CaDescriptors->CaIds());
+            ChannelsModified |= Channel->SetSubtitlingDescriptors(SubtitlingTypes, CompositionPageIds, AncillaryPageIds);
+            }

diff --git a/media-video/vdr/vdr-2.4.1-r2.ebuild b/media-video/vdr/vdr-2.4.1-r2.ebuild
new file mode 100644
index 00000000000..53df602b471
--- /dev/null
+++ b/media-video/vdr/vdr-2.4.1-r2.ebuild
@@ -0,0 +1,198 @@
+# Copyright 2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit eutils flag-o-matic multilib toolchain-funcs
+
+DESCRIPTION="Video Disk Recorder - turns a pc into a powerful set top box for DVB"
+HOMEPAGE="http://www.tvdr.de/"
+SRC_URI="ftp://ftp.tvdr.de/vdr/${P}.tar.bz2
+	mainmenuhooks? ( http://vdr.websitec.de/download/${PN}/${P}/${P}_mainmenuhook-1.0.1.patch.bz2 )
+	menuorg? ( https://projects.vdr-developer.org/projects/plg-menuorg/repository/revisions/master/raw/vdr-patch/vdr-menuorg-2.3.x.diff )
+	naludump? ( http://www.udo-richter.de/vdr/files/vdr-2.1.5-naludump-0.1.diff )
+	pinplugin? ( http://vdr.websitec.de/download/${PN}/${P}/${P}_pinplugin.patch.bz2 )
+	ttxtsubs? ( http://vdr.websitec.de/download/${PN}/${P}/${PN}-2.4.0-ttxtsubs.patch.bz2 )"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86"
+IUSE="bidi debug demoplugins html keyboard mainmenuhooks menuorg naludump pinplugin systemd ttxtsubs verbose"
+
+COMMON_DEPEND="
+	virtual/jpeg:*
+	sys-libs/libcap
+	>=media-libs/fontconfig-2.4.2
+	>=media-libs/freetype-2"
+DEPEND="${COMMON_DEPEND}
+	>=virtual/linuxtv-dvb-headers-5.3"
+RDEPEND="${COMMON_DEPEND}
+	dev-lang/perl
+	media-tv/gentoo-vdr-scripts
+	media-fonts/corefonts
+	bidi? ( dev-libs/fribidi )
+	systemd? ( sys-apps/systemd )"
+BDEPEND="sys-devel/gettext"
+
+REQUIRED_USE="pinplugin? ( !mainmenuhooks )"
+
+CONF_DIR="/etc/vdr"
+CAP_FILE="${S}/capabilities.sh"
+CAPS="# Capabilities of the vdr-executable for use by startscript etc."
+
+pkg_setup() {
+	use debug && append-flags -g
+
+	PLUGIN_LIBDIR="/usr/$(get_libdir)/vdr/plugins"
+
+	tc-export CC CXX AR
+}
+
+add_cap() {
+	local arg
+	for arg; do
+		CAPS="${CAPS}\n${arg}=1"
+	done
+}
+
+lang_po() {
+	LING_PO=$( ls ${S}/po | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
+}
+
+src_configure() {
+	# support languages, written from right to left
+	export "BIDI=$(usex bidi 1 0)"
+	# systemd notification support
+	export "SDNOTIFY=$(usex systemd 1 0)"
+	# with/without keyboard
+	export "USE_KBD=$(usex keyboard 1 0)"
+	# detailed compile output for debug
+	export "VERBOSE=$(usex verbose 1 0)"
+}
+
+src_prepare() {
+	# apply maintenance-patches
+	ebegin "Changing paths for gentoo"
+
+	local DVBDIR=/usr/include
+	local i
+	for i in ${DVB_HEADER_PATH} /usr/include/v4l-dvb-hg /usr/include; do
+		[[ -d ${i} ]] || continue
+		if [[ -f ${i}/linux/dvb/dmx.h ]]; then
+			einfo "Found DVB header files in ${i}"
+			DVBDIR=${i}
+			break
+		fi
+	done
+
+	# checking for s2api headers
+	local api_version
+	api_version=$(awk -F' ' '/define DVB_API_VERSION / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+	api_version=${api_version}*$(awk -F' ' '/define DVB_API_VERSION_MINOR / {print $3}' "${DVBDIR}"/linux/dvb/version.h)
+
+	if [[ ${api_version:-0} -lt 5*3 ]]; then
+		eerror "DVB header files do not contain s2api support or too old for ${P}"
+		eerror "You cannot compile VDR against old dvb-header"
+		die "DVB headers too old"
+	fi
+
+	cat > Make.config <<-EOT || die "cannot write to Make.config"
+		#
+		# Generated by ebuild ${PF}
+		#
+		PREFIX			= /usr
+		DVBDIR			= ${DVBDIR}
+		PLUGINLIBDIR	= ${PLUGIN_LIBDIR}
+		CONFDIR			= ${CONF_DIR}
+		ARGSDIR			= \$(CONFDIR)/conf.d
+		VIDEODIR		= /var/vdr/video
+		LOCDIR			= \$(PREFIX)/share/locale
+		INCDIR			= \$(PREFIX)/include
+
+		DEFINES			+= -DCONFDIR=\"\$(CONFDIR)\"
+		INCLUDES		+= -I\$(DVBDIR)
+
+		# >=vdr-1.7.36-r1; parameter only used for compiletime on vdr
+		# PLUGINLIBDIR (plugin Makefile old) = LIBDIR (plugin Makefile new)
+		LIBDIR			= ${PLUGIN_LIBDIR}
+		PCDIR			= /usr/$(get_libdir)/pkgconfig
+
+	EOT
+	eend 0
+
+	eapply "${FILESDIR}/${P}_gentoo.patch"
+	eapply "${FILESDIR}/vdr-2.2.0-jpeg-9c.patch"
+	use demoplugins || eapply "${FILESDIR}/vdr-2.4_remove_plugins.patch"
+	eapply "${FILESDIR}/${P}_makefile-variables.patch"
+	eapply "${FILESDIR}/${P}_glibc-2.31.patch"
+
+	use naludump && eapply "${DISTDIR}/${PN}-2.1.5-naludump-0.1.diff"
+#	# requested to upstream for new patch
+#	use permashift && eapply "${DISTDIR}/vdr-2.3-patch-for-permashift.diff"
+	use pinplugin && eapply "${WORKDIR}/${P}_pinplugin.patch"
+	use ttxtsubs && eapply "${WORKDIR}/${PN}-2.4.0-ttxtsubs.patch"
+	use ttxtsubs && eapply "${FILESDIR}/${P}_ttxtsubs_segfault.patch"
+	use menuorg && eapply "${DISTDIR}/vdr-menuorg-2.3.x.diff"
+	use mainmenuhooks && eapply "${WORKDIR}/${P}_mainmenuhook-1.0.1.patch"
+
+	add_cap CAP_UTF8 \
+		CAP_IRCTRL_RUNTIME_PARAM \
+		CAP_VFAT_RUNTIME_PARAM \
+		CAP_CHUID \
+		CAP_SHUTDOWN_AUTO_RETRY
+
+	echo -e ${CAPS} > "${CAP_FILE}" || die "cannot write to CAP_FILE"
+
+	# LINGUAS support
+	einfo "\n \t VDR supports the LINGUAS values"
+
+	lang_po
+
+	einfo "\t Please set one of this values in your sytem make.conf"
+	einfo "\t LINGUAS=\"${LING_PO}\"\n"
+
+	if [[ -z ${LINGUAS} ]]; then
+		einfo "\n \t No values in LINGUAS="
+		einfo "\t You will get only english text on OSD \n"
+	fi
+
+	strip-linguas ${LING_PO} en
+
+	default
+}
+
+src_install() {
+	# trick the makefile to not create a VIDEODIR by supplying it with an
+	# existing directory
+	emake VIDEODIR="/" DESTDIR="${ED}" install
+
+	keepdir "${PLUGIN_LIBDIR}"
+
+	# backup for plugins they don't be able to create this dir
+	keepdir "${CONF_DIR}/plugins"
+
+	if use html; then
+		local HTML_DOCS=( *.html )
+	fi
+	local DOCS=( MANUAL INSTALL README* HISTORY CONTRIBUTORS UPDATE-2* )
+	einstalldocs
+
+	insinto /usr/share/vdr
+	doins "${CAP_FILE}"
+
+	fowners vdr:vdr "${CONF_DIR}" -R
+}
+
+pkg_postinst() {
+	elog "Please read the /usr/share/doc/${PF}/UPDATE-2.4"
+	elog "for major changes in this version\n"
+
+	elog "It is a good idea to run vdrplugin-rebuild now.\n"
+
+	elog "To get nice symbols in OSD we recommend to install"
+	elog "\t1. emerge media-fonts/vdrsymbols-ttf"
+	elog "\t2. select font VDRSymbolsSans in Setup\n"
+
+	elog "To get an idea how to proceed now, have a look at our vdr-guide:"
+	elog "\thttps://wiki.gentoo.org/wiki/VDR"
+}


             reply	other threads:[~2020-03-02 20:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-02 20:05 Jörg Bornkessel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-06-01 21:34 [gentoo-commits] repo/gentoo:master commit in: media-video/vdr/, media-video/vdr/files/ Florian Schmaus
2023-01-09 13:28 Joonas Niilola
2022-07-03  8:57 Joonas Niilola
2021-05-06  8:47 Joonas Niilola
2021-05-02 20:33 Jörg Bornkessel
2021-02-11 17:20 Jörg Bornkessel
2019-12-25 18:26 Jörg Bornkessel
2019-11-17  1:34 David Seifert
2019-07-31 13:55 Andreas Sturmlechner
2019-04-11 22:39 David Seifert
2018-09-14 19:19 Joerg Bornkessel
2018-08-29 10:17 Joerg Bornkessel
2018-08-27 13:32 Joerg Bornkessel
2018-01-21 17:55 Joerg Bornkessel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1583179515.1a77777812a5edfdb1f6a9676fc035fe91dc1032.hd_brummy@gentoo \
    --to=hd_brummy@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox