Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] yersinia: simplify cross-build patch
@ 2020-12-31  0:31 ndowens
  2020-12-31  0:35 ` [PR PATCH] [Updated] " ndowens
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: ndowens @ 2020-12-31  0:31 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 322 bytes --]

There is a new pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568

yersinia: simplify cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8283 bytes --]

From b2f08b6d07c9ab7da7787b69cf8f9e79ed5ed602 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch

---
 srcpkgs/yersinia/patches/0001-fix-cross.patch |  53 ++++++
 srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
 srcpkgs/yersinia/template                     |   5 +-
 3 files changed, 56 insertions(+), 178 deletions(-)
 create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
 delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch

diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+ 		
+ 	/* else suck, no good */
+     exit(-1);
+-}],
++}])],
+ 	[
+ 	if test $disable_bpf = no ; then
+ 	    AC_DEFINE([HAVE_BPF], [1], 
+@@ -217,7 +217,7 @@ dnl   AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+ 
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR  1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+ 
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+-- 
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- configure.orig
-+++ configure
-@@ -4843,59 +4843,6 @@
- 
- disable_bpf=no
- have_bpf=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
--$as_echo_n "checking for BPF device sending support... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--int
--main(int argc, char *argv[]) {
--	int fd;
--
--	fd = open("/dev/bpf0", O_RDONLY, 0);
--
--	/* if we opened it, we're good */
--	if (fd > 1)
--		exit(0);
--
--	/* if we got EBUSY or permission denied it exists, so we're good */
--	if (fd < 0 && (errno == EBUSY || errno == 13))
--		exit(0);
--
--	/* else suck, no good */
--    exit(-1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--	if test $disable_bpf = no ; then
--
--$as_echo "#define HAVE_BPF 1" >>confdefs.h
--
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--		have_bpf=yes
--	else
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--	fi
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
- $as_echo_n "checking for a complete set of libnet headers... " >&6; }
-@@ -4947,11 +4894,6 @@
-    LIBNET_INCLUDE="-I$libnet_dir"
-    LIBNET_LINK="-L`dirname $libnet_dir`/lib"
-    LIBNET_CONFIG="$libnet_config_dir/libnet-config"
--
--
--
--
--
- fi
- 
- if test "$LIBNET_LINK" != "-L/usr/lib" ; then
-@@ -4961,99 +4903,7 @@
-   CFLAGS="$CFLAGS $LIBNET_INCLUDE"
- fi
- 
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
--$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
--if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lnet  $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char libnet_build_stp_conf ();
--int
--main ()
--{
--return libnet_build_stp_conf ();
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_net_libnet_build_stp_conf=yes
--else
--  ac_cv_lib_net_libnet_build_stp_conf=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
--$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
--if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
--  have_libnet=yes
--else
--  have_libnet=no
--fi
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
--$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include<stdio.h>
--#include<libnet.h>
--#define HOPE_MAJOR  1
--#define HOPE_MEDIUM 1
--#define HOPE_MINOR  2
--int main()
--{
--  unsigned int major,medium,minor,current, desired;
--  desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
--  sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
--  current = major*10000 + medium*100 + minor;
--  if ( current >= desired )
--     exit(0);
--  exit(1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }; have_libnet=yes
--else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
-+have_libnet=yes
- 
- for ac_header in sys/sockio.h sys/ioctl.h net/if.h
- do :
-
diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template
index f9d57cfe9ff..53dd9d110cb 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -17,7 +17,8 @@ if [ -n "$CROSS_BUILD" ]; then
 	hostmakedepends+=" ${makedepends}"
 fi
 
-post_configure() {
+pre_configure() {
 	# configure doesn't honor env CFLAGS
-	vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+	#vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+	autoreconf -fi
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] yersinia: simplify cross-build patch
  2020-12-31  0:31 [PR PATCH] yersinia: simplify cross-build patch ndowens
@ 2020-12-31  0:35 ` ndowens
  2020-12-31  0:37 ` ndowens
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ndowens @ 2020-12-31  0:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

There is an updated pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568

yersinia: simplify cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8602 bytes --]

From dd09c15de4716017250d2206dd0e45c5071985b0 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch

---
 srcpkgs/yersinia/patches/0001-fix-cross.patch |  53 ++++++
 srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
 srcpkgs/yersinia/template                     |   7 +-
 3 files changed, 56 insertions(+), 180 deletions(-)
 create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
 delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch

diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+ 		
+ 	/* else suck, no good */
+     exit(-1);
+-}],
++}])],
+ 	[
+ 	if test $disable_bpf = no ; then
+ 	    AC_DEFINE([HAVE_BPF], [1], 
+@@ -217,7 +217,7 @@ dnl   AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+ 
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR  1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+ 
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+-- 
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- configure.orig
-+++ configure
-@@ -4843,59 +4843,6 @@
- 
- disable_bpf=no
- have_bpf=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
--$as_echo_n "checking for BPF device sending support... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--int
--main(int argc, char *argv[]) {
--	int fd;
--
--	fd = open("/dev/bpf0", O_RDONLY, 0);
--
--	/* if we opened it, we're good */
--	if (fd > 1)
--		exit(0);
--
--	/* if we got EBUSY or permission denied it exists, so we're good */
--	if (fd < 0 && (errno == EBUSY || errno == 13))
--		exit(0);
--
--	/* else suck, no good */
--    exit(-1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--	if test $disable_bpf = no ; then
--
--$as_echo "#define HAVE_BPF 1" >>confdefs.h
--
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--		have_bpf=yes
--	else
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--	fi
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
- $as_echo_n "checking for a complete set of libnet headers... " >&6; }
-@@ -4947,11 +4894,6 @@
-    LIBNET_INCLUDE="-I$libnet_dir"
-    LIBNET_LINK="-L`dirname $libnet_dir`/lib"
-    LIBNET_CONFIG="$libnet_config_dir/libnet-config"
--
--
--
--
--
- fi
- 
- if test "$LIBNET_LINK" != "-L/usr/lib" ; then
-@@ -4961,99 +4903,7 @@
-   CFLAGS="$CFLAGS $LIBNET_INCLUDE"
- fi
- 
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
--$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
--if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lnet  $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char libnet_build_stp_conf ();
--int
--main ()
--{
--return libnet_build_stp_conf ();
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_net_libnet_build_stp_conf=yes
--else
--  ac_cv_lib_net_libnet_build_stp_conf=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
--$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
--if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
--  have_libnet=yes
--else
--  have_libnet=no
--fi
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
--$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include<stdio.h>
--#include<libnet.h>
--#define HOPE_MAJOR  1
--#define HOPE_MEDIUM 1
--#define HOPE_MINOR  2
--int main()
--{
--  unsigned int major,medium,minor,current, desired;
--  desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
--  sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
--  current = major*10000 + medium*100 + minor;
--  if ( current >= desired )
--     exit(0);
--  exit(1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }; have_libnet=yes
--else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
-+have_libnet=yes
- 
- for ac_header in sys/sockio.h sys/ioctl.h net/if.h
- do :
-
diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template
index f9d57cfe9ff..182d5d77041 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -4,7 +4,7 @@ version=0.8.2
 revision=2
 build_style=gnu-configure
 configure_args="--disable-gtk"
-hostmakedepends="pkg-config automake"
+hostmakedepends="pkg-config automake gettext-devel"
 makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel"
 short_desc="Framework for layer 2 security testing"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
@@ -17,7 +17,6 @@ if [ -n "$CROSS_BUILD" ]; then
 	hostmakedepends+=" ${makedepends}"
 fi
 
-post_configure() {
-	# configure doesn't honor env CFLAGS
-	vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+pre_configure() {
+	autoreconf -fi
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] yersinia: simplify cross-build patch
  2020-12-31  0:31 [PR PATCH] yersinia: simplify cross-build patch ndowens
  2020-12-31  0:35 ` [PR PATCH] [Updated] " ndowens
@ 2020-12-31  0:37 ` ndowens
  2020-12-31  0:39 ` ndowens
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ndowens @ 2020-12-31  0:37 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

There is an updated pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568

yersinia: simplify cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8596 bytes --]

From 8df1fc2e84c6f9ba55117350fb3dfd1d8b478abc Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch

---
 srcpkgs/yersinia/patches/0001-fix-cross.patch |  53 ++++++
 srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
 srcpkgs/yersinia/template                     |   7 +-
 3 files changed, 56 insertions(+), 180 deletions(-)
 create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
 delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch

diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+ 		
+ 	/* else suck, no good */
+     exit(-1);
+-}],
++}])],
+ 	[
+ 	if test $disable_bpf = no ; then
+ 	    AC_DEFINE([HAVE_BPF], [1], 
+@@ -217,7 +217,7 @@ dnl   AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+ 
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR  1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+ 
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+-- 
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- configure.orig
-+++ configure
-@@ -4843,59 +4843,6 @@
- 
- disable_bpf=no
- have_bpf=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
--$as_echo_n "checking for BPF device sending support... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--int
--main(int argc, char *argv[]) {
--	int fd;
--
--	fd = open("/dev/bpf0", O_RDONLY, 0);
--
--	/* if we opened it, we're good */
--	if (fd > 1)
--		exit(0);
--
--	/* if we got EBUSY or permission denied it exists, so we're good */
--	if (fd < 0 && (errno == EBUSY || errno == 13))
--		exit(0);
--
--	/* else suck, no good */
--    exit(-1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--	if test $disable_bpf = no ; then
--
--$as_echo "#define HAVE_BPF 1" >>confdefs.h
--
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--		have_bpf=yes
--	else
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--	fi
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
- $as_echo_n "checking for a complete set of libnet headers... " >&6; }
-@@ -4947,11 +4894,6 @@
-    LIBNET_INCLUDE="-I$libnet_dir"
-    LIBNET_LINK="-L`dirname $libnet_dir`/lib"
-    LIBNET_CONFIG="$libnet_config_dir/libnet-config"
--
--
--
--
--
- fi
- 
- if test "$LIBNET_LINK" != "-L/usr/lib" ; then
-@@ -4961,99 +4903,7 @@
-   CFLAGS="$CFLAGS $LIBNET_INCLUDE"
- fi
- 
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
--$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
--if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lnet  $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char libnet_build_stp_conf ();
--int
--main ()
--{
--return libnet_build_stp_conf ();
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_net_libnet_build_stp_conf=yes
--else
--  ac_cv_lib_net_libnet_build_stp_conf=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
--$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
--if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
--  have_libnet=yes
--else
--  have_libnet=no
--fi
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
--$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include<stdio.h>
--#include<libnet.h>
--#define HOPE_MAJOR  1
--#define HOPE_MEDIUM 1
--#define HOPE_MINOR  2
--int main()
--{
--  unsigned int major,medium,minor,current, desired;
--  desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
--  sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
--  current = major*10000 + medium*100 + minor;
--  if ( current >= desired )
--     exit(0);
--  exit(1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }; have_libnet=yes
--else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
-+have_libnet=yes
- 
- for ac_header in sys/sockio.h sys/ioctl.h net/if.h
- do :
-
diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template
index f9d57cfe9ff..550ca7daab2 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -4,7 +4,7 @@ version=0.8.2
 revision=2
 build_style=gnu-configure
 configure_args="--disable-gtk"
-hostmakedepends="pkg-config automake"
+hostmakedepends="pkg-config automake gettext"
 makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel"
 short_desc="Framework for layer 2 security testing"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
@@ -17,7 +17,6 @@ if [ -n "$CROSS_BUILD" ]; then
 	hostmakedepends+=" ${makedepends}"
 fi
 
-post_configure() {
-	# configure doesn't honor env CFLAGS
-	vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+pre_configure() {
+	autoreconf -fi
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] yersinia: simplify cross-build patch
  2020-12-31  0:31 [PR PATCH] yersinia: simplify cross-build patch ndowens
  2020-12-31  0:35 ` [PR PATCH] [Updated] " ndowens
  2020-12-31  0:37 ` ndowens
@ 2020-12-31  0:39 ` ndowens
  2020-12-31  0:45 ` ndowens
  2020-12-31  0:47 ` ndowens
  4 siblings, 0 replies; 6+ messages in thread
From: ndowens @ 2020-12-31  0:39 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

There is an updated pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568

yersinia: simplify cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8610 bytes --]

From 50e2768971e5ef3ca3cdb4bccb34bef8cae0392c Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch

---
 srcpkgs/yersinia/patches/0001-fix-cross.patch |  53 ++++++
 srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
 srcpkgs/yersinia/template                     |   7 +-
 3 files changed, 56 insertions(+), 180 deletions(-)
 create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
 delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch

diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+ 		
+ 	/* else suck, no good */
+     exit(-1);
+-}],
++}])],
+ 	[
+ 	if test $disable_bpf = no ; then
+ 	    AC_DEFINE([HAVE_BPF], [1], 
+@@ -217,7 +217,7 @@ dnl   AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+ 
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR  1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+ 
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+-- 
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- configure.orig
-+++ configure
-@@ -4843,59 +4843,6 @@
- 
- disable_bpf=no
- have_bpf=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
--$as_echo_n "checking for BPF device sending support... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--int
--main(int argc, char *argv[]) {
--	int fd;
--
--	fd = open("/dev/bpf0", O_RDONLY, 0);
--
--	/* if we opened it, we're good */
--	if (fd > 1)
--		exit(0);
--
--	/* if we got EBUSY or permission denied it exists, so we're good */
--	if (fd < 0 && (errno == EBUSY || errno == 13))
--		exit(0);
--
--	/* else suck, no good */
--    exit(-1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--	if test $disable_bpf = no ; then
--
--$as_echo "#define HAVE_BPF 1" >>confdefs.h
--
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--		have_bpf=yes
--	else
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--	fi
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
- $as_echo_n "checking for a complete set of libnet headers... " >&6; }
-@@ -4947,11 +4894,6 @@
-    LIBNET_INCLUDE="-I$libnet_dir"
-    LIBNET_LINK="-L`dirname $libnet_dir`/lib"
-    LIBNET_CONFIG="$libnet_config_dir/libnet-config"
--
--
--
--
--
- fi
- 
- if test "$LIBNET_LINK" != "-L/usr/lib" ; then
-@@ -4961,99 +4903,7 @@
-   CFLAGS="$CFLAGS $LIBNET_INCLUDE"
- fi
- 
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
--$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
--if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lnet  $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char libnet_build_stp_conf ();
--int
--main ()
--{
--return libnet_build_stp_conf ();
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_net_libnet_build_stp_conf=yes
--else
--  ac_cv_lib_net_libnet_build_stp_conf=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
--$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
--if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
--  have_libnet=yes
--else
--  have_libnet=no
--fi
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
--$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include<stdio.h>
--#include<libnet.h>
--#define HOPE_MAJOR  1
--#define HOPE_MEDIUM 1
--#define HOPE_MINOR  2
--int main()
--{
--  unsigned int major,medium,minor,current, desired;
--  desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
--  sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
--  current = major*10000 + medium*100 + minor;
--  if ( current >= desired )
--     exit(0);
--  exit(1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }; have_libnet=yes
--else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
-+have_libnet=yes
- 
- for ac_header in sys/sockio.h sys/ioctl.h net/if.h
- do :
-
diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template
index f9d57cfe9ff..a79f7fe3d12 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -4,7 +4,7 @@ version=0.8.2
 revision=2
 build_style=gnu-configure
 configure_args="--disable-gtk"
-hostmakedepends="pkg-config automake"
+hostmakedepends="pkg-config automake gettext gettext-devel"
 makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel"
 short_desc="Framework for layer 2 security testing"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
@@ -17,7 +17,6 @@ if [ -n "$CROSS_BUILD" ]; then
 	hostmakedepends+=" ${makedepends}"
 fi
 
-post_configure() {
-	# configure doesn't honor env CFLAGS
-	vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+pre_configure() {
+	autoreconf -fi
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] yersinia: simplify cross-build patch
  2020-12-31  0:31 [PR PATCH] yersinia: simplify cross-build patch ndowens
                   ` (2 preceding siblings ...)
  2020-12-31  0:39 ` ndowens
@ 2020-12-31  0:45 ` ndowens
  2020-12-31  0:47 ` ndowens
  4 siblings, 0 replies; 6+ messages in thread
From: ndowens @ 2020-12-31  0:45 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

There is an updated pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568

yersinia: simplify cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8604 bytes --]

From 3c90bf2925189ed21905a019753dc1ae627c1027 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch

---
 srcpkgs/yersinia/patches/0001-fix-cross.patch |  53 ++++++
 srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
 srcpkgs/yersinia/template                     |   7 +-
 3 files changed, 56 insertions(+), 180 deletions(-)
 create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
 delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch

diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+ 		
+ 	/* else suck, no good */
+     exit(-1);
+-}],
++}])],
+ 	[
+ 	if test $disable_bpf = no ; then
+ 	    AC_DEFINE([HAVE_BPF], [1], 
+@@ -217,7 +217,7 @@ dnl   AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+ 
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR  1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+ 
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+-- 
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- configure.orig
-+++ configure
-@@ -4843,59 +4843,6 @@
- 
- disable_bpf=no
- have_bpf=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
--$as_echo_n "checking for BPF device sending support... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--int
--main(int argc, char *argv[]) {
--	int fd;
--
--	fd = open("/dev/bpf0", O_RDONLY, 0);
--
--	/* if we opened it, we're good */
--	if (fd > 1)
--		exit(0);
--
--	/* if we got EBUSY or permission denied it exists, so we're good */
--	if (fd < 0 && (errno == EBUSY || errno == 13))
--		exit(0);
--
--	/* else suck, no good */
--    exit(-1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--	if test $disable_bpf = no ; then
--
--$as_echo "#define HAVE_BPF 1" >>confdefs.h
--
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--		have_bpf=yes
--	else
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--	fi
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
- $as_echo_n "checking for a complete set of libnet headers... " >&6; }
-@@ -4947,11 +4894,6 @@
-    LIBNET_INCLUDE="-I$libnet_dir"
-    LIBNET_LINK="-L`dirname $libnet_dir`/lib"
-    LIBNET_CONFIG="$libnet_config_dir/libnet-config"
--
--
--
--
--
- fi
- 
- if test "$LIBNET_LINK" != "-L/usr/lib" ; then
-@@ -4961,99 +4903,7 @@
-   CFLAGS="$CFLAGS $LIBNET_INCLUDE"
- fi
- 
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
--$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
--if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lnet  $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char libnet_build_stp_conf ();
--int
--main ()
--{
--return libnet_build_stp_conf ();
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_net_libnet_build_stp_conf=yes
--else
--  ac_cv_lib_net_libnet_build_stp_conf=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
--$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
--if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
--  have_libnet=yes
--else
--  have_libnet=no
--fi
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
--$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include<stdio.h>
--#include<libnet.h>
--#define HOPE_MAJOR  1
--#define HOPE_MEDIUM 1
--#define HOPE_MINOR  2
--int main()
--{
--  unsigned int major,medium,minor,current, desired;
--  desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
--  sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
--  current = major*10000 + medium*100 + minor;
--  if ( current >= desired )
--     exit(0);
--  exit(1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }; have_libnet=yes
--else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
-+have_libnet=yes
- 
- for ac_header in sys/sockio.h sys/ioctl.h net/if.h
- do :
-
diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template
index f9d57cfe9ff..16f9f05680d 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -4,7 +4,7 @@ version=0.8.2
 revision=2
 build_style=gnu-configure
 configure_args="--disable-gtk"
-hostmakedepends="pkg-config automake"
+hostmakedepends="automake libtool gettext pkg-config"
 makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel"
 short_desc="Framework for layer 2 security testing"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
@@ -17,7 +17,6 @@ if [ -n "$CROSS_BUILD" ]; then
 	hostmakedepends+=" ${makedepends}"
 fi
 
-post_configure() {
-	# configure doesn't honor env CFLAGS
-	vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+pre_configure() {
+	autoreconf -fi
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PR PATCH] [Updated] yersinia: simplify cross-build patch
  2020-12-31  0:31 [PR PATCH] yersinia: simplify cross-build patch ndowens
                   ` (3 preceding siblings ...)
  2020-12-31  0:45 ` ndowens
@ 2020-12-31  0:47 ` ndowens
  4 siblings, 0 replies; 6+ messages in thread
From: ndowens @ 2020-12-31  0:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 327 bytes --]

There is an updated pull request by ndowens against master on the void-packages repository

https://github.com/ndowens/void-packages yersinia
https://github.com/void-linux/void-packages/pull/27568

yersinia: simplify cross-build patch


A patch file from https://github.com/void-linux/void-packages/pull/27568.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yersinia-27568.patch --]
[-- Type: text/x-diff, Size: 8715 bytes --]

From 855dea4eff61750ead97ca6d3e49fd41c3d68e40 Mon Sep 17 00:00:00 2001
From: Nathan Owens <ndowens@artixlinux.org>
Date: Wed, 30 Dec 2020 18:32:49 -0600
Subject: [PATCH] yersinia: simplify cross-build patch

---
 srcpkgs/yersinia/patches/0001-fix-cross.patch |  53 ++++++
 srcpkgs/yersinia/patches/fix_crossbuild.patch | 176 ------------------
 srcpkgs/yersinia/template                     |  10 +-
 3 files changed, 58 insertions(+), 181 deletions(-)
 create mode 100644 srcpkgs/yersinia/patches/0001-fix-cross.patch
 delete mode 100644 srcpkgs/yersinia/patches/fix_crossbuild.patch

diff --git a/srcpkgs/yersinia/patches/0001-fix-cross.patch b/srcpkgs/yersinia/patches/0001-fix-cross.patch
new file mode 100644
index 00000000000..9879a236cda
--- /dev/null
+++ b/srcpkgs/yersinia/patches/0001-fix-cross.patch
@@ -0,0 +1,53 @@
+From 784ccf7e6aebc80263e5a2bfac2427d597867259 Mon Sep 17 00:00:00 2001
+From: Nathan Owens <ndowens@artixlinux.org>
+Date: Wed, 30 Dec 2020 18:30:54 -0600
+Subject: [PATCH] fix cross
+
+Use AC_COMPILE_IFELSE instead of AC_TRY_RUN
+---
+ configure.in | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git configure.in configure.in
+index e796198..892312b 100644
+--- configure.in
++++ configure.in
+@@ -105,7 +105,7 @@ dnl Check for BSD's BPF
+ disable_bpf=no
+ have_bpf=no
+ AC_MSG_CHECKING(for BPF device sending support)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <fcntl.h>
+ #include <stdlib.h>
+@@ -127,7 +127,7 @@ main(int argc, char *argv[]) {
+ 		
+ 	/* else suck, no good */
+     exit(-1);
+-}],
++}])],
+ 	[
+ 	if test $disable_bpf = no ; then
+ 	    AC_DEFINE([HAVE_BPF], [1], 
+@@ -217,7 +217,7 @@ dnl   AC_MSG_ERROR(...i'm sure you'll take the right decision.)
+ dnl fi
+ 
+ AC_MSG_CHECKING(if libnet is at least version 1.1.2)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include<stdio.h>
+ #include<libnet.h>
+ #define HOPE_MAJOR  1
+@@ -403,7 +403,7 @@ AC_CHECK_FUNCS(strerror_r, have_strerror_r=yes,have_strerror_r=no)
+ 
+ if test $have_strerror_r = yes; then
+ AC_MSG_CHECKING(if strerror_r is on glibc version >= 2.0)
+-AC_TRY_RUN([
++AC_COMPILE_IFELSE([
+ #include <stdio.h>
+ #include <features.h>
+ int main()
+-- 
+2.30.0
+
diff --git a/srcpkgs/yersinia/patches/fix_crossbuild.patch b/srcpkgs/yersinia/patches/fix_crossbuild.patch
deleted file mode 100644
index e7705d01527..00000000000
--- a/srcpkgs/yersinia/patches/fix_crossbuild.patch
+++ /dev/null
@@ -1,176 +0,0 @@
---- configure.orig
-+++ configure
-@@ -4843,59 +4843,6 @@
- 
- disable_bpf=no
- have_bpf=no
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BPF device sending support" >&5
--$as_echo_n "checking for BPF device sending support... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
--$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
--as_fn_error $? "cannot run test program while cross compiling
--See \`config.log' for more details" "$LINENO" 5; }
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include <stdio.h>
--#include <fcntl.h>
--#include <stdlib.h>
--#include <errno.h>
--
--int
--main(int argc, char *argv[]) {
--	int fd;
--
--	fd = open("/dev/bpf0", O_RDONLY, 0);
--
--	/* if we opened it, we're good */
--	if (fd > 1)
--		exit(0);
--
--	/* if we got EBUSY or permission denied it exists, so we're good */
--	if (fd < 0 && (errno == EBUSY || errno == 13))
--		exit(0);
--
--	/* else suck, no good */
--    exit(-1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--
--	if test $disable_bpf = no ; then
--
--$as_echo "#define HAVE_BPF 1" >>confdefs.h
--
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }
--		have_bpf=yes
--	else
--		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }
--	fi
--
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
- 
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a complete set of libnet headers" >&5
- $as_echo_n "checking for a complete set of libnet headers... " >&6; }
-@@ -4947,11 +4894,6 @@
-    LIBNET_INCLUDE="-I$libnet_dir"
-    LIBNET_LINK="-L`dirname $libnet_dir`/lib"
-    LIBNET_CONFIG="$libnet_config_dir/libnet-config"
--
--
--
--
--
- fi
- 
- if test "$LIBNET_LINK" != "-L/usr/lib" ; then
-@@ -4961,99 +4903,7 @@
-   CFLAGS="$CFLAGS $LIBNET_INCLUDE"
- fi
- 
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for libnet_build_stp_conf in -lnet" >&5
--$as_echo_n "checking for libnet_build_stp_conf in -lnet... " >&6; }
--if ${ac_cv_lib_net_libnet_build_stp_conf+:} false; then :
--  $as_echo_n "(cached) " >&6
--else
--  ac_check_lib_save_LIBS=$LIBS
--LIBS="-lnet  $LIBS"
--cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--/* Override any GCC internal prototype to avoid an error.
--   Use char because int might match the return type of a GCC
--   builtin and then its argument prototype would still apply.  */
--#ifdef __cplusplus
--extern "C"
--#endif
--char libnet_build_stp_conf ();
--int
--main ()
--{
--return libnet_build_stp_conf ();
--  ;
--  return 0;
--}
--_ACEOF
--if ac_fn_c_try_link "$LINENO"; then :
--  ac_cv_lib_net_libnet_build_stp_conf=yes
--else
--  ac_cv_lib_net_libnet_build_stp_conf=no
--fi
--rm -f core conftest.err conftest.$ac_objext \
--    conftest$ac_exeext conftest.$ac_ext
--LIBS=$ac_check_lib_save_LIBS
--fi
--{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_net_libnet_build_stp_conf" >&5
--$as_echo "$ac_cv_lib_net_libnet_build_stp_conf" >&6; }
--if test "x$ac_cv_lib_net_libnet_build_stp_conf" = xyes; then :
--  have_libnet=yes
--else
--  have_libnet=no
--fi
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! Libnet library 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
--{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libnet is at least version 1.1.2" >&5
--$as_echo_n "checking if libnet is at least version 1.1.2... " >&6; }
--if test "$cross_compiling" = yes; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--else
--  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
--/* end confdefs.h.  */
--
--#include<stdio.h>
--#include<libnet.h>
--#define HOPE_MAJOR  1
--#define HOPE_MEDIUM 1
--#define HOPE_MINOR  2
--int main()
--{
--  unsigned int major,medium,minor,current, desired;
--  desired = HOPE_MAJOR*10000 + HOPE_MEDIUM*100 + HOPE_MINOR;
--  sscanf( LIBNET_VERSION, "%d.%d.%d", &major, &medium, &minor);
--  current = major*10000 + medium*100 + minor;
--  if ( current >= desired )
--     exit(0);
--  exit(1);
--}
--_ACEOF
--if ac_fn_c_try_run "$LINENO"; then :
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
--$as_echo "yes" >&6; }; have_libnet=yes
--else
--  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
--$as_echo "no" >&6; }; have_libnet=no
--fi
--rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
--  conftest.$ac_objext conftest.beam conftest.$ac_ext
--fi
--
--
--if test $have_libnet = no; then
--  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&5
--$as_echo "$as_me: WARNING: Ouch!! At least Libnet library version 1.1.2 is needed in order to compile Yersinia!!..." >&2;}
--  as_fn_error $? "...i'm sure you'll take the right decision." "$LINENO" 5
--fi
--
--
-+have_libnet=yes
- 
- for ac_header in sys/sockio.h sys/ioctl.h net/if.h
- do :
-
diff --git a/srcpkgs/yersinia/template b/srcpkgs/yersinia/template
index f9d57cfe9ff..0eb39ee50bf 100644
--- a/srcpkgs/yersinia/template
+++ b/srcpkgs/yersinia/template
@@ -4,8 +4,9 @@ version=0.8.2
 revision=2
 build_style=gnu-configure
 configure_args="--disable-gtk"
-hostmakedepends="pkg-config automake"
-makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel"
+hostmakedepends="automake libtool gettext pkg-config"
+makedepends="libpcap-devel libnet-devel ncurses-devel gettext-devel
+ glib-devel"
 short_desc="Framework for layer 2 security testing"
 maintainer="Alex Childs <misuchiru03+void@gmail.com>"
 license="GPL-2.0-or-later"
@@ -17,7 +18,6 @@ if [ -n "$CROSS_BUILD" ]; then
 	hostmakedepends+=" ${makedepends}"
 fi
 
-post_configure() {
-	# configure doesn't honor env CFLAGS
-	vsed -i src/Makefile -e'/^CFLAGS/s/$/ -fcommon/'
+pre_configure() {
+	autoreconf -fi
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-12-31  0:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-31  0:31 [PR PATCH] yersinia: simplify cross-build patch ndowens
2020-12-31  0:35 ` [PR PATCH] [Updated] " ndowens
2020-12-31  0:37 ` ndowens
2020-12-31  0:39 ` ndowens
2020-12-31  0:45 ` ndowens
2020-12-31  0:47 ` ndowens

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).