1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-18 19:49:40 +00:00

java/sqlitejdbc: this old port requires specific (8th) version of JDK

It should be fairly easy to make it compatible against Java 8~11, but
that's the task for another day.  While here, bump the source/target
version to 1.6 and get rid of bogus `post-patch' target: LOCALBASE is
already passed on the MAKE_ENV.

PR:	264748
This commit is contained in:
Alexey Dokuchaev 2022-07-07 12:30:52 +00:00
parent 4f8ef2cdbe
commit 0276f6d332
2 changed files with 17 additions and 11 deletions

View File

@ -14,15 +14,12 @@ COMMENT= Java JDBC driver for SQLite
LIB_DEPENDS= libsqlite3.so:databases/sqlite3
WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}
USE_JAVA= yes
USE_JAVA= 8
USES= gmake tar:tgz
MAKE_ENV= JAVA_HOME="${JAVA_HOME}"
ALL_TARGET= native
PLIST_FILES= %%JAVAJARDIR%%/sqlitejdbc-native.jar lib/libsqlitejdbc.so
post-patch:
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/Makefile
PLIST_FILES= ${JAVAJARDIR}/sqlitejdbc-native.jar lib/libsqlitejdbc.so
do-install:
${INSTALL_DATA} ${WRKSRC}/build/sqlitejdbc-v${PORTVERSION}-native.jar \

View File

@ -1,6 +1,6 @@
--- Makefile.orig 2008-06-18 01:39:02.000000000 +0200
+++ Makefile 2008-06-23 16:12:40.000000000 +0200
@@ -16,6 +16,7 @@
--- Makefile.orig 2009-06-09 10:54:22 UTC
+++ Makefile
@@ -16,6 +16,7 @@ include Makefile.common
#
include Makefile.common
@ -8,7 +8,7 @@
default: test
@@ -29,13 +30,15 @@
@@ -29,13 +30,15 @@ build/$(sqlitejdbc)-native.jar: $(native_classes)
build/$(sqlitejdbc)-native.jar: $(native_classes)
cd build && jar cf $(sqlitejdbc)-native.jar $(java_classlist)
@ -17,12 +17,21 @@
@mkdir -p build/$(target)
$(JAVAH) -classpath build -jni -o build/NativeDB.h org.sqlite.NativeDB
$(CC) $(CFLAGS) -c -o build/$(target)/NativeDB.o \
+ -I%%LOCALBASE%%/include \
+ -I$(LOCALBASE)/include \
src/org/sqlite/NativeDB.c
$(CC) $(CFLAGS) $(LINKFLAGS) -o build/$(target)/$(LIBNAME) \
- build/$(target)/NativeDB.o build/$(sqlite)-$(target)/*.o
+ build/$(target)/NativeDB.o \
+ -L%%LOCALBASE%%/lib -lsqlite3
+ -L$(LOCALBASE)/lib -lsqlite3
$(STRIP) build/$(target)/$(LIBNAME)
build/$(sqlite)-%/sqlite3.o: dl/$(sqlite)-amal.zip
@@ -51,7 +54,7 @@ build/org/%.class: src/org/%.java
build/org/%.class: src/org/%.java
@mkdir -p build
- $(JAVAC) -source 1.2 -target 1.2 -sourcepath src -d build $<
+ $(JAVAC) -source 1.6 -target 1.6 -sourcepath src -d build $<
build/test/%.class: src/test/%.java
@mkdir -p build