svn commit: r478616 - in head/java/jlint: . files
Tobias Kortkamp
tobik at FreeBSD.org
Fri Aug 31 22:32:07 UTC 2018
Author: tobik
Date: Fri Aug 31 22:32:05 2018
New Revision: 478616
URL: https://svnweb.freebsd.org/changeset/ports/478616
Log:
java/jlint: Fix build with Clang 6
In file included from access_desc.cc:1:
In file included from ./access_desc.hh:8:
In file included from ./class_desc.hh:4:
./types.hh:144:6: error: constant expression evaluates to 4294967168 which cannot be narrowed to type 'int4' (aka 'int') [-Wc++11-narrowing]
{0xffffff80, 0x0000007f}, // tp_byte
^~~~~~~~~~
http://beefy11.nyi.freebsd.org/data/head-i386-default/p478276_s338342/logs/errors/jlint-3.1.2_4.log
jlint.cc:1044:33: error: no matching literal operator for call to 'operator""__DATE__' with arguments of types 'const char *' and 'unsigned long', and no matching literal operator template
"version %s ("__DATE__").\n", VERSION);
^
- Remove embedded build date
- Make sure the build respects CXXFLAGS, LDFLAGS, LIBS
Modified:
head/java/jlint/Makefile
head/java/jlint/files/patch-Makefile
head/java/jlint/files/patch-jlint.cc
Modified: head/java/jlint/Makefile
==============================================================================
--- head/java/jlint/Makefile Fri Aug 31 22:18:48 2018 (r478615)
+++ head/java/jlint/Makefile Fri Aug 31 22:32:05 2018 (r478616)
@@ -3,7 +3,7 @@
PORTNAME= jlint
PORTVERSION= 3.1.2
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= java devel
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
@@ -12,6 +12,11 @@ COMMENT= Java program analyzer and checker
LICENSE= GPLv2
LICENSE_FILE= ${WRKSRC}/COPYING
+
+USES= compiler
+
+CXXFLAGS+= ${CXXFLAGS_${CHOSEN_COMPILER_TYPE}}
+CXXFLAGS_clang= -Wno-c++11-narrowing
PLIST_FILES= bin/jlint \
bin/jlint.sh \
Modified: head/java/jlint/files/patch-Makefile
==============================================================================
--- head/java/jlint/files/patch-Makefile Fri Aug 31 22:18:48 2018 (r478615)
+++ head/java/jlint/files/patch-Makefile Fri Aug 31 22:32:05 2018 (r478616)
@@ -1,22 +1,133 @@
--- Makefile.orig 2011-01-11 02:35:54 UTC
+++ Makefile
-@@ -3,8 +3,8 @@
+@@ -3,9 +3,6 @@
# Makefile for Unix and GNU/Linux with gcc/g++ compiler
# Edit here:
-CC=gcc
-CPP=g++
-+CC?=gcc
-+CPP=$(CXX)
-
+-
# Hints:
# if you use egcs-2.90.* version of GCC please add option -fno-exceptions
-@@ -20,7 +20,7 @@ CPP=g++
+ # to reduce code size and increase performance
+@@ -20,7 +17,8 @@ CPP=g++
# Optimized version
-CFLAGS = -c -Wall -O2 -g
-+CFLAGS+= -c -Wall -g
++CFLAGS+= -Wall
++CXXFLAGS+= -Wall
# -DSLIST removed because it wouldn't compile under gcc 3.x
# add -DHASH_TABLE for extra speed (may sometimes produce inconsistent results)
+@@ -28,7 +26,7 @@ CFLAGS = -c -Wall -O2 -g
+ #CFLAGS = -c -Wall -O2 -g -DSLIST -DNDEBUG
+
+ # link zlib the compression/decompression library. used for decompressing jar files
+-LFLAGS=-g -lz
++LIBS+= -lz
+
+ # Directory to place executables
+ INSTALL_DIR=/usr/local/bin
+@@ -49,10 +47,10 @@ TESTDISTFILES=`ls jlint-$(VERSION)/{antic.c,BUGS,Makef
+ all: antic jlint
+
+ antic.o: antic.c
+- $(CC) $(CFLAGS) antic.c
++ $(CC) -c $(CFLAGS) antic.c
+
+ antic: antic.o
+- $(CC) $(LFLAGS) -o antic antic.o
++ $(CC) $(LDFLAGS) -o antic antic.o $(LIBS)
+
+ clean:
+ rm -f *.o *.exe core *~ *.his *.class jlint antic manual.{html,pdf,aux,cp,fn,ky,log,pg,toc,tp,vr} jlint_3.0.{aux,dvi,log,toc}
+@@ -120,7 +118,7 @@ jlint: \
+ locks.o \
+ message_node.o \
+ method_desc.o
+- $(CPP) $(LFLAGS) -o jlint access_desc.o callee_desc.o class_desc.o graph.o jlint.o local_context.o locks.o message_node.o method_desc.o
++ $(CXX) $(LDFLAGS) -o jlint access_desc.o callee_desc.o class_desc.o graph.o jlint.o local_context.o locks.o message_node.o method_desc.o $(LIBS)
+
+ access_desc.o: access_desc.cc \
+ access_desc.hh \
+@@ -143,7 +141,7 @@ access_desc.o: access_desc.cc \
+ callee_desc.hh \
+ local_context.hh \
+ string_pool.hh
+- $(CPP) $(CFLAGS) access_desc.cc
++ $(CXX) -c $(CXXFLAGS) access_desc.cc
+
+ callee_desc.o: callee_desc.cc \
+ callee_desc.hh \
+@@ -166,7 +164,7 @@ callee_desc.o: callee_desc.cc \
+ local_context.hh \
+ access_desc.hh \
+ string_pool.hh
+- $(CPP) $(CFLAGS) callee_desc.cc
++ $(CXX) -c $(CXXFLAGS) callee_desc.cc
+
+ class_desc.o: class_desc.cc \
+ class_desc.hh \
+@@ -189,7 +187,7 @@ class_desc.o: class_desc.cc \
+ local_context.hh \
+ access_desc.hh \
+ string_pool.hh
+- $(CPP) $(CFLAGS) class_desc.cc
++ $(CXX) -c $(CXXFLAGS) class_desc.cc
+
+ graph.o: graph.cc \
+ graph.hh \
+@@ -212,7 +210,7 @@ graph.o: graph.cc \
+ utf_string.hh \
+ message_node.hh \
+ overridden_method.hh
+- $(CPP) $(CFLAGS) graph.cc
++ $(CXX) -c $(CXXFLAGS) graph.cc
+
+ jlint.o: jlint.cc \
+ jlint.hh \
+@@ -236,7 +234,7 @@ jlint.o: jlint.cc \
+ functions.hh \
+ inlines.hh \
+ locks.hh
+- $(CPP) $(CFLAGS) jlint.cc
++ $(CXX) -c $(CXXFLAGS) jlint.cc
+
+ local_context.o: local_context.cc \
+ local_context.hh \
+@@ -259,7 +257,7 @@ local_context.o: local_context.cc \
+ locks.hh \
+ graph.hh \
+ overridden_method.hh
+- $(CPP) $(CFLAGS) local_context.cc
++ $(CXX) -c $(CXXFLAGS) local_context.cc
+
+ locks.o: locks.cc \
+ locks.hh \
+@@ -271,7 +269,7 @@ locks.o: locks.cc \
+ utf_string.hh \
+ functions.hh \
+ message_node.hh
+- $(CPP) $(CFLAGS) locks.cc
++ $(CXX) -c $(CXXFLAGS) locks.cc
+
+ message_node.o: message_node.cc \
+ message_node.hh \
+@@ -279,7 +277,7 @@ message_node.o: message_node.cc \
+ types.hh \
+ jlint.d \
+ jlint.msg
+- $(CPP) $(CFLAGS) message_node.cc
++ $(CXX) -c $(CXXFLAGS) message_node.cc
+
+ method_desc.o: method_desc.cc \
+ method_desc.hh \
+@@ -302,6 +300,6 @@ method_desc.o: method_desc.cc \
+ message_node.hh \
+ graph.hh \
+ overridden_method.hh
+- $(CPP) $(CFLAGS) method_desc.cc
++ $(CXX) -c $(CXXFLAGS) method_desc.cc
+
+ # --> end of automatically generated dependencies; do not remove this line.
Modified: head/java/jlint/files/patch-jlint.cc
==============================================================================
--- head/java/jlint/files/patch-jlint.cc Fri Aug 31 22:18:48 2018 (r478615)
+++ head/java/jlint/files/patch-jlint.cc Fri Aug 31 22:32:05 2018 (r478616)
@@ -29,3 +29,12 @@
monitor_stack::const_iterator it;
for (it = this_class->usedLocks.begin();
+@@ -1041,7 +1041,7 @@ int main(int argc, char* argv[])
+ if (verbose) {
+ fprintf(stderr,
+ "Jlint - program correctness verifier for Java, "
+- "version %s ("__DATE__").\n", VERSION);
++ "version %s\n", VERSION);
+ }
+ continue;
+ }
More information about the svn-ports-all
mailing list