commit:     e52fb5f0180b62a7f47d0a6cd728df10553fc616
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Mon Dec 28 12:42:53 2020 +0000
Commit:     David Seifert <soap <AT> gentoo <DOT> org>
CommitDate: Mon Dec 28 12:42:53 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e52fb5f0

media-sound/dvda-author: Port to EAPI 7

Closes: https://bugs.gentoo.org/706918
Closes: https://bugs.gentoo.org/740342
Package-Manager: Portage-3.0.9, Repoman-3.0.1
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: David Seifert <soap <AT> gentoo.org>

 .../dvda-author/dvda-author-10.06-r1.ebuild        | 36 ++++++++++++----------
 .../files/dvda-author-10.06-desktop-QA.patch       | 11 +++++++
 .../files/dvda-author-10.06-fno-common.patch       | 22 +++++++++++++
 3 files changed, 53 insertions(+), 16 deletions(-)

diff --git a/media-sound/dvda-author/dvda-author-10.06-r1.ebuild 
b/media-sound/dvda-author/dvda-author-10.06-r1.ebuild
index 965f73db2aa..28e830dfa8d 100644
--- a/media-sound/dvda-author/dvda-author-10.06-r1.ebuild
+++ b/media-sound/dvda-author/dvda-author-10.06-r1.ebuild
@@ -1,7 +1,9 @@
 # Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="5"
+EAPI=7
+
+inherit desktop
 
 DESCRIPTION="Author a DVD-Audio DVD"
 HOMEPAGE="http://dvd-audio.sourceforge.net";
@@ -12,12 +14,20 @@ SLOT="0"
 KEYWORDS="~amd64 ~x86"
 IUSE="debug"
 
-RDEPEND=">=media-sound/sox-14.1[png]
-       >=media-libs/flac-1.2.1[ogg]"
-DEPEND="${RDEPEND}
-       >=sys-devel/libtool-2"
+RDEPEND="
+       media-sound/sox[png]
+       media-libs/flac[ogg]"
+DEPEND="${RDEPEND}"
+BDEPEND="sys-devel/libtool"
+
+PATCHES=(
+       "${FILESDIR}"/${P}-fno-common.patch
+       "${FILESDIR}"/${P}-desktop-QA.patch
+)
 
 src_prepare() {
+       default
+
        # Fix parallel make
        sed -i -e 's:^\(\tcd ${MAYBE_CDRTOOLS}\):@HAVE_CDRTOOLS_BUILD_TRUE@\1:' 
\
                Makefile.in || die "sed failed"
@@ -33,19 +43,13 @@ src_prepare() {
 
 src_configure() {
        econf \
-               --with-config=/etc \
+               --with-config="${EPREFIX}/etc" \
                $(use_with debug debug full)
 }
 
-src_compile() {
-       # make[1]: warning: jobserver unavailable: using -j1.
-       #                   Add '+' to parent make rule.
-       emake -j1
-}
-
 src_install() {
-       newbin src/dvda ${PN}
-       insinto /etc
-       doins ${PN}.conf
-       dodoc AUTHORS BUGS ChangeLog EXAMPLES HOWTO.conf LIMITATIONS NEWS TODO
+       default
+
+       domenu "${ED}"/etc/dvda-author.desktop
+       rm -r "${ED}"/etc/{menu,dvda-author.desktop} || die
 }

diff --git a/media-sound/dvda-author/files/dvda-author-10.06-desktop-QA.patch 
b/media-sound/dvda-author/files/dvda-author-10.06-desktop-QA.patch
new file mode 100644
index 00000000000..adb2d1c53b0
--- /dev/null
+++ b/media-sound/dvda-author/files/dvda-author-10.06-desktop-QA.patch
@@ -0,0 +1,11 @@
+--- a/dvda-author.desktop.in
++++ b/dvda-author.desktop.in
+@@ -7,7 +7,5 @@
+ Icon=@prefix@/share/pixmaps/dvda-author.png
+ Terminal=false
+ Type=Application
+-Categories=Application;AudioVideo;Audio
+-GenericName[en_EN]=Terminal Program
++Categories=AudioVideo;Audio
+ StartupNotify=true
+-GenericName[fr_FR]=

diff --git a/media-sound/dvda-author/files/dvda-author-10.06-fno-common.patch 
b/media-sound/dvda-author/files/dvda-author-10.06-fno-common.patch
new file mode 100644
index 00000000000..2f549f02ddb
--- /dev/null
+++ b/media-sound/dvda-author/files/dvda-author-10.06-fno-common.patch
@@ -0,0 +1,22 @@
+--- a/src/command_line_parsing.c
++++ b/src/command_line_parsing.c
+@@ -33,7 +33,7 @@
+ /*  #define _GNU_SOURCE must appear before <string.h> and <getopt.h> for 
strndup  and getopt_long*/
+ 
+ 
+-globalData globals;
++extern globalData globals;
+ unsigned int startsector;
+ extern char* OUTDIR, *LOGFILE, *WORKDIR, *TEMPDIR;
+ static fileinfo_t ** files;
+--- a/src/menu.c
++++ b/src/menu.c
+@@ -30,7 +30,7 @@ extern globalData globals;
+ 
+ uint16_t norm_x=PAL_X, norm_y=PAL_Y;  // TODO: adjust for ntsc #define NTSC_Y 
480
+ extern uint16_t totntracks;
+-uint8_t maxbuttons, resbuttons;
++extern uint8_t maxbuttons, resbuttons;
+ 
+ 
+ 

Reply via email to