* [gentoo-commits] repo/gentoo:master commit in: media-radio/tlf/, media-radio/tlf/files/
@ 2016-12-16 7:21 Thomas Beierlein
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Beierlein @ 2016-12-16 7:21 UTC (permalink / raw
To: gentoo-commits
commit: f55bf29d2e909ad052cd112aab97f1e4567d06ed
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 16 07:19:24 2016 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Fri Dec 16 07:20:33 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f55bf29d
media-radio/tlf: backport new AX_WITH_CURSES macro
Fixes compile error with ncurses[tinfo].
Package-Manager: Portage-2.3.3, Repoman-2.3.1
media-radio/tlf/files/ncurses_tinfo.patch | 355 ++++++++++++++++++++++++++++++
media-radio/tlf/tlf-1.2.4.1.ebuild | 7 +-
media-radio/tlf/tlf-1.2.4.5.ebuild | 7 +-
3 files changed, 367 insertions(+), 2 deletions(-)
diff --git a/media-radio/tlf/files/ncurses_tinfo.patch b/media-radio/tlf/files/ncurses_tinfo.patch
new file mode 100644
index 00000000..c70b96e
--- /dev/null
+++ b/media-radio/tlf/files/ncurses_tinfo.patch
@@ -0,0 +1,355 @@
+diff -u tlf-1.2.4.5/macros/ax_with_curses.m4 tlf/macros/ax_with_curses.m4
+--- tlf-1.2.4.5/macros/ax_with_curses.m4 2016-11-19 10:22:20.000000000 +0100
++++ tlf/macros/ax_with_curses.m4 2016-12-13 08:03:02.855327396 +0100
+@@ -12,7 +12,9 @@
+ # present, along with the associated header file. The NcursesW
+ # (wide-character) library is searched for first, followed by Ncurses,
+ # then the system-default plain Curses. The first library found is the
+-# one returned.
++# one returned. Finding libraries will first be attempted by using
++# pkg-config, and should the pkg-config files not be available, will
++# fallback to combinations of known flags itself.
+ #
+ # The following options are understood: --with-ncursesw, --with-ncurses,
+ # --without-ncursesw, --without-ncurses. The "--with" options force the
+@@ -52,23 +54,29 @@
+ #
+ # (These preprocessor symbols are discussed later in this document.)
+ #
+-# The following output variable is defined by this macro; it is precious
+-# and may be overridden on the ./configure command line:
++# The following output variables are defined by this macro; they are
++# precious and may be overridden on the ./configure command line:
+ #
+-# CURSES_LIB - library to add to xxx_LDADD
++# CURSES_LIBS - library to add to xxx_LDADD
++# CURSES_CFLAGS - include paths to add to xxx_CPPFLAGS
+ #
+-# The library listed in CURSES_LIB is NOT added to LIBS by default. You
+-# need to add CURSES_LIB to the appropriate xxx_LDADD line in your
+-# Makefile.am. For example:
+-#
+-# prog_LDADD = @CURSES_LIB@
+-#
+-# If CURSES_LIB is set on the configure command line (such as by running
+-# "./configure CURSES_LIB=-lmycurses"), then the only header searched for
+-# is <curses.h>. The user may use the CPPFLAGS precious variable to
+-# override the standard #include search path. If the user needs to
+-# specify an alternative path for a library (such as for a non-standard
+-# NcurseW), the user should use the LDFLAGS variable.
++# In previous versions of this macro, the flags CURSES_LIB and
++# CURSES_CPPFLAGS were defined. These have been renamed, in keeping with
++# AX_WITH_CURSES's close bigger brother, PKG_CHECK_MODULES, which should
++# eventually supersede the use of AX_WITH_CURSES. Neither the library
++# listed in CURSES_LIBS, nor the flags in CURSES_CFLAGS are added to LIBS,
++# respectively CPPFLAGS, by default. You need to add both to the
++# appropriate xxx_LDADD/xxx_CPPFLAGS line in your Makefile.am. For
++# example:
++#
++# prog_LDADD = @CURSES_LIBS@
++# prog_CPPFLAGS = @CURSES_CFLAGS@
++#
++# If CURSES_LIBS is set on the configure command line (such as by running
++# "./configure CURSES_LIBS=-lmycurses"), then the only header searched for
++# is <curses.h>. If the user needs to specify an alternative path for a
++# library (such as for a non-standard NcurseW), the user should use the
++# LDFLAGS variable.
+ #
+ # The following shell variables may be defined by this macro:
+ #
+@@ -182,11 +190,66 @@
+ # modified version of the Autoconf Macro, you may extend this special
+ # exception to the GPL to apply to your modified version as well.
+
+-#serial 15
++#serial 17
++
++# internal function to factorize common code that is used by both ncurses
++# and ncursesw
++AC_DEFUN([_FIND_CURSES_FLAGS], [
++ AC_MSG_CHECKING([for $1 via pkg-config])
++
++ AX_REQUIRE_DEFINED([PKG_CHECK_EXISTS])
++ _PKG_CONFIG([_ax_cv_$1_libs], [libs], [$1])
++ _PKG_CONFIG([_ax_cv_$1_cppflags], [cflags], [$1])
++
++ AS_IF([test "x$pkg_failed" = "xyes" || test "x$pkg_failed" = "xuntried"],[
++ AC_MSG_RESULT([no])
++ # No suitable .pc file found, have to find flags via fallback
++ AC_CACHE_CHECK([for $1 via fallback], [ax_cv_$1], [
++ AS_ECHO()
++ pkg_cv__ax_cv_$1_libs="-l$1"
++ pkg_cv__ax_cv_$1_cppflags="-D_GNU_SOURCE $CURSES_CFLAGS"
++ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs"
++ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_$1_cppflags"
++
++ AC_MSG_CHECKING([for initscr() with $pkg_cv__ax_cv_$1_libs])
++ AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
++ [
++ AC_MSG_RESULT([yes])
++ AC_MSG_CHECKING([for nodelay() with $pkg_cv__ax_cv_$1_libs])
++ AC_LINK_IFELSE([AC_LANG_CALL([], [nodelay])],[
++ ax_cv_$1=yes
++ ],[
++ AC_MSG_RESULT([no])
++ m4_if(
++ [$1],[ncursesw],[pkg_cv__ax_cv_$1_libs="$pkg_cv__ax_cv_$1_libs -ltinfow"],
++ [$1],[ncurses],[pkg_cv__ax_cv_$1_libs="$pkg_cv__ax_cv_$1_libs -ltinfo"]
++ )
++ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs"
++
++ AC_MSG_CHECKING([for nodelay() with $pkg_cv__ax_cv_$1_libs])
++ AC_LINK_IFELSE([AC_LANG_CALL([], [nodelay])],[
++ ax_cv_$1=yes
++ ],[
++ ax_cv_$1=no
++ ])
++ ])
++ ],[
++ ax_cv_$1=no
++ ])
++ ])
++ ],[
++ AC_MSG_RESULT([yes])
++ # Found .pc file, using its information
++ LIBS="$ax_saved_LIBS $pkg_cv__ax_cv_$1_libs"
++ CPPFLAGS="$ax_saved_CPPFLAGS $pkg_cv__ax_cv_$1_cppflags"
++ ax_cv_$1=yes
++ ])
++])
+
+ AU_ALIAS([MP_WITH_CURSES], [AX_WITH_CURSES])
+ AC_DEFUN([AX_WITH_CURSES], [
+- AC_ARG_VAR([CURSES_LIB], [linker library for Curses, e.g. -lcurses])
++ AC_ARG_VAR([CURSES_LIBS], [linker library for Curses, e.g. -lcurses])
++ AC_ARG_VAR([CURSES_CFLAGS], [preprocessor flags for Curses, e.g. -I/usr/include/ncursesw])
+ AC_ARG_WITH([ncurses], [AS_HELP_STRING([--with-ncurses],
+ [force the use of Ncurses or NcursesW])],
+ [], [with_ncurses=check])
+@@ -195,20 +258,17 @@
+ [], [with_ncursesw=check])
+
+ ax_saved_LIBS=$LIBS
++ ax_saved_CPPFLAGS=$CPPFLAGS
++
+ AS_IF([test "x$with_ncurses" = xyes || test "x$with_ncursesw" = xyes],
+ [ax_with_plaincurses=no], [ax_with_plaincurses=check])
+
+ ax_cv_curses_which=no
+
+ # Test for NcursesW
++ AS_IF([test "x$CURSES_LIBS" = x && test "x$with_ncursesw" != xno], [
++ _FIND_CURSES_FLAGS([ncursesw])
+
+- AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncursesw" != xno], [
+- LIBS="$ax_saved_LIBS -lncursesw"
+-
+- AC_CACHE_CHECK([for NcursesW wide-character library], [ax_cv_ncursesw], [
+- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
+- [ax_cv_ncursesw=yes], [ax_cv_ncursesw=no])
+- ])
+ AS_IF([test "x$ax_cv_ncursesw" = xno && test "x$with_ncursesw" = xyes], [
+ AC_MSG_ERROR([--with-ncursesw specified but could not find NcursesW library])
+ ])
+@@ -216,7 +276,8 @@
+ AS_IF([test "x$ax_cv_ncursesw" = xyes], [
+ ax_cv_curses=yes
+ ax_cv_curses_which=ncursesw
+- CURSES_LIB="-lncursesw"
++ CURSES_LIBS="$pkg_cv__ax_cv_ncursesw_libs"
++ CURSES_CFLAGS="$pkg_cv__ax_cv_ncursesw_cppflags"
+ AC_DEFINE([HAVE_NCURSESW], [1], [Define to 1 if the NcursesW library is present])
+ AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
+
+@@ -318,16 +379,13 @@
+ ])
+ ])
+ ])
++ unset pkg_cv__ax_cv_ncursesw_libs
++ unset pkg_cv__ax_cv_ncursesw_cppflags
+
+ # Test for Ncurses
++ AS_IF([test "x$CURSES_LIBS" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
++ _FIND_CURSES_FLAGS([ncurses])
+
+- AS_IF([test "x$CURSES_LIB" = x && test "x$with_ncurses" != xno && test "x$ax_cv_curses_which" = xno], [
+- LIBS="$ax_saved_LIBS -lncurses"
+-
+- AC_CACHE_CHECK([for Ncurses library], [ax_cv_ncurses], [
+- AC_LINK_IFELSE([AC_LANG_CALL([], [initscr])],
+- [ax_cv_ncurses=yes], [ax_cv_ncurses=no])
+- ])
+ AS_IF([test "x$ax_cv_ncurses" = xno && test "x$with_ncurses" = xyes], [
+ AC_MSG_ERROR([--with-ncurses specified but could not find Ncurses library])
+ ])
+@@ -335,7 +393,8 @@
+ AS_IF([test "x$ax_cv_ncurses" = xyes], [
+ ax_cv_curses=yes
+ ax_cv_curses_which=ncurses
+- CURSES_LIB="-lncurses"
++ CURSES_LIBS="$pkg_cv__ax_cv_ncurses_libs"
++ CURSES_CFLAGS="$pkg_cv__ax_cv_ncurses_cppflags"
+ AC_DEFINE([HAVE_NCURSES], [1], [Define to 1 if the Ncurses library is present])
+ AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
+
+@@ -390,12 +449,13 @@
+ ])
+ ])
+ ])
++ unset pkg_cv__ax_cv_ncurses_libs
++ unset pkg_cv__ax_cv_ncurses_cppflags
+
+- # Test for plain Curses (or if CURSES_LIB was set by user)
+-
++ # Test for plain Curses (or if CURSES_LIBS was set by user)
+ AS_IF([test "x$with_plaincurses" != xno && test "x$ax_cv_curses_which" = xno], [
+- AS_IF([test "x$CURSES_LIB" != x], [
+- LIBS="$ax_saved_LIBS $CURSES_LIB"
++ AS_IF([test "x$CURSES_LIBS" != x], [
++ LIBS="$ax_saved_LIBS $CURSES_LIBS"
+ ], [
+ LIBS="$ax_saved_LIBS -lcurses"
+ ])
+@@ -408,8 +468,8 @@
+ AS_IF([test "x$ax_cv_plaincurses" = xyes], [
+ ax_cv_curses=yes
+ ax_cv_curses_which=plaincurses
+- AS_IF([test "x$CURSES_LIB" = x], [
+- CURSES_LIB="-lcurses"
++ AS_IF([test "x$CURSES_LIBS" = x], [
++ CURSES_LIBS="-lcurses"
+ ])
+ AC_DEFINE([HAVE_CURSES], [1], [Define to 1 if a SysV or X/Open compatible Curses library is present])
+
+@@ -515,4 +575,8 @@
+ AS_IF([test "x$ax_cv_curses_obsolete" != xyes], [ax_cv_curses_obsolete=no])
+
+ LIBS=$ax_saved_LIBS
++ CPPFLAGS=$ax_saved_CPPFLAGS
++
++ unset ax_saved_LIBS
++ unset ax_saved_CPPFLAGS
+ ])dnl
+diff -u tlf-1.2.4.5/macros/ax_with_curses_extra.m4 tlf/macros/ax_with_curses_extra.m4
+--- tlf-1.2.4.5/macros/ax_with_curses_extra.m4 2016-11-19 10:22:20.000000000 +0100
++++ tlf/macros/ax_with_curses_extra.m4 2016-12-13 08:06:03.887433760 +0100
+@@ -41,18 +41,22 @@
+ # The following output variables may be defined by these macros; these are
+ # precious and may be overridden on the ./configure command line:
+ #
+-# PANEL_LIB - library to add to xxx_LDADD before CURSES_LIB
+-# MENU_LIB - library to add to xxx_LDADD before CURSES_LIB
+-# FORM_LIB - library to add to xxx_LDADD before CURSES_LIB
+-#
+-# These libraries are NOT added to LIBS by default. You need to add them
+-# to the appropriate xxx_LDADD line in your Makefile.am in front of the
+-# equivalent CURSES_LIB incantation. For example:
++# PANEL_LIBS - library to add to xxx_LDADD before CURSES_LIBS
++# MENU_LIBS - library to add to xxx_LDADD before CURSES_LIBS
++# FORM_LIBS - library to add to xxx_LDADD before CURSES_LIBS
++#
++# In previous versions of this macro, the flags PANEL_LIB, MENU_LIB and
++# FORM_LIB were defined. These have been renamed, in keeping with the
++# variable scheme of PKG_CHECK_MODULES, which should eventually supersede
++# the use of AX_WITH_CURSES and AX_WITH_CURSES_* macros. These libraries
++# are NOT added to LIBS by default. You need to add them to the
++# appropriate xxx_LDADD line in your Makefile.am in front of the
++# equivalent CURSES_LIBS incantation. For example:
+ #
+-# prog_LDADD = @PANEL_LIB@ @CURSES_LIB@
++# prog_LDADD = @PANEL_LIBS@ @CURSES_LIBS@
+ #
+-# If one of the xxx_LIB variables is set on the configure command line
+-# (such as by running "./configure PANEL_LIB=-lmypanel"), then the header
++# If one of the xxx_LIBS variables is set on the configure command line
++# (such as by running "./configure PANEL_LIBS=-lmypanel"), then the header
+ # file searched must NOT contain a subpath. In this case, in other words,
+ # only <panel.h> would be searched for. The user may use the CPPFLAGS
+ # precious variable to override the standard #include search path.
+@@ -144,7 +148,7 @@
+ # modified version of the Autoconf Macro, you may extend this special
+ # exception to the GPL to apply to your modified version as well.
+
+-#serial 2
++#serial 4
+
+ AC_DEFUN([_AX_WITH_CURSES_CHECKEXTRA], [
+ dnl Parameter 1 is the variable name component, using uppercase letters only
+@@ -159,8 +163,11 @@
+ AS_VAR_PUSHDEF([_AX_WITH_CURSES_CHECKEXTRA_have_header_var], [HAVE_[]m4_toupper($4)])dnl
+
+ ax_saved_LIBS=$LIBS
++ ax_saved_CPPFLAGS=$CPPFLAGS
++
+ AC_CACHE_CHECK([for Curses $2 library with $4], [_AX_WITH_CURSES_CHECKEXTRA_header_var], [
+- LIBS="$ax_saved_LIBS $5 $CURSES_LIB"
++ LIBS="$ax_saved_LIBS $5 $CURSES_LIBS"
++ CPPFLAGS="$ax_saved_CPPFLAGS $CURSES_CFLAGS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+ @%:@include <$4>
+ ]], [$3])],
+@@ -169,14 +176,18 @@
+ ])
+ AS_IF([test "x$[]_AX_WITH_CURSES_CHECKEXTRA_header_var" = xyes], [
+ _AX_WITH_CURSES_CHECKEXTRA_cv_var=yes
+- AS_LITERAL_IF([$5], [$1_LIB="$5"])
++ AS_LITERAL_IF([$5], [$1_LIBS="$5"])
+ AC_DEFINE([_AX_WITH_CURSES_CHECKEXTRA_have_var], [1], [Define to 1 if the Curses $2 library is present])
+ AC_DEFINE([_AX_WITH_CURSES_CHECKEXTRA_have_header_var], [1], [Define to 1 if <$4> is present])
+ ], [
+ AS_IF([test "x$[]_AX_WITH_CURSES_CHECKEXTRA_cv_var" = xyes], [],
+ [_AX_WITH_CURSES_CHECKEXTRA_cv_var=no])
+ ])
++
+ LIBS=$ax_saved_LIBS
++ CPPFLAGS=$ax_saved_CPPFLAGS
++ unset ax_saved_LIBS
++ unset ax_saved_CPPFLAGS
+
+ AS_VAR_POPDEF([_AX_WITH_CURSES_CHECKEXTRA_have_header_var])dnl
+ AS_VAR_POPDEF([_AX_WITH_CURSES_CHECKEXTRA_header_var])dnl
+@@ -194,16 +205,18 @@
+ dnl Parameter 7 is the plain Curses library command line
+
+ AC_REQUIRE([AX_WITH_CURSES])
+- AC_ARG_VAR([$1_LIB], [linker library for Curses $2, e.g. $7])
++ AC_ARG_VAR([$1_LIBS], [linker library for Curses $2, e.g. $7])
+
+- AS_IF([test "x$[]$1_LIB" != x], [
+- _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [$4], [$[]$1_LIB])
++ AS_IF([test "x$[]$1_LIBS" != x], [
++ _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [$4], [$[]$1_LIBS])
+ ], [
+ AS_IF([test "x$ax_cv_curses_which" = xncursesw], [
+ _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [ncursesw/$4], [$5])
+ ], [test "x$ax_cv_curses_which" = xncurses], [
+- _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [ncurses/$4], [$6])
+ _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [$4], [$6])
++ AS_IF([test x$[]ax_cv_[]m4_tolower($1) != "xyes"], [
++ _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [ncurses/$4], [$6])
++ ])
+ ], [test "x$ax_cv_curses_which" = xplaincurses], [
+ _AX_WITH_CURSES_CHECKEXTRA([$1], [$2], [$3], [$4], [$7])
+ ])
+diff -u tlf-1.2.4.5/src/Makefile.am tlf/src/Makefile.am
+--- tlf-1.2.4.5/src/Makefile.am 2016-11-19 10:22:20.000000000 +0100
++++ tlf/src/Makefile.am 2016-12-13 08:12:33.146327500 +0100
+@@ -1,5 +1,5 @@
+ AM_CPPFLAGS = @GLIB_CFLAGS@ -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\"
+-AM_CFLAGS = @AM_CFLAGS@ @PTHREAD_CFLAGS@ @HAMLIB_CFLAGS@
++AM_CFLAGS = @AM_CFLAGS@ @PTHREAD_CFLAGS@ @HAMLIB_CFLAGS@ @CURSES_CFLAGS@
+
+ bin_PROGRAMS = tlf
+
+@@ -33,8 +33,9 @@
+ write_keyer.c writecabrillo.c writeparas.c \
+ zone_nr.c
+
+-tlf_LDADD = @LIBM_LIB@ @PTHREAD_LIBS@ @GLIB_LIBS@ @PANEL_LIB@ @CURSES_LIB@ @HAMLIB_LIBS@ \
+- @LIBXMLRPC_LIB@ @LIBXMLRPC_CLIENT_LIB@ @LIBXMLRPC_UTIL_LIB@
++tlf_LDADD = @LIBM_LIB@ @PTHREAD_LIBS@ @GLIB_LIBS@ @PANEL_LIBS@ @CURSES_LIBS@ \
++ @HAMLIB_LIBS@ @LIBXMLRPC_LIB@ @LIBXMLRPC_CLIENT_LIB@ \
++ @LIBXMLRPC_UTIL_LIB@
+
+ noinst_HEADERS = \
+ addarea.h addcall.h addmult.h addpfx.h addspot.h audio.h autocq.h \
diff --git a/media-radio/tlf/tlf-1.2.4.1.ebuild b/media-radio/tlf/tlf-1.2.4.1.ebuild
index ba691fa..19ea920 100644
--- a/media-radio/tlf/tlf-1.2.4.1.ebuild
+++ b/media-radio/tlf/tlf-1.2.4.1.ebuild
@@ -4,7 +4,7 @@
EAPI="5"
-inherit flag-o-matic multilib
+inherit autotools eutils flag-o-matic multilib
DESCRIPTION="Console-mode amateur radio contest logger"
HOMEPAGE="http://home.iae.nl/users/reinc/TLF-0.2.html"
@@ -22,6 +22,11 @@ RDEPEND="sys-libs/ncurses:=
dev-libs/xmlrpc-c[curl]"
DEPEND="${RDEPEND}"
+src_prepare() {
+ epatch "${FILESDIR}/ncurses_tinfo.patch"
+ eautoreconf
+}
+
src_configure() {
append-ldflags -L/usr/$(get_libdir)/hamlib
econf --docdir=/usr/share/doc/${PF} --enable-hamlib --enable-fldigi-xmlrpc
diff --git a/media-radio/tlf/tlf-1.2.4.5.ebuild b/media-radio/tlf/tlf-1.2.4.5.ebuild
index ff13bba..3bcb852 100644
--- a/media-radio/tlf/tlf-1.2.4.5.ebuild
+++ b/media-radio/tlf/tlf-1.2.4.5.ebuild
@@ -4,7 +4,7 @@
EAPI="5"
-inherit flag-o-matic multilib
+inherit autotools eutils flag-o-matic multilib
DESCRIPTION="Console-mode amateur radio contest logger"
HOMEPAGE="http://home.iae.nl/users/reinc/TLF-0.2.html"
@@ -22,6 +22,11 @@ RDEPEND="sys-libs/ncurses:=
dev-libs/xmlrpc-c[curl]"
DEPEND="${RDEPEND}"
+src_prepare() {
+ epatch "${FILESDIR}/ncurses_tinfo.patch"
+ eautoreconf
+}
+
src_configure() {
append-ldflags -L/usr/$(get_libdir)/hamlib
econf --docdir=/usr/share/doc/${PF} --enable-hamlib --enable-fldigi-xmlrpc
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-radio/tlf/, media-radio/tlf/files/
@ 2020-09-13 15:59 Thomas Beierlein
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Beierlein @ 2020-09-13 15:59 UTC (permalink / raw
To: gentoo-commits
commit: 7a5ea90f63bbe555800d36404d956a958673b59c
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sun Sep 13 15:57:17 2020 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sun Sep 13 15:59:02 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a5ea90f
media-radio/tlf: Fix failig test (bug #740298)
Thanks ago for reporting
Closes: https://bugs.gentoo.org/740298
Package-Manager: Portage-3.0.6, Repoman-3.0.1
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
media-radio/tlf/files/tlf-1.4.1-zone_nr.patch | 20 ++++++++++++++++++++
media-radio/tlf/tlf-1.4.1.ebuild | 2 ++
2 files changed, 22 insertions(+)
diff --git a/media-radio/tlf/files/tlf-1.4.1-zone_nr.patch b/media-radio/tlf/files/tlf-1.4.1-zone_nr.patch
new file mode 100644
index 00000000000..cc5cf377592
--- /dev/null
+++ b/media-radio/tlf/files/tlf-1.4.1-zone_nr.patch
@@ -0,0 +1,20 @@
+diff --git a/src/zone_nr.c b/src/zone_nr.c
+index c7e2a33..805bd4e 100644
+--- a/src/zone_nr.c
++++ b/src/zone_nr.c
+@@ -20,11 +20,14 @@
+ * get zone number
+ *
+ *--------------------------------------------------------------*/
+-
++#include "string.h"
+
+ int zone_nr(char *comment) {
+ int z = 0;
+
++ if (strlen(comment) < 2)
++ return z;
++
+ if (comment[0] <= 57 && comment[0] >= 48)
+ z = (comment[0] - 48) * 10;
+ if (comment[1] <= 57 && comment[1] >= 48)
diff --git a/media-radio/tlf/tlf-1.4.1.ebuild b/media-radio/tlf/tlf-1.4.1.ebuild
index 23bc6b749b8..8da29357b28 100644
--- a/media-radio/tlf/tlf-1.4.1.ebuild
+++ b/media-radio/tlf/tlf-1.4.1.ebuild
@@ -25,6 +25,8 @@ DEPEND="
${RDEPEND}
test? ( dev-util/cmocka )"
+PATCHES=( "${FILESDIR}"/${P}-zone_nr.patch )
+
src_configure() {
append-ldflags -L/usr/$(get_libdir)/hamlib
econf --enable-fldigi-xmlrpc
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-radio/tlf/, media-radio/tlf/files/
@ 2022-02-05 7:45 Thomas Beierlein
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Beierlein @ 2022-02-05 7:45 UTC (permalink / raw
To: gentoo-commits
commit: 3b77983e37c3c7b787b3408cd084cfb91ba423a3
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 5 07:40:07 2022 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sat Feb 5 07:44:24 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3b77983e
media-radio/tlf: Fix musl build errors
Closes: https://bugs.gentoo.org/832234
Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
media-radio/tlf/files/tlf-1.4.1-musl.patch | 12 ++++++++++++
media-radio/tlf/tlf-1.4.1-r1.ebuild | 12 ++++++++----
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/media-radio/tlf/files/tlf-1.4.1-musl.patch b/media-radio/tlf/files/tlf-1.4.1-musl.patch
new file mode 100644
index 000000000000..a4903015011d
--- /dev/null
+++ b/media-radio/tlf/files/tlf-1.4.1-musl.patch
@@ -0,0 +1,12 @@
+diff --git a/src/sockserv.c b/src/sockserv.c
+index c25f0fb..647188f 100644
+--- a/src/sockserv.c
++++ b/src/sockserv.c
+@@ -31,6 +31,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <unistd.h>
++#include <sys/select.h>
+
+ #include "sockserv.h"
+ #include "tlf_curses.h"
diff --git a/media-radio/tlf/tlf-1.4.1-r1.ebuild b/media-radio/tlf/tlf-1.4.1-r1.ebuild
index 897ebe600935..c19feb243da0 100644
--- a/media-radio/tlf/tlf-1.4.1-r1.ebuild
+++ b/media-radio/tlf/tlf-1.4.1-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2021 Gentoo Authors
+# Copyright 1999-2022 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="7"
@@ -20,23 +20,27 @@ RDEPEND="sys-libs/ncurses:=
dev-libs/glib:2
media-libs/hamlib:=
media-sound/sox
- dev-libs/xmlrpc-c[curl]"
+ dev-libs/xmlrpc-c[curl]
+ elibc_musl? ( sys-libs/argp-standalone )"
DEPEND="
${RDEPEND}
test? ( dev-util/cmocka )"
-PATCHES=( "${FILESDIR}"/${P}-zone_nr.patch )
+PATCHES=( "${FILESDIR}/${P}-zone_nr.patch"
+ "${FILESDIR}/${P}-musl.patch"
+ )
src_prepare() {
if has_version '>=media-libs/hamlib-4.2' ; then
sed -i -e "s/FILPATHLEN/HAMLIB_FILPATHLEN/g" "${S}"/src/sendqrg.c || die
fi
- eapply ${PATCHES}
+ eapply ${PATCHES[@]}
eapply_user
}
src_configure() {
+ use elibc_musl && append-libs argp
append-ldflags -L/usr/$(get_libdir)/hamlib
econf --enable-fldigi-xmlrpc
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-radio/tlf/, media-radio/tlf/files/
@ 2022-10-23 16:22 Thomas Beierlein
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Beierlein @ 2022-10-23 16:22 UTC (permalink / raw
To: gentoo-commits
commit: 06218fe92fee66e591a571752a18b2e35ce66419
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Sun Oct 23 16:21:04 2022 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Sun Oct 23 16:21:42 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06218fe9
media-radio/tlf: Drop -flto and fix some warnings
Closes: https://bugs.gentoo.org/876418
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
media-radio/tlf/files/tlf-1.4.1-missing-include.patch | 10 ++++++++++
media-radio/tlf/tlf-1.4.1-r1.ebuild | 2 ++
2 files changed, 12 insertions(+)
diff --git a/media-radio/tlf/files/tlf-1.4.1-missing-include.patch b/media-radio/tlf/files/tlf-1.4.1-missing-include.patch
new file mode 100644
index 000000000000..55cb7a48477e
--- /dev/null
+++ b/media-radio/tlf/files/tlf-1.4.1-missing-include.patch
@@ -0,0 +1,10 @@
+diff --git a/test/test_wwv.c b/test/test_wwv.c
+index f4e20ac..0fa82da 100644
+--- a/test/test_wwv.c
++++ b/test/test_wwv.c
+@@ -1,4 +1,5 @@
+ #include "test.h"
++#include <glib.h>
+
+ #include "../src/getwwv.h"
+
diff --git a/media-radio/tlf/tlf-1.4.1-r1.ebuild b/media-radio/tlf/tlf-1.4.1-r1.ebuild
index c19feb243da0..71731baea4a5 100644
--- a/media-radio/tlf/tlf-1.4.1-r1.ebuild
+++ b/media-radio/tlf/tlf-1.4.1-r1.ebuild
@@ -28,6 +28,7 @@ DEPEND="
PATCHES=( "${FILESDIR}/${P}-zone_nr.patch"
"${FILESDIR}/${P}-musl.patch"
+ "${FILESDIR}/${P}-missing-include.patch"
)
src_prepare() {
@@ -42,5 +43,6 @@ src_prepare() {
src_configure() {
use elibc_musl && append-libs argp
append-ldflags -L/usr/$(get_libdir)/hamlib
+ filter-lto # bug # 876418
econf --enable-fldigi-xmlrpc
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-radio/tlf/, media-radio/tlf/files/
@ 2023-07-04 17:35 Thomas Beierlein
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Beierlein @ 2023-07-04 17:35 UTC (permalink / raw
To: gentoo-commits
commit: ae348f36a8e2b3f7e55ede95c86785fe24e6952f
Author: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
AuthorDate: Tue Jul 4 17:33:03 2023 +0000
Commit: Thomas Beierlein <tomjbe <AT> gentoo <DOT> org>
CommitDate: Tue Jul 4 17:35:30 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ae348f36
media-radio/tlf: provide fallback definitions for M_PI and M_PI_2
C Standard does not guarantee the presence of both definitions in every
circumstance.
Closes: https://bugs.gentoo.org/907442
Signed-off-by: Thomas Beierlein <tomjbe <AT> gentoo.org>
media-radio/tlf/files/tlf-1.4.1-pi.patch | 47 ++++++++++++++++++++++++++
media-radio/tlf/tlf-1.4.1-r4.ebuild | 58 ++++++++++++++++++++++++++++++++
2 files changed, 105 insertions(+)
diff --git a/media-radio/tlf/files/tlf-1.4.1-pi.patch b/media-radio/tlf/files/tlf-1.4.1-pi.patch
new file mode 100644
index 000000000000..586ce973cc1a
--- /dev/null
+++ b/media-radio/tlf/files/tlf-1.4.1-pi.patch
@@ -0,0 +1,47 @@
+# As C standards does not define M_PI or M_PI_2 provide a fallback
+# bug 907442
+diff --git a/src/muf.c b/src/muf.c
+index 6671651..1f880fd 100644
+--- a/src/muf.c
++++ b/src/muf.c
+@@ -32,6 +32,10 @@
+ #include "tlf_panel.h"
+ #include "ui_utils.h"
+
++#ifndef M_PI_2
++ # define M_PI_2 1.57079632679489661923 /* pi/2 */
++#endif
++
+
+ // message splitters:
+ // line[0] - original line, content can be modified in-place
+diff --git a/src/qrb.h b/src/qrb.h
+index 89d3f30..0120de0 100644
+--- a/src/qrb.h
++++ b/src/qrb.h
+@@ -21,6 +21,10 @@
+ #ifndef QRB_H
+ #define QRB_H
+
++#ifndef M_PI
++ # define M_PI 3.14159265358979323846 /* pi */
++#endif
++
+ #define ARC_IN_KM 111.2
+ #define RADIAN (180.0 / M_PI)
+
+diff --git a/src/sunup.c b/src/sunup.c
+index b1186dd..7412c06 100644
+--- a/src/sunup.c
++++ b/src/sunup.c
+@@ -23,6 +23,10 @@
+
+ #include "get_time.h"
+
++#ifndef M_PI
++ # define M_PI 3.14159265358979323846 /* pi */
++#endif
++
+ #define RADIAN (180.0 / M_PI)
+
+
diff --git a/media-radio/tlf/tlf-1.4.1-r4.ebuild b/media-radio/tlf/tlf-1.4.1-r4.ebuild
new file mode 100644
index 000000000000..a0c1a639f712
--- /dev/null
+++ b/media-radio/tlf/tlf-1.4.1-r4.ebuild
@@ -0,0 +1,58 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="7"
+
+inherit autotools flag-o-matic
+
+DESCRIPTION="Console-mode amateur radio contest logger"
+HOMEPAGE="http://home.iae.nl/users/reinc/TLF-0.2.html"
+SRC_URI="mirror://nongnu/${PN}/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+RESTRICT="!test? ( test )"
+
+RDEPEND="sys-libs/ncurses:=
+ dev-libs/glib:2
+ media-libs/hamlib:=
+ media-sound/sox
+ dev-libs/xmlrpc-c[curl]
+ elibc_musl? ( sys-libs/argp-standalone )"
+DEPEND="
+ ${RDEPEND}
+ test? ( dev-util/cmocka )"
+
+PATCHES=( "${FILESDIR}/${P}-zone_nr.patch"
+ "${FILESDIR}/${P}-musl.patch"
+ "${FILESDIR}/${P}-missing-include.patch"
+ "${FILESDIR}/${P}-prototypes.patch"
+ "${FILESDIR}/${P}-pi.patch"
+ )
+
+# suppress warning wrt 'implicit function declaration' in config logs
+# bug #899842
+QA_CONFIG_IMPL_DECL_SKIP=(
+ wget_wch # designed to check availability of various ncursesw
+ # header files
+ )
+
+src_prepare() {
+ if has_version '>=media-libs/hamlib-4.2' ; then
+ sed -i -e "s/FILPATHLEN/HAMLIB_FILPATHLEN/g" "${S}"/src/sendqrg.c || die
+ fi
+
+ eapply ${PATCHES[@]}
+ eapply_user
+ eautoreconf
+}
+
+src_configure() {
+ use elibc_musl && append-libs argp
+ append-ldflags -L/usr/$(get_libdir)/hamlib
+ filter-lto # bug # 876418
+ econf --enable-fldigi-xmlrpc
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-04 17:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-05 7:45 [gentoo-commits] repo/gentoo:master commit in: media-radio/tlf/, media-radio/tlf/files/ Thomas Beierlein
-- strict thread matches above, loose matches on Subject: below --
2023-07-04 17:35 Thomas Beierlein
2022-10-23 16:22 Thomas Beierlein
2020-09-13 15:59 Thomas Beierlein
2016-12-16 7:21 Thomas Beierlein
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox