summaryrefslogtreecommitdiff
path: root/media-radio/unixcw
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /media-radio/unixcw
reinit the tree, so we can have metadata
Diffstat (limited to 'media-radio/unixcw')
-rw-r--r--media-radio/unixcw/Manifest6
-rw-r--r--media-radio/unixcw/files/unixcw-3.5-tinfo.patch30
-rw-r--r--media-radio/unixcw/metadata.xml22
-rw-r--r--media-radio/unixcw/unixcw-3.5.1.ebuild72
4 files changed, 130 insertions, 0 deletions
diff --git a/media-radio/unixcw/Manifest b/media-radio/unixcw/Manifest
new file mode 100644
index 000000000000..7f80d500d52b
--- /dev/null
+++ b/media-radio/unixcw/Manifest
@@ -0,0 +1,6 @@
+AUX unixcw-3.5-tinfo.patch 1212 SHA256 4bcfb7c7c9e25b8e7d7e2e1ca7ec595517857d451c0dbe946366f3ed15dc364c SHA512 370f2bd601546dd5043dedf1387783c425d15d0c52a8f357c4bb1bb9eb0ebb8b54bb4afd79db14314603bf23838568041c590c830622017bc05bd9bfd97baf6f WHIRLPOOL 3f70bc7302839c53756fe398dcab50451c129ee1b8caf620da1d73163ee47dcf1502c58dc6733bcdd3751e57f57474149be0b6095901307612c293955e981cc2
+DIST unixcw-3.5.1.tar.gz 740331 SHA256 63b6253e29083e1e27c65150f580792aab912c989ae2d47c6df16e80cc79e07e SHA512 b59499723d810a537a2f5ab2b4b34c83a1c8c815af82a60ba29f4d9cee445525e530136f4e202db6b87305ac7a818fa6e59214a45c6bffce299eb50b58c866e1 WHIRLPOOL d9ff9ea9548852c68f6948e4aa630cb58ae8487161723361644c4f7b93708123ca2e82e6860be33156ae15db482a6fc7eb6ae81792783f6f47c7e2ff08d05be6
+EBUILD unixcw-3.5.1.ebuild 1879 SHA256 57be5e9983305daa2e7ea8d2e328e96454d9c86d5a6c8d7c129a455a2b3e0cb2 SHA512 8f70b8d3419815b488efa8f9fcaacd4282295dc0a25c5a0c4f3cc088b96612d0de28787299681aff248168b7e35ef9cb294a82655616a6c87e47da37620bbeeb WHIRLPOOL aae2c9920de2aa61b8ed2fb87d0048cd0d664d3d5a1a3760bff8977b6695e6285785140b412e71d8a569348f68a759a198ab5356e7747417085664d7b45cf708
+MISC ChangeLog 4442 SHA256 661b5f7964e0f7ec6d6c6aa593db30b2b56ebf6dfbfc7695166dc80183fbfd16 SHA512 56a44eee4f860f93e7ded51f87a5b7e1f1cc98e9311b31763483c237eae7d679b390fea10ec7f48f7976fa95da9c32f1015b8dd12fef70a19b17b1789c880419 WHIRLPOOL cb3664808d8ca390670ec2d8748abbd311392f27dfe6efa7a62e78ec34604b5008d3a8026f863986408593e9fac5af0209dacdef9533ec808ff8f921952f4a51
+MISC ChangeLog-2015 5105 SHA256 c230a4ec594dca4042f629ae9b21674acc02a9c73aae488fe0e40db73c46f30d SHA512 86f4c515bac7ec69f73f92792a4d5ffde646a48fe2bc935f2de3a099eecabfb10c69c5cea63cb799107eff69eb1066e432180117b059c013dfbf3f2fbfe09fd7 WHIRLPOOL c65a9cc98b059e7eac85df667f600410a8877c2b57e22ac8a62d77db6c8d23848fd67b0c09cd7f9fc9956749d91bd70d92292307a341cbae170ec63fe5b2fbd4
+MISC metadata.xml 874 SHA256 8d52f29fbbee1cf7d6c53809c1e1d7bc3c92923a528b18dd637a761fed502929 SHA512 b4040ecf973492b76642e7df2e2fa41b6cf057490a1674e4246479b084e5a3972d109eb203337c0053c2d6924a3b2597ee42684ffb4431c8147e90d5a208247e WHIRLPOOL 1233076a5215250693c73734106d0eac0dad1d00b3ae7fa90ee9c189562283d6dd670abe5186aca0a0df6804cb0f3e6cb52ee19affffdc6c8bdfcd8834caecec
diff --git a/media-radio/unixcw/files/unixcw-3.5-tinfo.patch b/media-radio/unixcw/files/unixcw-3.5-tinfo.patch
new file mode 100644
index 000000000000..af85350e7ae3
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.5-tinfo.patch
@@ -0,0 +1,30 @@
+--- configure.ac.old 2017-03-07 13:31:46.074580930 +0100
++++ configure.ac 2017-03-07 13:33:25.640924331 +0100
+@@ -347,7 +347,7 @@
+ AC_DEFINE([LIBCW_WITH_PULSEAUDIO], [1], [Define as 1 if your build machine can support PulseAudio.])
+ fi
+
+-
++PKG_PROG_PKG_CONFIG
+
+ if test "$enable_cwcp" = "no" ; then
+ WITH_CWCP='no'
+@@ -355,6 +355,7 @@
+ AC_CHECK_LIB(curses, initscr)
+ if test $ac_cv_lib_curses_initscr = 'yes' ; then
+ WITH_CWCP='yes'
++ PKG_CHECK_MODULES(ncurses, ncurses, [NCURSES_LIB="$ncurses_LIBS"], )
+ else
+ WITH_CWCP='no'
+ AC_MSG_WARN([Cannot find libcurses - unable to build cwcp])
+--- src/cwcp/Makefile.am.old 2017-03-07 13:30:10.813167002 +0100
++++ src/cwcp/Makefile.am 2017-03-07 13:30:28.950864931 +0100
+@@ -26,7 +26,7 @@
+ # target-specific preprocessor flags (#defs and include dirs)
+ #cwcp_CPPFLAGS = -I$(top_srcdir)/src/cwutils/ -I$(top_srcdir)/src/libcw/
+ # target-specific linker flags (objects to link)
+-cwcp_LDADD = -lcurses -L$(top_builddir)/src/libcw/.libs -lcw $(top_builddir)/src/cwutils/lib_cwcp.a
++cwcp_LDADD = $(ncurses_LIBS) -L$(top_builddir)/src/libcw/.libs -lcw $(top_builddir)/src/cwutils/lib_cwcp.a
+
+
+ # copy man page to proper directory during installation
diff --git a/media-radio/unixcw/metadata.xml b/media-radio/unixcw/metadata.xml
new file mode 100644
index 000000000000..20440462de65
--- /dev/null
+++ b/media-radio/unixcw/metadata.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <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>
+ <upstream>
+ <remote-id type="sourceforge">unixcw</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/media-radio/unixcw/unixcw-3.5.1.ebuild b/media-radio/unixcw/unixcw-3.5.1.ebuild
new file mode 100644
index 000000000000..a57629b21d91
--- /dev/null
+++ b/media-radio/unixcw/unixcw-3.5.1.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+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="alsa ncurses pulseaudio suid qt5"
+
+RDEPEND="ncurses? ( sys-libs/ncurses:= )
+ qt5? ( dev-qt/qtcore:5
+ dev-qt/qtgui:5
+ dev-qt/qtwidgets:5 )
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-sound/pulseaudio )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ sys-devel/libtool
+ !<=app-misc/cw-1.0.16-r1"
+
+src_prepare() {
+ append-cflags -std=gnu11
+ append-cxxflags -std=gnu++11
+ epatch "${FILESDIR}"/$PN-3.5-tinfo.patch
+ eautoreconf
+}
+
+src_configure() {
+ econf --libdir=/usr/$(get_libdir) \
+ $(use_enable pulseaudio ) \
+ $(use_enable alsa ) \
+ $(use_enable ncurses cwcp ) \
+ $(use_enable qt5 xcwcp )
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+ prune_libtool_files
+ dodoc ChangeLog NEWS README
+ if ! use suid ; then
+ fperms 711 /usr/bin/cw
+ if use ncurses ; then
+ fperms 711 /usr/bin/cwcp
+ fi
+ if use qt5 ; 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
+}