Date: Mon, 25 Jul 2011 02:10:39 GMT From: Steve Wills <swills@FreeBSD.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/159171: [PATCH] allow security/arirang to build with Ruby 1.9 Message-ID: <201107250210.p6P2Adln073486@red.freebsd.org> Resent-Message-ID: <201107250220.p6P2K93m022564@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 159171 >Category: ports >Synopsis: [PATCH] allow security/arirang to build with Ruby 1.9 >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 25 02:20:09 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Steve Wills >Release: >Organization: >Environment: >Description: security/arirang doesn't build with Ruby 1.9. The attached patch allows the build. Note I have only build tested this not run tested it. I think it should work. Please test. >How-To-Repeat: >Fix: Patch attached with submission follows: Index: Makefile =================================================================== RCS file: /home/ncvs/ports/security/arirang/Makefile,v retrieving revision 1.16 diff -u -r1.16 Makefile --- Makefile 29 Apr 2011 04:53:50 -0000 1.16 +++ Makefile 25 Jul 2011 02:06:05 -0000 @@ -7,7 +7,7 @@ PORTNAME= arirang PORTVERSION= 2.02 -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 1 CATEGORIES= security www MASTER_SITES= http://monkey.org/~pilot/arirang/ @@ -24,6 +24,8 @@ USE_OPENSSL= yes +CFLAGS+= -I${LOCALBASE}/include/ruby-${RUBY_VER} -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH} + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/arirang ${PREFIX}/sbin ${MKDIR} ${PREFIX}/share/arirang @@ -31,4 +33,8 @@ ${INSTALL_DATA} ${WRKSRC}/scanrule/*.uxe ${PREFIX}/share/arirang ${INSTALL_DATA} ${WRKSRC}/script/*.rb ${PREFIX}/share/arirang -.include <bsd.port.mk> +.include <bsd.port.pre.mk> +.if ${RUBY_VER} == 1.9 +EXTRA_PATCHES= ${PATCHDIR}/extra-patch-ruby19 +.endif +.include <bsd.port.post.mk> Index: files/patch-ariruby.c =================================================================== RCS file: /home/ncvs/ports/security/arirang/files/patch-ariruby.c,v retrieving revision 1.1 diff -u -r1.1 patch-ariruby.c --- files/patch-ariruby.c 29 Apr 2011 04:53:50 -0000 1.1 +++ files/patch-ariruby.c 25 Jul 2011 01:51:35 -0000 @@ -1,5 +1,31 @@ ---- ariruby.c.orig Fri Apr 29 09:23:11 2011 -+++ ariruby.c Fri Apr 29 09:24:14 2011 +--- ariruby.c.orig 2011-04-27 21:34:36.000000000 -0400 ++++ ariruby.c 2011-07-24 21:50:51.119557755 -0400 +@@ -189,7 +189,7 @@ + static VALUE + ariprint(VALUE self, VALUE outbuf) + { +- fprintf(stdout, "%s", RSTRING(outbuf)->ptr); ++ fprintf(stdout, "%s", RSTRING_PTR(outbuf)); + + return self; + } +@@ -198,14 +198,14 @@ + arisend(VALUE self, VALUE data) + { + int len; +- len = RSTRING(data)->len; ++ len = RSTRING_LEN(data); + + if ((sendbuf = (char *)malloc(len + 1)) == NULL) { + perror("arisend malloc failed"); + close(sock); + exit(0); + } +- memcpy(sendbuf, RSTRING(data)->ptr, len); ++ memcpy(sendbuf, RSTRING_PTR(data), len); + + if (len == 0) { + fprintf(stderr, "please set a data in arisend function \n"); @@ -519,9 +519,6 @@ if (sendbuf != NULL) free(sendbuf); @@ -10,13 +36,13 @@ if (nb == -1 || nb == -2) { #if !(defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__APPLE__)) alarm(0); -@@ -543,6 +540,9 @@ - if (!pflags) +@@ -544,6 +541,9 @@ exit(0); } -+ + + if (headbuf != NULL) + free(headbuf); - ++ if (sslflags) ssl_free(ctx, ssl); + >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107250210.p6P2Adln073486>