update to 4.0
This commit is contained in:
parent
eb1dc5cfe2
commit
23aec9d032
26
jna-4.0-charfix.patch
Normal file
26
jna-4.0-charfix.patch
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
diff -up ./contrib/platform/src/com/sun/jna/platform/win32/Shell32.java.charfix ./contrib/platform/src/com/sun/jna/platform/win32/Shell32.java
|
||||||
|
--- ./contrib/platform/src/com/sun/jna/platform/win32/Shell32.java.charfix 2013-07-05 15:30:44.970933468 +0200
|
||||||
|
+++ ./contrib/platform/src/com/sun/jna/platform/win32/Shell32.java 2013-07-05 15:31:07.937096847 +0200
|
||||||
|
@@ -181,7 +181,7 @@ public interface Shell32 extends ShellAP
|
||||||
|
* {@link ShellAPI#ABM_QUERYPOS} Requests a size and screen position for an appbar.
|
||||||
|
* {@link ShellAPI#ABM_SETPOS} Sets the size and screen position of an appbar.
|
||||||
|
* {@link ShellAPI#ABM_GETSTATE} Retrieves the autohide and always-on-top states of the Windows taskbar.
|
||||||
|
- * {@link ShellAPI#ABM_GETTASKBARPOS} Retrieves the bounding rectangle of the Windows taskbar. Note that this applies only to the system taskbar. Other objects, particularly toolbars supplied with third-party software, also can be present. As a result, some of the screen area not covered by the Windows taskbar might not be visible to the user. To retrieve the area of the screen not covered by both the taskbar and other app barsÑthe working area available to your applicationÑ, use the GetMonitorInfo function.
|
||||||
|
+ * {@link ShellAPI#ABM_GETTASKBARPOS} Retrieves the bounding rectangle of the Windows taskbar. Note that this applies only to the system taskbar. Other objects, particularly toolbars supplied with third-party software, also can be present. As a result, some of the screen area not covered by the Windows taskbar might not be visible to the user. To retrieve the area of the screen not covered by both the taskbar and other app bars the working area available to your application, use the GetMonitorInfo function.
|
||||||
|
* {@link ShellAPI#ABM_ACTIVATE} Notifies the system to activate or deactivate an appbar. The lParam member of the APPBARDATA pointed to by pData is set to TRUE to activate or FALSE to deactivate.
|
||||||
|
* {@link ShellAPI#ABM_GETAUTOHIDEBAR} Retrieves the handle to the autohide appbar associated with a particular edge of the screen.
|
||||||
|
* {@link ShellAPI#ABM_SETAUTOHIDEBAR} Registers or unregisters an autohide appbar for an edge of the screen.
|
||||||
|
diff -up ./contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java.charfix ./contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java
|
||||||
|
--- ./contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java.charfix 2013-07-05 15:31:25.189219541 +0200
|
||||||
|
+++ ./contrib/platform/src/com/sun/jna/platform/win32/ShellAPI.java 2013-07-05 15:31:43.312348395 +0200
|
||||||
|
@@ -149,8 +149,8 @@ public interface ShellAPI extends StdCal
|
||||||
|
* supplied with third-party software, also can be present. As a result,
|
||||||
|
* some of the screen area not covered by the Windows taskbar might not be
|
||||||
|
* visible to the user. To retrieve the area of the screen not covered by
|
||||||
|
- * both the taskbar and other app barsÑthe working area available to your
|
||||||
|
- * applicationÑ, use the GetMonitorInfo function.
|
||||||
|
+ * both the taskbar and other app bars the working area available to your
|
||||||
|
+ * application, use the GetMonitorInfo function.
|
||||||
|
*/
|
||||||
|
int ABM_ACTIVATE = 0x00000006;
|
||||||
|
/**
|
@ -1,7 +1,7 @@
|
|||||||
diff -up ./build.xml.junit ./build.xml
|
diff -up ./build.xml.junit ./build.xml
|
||||||
--- ./build.xml.junit 2013-04-29 15:06:12.423790515 +0200
|
--- ./build.xml.junit 2013-07-05 15:06:52.372675395 +0200
|
||||||
+++ ./build.xml 2013-04-29 15:07:09.442166774 +0200
|
+++ ./build.xml 2013-07-05 15:11:30.878645352 +0200
|
||||||
@@ -250,7 +250,7 @@
|
@@ -290,7 +290,7 @@
|
||||||
<target name="-setup" depends="-dynamic-properties">
|
<target name="-setup" depends="-dynamic-properties">
|
||||||
<path id="compile-test.path">
|
<path id="compile-test.path">
|
||||||
<path id="test.libs">
|
<path id="test.libs">
|
||||||
@ -10,7 +10,7 @@ diff -up ./build.xml.junit ./build.xml
|
|||||||
<include name="junit.jar"/>
|
<include name="junit.jar"/>
|
||||||
</fileset>
|
</fileset>
|
||||||
<fileset dir="lib/test"/>
|
<fileset dir="lib/test"/>
|
||||||
@@ -441,7 +441,7 @@ osname=macosx;processor=x86;processor=x8
|
@@ -486,7 +486,7 @@ osname=macosx;processor=x86;processor=x8
|
||||||
<subant target="jar" failonerror="true">
|
<subant target="jar" failonerror="true">
|
||||||
<property name="file.reference.jna.build" location="${build}"/>
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
@ -19,7 +19,7 @@ diff -up ./build.xml.junit ./build.xml
|
|||||||
<property name="javac.source" value="${platform.compatibility}"/>
|
<property name="javac.source" value="${platform.compatibility}"/>
|
||||||
<property name="javac.target" value="${platform.compatibility}"/>
|
<property name="javac.target" value="${platform.compatibility}"/>
|
||||||
<fileset dir="${contrib}" includes="platform/build.xml" />
|
<fileset dir="${contrib}" includes="platform/build.xml" />
|
||||||
@@ -456,7 +456,7 @@ osname=macosx;processor=x86;processor=x8
|
@@ -501,7 +501,7 @@ osname=macosx;processor=x86;processor=x8
|
||||||
<subant target="jar" failonerror="true">
|
<subant target="jar" failonerror="true">
|
||||||
<property name="file.reference.jna.build" location="${build}"/>
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
@ -28,7 +28,7 @@ diff -up ./build.xml.junit ./build.xml
|
|||||||
<fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
|
<fileset dir="${contrib}" includes="*/build.xml" excludes="platform/build.xml"/>
|
||||||
</subant>
|
</subant>
|
||||||
</target>
|
</target>
|
||||||
@@ -734,7 +734,7 @@ osname=macosx;processor=x86;processor=x8
|
@@ -800,7 +800,7 @@ osname=macosx;processor=x86;processor=x8
|
||||||
<mkdir dir="${build}/jws"/>
|
<mkdir dir="${build}/jws"/>
|
||||||
<copy todir="${build}/jws" file="${build}/${jar}"/>
|
<copy todir="${build}/jws" file="${build}/${jar}"/>
|
||||||
<copy todir="${build}/jws" file="${build}/${testjar}"/>
|
<copy todir="${build}/jws" file="${build}/${testjar}"/>
|
||||||
@ -37,8 +37,8 @@ diff -up ./build.xml.junit ./build.xml
|
|||||||
<copy todir="${build}/jws" file="lib/clover.jar"/>
|
<copy todir="${build}/jws" file="lib/clover.jar"/>
|
||||||
<jar jarfile="${build}/jws/jnidispatch.jar">
|
<jar jarfile="${build}/jws/jnidispatch.jar">
|
||||||
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
|
<fileset dir="${build.native}" includes="*jnidispatch.*"/>
|
||||||
@@ -845,7 +845,7 @@ osname=macosx;processor=x86;processor=x8
|
@@ -911,7 +911,7 @@ osname=macosx;processor=x86;processor=x8
|
||||||
<subant target="test" failonerror="true">
|
<subant target="test" failonerror="true" inheritall="true" inheritrefs="true">
|
||||||
<property name="file.reference.jna.build" location="${build}"/>
|
<property name="file.reference.jna.build" location="${build}"/>
|
||||||
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
<property name="file.reference.jna.jar" location="${build}/${jar}"/>
|
||||||
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
- <property name="libs.junit.classpath" location="lib/junit.jar"/>
|
@ -1,7 +1,7 @@
|
|||||||
diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
||||||
--- ./src/com/sun/jna/Native.java.loadlib 2013-04-29 15:23:30.988702267 +0200
|
--- ./src/com/sun/jna/Native.java.loadlib 2013-07-04 20:42:30.000000000 +0200
|
||||||
+++ ./src/com/sun/jna/Native.java 2013-04-29 15:25:55.409671266 +0200
|
+++ ./src/com/sun/jna/Native.java 2013-07-05 15:19:54.792284073 +0200
|
||||||
@@ -670,99 +670,22 @@ public final class Native {
|
@@ -642,8 +642,8 @@ public final class Native implements Ver
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Loads the JNA stub library.
|
* Loads the JNA stub library.
|
||||||
@ -10,8 +10,11 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
+ * MODIFIED FROM UPSTREAM - we rip out all sorts of gunk here that is
|
+ * MODIFIED FROM UPSTREAM - we rip out all sorts of gunk here that is
|
||||||
+ * unnecessary when JNA is properly installed with the OS.
|
+ * unnecessary when JNA is properly installed with the OS.
|
||||||
*/
|
*/
|
||||||
private static void loadNativeLibrary() {
|
private static void loadNativeDispatchLibrary() {
|
||||||
removeTemporaryFiles();
|
|
||||||
|
@@ -656,87 +656,12 @@ public final class Native implements Ver
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- String libName = System.getProperty("jna.boot.library.name", "jnidispatch");
|
- String libName = System.getProperty("jna.boot.library.name", "jnidispatch");
|
||||||
- String bootPath = System.getProperty("jna.boot.library.path");
|
- String bootPath = System.getProperty("jna.boot.library.path");
|
||||||
@ -20,12 +23,22 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- StringTokenizer dirs = new StringTokenizer(bootPath, File.pathSeparator);
|
- StringTokenizer dirs = new StringTokenizer(bootPath, File.pathSeparator);
|
||||||
- while (dirs.hasMoreTokens()) {
|
- while (dirs.hasMoreTokens()) {
|
||||||
- String dir = dirs.nextToken();
|
- String dir = dirs.nextToken();
|
||||||
- File file = new File(new File(dir), System.mapLibraryName(libName));
|
- File file = new File(new File(dir), System.mapLibraryName(libName).replace(".dylib", ".jnilib"));
|
||||||
- String path = file.getAbsolutePath();
|
- String path = file.getAbsolutePath();
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Looking in " + path);
|
||||||
|
- }
|
||||||
- if (file.exists()) {
|
- if (file.exists()) {
|
||||||
- try {
|
- try {
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Trying " + path);
|
||||||
|
- }
|
||||||
|
- System.setProperty("jnidispatch.path", path);
|
||||||
- System.load(path);
|
- System.load(path);
|
||||||
- nativeLibraryPath = path;
|
- jnidispatchPath = path;
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Found jnidispatch at " + path);
|
||||||
|
- }
|
||||||
- return;
|
- return;
|
||||||
- } catch (UnsatisfiedLinkError ex) {
|
- } catch (UnsatisfiedLinkError ex) {
|
||||||
- // Not a problem if already loaded in anoteher class loader
|
- // Not a problem if already loaded in anoteher class loader
|
||||||
@ -43,10 +56,20 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- ext = "dylib";
|
- ext = "dylib";
|
||||||
- }
|
- }
|
||||||
- path = path.substring(0, path.lastIndexOf(orig)) + ext;
|
- path = path.substring(0, path.lastIndexOf(orig)) + ext;
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Looking in " + path);
|
||||||
|
- }
|
||||||
- if (new File(path).exists()) {
|
- if (new File(path).exists()) {
|
||||||
- try {
|
- try {
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Trying " + path);
|
||||||
|
- }
|
||||||
|
- System.setProperty("jnidispatch.path", path);
|
||||||
- System.load(path);
|
- System.load(path);
|
||||||
- nativeLibraryPath = path;
|
- jnidispatchPath = path;
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Found jnidispatch at " + path);
|
||||||
|
- }
|
||||||
- return;
|
- return;
|
||||||
- } catch (UnsatisfiedLinkError ex) {
|
- } catch (UnsatisfiedLinkError ex) {
|
||||||
- System.err.println("File found at " + path + " but not loadable: " + ex.getMessage());
|
- System.err.println("File found at " + path + " but not loadable: " + ex.getMessage());
|
||||||
@ -55,54 +78,30 @@ diff -up ./src/com/sun/jna/Native.java.loadlib ./src/com/sun/jna/Native.java
|
|||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- if (Platform.isAndroid()) {
|
- if (!Boolean.getBoolean("jna.nosys")) {
|
||||||
- // Native libraries on android must be bundled with the APK
|
- try {
|
||||||
- System.setProperty("jna.nounpack", "true");
|
- if (DEBUG_JNA_LOAD) {
|
||||||
- }
|
- System.out.println("Trying (via loadLibrary) " + libName);
|
||||||
try {
|
- }
|
||||||
- if (!Boolean.getBoolean("jna.nosys")) {
|
|
||||||
- System.loadLibrary(libName);
|
- System.loadLibrary(libName);
|
||||||
|
- if (DEBUG_JNA_LOAD) {
|
||||||
|
- System.out.println("Found jnidispatch on system path");
|
||||||
|
- }
|
||||||
- return;
|
- return;
|
||||||
- }
|
- }
|
||||||
+ System.load("@JNIPATH@/" + System.mapLibraryName("jnidispatch"));
|
- catch(UnsatisfiedLinkError e) {
|
||||||
+ nativeLibraryPath = "@JNIPATH@/" + System.mapLibraryName("jnidispatch");
|
|
||||||
}
|
|
||||||
catch(UnsatisfiedLinkError e) {
|
|
||||||
- if (Boolean.getBoolean("jna.nounpack")) {
|
|
||||||
- throw e;
|
|
||||||
- }
|
- }
|
||||||
- }
|
- }
|
||||||
- if (!Boolean.getBoolean("jna.nounpack")) {
|
- if (!Boolean.getBoolean("jna.noclasspath")) {
|
||||||
- loadNativeLibraryFromJar();
|
- loadNativeDispatchLibraryFromClasspath();
|
||||||
- return;
|
+ try {
|
||||||
|
+ System.load("/usr/lib64/jna/" + System.mapLibraryName("jnidispatch"));
|
||||||
|
+ jnidispatchPath = "/usr/lib64/jna/" + System.mapLibraryName("jnidispatch");
|
||||||
|
}
|
||||||
|
- else {
|
||||||
|
- throw new UnsatisfiedLinkError("Unable to locate JNA native support library");
|
||||||
|
+ catch(UnsatisfiedLinkError e) {
|
||||||
+ throw new RuntimeException(e);
|
+ throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
- throw new UnsatisfiedLinkError("Native jnidispatch library not found");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static final String JNA_TMPLIB_PREFIX = "jna";
|
|
||||||
- /**
|
|
||||||
- * Attempts to load the native library resource from the filesystem,
|
|
||||||
- * extracting the JNA stub library from jna.jar if not already available.
|
|
||||||
- */
|
|
||||||
- private static void loadNativeLibraryFromJar() {
|
|
||||||
- try {
|
|
||||||
- String prefix = "com/sun/jna/" + getNativeLibraryResourcePrefix();
|
|
||||||
- File lib = extractFromResourcePath("jnidispatch", prefix, Native.class.getClassLoader());
|
|
||||||
- System.load(lib.getAbsolutePath());
|
|
||||||
- nativeLibraryPath = lib.getAbsolutePath();
|
|
||||||
- // Attempt to delete immediately once jnidispatch is successfully
|
|
||||||
- // loaded. This avoids the complexity of trying to do so on "exit",
|
|
||||||
- // which point can vary under different circumstances (native
|
|
||||||
- // compilation, dynamically loaded modules, normal application, etc).
|
|
||||||
- if (isUnpacked(lib)) {
|
|
||||||
- deleteLibrary(lib);
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
- catch(IOException e) {
|
|
||||||
- throw new UnsatisfiedLinkError(e.getMessage());
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
|
|
||||||
/** Identify temporary files unpacked from classpath jar files. */
|
|
||||||
static boolean isUnpacked(File file) {
|
|
@ -1,9 +1,9 @@
|
|||||||
diff -up ./build.xml.tests-headless ./build.xml
|
diff -up ./build.xml.tests-headless ./build.xml
|
||||||
--- ./build.xml.tests-headless 2012-03-07 11:56:41.702657823 +0100
|
--- ./build.xml.tests-headless 2013-07-04 20:42:30.000000000 +0200
|
||||||
+++ ./build.xml 2012-03-07 11:57:12.635887659 +0100
|
+++ ./build.xml 2013-07-05 15:06:19.354441386 +0200
|
||||||
@@ -561,6 +561,7 @@
|
@@ -885,6 +885,7 @@ osname=macosx;processor=x86;processor=x8
|
||||||
<sysproperty key="jna.protected" value="true"/>
|
|
||||||
<sysproperty key="jna.builddir" file="${build}"/>
|
<sysproperty key="jna.builddir" file="${build}"/>
|
||||||
|
<sysproperty key="jna.nativedir" file="${build.native}"/>
|
||||||
<jvmarg value="${vmopt.arch}"/>
|
<jvmarg value="${vmopt.arch}"/>
|
||||||
+ <jvmarg value="-Djava.awt.headless=true"/>
|
+ <jvmarg value="-Djava.awt.headless=true"/>
|
||||||
<classpath><path refid="test.runpath"/></classpath>
|
<classpath><path refid="test.runpath"/></classpath>
|
37
jna.spec
37
jna.spec
@ -1,6 +1,6 @@
|
|||||||
Name: jna
|
Name: jna
|
||||||
Version: 3.5.2
|
Version: 4.0
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Pure Java access to native libraries
|
Summary: Pure Java access to native libraries
|
||||||
|
|
||||||
Group: Development/Libraries
|
Group: Development/Libraries
|
||||||
@ -12,22 +12,23 @@ URL: https://jna.dev.java.net/
|
|||||||
# tar xzf twall-jna-%{version}*.tar.gz
|
# tar xzf twall-jna-%{version}*.tar.gz
|
||||||
# mv twall-jna-* jna-%{version}
|
# mv twall-jna-* jna-%{version}
|
||||||
# rm -rf jna-%{version}/{dist/*,www}
|
# rm -rf jna-%{version}/{dist/*,www}
|
||||||
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.bz2 jna-%{version}
|
# tar cjf ~/rpm/SOURCES/jna-%{version}.tar.gz jna-%{version}
|
||||||
Source0: %{name}-%{version}.tar.bz2
|
Source0: https://github.com/twall/jna/archive/%{name}-%{version}.tar.gz
|
||||||
Source1: package-list
|
Source1: package-list
|
||||||
Patch0: jna-3.5.0-build.patch
|
Patch0: jna-3.5.0-build.patch
|
||||||
# This patch is Fedora-specific for now until we get the huge
|
# This patch is Fedora-specific for now until we get the huge
|
||||||
# JNI library location mess sorted upstream
|
# JNI library location mess sorted upstream
|
||||||
Patch1: jna-3.5.2-loadlibrary.patch
|
Patch1: jna-4.0-loadlibrary.patch
|
||||||
# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
|
# The X11 tests currently segfault; overall I think the X11 JNA stuff is just a
|
||||||
# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
|
# Really Bad Idea, for relying on AWT internals, using the X11 API at all,
|
||||||
# and using a complex API like X11 through JNA just increases the potential
|
# and using a complex API like X11 through JNA just increases the potential
|
||||||
# for problems.
|
# for problems.
|
||||||
Patch2: jna-3.4.0-tests-headless.patch
|
Patch2: jna-4.0-tests-headless.patch
|
||||||
# Build using GCJ javadoc
|
# Build using GCJ javadoc
|
||||||
Patch3: jna-3.5.2-gcj-javadoc.patch
|
Patch3: jna-3.5.2-gcj-javadoc.patch
|
||||||
# junit cames from rpm
|
# junit cames from rpm
|
||||||
Patch4: jna-3.5.2-junit.patch
|
Patch4: jna-4.0-junit.patch
|
||||||
|
Patch5: jna-4.0-charfix.patch
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
# We manually require libffi because find-requires doesn't work
|
# We manually require libffi because find-requires doesn't work
|
||||||
@ -86,16 +87,13 @@ This package contains the contributed examples for %{name}.
|
|||||||
%setup -q -n %{name}-%{version}
|
%setup -q -n %{name}-%{version}
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
%patch0 -p1 -b .build
|
%patch0 -p1 -b .build
|
||||||
sed -e 's|@JNIPATH@|%{_libdir}/%{name}|' %{PATCH1} | patch -p1
|
%patch1 -p1 -b .loadlib
|
||||||
|
sed -i 's|@JNIPATH@|%{_libdir}/%{name}|' src/com/sun/jna/Native.java
|
||||||
%patch2 -p1 -b .tests-headless
|
%patch2 -p1 -b .tests-headless
|
||||||
chmod -Rf a+rX,u+w,g-w,o-w .
|
chmod -Rf a+rX,u+w,g-w,o-w .
|
||||||
%patch3 -p0 -b .gcj-javadoc
|
%patch3 -p0 -b .gcj-javadoc
|
||||||
%patch4 -p1 -b .junit
|
%patch4 -p1 -b .junit
|
||||||
|
%patch5 -p1 -b .charfix
|
||||||
# UnloadTest fail during build since we modify class loading
|
|
||||||
rm test/com/sun/jna/JNAUnloadTest.java
|
|
||||||
# current bug: https://jna.dev.java.net/issues/show_bug.cgi?id=155
|
|
||||||
#rm test/com/sun/jna/DirectTest.java
|
|
||||||
|
|
||||||
# all java binaries must be removed from the sources
|
# all java binaries must be removed from the sources
|
||||||
#find . -name '*.jar' -delete
|
#find . -name '*.jar' -delete
|
||||||
@ -114,8 +112,8 @@ chmod -c 0644 LICENSE OTHERS CHANGES.md
|
|||||||
%build
|
%build
|
||||||
# We pass -Ddynlink.native which comes from our patch because
|
# We pass -Ddynlink.native which comes from our patch because
|
||||||
# upstream doesn't want to default to dynamic linking.
|
# upstream doesn't want to default to dynamic linking.
|
||||||
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true compile native javadoc jar contrib-jars
|
ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true native compile javadoc jar contrib-jars
|
||||||
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true -Dnomixedjar.native=true clean dist
|
#ant -Dcflags_extra.native="%{optflags}" -Ddynlink.native=true clean dist
|
||||||
# remove compiled contribs
|
# remove compiled contribs
|
||||||
find contrib -name build -exec rm -rf {} \; || :
|
find contrib -name build -exec rm -rf {} \; || :
|
||||||
|
|
||||||
@ -123,19 +121,19 @@ find contrib -name build -exec rm -rf {} \; || :
|
|||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
# jars
|
# jars
|
||||||
install -D -m 644 build*/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
install -D -m 644 build/%{name}-min.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||||
install -d -m 755 %{buildroot}%{_javadir}/%{name}
|
install -d -m 755 %{buildroot}%{_javadir}/%{name}
|
||||||
find contrib -name '*.jar' -exec cp {} %{buildroot}%{_javadir}/%{name}/ \;
|
find contrib -name '*.jar' -exec cp {} %{buildroot}%{_javadir}/%{name}/ \;
|
||||||
# NOTE: JNA has highly custom code to look for native jars in this
|
# NOTE: JNA has highly custom code to look for native jars in this
|
||||||
# directory. Since this roughly matches the jpackage guidelines,
|
# directory. Since this roughly matches the jpackage guidelines,
|
||||||
# we'll leave it unchanged.
|
# we'll leave it unchanged.
|
||||||
install -d -m 755 %{buildroot}%{_libdir}/%{name}
|
install -d -m 755 %{buildroot}%{_libdir}/%{name}
|
||||||
install -m 755 build*/native/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
|
install -m 755 build/native*/libjnidispatch*.so %{buildroot}%{_libdir}/%{name}/
|
||||||
|
|
||||||
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
%if 0%{?fedora} >= 9 || 0%{?rhel} > 5
|
||||||
# install maven pom file
|
# install maven pom file
|
||||||
install -Dm 644 pom-%{name}.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
install -Dm 644 pom-%{name}.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||||
install -Dm 644 pom-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-platform.pom
|
install -Dm 644 pom-%{name}-platform.xml %{buildroot}%{_mavenpomdir}/JPP.%{name}-platform.pom
|
||||||
|
|
||||||
# ... and maven depmap
|
# ... and maven depmap
|
||||||
%if 0%{?fedora} >= 9
|
%if 0%{?fedora} >= 9
|
||||||
@ -208,6 +206,9 @@ rm -rf %{buildroot}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jul 6 2013 Levente Farkas <lfarkas@lfarkas.org> - 4.0-1
|
||||||
|
- Update to 4.0
|
||||||
|
|
||||||
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.2-2
|
* Fri Jun 28 2013 Mikolaj Izdebski <mizdebsk@redhat.com> - 3.5.2-2
|
||||||
- Fix ant-trax and ant-nodeps BR on RHEL
|
- Fix ant-trax and ant-nodeps BR on RHEL
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user