jna/jna-build.patch

255 lines
10 KiB
Diff
Raw Normal View History

--- jna-5.5.0/build.xml 2019-10-30 17:41:18.000000000 +0100
+++ jna-5.5.0/build.xml 2020-06-04 08:56:23.649941131 +0200
@@ -357,7 +357,7 @@
<target name="-setup" depends="-dynamic-properties">
<path id="compile-test.path">
<path id="test.libs">
- <fileset dir="lib">
+ <fileset dir="/usr/share/java">
<include name="junit.jar"/>
<include name="hamcrest-core-1.3.jar"/>
</fileset>
@@ -403,7 +403,7 @@
</srcfiles>
</uptodate>
</target>
- <target name="jar" depends="-setup,native,:jar" unless="-jar"
+ <target name="jar" depends="-setup,compile,:jar" unless="-jar"
description="Build primary jar">
<!-- Bundle native components with primary jar to facilitate
easy distribution to common platforms.
@@ -436,157 +436,10 @@
<!-- Note that no terminal "*" is included in this list,
which will force failure on unsupported platforms.
-->
- <attribute name="Bundle-NativeCode"
- value="
-com/sun/jna/win32-x86/jnidispatch.dll;
-processor=x86;osname=win32,
-com/sun/jna/win32-x86-64/jnidispatch.dll;
-processor=x86-64;osname=win32,
-com/sun/jna/win32-x86/jnidispatch.dll;
-processor=x86;osname=win,
-com/sun/jna/win32-x86-64/jnidispatch.dll;
-processor=x86-64;osname=win,
-com/sun/jna/w32ce-arm/jnidispatch.dll;
-processor=arm;osname=wince,
-
-com/sun/jna/sunos-x86/libjnidispatch.so;
-processor=x86;osname=sunos,
-com/sun/jna/sunos-x86-64/libjnidispatch.so;
-processor=x86-64;osname=sunos,
-com/sun/jna/sunos-sparc/libjnidispatch.so;
-processor=sparc;osname=sunos,
-com/sun/jna/sunos-sparcv9/libjnidispatch.so;
-processor=sparcv9;osname=sunos,
-
-com/sun/jna/aix-ppc/libjnidispatch.a;
-processor=ppc;osname=aix,
-com/sun/jna/aix-ppc64/libjnidispatch.a;
-processor=ppc64;osname=aix,
-
-com/sun/jna/linux-ppc/libjnidispatch.so;
-processor=ppc;osname=linux,
-com/sun/jna/linux-ppc64/libjnidispatch.so;
-processor=ppc64;osname=linux,
-com/sun/jna/linux-ppc64le/libjnidispatch.so;
-processor=ppc64le;osname=linux,
-com/sun/jna/linux-x86/libjnidispatch.so;
-processor=x86;osname=linux,
-com/sun/jna/linux-x86-64/libjnidispatch.so;
-processor=x86-64;osname=linux,
-com/sun/jna/linux-arm/libjnidispatch.so;
-processor=arm;osname=linux,
-com/sun/jna/linux-arm/libjnidispatch.so;
-processor=arm_le;osname=linux,
-com/sun/jna/linux-armel/libjnidispatch.so;
-processor=armel;osname=linux,
-com/sun/jna/linux-aarch64/libjnidispatch.so;
-processor=aarch64;osname=linux,
-com/sun/jna/linux-ia64/libjnidispatch.so;
-processor=ia64;osname=linux,
-com/sun/jna/linux-sparcv9/libjnidispatch.so;
-processor=sparcv9;osname=linux,
-com/sun/jna/linux-mips64el/libjnidispatch.so;
-processor=mips64el;osname=linux,
-com/sun/jna/linux-s390x/libjnidispatch.so;
-processor=S390x;osname=linux,
-
-com/sun/jna/freebsd-x86/libjnidispatch.so;
-processor=x86;osname=freebsd,
-com/sun/jna/freebsd-x86-64/libjnidispatch.so;
-processor=x86-64;osname=freebsd,
-com/sun/jna/openbsd-x86/libjnidispatch.so;
-processor=x86;osname=openbsd,
-com/sun/jna/openbsd-x86-64/libjnidispatch.so;
-processor=x86-64;osname=openbsd,
-
-com/sun/jna/darwin/libjnidispatch.jnilib;
-osname=macosx;processor=x86;processor=x86-64;processor=ppc
-"/>
</manifest>
<fileset dir="${classes}" excludes="${jar.omitted}">
<patternset refid="jar-compiled"/>
</fileset>
- <zipfileset src="${lib.native}/win32-x86.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/win32-x86"/>
- <zipfileset src="${lib.native}/aix-ppc.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/aix-ppc"/>
- <zipfileset src="${lib.native}/aix-ppc64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/aix-ppc64"/>
- <zipfileset src="${lib.native}/darwin.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/darwin"/>
- <zipfileset src="${lib.native}/linux-x86.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-x86"/>
- <zipfileset src="${lib.native}/linux-x86-64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-x86-64"/>
- <zipfileset src="${lib.native}/linux-arm.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-arm"/>
- <zipfileset src="${lib.native}/linux-armel.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-armel"/>
- <zipfileset src="${lib.native}/linux-aarch64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-aarch64"/>
- <zipfileset src="${lib.native}/linux-ia64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-ia64"/>
- <zipfileset src="${lib.native}/linux-ppc.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-ppc"/>
- <zipfileset src="${lib.native}/linux-ppc64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-ppc64"/>
- <zipfileset src="${lib.native}/linux-ppc64le.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-ppc64le"/>
- <zipfileset src="${lib.native}/linux-sparcv9.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-sparcv9"/>
- <zipfileset src="${lib.native}/linux-mips64el.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-mips64el"/>
- <zipfileset src="${lib.native}/linux-s390x.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-s390x"/>
- <zipfileset src="${lib.native}/sunos-x86.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/sunos-x86"/>
- <zipfileset src="${lib.native}/sunos-x86-64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/sunos-x86-64"/>
- <zipfileset src="${lib.native}/sunos-sparc.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/sunos-sparc"/>
- <zipfileset src="${lib.native}/sunos-sparcv9.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/sunos-sparcv9"/>
- <zipfileset src="${lib.native}/freebsd-x86.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/freebsd-x86"/>
- <zipfileset src="${lib.native}/freebsd-x86-64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/freebsd-x86-64"/>
- <zipfileset src="${lib.native}/openbsd-x86.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/openbsd-x86"/>
- <zipfileset src="${lib.native}/openbsd-x86-64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/openbsd-x86-64"/>
- <zipfileset src="${lib.native}/win32-x86-64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/win32-x86-64"/>
- <zipfileset src="${lib.native}/w32ce-arm.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/w32ce-arm"/>
- <zipfileset dir="."
- includes="LICENSE,LGPL2.1,AL2.0"
- prefix="META-INF"/>
</jar>
<zip zipfile="${build}/${minjar}">
<zipfileset src="${build}/${jar}" excludes="**/*jnidispatch*"/>
@@ -1059,7 +912,7 @@
</javac>
</target>
- <target name="compile-tests" depends="compile,native,jar"
+ <target name="compile-tests" depends="compile,jar"
description="Compile all test code">
<javac classpathref="compile-test.path"
source="${test.compatibility}"
@@ -1111,8 +964,6 @@
<mkdir dir="${build}/jws"/>
<copy todir="${build}/jws" file="${build}/${jar}"/>
<copy todir="${build}/jws" file="${build}/${testjar}"/>
- <copy todir="${build}/jws" file="lib/junit.jar"/>
- <copy todir="${build}/jws" file="lib/clover.jar"/>
<jar jarfile="${build}/jws/jnidispatch.jar" createUnicodeExtraFields="never" encoding="UTF-8">
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
</jar>
@@ -1313,7 +1164,6 @@
<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>
@@ -1331,13 +1181,14 @@
<group title="Platform Specific" packages="com.sun.jna.platform.*"/>
<arg value="-notimestamp"/>
+ <arg value="--allow-script-in-comments"/>
</javadoc>
<jar jarfile="${platform-javadoc-jar}" createUnicodeExtraFields="never" encoding="UTF-8">
<fileset dir="${javadoc}" />
</jar>
</target>
- <target name="dist" depends="jar,aar,javadoc,contrib-jars,compile-tests,native"
+ <target name="dist" depends="jar,aar,javadoc,contrib-jars,compile-tests"
description="Build distribution files">
<copy todir="${dist}" force="true" overwrite="true">
<fileset dir="${build}" includes="${jar},${minjar},${aar}"/>
Only in jna-5.5.0/native/libffi/src/powerpc: linux64_closure.S.orig
--- jna-5.5.0/native/Makefile 2019-10-30 17:41:18.000000000 +0100
+++ jna-5.5.0/native/Makefile 2020-06-04 08:53:07.896789270 +0200
@@ -97,7 +97,7 @@
PCFLAGS=-W -Wall -Wno-unused -Wno-parentheses
CFLAGS=$(PCFLAGS) $(CFLAGS_EXTRA) $(COPT) $(CDEBUG) $(CDEFINES) $(CINCLUDES) \
-DJNA_JNI_VERSION='"$(JNA_JNI_VERSION)"' -DCHECKSUM='"$(CHECKSUM)"'
-LDFLAGS=-o $@ -shared
+LDFLAGS=$(RPM_LD_FLAGS) -o $@ -shared
ifeq ($(DYNAMIC_LIBFFI),true)
CFLAGS += $(shell pkg-config --cflags libffi 2>/dev/null || echo)
LIBS += $(shell pkg-config --libs libffi 2>/dev/null || echo -lffi)
@@ -337,11 +337,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
+ LOC_CC_OPTS=-Wno-error -Wno-clobbered -Wno-unused-variable
endif
endif
else
- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable
+ LOC_CC_OPTS=-Wno-error -Wno-clobbered -Wno-unused-variable
endif
# Enable 64-bit builds if the arch demands it
@@ -457,7 +457,6 @@
$(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB)
$(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS)
- $(STRIP) $@
$(TESTLIB): $(BUILD)/testlib.o
$(LD) $(LDFLAGS) $< $(LIBS)