Another declspec fix.

Remove the part of the patch to extconf.rb that put declspec in and then
add "-fdeclspec" to CFLAGS if we are on a base-clang arch.

This fixes the build on sparc64 and the build still works on amd64.

ok?

--Kurt

Index: Makefile
===================================================================
RCS file: /cvs/ports/security/arirang/Makefile,v
retrieving revision 1.41
diff -u -p -r1.41 Makefile
--- Makefile    2 Sep 2021 14:59:45 -0000       1.41
+++ Makefile    18 Feb 2022 20:33:53 -0000
@@ -28,4 +28,9 @@ do-install:
        ${INSTALL_DATA} ${WRKSRC}/scanrule/*.uxe ${PREFIX}/share/arirang
        ${INSTALL_DATA} ${WRKSRC}/script/*.rb ${PREFIX}/share/arirang
 
+.include <bsd.port.arch.mk>
+.if ${PROPERTIES:Mclang}
+CFLAGS +=      -fdeclspec
+.endif
+
 .include <bsd.port.mk>
Index: patches/patch-extconf_rb
===================================================================
RCS file: /cvs/ports/security/arirang/patches/patch-extconf_rb,v
retrieving revision 1.2
diff -u -p -r1.2 patch-extconf_rb
--- patches/patch-extconf_rb    2 Sep 2021 14:59:45 -0000       1.2
+++ patches/patch-extconf_rb    18 Feb 2022 20:33:53 -0000
@@ -5,15 +5,7 @@ Support ruby 3.0+.
 Index: extconf.rb
 --- extconf.rb.orig
 +++ extconf.rb
-@@ -16,14 +16,14 @@ libruby = CONFIG['RUBY_SO_NAME']
- makefile =  "all: arirang\n"
- makefile += "exec_prefix = /usr/local\n"
- makefile += "CC=         cc\n"
--makefile += "CFLAGS+=-Wall -pedantic\n"
-+makefile += "CFLAGS+=-Wall -pedantic -fdeclspec\n"
- makefile += "TARGET=     arirang\n"
- makefile += "SRCS=       arirang.c grabhead.c rule.c screen.c report.c 
arissl.c ariruby.c proxy.c debug.c\n"
- makefile += "OBJS=       $(SRCS:.c=.o)\n\n"
+@@ -23,7 +23,7 @@ makefile += "OBJS=       $(SRCS:.c=.o)\n\n"
  
  makefile += ".c.o:\n"
  

Reply via email to