changeset 159:a9057b218aa0

2008-10-03 Ioana Ivan <iivan@redhat.com> * src/java/org/classpath/icedtea/pulseaudio/EventLoop.java: replaced call to System.load with call to System.loadLibrary * src/java/org/classpath/icedtea/pulseaudio/Operation.java: Likewise * src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java: Likewise * src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java: Likewise * src/java/org/classpath/icedtea/pulseaudio/Stream.java Likewise * Makefile.am: removed * build.xml: removed * src/native/Makefile.am: removed
author Ioana Ivan <iivan@redhat.com>
date Fri, 03 Oct 2008 16:20:27 -0400
parents a6a5ca46e90e
children eb2d35a91b0d
files Makefile.am build.xml src/java/org/classpath/icedtea/pulseaudio/EventLoop.java src/java/org/classpath/icedtea/pulseaudio/Operation.java src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java src/java/org/classpath/icedtea/pulseaudio/Stream.java src/native/Makefile.am
diffstat 8 files changed, 5 insertions(+), 178 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Tue Sep 30 14:43:55 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-SUBDIRS = src/native
-
-clean-local:
-	ant clean ; \
-	rm -f libpulse-java.so ; 
-
--- a/build.xml	Tue Sep 30 14:43:55 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +0,0 @@
-<project default="all">
-
-	<property name="classdir" value="classes" />
-	<property name="sourcedir" value="src/java" />
-	<property name="headerdir" value="src/native" />
-	<property name="pulsejar" value="pulseaudio-java.jar" />
-
-	<target name="all" depends="compile,headers,jar">
-
-	</target>
-
-	<target name="clean">
-		<delete dir="${classdir}" />
-		<delete dir="${testclassdir}" />
-		<delete file="${pulsejar}" />
-		<!-- Only delete the generated header files -->
-		<delete>
-			<fileset dir="${headerdir}" includes="org_*.h" />
-		</delete>
-	</target>
-
-	<target name="init">
-		<mkdir dir="${classdir}" />
-		<mkdir dir="${testclassdir}" />
-	</target>
-
-	<target name="compile" depends="init">
-		<javac srcdir="${sourcedir}" destdir="${classdir}" />
-		<copy todir="${classdir}/META-INF">
-			<fileset dir="${sourcedir}/META-INF" />
-		</copy>
-
-	</target>
-
-	<target name="jar" depends="compile">
-		<jar destfile="${pulsejar}" basedir="${classdir}">
-		</jar>
-	</target>
-
-	<target name="headers" depends="compile">
-		<javah classpath="${classdir}" destdir="${headerdir}" verbose="no" force="yes">
-			<class name="org.classpath.icedtea.pulseaudio.EventLoop" />
-			<class name="org.classpath.icedtea.pulseaudio.Operation" />
-			<class name="org.classpath.icedtea.pulseaudio.Stream" />
-			<class name="org.classpath.icedtea.pulseaudio.PulseAudioSourcePort" />
-			<class name="org.classpath.icedtea.pulseaudio.PulseAudioTargetPort" />
-		</javah>
-	</target>
-
-	<!-- TESTS -->
-	<property name="testclassdir" value="testclasses" />
-	<property name="testsourcedir" value="unittests" />
-
-	<property name="junitjar" value="/usr/share/java/junit4.jar" />
-
-	<target name="compile-tests" depends="init">
-		<javac srcdir="${testsourcedir}" destdir="${testclassdir}" classpath="${junitjar}:${pulsejar}" />
-	</target>
-
-	<target name="jar-tests" depends="compile-tests">
-		<jar destfile="PulseAudio-Tests.jar" basedir="${testclassdir}" />
-	</target>
-
-	<target name="test" depends="compile-tests,jar">
-		<junit printsummary="yes" haltonfailure="no" showoutput="yes" fork="yes">
-			<classpath>
-				<pathelement location="${pulsejar}" />
-				<pathelement path="${junitjar}:${testclassdir}" />
-			</classpath>
-			<formatter type="plain" />
-
-			<test name="org.classpath.icedtea.pulseaudio.OtherSoundProvidersAvailableTest" />
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioMixerProviderTest" />
-
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioMixerTest" />
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioMixerRawTest" />
-
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioEventLoopOverhead" />
-
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLineTest" />
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLineRawTest" />
-
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioSourcePortTest" />
-
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioTargetDataLineTest" />
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioTargetPortTest" />
-
-			<test name="org.classpath.icedtea.pulseaudio.PulseAudioClipTest" />
-
-		</junit>
-	</target>
-</project>
-
--- a/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java	Tue Sep 30 14:43:55 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/EventLoop.java	Fri Oct 03 16:20:27 2008 -0400
@@ -106,16 +106,7 @@
 	 */
 
 	static {
-		try {
-			String library = new java.io.File(".").getCanonicalPath()
-					+ java.io.File.separatorChar
-					+ System.mapLibraryName("pulse-java");
-			// System.out.println(EventLoop.class.getCanonicalName() + ": "
-			//					+ library);
-			System.load(library);
-		} catch (IOException e) {
-			assert ("Loading failed".endsWith("library"));
-		}
+			System.loadLibrary("pulse-java");
 	}
 
 	private EventLoop() {
--- a/src/java/org/classpath/icedtea/pulseaudio/Operation.java	Tue Sep 30 14:43:55 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/Operation.java	Fri Oct 03 16:20:27 2008 -0400
@@ -59,16 +59,7 @@
 	}
 
 	static {
-		try {
-			String library = new java.io.File(".").getCanonicalPath()
-					+ java.io.File.separatorChar
-					+ System.mapLibraryName("pulse-java");
-			// System.out.println(Operation.class.getCanonicalName() + ": "
-			// + library);
-			System.load(library);
-		} catch (IOException e) {
-			assert ("Loading failed".endsWith("library"));
-		}
+		System.loadLibrary("pulse-java");
 	}
 
 	private native void native_ref();
--- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java	Tue Sep 30 14:43:55 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourcePort.java	Fri Oct 03 16:20:27 2008 -0400
@@ -44,16 +44,7 @@
 public class PulseAudioSourcePort extends PulseAudioPort {
 
 	static {
-		try {
-			String library = new java.io.File(".").getCanonicalPath()
-					+ java.io.File.separatorChar
-					+ System.mapLibraryName("pulse-java");
-			// System.out.println(PulseAudioVolumeControl.class.getCanonicalName()
-			// + ": " + library);
-			System.load(library);
-		} catch (IOException e) {
-			assert ("Loading failed".endsWith("library"));
-		}
+		System.loadLibrary("pulse-java");
 	}
 
 	public PulseAudioSourcePort(String name, EventLoop eventLoop) {
--- a/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java	Tue Sep 30 14:43:55 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/PulseAudioTargetPort.java	Fri Oct 03 16:20:27 2008 -0400
@@ -44,16 +44,7 @@
 public class PulseAudioTargetPort extends PulseAudioPort {
 
 	static {
-		try {
-			String library = new java.io.File(".").getCanonicalPath()
-					+ java.io.File.separatorChar
-					+ System.mapLibraryName("pulse-java");
-			// System.out.println(PulseAudioVolumeControl.class.getCanonicalName()
-			// + ": " + library);
-			System.load(library);
-		} catch (IOException e) {
-			assert ("Loading failed".endsWith("library"));
-		}
+		System.loadLibrary("pulse-java");
 	}
 
 	public PulseAudioTargetPort(String name, EventLoop eventLoop) {
--- a/src/java/org/classpath/icedtea/pulseaudio/Stream.java	Tue Sep 30 14:43:55 2008 -0400
+++ b/src/java/org/classpath/icedtea/pulseaudio/Stream.java	Fri Oct 03 16:20:27 2008 -0400
@@ -105,16 +105,7 @@
 	private byte[] streamPointer;
 
 	static {
-		try {
-			String library = new java.io.File(".").getCanonicalPath()
-					+ java.io.File.separatorChar
-					+ System.mapLibraryName("pulse-java");
-			// System.out
-			// .println(Stream.class.getCanonicalName() + ": " + library);
-			System.load(library);
-		} catch (IOException e) {
-			assert ("Loading failed".endsWith("library"));
-		}
+		System.loadLibrary("pulse-java");
 	}
 
 	private Format format;
--- a/src/native/Makefile.am	Tue Sep 30 14:43:55 2008 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +0,0 @@
-lib_LTLIBRARIES = libpulse-java.la
-
-libpulse_java_la_SOURCES = \
-	jni-common.c \
-	jni-common.h \
-	org_classpath_icedtea_pulseaudio_EventLoop.c \
-	org_classpath_icedtea_pulseaudio_EventLoop.h \
-	org_classpath_icedtea_pulseaudio_Operation.h \
-	org_classpath_icedtea_pulseaudio_Operation.c \
-	org_classpath_icedtea_pulseaudio_Stream.c \
-	org_classpath_icedtea_pulseaudio_Stream.h \
-	org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.h \
-	org_classpath_icedtea_pulseaudio_PulseAudioSourcePort.c \
-	org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.c \
-    org_classpath_icedtea_pulseaudio_PulseAudioTargetPort.h 
-
-
- 
-
-AM_CFLAGS = -g -Wall -Werror $(PLATFORM_FLAGS) $(LIBPULSE_CFLAGS)
-AM_LDFLAGS = -g -Wall -Werror $(LIBPULSE_LIBS)
-
-PLATFORM_FLAGS = -DWITH_32BIT_PLATFORM
-
-topdir = ../..
-
-all-local: $(lib_LTLIBRARIES)
-	cp .libs/libpulse-java.so $(topdir)
-