1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-25 00:51:21 +00:00

Upgrade to version 4.0.

Submitted by:	jgh (by mail)
This commit is contained in:
Jimmy Olgeni 2013-09-24 21:01:52 +00:00
parent 7bab335511
commit 582561a2cf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328194
5 changed files with 66 additions and 50 deletions

View File

@ -1,12 +1,9 @@
# $FreeBSD$
PORTNAME= jna
PORTVERSION= 3.2.7
PORTREVISION= 1
PORTVERSION= 4.0
CATEGORIES= devel java
MASTER_SITES= LOCAL/olgeni
DISTFILES= ${PORTNAME}-${PORTVERSION}${EXTRACT_SUFX} \
${PORTNAME}-${PORTVERSION}-doc${EXTRACT_SUFX}
MASTER_SITES= GH
MAINTAINER= olgeni@FreeBSD.org
COMMENT= Java access to native shared libraries
@ -15,32 +12,48 @@ USES= gmake
USE_GCC= any
USE_ANT= yes
USE_JAVA= 1.4+
USE_ZIP= yes
USE_XORG= x11 xt
MAKE_ARGS= -DCC=${CC} -DLD=${LD}
MAKE_ENV+= ANT_OPTS=-Drelease
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
DOCSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}-doc
USE_GITHUB= yes
GH_ACCOUNT= twall
GH_TAG= ${PORTVERSION}
GH_COMMIT= 9b7ba38
PLIST_FILES= %%JAVAJARDIR%%/jna-platform.jar \
%%JAVAJARDIR%%/jna.jar
.if !defined(NOPORTDOCS)
PORTDOCS= javadoc platform
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MDOCS}
PORTDOCS= javadoc platform-${PORTVERSION:L}.0-javadoc.jar
.endif
.if ${ARCH} == "i386"
ARCH= x86
.elif ${ARCH} == "amd64"
ARCH= x86-64
.endif
NO_STAGE= yes
post-patch:
@${CHMOD} 755 ${WRKSRC}/native/libffi/configure
@${CHMOD} 755 ${WRKSRC}/native/libffi/install-sh
post-build-script:
.if ${PORT_OPTIONS:MDOCS}
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${ANT} javadoc
.endif
do-install:
@${INSTALL_DATA} ${WRKSRC}/build*/freebsd-${ARCH}.jar ${JAVAJARDIR}/jna-platform.jar
@${INSTALL_DATA} ${WRKSRC}/build*/jna.jar ${JAVAJARDIR}/jna.jar
.if !defined(NOPORTDOCS)
@${INSTALL_DATA} ${WRKSRC}/build/freebsd-${ARCH}.jar ${JAVAJARDIR}/jna-platform.jar
@${INSTALL_DATA} ${WRKSRC}/build/jna.jar ${JAVAJARDIR}/jna.jar
.if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
@cd ${DOCSRC} && ${COPYTREE_SHARE} javadoc ${DOCSDIR}
@cd ${DOCSRC} && ${COPYTREE_SHARE} platform ${DOCSDIR}
cd ${WRKSRC}/doc && ${COPYTREE_SHARE} javadoc ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/dist/platform-${PORTVERSION:L}.0-javadoc.jar ${DOCSDIR}
.endif
.include <bsd.port.mk>

View File

@ -1,4 +1,2 @@
SHA256 (jna-3.2.7.zip) = 5fdc80c353b22f04edc1424ac984c521dd3bcbf34037274b84320b0991b3e451
SIZE (jna-3.2.7.zip) = 11556502
SHA256 (jna-3.2.7-doc.zip) = 48bc9de316b02b9142b894a36e2eda464deef6c81b386734bba9002b96db4ef9
SIZE (jna-3.2.7-doc.zip) = 2295661
SHA256 (jna-4.0.tar.gz) = cedac34ca1a565961ce2d1bca84f7d6afed32980d7f46aee8d4620c2625c2c63
SIZE (jna-4.0.tar.gz) = 51695145

View File

@ -1,24 +1,32 @@
$FreeBSD$
--- build.xml.orig
+++ build.xml
@@ -58,7 +58,7 @@
<!-- Miscellaneous -->
<property name="build.compiler.emacs" value="true"/>
- <target name="default" depends="test" description="Build and Test."/>
+ <target name="default" depends="jar,contrib-jars" description="Build and Test."/>
<!-- uncomment for netbeans profiling -->
<!--<import file="nbproject/profiler-build-impl.xml"/>-->
@@ -437,9 +437,6 @@
--- ./build.xml.orig
+++ ./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">
+ <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 **/LibraryLoadTest.java">
<equals arg1="${os.prefix}" arg2="w32ce-arm"/>
</condition>
<property name="dist-jar" value="${dist}/${jar}"/>
@@ -805,9 +805,6 @@
<jar jarfile="${build}/jws/jnidispatch.jar">
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
</jar>
- <signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
- <fileset dir="${build}/jws" includes="jna.jar,jna-test.jar,junit.jar,jnidispatch.jar,clover.jar"/>
- <signjar alias="jna" keystore="jna.keystore" storepass="jnadev" lazy="true">
- <fileset dir="${build}/jws" includes="${jar},${testjar},junit.jar,jnidispatch.jar,clover.jar"/>
- </signjar>
</target>
<!-- When running tests from an IDE, be sure to set jna.library.path -->
<target name="android-test-setup" depends="compile-tests"
@@ -965,7 +962,6 @@
<doctitle>JNA API Documentation</doctitle>
<header>${header}</header>
<bottom>${footer}</bottom>
- <link href="http://download.oracle.com/javase/1.4.2/docs/api/"/>
<packageset dir="${src}" defaultexcludes="yes">
<patternset>

View File

@ -1,23 +1,20 @@
$FreeBSD$
--- native/Makefile.orig
+++ native/Makefile
@@ -20,6 +20,8 @@
# protection simply by defining HAVE_PROTECTION. This has been enabled
# only for those platforms on which it has been tested successfully.
--- ./native/Makefile.orig 2013-09-16 23:52:29.000000000 -0700
+++ ./native/Makefile 2013-09-16 23:53:09.000000000 -0700
@@ -36,6 +36,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\|MINGW32\).*/win32/g' \
OS=$(shell uname | sed -e 's/CYGWIN.*/win32/g' \
-e 's/MINGW32.*/win32/g' \
-e 's/SunOS.*/solaris/g' \
-e 's/FreeBSD.*/freebsd/g' \
@@ -135,7 +135,7 @@
ifeq ($(OS),freebsd)
@@ -249,7 +251,7 @@
ifneq (,$(findstring bsd,$(OS)))
ARCH=$(shell uname -m | sed 's/i.86/i386/g')
PCFLAGS+=-fPIC
-CINCLUDES+=-I/usr/X11R6/include
+CINCLUDES+=-I/usr/local/include
LDFLAGS=-o $@ -shared
CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT
LDFLAGS=-o $@ -shared
CDEFINES+=-DHAVE_PROTECTION -DFFI_MMAP_EXEC_WRIT -DUSE_DEAFULT_LIBNAME_ENCODING
endif

View File

@ -9,4 +9,4 @@ 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.
WWW: https://jna.dev.java.net/
WWW: https://github.com/twall/jna