SecBSD's official ports repository

This commit is contained in:
purplerain 2023-08-16 22:26:55 +00:00
commit 2c0afcbbf3
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
64331 changed files with 5339189 additions and 0 deletions

24
java/jlint/Makefile Normal file
View file

@ -0,0 +1,24 @@
COMMENT= Java program analyzer and checker
DISTNAME= jlint-3.1.2
REVISION = 3
CATEGORIES= java
HOMEPAGE= http://jlint.sourceforge.net/
# GPLv2+
PERMIT_PACKAGE= Yes
WANTLIB= c z m ${COMPILER_LIBCXX}
COMPILER = base-clang ports-gcc base-gcc
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=jlint/}
MAKE_ENV+= CC="${CC}" CPP="${CXX}" \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
INSTALL_DATA_DIR="${INSTALL_DATA_DIR}" \
INSTALL_DATA="${INSTALL_DATA}"
NO_TEST= Yes
.include <bsd.port.mk>

2
java/jlint/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (jlint-3.1.2.tar.gz) = 42olJQ4xxMqpmBi39lHUAMJusFxBz5uCTxw94t6CBvU=
SIZE (jlint-3.1.2.tar.gz) = 269056

View file

@ -0,0 +1,66 @@
--- Makefile.orig Wed Jan 14 17:23:41 2004
+++ Makefile Thu Mar 26 19:02:54 2009
@@ -3,8 +3,8 @@
# 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++
# Optimized version
-CFLAGS = -c -Wall -O2 -g
+CFLAGS += -c
# -DSLIST removed because it wouldn't compile under gcc 3.x
# add -DHASH_TABLE for extra speed (may sometimes produce inconsistent results)
@@ -28,7 +28,8 @@ 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
+LFLAGS=-g
+LIBS=-lz
# Directory to place executables
INSTALL_DIR=/usr/local/bin
@@ -52,7 +53,7 @@ antic.o: antic.c
$(CC) $(CFLAGS) antic.c
antic: antic.o
- $(CC) $(LFLAGS) -o antic antic.o
+ $(CC) $(LFLAGS) -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}
@@ -103,10 +104,11 @@ test-zip:
install:
- cp jlint antic jlint.sh $(INSTALL_DIR)
- chmod 755 $(INSTALL_DIR)/antic
- chmod 755 $(INSTALL_DIR)/jlint
- chmod 755 $(INSTALL_DIR)/jlint.sh
+ $(INSTALL_PROGRAM) antic $(PREFIX)/bin
+ $(INSTALL_PROGRAM) jlint $(PREFIX)/bin
+ $(INSTALL_PROGRAM) jlint.sh $(PREFIX)/bin
+ $(INSTALL_DATA_DIR) $(PREFIX)/share/doc/jlint
+ $(INSTALL_DATA) manual.pdf $(PREFIX)/share/doc/jlint
# --> automatically generated dependencies follow; do not remove this line.
@@ -120,7 +122,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
+ $(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 $(LIBS)
access_desc.o: access_desc.cc \
access_desc.hh \

View file

@ -0,0 +1,14 @@
--- field_desc.hh.orig Tue Jun 5 14:19:37 2001
+++ field_desc.hh Thu Mar 26 19:01:07 2009
@@ -2,9 +2,10 @@
#define FIELD_DESC_HH
#ifdef VISUAL_CPP
-using namespace std;
#pragma warning (disable : 4786)
#endif
+
+using namespace std;
#include "component_desc.hh"
#include "utf_string.hh"

View file

@ -0,0 +1,86 @@
Index: jlint.cc
--- jlint.cc.orig
+++ jlint.cc
@@ -41,7 +41,7 @@ bool source_path_redefined = false;
int reported_message_mask = cat_all;
FILE* history;
string_pool stringPool;
-field_desc* is_const;
+field_desc* my_is_const;
message_descriptor msg_table[] =
{
@@ -138,7 +138,7 @@ int get_type(utf_string const& str)
void format_message(int code, utf_string const& file, int line, __VALIST ap)
{
- static int loop_id;
+ static long loop_id;
static message_node *first, *last;
static char* compound_message;
const void* parameter[MAX_MSG_PARAMETERS];
@@ -151,7 +151,7 @@ void format_message(int code, utf_string const& file,
if (compound_message != NULL
&& ((loop_id != 0
&& ((code != msg_loop && code != msg_sync_loop)
- || (int)(long)parameter[2] != loop_id))
+ || (long)parameter[2] != loop_id))
|| (loop_id == 0 && code != msg_wait_path)))
{
if (!message_node::find(compound_message)) {
@@ -226,7 +226,7 @@ void format_message(int code, utf_string const& file,
name.as_asciz());
break;
case 'd': // integer
- dst += sprintf(dst, "%d", (int)(long)parameter[index]);
+ dst += sprintf(dst, "%ld", (long)parameter[index]);
break;
default:
assert(false/*bad message parameter format*/);
@@ -262,7 +262,7 @@ void format_message(int code, utf_string const& file,
compound_message = strdup(his_buf);
first = last = new message_node(msg_buf);
if (code != msg_wait) {
- loop_id = (int)(long)parameter[2];
+ loop_id = (long)parameter[2];
}
} else if (!message_node::find(his_buf)) {
fprintf(stdout, "%s\n", msg_buf);
@@ -401,8 +401,8 @@ bool parse_class_file(byte* fp)
is_this->equals = is_this;
is_this->cls = this_class;
- // init. is_const
- field_desc* is_const = new field_desc(utf_string("<const>"), NULL, NULL);
+ // init. my_is_const
+ field_desc* my_is_const = new field_desc(utf_string("<const>"), NULL, NULL);
this_class->attr = access_flags;
if (super_class_name == 0) { // Object class
@@ -627,7 +627,7 @@ bool parse_class_file(byte* fp)
delete[] constant_pool;
delete is_this->name_and_type;
//delete is_this;
- delete is_const;
+ delete my_is_const;
monitor_stack::const_iterator it;
for (it = this_class->usedLocks.begin();
@@ -662,7 +662,7 @@ inline int stricmp(const char* p, const char* q)
return 0;
}
-void proceed_file(char* file_name, bool recursive = false)
+void proceed_file(char* file_name, int recursive = 0)
{
#ifdef _WIN32
HANDLE dir;
@@ -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 (" __DATE__ ").\n", VERSION);
}
continue;
}

View file

@ -0,0 +1,20 @@
--- method_desc.cc.orig Wed Apr 12 14:38:53 2017
+++ method_desc.cc Wed Apr 12 14:40:13 2017
@@ -767,7 +767,7 @@ void method_desc::parse_code(constant** constant_pool,
sp->mask = var_desc::vs_not_null;
}
sp->index = NO_ASSOC_VAR;
- sp->equals = is_const;
+ sp->equals = my_is_const;
sp += 1;
}
break;
@@ -2381,7 +2381,7 @@ void method_desc::parse_code(constant** constant_pool,
aux->name_and_type = nt;
sp->equals = aux;
equal_descs.push_back(aux);*/
- sp->equals = is_const;
+ sp->equals = my_is_const;
}
}
field->equals = sp->equals;

View file

@ -0,0 +1,9 @@
--- method_desc.hh.orig Wed Apr 12 14:38:59 2017
+++ method_desc.hh Wed Apr 12 14:39:50 2017
@@ -147,5 +147,5 @@ class method_desc : public component_desc { (private)
const char* compound_name(const char* first, const char* second);
extern string_pool stringPool; // declared in jlint.cc
-extern field_desc* is_const;
+extern field_desc* my_is_const;
#endif

View file

@ -0,0 +1,29 @@
Index: types.hh
--- types.hh.orig
+++ types.hh
@@ -2,10 +2,10 @@
#define TYPES_HH
#ifdef VISUAL_CPP
-#include <assert.h>
#pragma warning( disable : 4786)
#endif
+#include <cassert>
#include <string>
#include <vector>
#include <stddef.h>
@@ -141,10 +141,10 @@ struct vbm_operand {
int_type_range const ranges[] = {
// min max
{0x00000000, 0x00000001}, // tp_bool
- {0xffffff80, 0x0000007f}, // tp_byte
+ {-0x00000080, 0x0000007f}, // tp_byte
{0x00000000, 0x0000ffff}, // tp_char
- {0xffff8000, 0x00007fff}, // tp_short
- {0x80000000, 0x7fffffff} // tp_int
+ {-0x00008000, 0x00007fff}, // tp_short
+ {static_cast<int>(-0x80000000), 0x7fffffff} // tp_int
};
int const array_type[] = {

3
java/jlint/pkg/DESCR Normal file
View file

@ -0,0 +1,3 @@
Jlint will check your Java code and find bugs, inconsistencies and
synchronization problems by doing data flow analysis and building a
lock graph.

5
java/jlint/pkg/PLIST Normal file
View file

@ -0,0 +1,5 @@
@bin bin/antic
@bin bin/jlint
bin/jlint.sh
share/doc/jlint/
share/doc/jlint/manual.pdf