hitch: add checkdepends; simpler patch for cross-compilation

This commit is contained in:
Roberto Ricci 2020-12-07 01:32:04 +01:00 committed by Érico Nogueira Rolim
parent 69ba1fc9a0
commit 101744bb53
3 changed files with 17 additions and 132 deletions

View file

@ -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"

View file

@ -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])])

View file

@ -4,8 +4,9 @@ version=1.5.2
revision=2
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 <hello@jannis.ovh>"
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