public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Miroslav Šulc" <fordfrog@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/hsqldb/
Date: Mon, 28 Oct 2024 06:24:21 +0000 (UTC)	[thread overview]
Message-ID: <1730096513.04f4339c7085e400682f00f8fba52285bdded0f3.fordfrog@gentoo> (raw)

commit:     04f4339c7085e400682f00f8fba52285bdded0f3
Author:     Volkmar W. Pogatzki <gentoo <AT> pogatzki <DOT> net>
AuthorDate: Sun Oct 27 16:55:19 2024 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Mon Oct 28 06:21:53 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f4339c

dev-db/hsqldb: add 2.7.4

Signed-off-by: Volkmar W. Pogatzki <gentoo <AT> pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/38836/commits/8b4f9a1b7c6467f2afc21597d91c6072d7f15e02
Signed-off-by: Miroslav Šulc <fordfrog <AT> gentoo.org>

 dev-db/hsqldb/Manifest            |   1 +
 dev-db/hsqldb/hsqldb-2.7.4.ebuild | 181 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 182 insertions(+)

diff --git a/dev-db/hsqldb/Manifest b/dev-db/hsqldb/Manifest
index 7d624437e929..5389b8a1ecbc 100644
--- a/dev-db/hsqldb/Manifest
+++ b/dev-db/hsqldb/Manifest
@@ -1 +1,2 @@
 DIST hsqldb-2.7.3.zip 11778622 BLAKE2B 9e7f6a0e0bdf8602c87ab770dcb43c17db9ae6dc5d50fda079a44a42b0ccb64a20f74d020b2dbedbbc6b6c6ee57acf062d2c74d53a7d34fe932dbd79b0cc86d0 SHA512 06825d5f1428630dae476d78de9e2c48834a34a8678adf0e6af594594c5e1a7efdf99e366add4f6bbc24136e6aaa8fcbf54bd7ff2f2c459c20f9f02f7415b70a
+DIST hsqldb-2.7.4.zip 11792951 BLAKE2B 5f3661914b1a3ab006462c4d456d4601a61fcc57f057e18031346696342e9f95ac123c410c604ca7ede89d5c0a2702dc1c988b9269f1319929dea6fb8c66cebb SHA512 632017aa0776bdfe2442399451474a996491aa4584e7536b4c42199f613c0d1267d931fdcbe06acfa49061fa18dff7c3e4a0063a5ecd40fff73b9959e9975801

diff --git a/dev-db/hsqldb/hsqldb-2.7.4.ebuild b/dev-db/hsqldb/hsqldb-2.7.4.ebuild
new file mode 100644
index 000000000000..c2a6424fcd29
--- /dev/null
+++ b/dev-db/hsqldb/hsqldb-2.7.4.ebuild
@@ -0,0 +1,181 @@
+# Copyright 1999-2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+JAVA_PKG_IUSE="doc source test"
+MAVEN_ID="org.hsqldb:hsqldb:${PV}"
+
+inherit java-pkg-2
+
+MY_PV="$(ver_cut 1-2)"
+MY_PV="${MY_PV//./_}"
+
+DESCRIPTION="HSQLDB - Lightweight 100% Java SQL Database Engine"
+HOMEPAGE="https://hsqldb.org"
+SRC_URI="https://downloads.sourceforge.net/project/hsqldb/hsqldb/hsqldb_${MY_PV}/${P}.zip"
+S="${WORKDIR}/${P}/${PN}"
+
+LICENSE="BSD GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~ppc64 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris"
+
+BDEPEND="
+	app-arch/unzip
+	>=dev-java/ant-1.10.14-r3:0
+"
+
+COMMON_DEPEND="
+	acct-group/hsqldb
+	acct-user/hsqldb
+"
+
+DEPEND="${COMMON_DEPEND}
+	dev-java/javax-servlet-api:3.1
+	>=virtual/jdk-11:*
+	test? (
+		>=dev-java/ant-1.10.14-r3:0[junit]
+		dev-java/junit:0
+	)"
+
+RDEPEND="${COMMON_DEPEND}
+	>=virtual/jre-11:*"
+
+DOCS=( readme.txt doc/{changelist_2_0,odbc,readme-docauthors}.txt )
+
+PATCHES=(
+	"${FILESDIR}/hsqldb-2.7.3-hsqldb.conf.patch"
+	"${FILESDIR}/hsqldb-2.7.3-hsqldb.init.patch"
+)
+
+HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar
+HSQLDB_HOME=/var/lib/hsqldb
+
+src_prepare() {
+	default #780585
+	java-pkg-2_src_prepare
+	java-pkg_clean
+
+	# bin/hsqldb seems to have moved/renamed to sample/hsqldb.init
+	mv sample/hsqldb{.init,} || die
+
+	mkdir conf
+	# sample-hsqldb.cfg seems to have moved/renamed to sample/hsqldb.conf
+	mv sample/hsqldb.conf conf/hsqldb || die
+
+	cp "${FILESDIR}/server.properties" conf/ || die
+	cp "${FILESDIR}/sqltool.rc" conf/ || die
+}
+
+src_compile() {
+	local targets=( hsqldb hsqldbutil sqltool )
+	if use doc; then
+		mkdir doc-src/apidocs || die
+		cp doc{,-src}/apidocs/javadoc.css || die
+		rm -r doc/apidocs || die
+		targets+=( javadoc )
+	fi
+	use test && targets+=( preprocessor )
+	eant \
+		-f build/build.xml \
+		-Dservletapi.lib="$(java-pkg_getjars --build-only javax-servlet-api-3.1)" \
+		-Djavac.bootcp.override \
+		-Dant.java.iscjava11 \
+		-Dant.build.javac.source="11" \
+		-Dant.build.javac.target="11" \
+		"${targets[@]}"
+}
+
+src_test() {
+	mkdir -p test-src/org/hsqldb/{resources,jdbc/resources/{xml,sql},util/preprocessor} || die
+	eant -v \
+		-f build/test.xml \
+		-Dservletapi.lib="$(java-pkg_getjars --build-only javax-servlet-api-3.1)" \
+		-Djunit.jar="$(java-pkg_getjars --build-only junit)" \
+		-Djavac.bootcp.override \
+		-Dant.java.iscjava11 \
+		-Dant.build.javac.source="11" \
+		-Dant.build.javac.target="11" \
+		make.test.suite run.test.suite
+}
+
+src_install() {
+	java-pkg_dojar lib/{hsqldb{,util},sqltool}.jar
+
+	einstalldocs
+	use doc && java-pkg_dojavadoc doc/apidocs
+
+	use source && java-pkg_dosrc src/*
+
+	echo "CONFIG_PROTECT=\"${HSQLDB_HOME}\"" > "${T}"/35hsqldb || die
+	doenvd "${T}"/35hsqldb
+
+	# Put init, configuration and authorization files in /etc
+	doinitd "${FILESDIR}/hsqldb"
+	doconfd conf/hsqldb
+	insinto /etc/hsqldb
+	# Change the ownership of server.properties and sqltool.rc
+	# files to hsqldb:hsqldb. (resolves Bug #111963)
+	use prefix || insopts -m0600 -o hsqldb -g hsqldb
+	doins conf/server.properties
+	use prefix || insopts -m0600 -o hsqldb -g hsqldb
+	doins conf/sqltool.rc
+
+	# Install init script
+	dodir "${HSQLDB_HOME}/bin"
+	keepdir "${HSQLDB_HOME}"
+	exeinto "${HSQLDB_HOME}/bin"
+	doexe sample/hsqldb
+
+	# Make sure that files have correct permissions
+	use prefix || chown -R hsqldb:hsqldb "${ED}${HSQLDB_HOME}" || die
+	chmod o-rwx "${ED}${HSQLDB_HOME}" || die
+
+	# Create symlinks to authorization files in the server home dir
+	# (required by the hqldb init script)
+	insinto "${HSQLDB_HOME}"
+	dosym ../../../etc/hsqldb/server.properties "${HSQLDB_HOME}/server.properties"
+	dosym ../../../etc/hsqldb/sqltool.rc "${HSQLDB_HOME}/sqltool.rc"
+}
+
+pkg_postinst() {
+	ewarn "If you intend to run Hsqldb in Server mode and you want to create"
+	ewarn "additional databases, remember to put correct information in both"
+	ewarn "'server.properties' and 'sqltool.rc' files."
+	ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3."
+	ewarn "UNIX Quick Start' in the Hsqldb docs for more information)"
+	echo
+	elog "Example:"
+	echo
+	elog "${EPREFIX}/etc/hsqldb/server.properties"
+	elog "============================="
+	elog "server.database.1=file:xdb/xdb"
+	elog "server.dbname.1=xdb"
+	elog "server.urlid.1=xdb"
+	elog
+	elog "${EPREFIX}/etc/hsqldb/sqltool.rc"
+	elog "======================"
+	elog "urlid xdb"
+	elog "url jdbc:hsqldb:hsql://localhost/xdb"
+	elog "username sa"
+	elog "password "
+	echo
+	elog "Also note that each hsqldb server can serve only up to 10"
+	elog "different databases simultaneously (with consecutive {0-9}"
+	elog "suffixes in the 'server.properties' file)."
+	echo
+	ewarn "For data manipulation use:"
+	ewarn
+	ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManager"
+	ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.DatabaseManagerSwing"
+	ewarn "# java -classpath ${EPREFIX}${HSQLDB_JAR} org.hsqldb.util.SqlTool \\"
+	ewarn "  --rcFile ${EPREFIX}/var/lib/hsqldb/sqltool.rc <dbname>"
+	echo
+	elog "The Hsqldb can be run in multiple modes - read 'Chapter 1. Running'"
+	elog "and Using Hsqldb' in the Hsqldb docs at:"
+	elog "  http://hsqldb.org/web/hsqlDocsFrame.html"
+	elog "If you intend to run it in the Server mode, it is suggested to add the"
+	elog "init script to your start-up scripts, this should be done like this:"
+	elog "  \`rc-update add hsqldb default\`"
+	echo
+}


             reply	other threads:[~2024-10-28  6:24 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-28  6:24 Miroslav Šulc [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-11-28 14:38 [gentoo-commits] repo/gentoo:master commit in: dev-db/hsqldb/ Miroslav Šulc
2024-11-27  8:08 Sam James
2024-11-27  8:08 Sam James
2024-11-27  8:08 Sam James
2024-07-29  9:40 Sam James
2024-07-29  9:40 Sam James
2024-07-29  9:40 Sam James
2024-07-29  9:40 Sam James
2024-06-28  8:19 Miroslav Šulc
2023-02-25  6:47 Miroslav Šulc
2021-11-24 23:31 Sam James
2021-10-19  0:15 Sam James
2021-07-19 19:26 Miroslav Šulc
2021-07-19 18:36 Sam James
2021-07-17 23:18 Sam James
2021-07-17  7:44 Agostino Sarubbo
2021-06-16  8:48 Miroslav Šulc
2021-06-16  8:48 Miroslav Šulc
2018-08-20  9:45 Patrice Clement
2018-02-16 21:16 Michał Górny
2017-08-26 17:13 Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1730096513.04f4339c7085e400682f00f8fba52285bdded0f3.fordfrog@gentoo \
    --to=fordfrog@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox