Gentoo Archives: gentoo-commits

From: Thomas Beierlein <tomjbe@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: media-radio/unixcw/
Date: Sun, 24 May 2020 16:12:05
Message-Id: 1590336699.c10ff690d4a6519d56337697c669a5044df99be8.tomjbe@gentoo
1 commit: c10ff690d4a6519d56337697c669a5044df99be8
2 Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
3 AuthorDate: Sun May 24 16:11:39 2020 +0000
4 Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
5 CommitDate: Sun May 24 16:11:39 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c10ff690
7
8 media-radio/unixcw: Drop install of static lib (bug #724654)
9
10 Bump EAPI
11
12 Closes: https://bugs.gentoo.org/724654
13 Package-Manager: Portage-2.3.99, Repoman-2.3.22
14 Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
15
16 media-radio/unixcw/unixcw-3.5.1-r1.ebuild | 75 +++++++++++++++++++++++++++++++
17 1 file changed, 75 insertions(+)
18
19 diff --git a/media-radio/unixcw/unixcw-3.5.1-r1.ebuild b/media-radio/unixcw/unixcw-3.5.1-r1.ebuild
20 new file mode 100644
21 index 00000000000..a905c627ddf
22 --- /dev/null
23 +++ b/media-radio/unixcw/unixcw-3.5.1-r1.ebuild
24 @@ -0,0 +1,75 @@
25 +# Copyright 1999-2020 Gentoo Authors
26 +# Distributed under the terms of the GNU General Public License v2
27 +
28 +EAPI=7
29 +
30 +inherit autotools flag-o-matic multilib
31 +
32 +DESCRIPTION="A package of programs that fit together to form a morse code tutor program"
33 +HOMEPAGE="http://unixcw.sourceforge.net"
34 +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
35 +
36 +LICENSE="GPL-2"
37 +SLOT="0"
38 +KEYWORDS="~alpha ~amd64 ~ppc ~x86"
39 +IUSE="alsa ncurses pulseaudio suid test qt5"
40 +RESTRICT="!test? ( test )"
41 +
42 +RDEPEND="ncurses? ( sys-libs/ncurses:= )
43 + qt5? ( dev-qt/qtcore:5
44 + dev-qt/qtgui:5
45 + dev-qt/qtwidgets:5 )
46 + alsa? ( media-libs/alsa-lib )
47 + pulseaudio? ( media-sound/pulseaudio )"
48 +DEPEND="${RDEPEND}
49 + virtual/pkgconfig
50 + sys-devel/libtool"
51 +
52 +src_prepare() {
53 + append-cflags -std=gnu11
54 + append-cxxflags -std=gnu++11
55 + eapply -p0 "${FILESDIR}"/$PN-3.5-tinfo.patch \
56 + "${FILESDIR}"/$PN-tests.patch
57 + eapply_user
58 + eautoreconf
59 +}
60 +
61 +src_configure() {
62 + econf --libdir=/usr/$(get_libdir) \
63 + $(use_enable pulseaudio ) \
64 + $(use_enable alsa ) \
65 + $(use_enable ncurses cwcp ) \
66 + $(use_enable qt5 xcwcp ) \
67 + --disable-static
68 +}
69 +
70 +src_install() {
71 + emake DESTDIR="${D}" install
72 + find "${D}" -name '*.la' -type f -delete || die
73 + dodoc ChangeLog NEWS README
74 + if ! use suid ; then
75 + fperms 711 /usr/bin/cw
76 + if use ncurses ; then
77 + fperms 711 /usr/bin/cwcp
78 + fi
79 + if use qt5 ; then
80 + fperms 711 /usr/bin/xcwcp
81 + fi
82 + fi
83 +}
84 +
85 +pkg_postinst() {
86 + if use suid ; then
87 + ewarn "You have choosen to install 'cw', 'cwcp' and 'xcwcp' setuid"
88 + ewarn "by setting USE=suid."
89 + ewarn "Be aware that this is a security risk and not recommended."
90 + ewarn ""
91 + ewarn "These files do only need root access if you want to use the"
92 + ewarn "PC speaker for morse sidetone output. You can alternativly"
93 + ewarn "drop USE=suid and use sudo."
94 + else
95 + elog "Be aware that 'cw', 'cwcp' and 'xcwcp' needs root access if"
96 + elog "you want to use the PC speaker for morse sidetone output."
97 + elog "You can call the programs via sudo for that (see 'man sudo')."
98 + fi
99 +}