summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Beierlein <tomjbe@gentoo.org>2012-06-21 06:11:00 +0000
committerThomas Beierlein <tomjbe@gentoo.org>2012-06-21 06:11:00 +0000
commitd45c74ee74d2f47ab2856fe90ccae71ced2b9924 (patch)
tree6902fd57936b9661d4194f36fadd4f7a4fa3cf93 /media-radio
parentmarked x86 per bug 422009 (diff)
downloadhistorical-d45c74ee74d2f47ab2856fe90ccae71ced2b9924.tar.gz
historical-d45c74ee74d2f47ab2856fe90ccae71ced2b9924.tar.bz2
historical-d45c74ee74d2f47ab2856fe90ccae71ced2b9924.zip
Version bump
Package-Manager: portage-2.1.10.65/cvs/Linux x86_64
Diffstat (limited to 'media-radio')
-rw-r--r--media-radio/unixcw/ChangeLog9
-rw-r--r--media-radio/unixcw/Manifest18
-rw-r--r--media-radio/unixcw/files/unixcw-3.0.2-config.patch183
-rw-r--r--media-radio/unixcw/files/unixcw-3.0.2-destdir.patch18
-rw-r--r--media-radio/unixcw/files/unixcw-3.0.2-parallel-make.patch49
-rw-r--r--media-radio/unixcw/files/unixcw-3.0.2-qt4.patch20
-rw-r--r--media-radio/unixcw/unixcw-3.0.2.ebuild68
7 files changed, 363 insertions, 2 deletions
diff --git a/media-radio/unixcw/ChangeLog b/media-radio/unixcw/ChangeLog
index a837640c5c33..d58cf3e12bcf 100644
--- a/media-radio/unixcw/ChangeLog
+++ b/media-radio/unixcw/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for media-radio/unixcw
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/media-radio/unixcw/ChangeLog,v 1.5 2012/05/03 03:48:56 jdhore Exp $
+# $Header: /var/cvsroot/gentoo-x86/media-radio/unixcw/ChangeLog,v 1.6 2012/06/21 06:11:00 tomjbe Exp $
+
+*unixcw-3.0.2 (21 Jun 2012)
+
+ 21 Jun 2012; Thomas Beierlein <tomjbe@gentoo.org> +unixcw-3.0.2.ebuild,
+ +files/unixcw-3.0.2-config.patch, +files/unixcw-3.0.2-destdir.patch,
+ +files/unixcw-3.0.2-parallel-make.patch, +files/unixcw-3.0.2-qt4.patch:
+ Version bump
03 May 2012; Jeff Horelick <jdhore@gentoo.org> unixcw-2.3-r6.ebuild:
dev-util/pkgconfig -> virtual/pkgconfig
diff --git a/media-radio/unixcw/Manifest b/media-radio/unixcw/Manifest
index 43096d46f2fb..1d0819dd8cfa 100644
--- a/media-radio/unixcw/Manifest
+++ b/media-radio/unixcw/Manifest
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
AUX unixcw-2.3--as-needed.patch 527 RMD160 47d2b22e6c8b211abae913e32576408a6a2c8a69 SHA1 ffae50431bc25e4b4b9f9264c0aef44300a82316 SHA256 b72add7559a0a9df10adc0efa885377ac02ccc2fa840366c1185cbb2485c35e8
AUX unixcw-2.3-audio.patch 5083 RMD160 178b53cafb61c8c0d6888b6e35e00b358e249ef5 SHA1 81c30aadf69aba3c7d2d6e666288b1babde295aa SHA256 ef07fd4fb3dddfe4f350b770996c8f612a804fbf0b0156c9fe7bef9e1c04209f
AUX unixcw-2.3-config.patch 3761 RMD160 3c768f236b28840bfadba4865cc9c67eaef97695 SHA1 6fb542cd888fdae76e12f80946dacc30298e46c3 SHA256 aeb49365292721894afc7a4df61abff0e0b053e8d934951e200ec70dc8abf150
@@ -6,8 +9,21 @@ AUX unixcw-2.3-fPIC.patch 1866 RMD160 fd3dcaa906a308d15baa738dca5f01e3767cd6dd S
AUX unixcw-2.3-gcc43.patch 609 RMD160 d7621b42cae777043c6f8153373ac9f04ddda291 SHA1 6cf8137de464d0b6063822cf3edca0f950afd0f9 SHA256 7ae894241793ead8b00d6ff48b3a19da61e4f344a2136d0a538e66f3dbeb1f2b
AUX unixcw-2.3-ldflags.patch 1440 RMD160 d198c5325152b93822a0a3d59516b48c7b6d53f2 SHA1 741a61a083d350d84743f6cde9c18923c7d2acb5 SHA256 41d40ceb0accb8c971bbc69eb00d7c17aa2d62ed8d907d46a310f3ec3b6ff662
AUX unixcw-2.3-parallel-make.patch 1200 RMD160 302a1947d21a3b1013d124edc380fcaddbbb7272 SHA1 a15e1bc58c64421b93a73c9ff46dfdbeb2d3a6f6 SHA256 53b8c6e12de88ed2c915617206220350c3e08eebd83d748469bc23c801ed108c
+AUX unixcw-3.0.2-config.patch 5517 RMD160 94321a3ac37221338ad7c1d218d4973b1a4babe4 SHA1 edc4249e5fadf5b2564e3e93f40d3d2d0c71c7d1 SHA256 8e58063b86e77b9594a494224cb199f86888c654d01cb746da0d365c71c858dc
+AUX unixcw-3.0.2-destdir.patch 563 RMD160 9e23dbeec4feba0bce726b372d33be8f40f995eb SHA1 f76ea82a817f776ff51c433c3a7fbb4d969c0420 SHA256 0cab9cc2f03e2d95a533438221e0b09c5a952c98e56f009fdea080ab5939a57f
+AUX unixcw-3.0.2-parallel-make.patch 1506 RMD160 96ef41bae851358deed86b6984bbcadc37b39b16 SHA1 9ed0eec680bd011716b422d704bd59e6421632b9 SHA256 968bc3581b4e7c84e509c10dcb3ba7f6beba68eaea0d9ea7b7da8a7c39fd8a89
+AUX unixcw-3.0.2-qt4.patch 615 RMD160 59831c14a35fbaac0f01cb691d7fde8565a96f56 SHA1 0880ad3c927e6cb7bada6a3927172c78c05ff476 SHA256 c7a75c70c06d4abc3e2f866eff011defa1732f110bb15a5023a9414ddf757690
DIST unixcw-2.3-qt3to4.patch.gz 5784 RMD160 773ee78118be6e726b888121c3e322fbd72e48a7 SHA1 87bdeba22fffcd4d62517744ba03cc1c7ad1fb7d SHA256 db4dd65951e39179abf6b2fdc69c9bdd166902cf402f768f117bde1e9872b263
DIST unixcw-2.3.tgz 202048 RMD160 1ba7944d7a7fc92adf7ed1a83d706546e9eaa8be SHA1 2aece1e4b0660618537a94561344dd97026b7924 SHA256 124c60c6c7ef596a7c96c94a0e76204c7d986373564121155f0f206ad71f30a0
+DIST unixcw-3.0.2.tar.gz 240132 RMD160 8d10c61cdd950b6c356c75cab8ea47715d4ddd0a SHA1 dd748962130e2f9a5b3dfcd2b02869b355b0b5d8 SHA256 1578b0e37c51ebf2668ea4683ed7edf0e114e7dcc2a6296349ca705bc6ec2602
EBUILD unixcw-2.3-r6.ebuild 2221 RMD160 4802cc6797cb0d3c22bd1c8f4e399952c3d2e594 SHA1 59fe2db0a047923d7f13480b76138a03f5309cd4 SHA256 c80724f00fbd6a5ecfc1dd2503c3aa0a4dca1adc15ec8b6cf12a960bbcff2d45
-MISC ChangeLog 1129 RMD160 c6c519df1965ce8fa8c9d074d3731958274273ce SHA1 7947a676e66c3e78b7d59c77620cf0bd4f640b5f SHA256 5b14359f5099669011be74c2806dcb2b07eb5b3a50e14ff719e92855b743aa0d
+EBUILD unixcw-3.0.2.ebuild 1848 RMD160 8de412618e6992683cb30d4b8968699325183442 SHA1 0543b02faac26d58eb23d411ecd003fb26e87d5a SHA256 c790f3cbcdb567b927d33ecd576d931587363298a9724b31c82edd4d20a917e9
+MISC ChangeLog 1393 RMD160 29b40c5e18cf8afd29aaa37ffb1f2c2aeca98109 SHA1 86d20e27ca431805a741dd049d877ca8e49a0fa0 SHA256 824ac8b8d432fa335765dc20336d85f630386adf228974f602db5a0a14c031a1
MISC metadata.xml 784 RMD160 f63bc134a7fe48ecb470501d79e035a82e1ef0d1 SHA1 f28973bbb093e5e92939d8da9486d6a78f58fa3f SHA256 6af0355085de2e93c560cc28dc7ef512cb901f7d52aa1e420d78c1327dc94e34
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.17 (GNU/Linux)
+
+iEYEARECAAYFAk/iuwcACgkQQe4uqXYgU9UEfQCgj9OhWDoybe+3zH2BLmZdtq1O
+QqsAoN+/tWdvdIrfBSzEbtuw69xe/ooy
+=/NjK
+-----END PGP SIGNATURE-----
diff --git a/media-radio/unixcw/files/unixcw-3.0.2-config.patch b/media-radio/unixcw/files/unixcw-3.0.2-config.patch
new file mode 100644
index 000000000000..403b3d351299
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.0.2-config.patch
@@ -0,0 +1,183 @@
+--- configure.ac.orig 2012-06-21 07:34:18.000000000 +0200
++++ configure.ac 2012-06-21 07:34:42.000000000 +0200
+@@ -45,8 +45,24 @@
+ AC_SUBST(GZIP)
+ AC_SUBST(LDCONFIG)
+
++AC_MSG_CHECKING(--enable-ncurses argument)
++AC_ARG_ENABLE(ncurses,
++ [ --enable-ncurses Include curses based Morse code Tutor],
++ [enable_ncurses=$enableval],
++ [enable_ncurses="no"])
++AC_MSG_RESULT($enable_ncurses)
++
++AC_MSG_CHECKING(--enable-qt4 argument)
++AC_ARG_ENABLE(qt4,
++ [ --enable-qt4 Include QT based Morse code Tutor],
++ [enable_qt=$enableval],
++ [enable_qt="no"])
++AC_MSG_RESULT($enable_qt)
++
++if test "$enable_ncurses" = 'yes'; then
+ # Checks for libraries.
+ AC_CHECK_LIB(curses, initscr)
++fi
+ AC_CHECK_LIB(asound, snd_pcm_open)
+ AC_CHECK_LIB(pthread, pthread_create)
+ AC_CHECK_LIB(m, floor)
+@@ -102,121 +118,40 @@
+ # Decide on which subdirectories to build; substitute into SUBDIRS. Build
+ # cwcp if curses is available, and xcwcp if Qt is available.
+ SUBDIRS="libcw cwutils cw cwgen"
++
++if test "$enable_ncurses" = 'yes'; then
+ # Simple test for curses based on prior library check.
+ if test $ac_cv_lib_curses_initscr = 'yes' ; then
+ SUBDIRS="$SUBDIRS cwcp"
+ else
+ AC_MSG_WARN([Cannot find libcurses - unable to build cwcp])
+ fi
++fi
+
+-
+-
+-
+-# autodetection of QT4 dependencies
+-
+-MOC_MAJOR_EARLIEST=4
+-
+-# possible locations of Qt4 headers
+-QT4HEADER_DIRS="/usr/include/qt4 \ # Debian
+- /usr/include" # Arch (?)
+-
+-# possible locations of Qt4 moc (a.k.a. moc-qt4)
+-QT4BIN_DIRS=$PATH # pretty standard
+-
+-# QT4DIR="" # for testing purposes
+-QT4INC="" # full path to directory with QT4 QtCore + QtGui subdirs and include files, e.g. /usr/include/qt4/
+-QT4MOC="" # full path to QT4 moc executable
+-
+-if [[[ $QT4DIR = "" ]]] ; then
+-
+- # look for QT4 include directories
+- for dir in $QT4HEADER_DIRS; do
+- if test -d "$dir/QtGui" && test -d "$dir/QtCore" ; then
+- QT4INC=$dir;
+- fi
+- done
+-
+- # look for QT4 moc binary
+- AC_PATH_PROG(QT4MOC, moc-qt4, , $PATH)
+- if test -n "$QT4MOC" ; then
+- MOC_MAJOR="`$QT4MOC -v 2>&1 | sed -e 's;.\+ (Qt \([[0-9]]\).\+;\1;g'`"
+- if [[[ $MOC_MAJOR != $MOC_MAJOR_EARLIEST ]]] ; then
+- QT4MOC=""
+- fi
+- fi
+-
+- if [[[ "$QT4MOC" = "" ]]] ; then
+- QT4MOC_2=""
+- AC_PATH_PROG(QT4MOC_2, moc, , $PATH)
+- if test -n "$QT4MOC_2" ; then
+- MOC_MAJOR="`$QT4MOC_2 -v 2>&1 | sed -e 's;.\+ (Qt \([[0-9]]\).\+;\1;g'`"
+- if [[[ $MOC_MAJOR = $MOC_MAJOR_EARLIEST ]]] ; then
+- QT4MOC=$QT4MOC_2
+- fi
+- fi
+- fi
+-
+-
+- if [[[ $QT4INC != "" && $QT4MOC != "" ]]] ; then
+-
+- # we have moc4 and path to QT4 include files,
+- # so we can build xcwcp
+- SUBDIRS="$SUBDIRS xcwcp"
+-
+- AC_SUBST(QT4INC)
+- AC_SUBST(QT4MOC)
+- else
+- if [[[ $QT4INC = "" ]]] ; then
+- AC_MSG_WARN([Can't find directory with QT4 header files - unable to build xcwcp])
+- fi
+-
+- if [[[ $QT4MOC = "" ]]] ; then
+- AC_MSG_WARN([Can't find QT moc version == $MOC_MAJOR_EARLIEST - unable to build xcwcp])
++if test "$enable_qt4" = 'yes'; then
++ dnl Look for Qt4 libs
++ PKG_CHECK_MODULES([QT4], ["QtCore QtGui Qt3Support"], [
++ AC_SUBST(QT4INC,$QT4_CFLAGS)
++ AC_SUBST(QT4LIBS)
++ ], [
++ AC_MSG_ERROR([Qt4 libs not found])
++ ])
++ dnl Look for moc, either on $PATH or in $QTDIR/bin
++ AC_PATH_PROG(QT4MOC, moc, , $PATH:$QTDIR/bin)
++ if test -n "$QT4MOC" ; then
++ dnl if libs and moc found
++ SUBDIRS="$SUBDIRS xcwcp"
++ AC_DEFINE([WANT_QT4], 1, [Want Qt4])
++ echo "enabling Qt4 support"
++ else
++ AC_MSG_ERROR([Cannot find 'moc'])
++ AC_DEFINE([WANT_QT4], 0, [No Qt4])
+ fi
+-
+- AC_MSG_WARN([Hint: try setting QT4DIR env variable per instructions in unixcw/INSTALLATION])
+-
+- QT4INC=""
+- QT4MOC=""
+- fi
+-
+-
+ else
+-
+-
+-# Look for $QT4DIR. If found, then look for moc, either on $PATH, or
+-# in $QT4DIR/bin.
+-
+- AC_PATH_PROG(QT4MOC, moc, , $QT4DIR/bin:$PATH)
+- if test -n "$QT4MOC" ; then
+- MOC_VERSION="`$QT4MOC -v 2>&1 | sed -e 's;.*(Qt ;;' -e 's;).*;;'`"
+- if test -n "$MOC_VERSION" ; then
+- MOC_MAJOR="`echo $MOC_VERSION | sed -e 's;\..*;;'`"
+- expr "$MOC_MAJOR" + 0 >/dev/null 2>/dev/null
+- status=$?
+- if test -n "$MOC_MAJOR" -a $status -eq 0 ; then
+- if test "$MOC_MAJOR" -ge $MOC_MAJOR_EARLIEST ; then
+- SUBDIRS="$SUBDIRS xcwcp"
+- QT4INC="$QT4DIR/include"
+- AC_SUBST(QT4INC)
+- AC_SUBST(QT4MOC)
+- else
+- AC_MSG_WARN([Found 'moc' $MOC_VERSION - unable to build xcwcp])
+- AC_MSG_WARN([Hint: xcwcp requires 'moc' version >= $MOC_MAJOR_EARLIEST])
+- fi
+- else
+- AC_MSG_WARN([Cannot find 'moc' version - unable to build xcwcp])
+- AC_MSG_WARN([Hint: ensure 'moc' is in QT4DIR/bin on your PATH])
+- fi
+- else
+- AC_MSG_WARN([Cannot find 'moc' version - unable to build xcwcp])
+- AC_MSG_WARN([Hint: ensure 'moc' is in QT4DIR/bin on your PATH])
+- fi
+- else
+- AC_MSG_WARN([Cannot find 'moc' - unable to build xcwcp])
+- AC_MSG_WARN([Hint: ensure 'moc' is in QT4DIR/bin on your PATH])
+- fi
++ AC_DEFINE([WANT_QT4], 0, [No Qt4])
++ echo "disabling Qt4 support"
+ fi
++
+ AC_SUBST(SUBDIRS)
+
+ if [[[ $QT4INC != "" && $QT4MOC != "" ]]] ; then
+--- Makefile.inc.in.orig 2012-06-21 07:59:31.000000000 +0200
++++ Makefile.inc.in 2012-06-21 08:00:01.000000000 +0200
+@@ -31,6 +31,7 @@
+ # AC_QTMOC = @QTMOC@
+ AC_QT4INC = @QT4INC@
+ AC_QT4MOC = @QT4MOC@
++AC_QT4LIBS = @QT4_LIBS@
+ AC_CFLAG_PIC = @CFLAG_PIC@
+ AC_SUBDIRS = @SUBDIRS@
+ AC_CC_LINKS_SO = @CC_LINKS_SO@
diff --git a/media-radio/unixcw/files/unixcw-3.0.2-destdir.patch b/media-radio/unixcw/files/unixcw-3.0.2-destdir.patch
new file mode 100644
index 000000000000..b7c9971af992
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.0.2-destdir.patch
@@ -0,0 +1,18 @@
+--- Makefile.inc.in.orig 2012-06-20 09:08:48.000000000 +0200
++++ Makefile.inc.in 2012-06-20 09:10:23.000000000 +0200
+@@ -42,12 +42,12 @@
+ INSTALL = @INSTALL@
+ INSTALL_PROGRAM = @INSTALL_PROGRAM@
+ INSTALL_DATA = @INSTALL_DATA@
+-prefix = @prefix@
++prefix = $(DESTDIR)@prefix@
+ exec_prefix = @exec_prefix@
+ includedir = @includedir@
+ bindir = @bindir@
+-mandir = @mandir@
+-libdir = @libdir@
++mandir = $(DESTDIR)@mandir@
++libdir = $(DESTDIR)@libdir@
+
+ # http://www.gnu.org/s/hello/manual/autoconf/Changed-Directory-Variables.html
+ datarootdir = @datarootdir@
diff --git a/media-radio/unixcw/files/unixcw-3.0.2-parallel-make.patch b/media-radio/unixcw/files/unixcw-3.0.2-parallel-make.patch
new file mode 100644
index 000000000000..d59798aecbca
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.0.2-parallel-make.patch
@@ -0,0 +1,49 @@
+--- Makefile.orig 2012-06-20 09:32:17.000000000 +0200
++++ Makefile 2012-06-20 09:32:32.000000000 +0200
+@@ -34,15 +34,15 @@
+
+ # Targets that do nothing other than descend.
+ all install install-strip uninstall TAGS info dvi check:
+- $(DESCEND)
++ +$(DESCEND)
+
+ clean:
+- $(DESCEND)
++ +$(DESCEND)
+ rm -f Makefile.inc
+
+ # Targets that do just a little more than this.
+ distclean mostlyclean:
+- $(DESCEND)
++ +$(DESCEND)
+ rm -f $(DIST).tar $(DIST).tar.gz $(DIST).tgz
+ rm -f Makefile.inc src/config.h src/config.h.in~
+ rm -f config.status config.cache config.log
+--- src/Makefile.orig 2012-06-20 09:32:49.000000000 +0200
++++ src/Makefile 2012-06-20 09:33:17.000000000 +0200
+@@ -31,7 +31,7 @@
+
+ # All targets do nothing other than descend.
+ all install install-strip uninstall clean TAGS info dvi check:
+- $(DESCEND)
++ +$(DESCEND)
+
+ distclean mostlyclean maintainer-clean:
+- $(DESCEND)
++ +$(DESCEND)
+--- src/libcw/Makefile.orig 2012-06-20 09:33:30.000000000 +0200
++++ src/libcw/Makefile 2012-06-20 09:34:24.000000000 +0200
+@@ -62,11 +62,11 @@
+ libcw.3: libcw.3.m4 libcw.c
+ $(AWK) -f libdoc.awk <libcw.c | $(AWK) -f libsigs.awk >signatures
+ $(AWK) -f libdoc.awk <libcw.c | $(AWK) -f libfuncs.awk >functions
+- $(AWK) -f include.awk <libcw.3.m4 >libcw.3
++ $(AWK) -f include.awk <libcw.3.m4 >libcw.3
+ rm -f signatures functions
+
+ # Build the unit test.
+-libcwtest: libcwtest.o
++libcwtest: libcwtest.o libcw.a libcw.so.3.0.1
+ $(CC) -o libcwtest libcwtest.o -L. -lcw
+
+ # Build the pkgconfig metadata file.
diff --git a/media-radio/unixcw/files/unixcw-3.0.2-qt4.patch b/media-radio/unixcw/files/unixcw-3.0.2-qt4.patch
new file mode 100644
index 000000000000..e54bd54f0674
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.0.2-qt4.patch
@@ -0,0 +1,20 @@
+--- src/xcwcp/Makefile.orig 2012-06-21 07:49:59.000000000 +0200
++++ src/xcwcp/Makefile 2012-06-21 07:56:51.000000000 +0200
+@@ -18,7 +18,7 @@
+
+ include ../../Makefile.inc
+ CXX = $(AC_CXX)
+-CXXFLAGS= $(AC_CXXFLAGS) $(AC_DEFS) -I../libcw -I../cwutils -I$(AC_QT4INC) -I$(AC_QT4INC)/QtCore -I$(AC_QT4INC)/QtGui
++CXXFLAGS= $(AC_CXXFLAGS) $(AC_DEFS) -I../libcw -I../cwutils -I$(AC_QT4INC)
+ GZIP = $(AC_GZIP)
+
+ SHELL = /bin/sh
+@@ -28,7 +28,7 @@
+ moc_application.o
+
+ # Link to the shared libcw.
+-LIBS = -L../libcw -lcw -lQtGui -lQtCore
++LIBS = $(AC_QT4LIBS) -L../libcw -lcw -lQtGui -lQtCore
+
+ default: all
+
diff --git a/media-radio/unixcw/unixcw-3.0.2.ebuild b/media-radio/unixcw/unixcw-3.0.2.ebuild
new file mode 100644
index 000000000000..c46b6fbd0adb
--- /dev/null
+++ b/media-radio/unixcw/unixcw-3.0.2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/media-radio/unixcw/unixcw-3.0.2.ebuild,v 1.1 2012/06/21 06:11:00 tomjbe Exp $
+
+EAPI=4
+
+inherit autotools eutils flag-o-matic multilib
+
+DESCRIPTION="A package of programs that fit together to form a morse code tutor program."
+HOMEPAGE="http://unixcw.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE="ncurses suid qt4"
+
+RDEPEND="ncurses? ( sys-libs/ncurses )
+ qt4? ( x11-libs/qt-gui:4[qt3support] )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ !<=app-misc/cw-1.0.16-r1"
+
+src_prepare() {
+ append-cflags -std=gnu99
+ epatch \
+ "${FILESDIR}"/${P}-config.patch \
+ "${FILESDIR}"/${P}-destdir.patch \
+ "${FILESDIR}"/${P}-parallel-make.patch \
+ "${FILESDIR}"/${P}-qt4.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --libdir=/usr/$(get_libdir) \
+ $(use_enable ncurses) \
+ $(use_enable qt4)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ dodoc README
+ if ! use suid ; then
+ fperms 711 /usr/bin/cw
+ if use ncurses ; then
+ fperms 711 /usr/bin/cwcp
+ fi
+ if use qt4 ; then
+ fperms 711 /usr/bin/xcwcp
+ fi
+ fi
+}
+
+pkg_postinst() {
+ if use suid ; then
+ ewarn "You have choosen to install 'cw', 'cwcp' and 'xcwcp' setuid"
+ ewarn "by setting USE=suid."
+ ewarn "Be aware that this is a security risk and not recommended."
+ ewarn ""
+ ewarn "These files do only need root access if you want to use the"
+ ewarn "PC speaker for morse sidetone output. You can alternativly"
+ ewarn "drop USE=suid and use sudo."
+ else
+ elog "Be aware that 'cw', 'cwcp' and 'xcwcp' needs root access if"
+ elog "you want to use the PC speaker for morse sidetone output."
+ elog "You can call the programs via sudo for that (see 'man sudo')."
+ fi
+}