From 5c666370cfbcede280c17898d184274c19e96effdfde0cc5a2f02f42dbde9322 Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Thu, 18 Sep 2008 02:40:15 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/matthewlib-java?expand=0&rev=1 --- .gitattributes | 23 +++++ .gitignore | 1 + classpath_fix.patch | 38 ++++++++ early_upstream.patch | 76 ++++++++++++++++ install_doc.patch | 19 ++++ libmatthew-java_0.7.1.orig.tar.gz | 3 + matthewlib-java.changes | 12 +++ matthewlib-java.spec | 141 ++++++++++++++++++++++++++++++ openjdk.patch | 13 +++ ready | 0 10 files changed, 326 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 classpath_fix.patch create mode 100644 early_upstream.patch create mode 100644 install_doc.patch create mode 100644 libmatthew-java_0.7.1.orig.tar.gz create mode 100644 matthewlib-java.changes create mode 100644 matthewlib-java.spec create mode 100644 openjdk.patch create mode 100644 ready diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/classpath_fix.patch b/classpath_fix.patch new file mode 100644 index 0000000..aaec9a4 --- /dev/null +++ b/classpath_fix.patch @@ -0,0 +1,38 @@ +diff --git a/Makefile b/Makefile +index 5ba907f..9183316 100644 +--- a/Makefile ++++ b/Makefile +@@ -57,11 +57,12 @@ cgi-$(CGIVER).jar: .classes + io-$(IOVER).jar: .classes + (cd classes; $(JAR) cf ../$@ cx/ath/matthew/io/*class) + unix-$(UNIXVER).jar: .classes +-ifeq ($(DEBUG),enable) +- echo "Class-Path: $(JARDIR)/debug-$(DEBUG).jar" > Manifest +-else +- echo "Class-Path: " > Manifest +-endif ++#ifeq ($(DEBUG),enable) ++# echo "Class-Path: $(JARDIR)/debug-$(DEBUG).jar" > Manifest ++#else ++# echo "Class-Path: " > Manifest ++#endif ++ echo > Manifest + (cd classes; $(JAR) cfm ../$@ ../Manifest cx/ath/matthew/unix/*class) + + hexdump-$(HEXVER).jar: .classes +@@ -86,11 +87,13 @@ libmatthew-java-$(MATTVER).tar.gz: Makefile cx cgi-java.c unix-java.c README INS + + debug-enable-$(DEBUGVER).jar: cx/ath/matthew/debug/Debug.jpp + make .enabledebug +- echo "Class-Path: $(JARDIR)/hexdump.jar" > Manifest ++ #echo "Class-Path: $(JARDIR)/hexdump.jar" > Manifest ++ echo > Manifest + (cd classes;jar cfm ../$@ ../Manifest cx/ath/matthew/debug/*.class) + debug-disable-$(DEBUGVER).jar: cx/ath/matthew/debug/Debug.jpp + make .disabledebug +- echo "Class-Path: $(JARDIR)/hexdump.jar" > Manifest ++ #echo "Class-Path: $(JARDIR)/hexdump.jar" > Manifest ++ echo > Manifest + (cd classes;jar cfm ../$@ ../Manifest cx/ath/matthew/debug/*.class) + .enabledebug: cx/ath/matthew/debug/Debug.jpp + mkdir -p classes diff --git a/early_upstream.patch b/early_upstream.patch new file mode 100644 index 0000000..0435840 --- /dev/null +++ b/early_upstream.patch @@ -0,0 +1,76 @@ +diff --git a/unix-java.c b/unix-java.c +index 25f6282..15fffbf 100644 +--- a/unix-java.c ++++ b/unix-java.c +@@ -18,6 +18,10 @@ + * + */ + ++ ++/* _GNU_SOURCE is required to use struct ucred in glibc 2.8 */ ++#define _GNU_SOURCE ++ + #include "unix-java.h" + #include + #include +@@ -381,9 +385,9 @@ JNIEXPORT void JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1send_1creds + cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred)); + /* Initialize the payload: */ + creds = (struct ucred *)CMSG_DATA(cmsg); +- creds.pid = getpid(); +- creds.uid = getuid(); +- creds.gid = getgid(); ++ creds->pid = getpid(); ++ creds->uid = getuid(); ++ creds->gid = getgid(); + #endif + + int rv = sendmsg(sock, &msg, 0); +@@ -399,7 +403,7 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds + (JNIEnv *env, jobject o, jint sock, jintArray jcreds) + { + struct msghdr msg; +- char buf = 0; ++ char iov_buf = 0; + struct iovec iov; + msg.msg_name = NULL; + msg.msg_namelen = 0; +@@ -408,7 +412,7 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds + msg.msg_iovlen = 1; + msg.msg_control = NULL; + msg.msg_controllen = 0; +- iov.iov_base = &buf; ++ iov.iov_base = &iov_buf; + iov.iov_len = 1; + + #ifdef SCM_CREDENTIALS +@@ -422,9 +426,9 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds + recvmsg(sock, &msg, 0); + + #ifdef SCM_CREDENTIALS +- for (cmsg = CMSG_FIRSTHDR(&msgh); ++ for (cmsg = CMSG_FIRSTHDR(&msg); + cmsg != NULL; +- cmsg = CMSG_NXTHDR(&msgh,cmsg)) { ++ cmsg = CMSG_NXTHDR(&msg,cmsg)) { + if (cmsg->cmsg_level == SOL_SOCKET + && cmsg->cmsg_type == SCM_CREDENTIALS) { + creds = (struct ucred *) CMSG_DATA(cmsg); +@@ -432,11 +436,15 @@ JNIEXPORT jbyte JNICALL Java_cx_ath_matthew_unix_UnixSocket_native_1recv_1creds + } + } + if (NULL != creds) { +- (*env)->SetIntArrayRegion(env, jcreds, 0, 3, creds); ++ jint cred_array[3]; ++ cred_array[0] = creds->pid; ++ cred_array[1] = creds->uid; ++ cred_array[2] = creds->gid; ++ (*env)->SetIntArrayRegion(env, jcreds, 0, 3, &cred_array[0]); + } + #endif + +- return buf; ++ return iov_buf; + } + + diff --git a/install_doc.patch b/install_doc.patch new file mode 100644 index 0000000..b860aab --- /dev/null +++ b/install_doc.patch @@ -0,0 +1,19 @@ +diff --git a/Makefile b/Makefile +index 7607a79..4f6e728 100644 +--- a/Makefile ++++ b/Makefile +@@ -39,7 +39,7 @@ DEBUG?=disable + + .NOPARALLEL: + +-all: unix-$(UNIXVER).jar cgi-$(CGIVER).jar debug-enable-$(DEBUGVER).jar debug-disable-$(DEBUGVER).jar io-$(IOVER).jar hexdump-$(HEXVER).jar libcgi-java.so libunix-java.so ++all: unix-$(UNIXVER).jar cgi-$(CGIVER).jar debug-enable-$(DEBUGVER).jar debug-disable-$(DEBUGVER).jar io-$(IOVER).jar hexdump-$(HEXVER).jar libcgi-java.so libunix-java.so doc + + classes: .classes + .classes: $(SRC) +@@ -134,4 +134,4 @@ install-jar: unix-$(UNIXVER).jar cgi-$(CGIVER).jar debug-enable-$(DEBUGVER).jar + ln -sf cgi-$(CGIVER).jar $(DESTDIR)$(JARDIR)/cgi.jar + ln -sf hexdump-$(HEXVER).jar $(DESTDIR)$(JARDIR)/hexdump.jar + +-install: install-native install-jar ++install: install-native install-jar install-doc diff --git a/libmatthew-java_0.7.1.orig.tar.gz b/libmatthew-java_0.7.1.orig.tar.gz new file mode 100644 index 0000000..9b0b90e --- /dev/null +++ b/libmatthew-java_0.7.1.orig.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8cdf35b54683a893f739130972f55aded2ed13fc14db0da516fe7a3cbb6318c +size 38375 diff --git a/matthewlib-java.changes b/matthewlib-java.changes new file mode 100644 index 0000000..d890088 --- /dev/null +++ b/matthewlib-java.changes @@ -0,0 +1,12 @@ +------------------------------------------------------------------- +Thu Sep 4 12:07:58 CEST 2008 - mvyskocil@suse.cz + +- Removal of a jpackage_compliance patch, which seems to be uncecessary +- Removal of makefile patch, all of necessary changes could be done via make + variables + +------------------------------------------------------------------- +Wed Sep 3 12:03:10 CEST 2008 - mvyskocil@suse.cz + +- Initial packaging for SUSE (0.7.1) + diff --git a/matthewlib-java.spec b/matthewlib-java.spec new file mode 100644 index 0000000..98c627e --- /dev/null +++ b/matthewlib-java.spec @@ -0,0 +1,141 @@ +# +# spec file for package matthewlib-java (Version 0.7.1) +# +# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define orig_name libmatthew-java + +Name: matthewlib-java +Version: 0.7.1 +Release: 3 +Summary: A few useful Java libraries +Group: Development/Libraries/Java +License: GPL v2 only +# actual upstream: +#URL: http://matthew.ath.cx/projects/java/ +#Source0: http://matthew.ath.cx/projects/java/%{name}-%{version}.tar.gz +# upstream author is also the debian maintainer for this package. +# he gets newer releases into debian before he puts them up on +# the upstream website. so we use the "original" source from debian +# (ie, the source before debian patches are applied to it) +Url: http://packages.debian.org/source/sid/libmatthew-java +Source0: http://ftp.de.debian.org/debian/pool/main/libm/%{orig_name}/%{orig_name}_%{version}.orig.tar.gz +Patch0: early_upstream.patch +Patch1: install_doc.patch +Patch3: classpath_fix.patch +Patch4: openjdk.patch +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: java-devel +BuildRequires: jpackage-utils +BuildRequires: fdupes +Requires: jre >= 1.5.0 +Requires: jpackage-utils +Provides: %{orig_name} + +%description +A collection of Java libraries: - Unix Sockets Library This is a + collection of classes and native code to allow you to read and + write Unix sockets in Java. + +- Debug Library This is a comprehensive logging and debugging + solution. + +- CGI Library This is a collection of classes and native code to + allow you to write CGI applications in Java. + +- I/O Library This provides a few much needed extensions to the Java + I/O subsystem. + +- Hexdump This class formats byte-arrays in hex and ascii for display. + + + +Authors: +-------- + Matthew Johnson + +%package javadoc +License: GPL v2 only +Summary: A few useful Java libraries +Group: Development/Libraries/Java + +%description javadoc +A collection of Java libraries: - Unix Sockets Library This is a + collection of classes and native code to allow you to read and + write Unix sockets in Java. + +- Debug Library This is a comprehensive logging and debugging + solution. + +- CGI Library This is a collection of classes and native code to + allow you to write CGI applications in Java. + +- I/O Library This provides a few much needed extensions to the Java + I/O subsystem. + +- Hexdump This class formats byte-arrays in hex and ascii for display. + + + +Authors: +-------- + Matthew Johnson + +%prep +%setup -q -n %{orig_name}-%{version} +%patch0 -p1 +%patch1 -p1 +%patch3 -p1 +%patch4 -p1 + +%build +make \ + CFLAGS='%{optflags} -fpic -std=c99' \ + LIBDIR='%{_libdir}' \ + JCFLAGS='-target 1.5' + +%install +make install \ + DESTDIR=$RPM_BUILD_ROOT \ + JARDIR=%{_javadir} \ + LIBDIR=%{_libdir}/ \ + DOCDIR=%{_javadocdir}/%{name}-%{version} +%fdupes -s $RPM_BUILD_ROOT/ + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%{_javadir}/*jar +%{_libdir}/lib*.so* +%doc COPYING INSTALL README + +%files javadoc +%defattr(-,root,root,-) +%{_javadocdir}/%{name}-%{version} + +%changelog +* Thu Sep 04 2008 mvyskocil@suse.cz +- Removal of a jpackage_compliance patch, which seems to be uncecessary +- Removal of makefile patch, all of necessary changes could be done via make + variables +* Wed Sep 03 2008 mvyskocil@suse.cz +- Initial packaging for SUSE (0.7.1) diff --git a/openjdk.patch b/openjdk.patch new file mode 100644 index 0000000..96502ad --- /dev/null +++ b/openjdk.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile b/Makefile +index 5ba907f..54019bc 100644 +--- a/Makefile ++++ b/Makefile +@@ -8,7 +8,7 @@ LD?=ld + PPFLAGS+=-C -P + CFLAGS+=-fpic -Wall -Os -pedantic -std=c99 -Werror + GCJFLAGS+=-fjni +-JCFLAGS+=-source 5.0 ++#JCFLAGS+=-source 5.0 + INCLUDES+=-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux + JAVADOCFLAGS?=-quiet -author -link http://java.sun.com/j2se/1.4.2/docs/api/ + diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4