Sunday, January 31, 2021

Update net/echoping [WIP]

Came here for "-fno-common".

Not sure why we're patching things in our 5.2.0 version from 2004 when
there was 6.0.0 released in 2007.

6.0.1 came out a month after and marked the end of echoping.
Upstream moved code to https://framagit.org and confusingly enough,
https://framagit.org/bortzmeyer/echoping/-/blob/master/SRC/ChangeLog
shows 6.0.1 as last release with 6.1 marked as "NOT YET", even though
https://framagit.org/bortzmeyer/echoping/-/blob/master/README.md says

echoping is no longer maintained. This repository is for historical interest only.

To add to that, https://framagit.org/bortzmeyer/echoping/-/tags shows
a 6.0.2 tag (not listed in ChangeLog).

FreeBSD now simply fetches latest HEAD and packages it as 6.0.2;
we can do the same or use the 6.0.2 tag from 13 years ago, which is what
I did below.

From there on, I fail to satisfy the autoconf thing as it always fails
with

Running autoconf-2.54 in /usr/ports/pobj/echoping-6.0.2/echoping-RELEASE_6_0_2/SRC
configure.ac:6: error: possibly undefined macro: AM_INIT_AUTOMAKE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
configure.ac:7: error: possibly undefined macro: AM_CONFIG_HEADER
configure:1935: error: possibly undefined macro: AC_LIBTOOL_DLOPEN
configure:1936: error: possibly undefined macro: AC_PROG_LIBTOOL

Diff below is what I've got for the update; patches have been merged
upstream.

Does someone want to massage that diff in and keep echoping alive
(until upstream drops it completely)?


Index: Makefile
===================================================================
RCS file: /cvs/ports/net/echoping/Makefile,v
retrieving revision 1.13
diff -u -p -r1.13 Makefile
--- Makefile 17 Jul 2019 14:46:33 -0000 1.13
+++ Makefile 1 Feb 2021 00:02:43 -0000
@@ -2,12 +2,13 @@

COMMENT= test performance of a remote TCP service

-VERSION= 5.2.0
-REVISION= 3
-DISTNAME= echoping-${VERSION}
+VERSION= 6.0.2
+RELEASE= RELEASE_${VERSION:S/./_/g}
+DISTNAME= echoping-${RELEASE}
+PKGNAME= echoping-${VERSION}
CATEGORIES= net

-MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=echoping/}
+MASTER_SITES= https://framagit.org/bortzmeyer/echoping/-/archive/${RELEASE}/

HOMEPAGE= https://github.com/bortzmeyer/echoping

@@ -17,7 +18,8 @@ WANTLIB= c crypto m ssl

NO_TEST= Yes

-CONFIGURE_STYLE= gnu
+AUTOCONF_VERSION= 2.54
+CONFIGURE_STYLE= autoconf
CONFIGURE_ARGS+= --enable-http \
--enable-icp \
--enable-smtp \
@@ -25,5 +27,14 @@ CONFIGURE_ARGS+= --enable-http \
--without-libidn \
--with-ssl=/usr

+WRKDIST= ${WRKDIR}/${DISTNAME}/SRC
+
+# from https://svnweb.freebsd.org/ports/head/net/echoping/Makefile?revision=544003&view=co
+pre-configure
:
+ find ${WRKSRC} -name configure.ac -execdir sh -c '\
+ cat ${WRKSRC}/configure-common.ac > configure.ac.tmp && \
+ sed '/configure-common\.ac/d' configure.ac >> configure.ac.tmp && \
+ mv configure.ac.tmp configure.ac' \;
+ sed -i '/^echoping_LDADD =/s/$$/ -lm/' ${WRKSRC}/Makefile.am

.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/net/echoping/distinfo,v
retrieving revision 1.5
diff -u -p -r1.5 distinfo
--- distinfo 18 Jan 2015 03:14:38 -0000 1.5
+++ distinfo 31 Jan 2021 23:19:35 -0000
@@ -1,2 +1,2 @@
-SHA256 (echoping-5.2.0.tar.gz) = t8lCifhgcW6P64pTRI1NOnwZcoQAdV28WE5zGQSsa78=
-SIZE (echoping-5.2.0.tar.gz) = 120911
+SHA256 (echoping-RELEASE_6_0_2.tar.gz) = LwOSnCcB01ywR4AMIm+aToN7EZT/ixLDCeJ/KZ9v7cA=
+SIZE (echoping-RELEASE_6_0_2.tar.gz) = 77792
Index: patches/patch-configure
===================================================================
RCS file: patches/patch-configure
diff -N patches/patch-configure
--- patches/patch-configure 28 Apr 2018 20:50:52 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-configure,v 1.1 2018/04/28 20:50:52 jca Exp $
-
-Index: configure
---- configure.orig
-+++ configure
-@@ -4432,9 +4432,8 @@ cat >>conftest.$ac_ext <<_ACEOF
- int
- main ()
- {
--pow(a,b)
-+return pow(a,b)
- ;
-- return 0;
- }
- _ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
Index: patches/patch-util_c
===================================================================
RCS file: patches/patch-util_c
diff -N patches/patch-util_c
--- patches/patch-util_c 28 Apr 2018 20:33:55 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-util_c,v 1.1 2018/04/28 20:33:55 tb Exp $
-
-Index: util.c
---- util.c.orig
-+++ util.c
-@@ -13,7 +13,7 @@ random_string (unsigned length)
- {
-
- char *state = (char *) malloc (sizeof (char) * STATES);
-- char *result = (char *) malloc (length);
-+ char *result = (char *) malloc (length + 1);
- int i, number;
- unsigned seed = (unsigned) time ((time_t *) NULL);
-

No comments:

Post a Comment