summaryrefslogtreecommitdiff
path: root/media-radio/unixcw
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-02-05 00:10:56 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-02-05 00:10:56 +0000
commite019d91362a4788fe5cc5788877327b813d0f730 (patch)
tree3b07473f90bd93324ac2611a07dfb3223edfaf59 /media-radio/unixcw
parent908e97e3e242743e9484f67c6f131955e6d0dadd (diff)
gentoo auto-resync : 05:02:2025 - 00:10:55
Diffstat (limited to 'media-radio/unixcw')
-rw-r--r--media-radio/unixcw/Manifest3
-rw-r--r--media-radio/unixcw/files/unixcw-3.6.1-qt6-build.patch116
-rw-r--r--media-radio/unixcw/files/unixcw-3.6.1-qt6-src.patch44
-rw-r--r--media-radio/unixcw/unixcw-3.6.1-r1.ebuild78
4 files changed, 241 insertions, 0 deletions
diff --git a/media-radio/unixcw/Manifest b/media-radio/unixcw/Manifest
index c006e361b7a3..f4afb906d52a 100644
--- a/media-radio/unixcw/Manifest
+++ b/media-radio/unixcw/Manifest
@@ -1,4 +1,7 @@
AUX unixcw-3.6-tinfo.patch 1226 BLAKE2B 139f81ffeec979517523c72ca1724ad280976160f4857640913a0e4a85595ca01e1a08b2043520fe7099974f5b8ca63812c851146b4c447b9325d43c58e9abd8 SHA512 8a4e217118a5bce1b87d7f2ab2a57ba43903da82f03bcc467dcec37a8cb673f576e778ddec1a26ed4a3edd151f75f1728dcfc01565d9c7134e360908e0bcc413
+AUX unixcw-3.6.1-qt6-build.patch 4798 BLAKE2B 98f4e88b6dee71befa5c92d5439b1244fd72e88e6a49f216512a68d3d12fc2b1d851c47f1f8275e45de5c72d286ed55e59d124d5d93dab35aa36da8117bac6d3 SHA512 febaf450fe31aff33b47cf2b766e6dcf2f96b9006b414178320351342fa18993789018ff8837af1547fba04beb56c4406d39a797873ca158250ad315fa878541
+AUX unixcw-3.6.1-qt6-src.patch 1572 BLAKE2B 59051094719107f8a283edf7c1713f45d6899981f3fef6f3f12b17c96a5b8156c7b7ee46950f6b2babc45cddc58d2b7c4ef07c84c7e31eb2051b0524f31b7068 SHA512 515e450eebee03004d6299dd67d8036ecc620c4929300baef628313243366da7b4e7bd63584fd7adc43eddfee2b07e31868622156e188dd53f80d88e6f82895c
DIST unixcw-3.6.1.tar.gz 975795 BLAKE2B 5bc7822d216bef2ac452593c0e9dc537f2dfcd31f446c8795abc76d1d2ccfd4010a3b95982bc404ddc4c974456177e9f54bdefc169a14110bb503fd539025b07 SHA512 d91457b9b2247ce2be75773e2c37ca8b69c75c42c187ddfac5a9a8f4c9ad16acae3e4b0223e885bf7ae9c7201869581becd444f32c375ac521d2a712b7ddfb69
+EBUILD unixcw-3.6.1-r1.ebuild 2090 BLAKE2B 17c38d598588c4d2ee2dbf8a71a1ee64da0933a2f157f99883354808045043c66ab86d4d677a1debcf0f3c94823d92f6b00674ba627025c050a8dffb6249a6c0 SHA512 7b31d263208500c5c0970b3f664a0336c1526415662ff9e73610fee9548945f31e08190ca4935e801e77afa6308bb9cb5d73dfd99dcb828e642fea5638c811be
EBUILD unixcw-3.6.1.ebuild 2061 BLAKE2B d1deacbae68158252741ff59fc4cd9ec3b419366030c2817f18d8a39b22d0d26db5afd3a9626802e3dd920b7d5aa7d5eacb431b8c0436bce779a04807a61c5c4 SHA512 c50d9686a0e550cd6c0d6323476b534bb70e305161e467ad6d489c7b33edd9a33b7c02a445b7dd130faa5662f27eeea63e5951057f5e79a4bcdd1f2c45e4f465
MISC metadata.xml 875 BLAKE2B 582b1ba40e9424d308e33d5f2bf430e270a2d4d106aeffec3d03e1736360758776f5aa8a8d0078aa03c0e4ca8ea206b9805be2223db69282bca0cb752c531314 SHA512 07b92861370f28e4723e48d75dac80e3517c7a944f7a4ac07e6afc75f80871b6ca6a4904d042bd79bce1dfcd81b74d3b85a25b0eab3f8c83dac7742f6fb10219
diff --git a/media-radio/unixcw/files/unixcw-3.6.1-qt6-build.patch b/media-radio/unixcw/files/unixcw-3.6.1-qt6-build.patch
new file mode 100644
index 000000000000..53cda260267e
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.6.1-qt6-build.patch
@@ -0,0 +1,116 @@
+diff --git a/configure.ac b/configure.ac
+index aecd270..d66151e 100755
+--- a/configure.ac
++++ b/configure.ac
+@@ -512,28 +512,28 @@ if test "$enable_xcwcp" = "no" ; then
+ WITH_XCWCP='no'
+ else
+ # http://stackoverflow.com/questions/5178511/integrate-qt-project-with-autotool
+- PKG_CHECK_MODULES(QT5, [Qt5Widgets Qt5Gui Qt5Core >= 5.0.0], [
+- AC_PATH_PROGS(MOC, [moc-qt5 moc], moc,`eval $PKG_CONFIG --variable=host_bins Qt5Core`)
++ PKG_CHECK_MODULES(QT6, [Qt6Widgets Qt6Gui Qt6Core >= 6.0.0], [
++ AC_PATH_PROGS(MOC, [moc-qt6 moc], moc,`eval $PKG_CONFIG --variable=libexecdir Qt6Core`)
+
+ # https://stackoverflow.com/questions/11663702/how-to-suppress-warnings-for-file-included-from-header
+- QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir Qt5Core`
+- QT5_CFLAGS="-isystem $QT_INCLUDE_DIR"
+- QT5_CFLAGS+=" -isystem $QT_INCLUDE_DIR/QtWidgets"
+- QT5_CFLAGS+=" -isystem $QT_INCLUDE_DIR/QtGui"
+- QT5_CFLAGS+=" -isystem $QT_INCLUDE_DIR/QtCore"
++ QT_INCLUDE_DIR=`$PKG_CONFIG --variable=includedir Qt6Core`
++ QT6_CFLAGS="-isystem $QT_INCLUDE_DIR"
++ QT6_CFLAGS+=" -isystem $QT_INCLUDE_DIR/QtWidgets"
++ QT6_CFLAGS+=" -isystem $QT_INCLUDE_DIR/QtGui"
++ QT6_CFLAGS+=" -isystem $QT_INCLUDE_DIR/QtCore"
+
+- AC_MSG_RESULT([QT5 CLFAGS is $QT5_CFLAGS])
+- AC_MSG_RESULT([QT5 LIBS is $QT5_LIBS])
++ AC_MSG_RESULT([QT6 CFLAGS is $QT6_CFLAGS])
++ AC_MSG_RESULT([QT6 LIBS is $QT6_LIBS])
+
+- AC_SUBST(QT5_CFLAGS)
+- AC_SUBST(QT5_LIBS)
++ AC_SUBST(QT6_CFLAGS)
++ AC_SUBST(QT6_LIBS)
+ AC_SUBST(MOC)
+
+ WITH_XCWCP='yes'
+
+ ], [
+
+- AC_MSG_WARN([Cannot find Qt5 files - unable to build xcwcp])
++ AC_MSG_WARN([Cannot find Qt6 files - unable to build xcwcp])
+
+ WITH_XCWCP='no'
+
+@@ -797,9 +797,9 @@ AC_MSG_NOTICE([ build cwgen: .......................................... $WITH
+ AC_MSG_NOTICE([ build cwcp: ........................................... $WITH_CWCP])
+ AC_MSG_NOTICE([ build xcwcp: .......................................... $WITH_XCWCP])
+ if test "$WITH_XCWCP" = 'yes' ; then
+- AC_MSG_NOTICE([ Qt5 LIBS: ......................................... $QT5_LIBS])
+- AC_MSG_NOTICE([ Qt5 MOC: .......................................... $MOC])
+- AC_MSG_NOTICE([ Qt5 CFLAGS: ....................................... $QT5_CFLAGS])
++ AC_MSG_NOTICE([ Qt6 LIBS: ......................................... $QT6_LIBS])
++ AC_MSG_NOTICE([ Qt6 MOC: .......................................... $MOC])
++ AC_MSG_NOTICE([ Qt6 CFLAGS: ....................................... $QT6_CFLAGS])
+ fi
+ AC_MSG_NOTICE([ CFLAGS: ............................................... $CFLAGS])
+
+diff --git a/Makefile.inc.in b/Makefile.inc.in
+index dd091db..6ad9361 100644
+--- a/Makefile.inc.in
++++ b/Makefile.inc.in
+@@ -27,9 +27,9 @@ AC_LDCONFIG = @LDCONFIG@
+ AC_LIBS = @LIBS@
+ AC_AWK = @AWK@
+
+-AC_QT5_CFLAGS = @QT5_CFLAGS@
+-AC_QT5_LIBS = @QT5_LIBS@
+-AC_QT5_MOC = @MOC@
++AC_QT6_CFLAGS = @QT6_CFLAGS@
++AC_QT6_LIBS = @QT6_LIBS@
++AC_QT6_MOC = @MOC@
+ AC_SRC_SUBDIRS = @SRC_SUBDIRS@
+
+ AC_CFLAG_PIC = @CFLAG_PIC@
+diff --git a/src/xcwcp/Makefile.am b/src/xcwcp/Makefile.am
+index 6d4a02d..492b321 100644
+--- a/src/xcwcp/Makefile.am
++++ b/src/xcwcp/Makefile.am
+@@ -18,7 +18,7 @@
+
+ # use $(top_builddir) instead of $(top_srcdir) because Makefile.inc is
+ # (re)created at build time; if you use $(top_srcdir), you may (will?)
+-# get empty $(AC_QT5_CFLAGS), $(AC_QT5_LIBS) and $(AC_QT5_MOC);
++# get empty $(AC_QT6_CFLAGS), $(AC_QT6_LIBS) and $(AC_QT6_MOC);
+ -include $(top_builddir)/Makefile.inc
+
+ # program(s) to be built in current dir
+@@ -36,12 +36,12 @@ xcwcp_SOURCES = \
+ nodist_xcwcp_SOURCES = moc_application.cc
+
+ # target-specific preprocessor flags (#defs and include dirs)
+-xcwcp_CPPFLAGS = -I$(top_srcdir)/src/ -I$(top_srcdir)/src/libcw/ $(AC_QT5_CFLAGS) $(AC_CFLAG_PIC)
++xcwcp_CPPFLAGS = -I$(top_srcdir)/src/ -I$(top_srcdir)/src/libcw/ $(AC_QT6_CFLAGS) $(AC_CFLAG_PIC)
+
+ # Target-specific linker flags (objects to link). Order is important:
+ # first static library then dynamic. Otherwise linker may not find
+ # symbols from the dynamic library.
+-xcwcp_LDADD = $(top_builddir)/src/cwutils/lib_xcwcp.a -L$(top_builddir)/src/libcw/.libs -lcw $(AC_QT5_LIBS) -lpthread $(INTL_LIB)
++xcwcp_LDADD = $(top_builddir)/src/cwutils/lib_xcwcp.a -L$(top_builddir)/src/libcw/.libs -lcw $(AC_QT6_LIBS) -lpthread $(INTL_LIB)
+
+
+
+@@ -73,10 +73,10 @@ CLEANFILES = moc_application.cc
+ # Qt5 magic
+ if HOST_IS_FREEBSD
+ moc_application.cc: application.h
+- $(AC_QT5_MOC) application.h -o application.cc
++ $(AC_QT6_MOC) application.h -o application.cc
+ else
+ moc_application.cc: application.h
+- $(AC_QT5_MOC) $< -o $@
++ $(AC_QT6_MOC) $< -o $@
+ endif
+
+
diff --git a/media-radio/unixcw/files/unixcw-3.6.1-qt6-src.patch b/media-radio/unixcw/files/unixcw-3.6.1-qt6-src.patch
new file mode 100644
index 000000000000..d904ee9020b5
--- /dev/null
+++ b/media-radio/unixcw/files/unixcw-3.6.1-qt6-src.patch
@@ -0,0 +1,44 @@
+diff --git a/src/xcwcp/application.cc b/src/xcwcp/application.cc
+index 12f9311..f1dd707 100644
+--- a/src/xcwcp/application.cc
++++ b/src/xcwcp/application.cc
+@@ -821,7 +821,7 @@ void Application::make_toolbar(void)
+ toolbar->addSeparator();
+
+
+- QLabel *speed_label_ = new QLabel(_("Speed:"), 0, 0);
++ QLabel *speed_label_ = new QLabel(_("Speed:"), 0, Qt::Widget);
+ toolbar->addWidget(speed_label_);
+
+ speed_spin = new QSpinBox(toolbar);
+@@ -857,7 +857,7 @@ void Application::make_toolbar(void)
+ toolbar->addSeparator();
+
+
+- QLabel *volume_label = new QLabel(_("Volume:"), 0, 0);
++ QLabel *volume_label = new QLabel(_("Volume:"), 0, Qt::Widget);
+ toolbar->addWidget(volume_label);
+
+ volume_spin = new QSpinBox(toolbar);
+@@ -875,7 +875,7 @@ void Application::make_toolbar(void)
+ toolbar->addSeparator();
+
+
+- QLabel *gap_label = new QLabel(_("Gap:"), 0, 0);
++ QLabel *gap_label = new QLabel(_("Gap:"), 0, Qt::Widget);
+ toolbar->addWidget(gap_label);
+
+ gap_spin = new QSpinBox(toolbar);
+diff --git a/src/xcwcp/receiver.cc b/src/xcwcp/receiver.cc
+index 904ad22..7c785c0 100644
+--- a/src/xcwcp/receiver.cc
++++ b/src/xcwcp/receiver.cc
+@@ -165,7 +165,7 @@ void Receiver::handle_mouse_event(QMouseEvent *event, bool is_reverse_paddles)
+ const int is_down = event->type() == QEvent::MouseButtonPress
+ || event->type() == QEvent::MouseButtonDblClick;
+
+- if (event->button() == Qt::MidButton) {
++ if (event->button() == Qt::MiddleButton) {
+ //fprintf(stderr, "---------- handle mouse event: sk: %d\n", is_down);
+ sk_event(is_down);
+ event->accept();
diff --git a/media-radio/unixcw/unixcw-3.6.1-r1.ebuild b/media-radio/unixcw/unixcw-3.6.1-r1.ebuild
new file mode 100644
index 000000000000..22f41c23d9a4
--- /dev/null
+++ b/media-radio/unixcw/unixcw-3.6.1-r1.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools
+
+DESCRIPTION="Collection of programs that fit together to form a morse code tutor program"
+HOMEPAGE="https://unixcw.sourceforge.net"
+SRC_URI="https://downloads.sourceforge.net/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~x86"
+IUSE="alsa ncurses pulseaudio suid test qt6"
+RESTRICT="!test? ( test )"
+
+RDEPEND="ncurses? ( sys-libs/ncurses:= )
+ qt6? ( dev-qt/qtbase:6[gui,widgets] )
+ alsa? ( media-libs/alsa-lib )
+ pulseaudio? ( media-libs/libpulse )"
+DEPEND="${RDEPEND}"
+BDEPEND="virtual/pkgconfig
+ dev-build/libtool"
+
+PATCHES=( "${FILESDIR}/${PN}-3.6.1-qt6-src.patch"
+ "${FILESDIR}/${PN}-3.6.1-qt6-build.patch" )
+
+src_prepare() {
+ eapply "${PATCHES[@]}"
+ eapply -p0 "${FILESDIR}"/${PN}-3.6-tinfo.patch
+ # Bug# 837617 and 858278
+ sed -i -e "s/curses, initscr/ncurses, initscr/" \
+ -e "s/_curses_initscr/_ncurses_initscr/" configure.ac || die
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ econf --libdir="${EPREFIX}/usr/$(get_libdir)" \
+ $(use_enable pulseaudio ) \
+ $(use_enable alsa ) \
+ $(use_enable ncurses cwcp ) \
+ $(use_enable qt6 xcwcp ) \
+ --disable-static
+}
+
+src_install() {
+ default
+
+ if ! use suid ; then
+ fperms 711 /usr/bin/cw
+ if use ncurses ; then
+ fperms 711 /usr/bin/cwcp
+ fi
+ if use qt6 ; then
+ fperms 711 /usr/bin/xcwcp
+ fi
+ fi
+
+ find "${D}" -name '*.la' -type f -delete || die
+}
+
+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
+}