aboutsummaryrefslogtreecommitdiffstats
path: root/irc
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2015-03-31 22:44:16 +0800
committermat <mat@FreeBSD.org>2015-03-31 22:44:16 +0800
commitf8ae1932ad2d04e96cd69b58e808191745f60d93 (patch)
tree45070ddcb2e9ec9c207a6f5feb1cc2bbc6d53d7a /irc
parentcef3aca81011c5b848644d61ff2672b17baf3000 (diff)
downloadfreebsd-ports-gnome-f8ae1932ad2d04e96cd69b58e808191745f60d93.tar.gz
freebsd-ports-gnome-f8ae1932ad2d04e96cd69b58e808191745f60d93.tar.zst
freebsd-ports-gnome-f8ae1932ad2d04e96cd69b58e808191745f60d93.zip
Make it build with LibreSSL. [1]
While there, catch up with new options behaviors. PR: 198491 [1] Submitted by: Bernard Spil [1] Sponsored by: Absolight
Diffstat (limited to 'irc')
-rw-r--r--irc/unreal/Makefile3
-rw-r--r--irc/unreal/files/patch-configure59
-rw-r--r--irc/unreal/files/patch-configure.ac11
-rw-r--r--irc/unreal/files/patch-include_dynconf.h14
-rw-r--r--irc/unreal/files/patch-src_random.c20
5 files changed, 105 insertions, 2 deletions
diff --git a/irc/unreal/Makefile b/irc/unreal/Makefile
index 77f1b51f3b9c..b457ead6f7d4 100644
--- a/irc/unreal/Makefile
+++ b/irc/unreal/Makefile
@@ -74,8 +74,7 @@ IPV6_CONFIGURE_ENABLE= inet6
SSL_CONFIGURE_ENABLE= ssl
SSL_USE= OPENSSL=yes
REMOTE_LIB_DEPENDS= libcurl.so:${PORTSDIR}/ftp/curl
-REMOTE_CONFIGURE_ON= --enable-libcurl=${LOCALBASE}
-REMOTE_CONFIGURE_OFF= --disable-libcurl
+REMOTE_CONFIGURE_ENABLE= --enable-libcurl=${LOCALBASE}
PREFIXAQ_CONFIGURE_ENABLE= prefixaq
SQLMOD= ${PORTNAME}/SQLMod.tar.gz
diff --git a/irc/unreal/files/patch-configure b/irc/unreal/files/patch-configure
new file mode 100644
index 000000000000..9b85ef988aaf
--- /dev/null
+++ b/irc/unreal/files/patch-configure
@@ -0,0 +1,59 @@
+--- configure.orig 2014-07-26 15:42:10 UTC
++++ configure
+@@ -3876,6 +3876,47 @@ fi
+
+
+
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RAND_egd in -lcrypto" >&5
++$as_echo_n "checking for RAND_egd in -lcrypto... " >&6; }
++if ${ac_cv_lib_crypto_RAND_egd+:} false; then :
++ $as_echo_n "(cached) " >&6
++else
++ ac_check_lib_save_LIBS=$LIBS
++LIBS="-lcrypto $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 RAND_egd ();
++int
++main ()
++{
++return RAND_egd ();
++ ;
++ return 0;
++}
++_ACEOF
++if ac_fn_c_try_link "$LINENO"; then :
++ ac_cv_lib_crypto_RAND_egd=yes
++else
++ ac_cv_lib_crypto_RAND_egd=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_crypto_RAND_egd" >&5
++$as_echo "$ac_cv_lib_crypto_RAND_egd" >&6; }
++if test "x$ac_cv_lib_crypto_RAND_egd" = xyes; then :
++
++$as_echo "#define HAVE_RAND_EGD 1" >>confdefs.h
++
++fi
+
+
+
+@@ -6495,7 +6536,7 @@ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ip6" >&5
+ $as_echo "$ac_cv_ip6" >&6; }
+ if test "$ac_cv_ip6" = "no"; then
+- as_fn_error $? "Your system does not support IPv6 so it will not be enabled" "$LINENO" 5
++ echo $? "Your system does not support IPv6 so it will not be enabled" "$LINENO" 5
+ else
+
+ $as_echo "#define INET6 /**/" >>confdefs.h
diff --git a/irc/unreal/files/patch-configure.ac b/irc/unreal/files/patch-configure.ac
new file mode 100644
index 000000000000..b3d30486b1fd
--- /dev/null
+++ b/irc/unreal/files/patch-configure.ac
@@ -0,0 +1,11 @@
+--- configure.ac.orig 2014-07-26 15:42:10 UTC
++++ configure.ac
+@@ -93,6 +93,8 @@ AC_CHECK_LIB(socket, socket,
+ AC_CHECK_LIB(nsl, inet_ntoa,
+ [IRCDLIBS="$IRCDLIBS-lnsl "
+ INETLIB="-lnsl"])
++AC_CHECK_LIB(crypto, RAND_egd,
++ AC_DEFINE(HAVE_RAND_EGD, 1, [Define if the libcrypto has RAND_egd]))
+
+ AC_SUBST(IRCDLIBS)
+ AC_SUBST(MKPASSWDLIBS)
diff --git a/irc/unreal/files/patch-include_dynconf.h b/irc/unreal/files/patch-include_dynconf.h
new file mode 100644
index 000000000000..bb4a435fe261
--- /dev/null
+++ b/irc/unreal/files/patch-include_dynconf.h
@@ -0,0 +1,14 @@
+--- include/dynconf.h.orig 2014-07-26 15:42:10 UTC
++++ include/dynconf.h
+@@ -204,7 +204,11 @@ extern MODVAR aConfiguration iConf;
+ #define SHOWCONNECTINFO iConf.show_connect_info
+ #define OPER_ONLY_STATS iConf.oper_only_stats
+ #define ANTI_SPAM_QUIT_MSG_TIME iConf.anti_spam_quit_message_time
++#ifdef HAVE_RAND_EGD
+ #define USE_EGD iConf.use_egd
++#else
++#define USE_EGD 0
++#endif
+ #define EGD_PATH iConf.egd_path
+
+ #define ircnetwork iConf.network.x_ircnetwork
diff --git a/irc/unreal/files/patch-src_random.c b/irc/unreal/files/patch-src_random.c
new file mode 100644
index 000000000000..f780f0e8d46c
--- /dev/null
+++ b/irc/unreal/files/patch-src_random.c
@@ -0,0 +1,20 @@
+--- src/random.c.orig 2014-07-26 15:42:10 UTC
++++ src/random.c
+@@ -163,7 +163,7 @@ unsigned char mdbuf[16];
+ void init_random()
+ {
+ struct {
+-#ifdef USE_SSL
++#if defined(USE_SSL)
+ char egd[32]; /* from EGD */
+ #endif
+ #ifndef _WIN32
+@@ -187,7 +187,7 @@ MEMORYSTATUS mstat;
+
+ /* Grab non-OS specific "random" data */
+ #ifdef USE_SSL
+- #if OPENSSL_VERSION_NUMBER >= 0x000907000
++ #if OPENSSL_VERSION_NUMBER >= 0x000907000 && defined(HAVE_RAND_EGD)
+ if (EGD_PATH) {
+ n = RAND_query_egd_bytes(EGD_PATH, rdat.egd, sizeof(rdat.egd));
+ }