Changeset - a822c52c77f5
[Not reviewed]
default
1 3 3
Nathan Brink (binki) - 16 years ago 2009-03-29 21:12:35
ohnobinki@ohnopublishing.net
net-irc/unrealircd: added new version, updated patches to be ideal :-D

:-) :-D :-p
!!
Sorry for all that ;-)

The patch named net-irc/unrealircd/files/unrealircd-system-cares-3.2.8.patch should be directly applicable to the current unreal3.2.8 sources (possibly after application of the tre patch).
7 files changed with 498 insertions and 220 deletions:
0 comments (0 inline, 0 general)
net-irc/unrealircd/Manifest
Show inline comments
 
AUX unrealircd-system-cares.patch 4455 RMD160 32f40a2c7f275af950b1f37f22e2376641e62082 SHA1 2b49c4e24d0213110c063bdd170c9c5211880752 SHA256 e7a17449de094c7b42e82b7d2d739463ac1c80518afee11486ff21c42dfb050f
 
AUX unrealircd-system-tre.patch 3289 RMD160 784c62c2a5a0c0f6801e8acd94b1db751c10558d SHA1 6d3e6a204b94148db05a9b82b6100cab0a2776d5 SHA256 bfdf0893cddb809aa19b37ad541957cadc4bf1a9b0b8610c1a577508f2055288
 
AUX unrealircd-system-cares-3.2.7.patch 5472 RMD160 d6e817e98b029c6a03e3e49fbcf636eddf6e8c64 SHA1 5b02b22ce79d8c1aa5622e967b974af274c26e3b SHA256 5ad9062bd3b2820476151f84fca810981f094f305d5eb43ca048d3f9de0d7dfe
 
AUX unrealircd-system-cares-3.2.8.patch 4850 RMD160 6bd9456bda2b1dc233cf7ad97c60c0ee11c1f99b SHA1 e9086146a7031b874e514eb2a22c06b5decb8adf SHA256 e3be39af381c12349355ed44c1bfac1a205a84728d006fd3de3cff0a564ee0d9
 
AUX unrealircd-system-tre.patch 2238 RMD160 bfac0ded81b84eed017c8fac8ee6bffaa0a6c73a SHA1 d61c537e780016dd1bf78cfac15025cfea3569a3 SHA256 91a11df3fa1db0924311cd02ba7d0cb1a0b26066e9c65bad5756226baf08e9c9
 
AUX unrealircd.confd 499 RMD160 666439c6e992d3314f8694ba58e8f3e018421f1c SHA1 5cb49d7e9a79c7f8e0b2182dff47811a2f3fb885 SHA256 ae6ce779fae68c1380a7d37950c5ef3b695e434bb435dcdc0f6d3d2282f72582
 
AUX unrealircd.rc 640 RMD160 186125558866976380eddae397aba4534a088732 SHA1 815d6950ddb79ca86fa8c887a4386ae9ddd58abe SHA256 a1ac6330e573dc5429153de98c9a8619a92d7ae3502a06e47f392dcaf90f2b07
 
DIST Unreal3.2.7.tar.gz 2801622 RMD160 49e00dbe4fdda672b20be16ceb116971f514d62b SHA1 a6c83c186008c429bc5a476fc0b9e3b174092efb SHA256 f80078da5e9efa1487ab22957aeb295f94c2d4efd144f825f1efc5ee8df72d46
 
EBUILD unrealircd-3.2.7-r2.ebuild 4475 RMD160 3b16c41b85a98f577a0c82b595c2ebbbddaafd52 SHA1 1e3217cabd4221bebbc753faf234277d121f2e6b SHA256 e7459592fb18acb79d10e0f79820b1c8c66222f6456bc799c6f67273289f02ad
 
DIST Unreal3.2.8.tar.gz 2872378 RMD160 bcf8b2bb7475aad3b25dd63b48696c39dcbd4243 SHA1 4b03254d5e19b827f0653a083c0b7f895914b8be SHA256 99fb064a356ed86aa135d2c382a3f10a9b98de6272be6a5bd0f80e2179100958
 
EBUILD unrealircd-3.2.7-r2.ebuild 4501 RMD160 f44cf29206d5b5a0d4dbabf633723c0c7d622100 SHA1 cb7bfe628c3f3a77a05f0090a0d77f115e6c7744 SHA256 aa37855ddc2bfe7af6714c854f2152ec526252bc9d2a7509f92588aaf29a01f0
 
EBUILD unrealircd-3.2.8.ebuild 4527 RMD160 6583e92094380f8b7ecb2aa69b59b415eb1a5dcd SHA1 cb32fcde9e81184a1414248eb5ce7438e16ea1ae SHA256 b3198852377e732f287f60858803d8ce0a1083605770d87f1be4dca0314a612d
 
MISC ChangeLog 10068 RMD160 2f4488a9457a3f3fcc53746e1efb1194b08ec776 SHA1 a4b6da530222840174b3500856b1b3da91c482e8 SHA256 cd1df736f0ca3facec726b324385e10103090d12fe7a6ad571c21a1f7d45ae4a
 
MISC metadata.xml 376 RMD160 62b344feca2e09d554426e39e91a36e48e6c255e SHA1 42a9ba4afb8b8d3d13c7babc13a5a66f0a41d395 SHA256 d5fe303d93d8469ffe66e09541b913847cd5a8964eb90f205898359827d4a048
net-irc/unrealircd/files/unrealircd-system-cares-3.2.7.patch
Show inline comments
 
new file 100644
 
This portion of the patch is similar to the patch for cares-3.2.8, but the end of the configure.in's are different
 
--- autoconf/configure.in	2009-03-29 18:35:15.000000000 -0400
 
+++ autoconf/configure.in	2009-03-29 18:45:54.000000000 -0400
 
@@ -394,6 +394,7 @@
 
 AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
 
 	AC_DEFINE(OPEROVERRIDE_VERIFY))
 
 AC_ARG_WITH(system-tre, [AC_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no ])
 
+AC_ARG_WITH(system-cares, [AC_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.5.3) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no ])
 
 CHECK_SSL
 
 CHECK_ZLIB
 
 CHECK_LIBCURL
 
@@ -463,6 +464,7 @@
 
 PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
 
 ])
 
 
 
+AS_IF([test "x$with_system_cares" = "xno"],[
 
 dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
 
 cares_version="1.4.0"
 
 AC_MSG_RESULT(extracting c-ares resolver library)
 
@@ -485,13 +487,15 @@
 
 $ac_cv_prog_MAKER || exit 1
 
 AC_MSG_RESULT(installing c-ares resolver library)
 
 $ac_cv_prog_MAKER install || exit 1
 
-CARESINCDIR="$cur_dir/extras/c-ares/include"
 
-AC_SUBST(CARESINCDIR)
 
-CARESLIBDIR="-L../extras/c-ares/lib"
 
-AC_SUBST(CARESLIBDIR)
 
-CARESLIBS="-lcares"
 
-AC_SUBST(CARESLIBS)
 
+CARES_CFLAGS="$cur_dir/extras/c-ares/include"
 
+AC_SUBST(CARES_CFLAGS)
 
+CARES_LIBS="-L../extras/c-ares/lib -lcares"
 
+AC_SUBST(CARES_LIBS)
 
 cd $cur_dir
 
+],[
 
+dnl use pkg-config for system c-ares:
 
+PKG_CHECK_MODULES([CARES], libcares >= 1.5.3)
 
+])
 
 
 
 
 
 AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
 

	
 

	
 
--- Makefile.in	2009-03-29 18:35:15.000000000 -0400
 
+++ Makefile.in	2009-03-29 18:48:03.000000000 -0400
 
@@ -34,11 +34,11 @@
 
 #
 
 
 
 #XCFLAGS=-O -g -export-dynamic
 
-IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARESLIBS@
 
+IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARES_LIBS@
 
 CRYPTOLIB=@CRYPTOLIB@
 
 OPENSSLINCLUDES=
 
 
 
-XCFLAGS=@TRE_CFLAGS@ -I@CARESINCDIR@ @CARESLIBDIR@ @CFLAGS@
 
+XCFLAGS=@TRE_CFLAGS@ -I@CARES_CFLAGS@ @CFLAGS@
 
 #
 
 # use the following on MIPS:
 
 #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
 

	
 
This patch is specific to unreal-3.2.7 and is not needed for 3.2.8:
 
--- src/res.c	2006-09-19 08:45:18.000000000 -0400
 
+++ src/res.c	2009-01-15 20:51:26.000000000 -0500
 
@@ -49,9 +49,9 @@
 
 #include <res.h>
 
 
 
 /* Forward declerations */
 
-void unrealdns_cb_iptoname(void *arg, int status, struct hostent *he);
 
-void unrealdns_cb_nametoip_verify(void *arg, int status, struct hostent *he);
 
-void unrealdns_cb_nametoip_link(void *arg, int status, struct hostent *he);
 
+void unrealdns_cb_iptoname(void *arg, int status, int timeouts, struct hostent *he);
 
+void unrealdns_cb_nametoip_verify(void *arg, int status, int timeouts, struct hostent *he);
 
+void unrealdns_cb_nametoip_link(void *arg, int status, int timeouts, struct hostent *he);
 
 void unrealdns_delasyncconnects(void);
 
 static unsigned int unrealdns_haship(void *binaryip, int length);
 
 static void unrealdns_addtocache(char *name, void *binaryip, int length);
 
@@ -240,7 +240,7 @@
 
 #endif
 
 }
 
 
 
-void unrealdns_cb_iptoname(void *arg, int status, struct hostent *he)
 
+void unrealdns_cb_iptoname(void *arg, int status, int timeouts, struct hostent *he)
 
 {
 
 DNSReq *r = (DNSReq *)arg;
 
 DNSReq *newr;
 
@@ -290,7 +290,7 @@
 
 }
 
 
 
 
 
-void unrealdns_cb_nametoip_verify(void *arg, int status, struct hostent *he)
 
+void unrealdns_cb_nametoip_verify(void *arg, int status, int timeouts, struct hostent *he)
 
 {
 
 DNSReq *r = (DNSReq *)arg;
 
 aClient *acptr = r->cptr;
 
@@ -363,7 +363,7 @@
 
 	unrealdns_freeandremovereq(r);
 
 }
 
 
 
-void unrealdns_cb_nametoip_link(void *arg, int status, struct hostent *he)
 
+void unrealdns_cb_nametoip_link(void *arg, int status, int timeouts, struct hostent *he)
 
 {
 
 DNSReq *r = (DNSReq *)arg;
 
 int n;
 
@@ -736,21 +736,35 @@
 
 	} else
 
 	if (*param == 'i') /* INFORMATION */
 
 	{
 
-		struct ares_config_info inf;
 
+		struct ares_options inf;
 
 		int i;
 
+		int optmask;
 
 		
 
-		ares_get_config(&inf, resolver_channel);
 
+		ares_save_options(resolver_channel, &inf, &optmask);
 
 
 
 		sendtxtnumeric(sptr, "****** DNS Configuration Information ******");
 
 		sendtxtnumeric(sptr, " c-ares version: %s",ares_version(NULL));
 
-		sendtxtnumeric(sptr, "        timeout: %d", inf.timeout);
 
-		sendtxtnumeric(sptr, "          tries: %d", inf.tries);
 
-		sendtxtnumeric(sptr, "   # of servers: %d", inf.numservers);
 
-		for (i = 0; i < inf.numservers; i++)
 
-			sendtxtnumeric(sptr, "      server #%d: %s", i+1, inf.servers[i] ? inf.servers[i] : "[???]");
 
-			
 
+
 
+		if(optmask & ARES_OPT_TIMEOUTMS)
 
+			sendtxtnumeric(sptr, "        timeout: %d", inf.timeout);
 
+		if(optmask & ARES_OPT_TRIES)
 
+			sendtxtnumeric(sptr, "          tries: %d", inf.tries);
 
+		if(optmask & ARES_OPT_SERVERS)
 
+		{
 
+			sendtxtnumeric(sptr, "   # of servers: %d", inf.nservers);
 
+			for (i = 0; i < inf.nservers; i++)
 
+				sendtxtnumeric(sptr, "      server #%d: %s", i+1, inet_ntoa(inf.servers[i]));	
 
+		}
 
+		if(optmask & ARES_OPT_DOMAINS)
 
+		{
 
+			sendtxtnumeric(sptr, "   # of search domains: %d", inf.ndomains);
 
+			for (i = 0; i < inf.ndomains; i++)
 
+				sendtxtnumeric(sptr, "      domain #%d: %s", i+1, inf.domains[i]);
 
+		}
 
 		/* TODO: free or get memleak ! */
 
 		sendtxtnumeric(sptr, "****** End of DNS Configuration Info ******");
 
+		
 
+		ares_destroy_options(&inf);
 
 	} else /* STATISTICS */
 
 	{
 
 		sendtxtnumeric(sptr, "DNS CACHE Stats:");
net-irc/unrealircd/files/unrealircd-system-cares-3.2.8.patch
Show inline comments
 
new file 100644
 
Makes unrealircd-3.2.8 able to use a vanilla, system >=net-dns/c-ares-1.5.3
 
Expects the unrealircd-system-tre.patch to be applied beforehand
 
--- autoconf/configure.in	2009-03-29 18:35:15.000000000 -0400
 
+++ autoconf/configure.in	2009-03-29 18:45:54.000000000 -0400
 
@@ -393,6 +393,7 @@
 
 AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
 
 	AC_DEFINE(OPEROVERRIDE_VERIFY))
 
 AC_ARG_WITH(system-tre, [AC_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no ])
 
+AC_ARG_WITH(system-cares, [AC_HELP_STRING([--with-system-cares], [Use the system c-ares (at least version 1.5.3) package instead of bundled c-ares, discovered using pkg-config])], [], [with_system_cares=no ])
 
 CHECK_SSL
 
 CHECK_ZLIB
 
 CHECK_LIBCURL
 
@@ -462,6 +463,7 @@
 
 PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
 
 ])
 
 
 
+AS_IF([test "x$with_system_cares" = "xno"],[
 
 dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
 
 cares_version="1.6.0"
 
 AC_MSG_RESULT(extracting c-ares resolver library)
 
@@ -484,10 +486,9 @@
 
 $ac_cv_prog_MAKER || exit 1
 
 AC_MSG_RESULT(installing c-ares resolver library)
 
 $ac_cv_prog_MAKER install || exit 1
 
-CARESINCDIR="$cur_dir/extras/c-ares/include"
 
-AC_SUBST(CARESINCDIR)
 
-CARESLIBDIR="-L../extras/c-ares/lib"
 
-AC_SUBST(CARESLIBDIR)
 
+CARES_CFLAGS="$cur_dir/extras/c-ares/include"
 
+AC_SUBST(CARES_CFLAGS)
 
+CARES_LIBS="-L../extras/c-ares/lib"
 

	
 
 dnl Set default library parameters for when pkg-config is not available
 
 CARESLIBSALT="-lcares"
 
@@ -504,15 +505,20 @@
 
 dnl from above. Also, if pkg-config returns an empty result (ex: on fbsd
 
 dnl or older versions it might be missing --static) then also use defaults.
 
 if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
 
-	CARESLIBS="$CARESLIBSALT"
 
+	CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
 
 else
 
-	CARESLIBS="`$ac_cv_path_PKGCONFIG --static --libs libcares.pc`"
 
-	if test "x$CARESLIBS" = "x" ; then
 
-		CARESLIBS="$CARESLIBSALT"
 
+	CARES_LIBSPRE="$CARES_LIBS"
 
+	CARES_LIBS="$CARES_LIBS `$ac_cv_path_PKGCONFIG --static --libs libcares.pc`"
 
+	if test "$CARES_LIBS" = "$CARES_LIBSPRE " ; then
 
+		CARES_LIBS="$CARES_LIBS $CARESLIBSALT"
 
 	fi
 
 fi
 
-AC_SUBST(CARESLIBS)
 
+AC_SUBST(CARES_LIBS)
 
 cd $cur_dir
 
+],[
 
+dnl use pkg-config for system c-ares:
 
+PKG_CHECK_MODULES([CARES], libcares >= 1.5.3)
 
+])
 
 
 
 
 
 AC_OUTPUT(Makefile src/modules/Makefile unreal ircdcron/ircdchk)
 

	
 

	
 
--- Makefile.in	2009-03-29 18:35:15.000000000 -0400
 
+++ Makefile.in	2009-03-29 18:48:03.000000000 -0400
 
@@ -34,11 +34,11 @@
 
 #
 
 
 
 #XCFLAGS=-O -g -export-dynamic
 
-IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARESLIBS@
 
+IRCDLIBS=@IRCDLIBS@ @TRE_LIBS@ @CARES_LIBS@
 
 CRYPTOLIB=@CRYPTOLIB@
 
 OPENSSLINCLUDES=
 
 
 
-XCFLAGS=@TRE_CFLAGS@ -I@CARESINCDIR@ @CARESLIBDIR@ @CFLAGS@
 
+XCFLAGS=@TRE_CFLAGS@ -I@CARES_CFLAGS@ @CFLAGS@
 
 #
 
 # use the following on MIPS:
 
 #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
 

	
 
--- src/res.c	(revision 333)
 
+++ src/res.c	(working copy)
 
@@ -49,7 +49,7 @@
 
 #include <res.h>
 
 
 
 /* Prevent crashes due to invalid prototype/ABI */
 
-#if ARES_VERSION < 0x010600
 
+#if ARES_VERSION < 0x010503
 
  #error "You have an old c-ares version on your system and/or Unreals c-ares failed to compile!"
 
 #endif
 

	
 
@@ -736,21 +736,35 @@
 
 	} else
 
 	if (*param == 'i') /* INFORMATION */
 
 	{
 
-		struct ares_config_info inf;
 
+		struct ares_options inf;
 
 		int i;
 
+		int optmask;
 
 		
 
-		ares_get_config(&inf, resolver_channel);
 
+		ares_save_options(resolver_channel, &inf, &optmask);
 
 
 
 		sendtxtnumeric(sptr, "****** DNS Configuration Information ******");
 
 		sendtxtnumeric(sptr, " c-ares version: %s",ares_version(NULL));
 
-		sendtxtnumeric(sptr, "        timeout: %d", inf.timeout);
 
-		sendtxtnumeric(sptr, "          tries: %d", inf.tries);
 
-		sendtxtnumeric(sptr, "   # of servers: %d", inf.numservers);
 
-		for (i = 0; i < inf.numservers; i++)
 
-			sendtxtnumeric(sptr, "      server #%d: %s", i+1, inf.servers[i] ? inf.servers[i] : "[???]");
 
-			
 
+
 
+		if(optmask & ARES_OPT_TIMEOUTMS)
 
+			sendtxtnumeric(sptr, "        timeout: %d", inf.timeout);
 
+		if(optmask & ARES_OPT_TRIES)
 
+			sendtxtnumeric(sptr, "          tries: %d", inf.tries);
 
+		if(optmask & ARES_OPT_SERVERS)
 
+		{
 
+			sendtxtnumeric(sptr, "   # of servers: %d", inf.nservers);
 
+			for (i = 0; i < inf.nservers; i++)
 
+				sendtxtnumeric(sptr, "      server #%d: %s", i+1, inet_ntoa(inf.servers[i]));	
 
+		}
 
+		if(optmask & ARES_OPT_DOMAINS)
 
+		{
 
+			sendtxtnumeric(sptr, "   # of search domains: %d", inf.ndomains);
 
+			for (i = 0; i < inf.ndomains; i++)
 
+				sendtxtnumeric(sptr, "      domain #%d: %s", i+1, inf.domains[i]);
 
+		}
 
 		/* TODO: free or get memleak ! */
 
 		sendtxtnumeric(sptr, "****** End of DNS Configuration Info ******");
 
+		
 
+		ares_destroy_options(&inf);
 
 	} else /* STATISTICS */
 
 	{
 
 		sendtxtnumeric(sptr, "DNS CACHE Stats:");
net-irc/unrealircd/files/unrealircd-system-cares.patch
Show inline comments
 
deleted file
net-irc/unrealircd/files/unrealircd-system-tre.patch
Show inline comments
 
diff -u /var/tmp/portage/net-irc/unrealircd-3.2.7-r2/work/Unreal3.2.7/autoconf/configure.in /tmp/buffer-content-12842aZ0
 
--- /autoconf/configure.in	2007-06-11 20:06:33.000000000 -0400
 
+++ /tmp/buffer-content-12842aZ0	2009-01-14 17:06:18.000000000 -0500
 
@@ -53,6 +53,9 @@
 
 AC_SUBST(IRCDLIBS)
 
 AC_SUBST(MKPASSWDLIBS)
 
 
 
+dnl for getting info about TRE
 
+PKG_PROG_PKG_CONFIG(0.17)
 
+
 
 dnl module checking based on Hyb7's module checking code
 
 AC_DEFUN([AC_ENABLE_DYN],
 
 [
 
@@ -425,38 +428,38 @@
 
 ;;
 
 esac
 
 
 
-dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
 
-tre_version="0.7.5"
 
-AC_MSG_RESULT(extracting TRE regex library)
 
-cur_dir=`pwd`
 
-cd extras
 
-dnl remove old tre directory to force a recompile...
 
-rm -rf tre-$tre_version
 
-if test "x$ac_cv_path_GUNZIP" = "x" ; then
 
-	tar xfz tre.tar.gz
 
-else
 
-	cp tre.tar.gz tre.tar.gz.bak
 
-	gunzip -f tre.tar.gz
 
-	cp tre.tar.gz.bak tre.tar.gz
 
-	tar xf tre.tar
 
-fi
 
-AC_MSG_RESULT(configuring TRE regex library)
 
-cd tre-$tre_version
 
-./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp || exit 1
 
-AC_MSG_RESULT(compiling TRE regex library)
 
-$ac_cv_prog_MAKER || exit 1
 
-AC_MSG_RESULT(installing TRE regex library)
 
-$ac_cv_prog_MAKER install || exit 1
 
-TREINCDIR="$cur_dir/extras/regexp/include"
 
-AC_SUBST(TREINCDIR)
 
-if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
 
-	TRELIBS="-L../extras/regexp/lib -ltre"
 
-else
 
-	TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc`
 
-fi
 
-AC_SUBST(TRELIBS)
 
-cd $cur_dir
 
-
 
+dnl dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
 
+dnl tre_version="0.7.5"
 
+dnl AC_MSG_RESULT(extracting TRE regex library)
 
+dnl cur_dir=`pwd`
 
+dnl cd extras
 
+dnl dnl remove old tre directory to force a recompile...
 
+dnl rm -rf tre-$tre_version
 
+dnl if test "x$ac_cv_path_GUNZIP" = "x" ; then
 
+dnl	tar xfz tre.tar.gz
 
+dnl else
 
+dnl 	cp tre.tar.gz tre.tar.gz.bak
 
+dnl 	gunzip -f tre.tar.gz
 
+dnl 	cp tre.tar.gz.bak tre.tar.gz
 
+dnl 	tar xf tre.tar
 
+dnl fi
 
+dnl AC_MSG_RESULT(configuring TRE regex library)
 
+dnl cd tre-$tre_version
 
+dnl ./configure --disable-agrep --disable-shared --disable-system-abi --disable-wchar --disable-multibyte --prefix=$cur_dir/extras/regexp || exit 1
 
+dnl AC_MSG_RESULT(compiling TRE regex library)
 
+dnl $ac_cv_prog_MAKER || exit 1
 
+dnl AC_MSG_RESULT(installing TRE regex library)
 
+dnl $ac_cv_prog_MAKER install || exit 1
 
+dnl TREINCDIR="$cur_dir/extras/regexp/include"
 
+dnl AC_SUBST(TREINCDIR)
 
+dnl if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
 
+dnl	TRELIBS="-L../extras/regexp/lib -ltre"
 
+dnl  else
 
+dnl	TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc`
 
+dnl fi
 
+dnl AC_SUBST(TRE_LIBS) AC_SUBST(TRE_CFLAGS)
 
+dnl cd $cur_dir
 
+PKG_CHECK_MODULES([TRE], tre)
 
 
 
 dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
 
 cares_version="1.4.0"
 

	
 

	
 
--- /Makefile.in	2006-06-05 19:16:34.000000000 -0400
 
+++ /tmp/buffer-content-12842MjD	2009-01-14 17:07:21.000000000 -0500
 
diff -ru ./Makefile.in /var/tmp/portage/net-irc/unrealircd-3.2.8/work/Unreal3.2/Makefile.in
 
--- Makefile.in	2006-06-05 19:16:34.000000000 -0400
 
+++ Makefile.in	2009-03-03 18:59:32.000000000 -0500
 
@@ -34,11 +34,11 @@
 
 #
 
 
 
@@ -100,3 +15,49 @@ diff -u /var/tmp/portage/net-irc/unreali
 
 #
 
 # use the following on MIPS:
 
 #CFLAGS= -systype bsd43 -DSYSTYPE_BSD43 -I$(INCLUDEDIR)
 
Only in /var/tmp/portage/net-irc/unrealircd-3.2.8/work/Unreal3.2: Makefile.in.~1.1.2.23.2.6.~
 
diff -ru ./configure.in /var/tmp/portage/net-irc/unrealircd-3.2.8/work/Unreal3.2/configure.in
 
--- autoconf/configure.in	2009-02-01 11:43:33.000000000 -0500
 
+++ autoconf/configure.in	2009-03-03 19:01:23.000000000 -0500
 
@@ -392,6 +392,7 @@
 
 	AC_DEFINE(DISABLE_USERMOD))
 
 AC_ARG_WITH(operoverride-verify, [AC_HELP_STRING([--with-operoverride-verify], [Require opers to invite themselves to +s/+p channels])],
 
 	AC_DEFINE(OPEROVERRIDE_VERIFY))
 
+AC_ARG_WITH(system-tre, [AC_HELP_STRING([--with-system-tre], [Use the system tre package instead of bundled, discovered using pkg-config])], [], [with_system_tre=no ])
 
 CHECK_SSL
 
 CHECK_ZLIB
 
 CHECK_LIBCURL
 
@@ -424,6 +425,7 @@
 
 ;;
 
 esac
 
 
 
+AS_IF([test "x$with_system_tre" = "xno"],[
 
 dnl REMEMBER TO CHANGE WITH A NEW TRE RELEASE!
 
 tre_version="0.7.5"
 
 AC_MSG_RESULT(extracting TRE regex library)
 
@@ -446,16 +448,19 @@
 
 $ac_cv_prog_MAKER || exit 1
 
 AC_MSG_RESULT(installing TRE regex library)
 
 $ac_cv_prog_MAKER install || exit 1
 
-TREINCDIR="$cur_dir/extras/regexp/include"
 
-AC_SUBST(TREINCDIR)
 
+TRE_CFLAGS="-I$cur_dir/extras/regexp/include"
 
+AC_SUBST(TRE_CFLAGS)
 
 if test "x$ac_cv_path_PKGCONFIG" = "x" ; then
 
-	TRELIBS="-L../extras/regexp/lib -ltre"
 
+	TRE_LIBS="-L../extras/regexp/lib -ltre"
 
 else
 
-	TRELIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc`
 
+	TRE_LIBS=`$ac_cv_path_PKGCONFIG --libs tre.pc`
 
 fi
 
-AC_SUBST(TRELIBS)
 
+AC_SUBST(TRE_LIBS)
 
 cd $cur_dir
 
-
 
+],[
 
+dnl use pkgconfig for tre:
 
+PKG_CHECK_MODULES([TRE], tre >= 0.7.5)
 
+])
 
 
 
 dnl REMEMBER TO CHANGE WITH A NEW C-ARES RELEASE!
 
 cares_version="1.6.0"
net-irc/unrealircd/unrealircd-3.2.7-r2.ebuild
Show inline comments
 
@@ -14,7 +14,7 @@ SRC_URI="http://unreal.brueggisite.de/${
 

	
 
SLOT="0"
 
LICENSE="GPL-2"
 
KEYWORDS="~amd64 ~mips ppc sparc x86 ~x86-fbsd"
 
KEYWORDS="~amd64 ~mips ~ppc ~sparc ~x86 ~x86-fbsd"
 
IUSE="hub ipv6 ssl zlib curl prefixaq showlistmodes"
 

	
 
RDEPEND="ssl? ( dev-libs/openssl )
 
@@ -53,8 +53,8 @@ src_unpack() {
 
		-e "s:ircd\.tune:/var/lib/unrealircd/ircd.tune:" \
 
		include/config.h
 

	
 
	epatch "${FILESDIR}"/unrealircd-system-tre.patch \
 
		&& epatch "${FILESDIR}"/unrealircd-system-cares.patch || die "epatch failed"
 
	epatch "${FILESDIR}"/unrealircd-system-tre.patch
 
	epatch "${FILESDIR}"/unrealircd-system-cares-3.2.7.patch
 

	
 
	mv autoconf/configure.in ./
 
	mv autoconf/aclocal.m4 ./acinclude.m4
 
@@ -83,6 +83,8 @@ src_compile() {
 
		--with-hostname=$(hostname -f) \
 
		--with-permissions=0600 \
 
		--with-fd-setsize=1024 \
 
		--with-system-tre \
 
		--with-system-cares \
 
		--enable-dynamic-linking \
 
		${myconf} \
 
		|| die "econf failed"
net-irc/unrealircd/unrealircd-3.2.8.ebuild
Show inline comments
 
new file 100644
 
# Copyright 1999-2008 Gentoo Foundation
 
# Distributed under the terms of the GNU General Public License v2
 
# $Header: /var/cvsroot/gentoo-x86/net-irc/unrealircd/unrealircd-3.2.7-r2.ebuild,v 1.4 2008/08/11 21:31:36 ricmm Exp $
 

	
 
inherit eutils autotools ssl-cert versionator multilib
 

	
 
MY_P=Unreal${PV}
 

	
 
DESCRIPTION="aimed to be an advanced (not easy) IRCd"
 
HOMEPAGE="http://www.unrealircd.com/"
 
SRC_URI="http://unreal.brueggisite.de/${MY_P}.tar.gz
 
	http://www.blurryfox.com/unreal/${MY_P}.tar.gz
 
	mirror://gentoo/${MY_P}.tar.gz"
 

	
 
SLOT="0"
 
LICENSE="GPL-2"
 
KEYWORDS="~amd64 ~mips ppc sparc x86 ~x86-fbsd"
 
IUSE="hub ipv6 ssl zlib curl prefixaq showlistmodes"
 

	
 
RDEPEND="ssl? ( dev-libs/openssl )
 
	zlib? ( sys-libs/zlib )
 
	curl? ( net-misc/curl )
 
	dev-libs/tre
 
	>=net-dns/c-ares-1.5.3-r1"
 
DEPEND="${RDEPEND}
 
	>=sys-apps/sed-4"
 

	
 
S="${WORKDIR}/Unreal$(get_version_component_range 1-2)"
 

	
 
pkg_setup() {
 
	if use curl && ( ! built_with_use net-misc/curl ares || built_with_use net-misc/curl ipv6 )
 
	then
 
		eerror "You need net-misc/curl compiled with the ares USE flag to be able to use"
 
		eerror "net-irc/unrealircd with the curl USE flag. Please note that ares support"
 
		eerror "for net-misc/curl is incompatible with the ipv6 USE flag."
 
		die "need net-misc/curl with ares support"
 
	fi
 

	
 
	enewuser unrealircd
 
}
 

	
 
src_unpack() {
 
	unpack ${A}
 
	cd "${S}"
 

	
 
#QA check against bundled pkgs:
 
	rm extras/*.gz
 

	
 
	sed -i \
 
		-e "s:ircd\.pid:/var/run/unrealircd/ircd.pid:" \
 
		-e "s:ircd\.log:/var/log/unrealircd/ircd.log:" \
 
		-e "s:debug\.log:/var/log/unrealircd/debug.log:" \
 
		-e "s:ircd\.tune:/var/lib/unrealircd/ircd.tune:" \
 
		include/config.h
 

	
 
	epatch "${FILESDIR}"/unrealircd-system-tre.patch
 
	epatch "${FILESDIR}"/unrealircd-system-cares-3.2.8.patch
 

	
 
	mv autoconf/configure.in ./
 
	mv autoconf/aclocal.m4 ./acinclude.m4
 
	#can't call eautoreconf because aclocal's source files aren't even in unearlircd's svn!
 
	eaclocal || die "eaclocal failed"
 
	eautoconf || die "eautoconf failed"
 
}
 

	
 
src_compile() {
 
	local myconf=""
 
	use curl     && myconf="${myconf} --enable-libcurl=/usr"
 
	use ipv6     && myconf="${myconf} --enable-inet6"
 
	use zlib     && myconf="${myconf} --enable-ziplinks"
 
	use hub      && myconf="${myconf} --enable-hub"
 
	use ssl      && myconf="${myconf} --enable-ssl"
 
	use prefixaq && myconf="${myconf} --enable-prefixaq"
 
	use showlistmodes && myconf="${myconf} --with-showlistmodes"
 

	
 
	econf \
 
		--with-listen=5 \
 
		--with-dpath="${D}"/etc/unrealircd \
 
		--with-spath=/usr/bin/unrealircd \
 
		--with-nick-history=2000 \
 
		--with-sendq=3000000 \
 
		--with-bufferpool=18 \
 
		--with-hostname=$(hostname -f) \
 
		--with-permissions=0600 \
 
		--with-fd-setsize=1024 \
 
		--with-system-tre \
 
		--with-system-cares \
 
		--enable-dynamic-linking \
 
		${myconf} \
 
		|| die "econf failed"
 

	
 
	sed -i \
 
		-e "s:${D}::" \
 
		include/setup.h \
 
		ircdcron/ircdchk
 

	
 
	emake MAKE=make IRCDDIR=/etc/unrealircd || die "emake failed"
 
}
 

	
 
src_install() {
 
	keepdir /var/{lib,log,run}/unrealircd
 

	
 
	newbin src/ircd unrealircd
 

	
 
	exeinto /usr/$(get_libdir)/unrealircd/modules
 
	doexe src/modules/*.so
 

	
 
	dodir /etc/unrealircd
 
	dosym /var/lib/unrealircd /etc/unrealircd/tmp
 

	
 
	insinto /etc/unrealircd
 
	doins {badwords.*,help,spamfilter,dccallow}.conf
 
	newins doc/example.conf unrealircd.conf
 

	
 
	insinto /etc/unrealircd/aliases
 
	doins aliases/*.conf
 
	insinto /etc/unrealircd/networks
 
	doins networks/*.network
 

	
 
	sed -i \
 
		-e s:src/modules:/usr/$(get_libdir)/unrealircd/modules: \
 
		-e s:ircd\\.log:/var/log/unrealircd/ircd.log: \
 
		"${D}"/etc/unrealircd/unrealircd.conf
 

	
 
	dodoc \
 
		Changes Donation Unreal.nfo networks/makenet \
 
		ircdcron/{ircd.cron,ircdchk} \
 
		|| die "dodoc failed"
 
	dohtml doc/*.html
 

	
 
	newinitd "${FILESDIR}"/unrealircd.rc unrealircd
 
	newconfd "${FILESDIR}"/unrealircd.confd unrealircd
 

	
 
	fperms 700 /etc/unrealircd
 
	chown -R unrealircd "${D}"/{etc,var/{lib,log,run}}/unrealircd
 
}
 

	
 
pkg_postinst() {
 
	# Move docert call from scr_install() to install_cert in pkg_postinst for
 
	# bug #201682
 
	use ssl && \
 
		if [[ ! -f "${ROOT}"/etc/unrealircd/server.cert.key ]]; then
 
			install_cert /etc/unrealircd/server.cert
 
			chown unrealircd "${ROOT}"/etc/unrealircd/server.cert.*
 
			ln -snf server.cert.key "${ROOT}"/etc/unrealircd/server.key.pem
 
		fi
 

	
 
	elog
 
	elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
 
	elog
 
	elog "You can find example cron scripts here:"
 
	elog "   /usr/share/doc/${PF}/ircd.cron.gz"
 
	elog "   /usr/share/doc/${PF}/ircdchk.gz"
 
	elog
 
	elog "You can also use /etc/init.d/unrealircd to start at boot"
 
	elog
 
}
0 comments (0 inline, 0 general)