Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2015 13:52:36 +0000 (UTC)
From:      Mikhail Teterin <mi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r381996 - in head/security/arirang: . files
Message-ID:  <201503231352.t2NDqas7086527@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mi
Date: Mon Mar 23 13:52:35 2015
New Revision: 381996
URL: https://svnweb.freebsd.org/changeset/ports/381996
QAT: https://qat.redports.org/buildarchive/r381996/

Log:
  Unbreak arirang -- it needs to use the newer Ruby API, which, at the
  time the last release was made, was still known as RUBY_19.
  
  While here, fix an ancient bug reported by clang.

Added:
  head/security/arirang/files/
  head/security/arirang/files/patch-proxy.c   (contents, props changed)
Modified:
  head/security/arirang/Makefile

Modified: head/security/arirang/Makefile
==============================================================================
--- head/security/arirang/Makefile	Mon Mar 23 13:46:22 2015	(r381995)
+++ head/security/arirang/Makefile	Mon Mar 23 13:52:35 2015	(r381996)
@@ -20,6 +20,7 @@ USE_LIBRUBY=	yes
 USE_OPENSSL=	yes
 
 CFLAGS+=	-I${LOCALBASE}/include/ruby-${RUBY_VER} -I${LOCALBASE}/include/ruby-${RUBY_VER}/${RUBY_ARCH}
+CFLAGS+=	-DRUBY_19
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/arirang ${STAGEDIR}${PREFIX}/sbin
@@ -28,12 +29,4 @@ do-install:
 	${INSTALL_DATA} ${WRKSRC}/scanrule/*.uxe ${STAGEDIR}${PREFIX}/share/arirang
 	${INSTALL_DATA} ${WRKSRC}/script/*.rb ${STAGEDIR}${PREFIX}/share/arirang
 
-.include <bsd.port.pre.mk>
-
-.if ${RUBY_VER} >= 2.0
-BROKEN=		Does not build with Ruby 2.0 or newer
-.endif
-DEPRECATED=	Does not work with Ruby 2.x
-EXPIRATION_DATE=	2015-03-28
-
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>

Added: head/security/arirang/files/patch-proxy.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/security/arirang/files/patch-proxy.c	Mon Mar 23 13:52:35 2015	(r381996)
@@ -0,0 +1,24 @@
+Do not attempt to close the sock we never opened. Use herror() to report
+a DNS-failure, not perror().
+
+	-mi
+
+--- proxy.c	2011-05-17 22:19:11.000000000 -0400
++++ proxy.c	2015-03-23 09:46:34.000000000 -0400
+@@ -94,15 +94,13 @@
+     struct hostent *he;
+ 
+     if ((he = gethostbyname(proxyhost)) == NULL) {
+-        perror("proxy host not found");
+-        close(sock);  
++        herror("proxy host not found");
+         exit(0);
+     }
+ 
+ 
+     if ((sock = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
+         perror("socket");
+-        close(sock);
+         exit(0);
+     }
+     http.sin_family = AF_INET;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201503231352.t2NDqas7086527>