updated autoconf, java jna, etc

This commit is contained in:
2023-03-25 12:04:27 +02:00
parent 222ed29b84
commit 9251e2c9bd
30 changed files with 1364 additions and 169 deletions

View File

@@ -0,0 +1,50 @@
PORTNAME= pty4j
PORTVERSION= 0.12.10
CATEGORIES= devel java
PKGNAMEPREFIX= jetbrains-
DIST_SUBDIR= jetbrains
MAINTAINER= dmitry.wagin@ya.ru
COMMENT= Pty4J's native library
WWW= https://github.com/JetBrains/pty4j
USES= gmake
USE_GITHUB= yes
GH_ACCOUNT= JetBrains
GH_PROJECT= pty4j
GH_TAGNAME= aa7f15307744d5d33a44bd72b42513327c879fd3
.include <bsd.port.options.mk>
# The directory we need to install Pty4J's native library in depends
# on the install target's architecture. We rebuild libpty.so instead
# of using one of the bundled ones which are FreeBSD 10.x only.
.if ${ARCH} == "amd64"
PTY4J_ARCH= x86-64
.elif ${ARCH} == "i386"
PTY4J_ARCH= x86
.else
PTY4J_ARCH=
.endif
.if ${PTY4J_ARCH} != ""
# Despite what the name might suggest using the linux_x86_64 target
# will always build libpty.so for the native platform.
BUILD_WRKSRC= ${WRKSRC}/native
MAKEFILE= Makefile_freebsd
ALL_TARGET= linux_x86_64
PLIST_FILES+= lib/pty4j/freebsd/${PTY4J_ARCH}/libpty.so
.else
# If native Pty4J support is missing.
NO_BUILD= yes
.endif
do-install:
.if ${PTY4J_ARCH} != ""
${MKDIR} ${STAGEDIR}${PREFIX}/lib/pty4j/freebsd/${PTY4J_ARCH}
# See above why we always use freebsd/x86-64/ here
${INSTALL_LIB} ${WRKSRC}/os/freebsd/x86-64/libpty.so ${STAGEDIR}${PREFIX}/lib/pty4j/freebsd/${PTY4J_ARCH}/
.endif
.include <bsd.port.mk>

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1670074422
SHA256 (jetbrains/JetBrains-pty4j-0.12.10-aa7f15307744d5d33a44bd72b42513327c879fd3_GH0.tar.gz) = 386a5057f4d5b33139f83bd8ed57a703714fa71c649ab750f8a9839b5133c306
SIZE (jetbrains/JetBrains-pty4j-0.12.10-aa7f15307744d5d33a44bd72b42513327c879fd3_GH0.tar.gz) = 1586412

View File

@@ -0,0 +1 @@
Pty4J - Pseudo terminal(PTY) implementation in Java.

41
java/jna/Makefile Normal file
View File

@@ -0,0 +1,41 @@
PORTNAME= jna
PORTVERSION= 5.13.0
CATEGORIES= devel java
MAINTAINER= ports@markdixon.name
COMMENT= Java access to native shared libraries
WWW= https://github.com/twall/jna
BROKEN_armv6= fails to compile: build.xml: compilation failed
BROKEN_armv7= fails to compile: build.xml: compilation failed
BUILD_DEPENDS= makeinfo:system/texinfo
USES= autoreconf:build gmake libtool
USE_ANT= yes
USE_JAVA= yes
JAVA_VERSION= 11+
MAKE_ARGS= -DCC="${CC}" -DLD="${LD}"
MAKE_ENV= ANT_OPTS=-Drelease -DARCH=${ANT_ARCH}
USE_GITHUB= yes
GH_ACCOUNT= java-native-access
PORTDOCS= javadoc platform-${PORTVERSION}-javadoc.jar
PLIST_FILES= %%JAVAJARDIR%%/jna-platform.jar %%JAVAJARDIR%%/jna.jar
ALL_TARGET= native jar
ANT_ARCH= ${ARCH:S/amd64/x86-64/:S/i386/x86/:S/powerpc64/ppc64/}
post-patch:
@${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|' \
${WRKSRC}/native/Makefile
do-install:
${INSTALL_DATA} ${WRKSRC}/build/freebsd-${ANT_ARCH}.jar \
${STAGEDIR}${JAVAJARDIR}/jna-platform.jar
${INSTALL_DATA} ${WRKSRC}/build/jna.jar \
${STAGEDIR}${JAVAJARDIR}/jna.jar
.include <bsd.port.mk>

3
java/jna/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1679732608
SHA256 (java-native-access-jna-5.13.0_GH0.tar.gz) = 526bff8ffcbc2067a7403f55b01ad8d7a781c098abca79c4ea6c9e80198bb5fd
SIZE (java-native-access-jna-5.13.0_GH0.tar.gz) = 116027625

View File

@@ -0,0 +1,19 @@
--- build.xml.orig 2016-03-16 14:37:28 UTC
+++ build.xml
@@ -99,7 +99,7 @@
<condition property="test.compatibility" value="1.5" else="${compatibility}">
<equals arg1="${compatibility}" arg2="1.4"/>
</condition>
- <condition property="tests.exclude-patterns" value="**/VarArgsTest.java,**/AnnotatedLibraryTest.java,**/WebStartTest.java,**/PointerBufferTest.java,**/HeadlessLoadLibraryTest.java,**/StructureBufferFieldTest.java,**/PerformanceTest.java,**/*BufferArgumentsMarshalTest.java" else="**/wince/*.java,**/WebStartTest.java">
+ <condition property="tests.exclude-patterns" value="**/VarArgsTest.java,**/AnnotatedLibraryTest.java,**/WebStartTest.java,**/PointerBufferTest.java,**/HeadlessLoadLibraryTest.java,**/StructureBufferFieldTest.java,**/PerformanceTest.java,**/*BufferArgumentsMarshalTest.java" else="**/wince/*.java,**/WebStartTest.java,**/LibraryLoadTest.java">
<equals arg1="${os.prefix}" arg2="w32ce-arm"/>
</condition>
<property name="dist-jar" value="${dist}/${jar}"/>
@@ -1084,7 +1084,6 @@ osname=macosx;processor=x86;processor=x8
<doctitle>JNA API Documentation</doctitle>
<header>${header}</header>
<bottom>${footer}</bottom>
- <link href="http://download.oracle.com/javase/${compatibility}/docs/api/"/>
<packageset dir="${src}" defaultexcludes="yes">
<patternset>

View File

@@ -0,0 +1,38 @@
--- native/Makefile.orig 2021-02-08 18:49:25.000000000 +0000
+++ native/Makefile 2021-03-06 13:25:34.083392000 +0000
@@ -39,6 +39,8 @@
# protection simply by defining HAVE_PROTECTION. This option has been only
# been enabled for those platforms on which it has been tested successfully.
+unexport LDFLAGS
+
OS=$(shell uname | sed -e 's/CYGWIN.*/win32/g' \
-e 's/MINGW32.*/win32/g' \
-e 's/SunOS.*/solaris/g' \
@@ -291,8 +293,11 @@
ifneq (,$(findstring bsd,$(OS)))
ARCH=$(shell uname -m | sed 's/i.86/i386/g')
PCFLAGS+=-fPIC
-CINCLUDES+=-I/usr/X11R6/include
+CINCLUDES+=-I%%LOCALBASE%%/include
LDFLAGS=-o $@ -shared
+ifeq ($(ARCH),i386)
+LDFLAGS+=-Wl,-z,notext
+endif
CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT -DUSE_DEAFULT_LIBNAME_ENCODING
endif
@@ -356,11 +361,11 @@
GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f 1 -d '.')
ifneq ($(GCC_MAJOR_VERSION),4)
ifneq ($(GCC_MAJOR_VERSION),3)
- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
+ LOC_CC_OPTS=-Wno-unused-variable
endif
endif
else
- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable
+ LOC_CC_OPTS=-Wno-unused-variable
endif
# Enable 64-bit builds if the arch demands it

10
java/jna/pkg-descr Normal file
View File

@@ -0,0 +1,10 @@
JNA provides Java programs easy access to native shared libraries
without writing anything but Java code - no JNI or native code is
required. This functionality is comparable to Windows' Platform/Invoke
and Python's ctypes. Access is dynamic at runtime without code
generation.
JNA allows you to call directly into native functions using natural
Java method invocation. The Java call looks just like it does in
native code. Most calls require no special handling or configuration;
no boilerplate or generated code is required.