From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 65203158B20 for ; Tue, 04 Feb 2025 07:45:45 +0000 (UTC) Received: from lists.gentoo.org (bobolink.gentoo.org [140.211.166.189]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: relay-lists.gentoo.org@gentoo.org) by smtp.gentoo.org (Postfix) with ESMTPSA id 2D98F341630 for ; Tue, 04 Feb 2025 07:45:45 +0000 (UTC) Received: from bobolink.gentoo.org (localhost [127.0.0.1]) by bobolink.gentoo.org (Postfix) with ESMTP id 242A61102A2; Tue, 04 Feb 2025 07:45:44 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bobolink.gentoo.org (Postfix) with ESMTPS id 177F51102A2 for ; Tue, 04 Feb 2025 07:45:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 83AEC341630 for ; Tue, 04 Feb 2025 07:45:43 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B51C611D5 for ; Tue, 04 Feb 2025 07:45:41 +0000 (UTC) From: "Thomas Beierlein" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Beierlein" Message-ID: <1738655095.40c688f285b4d9f07067da6e2566369fa92a5628.tomjbe@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-radio/unixcw/, media-radio/unixcw/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-radio/unixcw/files/unixcw-3.6.1-qt6-build.patch media-radio/unixcw/files/unixcw-3.6.1-qt6-src.patch media-radio/unixcw/unixcw-3.6.1-r1.ebuild X-VCS-Directories: media-radio/unixcw/ media-radio/unixcw/files/ X-VCS-Committer: tomjbe X-VCS-Committer-Name: Thomas Beierlein X-VCS-Revision: 40c688f285b4d9f07067da6e2566369fa92a5628 X-VCS-Branch: master Date: Tue, 04 Feb 2025 07:45:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 06c443f6-5a03-4ea2-95cc-8fb40661b985 X-Archives-Hash: 540593d5bece3161a8fbcce30aacfbb6 commit: 40c688f285b4d9f07067da6e2566369fa92a5628 Author: Thomas Beierlein gentoo org> AuthorDate: Tue Feb 4 07:39:14 2025 +0000 Commit: Thomas Beierlein gentoo org> CommitDate: Tue Feb 4 07:44:55 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40c688f2 media-radio/unixcw: Move to Qt6 Signed-off-by: Thomas Beierlein gentoo.org> .../unixcw/files/unixcw-3.6.1-qt6-build.patch | 116 +++++++++++++++++++++ .../unixcw/files/unixcw-3.6.1-qt6-src.patch | 44 ++++++++ media-radio/unixcw/unixcw-3.6.1-r1.ebuild | 78 ++++++++++++++ 3 files changed, 238 insertions(+) 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 +}