diff options
author | Thomas Beierlein <tomjbe@gentoo.org> | 2010-09-12 10:07:31 +0000 |
---|---|---|
committer | Thomas Beierlein <tomjbe@gentoo.org> | 2010-09-12 10:07:31 +0000 |
commit | 4878900b647a76a000ba788abeb8d2f710902951 (patch) | |
tree | d2e2c52534a15a7ee981035a88ed6cdb806b6c65 /media-radio | |
parent | Add ree18. (diff) | |
download | historical-4878900b647a76a000ba788abeb8d2f710902951.tar.gz historical-4878900b647a76a000ba788abeb8d2f710902951.tar.bz2 historical-4878900b647a76a000ba788abeb8d2f710902951.zip |
Initial portage version, moved from sunrise. Bug #220027
Package-Manager: portage-2.1.8.3/cvs/Linux x86_64
Diffstat (limited to 'media-radio')
-rw-r--r-- | media-radio/unixcw/ChangeLog | 14 | ||||
-rw-r--r-- | media-radio/unixcw/Manifest | 13 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3--as-needed.patch | 16 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-audio.patch | 147 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-config.patch | 114 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-destdir.patch | 16 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-fPIC.patch | 60 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-gcc43.patch | 22 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-ldflags.patch | 41 | ||||
-rw-r--r-- | media-radio/unixcw/files/unixcw-2.3-parallel-make.patch | 39 | ||||
-rw-r--r-- | media-radio/unixcw/metadata.xml | 20 | ||||
-rw-r--r-- | media-radio/unixcw/unixcw-2.3-r6.ebuild | 73 |
12 files changed, 575 insertions, 0 deletions
diff --git a/media-radio/unixcw/ChangeLog b/media-radio/unixcw/ChangeLog new file mode 100644 index 000000000000..bb07df6a4eec --- /dev/null +++ b/media-radio/unixcw/ChangeLog @@ -0,0 +1,14 @@ +# ChangeLog for media-radio/unixcw +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/media-radio/unixcw/ChangeLog,v 1.1 2010/09/12 10:07:30 tomjbe Exp $ + +*unixcw-2.3-r6 (12 Sep 2010) + + 12 Sep 2010; Thomas Beierlein <tomjbe@gentoo.org> +unixcw-2.3-r6.ebuild, + +files/unixcw-2.3--as-needed.patch, +files/unixcw-2.3-audio.patch, + +files/unixcw-2.3-config.patch, +files/unixcw-2.3-destdir.patch, + +files/unixcw-2.3-fPIC.patch, +files/unixcw-2.3-gcc43.patch, + +files/unixcw-2.3-ldflags.patch, +files/unixcw-2.3-parallel-make.patch, + +metadata.xml: + Initial portage version, moved from sunrise. Bug #220027 + diff --git a/media-radio/unixcw/Manifest b/media-radio/unixcw/Manifest new file mode 100644 index 000000000000..9a2bc5fd95a3 --- /dev/null +++ b/media-radio/unixcw/Manifest @@ -0,0 +1,13 @@ +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 +AUX unixcw-2.3-destdir.patch 480 RMD160 40579e2f3ff874cfd98ca18f2956451e4a197e5a SHA1 926ff70e9067f74c14919b7519b7b99579d51534 SHA256 ba6c84abcaebe9c16cdac636626bbd3c74a7afc6d115985767377878c13ca64c +AUX unixcw-2.3-fPIC.patch 1866 RMD160 fd3dcaa906a308d15baa738dca5f01e3767cd6dd SHA1 c5ad38457125086d56526de28022ca68c9350dbd SHA256 2cd8aa8759df1c40742c57f5e65c2a9093c587e83345e01a26ac8f46c5953053 +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 +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 +EBUILD unixcw-2.3-r6.ebuild 2184 RMD160 fc92acb8c8294b8d90ae11521cf20927de75d8a9 SHA1 c952eb6c6221769163b507d7f2907f2894244108 SHA256 02e042b68f60374eff216a75a7faa0505d2750b577bc5fe827a85a680f66f145 +MISC ChangeLog 664 RMD160 d2cc862253a6aec78a9c395f078998ed0c1ff4fc SHA1 a8d62458c153fbe1958159788a9a996c09c4f04d SHA256 161c3cb895c175198e86dc43a1881867a262ce5a066198e3401b5e082661e522 +MISC metadata.xml 806 RMD160 873690ce50c12af383a8688183e805a116485723 SHA1 5a1962794fdd89a22dd0ebdb2295a41162341929 SHA256 4eabac88ab5a9eaf764aca9a2494fe6b085d8f3d598e77e95d67594f4d18de88 diff --git a/media-radio/unixcw/files/unixcw-2.3--as-needed.patch b/media-radio/unixcw/files/unixcw-2.3--as-needed.patch new file mode 100644 index 000000000000..ae96329b85e3 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3--as-needed.patch @@ -0,0 +1,16 @@ +--- src/cwlib/Makefile.orig 2009-07-21 06:34:13.000000000 +0000 ++++ src/cwlib/Makefile 2009-07-21 06:34:39.000000000 +0000 +@@ -43,11 +43,11 @@ + libcw.so.0.0.0: cwlib.o + if [ "$(CC_LINKS_SO)" = "yes" ]; then \ + $(CC) -shared -Wl,-soname,libcw.so.0 \ +- -o libcw.so.0.0.0 cwlib.o; \ ++ -o libcw.so.0.0.0 cwlib.o -lm; \ + else \ + if [ "$(LD_LINKS_SO)" = "yes" ]; then \ + $(LD) -G -Wl,-soname,libcw.so.0 \ +- -o libcw.so.0.0.0 cwlib.o; \ ++ -o libcw.so.0.0.0 cwlib.o -lm; \ + fi \ + fi + diff --git a/media-radio/unixcw/files/unixcw-2.3-audio.patch b/media-radio/unixcw/files/unixcw-2.3-audio.patch new file mode 100644 index 000000000000..944cd91ccdc6 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-audio.patch @@ -0,0 +1,147 @@ +diff -ur unixcw-2.3.orig/src/cw/cw.c unixcw-2.3/src/cw/cw.c +--- unixcw-2.3.orig/src/cw/cw.c 2006-06-18 23:58:46.000000000 +0200 ++++ unixcw-2.3/src/cw/cw.c 2010-02-03 14:46:58.000000000 +0100 +@@ -922,5 +922,9 @@ + + /* Await final tone completion before exiting. */ + cw_wait_for_tone_queue (); ++ ++ /* Reset to ensure that the mixer volume gets restored. */ ++ cw_complete_reset(); ++ + return EXIT_SUCCESS; + } +Only in unixcw-2.3/src/cw: cw.o +Only in unixcw-2.3/src/cwcp: cwcp +diff -ur unixcw-2.3.orig/src/cwcp/cwcp.c unixcw-2.3/src/cwcp/cwcp.c +--- unixcw-2.3.orig/src/cwcp/cwcp.c 2006-06-22 05:50:05.000000000 +0200 ++++ unixcw-2.3/src/cwcp/cwcp.c 2010-02-03 14:48:31.000000000 +0100 +@@ -1625,6 +1625,9 @@ + /* Attempt to wrestle the screen back from curses. */ + interface_destroy (); + ++ /* Reset to ensure that the mixer volumes gets restored */ ++ cw_complete_reset(); ++ + /* Show the signal caught, and exit. */ + fprintf (stderr, _("\nCaught signal %d, exiting...\n"), signal_number); + exit (EXIT_SUCCESS); +@@ -1685,5 +1688,9 @@ + /* Clean up and return. */ + interface_destroy (); + cw_wait_for_tone_queue (); ++ ++ /* Reset to ensure that the mixer volumes gets restored */ ++ cw_complete_reset(); ++ + return EXIT_SUCCESS; + } +diff -ur unixcw-2.3.orig/src/cwlib/cwlib.c unixcw-2.3/src/cwlib/cwlib.c +--- unixcw-2.3.orig/src/cwlib/cwlib.c 2006-06-23 03:54:01.000000000 +0200 ++++ unixcw-2.3/src/cwlib/cwlib.c 2010-02-04 19:36:32.000000000 +0100 +@@ -2138,12 +2138,33 @@ + { + int read_volume, mixer, device_mask; + +- /* Try to use the main /dev/audio device for ioctls first. */ +- if (ioctl (cw_sound_descriptor, +- MIXER_READ (SOUND_MIXER_PCM), &read_volume) == 0) ++ /* Try to use the main /dev/audio device for ioctls first. ++ * Check the available mixer channels for the audio file. ++ */ ++ if (ioctl (cw_sound_descriptor, SOUND_MIXER_READ_DEVMASK, &device_mask) != -1) + { +- *volume = read_volume; +- return RC_SUCCESS; ++ /* Could read device_mask, so check availabel channels */ ++ if (device_mask & SOUND_MASK_PCM) ++ /* First try PCM channel, ... */ ++ { ++ if (ioctl (cw_sound_descriptor, ++ MIXER_READ (SOUND_MIXER_PCM), &read_volume) == 0) ++ { ++ *volume = read_volume; ++ return RC_SUCCESS; ++ } ++ } ++ ++ if (device_mask & SOUND_MASK_VOLUME) ++ /* then master volume */ ++ { ++ if (ioctl (cw_sound_descriptor, ++ MIXER_READ (SOUND_MIXER_VOLUME), &read_volume) == 0) ++ { ++ *volume = read_volume; ++ return RC_SUCCESS; ++ } ++ } + } + + /* Volume not found; try the mixer PCM channel volume instead. */ +@@ -2215,13 +2236,35 @@ + cw_set_sound_pcm_volume_internal (int volume) + { + int mixer, device_mask; ++ /* Try the mixer PCM channel volume instead. */ ++ /* Try to use the main /dev/audio device for ioctls first. ++ * Check the available mixer channels for the audio file. ++ */ ++ if (ioctl (cw_sound_descriptor, SOUND_MIXER_READ_DEVMASK, &device_mask) != -1) ++ { ++ /* Could read device_mask, so check availabel channels */ ++ if (device_mask & SOUND_MASK_PCM) ++ /* First try PCM channel, ... */ ++ { ++ if (ioctl (cw_sound_descriptor, ++ MIXER_WRITE (SOUND_MIXER_PCM), &volume) == 0) ++ { ++ return RC_SUCCESS; ++ } ++ } ++ ++ if (device_mask & SOUND_MASK_VOLUME) ++ /* then master volume */ ++ { ++ if (ioctl (cw_sound_descriptor, ++ MIXER_WRITE (SOUND_MIXER_VOLUME), &volume) == 0) ++ { ++ return RC_SUCCESS; ++ } ++ } ++ } + +- /* Try to use the main /dev/audio device for ioctls first. */ +- if (ioctl (cw_sound_descriptor, +- MIXER_WRITE (SOUND_MIXER_PCM), &volume) == 0) +- return RC_SUCCESS; + +- /* Try the mixer PCM channel volume instead. */ + mixer = open (cw_mixer_device, O_RDWR | O_NONBLOCK); + if (mixer == -1) + { +diff -ur unixcw-2.3.orig/src/xcwcp/application.cc unixcw-2.3/src/xcwcp/application.cc +--- unixcw-2.3.orig/src/xcwcp/application.cc 2006-06-22 08:22:36.000000000 +0200 ++++ unixcw-2.3/src/xcwcp/application.cc 2010-02-09 14:12:24.000000000 +0100 +@@ -498,6 +498,9 @@ + + // Done with the CW library sender for now. + cwlib_user_application_instance = NULL; ++ ++ /* Reset to ensure that the mixer volumes gets restored */ ++ cw_complete_reset(); + + file_menu_->setItemEnabled (file_start_id_, true); + file_menu_->setItemEnabled (file_stop_id_, false); +diff -ur unixcw-2.3.orig/src/xcwcp/main.cc unixcw-2.3/src/xcwcp/main.cc +--- unixcw-2.3.orig/src/xcwcp/main.cc 2006-06-18 23:39:34.000000000 +0200 ++++ unixcw-2.3/src/xcwcp/main.cc 2010-02-09 14:06:17.000000000 +0100 +@@ -370,6 +370,9 @@ + void + signal_handler (int signal_number) + { ++ /* Reset to ensure that the mixer volumes gets restored */ ++ cw_complete_reset(); ++ + std::clog << _("Caught signal ") << signal_number + << _(", exiting...") << std::endl; + exit (EXIT_SUCCESS); diff --git a/media-radio/unixcw/files/unixcw-2.3-config.patch b/media-radio/unixcw/files/unixcw-2.3-config.patch new file mode 100644 index 000000000000..81dce4f082c7 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-config.patch @@ -0,0 +1,114 @@ +--- configure.ac.orig 2010-01-27 20:00:28.000000000 +0100 ++++ configure.ac 2010-01-27 20:05:41.000000000 +0100 +@@ -46,8 +46,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 + + # Checks for header files, and refuse to go on if no KIOCSOUND is available. + AC_HEADER_STDC +@@ -92,49 +108,40 @@ + # Decide on which subdirectories to build; substitute into SUBDIRS. Build + # cwcp if curses is available, and xcwcp if Qt is available. + SUBDIRS="cwlib 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 + +-# Look for $QTDIR. If found, then look for moc, either on $PATH, or +-# in $QTDIR/bin. +-MOC_EARLIEST=3 +-if test -n "$QTDIR" ; then +- AC_PATH_PROG(QTMOC, moc, , $QTDIR/bin:$PATH) +- if test -n "$QTMOC" ; then +- MOC_VERSION="`$QTMOC -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_EARLIEST ; then +- SUBDIRS="$SUBDIRS xcwcp" +- AC_SUBST(QTDIR) +- AC_SUBST(QTMOC) +- else +- AC_MSG_WARN([Found 'moc' $MOC_VERSION - unable to build xcwcp]) +- AC_MSG_WARN([Hint: xcwcp requires 'moc' version >= $MOC_EARLIEST]) +- fi +- else +- AC_MSG_WARN([Cannot find 'moc' version - unable to build xcwcp]) +- AC_MSG_WARN([Hint: ensure 'moc' is in QTDIR/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 QTDIR/bin on your PATH]) +- fi +- else +- AC_MSG_WARN([Cannot find 'moc' - unable to build xcwcp]) +- AC_MSG_WARN([Hint: ensure 'moc' is in QTDIR/bin on your PATH]) +- fi ++if test "$enable_qt4" = 'yes'; then ++ dnl Look for Qt4 libs ++ PKG_CHECK_MODULES([QT4], ["QtCore QtGui Qt3Support"], [ ++ AC_SUBST(QT4_CFLAGS) ++ AC_SUBST(QT4_LIBS) ++ ], [ ++ AC_MSG_ERROR([Qt4 libs not found]) ++ ]) ++ dnl Look for moc, either on $PATH or in $QTDIR/bin ++ AC_PATH_PROG(QTMOC, moc, , $PATH:$QTDIR/bin) ++ if test -n "$QTMOC" ; 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 + else +- AC_MSG_WARN([Cannot find libqt - unable to build xcwcp]) +- AC_MSG_WARN([Hint: try setting a value for the QTDIR variable]) ++ AC_DEFINE([WANT_QT4], 0, [No Qt4]) ++ echo "disabling Qt4 support" + fi ++ + AC_SUBST(SUBDIRS) + + # Add -Wall, -W, -pedantic, and other paranoia to gcc command flags, and -Wall +--- Makefile.inc.in.orig 2010-01-27 20:11:31.000000000 +0100 ++++ Makefile.inc.in 2010-01-27 20:10:28.000000000 +0100 +@@ -37,7 +37,8 @@ + AC_LD_LINKS_SO = @LD_LINKS_SO@ + AC_LD = @LD@ + AC_LN_S = @LN_S@ +- ++AC_QT4_LIBS = @QT4_LIBS@ ++AC_QT4_CFLAGS = @QT4_CFLAGS@ + # Portability values. + INSTALL = @INSTALL@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ diff --git a/media-radio/unixcw/files/unixcw-2.3-destdir.patch b/media-radio/unixcw/files/unixcw-2.3-destdir.patch new file mode 100644 index 000000000000..195b66505fe5 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-destdir.patch @@ -0,0 +1,16 @@ +--- Makefile.inc.in.org 2008-05-01 09:49:18.000000000 +0200 ++++ Makefile.inc.in 2008-05-01 09:49:40.000000000 +0200 +@@ -42,9 +42,10 @@ + 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@ ++mandir = $(DESTDIR)@mandir@ +-libdir = @libdir@ ++libdir = $(DESTDIR)@libdir@ ++datarootdir = @datarootdir@ diff --git a/media-radio/unixcw/files/unixcw-2.3-fPIC.patch b/media-radio/unixcw/files/unixcw-2.3-fPIC.patch new file mode 100644 index 000000000000..67e68bfec590 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-fPIC.patch @@ -0,0 +1,60 @@ +--- configure.ac.orig 2009-09-08 22:27:33.000000000 +0200 ++++ configure.ac 2009-09-08 22:28:14.000000000 +0200 +@@ -212,7 +212,7 @@ + cat >conftest.c <<-EOF + int so_test() { return 0; } + EOF +- $CC -c conftest.c >/dev/null 2>/dev/null ++ $CC $CFLAG_PIC -c conftest.c >/dev/null 2>/dev/null + $CC -shared -o conftest.so conftest.o >/dev/null 2>/dev/null + rm -f conftest.c conftest.o + if test -f conftest.so ; then +@@ -239,7 +239,7 @@ + cat >conftest.c <<-EOF + int so_test() { return 0; } + EOF +- $CC -c conftest.c >/dev/null 2>/dev/null ++ $CC $CFLAG_PIC -c conftest.c >/dev/null 2>/dev/null + $LD -G -o conftest.so conftest.o >/dev/null 2>/dev/null + rm -f conftest.c conftest.o + if test -f conftest.so ; then +--- src/cwlib/Makefile.orig 2009-09-08 22:53:31.000000000 +0200 ++++ src/cwlib/Makefile 2009-09-08 22:59:31.000000000 +0200 +@@ -19,7 +19,8 @@ + + include ../../Makefile.inc + CC = $(AC_CC) +-CFLAGS = $(AC_CFLAGS) $(AC_CFLAG_PIC) $(AC_DEFS) ++CFLAGS = $(AC_CFLAGS) $(AC_DEFS) ++CFLAGS_SL = $(AC_CFLAGS) $(AC_CFLAG_PIC) $(AC_DEFS) + AWK = $(AC_AWK) + RANLIB = $(AC_RANLIB) + LD = $(AC_LD) +@@ -40,14 +41,14 @@ + rm -f libcw.a; ar -cr libcw.a cwlib.o + $(RANLIB) libcw.a + +-libcw.so.0.0.0: cwlib.o ++libcw.so.0.0.0: cwlib_sl.o + if [ "$(CC_LINKS_SO)" = "yes" ]; then \ + $(CC) $(LDFLAGS) -shared -Wl,-soname,libcw.so.0 \ +- -o libcw.so.0.0.0 cwlib.o -lm; \ ++ -o libcw.so.0.0.0 cwlib_sl.o -lm; \ + else \ + if [ "$(LD_LINKS_SO)" = "yes" ]; then \ + $(LD) $(LDFLAGS) -G -Wl,-soname,libcw.so.0 \ +- -o libcw.so.0.0.0 cwlib.o -lm; \ ++ -o libcw.so.0.0.0 cwlib_sl.o -lm; \ + fi \ + fi + +@@ -78,6 +79,9 @@ + # Define dependencies related to header/include files. + cwlib.o: Makefile cwlib.h + ++cwlib_sl.o: Makefile cwlib.h ++ $(CC) $(CFLAGS_SL) -c -o cwlib_sl.o cwlib.c ++ + cwlibtest.o: Makefile cwlib.h + + # Install targets. diff --git a/media-radio/unixcw/files/unixcw-2.3-gcc43.patch b/media-radio/unixcw/files/unixcw-2.3-gcc43.patch new file mode 100644 index 000000000000..85c31e08f4e9 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-gcc43.patch @@ -0,0 +1,22 @@ +diff -u src/xcwcp.orig/receiver.cc src/xcwcp/receiver.cc +--- src/xcwcp.orig/receiver.cc 2010-08-30 19:35:45.000000000 +0200 ++++ src/xcwcp/receiver.cc 2010-08-30 19:36:05.000000000 +0200 +@@ -19,6 +19,7 @@ + + #include "../config.h" + ++#include <cstdio> + #include <cstdlib> + #include <cerrno> + #include <string> +diff -u src/xcwcp.orig/sender.cc src/xcwcp/sender.cc +--- src/xcwcp.orig/sender.cc 2010-08-30 19:35:45.000000000 +0200 ++++ src/xcwcp/sender.cc 2010-08-30 19:36:22.000000000 +0200 +@@ -19,6 +19,7 @@ + + #include "../config.h" + ++#include <cstdio> + #include <cstdlib> + #include <string> + #include <deque> diff --git a/media-radio/unixcw/files/unixcw-2.3-ldflags.patch b/media-radio/unixcw/files/unixcw-2.3-ldflags.patch new file mode 100644 index 000000000000..bbd1c7402dbb --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-ldflags.patch @@ -0,0 +1,41 @@ +diff -u -r src.orig/cw/Makefile src/cw/Makefile +--- src.orig/cw/Makefile 2009-07-21 15:08:34.000000000 +0200 ++++ src/cw/Makefile 2009-07-21 15:09:16.000000000 +0200 +@@ -34,7 +34,7 @@ + cw.o: cw.c ../cwlib/cwlib.h + + cw: cw.o +- $(CC) -o $@ cw.o ../cwutils/i18n.o ../cwutils/cmdline.o \ ++ $(CC) $(LDFLAGS) -o $@ cw.o ../cwutils/i18n.o ../cwutils/cmdline.o \ + ../cwutils/memory.o $(LIBS) -lm + + # Install targets. +diff -u -r src.orig/cwgen/Makefile src/cwgen/Makefile +--- src.orig/cwgen/Makefile 2009-07-21 15:08:34.000000000 +0200 ++++ src/cwgen/Makefile 2009-07-21 15:09:34.000000000 +0200 +@@ -32,7 +32,7 @@ + cwgen.o: cwgen.c + + cwgen: cwgen.o +- $(CC) -o $@ cwgen.o ../cwutils/i18n.o ../cwutils/cmdline.o \ ++ $(CC) $(LDFLAGS) -o $@ cwgen.o ../cwutils/i18n.o ../cwutils/cmdline.o \ + ../cwutils/memory.o + + # Install targets. +diff -u -r src.orig/cwlib/Makefile src/cwlib/Makefile +--- src.orig/cwlib/Makefile 2009-07-21 15:14:58.000000000 +0200 ++++ src/cwlib/Makefile 2009-07-21 15:15:25.000000000 +0200 +@@ -42,11 +42,11 @@ + + libcw.so.0.0.0: cwlib.o + if [ "$(CC_LINKS_SO)" = "yes" ]; then \ +- $(CC) -shared -Wl,-soname,libcw.so.0 \ ++ $(CC) $(LDFLAGS) -shared -Wl,-soname,libcw.so.0 \ + -o libcw.so.0.0.0 cwlib.o -lm; \ + else \ + if [ "$(LD_LINKS_SO)" = "yes" ]; then \ +- $(LD) -G -Wl,-soname,libcw.so.0 \ ++ $(LD) $(LDFLAGS) -G -Wl,-soname,libcw.so.0 \ + -o libcw.so.0.0.0 cwlib.o -lm; \ + fi \ + fi diff --git a/media-radio/unixcw/files/unixcw-2.3-parallel-make.patch b/media-radio/unixcw/files/unixcw-2.3-parallel-make.patch new file mode 100644 index 000000000000..555c85406d58 --- /dev/null +++ b/media-radio/unixcw/files/unixcw-2.3-parallel-make.patch @@ -0,0 +1,39 @@ +--- Makefile.orig 2009-07-20 19:35:23.000000000 +0200 ++++ Makefile 2009-07-20 19:35:31.000000000 +0200 +@@ -35,11 +35,11 @@ + + # Targets that do nothing other than descend. + all install install-strip uninstall clean TAGS info dvi check: +- $(DESCEND) ++ +$(DESCEND) + + # 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 2009-07-20 19:34:45.000000000 +0200 ++++ src/Makefile 2009-07-20 19:34:56.000000000 +0200 +@@ -33,7 +33,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/cwlib/Makefile.orig 2009-09-08 14:07:37.000000000 +0200 ++++ src/cwlib/Makefile 2009-09-08 14:10:05.000000000 +0200 +@@ -65,7 +65,7 @@ + rm -f signatures functions + + # Build the unit test. +-cwlibtest: cwlibtest.o ++cwlibtest: cwlibtest.o libcw.a libcw.so.0.0.0 + $(CC) -o cwlibtest cwlibtest.o -L. -lcw -lm + + # Build the pkgconfig metadata file. diff --git a/media-radio/unixcw/metadata.xml b/media-radio/unixcw/metadata.xml new file mode 100644 index 000000000000..07b6d573045a --- /dev/null +++ b/media-radio/unixcw/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>no-herd</herd> + <maintainer> + <email>tomjbe@gentoo.org</email> + <name>Thomas Beierlein</name> + </maintainer> + <longdescription>unixcw is package of libraries and programs that fit + together to form a morse code tutor program. It provides the general + purpose 'libcw' library with functions to generate Morse code + characters and a frontend program 'cw' to convert text strings to + morse code output via soundcard or console speaker. It further provides + a set of Morse Code tutor programs (see USE flag description). + </longdescription> + <use> + <flag name='ncurses'>Enables building the curses based morse code tutor + program 'cwcp'.</flag> + </use> +</pkgmetadata> diff --git a/media-radio/unixcw/unixcw-2.3-r6.ebuild b/media-radio/unixcw/unixcw-2.3-r6.ebuild new file mode 100644 index 000000000000..da094f7347ca --- /dev/null +++ b/media-radio/unixcw/unixcw-2.3-r6.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-radio/unixcw/unixcw-2.3-r6.ebuild,v 1.1 2010/09/12 10:07:30 tomjbe Exp $ + +EAPI=2 + +inherit autotools eutils multilib + +DESCRIPTION="A package of programs that fit together to form a morse code tutor program." +HOMEPAGE="http://radio.linux.org.au/?sectpat=morse" +SRC_URI="ftp://metalab.unc.edu/pub/Linux/apps/ham/morse/${P}.tgz + qt4? ( mirror://gentoo/unixcw-2.3-qt3to4.patch.gz )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="ncurses suid qt4" + +RDEPEND="ncurses? ( sys-libs/ncurses ) + qt4? ( x11-libs/qt-gui:4[qt3support] )" +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +src_prepare() { + epatch "${FILESDIR}"/${P}-destdir.patch \ + "${FILESDIR}"/${P}-config.patch \ + "${FILESDIR}"/${P}-parallel-make.patch \ + "${FILESDIR}"/${P}--as-needed.patch \ + "${FILESDIR}"/${P}-ldflags.patch \ + "${FILESDIR}"/${P}-fPIC.patch \ + "${FILESDIR}"/${P}-audio.patch \ + "${FILESDIR}"/${P}-gcc43.patch + if use qt4 ; then + epatch "${DISTDIR}"/${P}-qt3to4.patch.gz + fi + eautoreconf +} + +src_configure() { + econf --libdir=/usr/$(get_libdir) \ + $(use_enable ncurses) \ + $(use_enable qt4) +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + dodoc README || die "dodoc failed" + if ! use suid ; then + fperms 711 /usr/bin/cw || die "fperms failed" + if use ncurses ; then + fperms 711 /usr/bin/cwcp || die "fperms failed" + fi + if use qt4 ; then + fperms 711 /usr/bin/xcwcp || die "fperms failed" + 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 +} |