svn commit: r385077 - in head/irc/ircd-ratbox: . files
Mark Felder
feld at FreeBSD.org
Fri May 1 00:03:29 UTC 2015
Author: feld
Date: Fri May 1 00:03:27 2015
New Revision: 385077
URL: https://svnweb.freebsd.org/changeset/ports/385077
Log:
Support building with LibreSSL
Fully strip binaries unless DEBUG enabled
Create /var dirs in rc script start_precmd instead of in package
Make rc script pass rclint
Upstream has accepted the LibreSSL patches but their releases are far
apart, so patching in ports tree for now.
PR: 198506
Added:
head/irc/ircd-ratbox/files/patch-configure (contents, props changed)
head/irc/ircd-ratbox/files/patch-configure.ac (contents, props changed)
head/irc/ircd-ratbox/files/patch-libratbox_src_openssl.c (contents, props changed)
Modified:
head/irc/ircd-ratbox/Makefile
head/irc/ircd-ratbox/files/ircd-ratbox.in
Modified: head/irc/ircd-ratbox/Makefile
==============================================================================
--- head/irc/ircd-ratbox/Makefile Thu Apr 30 23:53:03 2015 (r385076)
+++ head/irc/ircd-ratbox/Makefile Fri May 1 00:03:27 2015 (r385077)
@@ -3,7 +3,7 @@
PORTNAME= ircd-ratbox
PORTVERSION= 3.0.8
-PORTREVISION= 3
+PORTREVISION= 4
CATEGORIES= irc ipv6
MASTER_SITES= http://www.ratbox.org/download/ \
http://www.ratbox.org/download/old/
@@ -125,6 +125,11 @@ CONFIGURE_ARGS+= --with-nicklen=${NICKLE
#-----------------------------------------------------------------------
+post-patch:
+.if !defined(WITH_DEBUG)
+ ${REINPLACE_CMD} 's|@INSTALL@|@INSTALL@ -s|' ${WRKSRC}/install-mod.sh.in
+.endif
+
pre-configure:
@${ECHO_MSG} ""
@${ECHO_MSG} "This port has additional options:"
@@ -220,9 +225,6 @@ pre-install:
${MKDIR} ${STAGEDIR}${PREFIX}/lib/${PORTNAME}/modules
post-install:
- ${MKDIR} ${STAGEDIR}${DBDIR}
- ${MKDIR} ${STAGEDIR}${RUNDIR}
- ${MKDIR} ${STAGEDIR}${LOGDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR}
cd ${WRKSRC}/doc && ${INSTALL_DATA} ${PORTDOCS} ${STAGEDIR}${DOCSDIR}
cd ${INSTALL_WRKSRC}/contrib && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} \
@@ -231,6 +233,10 @@ post-install:
${INSTALL_DATA} ${WRKSRC}/doc/example.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd.conf.sample
${INSTALL_DATA} ${WRKSRC}/doc/example.efnet.conf ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/ircd-efnet.conf.sample
${INSTALL_DATA} ${WRKSRC}/doc/genssl.sh ${STAGEDIR}${PREFIX}/etc/${PORTNAME}/genssl.sh
+.if !defined(WITH_DEBUG)
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libcore.so
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/ircd-ratbox/libratbox.so
+.endif
# ----- We need to install the shortcut.pl module ----
.if ${PORT_OPTIONS:MSHORTCUTS}
Modified: head/irc/ircd-ratbox/files/ircd-ratbox.in
==============================================================================
--- head/irc/ircd-ratbox/files/ircd-ratbox.in Thu Apr 30 23:53:03 2015 (r385076)
+++ head/irc/ircd-ratbox/files/ircd-ratbox.in Fri May 1 00:03:27 2015 (r385077)
@@ -5,10 +5,11 @@
# PROVIDE: ircd-ratbox
# REQUIRE: DAEMON
# BEFORE: LOGIN
+# KEYWORD: shutdown
. /etc/rc.subr
-name="ircd_ratbox"
+name=ircd_ratbox
rcvar=ircd_ratbox_enable
load_rc_config $name
@@ -21,17 +22,13 @@ pidfile=%%RUNDIR%%/ircd.pid
required_files="%%PREFIX%%/etc/ircd-ratbox/ircd.conf"
start_precmd=prestart
-stop_precmd=prestop
+stop_precmd="rm -f ${pidfile}"
prestart()
{
- touch $pidfile
- chown $ircd_ratbox_user:$ircd_ratbox_group $pidfile
-}
-
-prestop()
-{
- rm -f $pidfile
+ for i in %%LOGDIR%% %%DBDIR%% %%RUNDIR%%; do
+ install -d -o ${ircd_ratbox_user} -g ${ircd_ratbox_group} ${i}
+ done
}
run_rc_command "$1"
Added: head/irc/ircd-ratbox/files/patch-configure
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/irc/ircd-ratbox/files/patch-configure Fri May 1 00:03:27 2015 (r385077)
@@ -0,0 +1,53 @@
+--- configure.orig 2012-03-11 00:34:21 UTC
++++ configure
+@@ -13659,6 +13659,50 @@ else
+
+ 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
++
++
+
+ if test "$cf_enable_openssl" != no; then
+
Added: head/irc/ircd-ratbox/files/patch-configure.ac
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/irc/ircd-ratbox/files/patch-configure.ac Fri May 1 00:03:27 2015 (r385077)
@@ -0,0 +1,13 @@
+--- configure.ac.orig 2012-03-11 01:34:21.000000000 +0100
++++ configure.ac 2015-03-10 20:48:02.040440133 +0100
+@@ -244,6 +244,10 @@
+ cf_enable_openssl="no"
+ fi
+ unset cf_openssl_basedir
++
++ AC_CHECK_LIB(crypto, RAND_egd, AC_DEFINE(HAVE_RAND_EGD, 1,
++ [Define if the libcrypto has RAND_egd]))
++
+ else
+ dnl If --disable-openssl was specified
+ AC_MSG_RESULT(disabled)
Added: head/irc/ircd-ratbox/files/patch-libratbox_src_openssl.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/irc/ircd-ratbox/files/patch-libratbox_src_openssl.c Fri May 1 00:03:27 2015 (r385077)
@@ -0,0 +1,15 @@
+--- libratbox/src/openssl.c.orig 2012-03-16 07:29:42.000000000 +0100
++++ libratbox/src/openssl.c 2015-03-10 21:01:33.572383130 +0100
+@@ -556,10 +556,12 @@
+
+ switch (seed_type)
+ {
++#ifdef HAVE_RAND_EGD
+ case RB_PRNG_EGD:
+ if(RAND_egd(path) == -1)
+ return -1;
+ break;
++#endif
+ case RB_PRNG_FILE:
+ if(RAND_load_file(path, -1) == -1)
+ return -1;
More information about the svn-ports-all
mailing list