1 |
commit: 9a7cb6035b672f83356feaf696dfb1fa73941ad3 |
2 |
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 11 16:44:47 2016 +0000 |
4 |
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 11 16:44:47 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a7cb603 |
7 |
|
8 |
media-radio/unixcw: Build with C++11 for Qt (Bug #595444) |
9 |
|
10 |
Package-Manager: portage-2.3.1 |
11 |
|
12 |
media-radio/unixcw/unixcw-3.5.0-r1.ebuild | 71 +++++++++++++++++++++++++++++++ |
13 |
1 file changed, 71 insertions(+) |
14 |
|
15 |
diff --git a/media-radio/unixcw/unixcw-3.5.0-r1.ebuild b/media-radio/unixcw/unixcw-3.5.0-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000..728a79c |
18 |
--- /dev/null |
19 |
+++ b/media-radio/unixcw/unixcw-3.5.0-r1.ebuild |
20 |
@@ -0,0 +1,71 @@ |
21 |
+# Copyright 1999-2016 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+# $Id$ |
24 |
+ |
25 |
+EAPI=5 |
26 |
+ |
27 |
+inherit eutils flag-o-matic multilib |
28 |
+ |
29 |
+DESCRIPTION="A package of programs that fit together to form a morse code tutor program" |
30 |
+HOMEPAGE="http://unixcw.sourceforge.net" |
31 |
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" |
32 |
+ |
33 |
+LICENSE="GPL-2" |
34 |
+SLOT="0" |
35 |
+KEYWORDS="~alpha ~amd64 ~ppc ~x86" |
36 |
+IUSE="alsa ncurses pulseaudio suid qt5" |
37 |
+ |
38 |
+RDEPEND="ncurses? ( sys-libs/ncurses:= ) |
39 |
+ qt5? ( dev-qt/qtcore:5 |
40 |
+ dev-qt/qtgui:5 |
41 |
+ dev-qt/qtwidgets:5 ) |
42 |
+ alsa? ( media-libs/alsa-lib ) |
43 |
+ pulseaudio? ( media-sound/pulseaudio )" |
44 |
+DEPEND="${RDEPEND} |
45 |
+ virtual/pkgconfig |
46 |
+ sys-devel/libtool |
47 |
+ !<=app-misc/cw-1.0.16-r1" |
48 |
+ |
49 |
+src_prepare() { |
50 |
+ append-cflags -std=gnu11 |
51 |
+ append-cxxflags -std=gnu++11 |
52 |
+} |
53 |
+ |
54 |
+src_configure() { |
55 |
+ econf --libdir=/usr/$(get_libdir) \ |
56 |
+ $(use_enable pulseaudio ) \ |
57 |
+ $(use_enable alsa ) \ |
58 |
+ $(use_enable ncurses cwcp ) \ |
59 |
+ $(use_enable qt5 xcwcp ) |
60 |
+} |
61 |
+ |
62 |
+src_install() { |
63 |
+ emake DESTDIR="${D}" install |
64 |
+ prune_libtool_files |
65 |
+ dodoc ChangeLog NEWS README |
66 |
+ if ! use suid ; then |
67 |
+ fperms 711 /usr/bin/cw |
68 |
+ if use ncurses ; then |
69 |
+ fperms 711 /usr/bin/cwcp |
70 |
+ fi |
71 |
+ if use qt5 ; then |
72 |
+ fperms 711 /usr/bin/xcwcp |
73 |
+ fi |
74 |
+ fi |
75 |
+} |
76 |
+ |
77 |
+pkg_postinst() { |
78 |
+ if use suid ; then |
79 |
+ ewarn "You have choosen to install 'cw', 'cwcp' and 'xcwcp' setuid" |
80 |
+ ewarn "by setting USE=suid." |
81 |
+ ewarn "Be aware that this is a security risk and not recommended." |
82 |
+ ewarn "" |
83 |
+ ewarn "These files do only need root access if you want to use the" |
84 |
+ ewarn "PC speaker for morse sidetone output. You can alternativly" |
85 |
+ ewarn "drop USE=suid and use sudo." |
86 |
+ else |
87 |
+ elog "Be aware that 'cw', 'cwcp' and 'xcwcp' needs root access if" |
88 |
+ elog "you want to use the PC speaker for morse sidetone output." |
89 |
+ elog "You can call the programs via sudo for that (see 'man sudo')." |
90 |
+ fi |
91 |
+} |