Diff vdr-burn-0.2.2-r2 with a vdr-burn-0.3.0-r2

/usr/portage/media-plugins/vdr-burn/vdr-burn-0.3.0-r2.ebuild 2023-10-09 14:52:31.748368407 +0300
1
# Copyright 1999-2022 Gentoo Authors
1
# Copyright 1999-2021 Gentoo Authors
2 2
# Distributed under the terms of the GNU General Public License v2
3 3

  
4 4
EAPI=7
5 5

  
6 6
inherit vdr-plugin-2
7 7

  
8
VERSION="1252" # every bump, new version!
9

  
10
RESTRICT="test"
8
VERSION="2028" # every bump, new version!
11 9

  
12 10
DESCRIPTION="VDR Plugin: burn records on DVD"
13 11
HOMEPAGE="https://projects.vdr-developer.org/projects/plg-burn"
......
21 19
DEPEND="media-libs/gd[png,truetype,jpeg]
22 20
	media-video/vdr"
23 21
RDEPEND="${DEPEND}
24
	dvdarchive? ( media-video/vdrtools-genindex )
25
	>=app-cdr/dvd+rw-tools-5.21
26
	>=dev-libs/libcdio-0.71
22
	app-cdr/dvd+rw-tools
23
	dev-libs/libcdio
27 24
	media-fonts/corefonts
28
	>=media-video/dvdauthor-0.6.14
29
	>=media-video/mjpegtools-1.6.2[png]
30
	>=media-video/projectx-0.90.4.00_p32
25
	media-video/dvdauthor
26
	media-video/mjpegtools[png]
27
	media-video/projectx
31 28
	media-video/transcode
32 29
	sys-apps/util-linux"
33 30

  
......
41 38
	vdr-plugin-2_src_prepare
42 39

  
43 40
	eapply \
44
		"${FILESDIR}"/${P}-r1_gentoo-path.diff \
45
		"${FILESDIR}"/${P}_setdefaults.diff \
46
		"${FILESDIR}"/${P}_makefile.diff
47
	eapply -p0 "${FILESDIR}"/${P}-missing-include-for-function-setpriority.patch
48

  
49
	use dvdarchive && sed -i Makefile \
50
		-e "s:#ENABLE_DMH_ARCHIVE:ENABLE_DMH_ARCHIVE:"
41
		"${FILESDIR}"/${P}_gentoo-path.patch \
42
		"${FILESDIR}"/${P}_setdefaults.patch \
43
		"${FILESDIR}"/${P}_dmh-archive.patch
44

  
45
	if use dvdarchive; then
46
		sed -i Makefile \
47
		-e "s:#ENABLE_DMH_ARCHIVE:ENABLE_DMH_ARCHIVE:" || die
48
	fi
51 49

  
52 50
	sed -i Makefile \
53
		-e 's:^ISODIR=.*$:ISODIR=/var/vdr/video/dvd-images:'
51
		-e 's:^ISODIR=.*$:ISODIR=/var/vdr/video/dvd-images:' || die
54 52

  
55
	sed -i Makefile -e 's:DEFINES += -DTTXT_SUBTITLES:#DEFINES += -DTTXT_SUBTITLES:'
53
	sed -i Makefile -e 's:DEFINES += -DTTXT_SUBTITLES:#DEFINES += -DTTXT_SUBTITLES:' || die
56 54

  
57
	if has_version ">=media-video/vdr-2.1.2"; then
58
		sed -e "s#VideoDirectory#cVideoDirectory::Name\(\)#" \
59
		-i jobs.c
60
	fi
55
	# do not install deprecated fonts, do not install in /etc/vdr/plugin config dir
56
	sed -i Makefile \
57
		-e "s:install-res install-conf::" || die
61 58

  
62 59
	# ttf-bitstream-vera deprecated, bug #335782
63
	sed -e "s:Vera:arial:" -i skins.c
60
	sed -e "s:Vera:arial:" -i skins.c || die
61

  
62
	# fix deprecated warnings pkg-config
63
	sed -i Makefile \
64
		-e "s:gdlib-config:pkg-config gdlib:" || die
65

  
66
	# 786492
67
	sed -e "s|=min|=std::min|" -i genindex/pes.c || die
64 68

  
65 69
	fix_vdr_libsi_include scanner.c
66 70
}
......
68 72
src_install() {
69 73
	vdr-plugin-2_src_install
70 74

  
71
	dobin "${S}"/*.sh
72

  
73 75
	insinto /usr/share/vdr/burn
74
	doins "${S}"/burn/menu-silence.mp2
75
	newins "${S}"/burn/menu-button.png menu-button-default.png
76
	newins "${S}"/burn/menu-bg.png menu-bg-default.png
76
	doins "${S}"/resource/menu-silence.mp2
77
	newins "${S}"/resource/menu-button.png menu-button-default.png
78
	newins "${S}"/resource/menu-bg.png menu-bg-default.png
79

  
80
	newins "${S}"/config/ProjectX.ini projectx-vdr.ini
81

  
77 82
	dosym menu-bg-default.png /usr/share/vdr/burn/menu-bg.png
78 83
	dosym menu-button-default.png /usr/share/vdr/burn/menu-button.png
79 84

  
80
	newins "${S}"/burn/ProjectX.ini projectx-vdr.ini
85
	insinto /usr/share/vdr/burn/counters/
86
	doins "${S}/config/counters/standard"
81 87

  
82 88
	fowners -R vdr:vdr /usr/share/vdr/burn
83

  
84
	(
85
		diropts -ovdr -gvdr
86
		keepdir /usr/share/vdr/burn/counters
87
	)
88 89
}
89 90

  
90 91
pkg_preinst() {
91
	if [[ -d ${ROOT}/etc/vdr/plugins/burn && ( ! -L ${ROOT}/etc/vdr/plugins/burn ) ]]; then
92
	if [[ -d ${EROOT}/etc/vdr/plugins/burn && ( ! -L ${EROOT}/etc/vdr/plugins/burn ) ]]; then
92 93
		einfo "Moving /etc/vdr/plugins/burn away"
93
		mv "${ROOT}"/etc/vdr/plugins/burn "${ROOT}"/etc/vdr/plugins/burn_old
94
		mv "${EROOT}"/etc/vdr/plugins/burn "${EROOT}"/etc/vdr/plugins/burn_old
94 95
	fi
95 96
}
96 97

  
97 98
pkg_postinst() {
98

  
99
	local DMH_FILE="${ROOT}/usr/share/vdr/burn/counters/standard"
100
	if [[ ! -e "${DMH_FILE}" ]]; then
101
		echo 0001 > "${DMH_FILE}"
102
		chown vdr:vdr "${DMH_FILE}"
103
	fi
104

  
105 99
	vdr-plugin-2_pkg_postinst
106 100

  
107
	einfo "This ebuild comes only with the standard template"
108
	einfo "'emerge vdr-burn-templates' for more templates"
109
	einfo "To change the templates, use the vdr-image plugin"
110

  
111
	if [[ -e ${ROOT}/etc/vdr/reccmds/reccmds.burn.conf ]]; then
112
		eerror
113
		eerror "Please remove the following unneeded file:"
114
		eerror "\t/etc/vdr/reccmds/reccmds.burn.conf"
115
		eerror
101
	if [[ -e ${EROOT}/etc/vdr/reccmds/reccmds.burn.conf ]]; then
102
		eerror "\nPlease remove the following unneeded file:"
103
		eerror "\t/etc/vdr/reccmds/reccmds.burn.conf\n"
116 104
	fi
117 105
}
Thank you!