diff options
author | Stephen Hurd <shurd@FreeBSD.org> | 2018-08-08 04:35:54 +0000 |
---|---|---|
committer | Stephen Hurd <shurd@FreeBSD.org> | 2018-08-08 04:35:54 +0000 |
commit | fb1feb30a180ba9c26b14dbee428ff700ccc4d65 (patch) | |
tree | a8a0f3aa737b6cd4d8e7c2e72abdd3a863049c59 /comms/unixcw/files | |
parent | security/tor-devel: Update 0.3.4.5 -> 0.3.4.6 (diff) |
Update unixcw and xcwcp to latest release.
This is also the first version where all the issues are fixed, and support
has been included for ALSA and Pulseaudio. The ioctl() issue is resolved,
and gettext is properly controlled by the NLS option.
I'll be submitting these patches upstream, but due to the low rate of
releases, want to get them into ports first.
This is heavily modified from the submitted patch as every time anything
was tested, a new issue cropped up.
PR: 229782
Reported by: Yuri Victorovich <yuri@freebsd.org>
Diffstat (limited to 'comms/unixcw/files')
-rw-r--r-- | comms/unixcw/files/patch-Makefile.am | 7 | ||||
-rw-r--r-- | comms/unixcw/files/patch-configure.ac | 39 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cw_Makefile.am | 11 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cw_cw.c | 20 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cwcp_Makefile.am | 11 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cwcp_cwcp.c | 18 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cwgen_Makefile.am | 11 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cwutils_Makefile.am | 11 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cwutils_i18n.c | 11 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_cwutils_i18n.h | 11 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_libcw_libcw__oss.c | 83 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_xcwcp_Makefile.am | 16 | ||||
-rw-r--r-- | comms/unixcw/files/patch-src_xcwcp_application.cc | 18 |
13 files changed, 267 insertions, 0 deletions
diff --git a/comms/unixcw/files/patch-Makefile.am b/comms/unixcw/files/patch-Makefile.am new file mode 100644 index 000000000000..968275675452 --- /dev/null +++ b/comms/unixcw/files/patch-Makefile.am @@ -0,0 +1,7 @@ +--- Makefile.am.orig 2018-08-07 19:21:10 UTC ++++ Makefile.am +@@ -1,3 +1,4 @@ ++ACLOCAL_AMFLAGS = -I m4 + SUBDIRS=src + + EXTRA_DIST = \ diff --git a/comms/unixcw/files/patch-configure.ac b/comms/unixcw/files/patch-configure.ac new file mode 100644 index 000000000000..602a2f6398f5 --- /dev/null +++ b/comms/unixcw/files/patch-configure.ac @@ -0,0 +1,39 @@ +--- configure.ac.orig 2017-02-12 10:41:29 UTC ++++ configure.ac +@@ -22,6 +22,8 @@ AC_PREREQ(2.57) + AC_INIT([unixcw], [3.5.1]) + AC_CONFIG_SRCDIR([src/libcw/libcw_gen.c]) + AM_INIT_AUTOMAKE ++AC_CONFIG_MACRO_DIR([m4]) ++AC_USE_SYSTEM_EXTENSIONS + + # Libtool initialization, added during tests on FreeBSD + LT_INIT +@@ -41,6 +43,9 @@ AC_PROG_INSTALL + AC_PROG_MAKE_SET + AC_PROG_LN_S + AM_PROG_CC_C_O ++AC_GNU_SOURCE ++AM_GNU_GETTEXT(external) ++AM_GNU_GETTEXT_VERSION([0.18]) + + + +@@ -409,8 +414,6 @@ AC_SUBST(LIBCW_NDEBUG) + + + +- +- + # ##### + # end + # ##### +@@ -427,7 +430,7 @@ AC_HEADER_STDC + AC_HEADER_STDBOOL + AC_HEADER_TIME + AC_CHECK_HEADERS([fcntl.h limits.h stdlib.h string.h strings.h sys/ioctl.h \ +- sys/param.h sys/time.h unistd.h locale.h libintl.h]) ++ sys/param.h sys/time.h unistd.h locale.h]) + AC_CHECK_HEADERS([getopt.h]) + AC_CHECK_HEADERS([string.h strings.h]) + if test "$ac_cv_header_string_h" = 'no' \ diff --git a/comms/unixcw/files/patch-src_cw_Makefile.am b/comms/unixcw/files/patch-src_cw_Makefile.am new file mode 100644 index 000000000000..89eccbb838ee --- /dev/null +++ b/comms/unixcw/files/patch-src_cw_Makefile.am @@ -0,0 +1,11 @@ +--- src/cw/Makefile.am.orig 2018-08-07 19:08:14 UTC ++++ src/cw/Makefile.am +@@ -26,7 +26,7 @@ cw_SOURCES = cw.c cw.h + # target-specific preprocessor flags (#defs and include dirs) + # cw_CPPFLAGS = -I$(top_srcdir)/src/cwutils -I$(top_srcdir)/src/libcw/ + # target-specific linker flags (objects to link) +-cw_LDADD = -L$(top_builddir)/src/libcw/.libs -lcw $(top_builddir)/src/cwutils/lib_cw.a ++cw_LDADD = $(LTLIBINTL) -L$(top_builddir)/src/libcw/.libs -lcw $(top_builddir)/src/cwutils/lib_cw.a + + + diff --git a/comms/unixcw/files/patch-src_cw_cw.c b/comms/unixcw/files/patch-src_cw_cw.c new file mode 100644 index 000000000000..1b48f681b1a0 --- /dev/null +++ b/comms/unixcw/files/patch-src_cw_cw.c @@ -0,0 +1,20 @@ +--- src/cw/cw.c.orig 2018-08-08 04:24:25 UTC ++++ src/cw/cw.c +@@ -598,7 +598,9 @@ int main (int argc, char *const argv[]) + } + } + ++#ifndef __FreeBSD__ + if (config->audio_system == CW_AUDIO_ALSA ++ ) { + && cw_is_pa_possible(NULL)) { + + fprintf(stdout, "Selected audio system is ALSA, but audio on your system is handled by PulseAudio. Expect problems with timing.\n"); +@@ -607,6 +609,7 @@ int main (int argc, char *const argv[]) + fprintf(stdout, "Press Enter key to continue\n"); + getchar(); + } ++#endif + + generator = cw_generator_new_from_config(config); + if (!generator) { diff --git a/comms/unixcw/files/patch-src_cwcp_Makefile.am b/comms/unixcw/files/patch-src_cwcp_Makefile.am new file mode 100644 index 000000000000..ade72295e9f0 --- /dev/null +++ b/comms/unixcw/files/patch-src_cwcp_Makefile.am @@ -0,0 +1,11 @@ +--- src/cwcp/Makefile.am.orig 2018-08-07 19:10:59 UTC ++++ src/cwcp/Makefile.am +@@ -26,7 +26,7 @@ cwcp_SOURCES = cwcp.c + # 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 = -lcurses $(LTLIBINTL) -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/comms/unixcw/files/patch-src_cwcp_cwcp.c b/comms/unixcw/files/patch-src_cwcp_cwcp.c new file mode 100644 index 000000000000..609240cb989d --- /dev/null +++ b/comms/unixcw/files/patch-src_cwcp_cwcp.c @@ -0,0 +1,18 @@ +--- src/cwcp/cwcp.c.orig 2018-08-08 04:24:32 UTC ++++ src/cwcp/cwcp.c +@@ -1732,6 +1732,7 @@ int main(int argc, char **argv) + } + } + ++#ifndef __FreeBSD__ + if (config->audio_system == CW_AUDIO_ALSA + && cw_is_pa_possible(NULL)) { + +@@ -1741,6 +1742,7 @@ int main(int argc, char **argv) + fprintf(stdout, "Press Enter key to continue\n"); + getchar(); + } ++#endif + + generator = cw_generator_new_from_config(config); + if (!generator) { diff --git a/comms/unixcw/files/patch-src_cwgen_Makefile.am b/comms/unixcw/files/patch-src_cwgen_Makefile.am new file mode 100644 index 000000000000..d691ad0ab60b --- /dev/null +++ b/comms/unixcw/files/patch-src_cwgen_Makefile.am @@ -0,0 +1,11 @@ +--- src/cwgen/Makefile.am.orig 2018-08-07 19:09:07 UTC ++++ src/cwgen/Makefile.am +@@ -26,7 +26,7 @@ cwgen_SOURCES = cwgen.c + # target-specific preprocessor flags (#defs and include dirs) + #cwgen_CPPFLAGS = -I$(top_srcdir)/src/cwutils/ -I$(top_srcdir)/src/libcw/ + # target-specific linker flags (objects to link) +-cwgen_LDADD = -L$(top_builddir)/src/libcw/.libs -lcw $(top_builddir)/src/cwutils/lib_cwgen.a ++cwgen_LDADD = $(LTLIBINTL) -L$(top_builddir)/src/libcw/.libs -lcw $(top_builddir)/src/cwutils/lib_cwgen.a + + + # copy man page to proper directory during installation diff --git a/comms/unixcw/files/patch-src_cwutils_Makefile.am b/comms/unixcw/files/patch-src_cwutils_Makefile.am new file mode 100644 index 000000000000..5693f1bd20aa --- /dev/null +++ b/comms/unixcw/files/patch-src_cwutils_Makefile.am @@ -0,0 +1,11 @@ +--- src/cwutils/Makefile.am.orig 2018-08-07 19:05:29 UTC ++++ src/cwutils/Makefile.am +@@ -29,7 +29,7 @@ cw_dictionary_tests_SOURCES = dictionary + cw_dictionary_tests_CPPFLAGS = $(AM_CPPFLAGS) -DCW_DICTIONARY_UNIT_TESTS + + # target-specific linker flags (objects to link) +-cw_dictionary_tests_LDADD=-L$(top_builddir)/src/libcw/.libs -lcw #-lm -lpthread -ldl ++cw_dictionary_tests_LDADD=$(LTLIBINTL) -L$(top_builddir)/src/libcw/.libs -lcw #-lm -lpthread -ldl + + # target-specific compiler flags + cw_dictionary_tests_CFLAGS = -rdynamic diff --git a/comms/unixcw/files/patch-src_cwutils_i18n.c b/comms/unixcw/files/patch-src_cwutils_i18n.c new file mode 100644 index 000000000000..dc862c5d6a3f --- /dev/null +++ b/comms/unixcw/files/patch-src_cwutils_i18n.c @@ -0,0 +1,11 @@ +--- src/cwutils/i18n.c.orig 2018-08-07 18:50:26 UTC ++++ src/cwutils/i18n.c +@@ -50,7 +50,7 @@ i18n_initialize (void) + const char * + i18n_gettext (const char *msgid) + { +-#if defined(HAVE_LIBINTL_H) ++#if defined(HAVE_GETTEXT) + static int is_initialized = FALSE; + + if (!is_initialized) diff --git a/comms/unixcw/files/patch-src_cwutils_i18n.h b/comms/unixcw/files/patch-src_cwutils_i18n.h new file mode 100644 index 000000000000..45fa68abe352 --- /dev/null +++ b/comms/unixcw/files/patch-src_cwutils_i18n.h @@ -0,0 +1,11 @@ +--- src/cwutils/i18n.h.orig 2018-08-07 18:50:31 UTC ++++ src/cwutils/i18n.h +@@ -20,7 +20,7 @@ + #ifndef _CWI18N_H + #define _CWI18N_H + +-#if defined(HAVE_LIBINTL_H) ++#if defined(HAVE_GETTEXT) + # include <libintl.h> + + # define _(STR) i18n_gettext (STR) diff --git a/comms/unixcw/files/patch-src_libcw_libcw__oss.c b/comms/unixcw/files/patch-src_libcw_libcw__oss.c new file mode 100644 index 000000000000..5f24c6bb2659 --- /dev/null +++ b/comms/unixcw/files/patch-src_libcw_libcw__oss.c @@ -0,0 +1,83 @@ +--- src/libcw/libcw_oss.c.orig 2018-08-08 04:17:27 UTC ++++ src/libcw/libcw_oss.c +@@ -243,7 +243,7 @@ int cw_oss_open_device_internal(cw_gen_t + /* Get fragment size in bytes, may be different than requested + with ioctl(..., SNDCTL_DSP_SETFRAGMENT), and, in particular, + can be different than 2^N. */ +- if ((rv = ioctl(soundcard, (int) SNDCTL_DSP_GETBLKSIZE, &size)) == -1) { ++ if ((rv = ioctl(soundcard, SNDCTL_DSP_GETBLKSIZE, &size)) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_DSP_GETBLKSIZE): \"%s\"", strerror(errno)); + close(soundcard); +@@ -322,7 +322,7 @@ int cw_oss_open_device_ioctls_internal(i + #endif + /* Set the audio format to 8-bit unsigned. */ + parameter = CW_OSS_SAMPLE_FORMAT; +- if (ioctl(*fd, (int) SNDCTL_DSP_SETFMT, ¶meter) == -1) { ++ if (ioctl(*fd, SNDCTL_DSP_SETFMT, ¶meter) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_DSP_SETFMT): \"%s\"", strerror(errno)); + return CW_FAILURE; +@@ -335,7 +335,7 @@ int cw_oss_open_device_ioctls_internal(i + + /* Set up mono mode - a single audio channel. */ + parameter = CW_AUDIO_CHANNELS; +- if (ioctl(*fd, (int) SNDCTL_DSP_CHANNELS, ¶meter) == -1) { ++ if (ioctl(*fd, SNDCTL_DSP_CHANNELS, ¶meter) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_DSP_CHANNELS): \"%s\"", strerror(errno)); + return CW_FAILURE; +@@ -352,7 +352,7 @@ int cw_oss_open_device_ioctls_internal(i + bool success = false; + for (int i = 0; cw_supported_sample_rates[i]; i++) { + rate = cw_supported_sample_rates[i]; +- if (!ioctl(*fd, (int) SNDCTL_DSP_SPEED, &rate)) { ++ if (!ioctl(*fd, SNDCTL_DSP_SPEED, &rate)) { + if (rate != cw_supported_sample_rates[i]) { + cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, "cw_oss: imprecise sample rate:"); + cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, "cw_oss: asked for: %u", cw_supported_sample_rates[i]); +@@ -373,7 +373,7 @@ int cw_oss_open_device_ioctls_internal(i + + + audio_buf_info buff; +- if (ioctl(*fd, (int) SNDCTL_DSP_GETOSPACE, &buff) == -1) { ++ if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &buff) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_DSP_GETOSPACE): \"%s\"", strerror(errno)); + return CW_FAILURE; +@@ -402,7 +402,7 @@ int cw_oss_open_device_ioctls_internal(i + /* parameter = 0x7fff << 16 | CW_OSS_SETFRAGMENT; */ + parameter = 0x0032 << 16 | CW_OSS_SETFRAGMENT; + +- if (ioctl(*fd, (int) SNDCTL_DSP_SETFRAGMENT, ¶meter) == -1) { ++ if (ioctl(*fd, SNDCTL_DSP_SETFRAGMENT, ¶meter) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_DSP_SETFRAGMENT): \"%s\"", strerror(errno)); + return CW_FAILURE; +@@ -411,7 +411,7 @@ int cw_oss_open_device_ioctls_internal(i + "cw_oss: fragment size is 2^%d = %d", parameter & 0x0000ffff, 2 << ((parameter & 0x0000ffff) - 1)); + + /* Query fragment size just to get the driver buffers set. */ +- if (ioctl(*fd, (int) SNDCTL_DSP_GETBLKSIZE, ¶meter) == -1) { ++ if (ioctl(*fd, SNDCTL_DSP_GETBLKSIZE, ¶meter) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_DSP_GETBLKSIZE): \"%s\"", strerror(errno)); + return CW_FAILURE; +@@ -432,7 +432,7 @@ int cw_oss_open_device_ioctls_internal(i + } + #endif + +- if (ioctl(*fd, (int) SNDCTL_DSP_GETOSPACE, &buff) == -1) { ++ if (ioctl(*fd, SNDCTL_DSP_GETOSPACE, &buff) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl(SNDCTL_GETOSPACE): \"%s\"", strerror(errno)); + return CW_FAILURE; +@@ -480,7 +480,7 @@ int cw_oss_get_version_internal(int fd, + assert (fd); + + int parameter = 0; +- if (ioctl(fd, (int) OSS_GETVERSION, ¶meter) == -1) { ++ if (ioctl(fd, OSS_GETVERSION, ¶meter) == -1) { + cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR, + "cw_oss: ioctl OSS_GETVERSION"); + return CW_FAILURE; diff --git a/comms/unixcw/files/patch-src_xcwcp_Makefile.am b/comms/unixcw/files/patch-src_xcwcp_Makefile.am new file mode 100644 index 000000000000..30f3ebae9721 --- /dev/null +++ b/comms/unixcw/files/patch-src_xcwcp_Makefile.am @@ -0,0 +1,16 @@ +--- src/xcwcp/Makefile.am.orig 2018-08-07 21:13:40 UTC ++++ src/xcwcp/Makefile.am +@@ -61,13 +61,8 @@ CLEANFILES = moc_application.cc + + + # Qt5 magic +-if HOST_IS_FREEBSD +-moc_application.cc: application.h +- $(AC_QT5_MOC) application.h -o application.cc +-else + moc_application.cc: application.h + $(AC_QT5_MOC) $< -o $@ +-endif + + + diff --git a/comms/unixcw/files/patch-src_xcwcp_application.cc b/comms/unixcw/files/patch-src_xcwcp_application.cc new file mode 100644 index 000000000000..7048e7c4818d --- /dev/null +++ b/comms/unixcw/files/patch-src_xcwcp_application.cc @@ -0,0 +1,18 @@ +--- src/xcwcp/application.cc.orig 2018-08-08 04:24:39 UTC ++++ src/xcwcp/application.cc +@@ -1126,6 +1126,7 @@ void Application::make_auxiliaries_end(v + + void Application::check_audio_system(cw_config_t *config) + { ++#ifndef __FreeBSD__ + if (config->audio_system == CW_AUDIO_ALSA + && cw_is_pa_possible(NULL)) { + +@@ -1137,6 +1138,7 @@ void Application::check_audio_system(cw_ + msgBox.setText(message1 + " " + message2 + message3.arg(config->program_name).arg(config->program_name)); + msgBox.exec(); + } ++#endif + + return; + } |