From 775c005a5c832918a314550a4cff3f61289de6c6 Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Mon, 7 Dec 2020 01:32:04 +0100 Subject: [PATCH] hitch: add checkdepends; simpler patch for cross-compilation --- srcpkgs/hitch/patches/configure.patch | 131 ----------------------- srcpkgs/hitch/patches/cross-compile.diff | 11 ++ srcpkgs/hitch/template | 9 +- 3 files changed, 18 insertions(+), 133 deletions(-) delete mode 100644 srcpkgs/hitch/patches/configure.patch create mode 100644 srcpkgs/hitch/patches/cross-compile.diff diff --git a/srcpkgs/hitch/patches/configure.patch b/srcpkgs/hitch/patches/configure.patch deleted file mode 100644 index eba616119d1..00000000000 --- a/srcpkgs/hitch/patches/configure.patch +++ /dev/null @@ -1,131 +0,0 @@ ---- configure-master 2020-04-30 18:55:31.884880427 +0200 -+++ configure 2020-04-30 19:58:12.271990731 +0200 -@@ -6798,12 +6798,6 @@ - $as_echo_n "checking whether the compiler accepts -g... " >&6; } - hitch_save_CFLAGS=$CFLAGS - CFLAGS="$HITCH_CFLAGS -g $CFLAGS" -- 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. */ - int main(void) { return (0); } -@@ -6817,7 +6811,6 @@ - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext --fi - - CFLAGS=$hitch_save_CFLAGS - -@@ -6826,12 +6819,6 @@ - $as_echo_n "checking whether the compiler accepts -O2... " >&6; } - hitch_save_CFLAGS=$CFLAGS - CFLAGS="$HITCH_CFLAGS -O2 $CFLAGS" -- 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. */ - int main(void) { return (0); } -@@ -6845,7 +6832,6 @@ - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext --fi - - CFLAGS=$hitch_save_CFLAGS - -@@ -6862,12 +6848,6 @@ - $as_echo_n "checking whether the compiler accepts -Wall... " >&6; } - hitch_save_CFLAGS=$CFLAGS - CFLAGS="$HITCH_CFLAGS -Wall $CFLAGS" -- 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. */ - int main(void) { return (0); } -@@ -6881,7 +6861,6 @@ - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext --fi - - CFLAGS=$hitch_save_CFLAGS - -@@ -6890,12 +6869,6 @@ - $as_echo_n "checking whether the compiler accepts -W... " >&6; } - hitch_save_CFLAGS=$CFLAGS - CFLAGS="$HITCH_CFLAGS -W $CFLAGS" -- 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. */ - int main(void) { return (0); } -@@ -6909,7 +6882,6 @@ - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext --fi - - CFLAGS=$hitch_save_CFLAGS - -@@ -6918,12 +6890,6 @@ - $as_echo_n "checking whether the compiler accepts -Werror... " >&6; } - hitch_save_CFLAGS=$CFLAGS - CFLAGS="$HITCH_CFLAGS -Werror $CFLAGS" -- 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. */ - int main(void) { return (0); } -@@ -6937,7 +6903,6 @@ - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext --fi - - CFLAGS=$hitch_save_CFLAGS - -@@ -6956,12 +6921,6 @@ - $as_echo_n "checking whether the compiler accepts -fno-strict-aliasing... " >&6; } - hitch_save_CFLAGS=$CFLAGS - CFLAGS="$EV_CFLAGS -fno-strict-aliasing $CFLAGS" -- 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. */ - int main(void) { return (0); } -@@ -6975,9 +6934,8 @@ - fi - rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ - conftest.$ac_objext conftest.beam conftest.$ac_ext --fi - -- CFLAGS=$hitch_save_CFLAGS -+ CFLAGS="$hitch_save_CFLAGS -fno-strict-aliasing" - - - diff --git a/srcpkgs/hitch/patches/cross-compile.diff b/srcpkgs/hitch/patches/cross-compile.diff new file mode 100644 index 00000000000..d64624e6b72 --- /dev/null +++ b/srcpkgs/hitch/patches/cross-compile.diff @@ -0,0 +1,11 @@ +--- hitch.m4 ++++ hitch.m4 +@@ -24,7 +24,7 @@ + AC_MSG_CHECKING([whether the compiler accepts $2]) + hitch_save_CFLAGS=$CFLAGS + CFLAGS="[$]$1 $2 $CFLAGS" +- AC_RUN_IFELSE( ++ AC_LINK_IFELSE( + [AC_LANG_SOURCE([int main(void) { return (0); }])], + [AC_MSG_RESULT([yes]); $1="[$]$1 $2"], + [AC_MSG_RESULT([no])]) diff --git a/srcpkgs/hitch/template b/srcpkgs/hitch/template index f99169099c0..1b5fd3ef796 100644 --- a/srcpkgs/hitch/template +++ b/srcpkgs/hitch/template @@ -1,11 +1,12 @@ # Template file for 'hitch' pkgname=hitch version=1.5.2 -revision=2 +revision=1 build_style=gnu-configure configure_args="ac_cv_so_reuseport_works=yes ac_cv_so_tfo=yes" -hostmakedepends="pkg-config" +hostmakedepends="pkg-config automake" makedepends="libev-devel libressl-devel" +checkdepends="lsof curl grep" short_desc="Libev-based high performance SSL/TLS proxy" maintainer="Jannis Christ " license="BSD-2-Clause" @@ -16,6 +17,10 @@ system_accounts="_hitch" CFLAGS="-fcommon" +pre_configure() { + autoreconf -fi +} + post_install() { vman hitch.8 vman hitch.conf.5