diff mbox series

[1/1] package/lrzsz: bump to latest git commit

Message ID 20240726092042.1273023-1-fontaine.fabrice@gmail.com
State New
Headers show
Series [1/1] package/lrzsz: bump to latest git commit | expand

Commit Message

Fabrice Fontaine July 26, 2024, 9:20 a.m. UTC
- Switch to github to get latest code
- LRZSZ_POST_EXTRACT_HOOKS must be added to remove wrong links on
  /usr/share/automake-1.16/config.{guess,sub} which were added by
  https://github.com/UweOhse/lrzsz/commit/f02af40d15bade4c07e057f4b3baccd341b692b6
- timesync dropped by
  https://github.com/UweOhse/lrzsz/commit/6322e4944c11373eeadc346e838351874b7d799f
- This bump will also fix the following build failure with gcc >= 14:

  configure:1011:1: error: return type defaults to 'int' [-Wimplicit-int]
   1011 | main(){return(0);}
        | ^~~~

  [...]

  configure: error: installation or configuration problem: C compiler cannot create executables.

Fixes:
 - http://autobuild.buildroot.org/results/076db37c936786291028b770ef2f83cd39f87ef3

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...-lib-long-options-c-include-stdlib-h.patch | 41 +++++++++++++++++++
 .../0002-configure.ac-check-locale.h.patch    | 31 ++++++++++++++
 package/lrzsz/lrzsz.hash                      |  2 +-
 package/lrzsz/lrzsz.mk                        | 13 ++++--
 4 files changed, 83 insertions(+), 4 deletions(-)
 create mode 100644 package/lrzsz/0001-lib-long-options-c-include-stdlib-h.patch
 create mode 100644 package/lrzsz/0002-configure.ac-check-locale.h.patch

Comments

Thomas Petazzoni July 29, 2024, 9:22 p.m. UTC | #1
Hello Fabrice,

On Fri, 26 Jul 2024 11:20:42 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> +# Remove links on /usr/share/automake-1.16/config.{guess,sub}
> +define LRZSZ_REMOVE_WRONG_LINKS
> +	$(RM) $(@D)/build-aux/config.{guess,sub}

Are you sure it's not all symlinks in build-aux/ that are broken? All
of them point to /usr/share, which is nuts.

No commits in the past 4 years in this Github repo... doesn't seem
really well maintained, but oh well :-/

Thomas
diff mbox series

Patch

diff --git a/package/lrzsz/0001-lib-long-options-c-include-stdlib-h.patch b/package/lrzsz/0001-lib-long-options-c-include-stdlib-h.patch
new file mode 100644
index 0000000000..61d8b2fc6d
--- /dev/null
+++ b/package/lrzsz/0001-lib-long-options-c-include-stdlib-h.patch
@@ -0,0 +1,41 @@ 
+From 835071aa51203a0c6dfa4d950319f4c51589aad8 Mon Sep 17 00:00:00 2001
+From: Yegor Yefremov <yegorslists@googlemail.com>
+Date: Tue, 21 May 2024 11:13:17 +0200
+Subject: [PATCH] lib/long-options.c: include stdlib.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Fixes the following error (compiled with GCC 14.x):
+
+long-options.c:70:11: error: implicit declaration of function ‘exit’
+[-Wimplicit-function-declaration]
+   70 |           exit (0);
+      |           ^~~~
+
+Upstream: https://github.com/UweOhse/lrzsz/pull/4
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+---
+ lib/long-options.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+diff --git a/lib/long-options.c b/lib/long-options.c
+index fe069fd..9553a31 100644
+--- a/lib/long-options.c
++++ b/lib/long-options.c
+@@ -22,6 +22,15 @@
+ #endif
+ 
+ #include <stdio.h>
++
++/* This needs to come after some library #include
++   to get __GNU_LIBRARY__ defined.  */
++#ifdef	__GNU_LIBRARY__
++/* Don't include stdlib.h for non-GNU C libraries because some of them
++   contain conflicting prototypes for getopt.  */
++#include <stdlib.h>
++#endif	/* GNU C library.  */
++
+ #include <getopt.h>
+ #include "long-options.h"
+ 
diff --git a/package/lrzsz/0002-configure.ac-check-locale.h.patch b/package/lrzsz/0002-configure.ac-check-locale.h.patch
new file mode 100644
index 0000000000..792f204994
--- /dev/null
+++ b/package/lrzsz/0002-configure.ac-check-locale.h.patch
@@ -0,0 +1,31 @@ 
+From 5775f66ae3bbe8a481d1dadc9580fff3f94b0c01 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Thu, 25 Jul 2024 11:05:58 +0200
+Subject: [PATCH] configure.ac: check locale.h
+
+Check locale.h to avoid a build failure with NLS
+
+Fix #1
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Upstream: https://github.com/UweOhse/lrzsz/pull/6
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6895c30..c42bfe0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -101,7 +101,7 @@ AC_CHECK_LIB(intl,gettext,,,)
+ dnl Checks for header files.
+ AC_HEADER_STDC
+ AC_HEADER_MAJOR
+-AC_CHECK_HEADERS(fcntl.h limits.h sys/ioctl.h sys/time.h unistd.h sys/times.h)
++AC_CHECK_HEADERS(fcntl.h limits.h locale.h sys/ioctl.h sys/time.h unistd.h sys/times.h)
+ LRZSZ_HEADERS_TERM_IO
+ AC_CHECK_HEADERS(sys/mman.h utime.h syslog.h sys/syslog.h sys/param.h)
+ AC_CHECK_HEADERS(sys/select.h strings.h)
+-- 
+2.43.0
+
diff --git a/package/lrzsz/lrzsz.hash b/package/lrzsz/lrzsz.hash
index cd8dd6f489..dd48c450f7 100644
--- a/package/lrzsz/lrzsz.hash
+++ b/package/lrzsz/lrzsz.hash
@@ -1,3 +1,3 @@ 
 # Locally calculated
-sha256  c28b36b14bddb014d9e9c97c52459852f97bd405f89113f30bee45ed92728ff1  lrzsz-0.12.20.tar.gz
+sha256  56f79c3eb8f6b140693667802d516824c2e115a83d15e1b4d5adbe1deab7c2e0  lrzsz-8cb2a6a29f6345f84d5e8248e2d3376166ab844f.tar.gz
 sha256  dcc100d4161cc0b7177545ab6e47216f84857cda3843847c792a25289852dcaa  COPYING
diff --git a/package/lrzsz/lrzsz.mk b/package/lrzsz/lrzsz.mk
index 7247a4bd59..75ab812f0a 100644
--- a/package/lrzsz/lrzsz.mk
+++ b/package/lrzsz/lrzsz.mk
@@ -4,14 +4,21 @@ 
 #
 ################################################################################
 
-LRZSZ_VERSION = 0.12.20
-LRZSZ_SITE = http://www.ohse.de/uwe/releases
-LRZSZ_CONF_OPTS = --disable-timesync
+LRZSZ_VERSION = 8cb2a6a29f6345f84d5e8248e2d3376166ab844f
+LRZSZ_SITE = $(call github,UweOhse,lrzsz,$(LRZSZ_VERSION))
 LRZSZ_LICENSE = GPL-2.0+
 LRZSZ_LICENSE_FILES = COPYING
 LRZSZ_CPE_ID_VALID = YES
 LRZSZ_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
 LRZSZ_CONF_ENV = LIBS=$(TARGET_NLS_LIBS)
+# From git
+LRZSZ_AUTORECONF = YES
+
+# Remove links on /usr/share/automake-1.16/config.{guess,sub}
+define LRZSZ_REMOVE_WRONG_LINKS
+	$(RM) $(@D)/build-aux/config.{guess,sub}
+endef
+LRZSZ_POST_EXTRACT_HOOKS += LRZSZ_REMOVE_WRONG_LINKS
 
 define LRZSZ_INSTALL_TARGET_CMDS
 	$(INSTALL) -m 0755 -D $(@D)/src/lrz $(TARGET_DIR)/usr/bin/rz