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
commit6155a5f077ba3e8a4091390b2815ad965c3e4182 (patch)
treedd894f30826cecbdd082e797ea697753d550680d /media-radio/unixcw
parentmarked x86 per bug 422009 (diff)
downloadgentoo-2-6155a5f077ba3e8a4091390b2815ad965c3e4182.tar.gz
gentoo-2-6155a5f077ba3e8a4091390b2815ad965c3e4182.tar.bz2
gentoo-2-6155a5f077ba3e8a4091390b2815ad965c3e4182.zip
Version bump
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Diffstat (limited to 'media-radio/unixcw')
-rw-r--r--media-radio/unixcw/ChangeLog9
-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
6 files changed, 346 insertions, 1 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/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
+}