aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormi <mi@FreeBSD.org>2015-03-23 21:52:35 +0800
committermi <mi@FreeBSD.org>2015-03-23 21:52:35 +0800
commitf26a0c801c24de8d3eed5caac526a9b1994f6dc8 (patch)
tree4418341b5a4882df86522e777cd0a47797981aaf
parent03eca647e482d775d2987e3c7f509ba8e0bb62ee (diff)
downloadfreebsd-ports-gnome-f26a0c801c24de8d3eed5caac526a9b1994f6dc8.tar.gz
freebsd-ports-gnome-f26a0c801c24de8d3eed5caac526a9b1994f6dc8.tar.zst
freebsd-ports-gnome-f26a0c801c24de8d3eed5caac526a9b1994f6dc8.zip
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.
-rw-r--r--security/arirang/Makefile11
-rw-r--r--security/arirang/files/patch-proxy.c24
2 files changed, 26 insertions, 9 deletions
diff --git a/security/arirang/Makefile b/security/arirang/Makefile
index aae8c6485073..021af395ff9e 100644
--- a/security/arirang/Makefile
+++ b/security/arirang/Makefile
@@ -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>
diff --git a/security/arirang/files/patch-proxy.c b/security/arirang/files/patch-proxy.c
new file mode 100644
index 000000000000..e48a005aa56f
--- /dev/null
+++ b/security/arirang/files/patch-proxy.c
@@ -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;