diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-07-14 21:03:06 +0100 |
commit | 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch) | |
tree | 7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /dev-java/cdegroot-db | |
parent | 30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff) |
gentoo resync : 14.07.2018
Diffstat (limited to 'dev-java/cdegroot-db')
-rw-r--r-- | dev-java/cdegroot-db/Manifest | 5 | ||||
-rw-r--r-- | dev-java/cdegroot-db/cdegroot-db-0.08-r2.ebuild | 38 | ||||
-rw-r--r-- | dev-java/cdegroot-db/files/build.xml | 59 | ||||
-rw-r--r-- | dev-java/cdegroot-db/files/cdegroot-db-0.08-gentoo.patch | 205 | ||||
-rw-r--r-- | dev-java/cdegroot-db/metadata.xml | 8 |
5 files changed, 315 insertions, 0 deletions
diff --git a/dev-java/cdegroot-db/Manifest b/dev-java/cdegroot-db/Manifest new file mode 100644 index 000000000000..6a39c5f94420 --- /dev/null +++ b/dev-java/cdegroot-db/Manifest @@ -0,0 +1,5 @@ +AUX build.xml 1612 BLAKE2B 2480ba7774db6f2e20b70b3cfd2ffd3a690c86a7d1d12c521faabe942900e4770a6fddae86de4193299b7f738cb71634bde0cc15e356c5b186892b8b8d6fdae0 SHA512 b7d08ecfbecd1615d9a73ba1ab95b10d07ebddda0d4d273dadba770b662957006d84f8057d86f59dd1506cab0fa9f0fc79df7577b7ba1620fbf0d2d6d446de32 +AUX cdegroot-db-0.08-gentoo.patch 7914 BLAKE2B 6139fd7ffcf65bc04ebe03f35919ba28debf86b732dcbfcc8b37192c424ae7cc1f8863556f111c23bd1327cba94e1ffd7d79787ff850b0b99a4933badf9d8ca8 SHA512 f24f13acb265f75408e6cae2a432cbcebbcad912f77ce2883159dc93743ad85c636e5656f21478914712fe393c84a6fe11600c9394b81ce128403c8f59e521cf +DIST com.cdegroot.db-0.08.tar.gz 154705 BLAKE2B a267d402d1741f701e0fc1a99fa765c0f86a9b13ccca20f4a592661472a31e85a4da49d6fb8be07ef1800cbd0fbb123366def29e30667448484ba419a0938684 SHA512 c8a6a6a46add440499dce42f27876cadfb9d247f4e7f8852e94cc20ca9afacb400f91f884760bf3659bad46979ddd5a65f6dda4bd5416da14d89a93ff5b447d1 +EBUILD cdegroot-db-0.08-r2.ebuild 853 BLAKE2B 9d2a183d4b75eed0599f16ba2a312a83710ef0ec50384b5a9c33f251ac950ca4b2a15787e8bae4736d42336eacb63fb5ff70054d73a77a5b2afab5a1e28c7915 SHA512 84a8476d33ac372b2b921e932373fb4cddf7532b5ade3b486a8cc94385ff8d4862f37562a2c9240d362442e08b0948ce165cbfe84b388be5a33bc4b76bd33421 +MISC metadata.xml 232 BLAKE2B 513679b02247d8e4cb4c874abd785119d9ca62ad24c44969d52a42c3765d0ebf689024512a2c4c48e69688a4ce02a74ae05708b050a720bc73d8d2bf2ceff58d SHA512 00beaf2c81112ff757c4395f4ea47e85f2d48e369e241f10ddf200090dd6513d52ae2b1aef6d28b7417f1cf34608a7258a167eb307d5670323a2190f3710f893 diff --git a/dev-java/cdegroot-db/cdegroot-db-0.08-r2.ebuild b/dev-java/cdegroot-db/cdegroot-db-0.08-r2.ebuild new file mode 100644 index 000000000000..4149fbc8454c --- /dev/null +++ b/dev-java/cdegroot-db/cdegroot-db-0.08-r2.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +JAVA_PKG_IUSE="doc source" + +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="OO database written in Java" +HOMEPAGE="http://www.cdegroot.com/software/db/" +SRC_URI="http://www.cdegroot.com/software/db/download/com.${P/-/.}.tar.gz" + +LICENSE="MIT" +SLOT="1" +KEYWORDS="amd64 ppc64 x86" +IUSE="doc source" + +DEPEND=">=virtual/jdk-1.4" +RDEPEND=">=virtual/jre-1.4" + +S="${WORKDIR}/com.${P/-/.}" + +PATCHES=( "${FILESDIR}/${P}-gentoo.patch" ) +src_prepare() { + default + rm -rv src/db/test lib/*.jar || die + cp -v "${FILESDIR}/build.xml" "${S}/build.xml" || die +} + +EANT_DOC_TARGET="docs" + +src_install() { + java-pkg_dojar "dist/${PN}.jar" + dodoc TODO VERSION CHANGES BUGS README + use doc && java-pkg_dojavadoc docs + use source && java-pkg_dosrc src/* +} diff --git a/dev-java/cdegroot-db/files/build.xml b/dev-java/cdegroot-db/files/build.xml new file mode 100644 index 000000000000..282ebdfc70e5 --- /dev/null +++ b/dev-java/cdegroot-db/files/build.xml @@ -0,0 +1,59 @@ +<?xml version="1.0"?> + +<project name="cdegroot-db" default="jar"> + <!-- some properties --> + <property name="src.dir" value="src/db" /> + <property name="build.dir" value="build" /> + <property name="docs.dir" value="docs" /> + <property name="dist.dir" value="dist" /> + <property name="lib.dir" value="lib" /> + <property name="jarfile" value="${dist.dir}/${ant.project.name}.jar" /> + <property name="target.jdk" value="1.3" /> + + <!-- init --> + <target name="init"> + <mkdir dir="${dist.dir}" /> + <mkdir dir="${build.dir}" /> + <mkdir dir="${docs.dir}" /> + </target> + + <!-- compile everything --> + <target name="compile" depends="init"> + <mkdir dir="${build.dir}" /> + <javac srcdir="${src.dir}" + destdir="${build.dir}" + source="${target.jdk}" + target="${target.jdk}"/> + </target> + + <!-- build the jar file --> + <target name="jar" depends="compile"> + <jar jarfile="${jarfile}" basedir="${build.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs" depends="init"> + <javadoc sourcepath="${src.dir}" + packagenames="com.*" + destdir="${docs.dir}" + author="true" + version="true" + use="true" + windowtitle="${ant.project.name} API" /> + </target> + + <!-- clean up --> + <target name="clean"> + <delete dir="${build.dir}" /> + <delete dir="${docs.dir}" /> + <delete dir="${dist.dir}" /> + </target> + + <!-- zip the sources --> + <target name="sourcezip"> + <zip destfile="${dist.dir}/${ant.project.name}-src.zip"> + <zipfileset dir="${src.dir}" /> + </zip> + </target> + +</project> diff --git a/dev-java/cdegroot-db/files/cdegroot-db-0.08-gentoo.patch b/dev-java/cdegroot-db/files/cdegroot-db-0.08-gentoo.patch new file mode 100644 index 000000000000..f99584fdff1d --- /dev/null +++ b/dev-java/cdegroot-db/files/cdegroot-db-0.08-gentoo.patch @@ -0,0 +1,205 @@ +diff -urpN src.orig/db/com/cdegroot/db/hash/EntryPage.java src/db/com/cdegroot/db/hash/EntryPage.java +--- a/src/db/com/cdegroot/db/hash/EntryPage.java 2005-02-06 00:40:17.191151504 +0100 ++++ b/src/db/com/cdegroot/db/hash/EntryPage.java 2005-02-06 00:54:14.045930240 +0100 +@@ -25,7 +25,7 @@ final class EntryPage extends PageHeader + /** + * Constructs a page view from the indicated block. + */ +- EntryPage(BlockIo block) { ++ public EntryPage(BlockIo block) { + super(block); + } + +@@ -33,7 +33,7 @@ final class EntryPage extends PageHeader + * Factory method to create or return a data page for the + * indicated block. + */ +- static EntryPage getEntryPageView(BlockIo block) { ++ public static EntryPage getEntryPageView(BlockIo block) { + BlockView view = block.getView(); + if (view != null && view instanceof EntryPage) + return (EntryPage) view; +diff -urpN src.orig/db/com/cdegroot/db/recman/BlockIo.java src/db/com/cdegroot/db/recman/BlockIo.java +--- a/src/db/com/cdegroot/db/recman/BlockIo.java 2005-02-06 00:40:17.192151352 +0100 ++++ b/src/db/com/cdegroot/db/recman/BlockIo.java 2005-02-06 00:58:02.990125432 +0100 +@@ -31,7 +31,7 @@ package com.cdegroot.db.recman; + * @see java.io.DataInput + * @see java.io.DataOutput + */ +-final class BlockIo implements java.io.Serializable { ++final public class BlockIo implements java.io.Serializable { + private long blockId; + private final byte[] snapshot; // committed snapshot. + private boolean snapshotValid = false; +@@ -44,7 +44,7 @@ final class BlockIo implements java.io.S + * Constructs a new BlockIo instance working on the indicated + * buffer. + */ +- BlockIo(long blockId, byte[] data) { ++ public BlockIo(long blockId, byte[] data) { + // removeme for production version + if (blockId > 10000000000L) + throw new Error("bogus block id " + blockId); +@@ -108,7 +108,7 @@ final class BlockIo implements java.io.S + /** + * Returns the current view of the block. + */ +- BlockView getView() { ++ public BlockView getView() { + return view; + } + +@@ -172,17 +172,25 @@ final class BlockIo implements java.io.S + /** + * Reads a short from the indicated position + */ +- short readShort(int pos) { ++ public short readShort(int pos) { + return (short) + (((short) (data[pos+0] & 0xff) << 8) | + ((short) (data[pos+1] & 0xff) << 0)); + + } ++ ++ public byte readByte(int pos) { ++ return data[pos]; ++ } ++ ++ public void writeByte(int pos, byte value) ++ { data[pos] = value; ++ } + + /** + * Writes a short to the indicated position + */ +- void writeShort(int pos, short value) { ++ public void writeShort(int pos, short value) { + data[pos+0] = (byte)(0xff & (value >> 8)); + data[pos+1] = (byte)(0xff & (value >> 0)); + setDirty(); +@@ -191,7 +199,7 @@ final class BlockIo implements java.io.S + /** + * Reads an int from the indicated position + */ +- int readInt(int pos) { ++ public int readInt(int pos) { + return + (((int)(data[pos+0] & 0xff) << 24) | + ((int)(data[pos+1] & 0xff) << 16) | +@@ -202,7 +210,7 @@ final class BlockIo implements java.io.S + /** + * Writes an int to the indicated position + */ +- void writeInt(int pos, int value) { ++ public void writeInt(int pos, int value) { + data[pos+0] = (byte)(0xff & (value >> 24)); + data[pos+1] = (byte)(0xff & (value >> 16)); + data[pos+2] = (byte)(0xff & (value >> 8)); +@@ -213,7 +221,7 @@ final class BlockIo implements java.io.S + /** + * Reads a long from the indicated position + */ +- long readLong(int pos) { ++ public long readLong(int pos) { + return + (((long)(data[pos+0] & 0xff) << 56) | + ((long)(data[pos+1] & 0xff) << 48) | +@@ -228,7 +236,7 @@ final class BlockIo implements java.io.S + /** + * Writes a long to the indicated position + */ +- void writeLong(int pos, long value) { ++ public void writeLong(int pos, long value) { + data[pos+0] = (byte)(0xff & (value >> 56)); + data[pos+1] = (byte)(0xff & (value >> 48)); + data[pos+2] = (byte)(0xff & (value >> 40)); +diff -urpN src.orig/db/com/cdegroot/db/recman/BlockView.java src/db/com/cdegroot/db/recman/BlockView.java +--- a/src/db/com/cdegroot/db/recman/BlockView.java 2005-02-06 00:40:17.193151200 +0100 ++++ b/src/db/com/cdegroot/db/recman/BlockView.java 2005-02-06 00:47:57.632153832 +0100 +@@ -28,5 +28,5 @@ package com.cdegroot.db.recman; + * + * @see BlockIo.setView() + */ +-interface BlockView { ++public interface BlockView { + } +diff -urpN src.orig/db/com/cdegroot/db/recman/Magic.java src/db/com/cdegroot/db/recman/Magic.java +--- a/src/db/com/cdegroot/db/recman/Magic.java 2005-02-06 00:40:17.193151200 +0100 ++++ b/src/db/com/cdegroot/db/recman/Magic.java 2005-02-06 00:44:22.164909832 +0100 +@@ -25,7 +25,7 @@ package com.cdegroot.db.recman; + /** + * This interface contains magic cookies. + */ +-interface Magic { ++public interface Magic { + /** Magic cookie at start of file */ + short FILE_HEADER = 0x1350; + +@@ -57,4 +57,6 @@ interface Magic { + int SZ_INT = 4; + /** Size of an externalized long */ + int SZ_LONG = 8; ++ /** Size of byte */ ++ int SZ_BYTE = 1; + } +diff -urpN src.orig/db/com/cdegroot/db/recman/PageHeader.java src/db/com/cdegroot/db/recman/PageHeader.java +--- a/src/db/com/cdegroot/db/recman/PageHeader.java 2005-02-06 00:40:17.193151200 +0100 ++++ b/src/db/com/cdegroot/db/recman/PageHeader.java 2005-02-06 00:50:10.236994832 +0100 +@@ -28,15 +28,15 @@ import java.io.*; + * This class represents a page header. It is the common superclass for + * all different page views. + */ +-class PageHeader implements BlockView { ++public class PageHeader implements BlockView { + // offsets + private static final short O_MAGIC = 0; // short magic + private static final short O_NEXT = Magic.SZ_SHORT; // long next + private static final short O_PREV = O_NEXT + Magic.SZ_LONG; // long prev +- static final int SIZE = O_PREV + Magic.SZ_LONG; ++ public static final int SIZE = O_PREV + Magic.SZ_LONG; + + // my block +- BlockIo block; ++ public BlockIo block; + + /** + * Constructs a PageHeader object from a block +@@ -45,7 +45,7 @@ class PageHeader implements BlockView { + * @throws IOException if the block is too short to keep the file + * header. + */ +- PageHeader(BlockIo block) { ++ public PageHeader(BlockIo block) { + initialize(block); + if (!magicOk()) + throw new Error("CRITICAL: page header magic for block " +@@ -66,7 +66,7 @@ class PageHeader implements BlockView { + * Factory method to create or return a page header for the + * indicated block. + */ +- static PageHeader getView(BlockIo block) { ++ public static PageHeader getView(BlockIo block) { + BlockView view = block.getView(); + if (view != null && view instanceof PageHeader) + return (PageHeader) view; +diff -urpN src.orig/db/com/cdegroot/db/recman/RecordFile.java src/db/com/cdegroot/db/recman/RecordFile.java +--- a/src/db/com/cdegroot/db/recman/RecordFile.java 2005-02-06 00:40:17.193151200 +0100 ++++ b/src/db/com/cdegroot/db/recman/RecordFile.java 2005-02-06 00:45:38.616287456 +0100 +@@ -33,7 +33,7 @@ import java.util.*; + * The set of dirty records on the in-use list constitutes a transaction. + * Later on, we will send these records to some recovery thingy. + */ +-final class RecordFile { ++final public class RecordFile { + private final TransactionManager txnMgr; + + // Todo: reorganize in hashes and fifos as necessary. +@@ -48,7 +48,7 @@ final class RecordFile { + private boolean transactionsDisabled = false; + + /** The length of a single block. */ +- final static int BLOCK_SIZE = 8192;//4096; ++ final public static int BLOCK_SIZE = 8192;//4096; + + /** The extension of a record file */ + final static String extension = ".db"; diff --git a/dev-java/cdegroot-db/metadata.xml b/dev-java/cdegroot-db/metadata.xml new file mode 100644 index 000000000000..2444066aa02b --- /dev/null +++ b/dev-java/cdegroot-db/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>java@gentoo.org</email> + <name>Java</name> +</maintainer> +</pkgmetadata> |