jna/jna-build.patch

302 lines
13 KiB
Diff
Raw Permalink Normal View History

--- jna-5.13.0/build.xml 2023-05-30 11:38:06.363232087 +0200
+++ jna-5.13.0/build.xml 2023-05-30 15:27:50.875085921 +0200
@@ -370,7 +370,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>
@@ -440,7 +440,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.
@@ -485,87 +485,6 @@
<!-- 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-aarch64/jnidispatch.dll;
-processor=aarch64;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/win32-aarch64/jnidispatch.dll;
-processor=aarch64;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/linux-loongarch64/libjnidispatch.so;
-processor=loongarch64;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-ppc/libjnidispatch.jnilib;
-osname=macosx;processor=ppc,
-com/sun/jna/darwin-ppc64/libjnidispatch.jnilib;
-osname=macosx;processor=ppc64,
-com/sun/jna/darwin-x86/libjnidispatch.jnilib;
-osname=macosx;processor=x86,
-com/sun/jna/darwin-x86-64/libjnidispatch.jnilib;
-osname=macosx;processor=x86-64,
-com/sun/jna/darwin-aarch64/libjnidispatch.jnilib;
-osname=macosx;processor=aarch64
-"/>
</manifest>
<manifest file="@{target}" mode="update" if:true="@{module-info}">
<attribute name="Multi-Release" value="true"/>
@@ -596,108 +515,6 @@
<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-ppc.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/darwin-ppc"/>
- <zipfileset src="${lib.native}/darwin-ppc64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/darwin-ppc64"/>
- <zipfileset src="${lib.native}/darwin-x86.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/darwin-x86"/>
- <zipfileset src="${lib.native}/darwin-x86-64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/darwin-x86-64"/>
- <zipfileset src="${lib.native}/darwin-aarch64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/darwin-aarch64"/>
- <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-loongarch64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-loongarch64"/>
- <zipfileset src="${lib.native}/linux-s390x.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-s390x"/>
- <zipfileset src="${lib.native}/linux-riscv64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/linux-riscv64"/>
- <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}/win32-aarch64.jar"
- includes="*jnidispatch*"
- prefix="com/sun/jna/win32-aarch64"/>
- <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*"/>
@@ -781,7 +598,7 @@
</zip>
</target>
- <target name="contrib-jars" depends="platform-jar" description="Build contrib jars">
+ <target name="contrib-jars" description="Build contrib jars">
<subant target="jar" failonerror="true">
<property name="file.reference.jna.build" location="${build}"/>
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
@@ -1196,7 +1013,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}"
@@ -1284,8 +1101,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>
@@ -1486,7 +1301,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>
@@ -1504,13 +1318,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},${jar-jpms}"/>
--- jna-5.13.0/native/Makefile 2023-05-30 11:38:06.515233135 +0200
+++ jna-5.13.0/native/Makefile 2023-05-30 12:04:00.394037184 +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)
@@ -356,11 +356,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-error -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
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
@@ -486,7 +486,6 @@
$(LIBRARY): $(JNIDISPATCH_OBJS) $(FFI_LIB)
$(LD) $(LDFLAGS) $(JNIDISPATCH_OBJS) $(FFI_LIB) $(LIBS)
- $(STRIP) $@
$(TESTLIB): $(BUILD)/testlib.o
$(LD) $(LDFLAGS) $< $(LIBS)