diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-db | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-db')
816 files changed, 43926 insertions, 0 deletions
diff --git a/dev-db/4store/4store-1.1.5.ebuild b/dev-db/4store/4store-1.1.5.ebuild new file mode 100644 index 000000000000..51f47be8b999 --- /dev/null +++ b/dev-db/4store/4store-1.1.5.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils user + +DESCRIPTION="4store is an efficient, scalable and stable RDF database" +HOMEPAGE="http://4store.org/" +# http://4store.org/download/4store-v1.0.4.tar.gz +MY_P="${PN}-v${PV}" +SRC_URI="http://4store.org/download/${MY_P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +# < http://4store.org/trac/wiki/Dependencies +DEPEND="media-libs/raptor + >=dev-libs/rasqal-0.9.18 + dev-libs/libxml2 + dev-libs/libpcre + sys-libs/readline + sys-libs/ncurses + dev-libs/expat + sys-libs/zlib" + +RDEPEND="${DEPEND}" +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup fourstore + enewuser fourstore -1 -1 /var/lib/4store fourstore +} + +src_install() { + + # patch the Makefiles to use /usr/ instead of /usr/local/ + find . -name "Makefile" -execdir sed -e "s#/usr/local/#/usr/#" -i {} \; + + MAKEOPTS="-j1" emake DESTDIR="${D}" install || die "emake install failed" + + dodir /var/log/4store + fowners fourstore:fourstore \ + /var/lib/4store \ + /var/log/4store + + # fix 1777 + fperms 755 /var/lib/4store + + # fix 755 + fperms 644 \ + /usr/share/man/man1/4s-query.1 \ + /usr/share/man/man1/4s-backend-setup.1 \ + /usr/share/man/man1/4s-import.1 \ + /usr/share/man/man1/4s-cluster-info.1 \ + /usr/share/man/man1/4s-cluster-start.1 \ + /usr/share/man/man1/4s-cluster-create.1 \ + /usr/share/man/man1/4s-cluster-stop.1 \ + /usr/share/man/man1/4s-cluster-destroy.1 +} diff --git a/dev-db/4store/Manifest b/dev-db/4store/Manifest new file mode 100644 index 000000000000..dea2c6ddc3d1 --- /dev/null +++ b/dev-db/4store/Manifest @@ -0,0 +1 @@ +DIST 4store-v1.1.5.tar.gz 5610204 SHA256 2bdd6fb804288802187c5779e365eea2b3ddebce419b3da0609be38edc9e8c5b SHA512 42a7431c7853e1b06a76ed15c205eebd7b334516c14e7dcfeddb2f9249f30f879f8256a1b454be71f79e71205b3efa95efab726fd88b4d455bb0fc4a8092bcf4 WHIRLPOOL 55fd3f725386847c598c80945a01234fb7f3c8ced56f1004f3679d99e7fdf12cb8f92c4f865891491ac0dc66d5194379cbe2022f25bef9134bc041c5f5dd2d92 diff --git a/dev-db/4store/metadata.xml b/dev-db/4store/metadata.xml new file mode 100644 index 000000000000..24cbb90cf0c4 --- /dev/null +++ b/dev-db/4store/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> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/SchemaSync/Manifest b/dev-db/SchemaSync/Manifest new file mode 100644 index 000000000000..30d3f9c11602 --- /dev/null +++ b/dev-db/SchemaSync/Manifest @@ -0,0 +1 @@ +DIST SchemaSync-0.9.2.tar.gz 12828 SHA256 3ee4e87e932c41e9fcbc534d662d6dc7be6ac29c2cd5ef3e6fd620fad6c2f3f5 SHA512 4f2522c05e3cf0957fe0d51cc48f3a45fd8eaeb341801bfdeb32bb7e959e8a250a84a162b80853f2010a99a932ef7d1b556579f7c77971f0e9a3e0fa87531599 WHIRLPOOL b532793719bca008a5036fc12f75feb9b136323f7d6d3a1253a4b4521a7699cad082d6fe208ec6fbe6b6c12d80e3e59aa6e77f96c26a56f1dde8d2a31ae610ea diff --git a/dev-db/SchemaSync/SchemaSync-0.9.2.ebuild b/dev-db/SchemaSync/SchemaSync-0.9.2.ebuild new file mode 100644 index 000000000000..d11c55cae690 --- /dev/null +++ b/dev-db/SchemaSync/SchemaSync-0.9.2.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +PYTHON_DEPEND="2:2.5:2.7" + +inherit distutils + +DESCRIPTION="MySQL Schema Versioning and Migration Utility" +HOMEPAGE="http://schemasync.org/" +SRC_URI="http://www.schemasync.org/downloads/${P}.tar.gz" + +pn="${PN,,}" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + dev-python/setuptools + dev-python/mysql-python + dev-python/SchemaObject" +DEPEND="${RDEPEND}" + +pkg_setup() { + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + python_convert_shebangs -r 2 . +} + +pkg_postinst() { + python_mod_optimize "${pn}" +} + +pkg_postrm() { + python_mod_cleanup "${pn}" +} diff --git a/dev-db/SchemaSync/metadata.xml b/dev-db/SchemaSync/metadata.xml new file mode 100644 index 000000000000..1e7587374fdf --- /dev/null +++ b/dev-db/SchemaSync/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> + <email>blueness@gentoo.org</email> + <name>Anthony G. Basile</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/apgdiff/Manifest b/dev-db/apgdiff/Manifest new file mode 100644 index 000000000000..985b111038a9 --- /dev/null +++ b/dev-db/apgdiff/Manifest @@ -0,0 +1,5 @@ +DIST apgdiff-1.4-src.zip 178608 SHA256 aa341a627e2087eb9fb66c1bc0a785e5e9953459395b60e1b447ed30947f52f9 SHA512 c1dcd3f39e931f90e65a439a610d5b264b790419a59b2c90f6d9107c1b5151c602887588f378110a2e9420428414fc333c7919e2137e2dc35168654ceb3ae8d0 WHIRLPOOL 2e05303fef00b999aa07dce0b59df7d805b486cced61ac50a40c3b8aefcdd37aec649feb4f5fc96111d388029198def0aada0d33c6421e672a652d19b55f94a1 +DIST apgdiff-2.2.1-src.zip 194305 SHA256 844c92499f80b52d290fa89edf19c955e056eb6d92ee7fb3ad01acfcc04b4d04 SHA512 cab6b2349d5822ca579c1e021ea7f02f5ddf39d56559f841d0cadfdccc1c1c61399c494302ea5909984b9a8a6d91cf08868f012dd3487a8633f65e3bbd28f19c WHIRLPOOL 364f78e22c136e10acd3337db7d7b85ef16e33042d7d6fae990824fda583d94189ebd737c6268fb1264f7b9d2fa11c3c4852fd8fab89cfbca6cd42c7bfb97397 +DIST apgdiff-2.2.2-src.zip 198814 SHA256 cd4c4a5315fdf311e3dd18c1368a50fead91bb17198e984b0d4ace15755a55ae SHA512 273ba473b5b4ccfe2ae1b3f34ce2c2b825e446fad166f28a4575528190c20922e6794563ae3e5b2918ade5a3292a792ea363e9e5ec0900e924332d8771548c0b WHIRLPOOL ee6af8b7444676e4eb887f716dee3514f9d5a5d54bf0efa859c20c817424a5dbcf4059dc6641c1fa19c53441c25e002e812d5eea13d3c4aecce6fee76a46dd9e +DIST apgdiff-2.3-src.zip 215881 SHA256 bbae469988ca321b76a4d2d8717477261c823ac9608282998cec28ed8933c8b2 SHA512 e716143ff4378fc27c4781076c51826583c2ad9dab17f4364acbfed0f9a0958dca0de9a72171816bbce41653ad33834158cb9277dd8790649da4bd24e013bbb5 WHIRLPOOL e404000074fee973b49ace8f6223072eb4aca95283d9a3ffd9b4dec1f242de263546e0894b8242828368926a45ba3ac5388b59cb4be73a1b0421a9e1703f2685 +DIST apgdiff-2.4-src.zip 227714 SHA256 8551a3e10c7aae3a04efc5dad655575484b63a3323f07db5e81c50b42d88129c SHA512 f37e0f86ff8a8bc53a43cac1748ab3a2c96ab6c972b37ee63f281ee397b31a7b48986cbc963d89ea773f1bb7b10b798de74a4c88a03f2db7672501b93355261b WHIRLPOOL 61a8a605508564188f16fc306abd710e3895079a53a2f311e3cbb8b1943146f7f4039b31f5f5653b1ea30447a2e35328201d7aec7b91952483c1a5a18704d3b7 diff --git a/dev-db/apgdiff/apgdiff-1.4.ebuild b/dev-db/apgdiff/apgdiff-1.4.ebuild new file mode 100644 index 000000000000..688ade64018b --- /dev/null +++ b/dev-db/apgdiff/apgdiff-1.4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +JAVA_PKG_IUSE="doc source" +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Another PostgreSQL Diff Tool is a simple PostgreSQL diff tool that is useful for schema upgrades" +HOMEPAGE="http://apgdiff.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.zip" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND=">=virtual/jdk-1.5 + >=dev-java/ant-core-1.7.0:0 + >=dev-java/ant-junit-1.7.0:0 + app-arch/zip:0 + test? ( + dev-java/hamcrest-core:0 + >=dev-java/junit-4.4:4 + )" + +RDEPEND=">=virtual/jre-1.5" + +java_prepare() { + mkdir "${S}"/lib + cd "${S}"/lib + if use test ; then + java-pkg_jar-from --build-only hamcrest-core + java-pkg_jar-from --build-only junit-4 + fi +} + +src_compile() { + eant -Dnoget=true jar $(use_doc) +} + +src_install() { + java-pkg_newjar dist/${P}.jar ${PN}.jar + java-pkg_dolauncher apgdiff --jar ${PN}.jar + + use doc && java-pkg_dojavadoc dist/javadoc + use source && java-pkg_dosrc src/main/java/* +} + +src_test() { + ANT_TASKS="ant-junit" eant -Dnoget=true test +} diff --git a/dev-db/apgdiff/apgdiff-2.2.1.ebuild b/dev-db/apgdiff/apgdiff-2.2.1.ebuild new file mode 100644 index 000000000000..bbfae5428360 --- /dev/null +++ b/dev-db/apgdiff/apgdiff-2.2.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +JAVA_PKG_IUSE="doc source" +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Another PostgreSQL Diff Tool is a simple PostgreSQL diff tool that is useful for schema upgrades" +HOMEPAGE="http://apgdiff.com" +SRC_URI="http://apgdiff.com/download/${P}-src.zip" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND=">=virtual/jdk-1.6 + >=dev-java/ant-core-1.7.0:0 + >=dev-java/ant-junit-1.7.0:0 + app-arch/zip:0 + test? ( + dev-java/hamcrest-core:1.3 + >=dev-java/junit-4.4:4 + )" + +RDEPEND=">=virtual/jre-1.6" + +java_prepare() { + mkdir "${S}"/lib + cd "${S}"/lib + if use test ; then + java-pkg_jar-from --build-only hamcrest-core-1.3 + java-pkg_jar-from --build-only junit-4 + fi +} + +src_compile() { + eant -Dnoget=true jar $(use_doc) +} + +src_install() { + java-pkg_newjar dist/${P}.jar ${PN}.jar + java-pkg_dolauncher apgdiff --jar ${PN}.jar + + use doc && java-pkg_dojavadoc dist/javadoc + use source && java-pkg_dosrc src/main/java/* +} + +src_test() { + ANT_TASKS="ant-junit" eant -Dnoget=true test +} diff --git a/dev-db/apgdiff/apgdiff-2.2.2.ebuild b/dev-db/apgdiff/apgdiff-2.2.2.ebuild new file mode 100644 index 000000000000..d3b7362f9d4c --- /dev/null +++ b/dev-db/apgdiff/apgdiff-2.2.2.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +JAVA_PKG_IUSE="doc source" +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Another PostgreSQL Diff Tool is a simple PostgreSQL diff tool that is useful for schema upgrades" +HOMEPAGE="http://apgdiff.com" +SRC_URI="http://apgdiff.com/download/${P}-src.zip" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND=">=virtual/jdk-1.6 + >=dev-java/ant-core-1.7.0:0 + >=dev-java/ant-junit-1.7.0:0 + app-arch/zip:0 + test? ( + dev-java/hamcrest-core:0 + >=dev-java/junit-4.4:4 + )" + +RDEPEND=">=virtual/jre-1.6" + +java_prepare() { + mkdir "${S}"/lib + cd "${S}"/lib + if use test ; then + java-pkg_jar-from --build-only hamcrest-core + java-pkg_jar-from --build-only junit-4 + fi +} + +src_compile() { + eant -Dnoget=true jar $(use_doc) +} + +src_install() { + java-pkg_newjar dist/${P}.jar ${PN}.jar + java-pkg_dolauncher apgdiff --jar ${PN}.jar + + use doc && java-pkg_dojavadoc dist/javadoc + use source && java-pkg_dosrc src/main/java/* +} + +src_test() { + ANT_TASKS="ant-junit" eant -Dnoget=true test +} diff --git a/dev-db/apgdiff/apgdiff-2.3.ebuild b/dev-db/apgdiff/apgdiff-2.3.ebuild new file mode 100644 index 000000000000..d3b7362f9d4c --- /dev/null +++ b/dev-db/apgdiff/apgdiff-2.3.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +JAVA_PKG_IUSE="doc source" +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Another PostgreSQL Diff Tool is a simple PostgreSQL diff tool that is useful for schema upgrades" +HOMEPAGE="http://apgdiff.com" +SRC_URI="http://apgdiff.com/download/${P}-src.zip" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND=">=virtual/jdk-1.6 + >=dev-java/ant-core-1.7.0:0 + >=dev-java/ant-junit-1.7.0:0 + app-arch/zip:0 + test? ( + dev-java/hamcrest-core:0 + >=dev-java/junit-4.4:4 + )" + +RDEPEND=">=virtual/jre-1.6" + +java_prepare() { + mkdir "${S}"/lib + cd "${S}"/lib + if use test ; then + java-pkg_jar-from --build-only hamcrest-core + java-pkg_jar-from --build-only junit-4 + fi +} + +src_compile() { + eant -Dnoget=true jar $(use_doc) +} + +src_install() { + java-pkg_newjar dist/${P}.jar ${PN}.jar + java-pkg_dolauncher apgdiff --jar ${PN}.jar + + use doc && java-pkg_dojavadoc dist/javadoc + use source && java-pkg_dosrc src/main/java/* +} + +src_test() { + ANT_TASKS="ant-junit" eant -Dnoget=true test +} diff --git a/dev-db/apgdiff/apgdiff-2.4.ebuild b/dev-db/apgdiff/apgdiff-2.4.ebuild new file mode 100644 index 000000000000..d3b7362f9d4c --- /dev/null +++ b/dev-db/apgdiff/apgdiff-2.4.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +JAVA_PKG_IUSE="doc source" +inherit eutils java-pkg-2 java-ant-2 + +DESCRIPTION="Another PostgreSQL Diff Tool is a simple PostgreSQL diff tool that is useful for schema upgrades" +HOMEPAGE="http://apgdiff.com" +SRC_URI="http://apgdiff.com/download/${P}-src.zip" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="test" + +DEPEND=">=virtual/jdk-1.6 + >=dev-java/ant-core-1.7.0:0 + >=dev-java/ant-junit-1.7.0:0 + app-arch/zip:0 + test? ( + dev-java/hamcrest-core:0 + >=dev-java/junit-4.4:4 + )" + +RDEPEND=">=virtual/jre-1.6" + +java_prepare() { + mkdir "${S}"/lib + cd "${S}"/lib + if use test ; then + java-pkg_jar-from --build-only hamcrest-core + java-pkg_jar-from --build-only junit-4 + fi +} + +src_compile() { + eant -Dnoget=true jar $(use_doc) +} + +src_install() { + java-pkg_newjar dist/${P}.jar ${PN}.jar + java-pkg_dolauncher apgdiff --jar ${PN}.jar + + use doc && java-pkg_dojavadoc dist/javadoc + use source && java-pkg_dosrc src/main/java/* +} + +src_test() { + ANT_TASKS="ant-junit" eant -Dnoget=true test +} diff --git a/dev-db/apgdiff/metadata.xml b/dev-db/apgdiff/metadata.xml new file mode 100644 index 000000000000..407583277d87 --- /dev/null +++ b/dev-db/apgdiff/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>java</herd> +<maintainer> + <email>java@gentoo.org</email> +</maintainer> +</pkgmetadata> diff --git a/dev-db/barman/Manifest b/dev-db/barman/Manifest new file mode 100644 index 000000000000..7cda572d30f1 --- /dev/null +++ b/dev-db/barman/Manifest @@ -0,0 +1,2 @@ +DIST barman-1.4.0.tar.gz 120590 SHA256 d18c331bd6d8931bd60dab272bc9d512eb494bfddb11964d7ca430f51b7e45e9 SHA512 415fd5597df94fb43b8c48ec1250c22e6bbe21217fe9937d6c0cf6ef8ab68bea21b9341c18a2e97f7af92b516f0201b82fa1279af6994d6fa60d441d3f9326e2 WHIRLPOOL 6e1e1c112ad5ef1afc76369d0f4428128ce85d2abe4a298b2eed73efc6bd2e248dd81baa3f6839360ea162dc676103f4e59f13fefe102ea609455e1330444e93 +DIST barman-1.4.1.tar.gz 122048 SHA256 38a649ab1cea811e2db9410d87c08423beb3135f88b1160913bcb9f16a10b1df SHA512 3f6d55ceee55efc95d526848292f68c80bbee4081fc26714b0da52990e3a05030ae2f89561a4c4c71c273bb1c07f009dc0bbbbebbc5cde87831b514e918ad531 WHIRLPOOL 8f42844f5d9514b0d8c14ff2ad03f1e8e3994e0e394e7e7a761b0a95ed6a8c9a4eea791a82a14b346cbcf3354aaa8f56547290eddc75ea0f57e775a55db70499 diff --git a/dev-db/barman/barman-1.4.0.ebuild b/dev-db/barman/barman-1.4.0.ebuild new file mode 100644 index 000000000000..d312a7ea25b1 --- /dev/null +++ b/dev-db/barman/barman-1.4.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +PYTHON_COMPAT=( python2_7) + +inherit distutils-r1 + +DESCRIPTION="Administration tool for disaster recovery of PostgreSQL servers" + +HOMEPAGE="http://www.pgbarman.org" +SRC_URI="http://downloads.sourceforge.net/project/pgbarman/${PV}/${P}.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" + +RDEPEND="dev-python/argh[${PYTHON_USEDEP}] + >=dev-python/psycopg-2[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/argcomplete[${PYTHON_USEDEP}] + net-misc/rsync + dev-db/postgresql[server]" +DEPEND="" diff --git a/dev-db/barman/barman-1.4.1.ebuild b/dev-db/barman/barman-1.4.1.ebuild new file mode 100644 index 000000000000..d312a7ea25b1 --- /dev/null +++ b/dev-db/barman/barman-1.4.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +PYTHON_COMPAT=( python2_7) + +inherit distutils-r1 + +DESCRIPTION="Administration tool for disaster recovery of PostgreSQL servers" + +HOMEPAGE="http://www.pgbarman.org" +SRC_URI="http://downloads.sourceforge.net/project/pgbarman/${PV}/${P}.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" + +RDEPEND="dev-python/argh[${PYTHON_USEDEP}] + >=dev-python/psycopg-2[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/argcomplete[${PYTHON_USEDEP}] + net-misc/rsync + dev-db/postgresql[server]" +DEPEND="" diff --git a/dev-db/barman/metadata.xml b/dev-db/barman/metadata.xml new file mode 100644 index 000000000000..24cbb90cf0c4 --- /dev/null +++ b/dev-db/barman/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> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/bucardo/Manifest b/dev-db/bucardo/Manifest new file mode 100644 index 000000000000..4a4dc44fe419 --- /dev/null +++ b/dev-db/bucardo/Manifest @@ -0,0 +1,3 @@ +DIST Bucardo-5.1.1.tar.gz 313409 SHA256 73fec278e83ccd561050d24816438db34d0b68fb9bc44bf4d27c5885ad31597f SHA512 cfba0ad5bd305a057688e024b11dce8332ebada2a5ca649481311cd46e140d6fc57c71914570fe7f26beb9c6e5ac232d36450bed9017ae932117cf28561d311a WHIRLPOOL d8d4848e2e817d648bc9aa4102d00e6da981098f0baf10af3239c1818aa51fba890670788acdf2b0af6f87f3b2fc987a44918d45ab3a304ebd32e536430f0167 +DIST Bucardo-5.2.0.tar.gz 318481 SHA256 3b6353b5cf28e45e1ad612f3aea884dabd19823374cc38eeec8364390d5a94ad SHA512 179c72d3a6cd756a725b3f37e2d6dc30df5d473e90a479f22d6a2ca4e6e98f55c1aa12d92ae4958d4446f5f1176fad4c5c0085d38cf3c64f77b699e3bf0884dd WHIRLPOOL 8c76910c97f9252473cd7575a08fea9f6c536d58f66ab596274fec514e220edbd20ea0fac75dc739757702e1b9ee47181240f348ace74ca7f7cf9121a6f85d9c +DIST Bucardo-5.3.1.tar.gz 321942 SHA256 de8f83305395571cff8c6db8e0016b195424ed75116012528d283dd789c2c132 SHA512 c0821116b81523016b1b7cd9f7544b575c9b762fea1a721f57648dd8484fbc8881fa10fc4a81166239b3a4b50072dfdb8075e5f1485c96c37265d023b0f4ac27 WHIRLPOOL acf5bb82a83d49f979301fe2941c884be0773e1180929d2973e3f6b781f610ea3650498141655b59c2e15dd581d555e4e2314f4d8762ffa323209d4146dab82c diff --git a/dev-db/bucardo/bucardo-5.1.1-r1.ebuild b/dev-db/bucardo/bucardo-5.1.1-r1.ebuild new file mode 100644 index 000000000000..842dc1235925 --- /dev/null +++ b/dev-db/bucardo/bucardo-5.1.1-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +RESTRICT="test" + +inherit perl-module + +MY_PN="Bucardo" + +DESCRIPTION="An asynchronous PostgreSQL replication system" +HOMEPAGE="http://bucardo.org/wiki/Bucardo" +SRC_URI="http://bucardo.org/downloads/${MY_PN}-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +#IUSE="test" doesn't work without extra data +IUSE="" + +DEPEND="dev-perl/DBIx-Safe + dev-perl/DBD-Pg" +RDEPEND="dev-perl/DBIx-Safe" + +S=${WORKDIR}/${MY_PN}-${PV} + +src_install() { + emake DESTDIR="${D}" INSTALL_BASE="${D}" install -j1 + keepdir /var/run/bucardo +} diff --git a/dev-db/bucardo/bucardo-5.2.0.ebuild b/dev-db/bucardo/bucardo-5.2.0.ebuild new file mode 100644 index 000000000000..842dc1235925 --- /dev/null +++ b/dev-db/bucardo/bucardo-5.2.0.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +RESTRICT="test" + +inherit perl-module + +MY_PN="Bucardo" + +DESCRIPTION="An asynchronous PostgreSQL replication system" +HOMEPAGE="http://bucardo.org/wiki/Bucardo" +SRC_URI="http://bucardo.org/downloads/${MY_PN}-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +#IUSE="test" doesn't work without extra data +IUSE="" + +DEPEND="dev-perl/DBIx-Safe + dev-perl/DBD-Pg" +RDEPEND="dev-perl/DBIx-Safe" + +S=${WORKDIR}/${MY_PN}-${PV} + +src_install() { + emake DESTDIR="${D}" INSTALL_BASE="${D}" install -j1 + keepdir /var/run/bucardo +} diff --git a/dev-db/bucardo/bucardo-5.3.1.ebuild b/dev-db/bucardo/bucardo-5.3.1.ebuild new file mode 100644 index 000000000000..8337c3ae4088 --- /dev/null +++ b/dev-db/bucardo/bucardo-5.3.1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +RESTRICT="test" + +inherit perl-module + +MY_PN="Bucardo" + +DESCRIPTION="An asynchronous PostgreSQL replication system" +HOMEPAGE="http://bucardo.org/wiki/Bucardo" +SRC_URI="http://bucardo.org/downloads/${MY_PN}-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +#IUSE="test" doesn't work without extra data +IUSE="" + +DEPEND="dev-perl/DBIx-Safe + dev-perl/DBD-Pg" +RDEPEND="dev-perl/DBIx-Safe" + +S=${WORKDIR}/${MY_PN}-${PV} + +src_install() { + emake DESTDIR="${D}" INSTALL_BASE="${D}" install -j1 + keepdir /var/run/bucardo +} diff --git a/dev-db/bucardo/metadata.xml b/dev-db/bucardo/metadata.xml new file mode 100644 index 000000000000..d06e452b35af --- /dev/null +++ b/dev-db/bucardo/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> +</pkgmetadata> diff --git a/dev-db/cdb/Manifest b/dev-db/cdb/Manifest new file mode 100644 index 000000000000..7b701ec1a4cc --- /dev/null +++ b/dev-db/cdb/Manifest @@ -0,0 +1 @@ +DIST cdb-0.75.tar.gz 54162 SHA256 1919577799a50c080a8a05a1cbfa5fa7e7abc823d8d7df2eeb181e624b7952c5 SHA512 6faeab91a77457348b58f685e81000b83fb609691317198a06284c5c62dee1e4d6138f90be1e727021f279d740169c175a21b23c96adb39a654e3f7fafdf36c0 WHIRLPOOL 51e1783c3f5c7c44846e370075ca53593cf5cbf82bcdf39e3882b49205058844d7403c571ce007eaba987b23848dcc87e3c4ad3cc7b622389bb2f532bafb4912 diff --git a/dev-db/cdb/cdb-0.75-r3.ebuild b/dev-db/cdb/cdb-0.75-r3.ebuild new file mode 100644 index 000000000000..aa073cc0b70d --- /dev/null +++ b/dev-db/cdb/cdb-0.75-r3.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 +inherit eutils multilib toolchain-funcs + +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos" + +DESCRIPTION="Fast, reliable, simple package for creating and reading constant databases" +HOMEPAGE="http://cr.yp.to/cdb.html" +SRC_URI="http://cr.yp.to/cdb/${P}.tar.gz" +LICENSE="public-domain" +SLOT="0" +IUSE="" + +DEPEND=">=sys-apps/sed-4 + !dev-db/tinycdb" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/${P}-errno.diff + epatch "${FILESDIR}"/${P}-stdint.diff + + sed -i -e 's/head -1/head -n 1/g' Makefile \ + || die "sed Makefile failed" +} + +src_configure() { + echo "$(tc-getCC) ${CFLAGS}" > conf-cc + echo "$(tc-getCC) ${LDFLAGS}" > conf-ld + echo "${EPREFIX}/usr" > conf-home +} + +src_install() { + dobin cdbdump cdbget cdbmake cdbmake-12 cdbmake-sv cdbstats cdbtest \ + || die "dobin failed" + + # ok so ... first off, some automakes fail at finding + # cdb.a, so install that now + dolib *.a || die "dolib failed" + + # then do this pretty little symlinking to solve the somewhat + # cosmetic library issue at hand + dosym cdb.a /usr/$(get_libdir)/libcdb.a || die "dosym failed" + + # uint32.h needs installation too, otherwise compiles depending + # on it will fail + insinto /usr/include/cdb + doins cdb*.h buffer.h alloc.h uint32.h || die "doins failed" + + dodoc CHANGES FILES README SYSDEPS TODO VERSION +} diff --git a/dev-db/cdb/files/cdb-0.75-errno.diff b/dev-db/cdb/files/cdb-0.75-errno.diff new file mode 100644 index 000000000000..5f6ac20c59c6 --- /dev/null +++ b/dev-db/cdb/files/cdb-0.75-errno.diff @@ -0,0 +1,11 @@ +--- error.h.orig 2003-03-29 04:18:26.000000000 -0800 ++++ error.h 2003-03-29 04:19:00.000000000 -0800 +@@ -1,7 +1,7 @@ + #ifndef ERROR_H + #define ERROR_H + +-extern int errno; ++#include <errno.h> + + extern int error_intr; + extern int error_nomem; diff --git a/dev-db/cdb/files/cdb-0.75-stdint.diff b/dev-db/cdb/files/cdb-0.75-stdint.diff new file mode 100644 index 000000000000..eb564512075e --- /dev/null +++ b/dev-db/cdb/files/cdb-0.75-stdint.diff @@ -0,0 +1,436 @@ +diff -Naur cdb-0.75-orig/cdb.c cdb-0.75/cdb.c +--- cdb-0.75-orig/cdb.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdb.c 2009-01-16 19:46:17.000000000 +0100 +@@ -41,7 +41,7 @@ + } + } + +-int cdb_read(struct cdb *c,char *buf,unsigned int len,uint32 pos) ++int cdb_read(struct cdb *c,char *buf,unsigned int len,uint32_t pos) + { + if (c->map) { + if ((pos > c->size) || (c->size - pos < len)) goto FORMAT; +@@ -67,7 +67,7 @@ + return -1; + } + +-static int match(struct cdb *c,char *key,unsigned int len,uint32 pos) ++static int match(struct cdb *c,char *key,unsigned int len,uint32_t pos) + { + char buf[32]; + int n; +@@ -87,8 +87,8 @@ + int cdb_findnext(struct cdb *c,char *key,unsigned int len) + { + char buf[8]; +- uint32 pos; +- uint32 u; ++ uint32_t pos; ++ uint32_t u; + + if (!c->loop) { + u = cdb_hash(key,len); +diff -Naur cdb-0.75-orig/cdbdump.c cdb-0.75/cdbdump.c +--- cdb-0.75-orig/cdbdump.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdbdump.c 2009-01-16 19:46:17.000000000 +0100 +@@ -18,7 +18,7 @@ + if (buffer_flush(buffer_1) == -1) die_write(); + } + +-uint32 pos = 0; ++uint32_t pos = 0; + + void get(char *buf,unsigned int len) + { +@@ -37,7 +37,7 @@ + + char buf[512]; + +-void copy(uint32 len) ++void copy(uint32_t len) + { + unsigned int x; + +@@ -50,7 +50,7 @@ + } + } + +-void getnum(uint32 *num) ++void getnum(uint32_t *num) + { + get(buf,4); + uint32_unpack(buf,num); +@@ -60,9 +60,9 @@ + + main() + { +- uint32 eod; +- uint32 klen; +- uint32 dlen; ++ uint32_t eod; ++ uint32_t klen; ++ uint32_t dlen; + + getnum(&eod); + while (pos < 2048) getnum(&dlen); +diff -Naur cdb-0.75-orig/cdbget.c cdb-0.75/cdbget.c +--- cdb-0.75-orig/cdbget.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdbget.c 2009-01-16 19:46:17.000000000 +0100 +@@ -27,8 +27,8 @@ + { + char *key; + int r; +- uint32 pos; +- uint32 len; ++ uint32_t pos; ++ uint32_t len; + unsigned long u = 0; + + if (!*argv) die_usage(); +diff -Naur cdb-0.75-orig/cdb.h cdb-0.75/cdb.h +--- cdb-0.75-orig/cdb.h 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdb.h 2009-01-16 19:46:17.000000000 +0100 +@@ -6,26 +6,26 @@ + #include "uint32.h" + + #define CDB_HASHSTART 5381 +-extern uint32 cdb_hashadd(uint32,unsigned char); +-extern uint32 cdb_hash(char *,unsigned int); ++extern uint32_t cdb_hashadd(uint32_t,unsigned char); ++extern uint32_t cdb_hash(char *,unsigned int); + + struct cdb { + char *map; /* 0 if no map is available */ + int fd; +- uint32 size; /* initialized if map is nonzero */ +- uint32 loop; /* number of hash slots searched under this key */ +- uint32 khash; /* initialized if loop is nonzero */ +- uint32 kpos; /* initialized if loop is nonzero */ +- uint32 hpos; /* initialized if loop is nonzero */ +- uint32 hslots; /* initialized if loop is nonzero */ +- uint32 dpos; /* initialized if cdb_findnext() returns 1 */ +- uint32 dlen; /* initialized if cdb_findnext() returns 1 */ ++ uint32_t size; /* initialized if map is nonzero */ ++ uint32_t loop; /* number of hash slots searched under this key */ ++ uint32_t khash; /* initialized if loop is nonzero */ ++ uint32_t kpos; /* initialized if loop is nonzero */ ++ uint32_t hpos; /* initialized if loop is nonzero */ ++ uint32_t hslots; /* initialized if loop is nonzero */ ++ uint32_t dpos; /* initialized if cdb_findnext() returns 1 */ ++ uint32_t dlen; /* initialized if cdb_findnext() returns 1 */ + } ; + + extern void cdb_free(struct cdb *); + extern void cdb_init(struct cdb *,int fd); + +-extern int cdb_read(struct cdb *,char *,unsigned int,uint32); ++extern int cdb_read(struct cdb *,char *,unsigned int,uint32_t); + + extern void cdb_findstart(struct cdb *); + extern int cdb_findnext(struct cdb *,char *,unsigned int); +diff -Naur cdb-0.75-orig/cdb_hash.c cdb-0.75/cdb_hash.c +--- cdb-0.75-orig/cdb_hash.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdb_hash.c 2009-01-16 19:46:17.000000000 +0100 +@@ -2,15 +2,15 @@ + + #include "cdb.h" + +-uint32 cdb_hashadd(uint32 h,unsigned char c) ++uint32_t cdb_hashadd(uint32_t h,unsigned char c) + { + h += (h << 5); + return h ^ c; + } + +-uint32 cdb_hash(char *buf,unsigned int len) ++uint32_t cdb_hash(char *buf,unsigned int len) + { +- uint32 h; ++ uint32_t h; + + h = CDB_HASHSTART; + while (len) { +diff -Naur cdb-0.75-orig/cdb_make.c cdb-0.75/cdb_make.c +--- cdb-0.75-orig/cdb_make.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdb_make.c 2009-01-16 19:51:05.000000000 +0100 +@@ -19,15 +19,15 @@ + return seek_set(fd,c->pos); + } + +-static int posplus(struct cdb_make *c,uint32 len) ++static int posplus(struct cdb_make *c,uint32_t len) + { +- uint32 newpos = c->pos + len; ++ uint32_t newpos = c->pos + len; + if (newpos < len) { errno = error_nomem; return -1; } + c->pos = newpos; + return 0; + } + +-int cdb_make_addend(struct cdb_make *c,unsigned int keylen,unsigned int datalen,uint32 h) ++int cdb_make_addend(struct cdb_make *c,unsigned int keylen,unsigned int datalen,uint32_t h) + { + struct cdb_hplist *head; + +@@ -74,11 +74,11 @@ + { + char buf[8]; + int i; +- uint32 len; +- uint32 u; +- uint32 memsize; +- uint32 count; +- uint32 where; ++ uint32_t len; ++ uint32_t u; ++ uint32_t memsize; ++ uint32_t count; ++ uint32_t where; + struct cdb_hplist *x; + struct cdb_hp *hp; + +@@ -99,7 +99,7 @@ + } + + memsize += c->numentries; /* no overflow possible up to now */ +- u = (uint32) 0 - (uint32) 1; ++ u = UINT32_MAX; + u /= sizeof(struct cdb_hp); + if (memsize > u) { errno = error_nomem; return -1; } + +diff -Naur cdb-0.75-orig/cdbmake.c cdb-0.75/cdbmake.c +--- cdb-0.75-orig/cdbmake.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdbmake.c 2009-01-16 19:46:17.000000000 +0100 +@@ -41,7 +41,7 @@ + unsigned int klen; + unsigned int dlen; + unsigned int i; +- uint32 h; ++ uint32_t h; + int fd; + char ch; + +diff -Naur cdb-0.75-orig/cdb_make.h cdb-0.75/cdb_make.h +--- cdb-0.75-orig/cdb_make.h 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdb_make.h 2009-01-16 19:46:17.000000000 +0100 +@@ -8,7 +8,7 @@ + + #define CDB_HPLIST 1000 + +-struct cdb_hp { uint32 h; uint32 p; } ; ++struct cdb_hp { uint32_t h; uint32_t p; } ; + + struct cdb_hplist { + struct cdb_hp hp[CDB_HPLIST]; +@@ -19,20 +19,20 @@ + struct cdb_make { + char bspace[8192]; + char final[2048]; +- uint32 count[256]; +- uint32 start[256]; ++ uint32_t count[256]; ++ uint32_t start[256]; + struct cdb_hplist *head; + struct cdb_hp *split; /* includes space for hash */ + struct cdb_hp *hash; +- uint32 numentries; ++ uint32_t numentries; + buffer b; +- uint32 pos; ++ uint32_t pos; + int fd; + } ; + + extern int cdb_make_start(struct cdb_make *,int); + extern int cdb_make_addbegin(struct cdb_make *,unsigned int,unsigned int); +-extern int cdb_make_addend(struct cdb_make *,unsigned int,unsigned int,uint32); ++extern int cdb_make_addend(struct cdb_make *,unsigned int,unsigned int,uint32_t); + extern int cdb_make_add(struct cdb_make *,char *,unsigned int,char *,unsigned int); + extern int cdb_make_finish(struct cdb_make *); + +diff -Naur cdb-0.75-orig/cdbstats.c cdb-0.75/cdbstats.c +--- cdb-0.75-orig/cdbstats.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdbstats.c 2009-01-16 19:46:17.000000000 +0100 +@@ -28,7 +28,7 @@ + if (buffer_flush(buffer_1small) == -1) die_write(); + } + +-uint32 pos = 0; ++uint32_t pos = 0; + + void get(char *buf,unsigned int len) + { +@@ -43,7 +43,7 @@ + } + } + +-void getnum(uint32 *num) ++void getnum(uint32_t *num) + { + char buf[4]; + get(buf,4); +@@ -70,9 +70,9 @@ + + main() + { +- uint32 eod; +- uint32 klen; +- uint32 dlen; ++ uint32_t eod; ++ uint32_t klen; ++ uint32_t dlen; + seek_pos rest; + int r; + +diff -Naur cdb-0.75-orig/cdbtest.c cdb-0.75/cdbtest.c +--- cdb-0.75-orig/cdbtest.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/cdbtest.c 2009-01-16 19:46:17.000000000 +0100 +@@ -24,7 +24,7 @@ + if (buffer_flush(buffer_1small) == -1) die_write(); + } + +-uint32 pos = 0; ++uint32_t pos = 0; + + void get(char *buf,unsigned int len) + { +@@ -40,7 +40,7 @@ + } + } + +-void getnum(uint32 *num) ++void getnum(uint32_t *num) + { + char buf[4]; + get(buf,4); +@@ -68,9 +68,9 @@ + + main() + { +- uint32 eod; +- uint32 klen; +- uint32 dlen; ++ uint32_t eod; ++ uint32_t klen; ++ uint32_t dlen; + seek_pos rest; + int r; + +diff -Naur cdb-0.75-orig/Makefile cdb-0.75/Makefile +--- cdb-0.75-orig/Makefile 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/Makefile 2009-01-16 19:46:17.000000000 +0100 +@@ -298,13 +298,6 @@ + uint32.h + ./compile testzero.c + +-uint32.h: \ +-tryulong32.c compile load uint32.h1 uint32.h2 +- ( ( ./compile tryulong32.c && ./load tryulong32 && \ +- ./tryulong32 ) >/dev/null 2>&1 \ +- && cat uint32.h2 || cat uint32.h1 ) > uint32.h +- rm -f tryulong32.o tryulong32 +- + uint32_pack.o: \ + compile uint32_pack.c uint32.h + ./compile uint32_pack.c +diff -Naur cdb-0.75-orig/TARGETS cdb-0.75/TARGETS +--- cdb-0.75-orig/TARGETS 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/TARGETS 2009-01-16 19:52:06.000000000 +0100 +@@ -1,6 +1,5 @@ + load + compile +-uint32.h + cdbget.o + systype + makelib +diff -Naur cdb-0.75-orig/uint32.h cdb-0.75/uint32.h +--- cdb-0.75-orig/uint32.h 1970-01-01 01:00:00.000000000 +0100 ++++ cdb-0.75/uint32.h 2009-01-16 19:46:17.000000000 +0100 +@@ -0,0 +1,11 @@ ++#ifndef UINT32_H ++#define UINT32_H ++ ++#include <stdint.h> ++ ++extern void uint32_pack(char *,uint32_t); ++extern void uint32_pack_big(char *,uint32_t); ++extern void uint32_unpack(char *,uint32_t *); ++extern void uint32_unpack_big(char *,uint32_t *); ++ ++#endif +diff -Naur cdb-0.75-orig/uint32.h1 cdb-0.75/uint32.h1 +--- cdb-0.75-orig/uint32.h1 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/uint32.h1 1970-01-01 01:00:00.000000000 +0100 +@@ -1,11 +0,0 @@ +-#ifndef UINT32_H +-#define UINT32_H +- +-typedef unsigned int uint32; +- +-extern void uint32_pack(char *,uint32); +-extern void uint32_pack_big(char *,uint32); +-extern void uint32_unpack(char *,uint32 *); +-extern void uint32_unpack_big(char *,uint32 *); +- +-#endif +diff -Naur cdb-0.75-orig/uint32.h2 cdb-0.75/uint32.h2 +--- cdb-0.75-orig/uint32.h2 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/uint32.h2 1970-01-01 01:00:00.000000000 +0100 +@@ -1,11 +0,0 @@ +-#ifndef UINT32_H +-#define UINT32_H +- +-typedef unsigned long uint32; +- +-extern void uint32_pack(char *,uint32); +-extern void uint32_pack_big(char *,uint32); +-extern void uint32_unpack(char *,uint32 *); +-extern void uint32_unpack_big(char *,uint32 *); +- +-#endif +diff -Naur cdb-0.75-orig/uint32_pack.c cdb-0.75/uint32_pack.c +--- cdb-0.75-orig/uint32_pack.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/uint32_pack.c 2009-01-16 19:46:17.000000000 +0100 +@@ -1,6 +1,6 @@ + #include "uint32.h" + +-void uint32_pack(char s[4],uint32 u) ++void uint32_pack(char s[4],uint32_t u) + { + s[0] = u & 255; + u >>= 8; +@@ -10,7 +10,7 @@ + s[3] = u >> 8; + } + +-void uint32_pack_big(char s[4],uint32 u) ++void uint32_pack_big(char s[4],uint32_t u) + { + s[3] = u & 255; + u >>= 8; +diff -Naur cdb-0.75-orig/uint32_unpack.c cdb-0.75/uint32_unpack.c +--- cdb-0.75-orig/uint32_unpack.c 2009-01-16 19:38:41.000000000 +0100 ++++ cdb-0.75/uint32_unpack.c 2009-01-16 19:46:17.000000000 +0100 +@@ -1,8 +1,8 @@ + #include "uint32.h" + +-void uint32_unpack(char s[4],uint32 *u) ++void uint32_unpack(char s[4],uint32_t *u) + { +- uint32 result; ++ uint32_t result; + + result = (unsigned char) s[3]; + result <<= 8; +@@ -15,9 +15,9 @@ + *u = result; + } + +-void uint32_unpack_big(char s[4],uint32 *u) ++void uint32_unpack_big(char s[4],uint32_t *u) + { +- uint32 result; ++ uint32_t result; + + result = (unsigned char) s[0]; + result <<= 8; diff --git a/dev-db/cdb/metadata.xml b/dev-db/cdb/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/cdb/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/couchdb/Manifest b/dev-db/couchdb/Manifest new file mode 100644 index 000000000000..dc6daa854038 --- /dev/null +++ b/dev-db/couchdb/Manifest @@ -0,0 +1 @@ +DIST apache-couchdb-1.6.1.tar.gz 12085350 SHA256 5a601b173733ce3ed31b654805c793aa907131cd70b06d03825f169aa48c8627 SHA512 70630a27dec7281fa5bdca0601796baa28fba1d7c9975d8f38b9623bbeedd62b26081118357886c7be00b7769360238b2c99695234e13cecb15a210eb986eadc WHIRLPOOL 5776fe139db54e5ec285ef9882f5164a42a499bab312d66c0edd5314dd1915827a7cf7df02cd5df85c437bf3f70096cb101748956d639e8e80ffd0bb0b79197a diff --git a/dev-db/couchdb/couchdb-1.6.1.ebuild b/dev-db/couchdb/couchdb-1.6.1.ebuild new file mode 100644 index 000000000000..b95498072499 --- /dev/null +++ b/dev-db/couchdb/couchdb-1.6.1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib pax-utils user + +DESCRIPTION="Apache CouchDB is a distributed, fault-tolerant and schema-free document-oriented database." +HOMEPAGE="http://couchdb.apache.org/" +SRC_URI="mirror://apache/couchdb/source/${PV}/apache-${P}.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="selinux test" + +RDEPEND=">=dev-libs/icu-4.3.1:= + dev-lang/erlang[ssl] + >=dev-libs/openssl-0.9.8j:0 + >=net-misc/curl-7.18.2 + <dev-lang/spidermonkey-1.8.7 + selinux? ( sec-policy/selinux-couchdb )" + +DEPEND="${RDEPEND}" +RESTRICT=test + +S="${WORKDIR}/apache-${P}" + +pkg_setup() { + enewgroup couchdb + enewuser couchdb -1 -1 /var/lib/couchdb couchdb +} + +src_prepare() { + sed -i ./src/couchdb/priv/Makefile.* -e 's|-Werror||g' +} + +src_configure() { + econf \ + --with-erlang="${EPREFIX}"/usr/$(get_libdir)/erlang/usr/include \ + --localstatedir="${EPREFIX}"/var \ + --with-js-lib="${EPREFIX}"/usr/$(get_libdir) + # bug 296609, upstream bug #COUCHDB-621 + sed -e "s#localdocdir = /usr/share/doc/couchdb#localdocdir = "${EPREFIX}"/usr/share/doc/${PF}#" -i Makefile || die "sed failed" +} + +src_compile() { + emake + # bug 442616 + pax-mark mr src/couchdb/priv/couchjs +} + +src_test() { + emake distcheck +} + +src_install() { + emake DESTDIR="${D}" install + + fowners couchdb:couchdb \ + /var/lib/couchdb \ + /var/log/couchdb + + for f in "${ED}"/etc/couchdb/*.ini ; do + fowners root:couchdb "${f#${ED}}" + fperms 660 "${f#${ED}}" + done + fperms 664 /etc/couchdb/default.ini + + newinitd "${FILESDIR}/couchdb.init-4" couchdb + newconfd "${FILESDIR}/couchdb.conf-2" couchdb + + sed -i -e "s:LIBDIR:$(get_libdir):" "${ED}/etc/conf.d/couchdb" +} diff --git a/dev-db/couchdb/files/couchdb.conf-2 b/dev-db/couchdb/files/couchdb.conf-2 new file mode 100644 index 000000000000..94d50b35f33d --- /dev/null +++ b/dev-db/couchdb/files/couchdb.conf-2 @@ -0,0 +1,9 @@ +# Options for CouchDB + +EXEC="/usr/bin/couchdb" +COUCHDB_USER="couchdb:couchdb" +COUCHDB_PID_FILE="/var/run/couchdb/couchdb.pid" +COUCHDB_STDOUT_FILE="/dev/null" +COUCHDB_STDERR_FILE="/dev/null" +#COUCHDB_RESPAWN_TIMEOUT= +#COUCHDB_OPTIONS= diff --git a/dev-db/couchdb/files/couchdb.init-4 b/dev-db/couchdb/files/couchdb.init-4 new file mode 100644 index 000000000000..7c78eeb99039 --- /dev/null +++ b/dev-db/couchdb/files/couchdb.init-4 @@ -0,0 +1,17 @@ +#!/sbin/runscript +# Copyright 1999-2013 Dirkjan Ochtman +# Distributed under the terms of the Apache License, Version 2.0 + +pidfile=${COUCHDB_PID_FILE} +command=${EXEC:-/usr/bin/couchdb} +command_args="-b -o ${COUCHDB_STDOUT_FILE} -e ${COUCHDB_STDERR_FILE} -p ${pidfile} ${COUCHDB_OPTIONS}" + +start_stop_daemon_args="--user ${COUCHDB_USER}" + +depend() { + need net +} + +start_pre() { + checkpath -q -d -m 0755 -o ${COUCHDB_USER} /var/run/couchdb +} diff --git a/dev-db/couchdb/metadata.xml b/dev-db/couchdb/metadata.xml new file mode 100644 index 000000000000..2ba6aefc792e --- /dev/null +++ b/dev-db/couchdb/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>djc@gentoo.org</email> +</maintainer> +</pkgmetadata> diff --git a/dev-db/cppdb/Manifest b/dev-db/cppdb/Manifest new file mode 100644 index 000000000000..20de58c2fd47 --- /dev/null +++ b/dev-db/cppdb/Manifest @@ -0,0 +1 @@ +DIST cppdb-0.3.1.tar.bz2 251449 SHA256 d60eef5a732d8f84ef5e4a2845a8cefc543a6c75bf3782589c2cf6aa150b992e SHA512 19e60becbffef7a252eda5fdd5821b44c2eeb5d69e84cf46e89ed6af3cea315f3cfe7b2cc4f62fbe154be8abdad3363761dd0252f94671421010273eeae65678 WHIRLPOOL 71ab865ef7ffeae43ec8c7278553225ab0b6ccddc8355213a60ab77c835af569d157c77ff417e651754c3f34187b516f6e16fb982321de8701fa60619e19b77d diff --git a/dev-db/cppdb/cppdb-0.3.1-r1.ebuild b/dev-db/cppdb/cppdb-0.3.1-r1.ebuild new file mode 100644 index 000000000000..898c97ded801 --- /dev/null +++ b/dev-db/cppdb/cppdb-0.3.1-r1.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils multilib + +DESCRIPTION="An SQL connectivity library for platform and database independent connectivity" +HOMEPAGE="http://cppcms.com/sql/cppdb/" +SRC_URI="mirror://sourceforge/cppcms/${P}.tar.bz2" + +LICENSE="|| ( Boost-1.0 MIT )" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples mysql mysql_internal odbc odbc_internal postgres postgres_internal sqlite sqlite_internal" + +DEPEND=" + mysql? ( virtual/mysql ) + odbc? ( dev-db/unixODBC ) + postgres? ( dev-db/postgresql ) + sqlite? ( dev-db/sqlite:3 )" +RDEPEND="${DEPEND}" + +src_configure() { + local mycmakeargs=" + $(cmake-utils_use_disable mysql MYSQL) + $(cmake-utils_use mysql_internal MYSQL_BACKEND_INTERNAL) + $(cmake-utils_use_disable odbc ODBC) + $(cmake-utils_use odbc_internal ODBC_BACKEND_INTERNAL) + $(cmake-utils_use_disable postgres PQ) + $(cmake-utils_use postgres_internal PQ_BACKEND_INTERNAL) + $(cmake-utils_use_disable sqlite SQLITE) + $(cmake-utils_use sqlite_internal SQLITE_BACKEND_INTERNAL) + -DLIBDIR=$(get_libdir)" + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + if use doc; then + rm docs/build.txt || die + dodoc -r docs/* + dohtml -r html/* + fi + if use examples; then + insinto /usr/share/doc/${PF} + doins -r examples + fi +} diff --git a/dev-db/cppdb/metadata.xml b/dev-db/cppdb/metadata.xml new file mode 100644 index 000000000000..9b20d66e9865 --- /dev/null +++ b/dev-db/cppdb/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jauhien@gentoo.org</email> + <name>Jauhien Piatlicki</name> + </maintainer> + <use> + <flag name="mysql_internal">Don't build a separate mysql loadable module but rather build it into the cppdb library itself</flag> + <flag name="odbc_internal">Don't build a separate postgresql loadable module but rather build it into the cppdb library itself</flag> + <flag name="postgres_internal">Don't build a separate odbc loadable module but rather build it into the cppdb library itself</flag> + <flag name="sqlite_internal">Don't build a separate sqlite3 loadable module but rather build it into the cppdb library itself</flag> + </use> + <upstream> + <remote-id type="sourceforge">cppcms</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/ctdb/Manifest b/dev-db/ctdb/Manifest new file mode 100644 index 000000000000..1a26634710b2 --- /dev/null +++ b/dev-db/ctdb/Manifest @@ -0,0 +1 @@ +DIST ctdb-1.13.tar.xz 736004 SHA256 c43693877cbc7d047d8b11b01a101bee69df6a871ab397214cc68d8f6f8c98c7 SHA512 653e1d5c29962810353d6b8c5867d07bef17dd5bf431f7304793f13712bb92379fb1b05b6e461279b08e0a1c9d87951f57fb1e2c35f85392b99baadf7d232ece WHIRLPOOL 9323de35b038a920ed6d5ed3be379c7c2ec93814f0f8c4f304de36e2512f58f7a62578ecd257d4fbe4e856c6d0b196fae88e7fbf673e47bbfd2acf0f2ac13b6b diff --git a/dev-db/ctdb/ctdb-1.13-r1.ebuild b/dev-db/ctdb/ctdb-1.13-r1.ebuild new file mode 100644 index 000000000000..7088d007aa9f --- /dev/null +++ b/dev-db/ctdb/ctdb-1.13-r1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils multilib-minimal + +DESCRIPTION="A cluster implementation of the TDB database used to store temporary data" +HOMEPAGE="http://ctdb.samba.org/" +# upstream is too sexy for releases, grab tags from: +# http://git.samba.org/?p=ctdb.git;a=summary +SRC_URI="http://dev.gentooexperimental.org/~scarabeus/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 ~s390 ~sh sparc x86" +IUSE="" + +DEPEND=">=dev-libs/popt-1.16-r2[${MULTILIB_USEDEP}]" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${P}-ldflags.patch" +) + +src_prepare() { + epatch "${PATCHES[@]}" + epatch_user + + # custom, broken Makefile + multilib_copy_sources +} + +multilib_src_configure() { + econf \ + --docdir="${EPREFIX}/usr/share/doc/${PF}" \ + --localstatedir="${EPREFIX}/var/lib" \ + --with-logdir="${EPREFIX}/var/log/${PN}" +} + +multilib_src_install_all() { + einstalldocs + dohtml web/* doc/*.html +} diff --git a/dev-db/ctdb/ctdb-9999.ebuild b/dev-db/ctdb/ctdb-9999.ebuild new file mode 100644 index 000000000000..1e9d6f4f1775 --- /dev/null +++ b/dev-db/ctdb/ctdb-9999.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +EGIT_REPO_URI="git://git.samba.org/ctdb.git" +inherit autotools eutils git-2 multilib-minimal + +DESCRIPTION="A cluster implementation of the TDB database used to store temporary data" +HOMEPAGE="http://ctdb.samba.org/" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="" +IUSE="" + +DEPEND=">=dev-libs/popt-1.16-r2[${MULTILIB_USEDEP}]" +RDEPEND="${DEPEND}" + +src_prepare() { + AT_M4DIR="-I libreplace -I lib/replace -I ../libreplace -I ../replace" + AT_M4DIR+=" -I lib/talloc -I talloc -I ../talloc" + AT_M4DIR+=" -I lib/tdb -I tdb -I ../tdb" + AT_M4DIR+=" -I lib/popt -I popt -I ../popt" + AT_M4DIR+=" -I lib/tevent" + + rm -rf autom4te.cache + rm -f configure config.h.in + + autotools_run_tool autoheader ${AT_M4DIR} || die "running autoheader failed" + eautoconf ${AT_M4DIR} +} + +src_prepare() { + epatch "${PATCHES[@]}" + epatch_user + + # custom, broken Makefile + multilib_copy_sources +} + +multilib_src_configure() { + econf \ + --docdir="${EPREFIX}/usr/share/doc/${PF}" \ + --localstatedir="${EPREFIX}/var/lib" \ + --with-logdir="${EPREFIX}/var/log/${PN}" +} + +multilib_src_install_all() { + einstalldocs + dohtml web/* doc/*.html +} diff --git a/dev-db/ctdb/files/autoconf-2.62-fix.patch b/dev-db/ctdb/files/autoconf-2.62-fix.patch new file mode 100644 index 000000000000..2f5bc2b77f37 --- /dev/null +++ b/dev-db/ctdb/files/autoconf-2.62-fix.patch @@ -0,0 +1,15 @@ +--- lib/replace/autoconf-2.60.m4.orig 2008-04-19 00:26:33.000000000 -0400 ++++ lib/replace/autoconf-2.60.m4 2008-04-19 00:22:25.000000000 -0400 +@@ -179,6 +179,7 @@ + # ------------------------ + # Enable extensions on systems that normally disable them, + # typically due to standards-conformance issues. ++m4_ifndef([AC_USE_SYSTEM_EXTENSIONS],[ + AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], + [ + AC_BEFORE([$0], [AC_COMPILE_IFELSE]) +@@ -208,3 +209,4 @@ + AC_DEFINE([__EXTENSIONS__]) + AC_DEFINE([_POSIX_PTHREAD_SEMANTICS]) + ]) ++]) diff --git a/dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch b/dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch new file mode 100644 index 000000000000..c70350c110ab --- /dev/null +++ b/dev-db/ctdb/files/ctdb-1.0.114_p1-functions.patch @@ -0,0 +1,77 @@ +diff -Naur ctdb-1.0.114.orig/config/functions ctdb-1.0.114/config/functions +--- ctdb-1.0.114.orig/config/functions 2010-04-04 18:01:18.278707515 +0200 ++++ ctdb-1.0.114/config/functions 2010-04-04 18:08:05.792447032 +0200 +@@ -22,6 +22,8 @@ + . /etc/default/$1 + elif [ -f $CTDB_BASE/sysconfig/$1 ]; then + . $CTDB_BASE/sysconfig/$1 ++ elif [ -f /etc/config.d/$1 ]; then ++ . /etc/config.d/$name + fi + } + +@@ -33,6 +35,8 @@ + + if [ -x /sbin/startproc ]; then + CTDB_INIT_STYLE="suse" ++ elif [ -x /bin/rc-status ] ; then ++ CTDB_INIT_STYLE="gentoo" + elif [ -x /sbin/start-stop-daemon ]; then + CTDB_INIT_STYLE="debian" + else +@@ -356,6 +360,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -380,6 +387,16 @@ + ;; + esac + ;; ++ gentoo) ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS is not supported with ctdb" + exit 1 +@@ -398,6 +415,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -422,6 +442,18 @@ + ;; + esac + ;; ++ gentoo) ++ # for gentoo there is no service for lockmanager ++ # so we instead just shutdown/restart nfs ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS locking is not supported with ctdb" + exit 1 diff --git a/dev-db/ctdb/files/ctdb-1.13-ldflags.patch b/dev-db/ctdb/files/ctdb-1.13-ldflags.patch new file mode 100644 index 000000000000..d5662cadf0c0 --- /dev/null +++ b/dev-db/ctdb/files/ctdb-1.13-ldflags.patch @@ -0,0 +1,21 @@ +diff -urN ctdb-1.13.old/Makefile.in ctdb-1.13/Makefile.in +--- ctdb-1.13.old/Makefile.in 2012-03-23 11:30:03.321735210 +0100 ++++ ctdb-1.13/Makefile.in 2012-03-23 11:37:03.131704144 +0100 +@@ -151,7 +151,7 @@ + + bin/ltdbtool: tools/ltdbtool.o @TDB_OBJ@ + @echo Linking $@ +- @$(CC) $(CFLAGS) -o $@ $+ ++ @$(CC) $(CFLAGS) -o $@ $+ $(LIB_FLAGS) + + bin/smnotify: utils/smnotify/gen_xdr.o utils/smnotify/gen_smnotify.o utils/smnotify/smnotify.o $(POPT_OBJ) + @echo Linking $@ +@@ -173,7 +173,7 @@ + + bin/ping_pong: utils/ping_pong/ping_pong.o + @echo Linking $@ +- @$(CC) $(CFLAGS) -o $@ utils/ping_pong/ping_pong.o ++ @$(CC) $(CFLAGS) -o $@ utils/ping_pong/ping_pong.o $(LIB_FLAGS) + + bin/pmdactdb: $(CTDB_CLIENT_OBJ) utils/pmda/pmda_ctdb.o + @echo Linking $@ diff --git a/dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch b/dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch new file mode 100644 index 000000000000..6865d899a12d --- /dev/null +++ b/dev-db/ctdb/files/ctdb-41.httpd_gentoo.patch @@ -0,0 +1,13 @@ +--- ./config/events.d/41.httpd 2009-05-29 14:19:30.741662868 +0100 ++++ ./config/events.d/41.httpd 2009-07-28 18:31:48.016042964 +0100 +@@ -19,6 +19,10 @@ + CTDB_SERVICE_HTTP="apache2" + CTDB_CONFIG_HTTP="apache2" + ;; ++ gentoo) ++ CTDB_SERVICE_HTTP="apache2" ++ CTDB_CONFIG_HTTP="apache2" ++ ;; + *) + # should not happen. + # for now use red hat style as default diff --git a/dev-db/ctdb/files/ctdb-50.samba_gentoo.patch b/dev-db/ctdb/files/ctdb-50.samba_gentoo.patch new file mode 100644 index 000000000000..fdd68ffc8d92 --- /dev/null +++ b/dev-db/ctdb/files/ctdb-50.samba_gentoo.patch @@ -0,0 +1,14 @@ +--- ./config/events.d/50.samba 2009-05-29 14:19:30.741662868 +0100 ++++ ./config/events.d/50.samba 2009-07-28 18:27:21.896042994 +0100 +@@ -25,6 +25,11 @@ + CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""} + CTDB_SERVICE_WINBIND=${CTDB_SERVICE_WINBIND:-winbind} + ;; ++ gentoo) ++ CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-samba} ++ CTDB_SERVICE_NMB=${CTDB_SERVICE_NMB:-""} ++ CTDB_SERVICE_WINBIND=${CTDB_SERVICE_WINBIND:-""} ++ ;; + *) + # should not happen, but for now use redhat style as default: + CTDB_SERVICE_SMB=${CTDB_SERVICE_SMB:-smb} diff --git a/dev-db/ctdb/files/ctdb-functions.patch b/dev-db/ctdb/files/ctdb-functions.patch new file mode 100644 index 000000000000..61eda720d6ae --- /dev/null +++ b/dev-db/ctdb/files/ctdb-functions.patch @@ -0,0 +1,76 @@ +--- ./config/functions 2009-05-29 14:19:30.741662868 +0100 ++++ ./config/functions 2009-07-29 14:15:19.436043164 +0100 +@@ -10,6 +10,8 @@ + . /etc/default/$name + elif [ -f $CTDB_BASE/sysconfig/$name ]; then + . $CTDB_BASE/sysconfig/$name ++ elif [ -f /etc/config.d/$name ]; then ++ . /etc/config.d/$name + fi + } + +@@ -21,6 +23,8 @@ + + if [ -x /sbin/startproc ]; then + CTDB_INIT_STYLE="suse" ++ elif [ -x /bin/rc-status ]; then ++ CTDB_INIT_STYLE="gentoo" + elif [ -x /sbin/start-stop-daemon ]; then + CTDB_INIT_STYLE="ubuntu" + else +@@ -400,6 +404,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -424,6 +431,16 @@ + ;; + esac + ;; ++ gentoo) ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS is not supported with ctdb" + exit 1 +@@ -442,6 +459,9 @@ + [ -x /etc/init.d/nfslock ] && { + PLATFORM="rhel" + } ++ [ -x etc/init.d/nfs ] && { ++ PLATFORM="gentoo" ++ } + + case $PLATFORM in + sles) +@@ -466,6 +486,18 @@ + ;; + esac + ;; ++ gentoo) ++ # for gentoo there is no service for lockmanager ++ # so we instead just shutdown/restart nfs ++ case $1 in ++ start) ++ service nfs start ++ ;; ++ stop) ++ service nfs stop > /dev/null 2>&1 ++ ;; ++ esac ++ ;; + *) + echo "Unknown platform. NFS locking is not supported with ctdb" + exit 1 diff --git a/dev-db/ctdb/files/ctdb.initd b/dev-db/ctdb/files/ctdb.initd new file mode 100644 index 000000000000..ca96019e22b1 --- /dev/null +++ b/dev-db/ctdb/files/ctdb.initd @@ -0,0 +1,81 @@ +#!/sbin/runscript + +depend() { + need localmount + need net + before samba + after bootmisc +} + +start() { + ebegin "Starting ctdb" + + [ -z "$CTDB_RECOVERY_LOCK" ] && { + eerror "You must configure the location of the CTDB_RECOVERY_LOCK in /etc/conf.d/ctdb" + return 1 + } + + [ -z "$CTDB_PUBLIC_ADDRESSES" ] && { + eerror "You must configure the location of the CTDB_PUBLIC_ADDRESSES in /etc/conf.d/ctdb" + return 1 + } + + [ -z "$CTDB_PUBLIC_INTERFACE" ] && { + eerror "You must configure the location of the CTDB_PUBLIC_INTERFACE in /etc/conf.d/ctdb" + return 1 + } + + CTDB_OPTIONS="$CTDB_OPTIONS --reclock=$CTDB_RECOVERY_LOCK" + + # build up CTDB_OPTIONS variable from optional parameters + [ -z "$CTDB_LOGFILE" ] || CTDB_OPTIONS="$CTDB_OPTIONS --logfile=$CTDB_LOGFILE" + [ -z "$CTDB_NODES" ] || CTDB_OPTIONS="$CTDB_OPTIONS --nlist=$CTDB_NODES" + [ -z "$CTDB_SOCKET" ] || CTDB_OPTIONS="$CTDB_OPTIONS --socket=$CTDB_SOCKET" + [ -z "$CTDB_PUBLIC_ADDRESSES" ] || CTDB_OPTIONS="$CTDB_OPTIONS --public-addresses=$CTDB_PUBLIC_ADDRESSES" + [ -z "$CTDB_PUBLIC_INTERFACE" ] || CTDB_OPTIONS="$CTDB_OPTIONS --public-interface=$CTDB_PUBLIC_INTERFACE" + [ -z "$CTDB_SINGLE_PUBLIC_IP" ] || CTDB_OPTIONS="$CTDB_OPTIONS --single-public-ip=$CTDB_SINGLE_PUBLIC_IP" + [ -z "$CTDB_DBDIR" ] || CTDB_OPTIONS="$CTDB_OPTIONS --dbdir=$CTDB_DBDIR" + [ -z "$CTDB_DBDIR_PERSISTENT" ] || CTDB_OPTIONS="$CTDB_OPTIONS --dbdir-persistent=$CTDB_DBDIR_PERSISTENT" + [ -z "$CTDB_EVENT_SCRIPT_DIR" ] || CTDB_OPTIONS="$CTDB_OPTIONS --event-script-dir $CTDB_EVENT_SCRIPT_DIR" + [ -z "$CTDB_TRANSPORT" ] || CTDB_OPTIONS="$CTDB_OPTIONS --transport $CTDB_TRANSPORT" + [ -z "$CTDB_DEBUGLEVEL" ] || CTDB_OPTIONS="$CTDB_OPTIONS -d $CTDB_DEBUGLEVEL" + [ -z "$CTDB_START_AS_DISABLED" ] || [ "$CTDB_START_AS_DISABLED" != "yes" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --start-as-disabled" + } + [ -z "$CTDB_CAPABILITY_RECMASTER" ] || [ "$CTDB_CAPABILITY_RECMASTER" != "no" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --no-recmaster" + } + [ -z "$CTDB_CAPABILITY_LMASTER" ] || [ "$CTDB_CAPABILITY_LMASTER" != "no" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --no-lmaster" + } + [ -z "$CTDB_LVS_PUBLIC_IP" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --lvs" + } + [ -z "$CTDB_SCRIPT_LOG_LEVEL" ] || { + CTDB_OPTIONS="$CTDB_OPTIONS --script-log-level=$CTDB_SCRIPT_LOG_LEVEL" + } + + # check all persistent databases that they look ok + PERSISTENT_DB_DIR="/var/ctdb/persistent" + [ -z "$CTDB_DBDIR" ] || { + PERSISTENT_DB_DIR="$CTDB_DBDIR/persistent" + } + mkdir -p $PERSISTENT_DB_DIR 2>/dev/null + for PDBASE in `ls $PERSISTENT_DB_DIR/*.tdb.[0-9] 2>/dev/null`; do + /usr/bin/tdbdump $PDBASE >/dev/null 2>/dev/null || { + eerror "Persistent database $PDBASE is corrupted! CTDB will not start." + return 1 + } + done + + start-stop-daemon --start --background --exec /usr/sbin/ctdbd \ + --pidfile /var/run/ctdbd.pid -- $CTDB_OPTIONS + eend $? + +} + +stop() { + start-stop-daemon --stop --exec /usr/sbin/ctdbd \ + --pidfile /var/run/ctdbd.pid +} + diff --git a/dev-db/ctdb/metadata.xml b/dev-db/ctdb/metadata.xml new file mode 100644 index 000000000000..587dabd73f1d --- /dev/null +++ b/dev-db/ctdb/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>samba</herd> +</pkgmetadata> diff --git a/dev-db/datadraw/Manifest b/dev-db/datadraw/Manifest new file mode 100644 index 000000000000..5d8cca4454db --- /dev/null +++ b/dev-db/datadraw/Manifest @@ -0,0 +1 @@ +DIST datadraw3.1.1.tar.gz 607914 SHA256 11186bbf37f9b5bb11d7a21bc5ce6c45496b24dfa62a064d57d3ad414f4a9c04 SHA512 64773b984cb9d6928ec486833ee03f07c6c5f21dcfcc446e21fe90eb432b7a09459ea65e24c46df70bc6b791dfc640caf16b6f6cdd8a35319969bb8ec7e65009 WHIRLPOOL e4af7bcf81cf52c1743273ca2c09de7435066fd194a0ee5235171de2876acf865db951fe432e7e0cefd34af98902a242fa9906054d4b5fe9df6b7daa890128dc diff --git a/dev-db/datadraw/datadraw-3.1.1.ebuild b/dev-db/datadraw/datadraw-3.1.1.ebuild new file mode 100644 index 000000000000..d5938f24b1be --- /dev/null +++ b/dev-db/datadraw/datadraw-3.1.1.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit multilib toolchain-funcs + +DESCRIPTION="feature rich database generator for high performance C applications" +HOMEPAGE="http://datadraw.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${PN}/${PN}${PV}/${PN}${PV}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc examples" + +DEPEND="" +RDEPEND="" + +S=${WORKDIR}/${PN}${PV} + +src_prepare() { + tc-export CC + sed -e "/^CFLAGS=/s:-g -Wall:${CFLAGS}:" \ + -i configure \ + -i dataview/configure \ + -i util/configure || die + + sed -e '/^datadraw:/,+2s:\\$(CFLAGS):\\$(CFLAGS) \\$(LDFLAGS):' \ + -i configure || die +} + +src_install() { + dobin ${PN} + + insinto /usr/$(get_libdir) + for lib in util/*.a ; do + newins ${lib} lib$(basename ${lib}) + done + insinto /usr/include + + doins util/*.h + + dodoc README + if use doc ; then + dodoc manual.pdf + dohtml -r www/index.html www/images + fi + use examples && dodoc -r examples +} diff --git a/dev-db/datadraw/metadata.xml b/dev-db/datadraw/metadata.xml new file mode 100644 index 000000000000..d2893a9317a8 --- /dev/null +++ b/dev-db/datadraw/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci-electronics</herd> +<maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> +</maintainer> +<upstream> + <remote-id type="sourceforge">datadraw</remote-id> +</upstream> +<longdescription lang="en"> +DataDraw is a feature rich database generator for high performance C applications. DataDraw gives your C application a high performance object-oriented framework at speeds that beat hand coded C. +</longdescription> +</pkgmetadata> + diff --git a/dev-db/db-je/Manifest b/dev-db/db-je/Manifest new file mode 100644 index 000000000000..c563a83e11d2 --- /dev/null +++ b/dev-db/db-je/Manifest @@ -0,0 +1 @@ +DIST je-3.3.75.tar.gz 5179709 SHA256 98bb5b374eac336329e4bb87f537355ba5128e697f2bfea5904eba46a5f1ee08 SHA512 e28648459a3a7dcf98e8865e6859544c656c3b58688b244df568cc8c006a74dda79aadfbfb279e099c1376914cca064734da490998a864c1bd2cc3209bc64ae4 WHIRLPOOL a86747a5a30444847e666fd82bd397ead06b4597200b82ce7e88301e6e8531faf267b1cebf2850bfc072916a3a1b903fe35012466a44a5c6bd5311cbce43455b diff --git a/dev-db/db-je/db-je-3.3.75.ebuild b/dev-db/db-je/db-je-3.3.75.ebuild new file mode 100644 index 000000000000..2fa03b917ce8 --- /dev/null +++ b/dev-db/db-je/db-je-3.3.75.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Berkeley DB JE is a high performance, transactional storage engine written entirely in Java" +HOMEPAGE="http://www.oracle.com/database/berkeley-db/je/index.html" +SRC_URI="http://download.oracle.com/berkeley-db/${P/db-/}.tar.gz" + +LICENSE="Sleepycat BSD" +SLOT="3.3" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND=">=virtual/jdk-1.5" +RDEPEND=">=virtual/jre-1.5" +S=${WORKDIR}/${P/db-/} + +src_unpack() { + unpack ${A} + cd "${S}" || die + epatch "${FILESDIR}"/${P}-optional-test.patch + rm -rf docs + cd lib || die + rm -v *jar || die + java-pkg_jar-from --build-only ant-core ant.jar +} + +EANT_DOC_TARGET="javadoc-all" +EANT_EXTRA_ARGS="-Dnotest=true" + +src_install() { + java-pkg_dojar build/lib/je.jar + use doc && java-pkg_dojavadoc docs + use source && java-pkg_dosrc src/com +} diff --git a/dev-db/db-je/files/db-je-3.3.75-optional-test.patch b/dev-db/db-je/files/db-je-3.3.75-optional-test.patch new file mode 100644 index 000000000000..e8f7600398e2 --- /dev/null +++ b/dev-db/db-je/files/db-je-3.3.75-optional-test.patch @@ -0,0 +1,45 @@ +--- build.xml 2008-06-11 05:25:20.000000000 +0200 ++++ build.xml.new 2008-08-22 15:59:53.000000000 +0200 +@@ -102,6 +102,7 @@ + <path id="empty.classpath"/> + + <path id="class.path"> ++ <fileset dir="lib" includes="*.jar"/> + <pathelement location="${specificjar}"/> + <pathelement location="."/> + </path> +@@ -487,14 +488,14 @@ + <!-- JUnit unit tests --> + <!-- ============================================================ --> + +- <target name="init-unittest" depends="init"> ++ <target name="init-unittest" depends="init" unless="notest"> + <delete dir="${unittest.datadir}"/> + <delete dir="${unittest.reportsdir}"/> + <mkdir dir="${unittest.datadir}"/> + <mkdir dir="${unittest.reportsdir}"/> + </target> + +- <target name="clean-unittest" depends="init-unittest"> ++ <target name="clean-unittest" depends="init-unittest" unless="notest"> + <delete dir="${unittest.destdir}"/> + <mkdir dir="${unittest.destdir}"/> + <delete dir="${unittest.testserialdir}"/> +@@ -503,7 +504,7 @@ + <mkdir dir="${unittest.testevolvedir}"/> + </target> + +- <target name="compile-unittest" depends="compile-src"> ++ <target name="compile-unittest" depends="compile-src" unless="notest"> + <ant antfile="ant/compile.xml" dir="." inheritall="false"> + <property name="srcdir" value="${unittest.srcdir}"/> + <property name="destdir" value="${unittest.destdir}"/> +@@ -597,7 +598,7 @@ + </path> + + <target name="test" +- depends="compile-unittest, init-unittest, jar"> ++ depends="compile-unittest, init-unittest, jar" unless="notest"> + + <!-- Determine which tests to run. --> + <condition property="alltests"> diff --git a/dev-db/db-je/metadata.xml b/dev-db/db-je/metadata.xml new file mode 100644 index 000000000000..59b15e8a41aa --- /dev/null +++ b/dev-db/db-je/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>tommy@gentoo.org</email> + <name>Thomas Sachau (Tommy[D])</name> + </maintainer> +<herd>java</herd> +</pkgmetadata> + diff --git a/dev-db/dbmodel/Manifest b/dev-db/dbmodel/Manifest new file mode 100644 index 000000000000..bdd0b42f9ee1 --- /dev/null +++ b/dev-db/dbmodel/Manifest @@ -0,0 +1 @@ +DIST dbmodel-0.3.tar.gz 71581 SHA256 2e44e33690c1f290a7ed0cab86b51804fd09862332de1dae909149c9b1b1a6b2 SHA512 61c7b39bd57c1d6ff49961b35073c7205862b2e1d6a93b3c8950a62ce6c0e1ce8f39a38ed729174714f719cd92d0e6deba51c68b20ba22888f7d7f7096c05f62 WHIRLPOOL 72d1c09e7e62867a99e95c737cf8c02b6e22902df343c57f2859f08cc7ddbe39d952b04e897fd2d34790e973b9c6689647bc0aa04868a347cd68e070d8ab0cb8 diff --git a/dev-db/dbmodel/dbmodel-0.3.ebuild b/dev-db/dbmodel/dbmodel-0.3.ebuild new file mode 100644 index 000000000000..8c8f74663b58 --- /dev/null +++ b/dev-db/dbmodel/dbmodel-0.3.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit qt4-r2 + +DESCRIPTION="Qt4 tool for drawing entity-relational diagrams" +HOMEPAGE="http://oxygene.sk/lukas/dbmodel/" +SRC_URI="http://launchpad.net/dbmodel/trunk/${PV}/+download/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug" + +DEPEND="dev-qt/qtgui:4 + dev-qt/qtsvg:4" +RDEPEND="${DEPEND}" + +DOCS="AUTHORS CHANGES" + +src_configure() { + eqmake4 ${PN}.pro PREFIX=/usr +} diff --git a/dev-db/dbmodel/metadata.xml b/dev-db/dbmodel/metadata.xml new file mode 100644 index 000000000000..28176899696a --- /dev/null +++ b/dev-db/dbmodel/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>qt</herd> + <longdescription lang="en"> +</longdescription> + <upstream> + <remote-id type="launchpad">dbmodel</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/derby/Manifest b/dev-db/derby/Manifest new file mode 100644 index 000000000000..5ae34c8f65f8 --- /dev/null +++ b/dev-db/derby/Manifest @@ -0,0 +1 @@ +DIST db-derby-10.10.1.1-src.tar.gz 24152897 SHA256 4e5d5ec1389ab8ff7425d2e4ade4c16d47e433d8bd50c3aedbe4de26a31f0cc5 SHA512 0e8ac005d8e18d7615515bf1928e8fefd2547017923084c06647d27f20d5599985b03c52e77856fe2db08e78f103dbe695820145a3f4358527512d050da06dde WHIRLPOOL 9f62165ab05c64ccfb4306fe38370d2800bbdd16eef677f2cc8c6365f984f765e7cfe785676caf6a3b4e6d6628de52ba6b8bcc96254a24ba102817a914fc8650 diff --git a/dev-db/derby/derby-10.10.1.1.ebuild b/dev-db/derby/derby-10.10.1.1.ebuild new file mode 100644 index 000000000000..84169884615b --- /dev/null +++ b/dev-db/derby/derby-10.10.1.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +JAVA_PKG_IUSE="doc source test" +JAVA_PKG_BSFIX="off" + +inherit java-pkg-2 java-ant-2 + +MY_P=db-${P} +DESCRIPTION="An embeddable relational database implemented entirely in Java" +HOMEPAGE="http://db.apache.org/derby/" +SRC_URI="mirror://apache/db/${PN}/${MY_P}/${MY_P}-src.tar.gz" + +LICENSE="Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="linguas_de linguas_es linguas_fr linguas_hu linguas_it linguas_ja linguas_ko linguas_pl linguas_pt linguas_ru linguas_zh" + +LANGS="de es fr hu it ja ko pl pt ru zh" + +# see https://issues.apache.org/jira/browse/DERBY-5125 +DEPEND=">=virtual/jdk-1.6 + <dev-java/javacc-4.2:0 + test? ( dev-java/jakarta-oro:2.0 ) + " +RDEPEND=">=virtual/jre-1.6 + ${CDEPEND}" + +S="${WORKDIR}/${MY_P}-src" + +EANT_BUILD_TARGET="buildsource buildjars" +EANT_TEST_TARGET="testing" + +java_prepare() { + find tools/java -name "*.jar" -exec rm -v {} \; || die + cd tools/java || die + + java-pkg_jar-from --build-only javacc + use test && java-pkg_jar-from --build-only jakarta-oro:2.0 jakarta-oro.jar jakarta-oro-2.0.8.jar +} + +src_install() { + strip-linguas ${LANGS} + local LOCALE_JARS="${LINGUAS// /,}" + + java-pkg_dojar jars/sane/derby{,run,net,tools,client}.jar + + for x in ${LINGUAS}; do + java-pkg_dojar jars/sane/derbyLocale_${x}*.jar + done + + java-pkg_dowar jars/sane/derby.war + + dodoc README STATUS KEYS NOTICE || die "docs failed" + dohtml -r {RELEASE-NOTES,published_api_overview}.html || die "docs failed" + + use doc && java-pkg_dojavadoc javadoc + use source && java-pkg_dosrc java/ +} + +src_test() { + java-pkg-2_src_test +} diff --git a/dev-db/derby/metadata.xml b/dev-db/derby/metadata.xml new file mode 100644 index 000000000000..4128863055b4 --- /dev/null +++ b/dev-db/derby/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>ercpe@gentoo.org</email> + <name>Johann Schmitz (ercpe)</name> + </maintainer> +</pkgmetadata> + diff --git a/dev-db/drizzle/Manifest b/dev-db/drizzle/Manifest new file mode 100644 index 000000000000..684b6fc0ca74 --- /dev/null +++ b/dev-db/drizzle/Manifest @@ -0,0 +1 @@ +DIST drizzle-7.2.4-alpha.tar.gz 20075673 SHA256 dddc58949c28ccbdd8351b25540858235a7d98efb634e7bc98abd4f5ab034677 SHA512 1053c9b73588542b32398168fc4aae96a19479222571fb4ba35feb1fa6e99961366fc63a4141bf86bdba7f5db1960ed895b3a688789d05ee8d4bd46d0ab681cd WHIRLPOOL 4b2e97f7276eb447f27bc5b0244e31d47cba2acc0fde16d6e10dc0d47ba680885e035b9cf9dda8dff171279a76fbd24f34d2754ac1342b203d56316bb4d34233 diff --git a/dev-db/drizzle/drizzle-7.2.4.ebuild b/dev-db/drizzle/drizzle-7.2.4.ebuild new file mode 100644 index 000000000000..d7eb1687552f --- /dev/null +++ b/dev-db/drizzle/drizzle-7.2.4.ebuild @@ -0,0 +1,168 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit python flag-o-matic libtool autotools eutils pam user versionator + +MY_P="${P}-alpha" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Database optimized for Cloud and Net applications" +HOMEPAGE="http://drizzle.org" +SRC_URI="http://launchpad.net/drizzle/$(get_version_component_range 1-2)/${PV}/+download/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug tcmalloc doc memcache curl pam gearman +md5 ldap v8" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + sys-libs/readline + sys-apps/util-linux + dev-libs/libpcre + dev-libs/openssl + >=dev-libs/libevent-1.4 + >=dev-libs/protobuf-2.1.0 + dev-libs/libaio + >=dev-libs/boost-1.52.0-r1:=[threads] + gearman? ( >=sys-cluster/gearmand-0.12 ) + pam? ( sys-libs/pam ) + curl? ( net-misc/curl ) + memcache? ( >=dev-libs/libmemcached-0.39 ) + md5? ( >=dev-libs/libgcrypt-1.4.2:0 ) + ldap? ( net-nds/openldap ) + v8? ( dev-lang/v8 ) + !dev-db/libdrizzle" + +DEPEND="${RDEPEND} + =dev-lang/python-2* + sys-devel/gettext + dev-util/intltool + dev-util/gperf + sys-devel/flex + dev-python/sphinx + doc? ( app-doc/doxygen )" + +pkg_setup() { + enewuser drizzle -1 -1 /dev/null nogroup + python_set_active_version 2 + python_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}/${PN}-7.2.3-libtool.patch" \ + "${FILESDIR}/${PN}-7.2.3+automake-1.12.patch" \ + "${FILESDIR}/${PN}-7.2.4+boost-1.50.patch" \ + "${FILESDIR}/${P}-fix-boost_thread-detection.patch" + + python_convert_shebangs -r 2 . + + epatch_user + eautoreconf +} + +src_configure() { + local myconf= + + if use debug; then + append-cppflags -DDEBUG + fi + + # while I applaud upstreams goal of 0 compiler warnings + # the 1412 release didn't achieve it. + append-flags -Wno-error + + # NOTE disable-all and without-all no longer recognized options + # NOTE using --enable on some plugins can cause test failures. + # --with should be used instead. A discussion about this here: + # https://bugs.launchpad.net/drizzle/+bug/598659 + # TODO (upstream) + # $(use_with memcache memcached-stats-plugin) \ + # $(use_with memcache memcached-functions-plugin) \ + + econf \ + --disable-static \ + --disable-dependency-tracking \ + --disable-mtmalloc \ + --without-hello-world-plugin \ + --disable-rabbitmq-plugin --without-rabbitmq-plugin \ + --disable-zeromq-plugin --without-zeromq-plugin \ + --with-auth-test-plugin \ + --with-auth-file-plugin \ + --with-simple-user-policy-plugin \ + --enable-logging-stats-plugin \ + --with-logging-stats-plugin \ + --enable-console-plugin \ + $(use_enable gearman libgearman) \ + $(use_enable ldap libldap) \ + $(use_enable memcache libmemcached) \ + $(use_enable tcmalloc) \ + $(use_with curl auth-http-plugin) \ + $(use_with gearman gearman-udf-plugin) \ + $(use_with gearman logging-gearman-plugin) \ + $(use_with ldap auth-ldap-plugin) \ + $(use_with md5 md5-plugin) \ + $(use_with pam auth-pam-plugin) \ + $(use_with v8 js-plugin) \ + ${myconf} +} + +src_compile() { + emake V=1 all $(use doc && echo doxygen) +} + +# currently not working as of 7.2.3 +RESTRICT=test + +src_test() { + if [[ ${EUID} == 0 ]]; then + eerror "You cannot run tests as root." + eerror "Please enable FEATURES=userpriv before proceeding." + return 1 + fi + + default +} + +DOCS=( AUTHORS NEWS README ) + +src_install() { + default + + find "${D}" -name '*.la' -delete || die + + if use doc; then + docinto apidoc + pushd docs/html + dohtml -r . + popd + fi + + newinitd "${FILESDIR}"/drizzle.init.d.2 drizzled + newconfd "${FILESDIR}"/drizzle.conf.d drizzled + + if ! use gearman; then + sed -i -e '/need gearmand/d' "${D}"/etc/init.d/drizzled \ + || die "unable to sed init script (gearman)" + fi + + if ! use memcache; then + sed -i -e '/need memcached/d' "${D}"/etc/init.d/drizzled \ + || die "unable to sed init script (memcache)" + fi + + keepdir /var/log/drizzle + keepdir /var/lib/drizzle/drizzled + keepdir /etc/drizzle + + fperms 0755 /var/log/drizzle + fperms -R 0700 /var/lib/drizzle + + fowners drizzle:nogroup /var/log/drizzle + fowners -R drizzle:nogroup /var/lib/drizzle + + pamd_mimic system-auth drizzle auth account session +} diff --git a/dev-db/drizzle/files/drizzle-7.2.3+automake-1.12.patch b/dev-db/drizzle/files/drizzle-7.2.3+automake-1.12.patch new file mode 100644 index 000000000000..4f33dc557a5a --- /dev/null +++ b/dev-db/drizzle/files/drizzle-7.2.3+automake-1.12.patch @@ -0,0 +1,33 @@ +Index: drizzle-7.2.3/m4/pandora_canonical.m4 +=================================================================== +--- drizzle-7.2.3.orig/m4/pandora_canonical.m4 ++++ drizzle-7.2.3/m4/pandora_canonical.m4 +@@ -98,9 +98,9 @@ AC_DEFUN([PANDORA_CANONICAL_TARGET],[ + AC_CANONICAL_TARGET + + m4_if(PCT_DONT_SUPRESS_INCLUDE,yes,[ +- AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability subdir-objects foreign tar-ustar) ++ AM_INIT_AUTOMAKE(-Wall -Wno-portability subdir-objects foreign tar-ustar) + ],[ +- AM_INIT_AUTOMAKE(-Wall -Werror -Wno-portability nostdinc subdir-objects foreign tar-ustar) ++ AM_INIT_AUTOMAKE(-Wall -Wno-portability nostdinc subdir-objects foreign tar-ustar) + ]) + + m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) +Index: drizzle-7.2.3/tests/include.am +=================================================================== +--- drizzle-7.2.3.orig/tests/include.am ++++ drizzle-7.2.3/tests/include.am +@@ -101,10 +101,10 @@ EXTRA_DIST += \ + check-local: tests/var/drizzle test-drizzle + + tests/var: +- $(mkdir_p) tests/var ++ $(MKDIR_P) tests/var + + tests/var/drizzle: tests/var +- $(mkdir_p) tests/var/drizzle ++ $(MKDIR_P) tests/var/drizzle + + + # dtr - a shortcut for executing test-run.pl diff --git a/dev-db/drizzle/files/drizzle-7.2.3-libtool.patch b/dev-db/drizzle/files/drizzle-7.2.3-libtool.patch new file mode 100644 index 000000000000..609b8adfd67e --- /dev/null +++ b/dev-db/drizzle/files/drizzle-7.2.3-libtool.patch @@ -0,0 +1,13 @@ +Index: drizzle-7.2.3/libdrizzle-1.0/include.am +=================================================================== +--- drizzle-7.2.3.orig/libdrizzle-1.0/include.am ++++ drizzle-7.2.3/libdrizzle-1.0/include.am +@@ -48,7 +48,7 @@ libdrizzle_1_0_libdrizzle_la_LDFLAGS= \ + -version-info \ + $(LIBDRIZZLE_LIBRARY_VERSION) + +-libdrizzle_1_0_libdrizzle_la_LIBADD= $(LIBSSL) ++libdrizzle_1_0_libdrizzle_la_LIBADD= $(LTLIBSSL) + + libdrizzle_1_0_libdrizzle_la_SOURCES= \ + libdrizzle/column.cc \ diff --git a/dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch b/dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch new file mode 100644 index 000000000000..0b10d74020cd --- /dev/null +++ b/dev-db/drizzle/files/drizzle-7.2.4+boost-1.50.patch @@ -0,0 +1,90 @@ +Index: drizzle-7.2.4-alpha/client/drizzleslap.cc +=================================================================== +--- drizzle-7.2.4-alpha.orig/client/drizzleslap.cc ++++ drizzle-7.2.4-alpha/client/drizzleslap.cc +@@ -1934,7 +1934,7 @@ static void timer_thread() + boost::mutex::scoped_lock scopedLock(timer_alarm_mutex); + + boost::xtime xt; +- xtime_get(&xt, boost::TIME_UTC); ++ xtime_get(&xt, boost::TIME_UTC_); + xt.sec += opt_timer_length; + + (void)timer_alarm_threshold.timed_wait(scopedLock, xt); +Index: drizzle-7.2.4-alpha/configure.ac +=================================================================== +--- drizzle-7.2.4-alpha.orig/configure.ac ++++ drizzle-7.2.4-alpha/configure.ac +@@ -111,7 +111,6 @@ PANDORA_DRIZZLE_BUILD + PANDORA_HAVE_BOOST_TEST + PANDORA_HAVE_LIBSQLITE3 + +- + ######################################################################### + + +Index: drizzle-7.2.4-alpha/drizzled/drizzled.cc +=================================================================== +--- drizzle-7.2.4-alpha.orig/drizzled/drizzled.cc ++++ drizzle-7.2.4-alpha/drizzled/drizzled.cc +@@ -460,7 +460,7 @@ void close_connections() + while (select_thread_in_use) + { + boost::xtime xt; +- xtime_get(&xt, boost::TIME_UTC); ++ xtime_get(&xt, boost::TIME_UTC_); + xt.sec += 2; + + for (uint32_t tmp=0 ; tmp < 10 && select_thread_in_use; tmp++) +Index: drizzle-7.2.4-alpha/drizzled/table/cache.cc +=================================================================== +--- drizzle-7.2.4-alpha.orig/drizzled/table/cache.cc ++++ drizzle-7.2.4-alpha/drizzled/table/cache.cc +@@ -263,7 +263,7 @@ bool Cache::removeTable(Session& session + table::Cache::removeTable routine. + */ + boost::xtime xt; +- xtime_get(&xt, boost::TIME_UTC); ++ xtime_get(&xt, boost::TIME_UTC_); + xt.sec += 10; + boost::mutex::scoped_lock scoped(table::Cache::mutex(), boost::adopt_lock_t()); + COND_refresh.timed_wait(scoped, xt); +Index: drizzle-7.2.4-alpha/drizzled/thr_lock.cc +=================================================================== +--- drizzle-7.2.4-alpha.orig/drizzled/thr_lock.cc ++++ drizzle-7.2.4-alpha/drizzled/thr_lock.cc +@@ -170,7 +170,7 @@ static enum enum_thr_lock_result wait_fo + if (can_deadlock) + { + boost::xtime xt; +- xtime_get(&xt, boost::TIME_UTC); ++ xtime_get(&xt, boost::TIME_UTC_); + xt.sec += table_lock_wait_timeout; + if (not cond->timed_wait(scoped, xt)) + { +Index: drizzle-7.2.4-alpha/plugin/sleep/sleep.cc +=================================================================== +--- drizzle-7.2.4-alpha.orig/plugin/sleep/sleep.cc ++++ drizzle-7.2.4-alpha/plugin/sleep/sleep.cc +@@ -98,7 +98,7 @@ int64_t Item_func_sleep::val_int() + + try { + boost::xtime xt; +- xtime_get(&xt, boost::TIME_UTC); ++ xtime_get(&xt, boost::TIME_UTC_); + xt.nsec += (uint64_t)(dtime * 1000000000ULL); + session.getThread()->sleep(xt); + } +Index: drizzle-7.2.4-alpha/drizzled/message/include.am +=================================================================== +--- drizzle-7.2.4-alpha.orig/drizzled/message/include.am ++++ drizzle-7.2.4-alpha/drizzled/message/include.am +@@ -40,7 +40,7 @@ lib_LTLIBRARIES += drizzled/message/libd + drizzled_message_libdrizzledmessage_la_CXXFLAGS = ${MESSAGE_AM_CXXFLAGS} ${NO_WERROR} + + drizzled_message_libdrizzledmessage_la_SOURCES = drizzled/message/statement_transform.cc +-drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} $(GCOV_LIBS) drizzled/libcharset.la ++drizzled_message_libdrizzledmessage_la_LIBADD= ${LTLIBPROTOBUF} $(GCOV_LIBS) $(BOOST_LIBS) drizzled/libcharset.la + + nobase_dist_pkginclude_HEADERS+= \ + drizzled/message/statement_transform.h diff --git a/dev-db/drizzle/files/drizzle-7.2.4-fix-boost_thread-detection.patch b/dev-db/drizzle/files/drizzle-7.2.4-fix-boost_thread-detection.patch new file mode 100644 index 000000000000..e33e6e59afd1 --- /dev/null +++ b/dev-db/drizzle/files/drizzle-7.2.4-fix-boost_thread-detection.patch @@ -0,0 +1,18 @@ +--- m4/pandora_have_libboost_thread.m4.orig 2014-02-12 13:52:43.580001598 +0400 ++++ m4/pandora_have_libboost_thread.m4 2014-02-12 13:53:24.288002974 +0400 +@@ -17,13 +17,13 @@ + CXXFLAGS="${PTHREAD_CFLAGS} ${CXXFLAGS}" + + AC_LANG_PUSH(C++) +- AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,,[ ++ AC_LIB_HAVE_LINKFLAGS(boost_thread-mt,boost_system-mt,[ + #include <boost/thread.hpp> + ],[ + boost::thread id; + ]) + AS_IF([test "x${ac_cv_libboost_thread_mt}" = "xno"],[ +- AC_LIB_HAVE_LINKFLAGS(boost_thread,,[ ++ AC_LIB_HAVE_LINKFLAGS(boost_thread,boost_system,[ + #include <boost/thread.hpp> + ],[ + boost::thread id; diff --git a/dev-db/drizzle/files/drizzle.conf.d b/dev-db/drizzle/files/drizzle.conf.d new file mode 100644 index 000000000000..c8a797897a56 --- /dev/null +++ b/dev-db/drizzle/files/drizzle.conf.d @@ -0,0 +1 @@ +DRIZZLE_EXTRA="" diff --git a/dev-db/drizzle/files/drizzle.init.d b/dev-db/drizzle/files/drizzle.init.d new file mode 100644 index 000000000000..e3185ae0863b --- /dev/null +++ b/dev-db/drizzle/files/drizzle.init.d @@ -0,0 +1,134 @@ +#!/sbin/runscript +# Copyright 1999-2011 Pavel Stratil, senbonzakura.eu +# Some functions were taken from debian init script. Licensed under GPL-2 +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +######################### +### Construct vars ###### +######################### + + +SUFFIX=".${SVCNAME#*.}" +[ "${SUFFIX}" == ".drizzled" ] && SUFFIX='' + +BASE_CNF="/etc/drizzle/drizzled" +BASE_PID="/var/run/drizzle/drizzled" +BASE_LOG="/var/log/drizzle/drizzled" +BASE_DIR="/var/lib/drizzle/drizzled" + +PIDFILE="${BASE_PID}${SUFFIX}.pid" +CNFFILE="${BASE_CNF}${SUFFIX}.cnf" +LOGFILE="${BASE_LOG}${SUFFIX}.log" +DATADIR="${BASE_DIR}${SUFFIX}" +DRIZZLE="/usr/bin/drizzle" +DRIZZLE_USER="drizzle" +DRIZZLE_DAEMON="/usr/sbin/drizzled" +DRIZZLE_EXTRA="" + +######################### +### Helper functions #### +######################### + + +# +# drizzle_status() checks if there is a server running and if it is accessible. +# "check_alive" insists on a pingable server, "check_dead" also fails +# if there is a lost drizzled in the process list +# Usage: boolean drizzle_status [check_alive|check_dead] [warn|nowarn] +# +drizzle_status() { + ping_output=`$DRIZZLE --ping 2>&1`; ping_alive=$(( ! $? )) + ps_alive=0 + if [ -f "$PIDFILE" ] && ps `cat $PIDFILE` >/dev/null 2>&1; then ps_alive=1; fi + + if [ "$1" = "check_alive" -a $ping_alive = 1 ] || + [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then + return 0 # EXIT_SUCCESS + else + if [ "$2" = "warn" ]; then + echo -e "$ps_alive processes alive and '$DRIZZLE --ping' resulted in\n$ping_output\n" + fi + return 1 # EXIT_FAILURE + fi +} + +######################### +### Main ################ +######################### + +checkconfig() { + # TODO: --print-defaults no longer a valid option. Needs to be rewritten. + #CNFDATADIR=`drizzle_get_param datadir` + #if [ -z "${CNFDATADIR}" ] ; then + # ewarn "Datadir not set in ${CNFFILE}." + # ewarn "Trying to use ${DATADIR}" + #else + DATADIR="${CNFDATADIR}" + #fi + + if [[ ! -d "${DATADIR}" ]] ; then + eerror "Drizzle datadir is empty or invalid." + eerror "Please check your configuration ${CNFFILE} and DRIZZLE_EXTRA" + return 1 + fi + + if [ ! -f "${CNFFILE}" ]; then + eerror "The configuration file $CNFFILE was not found!" + fi +} + +depend() { + use localmount + use gearmand + use memcached + + # TODO use drizzle_get_param() to decide if gearmand and memcached + # are needed. Then the useflag based sed-ing of this script + # can be removed from the ebuild. +} + + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --pidfile ${PIDFILE} --stop \ + --exec ${DRIZZLE_DAEMON} + eend $? + drizzle_status check_dead warn +} + +start() { + #checkconfig + ebegin "Starting ${SVCNAME}" + # Test if ${BASE_PID}, ${BASE_LOG} and ${LOG_FILE} exist, create if not. + [ ! -e ${BASE_PID} ] && mkdir -p ${BASE_PID} && chown ${DRIZZLE_USER}:nogroup ${BASE_PID} + [ ! -e ${BASE_LOG} ] && mkdir -p ${BASE_LOG} && chown ${DRIZZLE_USER}:nogroup ${BASE_LOG} + [ ! -e ${LOGFILE} ] && touch ${LOGFILE} && chown ${DRIZZLE_USER}:nogroup ${LOGFILE} + start-stop-daemon --background --pidfile ${PIDFILE} --stderr ${LOGFILE} \ + --user ${DRIZZLE_USER} --start --exec ${DRIZZLE_DAEMON} -- \ + --datadir=${DATADIR} --pid-file=${PIDFILE} --user=${DRIZZLE_USER} \ + ${DRIZZLE_EXTRA} + eend $? + + # TODO in order to have replication always working we should add the + # --server-id=# option. AFAIK only integers are allowed, though + # ${HOSTNAME}${SVCNAME}${SUFFIX} whould be much easier to handle. + + for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do + sleep 1 + if drizzle_status check_alive nowarn ; then break ; fi + done + if drizzle_status check_alive warn ; then + einfo "${SVCNAME} is alive!" + else + eerror "${SVCNAME} died!" + fi +} + +status() { + if drizzle_status check_alive nowarn; then + einfo "status: started" + else + einfo "status: stopped" + fi +} diff --git a/dev-db/drizzle/files/drizzle.init.d.2 b/dev-db/drizzle/files/drizzle.init.d.2 new file mode 100644 index 000000000000..4b44ec0d51e9 --- /dev/null +++ b/dev-db/drizzle/files/drizzle.init.d.2 @@ -0,0 +1,127 @@ +#!/sbin/runscript +# Copyright 1999-2012 Pavel Stratil, senbonzakura.eu +# Some functions were taken from debian init script. Licensed under GPL-2 +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +######################### +### Construct vars ###### +######################### + + +SUFFIX=".${SVCNAME#*.}" +[ "${SUFFIX}" == ".drizzled" ] && SUFFIX='' + +DIR_PID="/run/drizzle" +DIR_LOG="/var/log/drizzle" + +BASE_CNF="/etc/drizzle/drizzled" +BASE_PID="${DIR_PID}/drizzled" +BASE_LOG="${DIR_LOG}/drizzled" +BASE_DIR="/var/lib/drizzle/drizzled" + +CNFFILE="${BASE_CNF}${SUFFIX}.cnf" +LOGFILE="${BASE_LOG}${SUFFIX}.log" +DATADIR="${BASE_DIR}${SUFFIX}" +DRIZZLE="/usr/bin/drizzle" +DRIZZLE_USER="drizzle" + +pidfile="${BASE_PID}${SUFFIX}.pid" +command="/usr/sbin/drizzled" +command_args="--daemon --datadir=${DATADIR} --pid-file=${pidfile} --user=${DRIZZLE_USER} --syslog.errmsg-enable ${DRIZZLE_EXTRA}" + +start_stop_daemon_args="--user ${DRIZZLE_USER} --wait 5000" + +######################### +### Helper functions #### +######################### + + +# +# drizzle_status() checks if there is a server running and if it is accessible. +# "check_alive" insists on a pingable server, "check_dead" also fails +# if there is a lost drizzled in the process list +# Usage: boolean drizzle_status [check_alive|check_dead] [warn|nowarn] +# +drizzle_status() { + ping_output=`$DRIZZLE --ping 2>&1`; ping_alive=$(( ! $? )) + ps_alive=0 + if [ -f "$pidfile" ] && ps `cat $pidfile` >/dev/null 2>&1; then ps_alive=1; fi + + if [ "$1" = "check_alive" -a $ping_alive = 1 ] || + [ "$1" = "check_dead" -a $ping_alive = 0 -a $ps_alive = 0 ]; then + return 0 # EXIT_SUCCESS + else + if [ "$2" = "warn" ]; then + echo -e "$ps_alive processes alive and '$DRIZZLE --ping' resulted in\n$ping_output\n" + fi + return 1 # EXIT_FAILURE + fi +} + +######################### +### Main ################ +######################### + +checkconfig() { + # TODO: --print-defaults no longer a valid option. Needs to be rewritten. + #CNFDATADIR=`drizzle_get_param datadir` + #if [ -z "${CNFDATADIR}" ] ; then + # ewarn "Datadir not set in ${CNFFILE}." + # ewarn "Trying to use ${DATADIR}" + #else + DATADIR="${CNFDATADIR}" + #fi + + if [[ ! -d "${DATADIR}" ]] ; then + eerror "Drizzle datadir is empty or invalid." + eerror "Please check your configuration ${CNFFILE} and DRIZZLE_EXTRA" + return 1 + fi + + if [ ! -f "${CNFFILE}" ]; then + eerror "The configuration file $CNFFILE was not found!" + fi +} + +depend() { + use localmount + use logger + use gearmand + use memcached + + # TODO use drizzle_get_param() to decide if gearmand and memcached + # are needed. Then the useflag based sed-ing of this script + # can be removed from the ebuild. +} + +start_pre() { + checkpath -d -o ${DRIZZLE_USER}:nogroup ${DIR_PID} ${DIR_LOG} + checkpath -f -o ${DRIZZLE_USER}:nogroup ${LOGFILE} +} + +start_post() { + for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14; do + sleep 1 + if drizzle_status check_alive nowarn ; then break ; fi + done + if drizzle_status check_alive warn ; then + einfo "${SVCNAME} is alive!" + else + eerror "${SVCNAME} died!" + fi +} + +stop_post() { + drizzle_status check_dead warn +} + +status() { + if drizzle_status check_alive nowarn; then + mark_service_started drizzled + einfo "status: started" + else + mark_service_stopped drizzled + einfo "status: stopped" + fi +} diff --git a/dev-db/drizzle/metadata.xml b/dev-db/drizzle/metadata.xml new file mode 100644 index 000000000000..ed2cb0bbc5fa --- /dev/null +++ b/dev-db/drizzle/metadata.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>pavel.stratil-jun@fenix.cz</email> + <description>Proxied co-maintainer, assign bugs to him</description> + </maintainer> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <use> + <flag name="doc"> + Build the API documentation for the package, using + <pkg>app-doc/doxygen</pkg>. Warning, this might take over an + hour on slower machines. + </flag> + <flag name="memcache"> + Enable the memcache plugin for user-defined functions and + statistics in I_S tables (using + <pkg>dev-libs/libmemcached</pkg>). + + Currently restricts tests because of an upstream testsuite bug. + </flag> + <flag name="gearman"> + Enable the gearman plugins for user-defined functions and + logging (using <pkg>sys-cluster/gearman</pkg>). + </flag> + <flag name="curl"> + Enable the HTTP authentication plugin (using + <pkg>net-misc/curl</pkg>). This is needed for the tests to apply + properly. + </flag> + <flag name="pam"> + Enable the PAM authentication plugin (using + <pkg>sys-libs/pam</pkg>). The configuration file created will be + /etc/pam.d/drizzle. + </flag> + <flag name="md5"> + Enable the MD5 plugin, using <pkg>dev-libs/libgcrypt</pkg>; this + replaces the older openssl and gnutls USE flags. + </flag> + <flag name="v8"> + Use <pkg>dev-lang/v8</pkg>. + </flag> + </use> + <upstream> + <remote-id type="launchpad">drizzle</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/etcd/Manifest b/dev-db/etcd/Manifest new file mode 100644 index 000000000000..72c81762dc89 --- /dev/null +++ b/dev-db/etcd/Manifest @@ -0,0 +1,2 @@ +DIST etcd-0.4.6.zip 3184823 SHA256 9134701506a6e9f569ef62d3bb4c43f594f30d66ce67060403998233dbfc0ed6 SHA512 5c25b99c826daa20493645e0e2bec38fd06c17029c3677f65f451fe132441d19e00eebd04c462936c22caeaf327b56cf47027ca8080508dc742a5e6a7d3f89c6 WHIRLPOOL 5ab7fb2d51ca1be4c2a54a37953a0154e06eb094d81ebb94f9260c0f786104d273e214f1ee20cd4a46018e6323d23fe697d54f2903c1acadac9ec2c34611abd6 +DIST etcd-2.0.10.tar.gz 450581 SHA256 6029113d9870e5c6f0d10adbd2b6670958a46575114a094b86b607771a0e5ff3 SHA512 825524ee4c435b8f369970cfe39158443b8e29f6fba5ab86ae8be2d91f6faa0674d15f311bc863092fb6c77b054b8f3b69e163610b546e3c5cf59a111b38a3ed WHIRLPOOL a2b4c160cbc9cde5ebf64fa2fe41f6bc6ac5dc851551778b681d658e511f0dbc7241a4c74a6b520d43fe8e9cee65fa28f94655d64caf6f3c99cbd4ba84a57b65 diff --git a/dev-db/etcd/etcd-0.4.6.ebuild b/dev-db/etcd/etcd-0.4.6.ebuild new file mode 100644 index 000000000000..3d72d5e4415e --- /dev/null +++ b/dev-db/etcd/etcd-0.4.6.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user systemd + +KEYWORDS="~amd64" +DESCRIPTION="A highly-available key value store for shared configuration and service discovery" +HOMEPAGE="https://github.com/coreos/etcd/" +SRC_URI="https://github.com/coreos/etcd/archive/v${PV}.zip -> ${P}.zip" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc" +DEPEND=">=dev-lang/go-1.2" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} +} + +src_prepare() { + sed -e "s:^\(go install\)\(.*\)$:\\1 -x -ldflags=\"-v -linkmode=external -extldflags '${LDFLAGS}'\" \\2:" \ + -i build || die +} + +src_compile() { + CGO_CFLAGS="${CFLAGS}" ./build || die +} + +src_install() { + insinto /etc/${PN} + doins "${FILESDIR}/${PN}.conf" + dobin bin/${PN} + newbin bin/bench ${PN}-bench + dodoc CHANGELOG README.md + use doc && dodoc -r Documentation + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + dodir /var/lib/${PN} + fowners ${PN}:${PN} /var/lib/${PN} + fperms 755 /var/lib/${PN} + dodir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + fperms 755 /var/log/${PN} +} diff --git a/dev-db/etcd/etcd-2.0.10-r1.ebuild b/dev-db/etcd/etcd-2.0.10-r1.ebuild new file mode 100644 index 000000000000..2b7d67d64aab --- /dev/null +++ b/dev-db/etcd/etcd-2.0.10-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user systemd + +KEYWORDS="~amd64" +DESCRIPTION="A highly-available key value store for shared configuration and service discovery" +HOMEPAGE="https://github.com/coreos/etcd/" +SRC_URI="https://github.com/coreos/etcd/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc" +DEPEND=">=dev-lang/go-1.2:=" +RDEPEND="!dev-db/etcdctl" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} +} + +src_prepare() { + sed -e "s|-ldflags '-s'|-x|" \ + -i build || die +} + +src_compile() { + ./build || die +} + +src_install() { + insinto /etc/${PN} + doins "${FILESDIR}/${PN}.conf" + dobin bin/* + dodoc README.md + use doc && dodoc -r Documentation + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + dodir /var/lib/${PN} + fowners ${PN}:${PN} /var/lib/${PN} + fperms 755 /var/lib/${PN} + dodir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + fperms 755 /var/log/${PN} +} + +src_test() { + local x + for x in bin/*; do + ebegin "running ${x##*/} --help" + ${x} --help >/dev/null || die "${x##*/} --help failed" + eend + done +} diff --git a/dev-db/etcd/etcd-2.0.10.ebuild b/dev-db/etcd/etcd-2.0.10.ebuild new file mode 100644 index 000000000000..a805bdf41ac6 --- /dev/null +++ b/dev-db/etcd/etcd-2.0.10.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit user systemd + +KEYWORDS="~amd64" +DESCRIPTION="A highly-available key value store for shared configuration and service discovery" +HOMEPAGE="https://github.com/coreos/etcd/" +SRC_URI="https://github.com/coreos/etcd/archive/v${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="doc" +DEPEND=">=dev-lang/go-1.2" +RDEPEND="!dev-db/etcdctl" + +pkg_setup() { + enewgroup ${PN} + enewuser ${PN} -1 -1 /var/lib/${PN} ${PN} +} + +src_prepare() { + sed -e "s|-ldflags '-s'|-x|" \ + -i build || die +} + +src_compile() { + ./build || die +} + +src_install() { + insinto /etc/${PN} + doins "${FILESDIR}/${PN}.conf" + dobin bin/* + dodoc README.md + use doc && dodoc -r Documentation + systemd_dounit "${FILESDIR}/${PN}.service" + systemd_newtmpfilesd "${FILESDIR}/${PN}.tmpfiles.d.conf" ${PN}.conf + newinitd "${FILESDIR}"/${PN}.initd ${PN} + newconfd "${FILESDIR}"/${PN}.confd ${PN} + dodir /var/lib/${PN} + fowners ${PN}:${PN} /var/lib/${PN} + fperms 755 /var/lib/${PN} + dodir /var/log/${PN} + fowners ${PN}:${PN} /var/log/${PN} + fperms 755 /var/log/${PN} +} + +src_test() { + local x + for x in bin/*; do + ebegin "running ${x##*/} --help" + ${x} --help >/dev/null || die "${x##*/} --help failed" + eend + done +} diff --git a/dev-db/etcd/files/etcd.conf b/dev-db/etcd/files/etcd.conf new file mode 100644 index 000000000000..3f34434e8e7c --- /dev/null +++ b/dev-db/etcd/files/etcd.conf @@ -0,0 +1,39 @@ +# For an explanation of the options please see: +# https://github.com/coreos/etcd/blob/master/Documentation/configuration.md#etcd-configuration +# +# The directory to store log and snapshot. +# If you change this you have to make sure the directory exists at +# the new path and has the correct permissions. +# data_dir = "/var/lib/etcd" + +# name = "default-name" +# addr = "127.0.0.1:4001" +# bind_addr = "127.0.0.1:4001" +# ca_file = "" +# cert_file = "" +# cors = [] +# cpu_profile_file = "" +# discovery = "http://etcd.local:4001/v2/keys/_etcd/registry/examplecluster" +# http_read_timeout = 10 +# http_write_timeout = 10 +# key_file = "" +# peers = [] +# peers_file = "" +# max_cluster_size = 9 +# max_result_buffer = 1024 +# max_retry_attempts = 3 +# snapshot = true +# verbose = false +# very_verbose = false + +[peer] +addr = "127.0.0.1:7001" +bind_addr = "127.0.0.1:7001" +# ca_file = "" +# cert_file = "" +# key_file = "" + +#[cluster] +# active_size = 9 +# remove_delay = 1800.0 +# sync_interval = 5.0 diff --git a/dev-db/etcd/files/etcd.confd b/dev-db/etcd/files/etcd.confd new file mode 100644 index 000000000000..4592dac08d56 --- /dev/null +++ b/dev-db/etcd/files/etcd.confd @@ -0,0 +1,7 @@ +# Name of this node in the etcd cluster. +ETCD_NAME=etcd + +# Path to the data directory. +ETCD_DATA_DIR=/var/lib/etcd + +ETCD_OPTS="" diff --git a/dev-db/etcd/files/etcd.initd b/dev-db/etcd/files/etcd.initd new file mode 100644 index 000000000000..d8134438c856 --- /dev/null +++ b/dev-db/etcd/files/etcd.initd @@ -0,0 +1,54 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +SVCNAME=etcd +PIDPATH=/var/run/${SVCNAME} +PIDFILE=${PIDPATH}/${SVCNAME}.pid +LOGPATH=/var/log/${SVCNAME} +DATADIR=/var/lib/${SVCNAME} +USER=$SVCNAME + +depend() { + need net + need localmount + after bootmisc +} + +start() { + if [ ! -d "$PIDPATH" ] ; then + mkdir -p "$PIDPATH" + chown $USER:$USER "$PIDPATH" + fi + if [ ! -d "$LOGPATH" ] ; then + mkdir -p "$LOGPATH" + chown $USER:$USER "$LOGPATH" + fi + if [ ! -d "$ETCD_DATA_DIR" ] ; then + mkdir -p "$ETCD_DATA_DIR" + chown $USER:$USER "$ETCD_DATA_DIR" + fi + + ebegin "Starting $SVCNAME" + start-stop-daemon --start \ + --pidfile "$PIDFILE" \ + --user $USER \ + --chdir "$ETCD_DATA_DIR" \ + -1 "$LOGPATH/$SVCNAME.log" \ + -2 "$LOGPATH/$SVCNAME.err" \ + --background \ + --make-pidfile \ + --exec /usr/bin/etcd -- \ + -name=$ETCD_NAME \ + -data-dir="$ETCD_DATA_DIR" \ + $ETCD_OPTS + eend $? "Failed to start $SVCNAME" +} + +stop() { + ebegin "Stopping $SVCNAME" + start-stop-daemon --stop --pidfile $PIDFILE + eend $? "Failed to stop $SVCNAME" + rm -f "$PIDFILE" +} diff --git a/dev-db/etcd/files/etcd.service b/dev-db/etcd/files/etcd.service new file mode 100644 index 000000000000..8c4663d03234 --- /dev/null +++ b/dev-db/etcd/files/etcd.service @@ -0,0 +1,11 @@ +[Unit] +Description=etcd + +[Service] +User=etcd +PermissionsStartOnly=true +Environment=ETCD_DATA_DIR=/var/lib/etcd +Environment=ETCD_NAME=%m +ExecStart=/usr/bin/etcd +Restart=always +RestartSec=10s diff --git a/dev-db/etcd/files/etcd.tmpfiles.d.conf b/dev-db/etcd/files/etcd.tmpfiles.d.conf new file mode 100644 index 000000000000..721e9c9161a3 --- /dev/null +++ b/dev-db/etcd/files/etcd.tmpfiles.d.conf @@ -0,0 +1,2 @@ +d /var/lib/etcd 0755 etcd etcd - - +d /var/run/etcd 0755 etcd etcd - - diff --git a/dev-db/etcd/metadata.xml b/dev-db/etcd/metadata.xml new file mode 100644 index 000000000000..82f2214aa78f --- /dev/null +++ b/dev-db/etcd/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <bugs-to>https://github.com/coreos/etcd/issues</bugs-to> + <changelog>https://raw.githubusercontent.com/coreos/etcd/master/CHANGELOG</changelog> + <doc>https://github.com/coreos/etcd/blob/master/README.md/</doc> + <remote-id type="github">coreos/etcd</remote-id> + </upstream> + <maintainer> + <email>zmedico@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/etcdctl/Manifest b/dev-db/etcdctl/Manifest new file mode 100644 index 000000000000..da679aceb949 --- /dev/null +++ b/dev-db/etcdctl/Manifest @@ -0,0 +1 @@ +DIST etcdctl-0.4.6.zip 62437 SHA256 b57c463bfc65114b3f78406409edf693af6f79fa3d2937470081355d629121a7 SHA512 b47c3a0e2071e0352226e91f344839f1dfcd75dc8d11ca6b73c33a0570aabe94f557c3ed79ec9da9e0005656d8da49468c3df4a82df61c823cb1902b6e09bddd WHIRLPOOL a630d2d21956221363c292c37dd996a6fc0986eced0a58ec0703eabcd10b36106dd53f5a708b4aedb8158330f70e853c1228d611564d56b56838aa9d4a9342b4 diff --git a/dev-db/etcdctl/etcdctl-0.4.6-r1.ebuild b/dev-db/etcdctl/etcdctl-0.4.6-r1.ebuild new file mode 100644 index 000000000000..8fb38cbcca19 --- /dev/null +++ b/dev-db/etcdctl/etcdctl-0.4.6-r1.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +KEYWORDS="~amd64" +DESCRIPTION="A simple command line client for etcd" +HOMEPAGE="https://github.com/coreos/etcdctl/" +SRC_URI="https://github.com/coreos/etcdctl/archive/v${PV}.zip -> ${P}.zip" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="examples" + +DEPEND=">=dev-lang/go-1.2:=" +RDEPEND="" + +src_prepare() { + sed -e "s:^\(go install\)\(.*\)$:\\1 -x -ldflags=\"-v -linkmode=external -extldflags '${LDFLAGS}'\" \\2:" \ + -i build || die +} + +src_compile() { + CGO_CFLAGS="${CFLAGS}" ./build || die +} + +src_test() { + ./test || die +} + +src_install() { + dobin bin/${PN} + dodoc README.md + use examples && dodoc -r examples +} diff --git a/dev-db/etcdctl/etcdctl-0.4.6.ebuild b/dev-db/etcdctl/etcdctl-0.4.6.ebuild new file mode 100644 index 000000000000..45973eade0d4 --- /dev/null +++ b/dev-db/etcdctl/etcdctl-0.4.6.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +KEYWORDS="~amd64" +DESCRIPTION="A simple command line client for etcd" +HOMEPAGE="https://github.com/coreos/etcdctl/" +SRC_URI="https://github.com/coreos/etcdctl/archive/v${PV}.zip -> ${P}.zip" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="examples" + +DEPEND=">=dev-lang/go-1.2" +RDEPEND="" + +src_prepare() { + sed -e "s:^\(go install\)\(.*\)$:\\1 -x -ldflags=\"-v -linkmode=external -extldflags '${LDFLAGS}'\" \\2:" \ + -i build || die +} + +src_compile() { + CGO_CFLAGS="${CFLAGS}" ./build || die +} + +src_test() { + ./test || die +} + +src_install() { + dobin bin/${PN} + dodoc README.md + use examples && dodoc -r examples +} diff --git a/dev-db/etcdctl/metadata.xml b/dev-db/etcdctl/metadata.xml new file mode 100644 index 000000000000..928c51782818 --- /dev/null +++ b/dev-db/etcdctl/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <bugs-to>https://github.com/coreos/etcdctl/issues</bugs-to> + <changelog>https://github.com/coreos/etcdctl/commits/master</changelog> + <doc>https://github.com/coreos/etcdctl/blob/master/README.md</doc> + <remote-id type="github">coreos/etcdctl</remote-id> + </upstream> + <maintainer> + <email>zmedico@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/firebird/Manifest b/dev-db/firebird/Manifest new file mode 100644 index 000000000000..bdb486cf2179 --- /dev/null +++ b/dev-db/firebird/Manifest @@ -0,0 +1,2 @@ +DIST Firebird-2.5.3.26780-0.tar.bz2 13798872 SHA256 0c4b500d189aa9b4c12a7d2cf310a0b770118967c37ebe0edf8581cbcdad7aad SHA512 b8a0bef492d15739ea9a156225ac738687241a11571ce52ee6c644e5017dcff03007945aeb19b0537aadd1de01b339645871ff1905edf41c65679db377c69e98 WHIRLPOOL 0321763e79882dcdd2175191e1cbf6c82d656bb16e5ebd4a3bf0f08c77ee0494f06ffb08205b583c4a9990c33d652ac2fa73683e4c7ccebe900236975c8d60a5 +DIST ib_b60_doc.zip 10530848 SHA256 8c0158678b2a2fe3ba3abfea1f5487fc5af2644d66837ab8a558f5ad6b6cfd6d SHA512 59eccf1d6b1f0410eddbc5967fd77a3d00e09749640b3f81e2f8b624f5a45461dffad4af5ec61488e941fb3d3af266fe86c0b56e6b7e023239537cb6557a145a WHIRLPOOL 5c3e17eec64d835bac8832a51acefe04c3a5ff818d1d1e69a032bae1a730fd73996a2be073d2e22bcd4ad4ee1ba2247da8271cd3a03c0326acf46eef1073033f diff --git a/dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch b/dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch new file mode 100644 index 000000000000..8331c8122faf --- /dev/null +++ b/dev-db/firebird/files/firebird-2.5.1.26351.0-client.patch @@ -0,0 +1,12 @@ +diff -Naur orig/builds/posix/Makefile.in.firebird builds/posix/Makefile.in.firebird +--- orig/builds/posix/Makefile.in.firebird 2010-11-12 15:46:22.000000000 -0500 ++++ builds/posix/Makefile.in.firebird 2010-11-12 16:36:22.000000000 -0500 +@@ -145,7 +145,7 @@ + + firebird : firebird_@FIREBIRD_ARCH_TYPE@ $(PLATFORM_POSTBUILD_TARGET) + +-firebird_classic firebird_embedded: firebird_basic classic_targets fbtrace ++firebird_classic firebird_embedded: firebird_boot libfbclient includes + firebird_super firebird_server: firebird_basic super_targets fbtrace + + diff --git a/dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch b/dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch new file mode 100644 index 000000000000..8be521cc0fac --- /dev/null +++ b/dev-db/firebird/files/firebird-2.5.1.26351.0-deps-flags.patch @@ -0,0 +1,59 @@ +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird +--- Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird 2011-03-28 15:10:09.814370706 -0400 +@@ -158,7 +158,7 @@ + # some complications particularly for super in needing to start the server + # that you are currently building. MOD 28-July-2002 + +-firebird_basic: btyacc_binary external_libraries firebird_boot basic_targets ++firebird_basic: firebird_boot basic_targets + + firebird_boot: updateBuildNum boot_phase1 boot_phase2 + +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults +--- Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults 2011-03-28 15:21:26.904370708 -0400 +@@ -138,7 +138,7 @@ + AR= ar @AR_OPTIONS@ crsu + LN= @LN_S@ + RANLIB= @RANLIB@ +-BTYACC=$(ROOT)/extern/btyacc/btyacc ++BTYACC=/usr/bin/btyacc + + CC = @CC@ + CXX = @CXX@ +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux +--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux 2011-03-25 21:38:29.031037374 -0400 +@@ -18,11 +18,10 @@ + # + # 2 Oct 2002, Nickolay Samofatov - Major cleanup + +-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0 +-OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer ++COMMON_FLAGS=-DLINUX -MMD -fPIC -fmessage-length=0 + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + +-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) ++PROD_FLAGS=$(COMMON_FLAGS) + #DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS) + DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS) + +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 +--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 2011-03-25 21:39:15.134370707 -0400 +@@ -18,12 +18,11 @@ + # + # 2 Oct 2002, Nickolay Samofatov - Major cleanup + +-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 +-OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer ++COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -MMD -fPIC -fmessage-length=0 + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + CXXFLAGS:= $(CXXFLAGS) -fno-rtti + +-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) ++PROD_FLAGS=$(COMMON_FLAGS) + #DEV_FLAGS=-DUSE_VALGRIND $(COMMON_FLAGS) $(WARN_FLAGS) + DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS) + diff --git a/dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch b/dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch new file mode 100644 index 000000000000..3891cc776fae --- /dev/null +++ b/dev-db/firebird/files/firebird-2.5.1.26351.0-superclassic.patch @@ -0,0 +1,12 @@ +diff -Naur orig/builds/posix/Makefile.in.firebird builds/posix/Makefile.in.firebird +--- orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500 ++++ builds/posix/Makefile.in.firebird 2011-03-07 20:26:56.612573632 -0500 +@@ -332,7 +332,7 @@ + .PHONY: libfbembed inet_server fb_smp_server embed_gfix embed_gbak embed_isql + .PHONY: embed_gpre embed_util + +-classic_targets: $(PLAT_CLASSIC_PRE_TARGET) libfbembed inet_server fb_smp_server embed_gfix embed_gbak embed_isql \ ++classic_targets: $(PLAT_CLASSIC_PRE_TARGET) libfbembed fbserver fb_smp_server embed_gfix embed_gbak embed_isql \ + embed_gpre libfbclient embed_util embed_gdef embed_qli embed_fbudf $(PLAT_CLASSIC_POST_TARGET) + + libfbembed: diff --git a/dev-db/firebird/files/firebird-2.5.3.26780.0-deps-flags.patch b/dev-db/firebird/files/firebird-2.5.3.26780.0-deps-flags.patch new file mode 100644 index 000000000000..506a6c07a79c --- /dev/null +++ b/dev-db/firebird/files/firebird-2.5.3.26780.0-deps-flags.patch @@ -0,0 +1,59 @@ +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird +--- Firebird-2.5.0.26074-0_orig/builds/posix/Makefile.in.firebird 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/Makefile.in.firebird 2011-03-28 15:10:09.814370706 -0400 +@@ -158,7 +158,7 @@ + # some complications particularly for super in needing to start the server + # that you are currently building. MOD 28-July-2002 + +-firebird_basic: btyacc_binary external_libraries firebird_boot basic_targets ++firebird_basic: firebird_boot basic_targets + + firebird_boot: updateBuildNum boot_phase1 boot_phase2 + +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults +--- Firebird-2.5.0.26074-0_orig/builds/posix/make.defaults 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/make.defaults 2011-03-28 15:21:26.904370708 -0400 +@@ -138,7 +138,7 @@ + AR= ar @AR_OPTIONS@ crsu + LN= @LN_S@ + RANLIB= @RANLIB@ +-BTYACC=$(ROOT)/extern/btyacc/btyacc ++BTYACC=/usr/bin/btyacc + + CC = @CC@ + CXX = @CXX@ +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux +--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux 2011-03-25 21:38:29.031037374 -0400 +@@ -18,11 +18,10 @@ + # + # 2 Oct 2002, Nickolay Samofatov - Major cleanup + +-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -pipe -MMD -fPIC -fmessage-length=0 +-OPTIMIZE_FLAGS=-O3 -march=i586 -mtune=i686 -fno-omit-frame-pointer ++COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -MMD -fPIC -fmessage-length=0 + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + +-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) ++PROD_FLAGS=$(COMMON_FLAGS) + #DEV_FLAGS=-DUSE_VALGRIND -p $(COMMON_FLAGS) $(WARN_FLAGS) + DEV_FLAGS=-p $(COMMON_FLAGS) $(WARN_FLAGS) + +diff -Naur Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 +--- Firebird-2.5.0.26074-0_orig/builds/posix/prefix.linux_amd64 2010-11-09 12:42:45.000000000 -0500 ++++ Firebird-2.5.0.26074-0_deps-flags/builds/posix/prefix.linux_amd64 2011-03-25 21:39:15.134370707 -0400 +@@ -18,12 +18,11 @@ + # + # 2 Oct 2002, Nickolay Samofatov - Major cleanup + +-COMMON_FLAGS=-ggdb -DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -pipe -MMD -fPIC -fmessage-length=0 +-OPTIMIZE_FLAGS=-O3 -fno-omit-frame-pointer ++COMMON_FLAGS=-DFB_SEND_FLAGS=MSG_NOSIGNAL -DLINUX -DAMD64 -MMD -fPIC -fmessage-length=0 + WARN_FLAGS=-Wall -Wno-switch -Wno-parentheses -Wno-unknown-pragmas -Wno-unused-variable + CXXFLAGS:= $(CXXFLAGS) -fno-rtti + +-PROD_FLAGS=-DNDEBUG $(COMMON_FLAGS) $(OPTIMIZE_FLAGS) ++PROD_FLAGS=$(COMMON_FLAGS) + #DEV_FLAGS=-DUSE_VALGRIND $(COMMON_FLAGS) $(WARN_FLAGS) + DEV_FLAGS=$(COMMON_FLAGS) $(WARN_FLAGS) + diff --git a/dev-db/firebird/files/firebird.conf.d.2.5 b/dev-db/firebird/files/firebird.conf.d.2.5 new file mode 100644 index 000000000000..625963d0c13b --- /dev/null +++ b/dev-db/firebird/files/firebird.conf.d.2.5 @@ -0,0 +1,7 @@ +FBUSER=firebird +FBGROUP=firebird +FIREBIRD=/usr/lib/firebird +FBGUARD=/usr/sbin/fbguard +PIDFILE=/var/run/firebird/firebird.pid +FB_OPTS="-forever -daemon -pidfile $PIDFILE" +LD_LIBRARY_PATH=/usr/lib/:/usr/lib/firebird/intl/:/usr/lib/firebird/plugins/:/usr/lib/firebird/UDF/ diff --git a/dev-db/firebird/files/firebird.init.d.2.5 b/dev-db/firebird/files/firebird.init.d.2.5 new file mode 100644 index 000000000000..cb4dddcb4ba6 --- /dev/null +++ b/dev-db/firebird/files/firebird.init.d.2.5 @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start_pre() { + checkpath -d -o $FBUSER "$(dirname $PIDFILE)" +} + +start(){ + ebegin "Starting Firebird server" + start-stop-daemon --start --pidfile $PIDFILE --user $FBUSER --group $FBGROUP --exec $FBGUARD -- $FB_OPTS + eend $? +} + +stop(){ + ebegin "Stopping Firebird server" + start-stop-daemon --stop --name fbguard + eend $? +} + +restart(){ + svc_stop + sleep 1 + svc_start +} + diff --git a/dev-db/firebird/files/firebird.logrotate b/dev-db/firebird/files/firebird.logrotate new file mode 100644 index 000000000000..c87cd43f30f8 --- /dev/null +++ b/dev-db/firebird/files/firebird.logrotate @@ -0,0 +1,10 @@ +/var/log/firebird/firebird.log { + compress + weekly + missingok + rotate 52 + size=+1024k + delaycompress + notifempty + create 644 firebird + } diff --git a/dev-db/firebird/files/firebird.xinetd b/dev-db/firebird/files/firebird.xinetd new file mode 100644 index 000000000000..01fc102ee3a8 --- /dev/null +++ b/dev-db/firebird/files/firebird.xinetd @@ -0,0 +1,11 @@ +service gds_db +{ + flags = REUSE + socket_type = stream + wait = no + user = firebird + log_on_success += USERID + log_on_failure += USERID + server = /usr/bin/fb_inet_server + disable = yes +} diff --git a/dev-db/firebird/firebird-2.5.3.26780.0-r1.ebuild b/dev-db/firebird/firebird-2.5.3.26780.0-r1.ebuild new file mode 100644 index 000000000000..9fe14f665cb1 --- /dev/null +++ b/dev-db/firebird/firebird-2.5.3.26780.0-r1.ebuild @@ -0,0 +1,286 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit flag-o-matic eutils autotools multilib user readme.gentoo versionator + +MY_P=${PN/f/F}-$(replace_version_separator 4 -) +#MY_P=${PN/f/F}-${PV/_rc/-ReleaseCandidate} + +DESCRIPTION="A relational database offering many ANSI SQL:2003 and some SQL:2008 features" +HOMEPAGE="http://www.firebirdsql.org/" +SRC_URI=" + mirror://sourceforge/firebird/${MY_P}.tar.bz2 + doc? ( ftp://ftpc.inprise.com/pub/interbase/techpubs/ib_b60_doc.zip )" + +LICENSE="IDPL Interbase-1.0" +SLOT="0" +KEYWORDS="~amd64 -ia64 ~x86" + +IUSE="doc client superserver xinetd examples debug" +REQUIRED_USE=" + client? ( !superserver ) + client? ( !xinetd ) + superserver? ( !xinetd ) +" + +CDEPEND=" + dev-libs/libedit + dev-libs/icu:= +" +DEPEND="${CDEPEND} + >=dev-util/btyacc-3.0-r2 + doc? ( app-arch/unzip ) +" +RDEPEND="${CDEPEND} + xinetd? ( virtual/inetd ) + !sys-cluster/ganglia +" + +RESTRICT="userpriv" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + enewgroup firebird 450 + enewuser firebird 450 /bin/bash /usr/$(get_libdir)/firebird firebird +} + +function check_sed() { + MSG="sed of $3, required $2 lines modified $1" + einfo "${MSG}" + [[ $1 -ge $2 ]] || die "${MSG}" +} + +src_unpack() { + unpack "${MY_P}.tar.bz2" + if use doc; then + # Unpack docs + mkdir "${WORKDIR}/manuals" && cd "${WORKDIR}/manuals" || die + unpack ib_b60_doc.zip + fi +} + +src_prepare() { + # This patch might be portable, and not need to be duplicated per version + # also might no longer be necessary to patch deps or libs, just flags + epatch "${FILESDIR}"/${PN}-2.5.3.26780.0-deps-flags.patch + + use client && epatch "${FILESDIR}"/${PN}-2.5.1.26351.0-client.patch + use superserver || epatch "${FILESDIR}"/${PN}-2.5.1.26351.0-superclassic.patch + + # Rename references to isql to fbsql + # sed vs patch for portability and addtional location changes + check_sed "$(sed -i -e 's:"isql :"fbsql :w /dev/stdout' \ + src/isql/isql.epp | wc -l)" "1" "src/isql/isql.epp" # 1 line + check_sed "$(sed -i -e 's:isql :fbsql :w /dev/stdout' \ + src/msgs/history2.sql | wc -l)" "4" "src/msgs/history2.sql" # 4 lines + check_sed "$(sed -i -e 's:--- ISQL:--- FBSQL:w /dev/stdout' \ + -e 's:isql :fbsql :w /dev/stdout' \ + -e 's:ISQL :FBSQL :w /dev/stdout' \ + src/msgs/messages2.sql | wc -l)" "6" "src/msgs/messages2.sql" # 6 lines + + find "${S}" -name \*.sh -print0 | xargs -0 chmod +x || die + rm -rf "${S}"/extern/{btyacc,editline,icu} || die + + eautoreconf +} + +src_configure() { + filter-flags -fprefetch-loop-arrays + filter-mfpmath sse + + econf \ + --prefix=/usr/$(get_libdir)/firebird \ + $(use_enable superserver superserver) \ + $(use_enable debug) \ + --with-editline \ + --with-system-editline \ + --with-system-icu \ + --with-fbbin=/usr/bin \ + --with-fbsbin=/usr/sbin \ + --with-fbconf=/etc/${PN} \ + --with-fblib=/usr/$(get_libdir) \ + --with-fbinclude=/usr/include \ + --with-fbdoc=/usr/share/doc/${P} \ + --with-fbudf=/usr/$(get_libdir)/${PN}/UDF \ + --with-fbsample=/usr/share/doc/${P}/examples \ + --with-fbsample-db=/usr/share/doc/${P}/examples/db \ + --with-fbhelp=/usr/$(get_libdir)/${PN}/help \ + --with-fbintl=/usr/$(get_libdir)/${PN}/intl \ + --with-fbmisc=/usr/share/${PN} \ + --with-fbsecure-db=/etc/${PN} \ + --with-fbmsg=/usr/$(get_libdir)/${PN} \ + --with-fblog=/var/log/${PN}/ \ + --with-fbglock=/var/run/${PN} \ + --with-fbplugins=/usr/$(get_libdir)/${PN}/plugins \ + --with-gnu-ld \ + ${myconf} +} + +src_compile() { + MAKEOPTS="${MAKEOPTS/-j*/-j1} ${MAKEOPTS/-j/CPU=}" + emake +} + +src_install() { + cd "${S}/gen/${PN}" || die + + if use doc; then + dodoc "${S}"/doc/*.pdf + find "${WORKDIR}"/manuals -type f -iname "*.pdf" -exec dodoc '{}' + || die + fi + + doheader include/* + + rm lib/libfbstatic.a + + insinto /usr/$(get_libdir) + dolib.so lib/*.so* + + # links for backwards compatibility + dosym libfbclient.so /usr/$(get_libdir)/libgds.so + dosym libfbclient.so /usr/$(get_libdir)/libgds.so.0 + dosym libfbclient.so /usr/$(get_libdir)/libfbclient.so.1 + + insinto /usr/$(get_libdir)/${PN} + doins *.msg + + use client && return + + einfo "Renaming isql -> fbsql" + mv bin/isql bin/fbsql + + local bins="fbsql fbsvcmgr fbtracemgr gbak gdef gfix gpre gsec gstat nbackup qli" + for bin in ${bins[@]}; do + dobin bin/${bin} + done + + dosbin bin/fb_lock_print + # SuperServer + if use superserver ; then + dosbin bin/{fbguard,fbserver} + # ClassicServer + elif use xinetd ; then + dosbin bin/fb_inet_server + # SuperClassic + else + dosbin bin/{fbguard,fb_smp_server} + + #Temp should not be necessary, need to patch/fix + dosym "${D}"/usr/$(get_libdir)/libib_util.so /usr/$(get_libdir)/${PN}/lib/libib_util.so + fi + + exeinto /usr/bin/${PN} + exeopts -m0755 + doexe bin/{changeRunUser,restoreRootRunUser,changeDBAPassword}.sh + + insinto /usr/$(get_libdir)/${PN}/help + doins help/help.fdb + + exeinto /usr/$(get_libdir)/firebird/intl + dolib.so intl/libfbintl.so + dosym "${D}"/usr/$(get_libdir)/libfbintl.so /usr/$(get_libdir)/${PN}/intl/fbintl + dosym "${D}"/etc/firebird/fbintl.conf /usr/$(get_libdir)/${PN}/intl/fbintl.conf + + exeinto /usr/$(get_libdir)/${PN}/plugins + dolib.so plugins/libfbtrace.so + dosym "${D}"/usr/$(get_libdir)/libfbtrace.so /usr/$(get_libdir)/${PN}/plugins/libfbtrace.so + + exeinto /usr/$(get_libdir)/${PN}/UDF + doexe UDF/*.so + + insinto /usr/share/${PN}/upgrade + doins "${S}"/src/misc/upgrade/v2/* + + insinto /etc/${PN} + insopts -m0644 -o firebird -g firebird + doins ../install/misc/*.conf + insopts -m0660 -o firebird -g firebird + doins security2.fdb + + if use xinetd ; then + insinto /etc/xinetd.d + newins "${FILESDIR}/${PN}.xinetd" ${PN} + else + newinitd "${FILESDIR}/${PN}.init.d.2.5" ${PN} + newconfd "${FILESDIR}/${PN}.conf.d.2.5" ${PN} + fperms 640 /etc/conf.d/${PN} + fi + + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + diropts -m 755 -o firebird -g firebird + dodir /var/log/${PN} + dodir /var/run/${PN} + keepdir /var/log/${PN} + keepdir /var/run/${PN} + + use examples && docinto examples +} + +pkg_postinst() { + use client && return + + # Hack to fix ownership/perms + chown -fR firebird:firebird "${ROOT}/etc/${PN}" "${ROOT}/usr/$(get_libdir)/${PN}" + chmod 750 "${ROOT}/etc/${PN}" +} + +pkg_config() { + use client && return + + # if found /etc/security.gdb from previous install, backup, and restore as + # /etc/security2.fdb + if [ -f "${ROOT}/etc/firebird/security.gdb" ] ; then + # if we have scurity2.fdb already, back it 1st + if [ -f "${ROOT}/etc/firebird/security2.fdb" ] ; then + cp "${ROOT}/etc/firebird/security2.fdb" "${ROOT}/etc/firebird/security2.fdb.old" + fi + gbak -B "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gbk" + gbak -R "${ROOT}/etc/firebird/security.gbk" "${ROOT}/etc/firebird/security2.fdb" + mv "${ROOT}/etc/firebird/security.gdb" "${ROOT}/etc/firebird/security.gdb.old" + rm "${ROOT}/etc/firebird/security.gbk" + + # make sure they are readable only to firebird + chown firebird:firebird "${ROOT}/etc/firebird/{security.*,security2.*}" + chmod 660 "${ROOT}/etc/firebird/{security.*,security2.*}" + + echo + einfo "Converted old security.gdb to security2.fdb, security.gdb has been " + einfo "renamed to security.gdb.old. if you had previous security2.fdb, " + einfo "it's backed to security2.fdb.old (all under ${ROOT}/etc/firebird)." + echo + fi + + # we need to enable local access to the server + if [ ! -f "${ROOT}/etc/hosts.equiv" ] ; then + touch "${ROOT}/etc/hosts.equiv" + chown root:0 "${ROOT}/etc/hosts.equiv" + chmod u=rw,go=r "${ROOT}/etc/hosts.equiv" + fi + + # add 'localhost.localdomain' to the hosts.equiv file... + if [ grep -q 'localhost.localdomain$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then + echo "localhost.localdomain" >> "${ROOT}/etc/hosts.equiv" + einfo "Added localhost.localdomain to ${ROOT}/etc/hosts.equiv" + fi + + # add 'localhost' to the hosts.equiv file... + if [ grep -q 'localhost$' "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then + echo "localhost" >> "${ROOT}/etc/hosts.equiv" + einfo "Added localhost to ${ROOT}/etc/hosts.equiv" + fi + + HS_NAME=`hostname` + if [ grep -q ${HS_NAME} "${ROOT}/etc/hosts.equiv" 2>/dev/null ] ; then + echo "${HS_NAME}" >> "${ROOT}/etc/hosts.equiv" + einfo "Added ${HS_NAME} to ${ROOT}/etc/hosts.equiv" + fi + + einfo "If you're using UDFs, please remember to move them" + einfo "to /usr/lib/firebird/UDF" +} diff --git a/dev-db/firebird/metadata.xml b/dev-db/firebird/metadata.xml new file mode 100644 index 000000000000..118ac1e3f864 --- /dev/null +++ b/dev-db/firebird/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription> + Firebird is a relational database offering many ANSI SQL standard + features that runs on Linux, Windows, and a variety of Unix platforms. + Firebird offers excellent concurrency, high performance, and powerful + language support for stored procedures and triggers. It has been used + in production systems, under a variety of names, since 1981. + </longdescription> + <use> + <flag name="client">Install client library and header files only</flag> + <flag name="superserver">Install SuperServer</flag> + <flag name="xinetd">Install ClassicServer</flag> + </use> + <upstream> + <remote-id type="sourceforge">firebird</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/flamerobin/Manifest b/dev-db/flamerobin/Manifest new file mode 100644 index 000000000000..83abf8e284c3 --- /dev/null +++ b/dev-db/flamerobin/Manifest @@ -0,0 +1 @@ +DIST flamerobin-0.9.2-src.tar.gz 901908 SHA256 b674a1de1c632c834e904a17e576498850e7b81cc5c4d42e8cafd8a6dd020c90 SHA512 76eeecae759ab7aec817a4775fe185f982f6f50f5dec850b1fbb00b56239807867fe36568592e313315c0f02364c1986d9691e84d5fced2aedd85571d239f2be WHIRLPOOL 224481502e893be06236f685c71f15848f9aab372a6adbb91db9f95fc5978f76fe2879c823b3f6ff64cea4bff5269df34475978a7602a47a43bb5146f5182b9a diff --git a/dev-db/flamerobin/files/flamerobin-0.9.2-gcc46.patch b/dev-db/flamerobin/files/flamerobin-0.9.2-gcc46.patch new file mode 100644 index 000000000000..0701a0fa5906 --- /dev/null +++ b/dev-db/flamerobin/files/flamerobin-0.9.2-gcc46.patch @@ -0,0 +1,503 @@ +Index: src/databasehandler.cpp +=================================================================== +--- src/databasehandler.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/databasehandler.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -46,6 +46,7 @@ + class DatabaseInfoHandler: public URIHandler + { + public: ++ DatabaseInfoHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/gui/RestoreFrame.cpp +=================================================================== +--- src/gui/RestoreFrame.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/RestoreFrame.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -258,7 +258,7 @@ + sizerFilename->Add(styleguide().getBrowseButtonMargin(), 0); + sizerFilename->Add(button_browse, 0, wxALIGN_CENTER_VERTICAL); + +- wxGridSizer* sizerChecks = new wxGridSizer(2, 2, ++ wxGridSizer* sizerChecks = new wxGridSizer(3, 2, + styleguide().getCheckboxSpacing(), + styleguide().getUnrelatedControlMargin(wxHORIZONTAL)); + sizerChecks->Add(checkbox_replace, 0, wxEXPAND); +Index: src/gui/ReorderFieldsDialog.cpp +=================================================================== +--- src/gui/ReorderFieldsDialog.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/ReorderFieldsDialog.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -215,6 +215,7 @@ + class ReorderFieldsHandler: public URIHandler + { + public: ++ ReorderFieldsHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/gui/FieldPropertiesDialog.cpp +=================================================================== +--- src/gui/FieldPropertiesDialog.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/FieldPropertiesDialog.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -690,7 +690,7 @@ + + wxT(" IF (NEW.") + fNameSql + wxT(" IS NULL) THEN\n") + + wxT(" NEW.") + fNameSql + wxT(" = GEN_ID(") + + generator.getQuoted() + wxT(", 1);\n") +- + wxT(" ELSE\n BEGIN\n tmp = GEN_ID(") + ++ + wxT(" ELSE\n BEGIN\n tmp = GEN_ID(") + + generator.getQuoted() + wxT(", 0);\n if (tmp < new.") + + fNameSql + wxT(") then\n tmp = GEN_ID(") + + generator.getQuoted() + wxT(", new.") + fNameSql +@@ -816,6 +816,7 @@ + class ColumnPropertiesHandler: public URIHandler + { + public: ++ ColumnPropertiesHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/gui/controls/DBHTreeControl.cpp +=================================================================== +--- src/gui/controls/DBHTreeControl.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/controls/DBHTreeControl.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -261,6 +261,8 @@ + id = ART_View; break; + case ntViews: + id = ART_Views; break; ++ default: ++ break; + } + return getImageIndex(id); + } +Index: src/gui/controls/TextControl.cpp +=================================================================== +--- src/gui/controls/TextControl.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/controls/TextControl.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -40,8 +40,8 @@ + + #include "gui/controls/TextControl.h" + //----------------------------------------------------------------------------- +-TextControl::TextControl(wxWindow *parent, wxWindowID id, long style) +- : wxStyledTextCtrl(parent, id, wxDefaultPosition, wxDefaultSize, style) ++TextControl::TextControl(wxWindow *parent, wxWindowID id) ++ : wxStyledTextCtrl(parent, id) + { + SetWrapMode(wxSTC_WRAP_WORD); + // wxStyledTextCtrl uses black on white initially -> use system defaults +Index: src/gui/controls/LogTextControl.cpp +=================================================================== +--- src/gui/controls/LogTextControl.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/controls/LogTextControl.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -40,8 +40,8 @@ + + #include "gui/controls/LogTextControl.h" + //----------------------------------------------------------------------------- +-LogTextControl::LogTextControl(wxWindow *parent, wxWindowID id, long style) +- : TextControl(parent, id, style) ++LogTextControl::LogTextControl(wxWindow *parent, wxWindowID id) ++ : TextControl(parent, id) + { + setDefaultStyles(); + } +Index: src/gui/controls/TextControl.h +=================================================================== +--- src/gui/controls/TextControl.h (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/controls/TextControl.h (.../rel_0_9_2-1/src) (révision 2085) +@@ -61,8 +61,7 @@ + + DECLARE_EVENT_TABLE() + public: +- TextControl(wxWindow *parent, wxWindowID id = wxID_ANY, +- long style = wxSUNKEN_BORDER); ++ TextControl(wxWindow *parent, wxWindowID id = wxID_ANY); + }; + //----------------------------------------------------------------------------- + #endif +Index: src/gui/controls/LogTextControl.h +=================================================================== +--- src/gui/controls/LogTextControl.h (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/controls/LogTextControl.h (.../rel_0_9_2-1/src) (révision 2085) +@@ -38,8 +38,7 @@ + enum LogStyle { logStyleDefault, logStyleImportant, logStyleError }; + void addStyledText(const wxString& message, LogStyle style); + public: +- LogTextControl(wxWindow *parent, wxWindowID id = wxID_ANY, +- long style = wxSUNKEN_BORDER); ++ LogTextControl(wxWindow *parent, wxWindowID id = wxID_ANY); + + void logErrorMsg(const wxString& message); + void logImportantMsg(const wxString& message); +Index: src/gui/UserDialog.cpp +=================================================================== +--- src/gui/UserDialog.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/UserDialog.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -222,6 +222,7 @@ + class UserPropertiesHandler: public URIHandler + { + public: ++ UserPropertiesHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -300,6 +301,7 @@ + class DropUserHandler: public URIHandler + { + public: ++ DropUserHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/gui/CreateIndexDialog.cpp +=================================================================== +--- src/gui/CreateIndexDialog.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/CreateIndexDialog.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -209,6 +209,7 @@ + class TableIndicesHandler: public URIHandler + { + public: ++ TableIndicesHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/gui/BackupFrame.cpp +=================================================================== +--- src/gui/BackupFrame.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/BackupFrame.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -241,7 +241,7 @@ + sizerFilename->Add(styleguide().getBrowseButtonMargin(), 0); + sizerFilename->Add(button_browse, 0, wxALIGN_CENTER_VERTICAL); + +- wxGridSizer* sizerChecks = new wxGridSizer(2, 2, ++ wxGridSizer* sizerChecks = new wxGridSizer(3, 2, + styleguide().getCheckboxSpacing(), + styleguide().getUnrelatedControlMargin(wxHORIZONTAL)); + sizerChecks->Add(checkbox_checksum, 0, wxEXPAND); +Index: src/gui/PrivilegesDialog.cpp +=================================================================== +--- src/gui/PrivilegesDialog.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/PrivilegesDialog.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -583,6 +583,7 @@ + class ManagePrivilegesHandler: public URIHandler + { + public: ++ ManagePrivilegesHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/gui/MainFrame.cpp +=================================================================== +--- src/gui/MainFrame.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/MainFrame.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -380,6 +380,7 @@ + EVT_MENU(Cmds::Menu_Reconnect, MainFrame::OnMenuReconnect) + EVT_UPDATE_UI(Cmds::Menu_Reconnect, MainFrame::OnMenuUpdateIfDatabaseConnected) + EVT_MENU(Cmds::Menu_RecreateDatabase, MainFrame::OnMenuRecreateDatabase) ++ EVT_UPDATE_UI(Cmds::Menu_RecreateDatabase, MainFrame::OnMenuUpdateIfDatabaseConnected) + EVT_MENU(Cmds::Menu_DropDatabase, MainFrame::OnMenuDropDatabase) + EVT_UPDATE_UI(Cmds::Menu_DropDatabase, MainFrame::OnMenuUpdateIfDatabaseConnected) + EVT_MENU(Cmds::Menu_Query, MainFrame::OnMenuQuery) +@@ -540,8 +541,10 @@ + } + //----------------------------------------------------------------------------- + //! handle double-click on item (or press Enter) +-void MainFrame::OnTreeItemActivate(wxTreeEvent& WXUNUSED(event)) ++void MainFrame::OnTreeItemActivate(wxTreeEvent& event) + { ++ event.Skip(); ++ + wxTreeItemId item = treeMainM->GetSelection(); + if (!item.IsOk()) + return; +Index: src/gui/TriggerWizardDialog.cpp +=================================================================== +--- src/gui/TriggerWizardDialog.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/TriggerWizardDialog.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -178,6 +178,7 @@ + class CreateTriggerHandler: public URIHandler + { + public: ++ CreateTriggerHandler() {}; + bool handleURI(URI& uri); + private: + static const CreateTriggerHandler handlerInstance; +Index: src/gui/EventWatcherFrame.cpp +=================================================================== +--- src/gui/EventWatcherFrame.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/EventWatcherFrame.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -55,15 +55,13 @@ + class EventLogControl: public LogTextControl + { + public: +- EventLogControl(wxWindow* parent, wxWindowID id = wxID_ANY, +- long style = wxSUNKEN_BORDER); ++ EventLogControl(wxWindow* parent, wxWindowID id = wxID_ANY); + void logAction(const wxString& action); + void logEvent(const wxString& name, int count); + }; + //----------------------------------------------------------------------------- +-EventLogControl::EventLogControl(wxWindow* parent, wxWindowID id, +- long style) +- : LogTextControl(parent, id, style) ++EventLogControl::EventLogControl(wxWindow* parent, wxWindowID id) ++ : LogTextControl(parent, id) + { + } + //----------------------------------------------------------------------------- +Index: src/gui/MetadataItemPropertiesFrame.cpp +=================================================================== +--- src/gui/MetadataItemPropertiesFrame.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/MetadataItemPropertiesFrame.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -360,6 +360,8 @@ + case ntDatabase: + case ntRole: + pages.push_back(wxT("DDL")); ++ default: ++ break; + }; + wxString page = loadEntireFile(config().getHtmlTemplatesPath() + + wxT("header.html")); +@@ -1290,6 +1292,7 @@ + class PageHandler: public URIHandler + { + public: ++ PageHandler() {}; + bool handleURI(URI& uri); + private: + static const PageHandler handlerInstance; // singleton; registers itself on creation. +@@ -1327,6 +1330,7 @@ + class PropertiesHandler: public URIHandler + { + public: ++ PropertiesHandler() {}; + bool handleURI(URI& uri); + private: + static const PropertiesHandler handlerInstance; // singleton; registers itself on creation. +Index: src/gui/ExecuteSqlFrame.cpp +=================================================================== +--- src/gui/ExecuteSqlFrame.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/gui/ExecuteSqlFrame.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -2749,6 +2749,7 @@ + class DropColumnHandler: public URIHandler + { + public: ++ DropColumnHandler() {}; + bool handleURI(URI& uri); + private: + static const DropColumnHandler handlerInstance; +@@ -2806,6 +2807,7 @@ + class DropColumnsHandler: public URIHandler + { + public: ++ DropColumnsHandler() {}; + bool handleURI(URI& uri); + private: + static const DropColumnsHandler handlerInstance; +@@ -2842,6 +2844,7 @@ + class DropObjectHandler: public URIHandler + { + public: ++ DropObjectHandler() {}; + bool handleURI(URI& uri); + private: + static const DropObjectHandler handlerInstance; +@@ -2878,6 +2881,7 @@ + class EditDDLHandler: public URIHandler + { + public: ++ EditDDLHandler() {}; + bool handleURI(URI& uri); + private: + static const EditDDLHandler handlerInstance; +@@ -2919,6 +2923,7 @@ + class EditProcedureHandler: public URIHandler + { + public: ++ EditProcedureHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -2947,6 +2952,7 @@ + class AlterViewHandler: public URIHandler + { + public: ++ AlterViewHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -2973,6 +2979,7 @@ + class EditTriggerHandler: public URIHandler + { + public: ++ EditTriggerHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -2999,6 +3006,7 @@ + class EditGeneratorValueHandler: public URIHandler + { + public: ++ EditGeneratorValueHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -3041,6 +3049,7 @@ + class EditExceptionHandler: public URIHandler + { + public: ++ EditExceptionHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -3067,6 +3076,7 @@ + class IndexActionHandler: public URIHandler + { + public: ++ IndexActionHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +@@ -3113,6 +3123,7 @@ + class ActivateTriggersHandler: public URIHandler + { + public: ++ ActivateTriggersHandler() {}; + bool handleURI(URI& uri); + private: + static const ActivateTriggersHandler handlerInstance; +@@ -3160,6 +3171,7 @@ + class ActivateTriggerHandler: public URIHandler + { + public: ++ ActivateTriggerHandler() {}; + bool handleURI(URI& uri); + private: + static const ActivateTriggerHandler handlerInstance; +Index: src/images.cpp +=================================================================== +--- src/images.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/images.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -68,6 +68,8 @@ + return wxArtProvider::GetIcon(ART_Trigger, wxART_OTHER, sz); + case ntView: + return wxArtProvider::GetIcon(ART_View, wxART_OTHER, sz); ++ default: ++ break; + } + return wxArtProvider::GetIcon(ART_FlameRobin, wxART_OTHER, sz); + } +Index: src/objectdescriptionhandler.cpp +=================================================================== +--- src/objectdescriptionhandler.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/objectdescriptionhandler.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -46,6 +46,7 @@ + class ObjectDescriptionHandler: public URIHandler + { + public: ++ ObjectDescriptionHandler() {}; + bool handleURI(URI& uri); + private: + // singleton; registers itself on creation. +Index: src/addconstrainthandler.cpp +=================================================================== +--- src/addconstrainthandler.cpp (.../rel_0_9_2/src) (révision 2085) ++++ src/addconstrainthandler.cpp (.../rel_0_9_2-1/src) (révision 2085) +@@ -1,5 +1,5 @@ + /* +- Copyright (c) 2004-2009 The FlameRobin Development Team ++ Copyright (c) 2004-2011 The FlameRobin Development Team + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the +@@ -51,6 +51,8 @@ + class AddConstraintHandler: public URIHandler + { + public: ++ AddConstraintHandler() {}; ++ + bool handleURI(URI& uri); + private: + static const AddConstraintHandler handlerInstance; // singleton; registers itself on creation. diff --git a/dev-db/flamerobin/flamerobin-0.9.2.ebuild b/dev-db/flamerobin/flamerobin-0.9.2.ebuild new file mode 100644 index 000000000000..7e92ac8b3949 --- /dev/null +++ b/dev-db/flamerobin/flamerobin-0.9.2.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +WX_GTK_VER="2.8" +inherit eutils wxwidgets + +DESCRIPTION="A database administration tool for Firebird DBMS" +HOMEPAGE="http://www.flamerobin.org/" +SRC_URI="mirror://sourceforge/${PN}/${P}-src.tar.gz" + +LICENSE="MIT IBPP-1.1 LGPL-2.1+" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RDEPEND="x11-libs/wxGTK:2.8[X] + dev-db/firebird" + +DEPEND="${RDEPEND}" + +S="${WORKDIR}/${P}-src" + +src_prepare() { + epatch "${FILESDIR}/${P}-gcc46.patch" +} + +src_configure() { + # temp hack since configure is not executable + chmod +x configure + + local myconf + myconf="${myconf} \ + --disable-shared \ + --disable-debug \ + --with-wx=yes \ + --with-wx-config=${WX_CONFIG}" + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + dodoc devdocs/* docs/* docs-src/* +} diff --git a/dev-db/flamerobin/metadata.xml b/dev-db/flamerobin/metadata.xml new file mode 100644 index 000000000000..676780a80213 --- /dev/null +++ b/dev-db/flamerobin/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription> + FlameRobin is a database administration tool for Firebird DBMS. + FlameRobin is lightweight (small footprint, fast execution) and + dependent only on other Open Source software + </longdescription> + <upstream> + <remote-id type="sourceforge">flamerobin</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/freetds/Manifest b/dev-db/freetds/Manifest new file mode 100644 index 000000000000..d848f3a2118c --- /dev/null +++ b/dev-db/freetds/Manifest @@ -0,0 +1 @@ +DIST freetds-0.91.tar.gz 2136329 SHA256 6a8148bd803aebceac6862b0dead1c5d9659f7e1038993abfe0ce8febb322465 SHA512 4dadafe49848ab5505b0fa5bd650e19e7652c3e1181d3c49f087c50ed055f395eaf5917a99744ed3594e4af9032c4e18f397af58fb1010e695ac2c0bc601b5e3 WHIRLPOOL 63662b56011edb6d22ce28cc7bad3af272ff81862f0d8ff65b113af260e3c8d05a9d941c1cf4b8039b99f460c3a5c8364dd69d42d8e98c0c92530462f732dec2 diff --git a/dev-db/freetds/files/freetds-0.91-fix_field_aliases.patch b/dev-db/freetds/files/freetds-0.91-fix_field_aliases.patch new file mode 100644 index 000000000000..c5699af5d1d9 --- /dev/null +++ b/dev-db/freetds/files/freetds-0.91-fix_field_aliases.patch @@ -0,0 +1,21 @@ +Gentoo bug: 498374 + +diff -Nru freetds-0.91/src/odbc/odbc.c freetds-0.91/src/odbc/odbc.c +--- freetds-0.91/src/odbc/odbc.c.orig 2010-03-22 09:42:16.000000000 -0500 ++++ freetds-0.91/src/odbc/odbc.c 2010-05-06 16:00:00.000000000 -0500 +@@ -3012,12 +3012,9 @@ + + odbc_set_sql_type_info(col, drec, stmt->dbc->env->attr.odbc_version); + +- if (!col->table_column_name) { +- if (!tds_dstr_copyn(&drec->sql_desc_name, col->column_name, col->column_namelen)) +- return SQL_ERROR; +- } else { +- if (!tds_dstr_copy(&drec->sql_desc_name, col->table_column_name)) +- return SQL_ERROR; ++ if (!tds_dstr_copyn(&drec->sql_desc_name, col->column_name, col->column_namelen)) ++ return SQL_ERROR; ++ if (col->table_column_name) { + if (!tds_dstr_copy(&drec->sql_desc_base_column_name, col->table_column_name)) + return SQL_ERROR; + } diff --git a/dev-db/freetds/freetds-0.91-r1.ebuild b/dev-db/freetds/freetds-0.91-r1.ebuild new file mode 100644 index 000000000000..868c23521774 --- /dev/null +++ b/dev-db/freetds/freetds-0.91-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools eutils + +DESCRIPTION="Tabular Datastream Library" +HOMEPAGE="http://www.freetds.org/" +SRC_URI="http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos" +IUSE="kerberos odbc iodbc mssql" +RESTRICT="test" + +DEPEND=" + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + odbc? ( dev-db/unixODBC )" +RDEPEND="${DEPEND}" + +src_prepare() { + config_rpath_update + sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' configure.ac || die + epatch ${FILESDIR}/freetds-0.91-fix_field_aliases.patch + eautoreconf +} + +src_configure() { + local myconf="--with-tdsver=7.0 $(use_enable mssql msdblib)" + + if use iodbc ; then + myconf="${myconf} --enable-odbc --with-iodbc=${EPREFIX}/usr" + elif use odbc ; then + myconf="${myconf} --enable-odbc --with-unixodbc=${EPREFIX}/usr" + fi + if use kerberos ; then + myconf="${myconf} --enable-krb5" + fi + + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" DOCDIR="doc/${PF}" install +} diff --git a/dev-db/freetds/freetds-0.91.ebuild b/dev-db/freetds/freetds-0.91.ebuild new file mode 100644 index 000000000000..76d8f6241265 --- /dev/null +++ b/dev-db/freetds/freetds-0.91.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools + +DESCRIPTION="Tabular Datastream Library" +HOMEPAGE="http://www.freetds.org/" +SRC_URI="http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos" +IUSE="kerberos odbc iodbc mssql" +RESTRICT="test" + +DEPEND=" + iodbc? ( dev-db/libiodbc ) + kerberos? ( virtual/krb5 ) + odbc? ( dev-db/unixODBC )" +RDEPEND="${DEPEND}" + +src_prepare() { + config_rpath_update + sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' configure.ac || die + eautoreconf +} + +src_configure() { + local myconf="--with-tdsver=7.0 $(use_enable mssql msdblib)" + + if use iodbc ; then + myconf="${myconf} --enable-odbc --with-iodbc=${EPREFIX}/usr" + elif use odbc ; then + myconf="${myconf} --enable-odbc --with-unixodbc=${EPREFIX}/usr" + fi + if use kerberos ; then + myconf="${myconf} --enable-krb5" + fi + + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" DOCDIR="doc/${PF}" install +} diff --git a/dev-db/freetds/metadata.xml b/dev-db/freetds/metadata.xml new file mode 100644 index 000000000000..746c6938cae7 --- /dev/null +++ b/dev-db/freetds/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>olemarkus@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/gigabase/Manifest b/dev-db/gigabase/Manifest new file mode 100644 index 000000000000..d3d9a462147e --- /dev/null +++ b/dev-db/gigabase/Manifest @@ -0,0 +1 @@ +DIST gigabase-3.83.tar.gz 1746301 SHA256 0d627fa41ce0b3336b08738bf00cfc41ef5ddc8eb91c11f6a621d0e6f2e65607 SHA512 df2eab9b8ceae831c24a25f010cf06ebdd38fdf2f7478116b0d769092d6e4575c5c95222562410752df462a8bf3cc2f205c05d3adfaeb1634e82f443529957e5 WHIRLPOOL 4be91ddc164b96346e8d69c00f1467c2c90676e5c3225f54a8d7d2436f59d5ef3cd41658e7061a41945e1a29c86bea5f33731c13df1442320210b1905f7d1778 diff --git a/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch new file mode 100644 index 000000000000..b96f47bc2130 --- /dev/null +++ b/dev-db/gigabase/files/gigabase-3.83-fix-dereferencing.patch @@ -0,0 +1,188 @@ +Index: session.cpp +=================================================================== +--- session.cpp (revision 15) ++++ session.cpp (revision 16) +@@ -131,7 +131,7 @@ + throw CursorException("Cursor is not opened"); + } + fillBuffer(sizeof(oid_t)); +- oid_t currOid = *(oid_t*)&sockBuf[bufPos]; ++ oid_t currOid = *(oid_t*)(sockBuf + bufPos); + bufPos += sizeof(oid_t); + if (currObj != NULL) { + delete[] currObj; +@@ -139,7 +139,7 @@ + } + if (currOid != 0) { + fillBuffer(sizeof(int)); +- size_t size = *(int*)&sockBuf[bufPos]; ++ size_t size = *(int*)(sockBuf + bufPos); + if (size <= SOCKET_BUFFER_SIZE) { + fillBuffer(size); + if (record != NULL) { +Index: database.cpp +=================================================================== +--- database.cpp (revision 15) ++++ database.cpp (revision 16) +@@ -739,40 +739,55 @@ + return; + + case dbvmInvokeMethodBool: +- execute(expr->ref.base, iattr, sattr); +- expr->ref.field->method->invoke(sattr.base, &sattr.bvalue); +- sattr.bvalue = *(bool*)&sattr.bvalue; +- iattr.free(sattr); +- return; ++ { ++ bool val; ++ execute(expr->ref.base, iattr, sattr); ++ expr->ref.field->method->invoke(sattr.base, &val); ++ sattr.bvalue = val; ++ iattr.free(sattr); ++ return; ++ } + case dbvmInvokeMethodInt1: +- execute(expr->ref.base, iattr, sattr); +- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue); +- sattr.ivalue = *(int1*)&sattr.ivalue; +- iattr.free(sattr); +- return; ++ { ++ int1 val; ++ execute(expr->ref.base, iattr, sattr); ++ expr->ref.field->method->invoke(sattr.base, &val); ++ sattr.ivalue = val; ++ iattr.free(sattr); ++ return; ++ } + case dbvmInvokeMethodInt2: +- execute(expr->ref.base, iattr, sattr); +- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue); +- sattr.ivalue = *(int2*)&sattr.ivalue; +- iattr.free(sattr); +- return; ++ { ++ int2 val; ++ execute(expr->ref.base, iattr, sattr); ++ expr->ref.field->method->invoke(sattr.base, &val); ++ sattr.ivalue = val; ++ iattr.free(sattr); ++ return; ++ } + case dbvmInvokeMethodInt4: +- execute(expr->ref.base, iattr, sattr); +- expr->ref.field->method->invoke(sattr.base, &sattr.ivalue); +- sattr.ivalue = *(int4*)&sattr.ivalue; +- iattr.free(sattr); +- return; ++ { ++ int4 val; ++ execute(expr->ref.base, iattr, sattr); ++ expr->ref.field->method->invoke(sattr.base, &val); ++ sattr.ivalue = val; ++ iattr.free(sattr); ++ return; ++ } + case dbvmInvokeMethodInt8: + execute(expr->ref.base, iattr, sattr); + expr->ref.field->method->invoke(sattr.base, &sattr.ivalue); + iattr.free(sattr); + return; + case dbvmInvokeMethodReal4: +- execute(expr->ref.base, iattr, sattr); +- expr->ref.field->method->invoke(sattr.base, &sattr.fvalue); +- sattr.fvalue = *(real4*)&sattr.fvalue; +- iattr.free(sattr); +- return; ++ { ++ real4 val; ++ execute(expr->ref.base, iattr, sattr); ++ expr->ref.field->method->invoke(sattr.base, &val); ++ sattr.fvalue = val; ++ iattr.free(sattr); ++ return; ++ } + case dbvmInvokeMethodReal8: + execute(expr->ref.base, iattr, sattr); + expr->ref.field->method->invoke(sattr.base, &sattr.fvalue); +@@ -792,28 +807,43 @@ + return; + + case dbvmInvokeSelfMethodBool: +- expr->ref.field->method->invoke(iattr.record, &sattr.bvalue); +- sattr.bvalue = *(bool*)&sattr.bvalue; +- return; ++ { ++ bool val; ++ expr->ref.field->method->invoke(iattr.record, &val); ++ sattr.bvalue = val; ++ return; ++ } + case dbvmInvokeSelfMethodInt1: +- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue); +- sattr.ivalue = *(int1*)&sattr.ivalue; +- return; ++ { ++ int1 val; ++ expr->ref.field->method->invoke(iattr.record, &val); ++ sattr.ivalue = val; ++ return; ++ } + case dbvmInvokeSelfMethodInt2: +- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue); +- sattr.ivalue = *(int2*)&sattr.ivalue; +- return; ++ { ++ int2 val; ++ expr->ref.field->method->invoke(iattr.record, &val); ++ sattr.ivalue = val; ++ return; ++ } + case dbvmInvokeSelfMethodInt4: +- expr->ref.field->method->invoke(iattr.record, &sattr.ivalue); +- sattr.ivalue = *(int4*)&sattr.ivalue; +- return; ++ { ++ int4 val; ++ expr->ref.field->method->invoke(iattr.record, &val); ++ sattr.ivalue = val; ++ return; ++ } + case dbvmInvokeSelfMethodInt8: + expr->ref.field->method->invoke(iattr.record, &sattr.ivalue); + return; + case dbvmInvokeSelfMethodReal4: +- expr->ref.field->method->invoke(iattr.record, &sattr.fvalue); +- sattr.fvalue = *(real4*)&sattr.fvalue; +- return; ++ { ++ real4 val; ++ expr->ref.field->method->invoke(iattr.record, &val); ++ sattr.fvalue = *(real4*)&sattr.fvalue; ++ return; ++ } + case dbvmInvokeSelfMethodReal8: + expr->ref.field->method->invoke(iattr.record, &sattr.fvalue); + return; +Index: server.cpp +=================================================================== +--- server.cpp (revision 15) ++++ server.cpp (revision 16) +@@ -2097,7 +2097,7 @@ + bufUsed = 0; + } + oid_t oid = cursor.getOid(); +- *(oid_t*)&buf[bufUsed] = oid; ++ *(oid_t*)(buf + bufUsed) = oid; + bufUsed += sizeof(oid_t); + dbRecord* record = db->getRow(tie, oid); + size_t size = record->size; +@@ -2129,7 +2129,7 @@ + bufUsed = 0; + } + } +- *(oid_t*)&buf[bufUsed] = 0; ++ *(oid_t*)(buf + bufUsed) = 0; + return session->sock->write(buf, bufUsed + sizeof(oid_t)); + } + diff --git a/dev-db/gigabase/gigabase-3.83-r1.ebuild b/dev-db/gigabase/gigabase-3.83-r1.ebuild new file mode 100644 index 000000000000..671323a643bc --- /dev/null +++ b/dev-db/gigabase/gigabase-3.83-r1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" +inherit eutils multilib + +DESCRIPTION="OO-DBMS with interfaces for C/C++/Java/PHP/Perl" +HOMEPAGE="http://www.garret.ru/~knizhnik/gigabase.html" +SRC_URI="mirror://sourceforge/gigabase/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="doc static-libs" + +DEPEND="doc? ( app-doc/doxygen )" +RDEPEND="" + +S="${WORKDIR}/${PN}" + +src_prepare() { + epatch "${FILESDIR}/${P}-fix-dereferencing.patch" +} + +src_configure() { + mf="${S}/Makefile" + + econf $(use_enable static-libs static) + sed -r -i -e 's/subsql([^\.]|$)/subsql-gdb\1/' ${mf} || die +} + +src_compile() { + emake + use doc && { doxygen doxygen.cfg || die; } +} + +src_test() { + pwd + cd "${S}" + local TESTS + local -i failcnt=0 + TESTS="testddl testidx testidx2 testiref testleak testperf testperf2 testspat testtl testsync testtimeseries" + + for t in ${TESTS}; do + ./${t} || { ewarn "$t fails"; failcnt+=1; } + done + [[ $failcnt != 0 ]] && die "See warnings above for tests that failed" +} + +src_install() { + einstall + prune_libtool_files + + dodoc CHANGES + use doc && dohtml GigaBASE.htm + use doc && dohtml -r docs/html/* +} + +pkg_postinst() { + elog "The subsql binary has been renamed to subsql-gdb," + elog "to avoid a name clash with the FastDB version of subsql" +} diff --git a/dev-db/gigabase/metadata.xml b/dev-db/gigabase/metadata.xml new file mode 100644 index 000000000000..54fa7cc408be --- /dev/null +++ b/dev-db/gigabase/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <longdescription lang="en"> + Object-Relational Database Management System GigaBASE inherits most of the + features of FastDB, but uses page pool instead of direct mapping of file on + virtual memory. So GigaBASE is able to handle database, which size + significantly exceeds size of computer physical memory. Convenient and + flexible C++ interface makes development of application for GigaBASE very + easy and automatic scheme evaluation simplifies maintenance and modification + of the system. GigaBASE merges best features of relational (simple data + structure and non-procedural query language) and object-oriented (direct + object references, user defined types and methods) databases. GigaBASE is + primary oriented on application requiring fast data retrieving by means of + indices and direct object references, such as Web Server databases + applications. SUBSQL utility can be used for database browsing and + inspection, performing online backups, database recovery, importing data to + and exporting data from database. GigaBASE will perform automatic recovery + after system or application crash, you should not worry about it. The only + thing you can have to do manually is stopping all database application if + one of them is crashed leaving database blocked. + </longdescription> + <upstream> + <remote-id type="sourceforge">gigabase</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/go-etcd/Manifest b/dev-db/go-etcd/Manifest new file mode 100644 index 000000000000..f33f5b54a665 --- /dev/null +++ b/dev-db/go-etcd/Manifest @@ -0,0 +1,2 @@ +DIST go-etcd-0_p20141013.tar.gz 18214 SHA256 1f23919939588fbdc76dc40977f20d47fe67e633be24f53e4042122a942f867e SHA512 af07b2434bbad219962e989ca1d6ccb86bb40f698aa3f2b681ac04094dc7e878593af6a54e9c1e976d1aeb451661d8100295b0637291b46bafa45452537f1575 WHIRLPOOL 6cfb874e90bc43d643eb9b3db59e9d7c914614adfcb34db642b794c645823863cdab70c72b0e60abda2dc97dc1c526bc2d8c4c28d7c32811fcc9798744b4beaa +DIST go-etcd-2.0.0.tar.gz 18214 SHA256 1f23919939588fbdc76dc40977f20d47fe67e633be24f53e4042122a942f867e SHA512 af07b2434bbad219962e989ca1d6ccb86bb40f698aa3f2b681ac04094dc7e878593af6a54e9c1e976d1aeb451661d8100295b0637291b46bafa45452537f1575 WHIRLPOOL 6cfb874e90bc43d643eb9b3db59e9d7c914614adfcb34db642b794c645823863cdab70c72b0e60abda2dc97dc1c526bc2d8c4c28d7c32811fcc9798744b4beaa diff --git a/dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild b/dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild new file mode 100644 index 000000000000..8ea0f6d7fd64 --- /dev/null +++ b/dev-db/go-etcd/go-etcd-0_p20141013-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +KEYWORDS="~amd64" +DESCRIPTION="Go client library for etcd" +GO_PN=github.com/coreos/${PN} +HOMEPAGE="https://${GO_PN}" +EGIT_COMMIT="25e2c63be8e8ab405014a78879e0992ae5ff55e8" +SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" +DEPEND=">=dev-lang/go-1.4" +RDEPEND="" +S=${WORKDIR} + +src_unpack() { + default_src_unpack + mkdir -p src/${GO_PN%/*} || die + mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die +} + +src_compile() { + # Create a filtered GOROOT tree out of symlinks, + # excluding go-etcd, for bug #503324. + cp -sR /usr/lib/go goroot || die + rm -rf goroot/src/${GO_PN} || die + rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die + GOROOT=${WORKDIR}/goroot GOPATH=${WORKDIR} \ + go install -x ${GO_PN}/etcd || die +} + +src_install() { + insopts -m0644 -p # preserve timestamps for bug 551486 + insinto /usr/lib/go + doins -r pkg + insinto /usr/lib/go/src + find src/${GO_PN} -name .gitignore -delete + doins -r src/* +} diff --git a/dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild b/dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild new file mode 100644 index 000000000000..79358b57b672 --- /dev/null +++ b/dev-db/go-etcd/go-etcd-2.0.0-r1.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +KEYWORDS="~amd64" +DESCRIPTION="Go client library for etcd" +GO_PN=github.com/coreos/${PN} +HOMEPAGE="https://${GO_PN}" +EGIT_COMMIT="25e2c63be8e8ab405014a78879e0992ae5ff55e8" +SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" +DEPEND=">=dev-lang/go-1.4:=" +RDEPEND="" +S=${WORKDIR} + +src_unpack() { + default_src_unpack + mkdir -p src/${GO_PN%/*} || die + mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die +} + +src_compile() { + # Create a filtered GOROOT tree out of symlinks, + # excluding go-etcd, for bug #503324. + cp -sR /usr/lib/go goroot || die + rm -rf goroot/src/${GO_PN} || die + rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die + GOROOT=${WORKDIR}/goroot GOPATH=${WORKDIR} \ + go install -x ${GO_PN}/etcd || die +} + +src_install() { + insopts -m0644 -p # preserve timestamps for bug 551486 + insinto /usr/lib/go + doins -r pkg + insinto /usr/lib/go/src + find src/${GO_PN} -name .gitignore -delete + doins -r src/* +} diff --git a/dev-db/go-etcd/go-etcd-2.0.0.ebuild b/dev-db/go-etcd/go-etcd-2.0.0.ebuild new file mode 100644 index 000000000000..8ea0f6d7fd64 --- /dev/null +++ b/dev-db/go-etcd/go-etcd-2.0.0.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +KEYWORDS="~amd64" +DESCRIPTION="Go client library for etcd" +GO_PN=github.com/coreos/${PN} +HOMEPAGE="https://${GO_PN}" +EGIT_COMMIT="25e2c63be8e8ab405014a78879e0992ae5ff55e8" +SRC_URI="https://${GO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +LICENSE="Apache-2.0" +SLOT="0" +IUSE="" +DEPEND=">=dev-lang/go-1.4" +RDEPEND="" +S=${WORKDIR} + +src_unpack() { + default_src_unpack + mkdir -p src/${GO_PN%/*} || die + mv ${PN}-${EGIT_COMMIT} src/${GO_PN} || die +} + +src_compile() { + # Create a filtered GOROOT tree out of symlinks, + # excluding go-etcd, for bug #503324. + cp -sR /usr/lib/go goroot || die + rm -rf goroot/src/${GO_PN} || die + rm -rf goroot/pkg/linux_${ARCH}/${GO_PN} || die + GOROOT=${WORKDIR}/goroot GOPATH=${WORKDIR} \ + go install -x ${GO_PN}/etcd || die +} + +src_install() { + insopts -m0644 -p # preserve timestamps for bug 551486 + insinto /usr/lib/go + doins -r pkg + insinto /usr/lib/go/src + find src/${GO_PN} -name .gitignore -delete + doins -r src/* +} diff --git a/dev-db/go-etcd/metadata.xml b/dev-db/go-etcd/metadata.xml new file mode 100644 index 000000000000..2d6fe69da263 --- /dev/null +++ b/dev-db/go-etcd/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <upstream> + <bugs-to>https://github.com/coreos/go-etcd/issues</bugs-to> + <changelog>https://github.com/coreos/go-etcd/commits/master</changelog> + <doc>https://godoc.org/github.com/coreos/go-etcd/etcd</doc> + <remote-id type="github">coreos/go-etcd</remote-id> + </upstream> + <maintainer> + <email>zmedico@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/haildb/Manifest b/dev-db/haildb/Manifest new file mode 100644 index 000000000000..2d449395fe32 --- /dev/null +++ b/dev-db/haildb/Manifest @@ -0,0 +1 @@ +DIST haildb-2.3.2.tar.gz 1687216 SHA256 4dff658c27d68c1c72b8e985fa9c20ad0e2095a573cca13c77c7ffb582f8c0af SHA512 4e3cf9a90242c27a61b4aa93903ee2e2e329613ae939332ae969901409824eb185310e0145c5728aca058af664f95bb7ffa60448ede9b8c216318db9f9ce49fd WHIRLPOOL 81a3abe16e8447964d898417a7f565adf41de02725f88bc1e085c5c298f172821348ecdd2f7eaf0a6fb024c0894461b0a3ff83f0d1f47abb8ada76ad46fecb96 diff --git a/dev-db/haildb/haildb-2.3.2.ebuild b/dev-db/haildb/haildb-2.3.2.ebuild new file mode 100644 index 000000000000..852ecc584d5e --- /dev/null +++ b/dev-db/haildb/haildb-2.3.2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit versionator flag-o-matic + +DESCRIPTION="a relational database in shared library form" +HOMEPAGE="http://www.haildb.com/" +SRC_URI="http://launchpad.net/haildb/$(get_version_component_range 1-2)/cairo/+download/${P}.tar.gz" +LICENSE="GPL-2 MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug tcmalloc zlib" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + sys-devel/bison" + +src_configure() { + local myconf + + if use debug; then + # Since --with-debug would turn off optimisations as well as + # enabling debug, we just enable debug through the + # preprocessor then. + append-flags -DDEBUG + else + myconf="${myconf} --disable-assert" + fi + + # never allow it to find valgrind, easier this way + export ac_cv_header_valgrind_memcheck_h=no + + econf \ + --disable-static \ + --disable-dependency-tracking \ + --enable-fast-install \ + --disable-silent-rules \ + --disable-mtmalloc \ + $(use_enable zlib compression) \ + $(use_enable tcmalloc) \ + ${myconf} \ + || die "econf failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "install failed" + dodoc ChangeLog README || die + + find "${D}" -name '*.la' -delete || die +} diff --git a/dev-db/haildb/metadata.xml b/dev-db/haildb/metadata.xml new file mode 100644 index 000000000000..7a25688345ec --- /dev/null +++ b/dev-db/haildb/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>pavel.stratil-jun@fenix.cz</email> + <description>Proxied co-maintainer, assign bugs to him</description> + </maintainer> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <use> + <flag name="zlib"> + Add support for compressed tables through + <pkg>sys-libs/zlib</pkg>. + </flag> + <flag name="debug"> + Enable extra debug codepaths and assertions. If disabled, both + the debug code and assertions are removed from the resulting + binaries. Optimisations are untouched. + </flag> + </use> + <upstream> + <remote-id type="launchpad">haildb</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/henplus/Manifest b/dev-db/henplus/Manifest new file mode 100644 index 000000000000..b913ec27c6ec --- /dev/null +++ b/dev-db/henplus/Manifest @@ -0,0 +1 @@ +DIST henplus-0.9.8.tar.gz 233035 SHA256 ea7ca363d0503317235e97f66aa0efefe44463d8445e88b304ec0ac1748fe1ff SHA512 a22fc847f4441f627c1fa12f4f365c38d0c8ddfc205758d044e797e83f8d37032995666c2ee3dbb68d0a5f563fa5d574886e85757b1faa0acfc055e92b2fad0b WHIRLPOOL 82236dcde4865049b97d89dc02bbe062e74fbb002bdebd301400fbb84d28a4a196c7bf206fe279c881e47661216c18e5356fe6ff7170f46c6ee1c01cdb61f42e diff --git a/dev-db/henplus/files/0.9.8-build.xml.patch b/dev-db/henplus/files/0.9.8-build.xml.patch new file mode 100644 index 000000000000..e2763978080e --- /dev/null +++ b/dev-db/henplus/files/0.9.8-build.xml.patch @@ -0,0 +1,23 @@ +diff -ur henplus-0.9.8.old/build.xml henplus-0.9.8/build.xml +--- henplus-0.9.8.old/build.xml 2009-05-01 23:51:41.000000000 +0300 ++++ henplus-0.9.8/build.xml 2009-05-01 23:52:31.000000000 +0300 +@@ -33,13 +33,13 @@ + <pathelement path="${classes}" /> + </path> + +- <taskdef name="ant-server" classname="net.sweetohm.ant.server.ServerTask"> +- <classpath> +- <pathelement location="${lib}/build/sat-0.7.jar" /> +- </classpath> +- </taskdef> +- + <target name="server"> ++ <taskdef name="ant-server" classname="net.sweetohm.ant.server.ServerTask"> ++ <classpath> ++ <pathelement location="${lib}/build/sat-0.7.jar" /> ++ </classpath> ++ </taskdef> ++ + <ant-server/> + </target> + diff --git a/dev-db/henplus/files/henplus-0.9.7-build.xml.patch b/dev-db/henplus/files/henplus-0.9.7-build.xml.patch new file mode 100644 index 000000000000..2e4a43a039e3 --- /dev/null +++ b/dev-db/henplus/files/henplus-0.9.7-build.xml.patch @@ -0,0 +1,34 @@ +--- build.xml.orig 2006-10-17 22:25:57.000000000 +0200 ++++ build.xml 2006-10-17 22:27:34.000000000 +0200 +@@ -21,26 +21,26 @@ + <property name="libreadline-java" value="libreadline-java-0.8.0.jar"/> + + <path id="compile.classpath"> +- <fileset dir="${lib}"> +- <include name="${libreadline-java}"/> +- <include name="${commons-cli}"/> +- </fileset> ++ <fileset dir="${lib}" includes="**/*.jar"/> + </path> + + <path id="run.classpath"> + <path refid="compile.classpath" /> + <pathelement path="${classes}" /> + </path> +- ++ ++ <!-- + <taskdef name="ant-server" classname="net.sweetohm.ant.server.ServerTask"> + <classpath> + <pathelement location="${lib}/build/sat-0.7.jar" /> + </classpath> + </taskdef> ++ + + <target name="server"> + <ant-server/> + </target> ++ --> + + <target name="prepare"> + <tstamp> diff --git a/dev-db/henplus/files/henplus.patch b/dev-db/henplus/files/henplus.patch new file mode 100644 index 000000000000..abc92d364d70 --- /dev/null +++ b/dev-db/henplus/files/henplus.patch @@ -0,0 +1,42 @@ +--- a/bin/henplus 2004-02-02 14:53:28.000000000 +0100 ++++ b/bin/henplus 2004-07-23 11:21:11.518166136 +0200 +@@ -2,6 +2,7 @@ + # $Id$ + ## + ++echo $(dirname $0) + # additional flags you might want to pass to the java interpreter + # like -Dfile.encoding=ISO-8859-1 + JAVA_FLAGS= +@@ -13,20 +14,8 @@ + JAVA=$JAVA_HOME/bin/java + fi + +-##------------------ +-THISDIR=`dirname $0` +-HENPLUSDIR=$THISDIR/../share/henplus +- +-# not yet installed ? Then look in the build directory +-if [ ! -d "$HENPLUSDIR" ] ; then +- HENPLUSDIR=$THISDIR/../build +-fi +- +-# location of the readline lib. +-# Modify this, if you installation stores this at a different +-# position. +-LD_LIBRARY_PATH=$THISDIR/../lib:/usr/lib/jni:$LD_LIBRARY_PATH +-CLASSPATH=$CLASSPATH:$THISDIR/../share/java/libreadline-java.jar ++HENPLUSDIR=$(dirname $(java-config -p henplus)) ++CLASSPATH=$CLASSPATH:$(java-config -p libreadline-java) + + # you may just throw your own jar files in this dir. + # (like additional JDBC-drivers, that are not in default +@@ -65,7 +54,4 @@ + CLASSPATH=$CLASSPATH:$f + fi + done +- +-export CLASSPATH LD_LIBRARY_PATH +- +-exec $JAVA $JAVA_FLAGS henplus.HenPlus "$@" ++LD_LIBRARY_PATH="$(java-config -i libreadline-java):$LD_LIBRARY_PATH" exec $JAVA -cp $CLASSPATH $JAVA_FLAGS henplus.HenPlus "$@" diff --git a/dev-db/henplus/files/henplus.pre b/dev-db/henplus/files/henplus.pre new file mode 100755 index 000000000000..c29585e369fa --- /dev/null +++ b/dev-db/henplus/files/henplus.pre @@ -0,0 +1,51 @@ +# +# Based on the upstream script but parts not relevant to Gentoo +# stripped away. We would not need this at all but better to make +# this behave as the upstream docs say and then also have all the +# Gentoo goodies. +# https://bugs.gentoo.org/show_bug.cgi?id=176185 + +##------------------ +THISDIR=`dirname $0` +# install layout is: script in /usr/bin/henplus and libs in /usr/share/henplus +HENPLUSDIR=$THISDIR/../share/henplus + +# you may just throw your own jar files in this dir. +# (like additional JDBC-drivers, that are not in default +# classpath) +for f in $HENPLUSDIR/*.jar $HENPLUSDIR/*.zip ; do + if [ -r "$f" ] ; then + CLASSPATH=$CLASSPATH:$f + fi +done + +# starting at the current directory we look for additional +# JDBC-drivers in .henplus/lib-directories up the path. +# if no directory like that has been found the one in the +# home directory will be used +DIR=`pwd` +CUSTOM_HENPLUSDIR="" + +while [ $DIR != "/" ] ; do + if [ -d $DIR"/.henplus/lib" ]; then + CUSTOM_HENPLUSDIR=$DIR"/.henplus/lib" + break + fi + DIR=`dirname $DIR` +done + +if [ -z $CUSTOM_HENPLUSDIR ]; then + if [ -d "/.henplus/lib" ]; then + CUSTOM_HENPLUSDIR="/.henplus/lib" + else + CUSTOM_HENPLUSDIR=$HOME/.henplus/lib + fi +fi + +for f in $CUSTOM_HENPLUSDIR/*.jar $CUSTOM_HENPLUSDIR/*.zip ; do + if [ -r "$f" ] ; then + CLASSPATH=$CLASSPATH:$f + fi +done + +export CLASSPATH diff --git a/dev-db/henplus/henplus-0.9.8-r1.ebuild b/dev-db/henplus/henplus-0.9.8-r1.ebuild new file mode 100644 index 000000000000..20cd62e2a6a3 --- /dev/null +++ b/dev-db/henplus/henplus-0.9.8-r1.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 eutils java-ant-2 + +DESCRIPTION="Java-based multisession SQL shell for databases with JDBC support" +HOMEPAGE="http://henplus.sf.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +COMMON_DEPEND="dev-java/commons-cli:1 + dev-java/libreadline-java:0" +RDEPEND=">=virtual/jre-1.6 + ${COMMON_DEPEND}" +DEPEND=">=virtual/jdk-1.6 + ${COMMON_DEPEND}" + +java_prepare() { + epatch "${FILESDIR}/0.9.8-build.xml.patch" + rm -v lib/*.jar lib/*/*.jar || die +} + +JAVA_ANT_REWRITE_CLASSPATH="true" +EANT_GENTOO_CLASSPATH="commons-cli-1,libreadline-java" + +src_install () { + java-pkg_dojar "build/${PN}.jar" + + java-pkg_dolauncher ${PN} -pre "${FILESDIR}/${PN}.pre" \ + --main henplus.HenPlus + + dodoc README || die + dohtml doc/HenPlus.html || die + + use doc && java-pkg_dojavadoc javadoc/api + use source && java-pkg_dosrc "src/${PN}" +} diff --git a/dev-db/henplus/henplus-0.9.8.ebuild b/dev-db/henplus/henplus-0.9.8.ebuild new file mode 100644 index 000000000000..52df2f721b98 --- /dev/null +++ b/dev-db/henplus/henplus-0.9.8.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" +JAVA_PKG_IUSE="doc source" + +inherit java-pkg-2 eutils java-ant-2 + +DESCRIPTION="Java-based multisession SQL shell for databases with JDBC support" +HOMEPAGE="http://henplus.sf.net" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="" + +COMMON_DEPEND="dev-java/commons-cli:1 + dev-java/libreadline-java:0" +RDEPEND=">=virtual/jre-1.4 + ${COMMON_DEPEND}" +DEPEND=">=virtual/jdk-1.4 + ${COMMON_DEPEND}" + +java_prepare() { + epatch "${FILESDIR}/0.9.8-build.xml.patch" + rm -v lib/*.jar lib/*/*.jar || die +} + +JAVA_ANT_REWRITE_CLASSPATH="true" +EANT_GENTOO_CLASSPATH="commons-cli-1,libreadline-java" + +src_install () { + java-pkg_dojar "build/${PN}.jar" + + java-pkg_dolauncher ${PN} -pre "${FILESDIR}/${PN}.pre" \ + --main henplus.HenPlus + + dodoc README || die + dohtml doc/HenPlus.html || die + use doc && java-pkg_dojavadoc javadoc/api + + use source && java-pkg_dosrc "src/${PN}" +} diff --git a/dev-db/henplus/metadata.xml b/dev-db/henplus/metadata.xml new file mode 100644 index 000000000000..8b2106471033 --- /dev/null +++ b/dev-db/henplus/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> + <upstream> + <remote-id type="sourceforge">henplus</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/hsqldb/Manifest b/dev-db/hsqldb/Manifest new file mode 100644 index 000000000000..2dcbc156c14f --- /dev/null +++ b/dev-db/hsqldb/Manifest @@ -0,0 +1 @@ +DIST hsqldb_1_8_1_3.zip 3170550 SHA256 c3669bbebcb5c722b273f20c316af744d4e263bc90cc20fd1e6296dff7cc3d07 SHA512 0483ca3299b63b4931b07d49588c729231efca76a317b9620abbd5039127f3f79449eaa1e9d29c52782c58bdb0cc4879b1e3f30f669d2c02c880818f531a8442 WHIRLPOOL ae025d408ee78683133a7bcb1ea6cc130844abc837abe408fe0ea4cf885e082080cb926fabb47ecc59a0f64463e2f969ce51a9e5acc802bdc4e7ba9a62f9756d diff --git a/dev-db/hsqldb/files/StringComparator.java b/dev-db/hsqldb/files/StringComparator.java new file mode 100644 index 000000000000..ae0f7b0fb979 --- /dev/null +++ b/dev-db/hsqldb/files/StringComparator.java @@ -0,0 +1,53 @@ +/* Copyright (c) 2001-2008, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.lib; + +public class StringComparator implements ObjectComparator { + + public int compare(Object a, Object b) { + + // handle nulls + if (a == b) { + return 0; + } + + if (a == null) { + return -1; + } + + if (b == null) { + return 1; + } + + return ((String) a).compareTo((String) b); + } +} diff --git a/dev-db/hsqldb/files/TestBug1191815.java b/dev-db/hsqldb/files/TestBug1191815.java new file mode 100644 index 000000000000..06c606401cdd --- /dev/null +++ b/dev-db/hsqldb/files/TestBug1191815.java @@ -0,0 +1,129 @@ +/* Copyright (c) 2001-2009, The HSQL Development Group + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * Neither the name of the HSQL Development Group nor the names of its + * contributors may be used to endorse or promote products derived from this + * software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG, + * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + + +package org.hsqldb.test; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Statement; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import junit.framework.TestCase; +import junit.framework.TestResult; + +/** + * Created on Apr 28, 2005 + * @author Antranig Basman (antranig@caret.cam.ac.uk) + */ +public class TestBug1191815 extends TestBase { + + public TestBug1191815(String name) { + super(name); + } + + public void test() throws Exception { + + try { + Connection conn = newConnection(); + Statement stmt = conn.createStatement(); + + stmt.executeUpdate("drop table testA if exists;"); + stmt.executeUpdate("create table testA(data timestamp);"); + + TimeZone pst = TimeZone.getTimeZone("PST"); + Calendar cal = new GregorianCalendar(pst); + + cal.clear(); + cal.set(2005, 0, 1, 0, 0, 0); + + + // yyyy-mm-dd hh:mm:ss.fffffffff + Timestamp ts = new Timestamp(cal.getTimeInMillis()); + ts.setNanos(1000); + PreparedStatement ps = + conn.prepareStatement("insert into testA values(?)"); + + ps.setTimestamp(1, ts, cal); + ps.execute(); + ps.setTimestamp(1, ts, null); + ps.execute(); + + String sql = "select * from testA"; + + stmt = conn.createStatement(); + + ResultSet rs = stmt.executeQuery(sql); + + rs.next(); + + Timestamp returned = rs.getTimestamp(1, cal); + + rs.next(); + + Timestamp def = rs.getTimestamp(1, null); + + assertEquals(ts, returned); + assertEquals(ts, def); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + public static void main(String[] args) throws Exception { + + TestResult result; + TestCase test; + java.util.Enumeration exceptions; + java.util.Enumeration failures; + int count; + + result = new TestResult(); + test = new TestBug1191815("test"); + + test.run(result); + + count = result.failureCount(); + + System.out.println("TestBug1192000 failure count: " + count); + + failures = result.failures(); + + while (failures.hasMoreElements()) { + System.out.println(failures.nextElement()); + } + } +} + diff --git a/dev-db/hsqldb/files/hsqldb b/dev-db/hsqldb/files/hsqldb new file mode 100644 index 000000000000..19249038e21e --- /dev/null +++ b/dev-db/hsqldb/files/hsqldb @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net +} + +start() { + ebegin "Starting HSQL Database" + hsqldb_enable=yes /var/lib/hsqldb/bin/hsqldb start + eend $? +} + +stop() { + ebegin "Stopping HSQL Database" + hsqldb_enable=yes /var/lib/hsqldb/bin/hsqldb stop + eend $? +} diff --git a/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch b/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch new file mode 100644 index 000000000000..7f9245597182 --- /dev/null +++ b/dev-db/hsqldb/files/hsqldb-1.8.1.3-java7.patch @@ -0,0 +1,380 @@ +diff --git a/build/build.xml b/build/build.xml +index 68c446f..e82f00f 100644 +--- a/build/build.xml ++++ b/build/build.xml +@@ -98,16 +98,24 @@ examples: + <echo message="ant.java.hasjsse=${ant.java.hasjsse}" /> + </target> + +- <target name="javaversion6"> ++ <target name="javaversion7" unless="ant.java.iscjavaset"> ++ <available classname="java.util.Objects" property="ant.java.iscjava17"/> ++ <available classname="java.util.Objects" property="ant.java.iscjavaset"/> ++ </target> ++ ++ <target name="javaversion6" depends="javaversion7" unless="ant.java.iscjavaset"> + <available classname="java.net.IDN" property="ant.java.iscjava16"/> ++ <available classname="java.net.IDN" property="ant.java.iscjavaset"/> + </target> + +- <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjava16"> ++ <target name="javaversion4" depends="javaversion6" unless="ant.java.iscjavaset"> + <available classname="java.nio.Buffer" property="ant.java.iscjava14"/> ++ <available classname="java.nio.Buffer" property="ant.java.iscjavaset"/> + </target> + +- <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjava14"> ++ <target name="javaversion2" depends="javaversion4" unless="ant.java.iscjavaset"> + <available classname="java.lang.ref.Reference" property="ant.java.iscjava12"/> ++ <available classname="java.lang.ref.Reference" property="ant.java.iscjavaset"/> + </target> + + <target name="-prepare" depends="init,javaversion2"> +@@ -166,6 +174,7 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/> + <arg file="${src}/org/hsqldb/persist/LockFile.java"/> + <arg file="${src}/org/hsqldb/persist/Logger.java"/> +@@ -183,6 +192,7 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> +@@ -210,6 +220,7 @@ examples: + <arg value="+JAVA2FULL"/> + <arg value="-JAVA4"/> + <arg value="-JAVA6"/> ++ <arg value="-JAVA7"/> + </java> + </target> + +@@ -218,6 +229,7 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> +@@ -244,6 +256,7 @@ examples: + <arg value="+JAVA2FULL"/> + <arg value="+JAVA4"/> + <arg value="-JAVA6"/> ++ <arg value="-JAVA7"/> + </java> + </target> + +@@ -253,6 +266,43 @@ examples: + <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > + <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> + <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcCallableStatement.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcClob.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcConnection.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcParameterMetaData.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcPreparedStatement.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSet.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSetMetaData.java"/> ++ <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/> ++ <arg file="${src}/org/hsqldb/persist/LockFile.java"/> ++ <arg file="${src}/org/hsqldb/persist/Logger.java"/> ++ <arg file="${src}/org/hsqldb/persist/ScaledRAFile.java"/> ++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> ++ <arg file="${src}/org/hsqldb/util/DatabaseManager.java"/> ++ <arg file="${src}/org/hsqldb/util/ConnectionDialogCommon.java"/> ++ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/> ++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> ++ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/> ++ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/> ++ <arg file="${src}/org/hsqldb/HsqlDateTime.java"/> ++ <arg value="+JAVA2"/> ++ <arg value="+JAVA2FULL"/> ++ <arg value="+JAVA4"/> ++ <arg value="+JAVA6"/> ++ <arg value="-JAVA7"/> ++ </java> ++ </target> ++ ++ <target name="switchtojdk17" depends="switchtojdk16" ++ description="self explanatory" if="ant.java.iscjava17"> ++ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" > ++ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/> ++ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/> ++ <arg file="${src}/org/hsqldb/jdbcDriver.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/> + <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/> +@@ -279,10 +329,11 @@ examples: + <arg value="+JAVA2FULL"/> + <arg value="+JAVA4"/> + <arg value="+JAVA6"/> ++ <arg value="+JAVA7"/> + </java> + </target> + +- <target name="store" depends="switchtojdk16" ++ <target name="store" depends="switchtojdk17" + description="compiles the /store folder"> + <javac srcdir="${src}" + destdir="classes" +diff --git a/src/org/hsqldb/jdbc/jdbcCallableStatement.java b/src/org/hsqldb/jdbc/jdbcCallableStatement.java +index 3779094..d2131ed 100644 +--- a/src/org/hsqldb/jdbc/jdbcCallableStatement.java ++++ b/src/org/hsqldb/jdbc/jdbcCallableStatement.java +@@ -3106,7 +3106,6 @@ implements CallableStatement { +
+ //#endif JAVA4
+ //#ifdef JAVA6
+-/*
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -3376,7 +3375,20 @@ implements CallableStatement { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public <T> T getObject(int ColumnIndex, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbc/jdbcConnection.java b/src/org/hsqldb/jdbc/jdbcConnection.java +index 5d59464..0c7e08a 100644 +--- a/src/org/hsqldb/jdbc/jdbcConnection.java ++++ b/src/org/hsqldb/jdbc/jdbcConnection.java +@@ -43,13 +43,17 @@ import java.sql.Connection; + import java.sql.DatabaseMetaData;
+
+ //#ifdef JAVA6
+-/*
+ import java.sql.NClob;
+ import java.sql.SQLClientInfoException;
+ import java.sql.SQLXML;
+-*/
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++import java.util.concurrent.Executor; ++ ++//#endif JAVA7 ++ + import java.sql.PreparedStatement;
+ import java.sql.SQLException;
+ import java.sql.SQLWarning;
+@@ -2794,4 +2798,31 @@ public class jdbcConnection implements Connection { + */
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public int getNetworkTimeout() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void setNetworkTimeout(Executor executor, int millis) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void abort(Executor executor) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public String getSchema() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void setSchema(String schema) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbc/jdbcDataSource.java b/src/org/hsqldb/jdbc/jdbcDataSource.java +index 9f79a37..d0ab49b 100644 +--- a/src/org/hsqldb/jdbc/jdbcDataSource.java ++++ b/src/org/hsqldb/jdbc/jdbcDataSource.java +@@ -47,6 +47,11 @@ import javax.sql.DataSource; + //#endif JAVA4
+ import org.hsqldb.jdbcDriver;
+
++//#ifdef JAVA7 ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; ++//#endif JAVA7 ++ + // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final
+
+ /**
+@@ -312,7 +317,6 @@ public class jdbcDataSource implements Serializable { + }
+
+ //#ifdef JAVA6
+-/*
+ public <T> T unwrap(Class<T> iface) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -322,7 +326,14 @@ public class jdbcDataSource implements Serializable { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException ++ { ++ throw new SQLFeatureNotSupportedException("Not supported yet."); ++ } ++ ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +index ffa238d..0480228 100644 +--- a/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java ++++ b/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +@@ -5650,7 +5650,6 @@ public class jdbcDatabaseMetaData implements DatabaseMetaData { + }
+
+ //#ifdef JAVA6
+-/*
+ public RowIdLifetime getRowIdLifetime() throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -5694,7 +5693,23 @@ public class jdbcDatabaseMetaData implements DatabaseMetaData { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+
+ //#endif JAVA6
++ ++ ++//#ifdef JAVA7 ++ public boolean generatedKeyAlwaysReturned() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public ResultSet getPseudoColumns(String catalog, String schemaPattern, ++ String tableNamePattern, String columnNamePattern) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ ++//#endif JAVA7 ++ + }
+diff --git a/src/org/hsqldb/jdbc/jdbcResultSet.java b/src/org/hsqldb/jdbc/jdbcResultSet.java +index 2a6567e..81aecf3 100644 +--- a/src/org/hsqldb/jdbc/jdbcResultSet.java ++++ b/src/org/hsqldb/jdbc/jdbcResultSet.java +@@ -5332,4 +5332,19 @@ public class jdbcResultSet implements ResultSet { + */ + + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++ ++ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public <T> T getObject(int columnNum, Class<T> type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++//#endif JAVA7 ++ + } +diff --git a/src/org/hsqldb/jdbc/jdbcStatement.java b/src/org/hsqldb/jdbc/jdbcStatement.java +index f84f2e2..38bf8d0 100644 +--- a/src/org/hsqldb/jdbc/jdbcStatement.java ++++ b/src/org/hsqldb/jdbc/jdbcStatement.java +@@ -1588,7 +1588,6 @@ public class jdbcStatement implements Statement { + }
+ }
+ //#ifdef JAVA6
+-/*
+ public void setPoolable(boolean poolable) throws SQLException
+ {
+ throw new UnsupportedOperationException("Not supported yet.");
+@@ -1608,6 +1607,17 @@ public class jdbcStatement implements Statement { + {
+ throw new UnsupportedOperationException("Not supported yet.");
+ }
+-*/
+ //#endif JAVA6
++ ++//#ifdef JAVA7 ++ public boolean isCloseOnCompletion() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void closeOnCompletion() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++//#endif JAVA7 + }
+diff --git a/src/org/hsqldb/jdbcDriver.java b/src/org/hsqldb/jdbcDriver.java +index a377b36..361c074 100644 +--- a/src/org/hsqldb/jdbcDriver.java ++++ b/src/org/hsqldb/jdbcDriver.java +@@ -42,6 +42,11 @@ import org.hsqldb.jdbc.jdbcConnection; + import org.hsqldb.persist.HsqlDatabaseProperties; + import org.hsqldb.persist.HsqlProperties; + ++//#ifdef JAVA7 ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; ++//#endif JAVA7 ++ + // fredt@users 20011220 - patch 1.7.0 by fredt + // new version numbering scheme + // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping +@@ -321,4 +326,12 @@ public class jdbcDriver implements Driver { + DriverManager.registerDriver(new jdbcDriver()); + } catch (Exception e) {} + } ++ ++//#ifdef JAVA7 ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException ++ { ++ throw new SQLFeatureNotSupportedException("Not supported yet."); ++ } ++ ++//#endif JAVA7 + } diff --git a/dev-db/hsqldb/files/resolve-config-softlinks.patch b/dev-db/hsqldb/files/resolve-config-softlinks.patch new file mode 100644 index 000000000000..5a716e6dc3a2 --- /dev/null +++ b/dev-db/hsqldb/files/resolve-config-softlinks.patch @@ -0,0 +1,22 @@ +diff -urpN hsqldb.orig/bin/hsqldb hsqldb/bin/hsqldb +--- hsqldb.orig/bin/hsqldb 2006-07-08 15:55:55.000000000 +0200 ++++ hsqldb/bin/hsqldb 2006-07-08 16:03:28.000000000 +0200 +@@ -282,6 +282,18 @@ else + echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2 + exit 2 + } ++ ++ # resolve links - $_AUTH_TEST_PATH may be a softlink ++ while [ -h "$_AUTH_TEST_PATH" ]; do ++ ls=`ls -ld "$_AUTH_TEST_PATH"` ++ link=`expr "$ls" : '.*-> \(.*\)$'` ++ if expr "$link" : '.*/.*' > /dev/null; then ++ _AUTH_TEST_PATH="$link" ++ else ++ _AUTH_TEST_PATH=`dirname "$_AUTH_TEST_PATH"`/"$link" ++ fi ++ done ++ + ls -ld "$_AUTH_TEST_PATH" | grep '^-..------' > /dev/null 2>&1 || { + echo "Fix permissions on '$_AUTH_TEST_PATH' like 'chmod 600 $_AUTH_TEST_PATH'" 1>&2 + exit 2 diff --git a/dev-db/hsqldb/files/server.properties b/dev-db/hsqldb/files/server.properties new file mode 100644 index 000000000000..4827d1cb6ec0 --- /dev/null +++ b/dev-db/hsqldb/files/server.properties @@ -0,0 +1,20 @@ +# Hsqldb Server cfg file. +# See the UNIX Quick Start and the Advanced Topics chapters +# of the Hsqldb User Guide. + +server.database.0=file:/var/lib/hsqldb/db1 +server.urlid.0=localhost + +# Warning! +# When running hsqldb in Server mode, for each additional database +# the server.urlid.X entry must have a proper corresponding urlid +# section in the 'sqltool.rc' file. +# Otherwise you may have problems with shutting down the server. +# +# Note that each server can serve only up to 10 different +# databases simultaneously (with consecutive {0-9} suffixes). + +# An example of additional database. +#server.database.1=file:/var/lib/hsqldb/newdb/newdb +#server.dbname.1=newdb +#server.urlid.1=newdb diff --git a/dev-db/hsqldb/files/sqltool.rc b/dev-db/hsqldb/files/sqltool.rc new file mode 100644 index 000000000000..09480f747fef --- /dev/null +++ b/dev-db/hsqldb/files/sqltool.rc @@ -0,0 +1,20 @@ +# $Id$ + +# This is a sample SqlTool configuration file, a.k.a. rc file. + +# This is for a hsqldb Server running with default settings on your local +# computer (and for which you have not changed the password for "sa"). +urlid localhost +url jdbc:hsqldb:hsql://localhost +username sa +password + +# Each urlid section in this file corresponds to one of the +# server.urlid.X entries in the 'server.properties' file. +# This is required by the hsqldb init script. + +# An example of additional database. +#urlid newdb +#url jdbc:hsqldb:hsql://localhost/newdb +#username sa +#password diff --git a/dev-db/hsqldb/hsqldb-1.8.1.3-r1.ebuild b/dev-db/hsqldb/hsqldb-1.8.1.3-r1.ebuild new file mode 100644 index 000000000000..2040c5f98f46 --- /dev/null +++ b/dev-db/hsqldb/hsqldb-1.8.1.3-r1.ebuild @@ -0,0 +1,174 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +JAVA_PKG_IUSE="doc source test" + +inherit eutils user versionator java-pkg-2 java-ant-2 + +MY_PV=$(replace_all_version_separators _ ) +MY_P="${PN}_${MY_PV}" + +DESCRIPTION="The leading SQL relational database engine written in Java" +HOMEPAGE="http://hsqldb.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +CDEPEND=" + java-virtuals/servlet-api:2.5" +RDEPEND="${CDEPEND} + >=virtual/jre-1.5" +DEPEND="${CDEPEND} + >=virtual/jdk-1.5 + app-arch/unzip + test? ( dev-java/junit:0 )" + +S="${WORKDIR}/${PN}" + +HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar +HSQLDB_HOME=/var/lib/hsqldb + +pkg_setup() { + enewgroup hsqldb + enewuser hsqldb -1 /bin/sh /dev/null hsqldb + + java-pkg-2_pkg_setup +} + +java_prepare() { + rm -v lib/*.jar || die + + sed -i -r \ + -e "s#/etc/sysconfig#${EPREFIX}/etc/conf.d#g" \ + bin/hsqldb || die + + java-pkg_filter-compiler jikes + + eant -q -f "${EANT_BUILD_XML}" cleanall > /dev/null + + epatch "${FILESDIR}/resolve-config-softlinks.patch" + epatch "${FILESDIR}/${P}-java7.patch" + + mkdir conf + sed -e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${EPREFIX//\//\\/}${HSQLDB_JAR//\//\\/}/g" \ + -e "s/^SERVER_HOME=.*$/SERVER_HOME=${EPREFIX//\//\\/}\/var\/lib\/hsqldb/g" \ + -e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \ + -e 's/^#AUTH_FILE=.*$/AUTH_FILE=${SERVER_HOME}\/sqltool.rc/g' \ + src/org/hsqldb/sample/sample-hsqldb.cfg > conf/hsqldb || die + cp "${FILESDIR}/server.properties" conf/ || die + cp "${FILESDIR}/sqltool.rc" conf/ || die + + # Missing source file - needed for tests + # http://hsqldb.cvs.sourceforge.net/*checkout*/hsqldb/hsqldb-dev/src/org/hsqldb/lib/StringComparator.java?revision=1.1&pathrev=hsqldb_1_8_0_10 + # http://sourceforge.net/tracker/index.php?func=detail&aid=2008754&group_id=23316&atid=378131 + cp "${FILESDIR}/StringComparator.java" src/org/hsqldb/lib || die + cp "${FILESDIR}/TestBug1191815.java" src/org/hsqldb/test/ || die +} + +JAVA_ANT_REWRITE_CLASSPATH="yes" + +# EANT_BUILD_XML used also in src_prepare +EANT_BUILD_XML="build/build.xml" +EANT_BUILD_TARGET="jar jarclient jarsqltool jarutil" +EANT_DOC_TARGET="javadocdev" +EANT_GENTOO_CLASSPATH="servlet-api-2.5" + +src_test() { + java-pkg_jar-from --into lib junit + eant -f ${EANT_BUILD_XML} jartest + cd testrun/hsqldb || die + ./runTest.sh TestSelf || die "TestSelf hsqldb tests failed" + # TODO. These fail. Investigate why. + #cd "${S}/testrun/sqltool" || die + #CLASSPATH="${S}/lib/hsqldb.jar" ./runtests.bash || die "sqltool test failed" +} + +src_install() { + java-pkg_dojar lib/hsql*.jar + + if use doc; then + dodoc doc/*.txt + dohtml -r doc/zaurus + dohtml -r doc/src + fi + 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 + dodir /etc/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 bin/hsqldb + + # Make sure that files have correct permissions + use prefix || chown -R hsqldb:hsqldb "${ED}${HSQLDB_HOME}" + chmod o-rwx "${ED}${HSQLDB_HOME}" + + # 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 +} diff --git a/dev-db/hsqldb/metadata.xml b/dev-db/hsqldb/metadata.xml new file mode 100644 index 000000000000..6e04a17bee48 --- /dev/null +++ b/dev-db/hsqldb/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> + <upstream> + <remote-id type="sourceforge">hsqldb</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/hyperdex/Manifest b/dev-db/hyperdex/Manifest new file mode 100644 index 000000000000..5ad1288c9874 --- /dev/null +++ b/dev-db/hyperdex/Manifest @@ -0,0 +1,5 @@ +DIST autotools-java.tar 2770 SHA256 b74a069cf94d05cfbfe3eb65d42603d9a9d46a130044d76ffbf55ae822b62b3d SHA512 a193c3c3f8cc654967905c9ab559098425f1688a75c21a4207959fbe13572b4dba3e5c21e04913f20e5aa1b1c2fd2b13dcef91cc4f031b06884ac3130edc5757 WHIRLPOOL 3fbf5f0ab1a4bd231e69f924442f047c1e872f04c85afc46dca423c93641264347dc2d2c2a8b1cca740bf349d4db02594144c3797eb1c4bd649a35c169f7c86e +DIST hyperdex-1.6.0.tar.gz 1490273 SHA256 1a29ef60b2416b078cf82f120386e4fda53fc40ef613653d6c1b8a46ef4167c0 SHA512 44e1c5fa1e0e2158bf3eb72dc94681f8aaf3a804ce7b2df05461c1f4c9f0e3e71ee7f0503c25ee9e00701ba9444df18ecbe427606de4ddd3b1f31d382b037272 WHIRLPOOL f52494148800b16cb663dc137c54beca61010a0a279d7a4fbefb0a3b149963437600808aa7d2efab5015c2c03efc544fb2ee6ecc1ad05da205a026b9dec1d1c0 +DIST hyperdex-1.7.1.tar.gz 1517677 SHA256 db3857aa74795698e50c6a9abdc6a0570c67e701b5213c803d5fba16b45cf1a4 SHA512 41bf8cc49081ba41917c737facfa7b5e29bcf73f510ae5743356828643bd7292ac8c610915985e52f6609c4a80cf70e7d515504bbe0a85383c74d7e288f2dc5b WHIRLPOOL 8bfd39e9e3aea7eae5a85ab64f583f5689add551c86a6c3bf40557ebb9fff0dbfec91bb1c0eb3f812be7f35d044ba16872eae850bc9127b56aff21168e66ead2 +DIST hyperdex-1.8.0.tar.gz 1516389 SHA256 5717fa3775dd28c996805ee7b48afd1bbf64868a6cf271c8e96928addebcd968 SHA512 e667552f16899edf57a08f3704e762e33b33aa9508ee486187b5c6fd6f01ab9cb61cd65444a676386554cebb2e4d191b4181df4c9b399821e5d244791bf3cb12 WHIRLPOOL 151d560e30135349be07b5f543c435f36ab839576f84d994742b9e1423174fd211761f84146acea7e847ff7e3e27688c42fb276c5b4f681a2bef7b37337e6aea +DIST hyperdex-1.8.1.tar.gz 1516446 SHA256 b62e9dc5c6bda115869b35213b221b2483d43a64de8356c028b49a748eb76d26 SHA512 28a9b1a1f99d4159fb2d453fb7f740d4926ac2275488c8676a70d45879be5b1ef9b1e84720f86ef4f058706558899f2e3229fc7140349dadc3974754a03ac13e WHIRLPOOL d62b1d4562f89a5818d57514e079f7a749315068dfd5cbd99aca71d996969ae32e2e776e1b934a33d78ba15d6f9013719aeac80484f614dd2f466c5486a2bb31 diff --git a/dev-db/hyperdex/files/hyperdex.confd b/dev-db/hyperdex/files/hyperdex.confd new file mode 100644 index 000000000000..d7bab25e5c9d --- /dev/null +++ b/dev-db/hyperdex/files/hyperdex.confd @@ -0,0 +1,4 @@ +# /etc/conf.d/hyperdex: config file for /etc/init.d/hyperdex + +# see documentation for HyperDex for help +#HYPERDEX_OPTS="" diff --git a/dev-db/hyperdex/files/hyperdex.initd b/dev-db/hyperdex/files/hyperdex.initd new file mode 100755 index 000000000000..d06244027169 --- /dev/null +++ b/dev-db/hyperdex/files/hyperdex.initd @@ -0,0 +1,11 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +command="/usr/bin/hyperdex-daemon" +command_args="--daemon ${HYPERDEX_OPTS}" + +depend() { + use net +} diff --git a/dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild b/dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild new file mode 100644 index 000000000000..9ce94cf7ded0 --- /dev/null +++ b/dev-db/hyperdex/hyperdex-1.6.0-r1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +# Tests fail, again +RESTRICT="test" + +PYTHON_COMPAT=( python2_7) +inherit eutils python-single-r1 autotools + +DESCRIPTION="A searchable distributed Key-Value Store" + +HOMEPAGE="http://hyperdex.org" +SRC_URI="http://hyperdex.org/src/${P}.tar.gz + http://dev.gentooexperimental.org/~patrick/autotools-java.tar" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test +python" +# need to add ruby and java useflags too + +DEPEND="dev-cpp/glog + dev-cpp/sparsehash + dev-libs/cityhash + dev-libs/libpo6 + dev-libs/libe + dev-libs/busybee + dev-libs/popt + dev-libs/replicant + dev-libs/libmacaroons + dev-libs/libtreadstone + dev-libs/json-c" +RDEPEND="${DEPEND}" + +REQUIRED_USE="test? ( python )" + +src_prepare() { + cp "${WORKDIR}/"*.m4 m4/ + sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!" + eautoreconf + use python && python-single-r1_pkg_setup +} +src_configure() { + econf --disable-static \ + $(use_enable python python-bindings) +} + +src_install() { + emake DESTDIR="${D}" install || die "Failed to install" + newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script" + newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file" + find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad! +} diff --git a/dev-db/hyperdex/hyperdex-1.7.1.ebuild b/dev-db/hyperdex/hyperdex-1.7.1.ebuild new file mode 100644 index 000000000000..9ce94cf7ded0 --- /dev/null +++ b/dev-db/hyperdex/hyperdex-1.7.1.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +# Tests fail, again +RESTRICT="test" + +PYTHON_COMPAT=( python2_7) +inherit eutils python-single-r1 autotools + +DESCRIPTION="A searchable distributed Key-Value Store" + +HOMEPAGE="http://hyperdex.org" +SRC_URI="http://hyperdex.org/src/${P}.tar.gz + http://dev.gentooexperimental.org/~patrick/autotools-java.tar" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test +python" +# need to add ruby and java useflags too + +DEPEND="dev-cpp/glog + dev-cpp/sparsehash + dev-libs/cityhash + dev-libs/libpo6 + dev-libs/libe + dev-libs/busybee + dev-libs/popt + dev-libs/replicant + dev-libs/libmacaroons + dev-libs/libtreadstone + dev-libs/json-c" +RDEPEND="${DEPEND}" + +REQUIRED_USE="test? ( python )" + +src_prepare() { + cp "${WORKDIR}/"*.m4 m4/ + sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!" + eautoreconf + use python && python-single-r1_pkg_setup +} +src_configure() { + econf --disable-static \ + $(use_enable python python-bindings) +} + +src_install() { + emake DESTDIR="${D}" install || die "Failed to install" + newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script" + newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file" + find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad! +} diff --git a/dev-db/hyperdex/hyperdex-1.8.0.ebuild b/dev-db/hyperdex/hyperdex-1.8.0.ebuild new file mode 100644 index 000000000000..788abe841d3b --- /dev/null +++ b/dev-db/hyperdex/hyperdex-1.8.0.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +# Tests fail, still +RESTRICT="test" + +PYTHON_COMPAT=( python2_7) +inherit eutils python-single-r1 autotools + +DESCRIPTION="A searchable distributed Key-Value Store" + +HOMEPAGE="http://hyperdex.org" +SRC_URI="http://hyperdex.org/src/${P}.tar.gz + http://dev.gentooexperimental.org/~patrick/autotools-java.tar" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test +python" +# need to add ruby and java useflags too + +DEPEND="dev-cpp/glog + dev-cpp/sparsehash + dev-libs/cityhash + >=dev-libs/hyperleveldb-1.2 + >=dev-libs/libpo6-0.8 + >=dev-libs/libe-0.11 + >=dev-libs/busybee-0.7 + dev-libs/popt + >=dev-libs/replicant-0.8 + >=dev-libs/libmacaroons-0.3 + >=dev-libs/libtreadstone-0.2 + dev-libs/json-c" +RDEPEND="${DEPEND}" + +REQUIRED_USE="test? ( python )" + +src_prepare() { + cp "${WORKDIR}/"*.m4 m4/ + sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!" + eautoreconf + use python && python-single-r1_pkg_setup +} +src_configure() { + econf --disable-static \ + $(use_enable python python-bindings) +} + +src_install() { + emake DESTDIR="${D}" install || die "Failed to install" + newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script" + newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file" + find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad! +} + +src_test() { + emake -j1 check +} diff --git a/dev-db/hyperdex/hyperdex-1.8.1.ebuild b/dev-db/hyperdex/hyperdex-1.8.1.ebuild new file mode 100644 index 000000000000..788abe841d3b --- /dev/null +++ b/dev-db/hyperdex/hyperdex-1.8.1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +# Tests fail, still +RESTRICT="test" + +PYTHON_COMPAT=( python2_7) +inherit eutils python-single-r1 autotools + +DESCRIPTION="A searchable distributed Key-Value Store" + +HOMEPAGE="http://hyperdex.org" +SRC_URI="http://hyperdex.org/src/${P}.tar.gz + http://dev.gentooexperimental.org/~patrick/autotools-java.tar" +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="test +python" +# need to add ruby and java useflags too + +DEPEND="dev-cpp/glog + dev-cpp/sparsehash + dev-libs/cityhash + >=dev-libs/hyperleveldb-1.2 + >=dev-libs/libpo6-0.8 + >=dev-libs/libe-0.11 + >=dev-libs/busybee-0.7 + dev-libs/popt + >=dev-libs/replicant-0.8 + >=dev-libs/libmacaroons-0.3 + >=dev-libs/libtreadstone-0.2 + dev-libs/json-c" +RDEPEND="${DEPEND}" + +REQUIRED_USE="test? ( python )" + +src_prepare() { + cp "${WORKDIR}/"*.m4 m4/ + sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!" + eautoreconf + use python && python-single-r1_pkg_setup +} +src_configure() { + econf --disable-static \ + $(use_enable python python-bindings) +} + +src_install() { + emake DESTDIR="${D}" install || die "Failed to install" + newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script" + newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file" + find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad! +} + +src_test() { + emake -j1 check +} diff --git a/dev-db/hyperdex/hyperdex-9999.ebuild b/dev-db/hyperdex/hyperdex-9999.ebuild new file mode 100644 index 000000000000..7640e8869c46 --- /dev/null +++ b/dev-db/hyperdex/hyperdex-9999.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ +EAPI=5 + +PYTHON_COMPAT=( python2_7) +inherit eutils python-r1 autotools git-r3 + +DESCRIPTION="A searchable distributed Key-Value Store" + +HOMEPAGE="http://hyperdex.org" +LICENSE="BSD" +SLOT="0" +KEYWORDS="" + +EGIT_REPO_URI="https://github.com/rescrv/HyperDex.git" + +SRC_URI="http://dev.gentooexperimental.org/~patrick/autotools-java.tar" + +IUSE="+python" +# need to add ruby and java useflags too + +DEPEND="dev-cpp/glog + dev-cpp/sparsehash + dev-libs/cityhash + dev-libs/libpo6 + dev-libs/libe + dev-libs/busybee + dev-libs/popt + dev-libs/replicant + dev-libs/json-c" +RDEPEND="${DEPEND}" + +src_prepare() { + cd m4; tar xf "${DISTDIR}/autotools-java.tar" + cd .. + sed -i -e 's~json/json.h~json-c/json.h~' configure.ac common/datatype_document.cc daemon/index_document.cc || die "Blergh!" + eautoreconf +} +src_configure() { + econf --disable-static \ + $(use_enable python python-bindings) +} + +src_install() { + emake DESTDIR="${D}" install || die "Failed to install" + newinitd "${FILESDIR}/hyperdex.initd" hyperdex || die "Failed to install init script" + newconfd "${FILESDIR}/hyperdex.confd" hyperdex || die "Failed to install config file" + find "${D}" -name '*.la' -exec rm {} \; # bad buildsystem! bad! +} diff --git a/dev-db/hyperdex/metadata.xml b/dev-db/hyperdex/metadata.xml new file mode 100644 index 000000000000..f90563e3cfde --- /dev/null +++ b/dev-db/hyperdex/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +</pkgmetadata> + diff --git a/dev-db/innotop/Manifest b/dev-db/innotop/Manifest new file mode 100644 index 000000000000..6ba004e157bc --- /dev/null +++ b/dev-db/innotop/Manifest @@ -0,0 +1,2 @@ +DIST innotop-1.9.0.tar.gz 143179 SHA256 bc2669ea88fb728c6c4ed9c695c4d0b7b9ae5df0f158ef23e8853694bf4f240a SHA512 a3fe26b7e9e4a4608f6ef68e8cfefca080fd5799cc7780ffadd0b6bd0a0cfd035561bf6c10436f556b8fc79726304cae408343a231a57d02c74e3bd29b941a17 WHIRLPOOL 76226828f8c91608b03d49802cc082a77b552f7a482ab2186e71a4f9fb56662d17d4ee04c5187df78ca68a733ca4a710b3d6156e0b028375576c8abb9b7effd8 +DIST innotop-1.9.1.tar.gz 147677 SHA256 117e5af58a83af79b6cf99877b25b1479197597be5a7d51b245a0ad9c69f4d3d SHA512 5c19891fc8df2cbf15f0df1af68501624ccb9d79c22a786e3a5fa4aa527be964392131da095a529f628c50528b196070f35009a49c9a87ae9f8bb2f4062e5ab5 WHIRLPOOL b06b4c720333f433408d3f97355ad319aa3897bffa3f71da18462eb74e1d2065a60a0e91f55c26f37bb624530e18cf3e9acf4fdf7bb245e8555987eab3dee617 diff --git a/dev-db/innotop/innotop-1.9.0-r1.ebuild b/dev-db/innotop/innotop-1.9.0-r1.ebuild new file mode 100644 index 000000000000..a5f4aa4b2860 --- /dev/null +++ b/dev-db/innotop/innotop-1.9.0-r1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-module + +DESCRIPTION="innotop - A text-mode MySQL and InnoDB monitor like mytop, but with many more features" +HOMEPAGE="http://code.google.com/p/innotop/" +SRC_URI="http://innotop.googlecode.com/files/${P}.tar.gz" + +LICENSE="|| ( Artistic GPL-2 )" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +SLOT="0" +IUSE="" + +DEPEND="dev-perl/DBD-mysql + dev-perl/TermReadKey + virtual/perl-Term-ANSIColor + virtual/perl-Time-HiRes" +SRC_TEST="do" + +src_install() { + perl-module_src_install +} diff --git a/dev-db/innotop/innotop-1.9.1.ebuild b/dev-db/innotop/innotop-1.9.1.ebuild new file mode 100644 index 000000000000..a26e025ee205 --- /dev/null +++ b/dev-db/innotop/innotop-1.9.1.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-module + +DESCRIPTION="innotop - A text-mode MySQL and InnoDB monitor like mytop, but with many more features" +HOMEPAGE="http://code.google.com/p/innotop/" +SRC_URI="http://innotop.googlecode.com/files/${P}.tar.gz" + +LICENSE="|| ( Artistic GPL-2 )" +KEYWORDS="~alpha ~amd64 ~ppc ~sparc ~x86" +SLOT="0" +IUSE="" + +DEPEND="dev-perl/DBD-mysql + dev-perl/TermReadKey + virtual/perl-Term-ANSIColor + virtual/perl-Time-HiRes" +SRC_TEST="do" + +src_install() { + perl-module_src_install +} diff --git a/dev-db/innotop/metadata.xml b/dev-db/innotop/metadata.xml new file mode 100644 index 000000000000..44b249080ca5 --- /dev/null +++ b/dev-db/innotop/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mysql</herd> + <longdescription>innotop - A text-mode MySQL and InnoDB monitor like mytop, +but with many more features</longdescription> + <upstream> + <remote-id type="google-code">innotop</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/jxtray/Manifest b/dev-db/jxtray/Manifest new file mode 100644 index 000000000000..614eddc03297 --- /dev/null +++ b/dev-db/jxtray/Manifest @@ -0,0 +1 @@ +DIST jxtray-src-0.5.tgz 2476739 SHA256 ddb5d2b2399d1440d84b144fce4ef4f7ff865081745057e101deff3a38f0a849 SHA512 11af9c74a12786b7e34890ae3ebfc3f5631c247cf693add5884db05bd63ccd021f613f696ecbcaff606e2567d43070baf73197fb7675e7a15fe45923773ebe6f WHIRLPOOL 3a5b32545a22061a7691faf45ce0a542691bb67f0e8299937bd032a46f9b71dcda1cd5ad6c4343954a4dfddd76bf7a6630a679f04b42fff3e5c7a84b50abde34 diff --git a/dev-db/jxtray/files/build.xml b/dev-db/jxtray/files/build.xml new file mode 100644 index 000000000000..4d4fadf5974d --- /dev/null +++ b/dev-db/jxtray/files/build.xml @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="utf-8"?> + +<project name="jxtray" default="jar" basedir="."> + + <property file="${basedir}/build.properties"/> + <property file="${basedir}/default.properties"/> + <property name="jxtray.version" value="0.5"/> + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + <mkdir dir="${dist}"/> + <mkdir dir="${javadoc}"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="${srcdir}" + destdir="${build}" + classpath="${classpath}" + source="1.4" + target="1.4"/> + + <copy toDir="${build}/images"> + <fileset dir="images" includes="**/*.*"/> + </copy> + + <copy toDir="${build}/share"> + <fileset dir="share" includes="**/*.*"/> + </copy> + + <copy toDir="${build}/doc"> + <fileset dir="doc" includes="**/*.*"/> + </copy> + </target> + + <target name="javadoc" depends="compile"> + <javadoc sourcepath="${srcdir}" + destdir="${javadoc}" + packagenames="${packages}"/> + </target> + + <target name="jar" depends="compile"> + + <!-- + <unjar dest="${build}"> + <fileset dir="${basedir}/lib" includes="**/*.jar"/> + </unjar> + --> + + <jar jarfile="${dist}/jxtray-${jxtray.version}.jar" basedir="${build}"> + <manifest> + <attribute name="Main-Class" value="jxtray.Jxtray"/> + </manifest> + </jar> + </target> + + <target name="clean"> + <delete dir="${build}"/> + <delete dir="${dist}"/> + <delete dir="${javadoc}"/> + </target> +</project> diff --git a/dev-db/jxtray/files/default.properties b/dev-db/jxtray/files/default.properties new file mode 100644 index 000000000000..fbcf7c235c99 --- /dev/null +++ b/dev-db/jxtray/files/default.properties @@ -0,0 +1,9 @@ + +build=${basedir}/build +dist=${basedir}/dist + +javadoc=${build}/doc +packages=jxtray.* + +srcdir=${basedir}/src + diff --git a/dev-db/jxtray/jxtray-0.5-r4.ebuild b/dev-db/jxtray/jxtray-0.5-r4.ebuild new file mode 100644 index 000000000000..7eca64eacc26 --- /dev/null +++ b/dev-db/jxtray/jxtray-0.5-r4.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit java-pkg-2 java-ant-2 + +DESCRIPTION="Java based Database Explorer" +HOMEPAGE="http://jxtray.sourceforge.net" +SRC_URI="mirror://sourceforge/jxtray/${PN}-src-${PV}.tgz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="doc firebird mssql mysql postgres" + +COMMON_DEP=" + >=dev-java/jdom-1.0:1.0 + >=dev-java/kunststoff-2.0.2:2.0 + dev-java/poi:0 + dev-java/sax:0 + >=dev-java/xerces-2.7:2 + dev-java/xml-commons:0 + firebird? ( dev-java/jdbc-jaybird:0 ) + mssql? ( >=dev-java/jtds-1.2:1.2 ) + mysql? ( dev-java/jdbc-mysql:0 ) + postgres? ( dev-java/jdbc-postgresql:0 ) + !firebird? ( !mssql? ( !postgres? ( dev-java/jdbc-mysql:0 ) ) )" +RDEPEND=">=virtual/jre-1.4 + ${COMMON_DEP}" +DEPEND=">=virtual/jdk-1.4 + ${COMMON_DEP}" + +S="${WORKDIR}/${PN}-src-${PV}" + +src_unpack() { + unpack ${A} + cp "${FILESDIR}"/build.xml "${FILESDIR}"/default.properties "${S}" + local cp="" + + cd "${S}"/lib + rm *.jar + cp="${cp}:$(java-pkg_getjars jdom-1.0)" + cp="${cp}:$(java-pkg_getjars xerces-2)" + cp="${cp}:$(java-pkg_getjars xml-commons)" + cp="${cp}:$(java-pkg_getjars sax)" + cp="${cp}:$(java-pkg_getjars poi)" + + cd "${S}"/lib/lookandfeel + rm *.jar + cp="${cp}:$(java-pkg_getjars kunststoff-2.0)" + + cd "${S}"/lib/drivers + rm *.jar + use firebird && cp="${cp}:$(java-pkg_getjars jdbc-jaybird)" + use mssql && cp="${cp}:$(java-pkg_getjars jtds-1.2)" + use mysql && cp="${cp}:$(java-pkg_getjars jdbc-mysql)" + use postgres && cp="${cp}:$(java-pkg_getjars jdbc-postgresql)" + + echo "classpath=${cp}" > "${S}"/build.properties +} + +src_compile() { + eant jar $(use_doc javadoc) +} + +src_install() { + java-pkg_newjar dist/${P}.jar ${PN}.jar + + java-pkg_dolauncher jxtray --main jxtray.Jxtray + + dodoc CHANGELOG.txt README.txt + use doc && java-pkg_dojavadoc javadoc +} diff --git a/dev-db/jxtray/metadata.xml b/dev-db/jxtray/metadata.xml new file mode 100644 index 000000000000..5b60948a443d --- /dev/null +++ b/dev-db/jxtray/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> + <longdescription> + Jxtray is a database explorer written in Java. Jxtray can be used to + connect to any type of database with suitable JDBC drivers. It can + provide you with information regarding your data bases, carry out SQL + queries and extract data in the following formats: CSV, SQL, HTML, + XML. The name jxtray comes from the French word j'extrait, which means + the function of retrieval of data. + </longdescription> + <upstream> + <remote-id type="sourceforge">jxtray</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/kyotocabinet/Manifest b/dev-db/kyotocabinet/Manifest new file mode 100644 index 000000000000..1a8124d6b967 --- /dev/null +++ b/dev-db/kyotocabinet/Manifest @@ -0,0 +1 @@ +DIST kyotocabinet-1.2.76.tar.gz 951930 SHA256 812a2d3f29c351db4c6f1ff29d94d7135f9e601d7cc1872ec1d7eed381d0d23c SHA512 278db7b327eb4c21bf0137d9aa14fb67d74d5ce7ed1cb29fc9120d157a60de165ec0cf842903eb7952e8f998045ae585b958977fa973ba0e0773381de71d9f6a WHIRLPOOL db984a6dcef0e3f313e56e5398a0fe75d1014e02dce04c4837d0aa01c0e97eb04eac728f4e9b600acec22a098a1f19ba33d8abb2ee50a8a60ba64afcd6d9c873 diff --git a/dev-db/kyotocabinet/files/fix_configure-1.2.62.patch b/dev-db/kyotocabinet/files/fix_configure-1.2.62.patch new file mode 100644 index 000000000000..622b7fd52792 --- /dev/null +++ b/dev-db/kyotocabinet/files/fix_configure-1.2.62.patch @@ -0,0 +1,51 @@ +diff --git a/configure.in b/configure.in +index 94e9d29..6999615 100644 +--- a/configure.in ++++ b/configure.in +@@ -35,27 +35,18 @@ MYDOCUMENTFILES="COPYING FOSSEXCEPTION ChangeLog doc kyotocabinet.idl" + MYPCFILES="kyotocabinet.pc" + + # Building flags +-MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char -g0 -O2" +-MYCXXFLAGS="-Wall -fPIC -fsigned-char -g0 -O2" +-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I/usr/local/include" ++MYCFLAGS="-Wall -ansi -pedantic -fPIC -fsigned-char" ++MYCXXFLAGS="-Wall -fPIC -fsigned-char" ++MYCPPFLAGS="-I. -I\$(INCLUDEDIR)" + MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1" + MYCPPFLAGS="$MYCPPFLAGS -D_FILE_OFFSET_BITS=64 -D_REENTRANT -D__EXTENSIONS__" +-MYLDFLAGS="-L. -L\$(LIBDIR) -L/usr/local/lib" ++MYLDFLAGS="-L. -L\$(LIBDIR)" + MYCMDLDFLAGS="" + MYCMDLIBS="" + MYLDLIBPATH="" + MYLDLIBPATHENV="LD_LIBRARY_PATH" + MYPOSTCMD="true" + +-# Building paths +-PATH=".:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:$PATH" +-CPATH=".:/usr/local/include:$CPATH" +-LIBRARY_PATH=".:/usr/local/lib:$LIBRARY_PATH" +-LD_LIBRARY_PATH=".:/usr/local/lib:$LD_LIBRARY_PATH" +-PKG_CONFIG_PATH=".:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" +-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH +- +- + + #================================================================ + # Options +@@ -285,14 +276,6 @@ then + MYCMDLIBS="$MYCMDLIBS $LIBS" + fi + +-# As-needed linking +-if uname | grep Linux >config.tmp +-then +- MYLDFLAGS="$MYLDFLAGS -Wl,-rpath-link,.:/usr/local/lib:$MYLDLIBPATH" +- MYLDFLAGS="$MYLDFLAGS -Wl,--as-needed" +-else +- MYCMDLIBS="$MYCMDLIBS $LIBS" +-fi + + # Shared libraries + if test "$enable_shared" != "no" && test "$enable_profile" != "yes" diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch new file mode 100644 index 000000000000..729efc083ba5 --- /dev/null +++ b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-configure-8-byte-atomics.patch @@ -0,0 +1,44 @@ +From: Shawn Landden <shawnlandden@gmail.com> +Date: Thu, 21 Jun 2012 20:34:28 -0700 +Subject: configure: 8 byte atomics + +fix up configure test to handle lack of 8 byte atomics correctly + +as is the case with all ARM targets currently +--- + configure | 29 +++++++++++++---------------- + configure.in | 19 ++++++++++++++++--- + 2 files changed, 29 insertions(+), 19 deletions(-) + +index a07063d..bfc6df0 100755 +--- a/configure.in ++++ b/configure.in +@@ -238,9 +238,22 @@ fi + # Atomic operations + if test "$enable_atomic" != "no" + then +- printf 'checking for atomic operations... ' +- AC_TRY_COMPILE([], [__sync_fetch_and_add], [MYGCCATOMIC=yes], [MYGCCATOMIC=no]) +- if test "$MYGCCATOMIC" = "yes" ++ printf 'checking for 8 byte atomic operations... ' ++ if printf ' ++/* Some targets support 4 byte atomics, but not 8 byte atomics, ++ * and will fail at link time if they are used. ++ * ++ * http://gcc.gnu.org/onlinedocs/gcc-4.6.3/gcc/Atomic-Builtins.html ++ * http://gcc.gnu.org/wiki/Atomic ++ */ ++#include <stdint.h> ++int ++main () ++{ ++uint64_t n = 0xdeadbeaf; ++__sync_bool_compare_and_swap(&n, 0xdeadbeaf, 0); ++return n; ++}' | $CC -xc -o config.tmp - >/dev/null 2>&1 + then + MYCPPFLAGS="$MYCPPFLAGS -D_MYGCCATOMIC" + printf 'yes\n' +-- +1.7.9.5 + diff --git a/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch new file mode 100644 index 000000000000..931e8c3f7bbe --- /dev/null +++ b/dev-db/kyotocabinet/files/kyotocabinet-1.2.76-flags.patch @@ -0,0 +1,31 @@ +--- a/configure.in ++++ b/configure.in +@@ -193,28 +193,6 @@ + # Byte order + AC_C_BIGENDIAN(MYCPPFLAGS="$MYCPPFLAGS -D_MYBIGEND") + +-# System-depending optimization +-printf 'checking for 64-bit availability... ' +-if printf 'main() {}' | $CC -xc -m64 -o config.tmp - >config.tmp 2>&1 +-then +- MYCFLAGS="-m64 $MYCFLAGS" +- MYCXXFLAGS="-m64 $MYCXXFLAGS" +- printf 'yes\n' +-else +- printf 'no\n' +-fi +-if test "$enable_opt" != "no" +-then +- printf 'checking for CPU optimization availability... ' +- if printf 'main() {}' | $CC -xc -march=native -o config.tmp - >config.tmp 2>&1 +- then +- MYCFLAGS="-march=native $MYCFLAGS" +- MYCXXFLAGS="-march=native $MYCXXFLAGS" +- printf 'yes\n' +- else +- printf 'no\n' +- fi +-fi + printf 'checking for useless warnings... ' + if printf 'main() {}' | $CC -xc \ + -Wno-unused-but-set-variable -Wno-unused-but-set-parameter -o config.tmp - >config.tmp 2>&1 diff --git a/dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild b/dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild new file mode 100644 index 000000000000..ea29c3c6f97f --- /dev/null +++ b/dev-db/kyotocabinet/kyotocabinet-1.2.76-r1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils toolchain-funcs + +DESCRIPTION="A straightforward implementation of DBM" +HOMEPAGE="http://fallabs.com/kyotocabinet/" +SRC_URI="${HOMEPAGE}pkg/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha amd64 ~arm64 ~hppa ~ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" +IUSE="debug doc examples static-libs" + +DEPEND="sys-libs/zlib + app-arch/xz-utils" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}"/fix_configure-1.2.62.patch + epatch "${FILESDIR}"/${PN}-1.2.76-configure-8-byte-atomics.patch + epatch "${FILESDIR}"/${PN}-1.2.76-flags.patch + sed -i -e "/DOCDIR/d" Makefile.in || die + tc-export AR + + eautoreconf +} + +src_configure() { + econf $(use_enable debug) \ + $(use_enable static-libs static) \ + $(use_enable !static-libs shared) \ + --enable-lzma --docdir=/usr/share/doc/${PF} +} + +src_test() { + emake -j1 check +} + +src_install() { + emake DESTDIR="${D}" install + + prune_libtool_files + + if use examples; then + insinto /usr/share/${PF}/example + doins example/* + fi + + if use doc; then + insinto /usr/share/doc/${PF} + doins -r doc/* + fi +} diff --git a/dev-db/kyotocabinet/metadata.xml b/dev-db/kyotocabinet/metadata.xml new file mode 100644 index 000000000000..35319898fd0a --- /dev/null +++ b/dev-db/kyotocabinet/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_fPROJ4/Manifest b/dev-db/lib_mysqludf_fPROJ4/Manifest new file mode 100644 index 000000000000..e824128c52e5 --- /dev/null +++ b/dev-db/lib_mysqludf_fPROJ4/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_fPROJ4-0.1.0.tar.gz 2573 SHA256 22ec139f1652040828da18a4b3a469355486d459f8000d25381422b9c9e45cdd SHA512 cc0307bcbdf15a37f77fced46b262783327fbd1e9883bd2d3f55c005bc5948ea7d2b7afa98a75390045636abbb04bb22aeaafdbe670e5642710a6a4a785fd3b3 WHIRLPOOL 8294e54ccae4028796db1efa58a2c9a83625df11a158382ea096aa713d79cda1dbab993926d3b00604e5edca80c27771ba11f5e9b3da719fea69c63cabb1b493 diff --git a/dev-db/lib_mysqludf_fPROJ4/files/lib_mysqludf_fPROJ4-warnings.patch b/dev-db/lib_mysqludf_fPROJ4/files/lib_mysqludf_fPROJ4-warnings.patch new file mode 100644 index 000000000000..0b9669991cb3 --- /dev/null +++ b/dev-db/lib_mysqludf_fPROJ4/files/lib_mysqludf_fPROJ4-warnings.patch @@ -0,0 +1,35 @@ +--- lib_mysqludf_fPROJ4.c.orig 2010-05-09 13:46:12.000000000 +0200 ++++ lib_mysqludf_fPROJ4.c 2011-10-19 02:32:48.000000000 +0200 +@@ -1,5 +1,3 @@ +-/*
+-
+ /*
+ lib_mysqludf_fPROJ4 - An extended set of scientific functions which
+ converts geographic longitude and latitude coordinates into cartesian
+@@ -178,7 +176,7 @@ + }
+ double fPROJ4_transform(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
+ {
+- projPJ pj_in, pj_out;
++ projPJ pj_in=NULL, pj_out=NULL;
+ double x, y,z;
+ int p,t;
+
+@@ -248,7 +246,7 @@ + }
+ double fPROJ4_Geo2UTM(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
+ {
+- projPJ pj_in, pj_out;
++ projPJ pj_in=NULL, pj_out=NULL;
+ double x, y;
+ int p,t,zone;
+ char *tmp;
+@@ -323,7 +321,7 @@ + }
+ double fPROJ4_UTM2Geo(UDF_INIT *initid, UDF_ARGS *args, char *is_null, char *error)
+ {
+- projPJ pj_in, pj_out;
++ projPJ pj_in=NULL, pj_out=NULL;
+ double x, y;
+ int p,t,zone;
+ char *tmp;
diff --git a/dev-db/lib_mysqludf_fPROJ4/lib_mysqludf_fPROJ4-0.1.0.ebuild b/dev-db/lib_mysqludf_fPROJ4/lib_mysqludf_fPROJ4-0.1.0.ebuild new file mode 100644 index 000000000000..f7d8d6e6e98a --- /dev/null +++ b/dev-db/lib_mysqludf_fPROJ4/lib_mysqludf_fPROJ4-0.1.0.ebuild @@ -0,0 +1,64 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="MySQL UDFs which converts geographic/cartesian coordinates" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_fPROJ4/" +SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1 + sci-libs/proj" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P}-src" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-warnings.patch" + + # fix doc (BOM, CR/LF, soname) + sed -i -e '1 s|^\xEF\xBB\xBF||' \ + -e "s|'\(${PN}\).*'|'\1.so'|g" ${PN}.sql + echo >> ${PN}.sql # add LF + edos2unix ${PN}.sql +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} -lproj \ + -shared ${LDFLAGS} -o ${PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${PN}.so + dodoc ${PN}.sql +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_fPROJ4/metadata.xml b/dev-db/lib_mysqludf_fPROJ4/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_fPROJ4/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_json/Manifest b/dev-db/lib_mysqludf_json/Manifest new file mode 100644 index 000000000000..21896873d3a4 --- /dev/null +++ b/dev-db/lib_mysqludf_json/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_json_0.0.2.tar.gz 18177 SHA256 bed11c73d1e5d23669051b8a430f5c17b961e462ee82612b7dcdbceba47052b5 SHA512 04cc299498e7a7c40d2d181649e433c48be29f5dab2f46b64930f415060c3e05065d0d44d28ce0b35d190f3544687aa7e2ea66a69decc12609ec949bd78b8e05 WHIRLPOOL c0084c9f9c35717bbf5b76c311c357bd14dc160c5061bc09b34cd1ddec112c51548b5ca94c1078bd62121f197994de501b478f40c67cc40722817aedd1f86eed diff --git a/dev-db/lib_mysqludf_json/lib_mysqludf_json-0.0.2.ebuild b/dev-db/lib_mysqludf_json/lib_mysqludf_json-0.0.2.ebuild new file mode 100644 index 000000000000..b8b6c29a97e4 --- /dev/null +++ b/dev-db/lib_mysqludf_json/lib_mysqludf_json-0.0.2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="MySQL UDFs to map relational data to the JSON format" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_json/" +SRC_URI="http://www.mysqludf.org/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + # remove precompiled object + rm -f -- ${PN}.so +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${PN}.so + dodoc ${PN}.sql + dohtml ${PN}.html +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_json/metadata.xml b/dev-db/lib_mysqludf_json/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_json/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_log/Manifest b/dev-db/lib_mysqludf_log/Manifest new file mode 100644 index 000000000000..705874adfc1a --- /dev/null +++ b/dev-db/lib_mysqludf_log/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_log_0.0.2.tar.gz 1892 SHA256 4291dcca238129c93169b6351349c252af591de5b7e90424b0de6c690a8c3d6d SHA512 674395c145260122bd14055a838b82d69217841364a496a518eb08860ba0beabe35627fe42108663caaf4a8c461d27551de43942ffd4c724d5ab912a2e74474d WHIRLPOOL d495f2e8b7306a84a6752e069457ba269123992b047414bbb4c67c9aecfe59f3b910e56d4fe79b7b14a964c0b0e577bc3edb423d2541f8f82b8f4aaa241f5e95 diff --git a/dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch b/dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch new file mode 100644 index 000000000000..64b59639a328 --- /dev/null +++ b/dev-db/lib_mysqludf_log/files/lib_mysqludf_log-warnings.patch @@ -0,0 +1,11 @@ +--- lib_mysqludf_log.c.orig 2008-07-07 01:17:06.000000000 +0200 ++++ lib_mysqludf_log.c 2011-10-18 12:50:52.000000000 +0200 +@@ -159,7 +159,7 @@ + } else { + fmt = (char *)initid->ptr; + memcpy(fmt, "%0.", 3); +- sprintf(fmt+3, "%d", args->lengths[0]<=9999? args->lengths[0]: 9999); ++ sprintf(fmt+3, "%d", (int)(args->lengths[0]<=9999? args->lengths[0]: 9999)); + numDigits = strlen(fmt + 4); + memcpy(fmt + 4 + numDigits, "s\n\0", 3); + fprintf(stderr, fmt, args->args[0]); diff --git a/dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild b/dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild new file mode 100644 index 000000000000..a21f93f9c5ae --- /dev/null +++ b/dev-db/lib_mysqludf_log/lib_mysqludf_log-0.0.2.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="MySQL UDF to write to log files" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_log/" +SRC_URI="http://www.mysqludf.org/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-warnings.patch" +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${PN}.so + dodoc ${PN}.sql +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_log/metadata.xml b/dev-db/lib_mysqludf_log/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_log/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_preg/Manifest b/dev-db/lib_mysqludf_preg/Manifest new file mode 100644 index 000000000000..2e1f9807b4f2 --- /dev/null +++ b/dev-db/lib_mysqludf_preg/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_preg-1.0.1.tar.gz 321868 SHA256 50c7179b354148d66a2324f1a8ed918b133924c8fc0cd53c28afda70e1768daa SHA512 36bb9c412d5f69040e5d4b3325a4b95e5e165010daea240c96611135b2c74dddb3e36bb6938c0684ecc30ff08151ce7543167a9e3a05e3e5cd0361102b1b083d WHIRLPOOL 72a0ff7ad9a9e0ff5e1beac108fcbbe8d312268740eb4341eecd4f2eacdbab1bd2fcb20f9770bcbdfe6a6d7d183b11be35cb9ea15f876551c7b0365d48da3812 diff --git a/dev-db/lib_mysqludf_preg/lib_mysqludf_preg-1.0.1.ebuild b/dev-db/lib_mysqludf_preg/lib_mysqludf_preg-1.0.1.ebuild new file mode 100644 index 000000000000..88d9d1d7bad6 --- /dev/null +++ b/dev-db/lib_mysqludf_preg/lib_mysqludf_preg-1.0.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="MySQL UDFs that provide access to the PCRE library for pattern matching" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_preg/" +SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1 + dev-libs/libpcre" +RDEPEND="${DEPEND}" + +RESTRICT="test" + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + edos2unix README + eautoreconf +} + +src_configure() { + econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" +} + +src_install() { + local X + emake DESTDIR="${D}" install + [ -f ${PN}.html ] && dohtml ${PN}.html + [ -d doc/html ] && dohtml -r doc/html/. + for X in API AUTHORS ChangeLog NEWS README *installdb.sql; do + [ -s "${X}" ] && dodoc "${X}" + done + + # remove obsolete *.la file + rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_preg/metadata.xml b/dev-db/lib_mysqludf_preg/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_preg/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_stat/Manifest b/dev-db/lib_mysqludf_stat/Manifest new file mode 100644 index 000000000000..7b4c132981c8 --- /dev/null +++ b/dev-db/lib_mysqludf_stat/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_stat_0.0.3.tar.gz 7325 SHA256 23925494d486ca142a33a5a5766e861d8964772e962f711496f86e19e917fa70 SHA512 553a5f112c67fe773b27ca57c15611b5534ddc7babc0fff6e8771b106dc3037b9ca1459f9d2b201c53161037dc1e909b2a492fc0380340daddee098b5d82bd30 WHIRLPOOL dbe0e2b260f375078ea8ce4901287fea6f088d339b4a0d95e4beda1c88197872df32caa6a8e6265b27a4107097c01ec359dbd31a2c25d2e2359eb121b6f70630 diff --git a/dev-db/lib_mysqludf_stat/files/lib_mysqludf_stat-warnings.patch b/dev-db/lib_mysqludf_stat/files/lib_mysqludf_stat-warnings.patch new file mode 100644 index 000000000000..5447356fea2d --- /dev/null +++ b/dev-db/lib_mysqludf_stat/files/lib_mysqludf_stat-warnings.patch @@ -0,0 +1,20 @@ +--- lib_mysqludf_stat.c.orig 2011-10-19 04:30:24.000000000 +0200 ++++ lib_mysqludf_stat.c 2011-10-19 04:31:21.000000000 +0200 +@@ -550,7 +550,7 @@ + , char *error
+ ){
+ PEARSON* pearson_struct = (PEARSON *)initid->ptr;
+- double result;
++ double result=0.0;
+ if (pearson_struct->n==0){
+ *is_null = 1;
+ } else if (
+@@ -700,7 +700,7 @@ + POINT_BISERIAL_GROUP* X0;
+ POINT_BISERIAL_GROUP* X1;
+ double s;
+- double result;
++ double result=0.0;
+
+ point_biserial_struct = (POINT_BISERIAL *)initid->ptr;
+ X = &point_biserial_struct->X;
diff --git a/dev-db/lib_mysqludf_stat/lib_mysqludf_stat-0.0.3.ebuild b/dev-db/lib_mysqludf_stat/lib_mysqludf_stat-0.0.3.ebuild new file mode 100644 index 000000000000..4037d8e76ffc --- /dev/null +++ b/dev-db/lib_mysqludf_stat/lib_mysqludf_stat-0.0.3.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="MySQL UDFs with statistical functions" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_stat/" +SRC_URI="http://www.mysqludf.org/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-warnings.patch" + + # remove precompiled object + rm -f -- ${PN}.so +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${PN}.so + dodoc ${PN}.sql +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_stat/metadata.xml b/dev-db/lib_mysqludf_stat/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_stat/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_stem/Manifest b/dev-db/lib_mysqludf_stem/Manifest new file mode 100644 index 000000000000..7fcfd104bb8e --- /dev/null +++ b/dev-db/lib_mysqludf_stem/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_stem-0.9.1.tar.gz 953171 SHA256 a98394b8275ea91eae0bd34703c0a686c5b8c3df039128b0487db757646d1f37 SHA512 d15736da91dc5a6f2b0289694efeb531337ff6a001d39aafca02c9f165ba5901163855b8f03d13a50c2ab9bee58e7fc03d19e893d086ec0022de9dd6921f93b7 WHIRLPOOL 26c670424a092052d0ce33b25ba094afa67bb9e1fc6609a3467778f498bf15c0dfe59ce54c29f056a0c33785a32ff36b643217f1768acf624f304e5ef0c79f59 diff --git a/dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch b/dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch new file mode 100644 index 000000000000..c12d1f7d39a9 --- /dev/null +++ b/dev-db/lib_mysqludf_stem/files/lib_mysqludf_stem-mysql_m4.patch @@ -0,0 +1,71 @@ +--- config/ax_lib_mysql.m4.orig 2008-05-28 17:31:47.000000000 +0200 ++++ config/ax_lib_mysql.m4 2008-11-26 22:43:48.000000000 +0100 +@@ -87,10 +87,9 @@ + MYSQL_LDFLAGS="`$MYSQL_CONFIG --libs`" + + MYSQL_VERSION=`$MYSQL_CONFIG --version` +- +- if test `$MYSQL_CONFIG | /usr/bin/awk '{if ($1 == "--plugindir") print 1}'` == "1"; then +- MYSQL_PLUGINDIR=`$MYSQL_CONFIG --plugindir` +- fi ++ if $MYSQL_CONFIG --plugindir > /dev/null; then ++ MYSQL_PLUGINDIR=`$MYSQL_CONFIG --plugindir` ++ fi + + AC_DEFINE([HAVE_MYSQL], [1], + [Define to 1 if MySQL libraries are available]) +--- config/ax_mysql_bin.m4.orig 2007-08-15 02:22:37.000000000 +0200 ++++ config/ax_mysql_bin.m4 2008-11-26 22:55:40.000000000 +0100 +@@ -43,35 +43,36 @@ + fi + + if test -z "$withmysqlbin" -o "$withmysqlbin" = "yes"; then +- for i in /usr/bin /usr/local/bin ; do +- if test -f "$i/mysql" ; then +- MYSQL="$i/mysql $MYSQL_ARGS" +- fi +- done ++ MYSQL=`which mysql`; ++ if test -n "$MYSQL"; then MYSQL="$MYSQL $MYSQL_ARGS"; fi + elif test "$withmysqlbin" != "no"; then + MYSQL="$withmysqlbin" + fi + + if test -n "$MYSQL" ; then +- MYSQLBIN_PATH = `dirname "$MYSQL"` ++ MYSQLBIN_PATH=`dirname "$MYSQL"` + fi + + if test -z "$withmysqladmin" -o "$withmysqladmin" = "yes"; then +- for i in "$MYSQLBIN_PATH" /usr/bin /usr/local/bin ; do +- if test -n "$i" -a -f "$i/mysqladmin" ; then +- MYSQLADMIN="$i/mysqladmin $MYSQL_ARGS" +- fi +- done ++ if test -n "$MYSQLBIN_PATH" -a -f "$MYSQLBIN_PATH/mysqladmin"; then ++ MYSQLADMIN="$MYSQLBIN_PATH/mysqladmin"; ++ else ++ MYSQLADMIN=`which mysqladmin`; ++ fi ++ ++ if test -n "$MYSQLADMIN"; then MYSQLADMIN="$MYSQLADMIN $MYSQL_ARGS"; fi + elif test "$withmysqladmin" != "no"; then + MYSQLADMIN="$withmysqladmin" + fi + + if test -z "$withmysqltest" -o "$withmysqltest" = "yes"; then +- for i in "$MYSQLBIN_PATH" /usr/bin /usr/local/bin ; do +- if test -n "$i" -a -f "$i/mysqltest" ; then +- MYSQLTEST="$i/mysqltest $MYSQL_ARGS" +- fi +- done ++ if test -n "$MYSQLBIN_PATH" -a -f "$MYSQLBIN_PATH/mysqltest"; then ++ MYSQLTEST="$MYSQLBIN_PATH/mysqltest"; ++ else ++ MYSQLTEST=`which mysqltest`; ++ fi ++ ++ if test -n "$MYSQLTEST"; then MYSQLTEST="$MYSQLTEST $MYSQL_ARGS"; fi + elif test "$withmysqltest" != "no"; then + MYSQLTEST="$withmysqltest" + fi diff --git a/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild b/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild new file mode 100644 index 000000000000..657736503664 --- /dev/null +++ b/dev-db/lib_mysqludf_stem/lib_mysqludf_stem-0.9.1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="MySQL UDFs which provides stemming capability for a variety of languages" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_stem/" +SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +RESTRICT="test" + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + # add AC_PROG_CXX to configure.ac + sed -i -e 's|\(AC_PROG_CC\)|\1\nAC_PROG_CXX|g' configure.ac + + # fix ax_lib_mysql.m4 + ax_mysql_bin.m4 + epatch "${FILESDIR}/${PN}-mysql_m4.patch" + + # fix and clean libstemmer_c + sed -i -e 's|^\(CFLAGS\)=|\1+=-fPIC |g' libstemmer_c/Makefile + rm -f -- libstemmer_c/stemwords libstemmer_c/*.{o,a} libstemmer_c/*/*.o + + edos2unix installdb.sql + eautoreconf +} + +src_configure() { + econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" +} + +src_install() { + local X + emake DESTDIR="${D}" install + dodoc libstemmer_c/libstemmer/*.txt + [ -f ${PN}.html ] && dohtml ${PN}.html + [ -d doc/html ] && dohtml -r doc/html/. + for X in API AUTHORS ChangeLog NEWS README *installdb.sql; do + [ -s "${X}" ] && dodoc "${X}" + done + + # remove obsolete *.la file + rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_stem/metadata.xml b/dev-db/lib_mysqludf_stem/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_stem/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_str/Manifest b/dev-db/lib_mysqludf_str/Manifest new file mode 100644 index 000000000000..de4f60392fa7 --- /dev/null +++ b/dev-db/lib_mysqludf_str/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_str-0.3.tar.gz 353717 SHA256 6a11bcfba19f97dfc696d0871779eba67e2a6badc20364403a9f68a9bb8a398b SHA512 a63ffbfd352db087da5a3e70f713845a88c6f4db47511a5b359bb8bcb466070d34b5e2b16d2bde38bd617ed209e2dc4553bbccfb406820e7669aa688652332b8 WHIRLPOOL 42712c9dc2948819680b1afb8f76f3ac3ad1b644c2215ae245afdc94c9f0be0eae5c27e799a336000a6865ac40cd467bf3e49b728ec27373698532b21416fb85 diff --git a/dev-db/lib_mysqludf_str/lib_mysqludf_str-0.3.ebuild b/dev-db/lib_mysqludf_str/lib_mysqludf_str-0.3.ebuild new file mode 100644 index 000000000000..7da3f82dc2e8 --- /dev/null +++ b/dev-db/lib_mysqludf_str/lib_mysqludf_str-0.3.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="MySQL UDFs of string functions that complement the set of native ones" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_str/" +SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +RESTRICT="test" + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + edos2unix README + eautoreconf +} + +src_configure() { + econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" +} + +src_install() { + emake DESTDIR="${D}" install + [ -f ${PN}.html ] && dohtml ${PN}.html + [ -d doc/html ] && dohtml -r doc/html/. + for X in API AUTHORS ChangeLog NEWS README *installdb.sql; do + [ -s "${X}" ] && dodoc "${X}" + done + + # remove obsolete *.la file + rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_str/metadata.xml b/dev-db/lib_mysqludf_str/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_str/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_sys/Manifest b/dev-db/lib_mysqludf_sys/Manifest new file mode 100644 index 000000000000..7a99237b4058 --- /dev/null +++ b/dev-db/lib_mysqludf_sys/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_sys_0.0.3.tar.gz 9136 SHA256 174f43d1df5372c84d98981031f02a2b9e090954ac473f543bff79f9a87c2c4d SHA512 17154007bc315b7f5c98ed4eb0f6305a1c2bbd4a66a3b6985ed4547baddffcaac71a384fcce0780e26968021439f32534160661a5db756a012763b2ac74a3060 WHIRLPOOL 5c4a626a12507af799c8b54c457d01556b80c91582aa22668e733ca6013ea70693feeaade8908ab3650cb84db7f0997df5b102ec5eb75b0eb0353c9e970639a6 diff --git a/dev-db/lib_mysqludf_sys/lib_mysqludf_sys-0.0.3.ebuild b/dev-db/lib_mysqludf_sys/lib_mysqludf_sys-0.0.3.ebuild new file mode 100644 index 000000000000..ca363b97ff7c --- /dev/null +++ b/dev-db/lib_mysqludf_sys/lib_mysqludf_sys-0.0.3.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="MySQL UDFs that allows one to interact with the operating system" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_sys/" +SRC_URI="http://www.mysqludf.org/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + # remove precompiled object + rm -f -- ${PN}.so +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${PN}.so + dodoc ${PN}.sql + dohtml ${PN}.html +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_sys/metadata.xml b/dev-db/lib_mysqludf_sys/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_sys/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_ta/Manifest b/dev-db/lib_mysqludf_ta/Manifest new file mode 100644 index 000000000000..df37fbf1cbea --- /dev/null +++ b/dev-db/lib_mysqludf_ta/Manifest @@ -0,0 +1 @@ +DIST joaocosta-lib_mysqludf_ta-a8e623c.tar.gz 932876 SHA256 6f1b728018f1bae276ce6d6722263fa07c8a864752b8906a030e3830e6321069 SHA512 4e8422067a055b55bdd1e7103f925f47b8174a83bd20d337d3f39479eebba3de9da0dc8a382441c090c6ef86b03e965d34a38b4c0f3ecc14ad0408aa2cdf511a WHIRLPOOL a4b6b644d01ca23708166307533ae5ea3b26da70728c1a08d2fb1f74b28d567c5a724ce1b036d82c80e5591247addcfed1e554ebfba33e0b69e47d0017b6e08b diff --git a/dev-db/lib_mysqludf_ta/lib_mysqludf_ta-0.1.ebuild b/dev-db/lib_mysqludf_ta/lib_mysqludf_ta-0.1.ebuild new file mode 100644 index 000000000000..c369e882397f --- /dev/null +++ b/dev-db/lib_mysqludf_ta/lib_mysqludf_ta-0.1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs autotools + +MY_REV="a8e623c" # checkout revision +MY_USR="joaocosta" # user name + +MY_P="${MY_USR}-${PN}-${MY_REV}" + +DESCRIPTION="MySQL UDFs with technical analysis functions" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_ta/" +SRC_URI="https://github.com/${MY_USR}/${PN}/tarball/${MY_REV} -> ${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +RESTRICT="test" + +S="${WORKDIR}/${MY_P}" + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + + # fix Makefile.am + sed -i -e "s|\(-shared\)|\1 -avoid-version|g" Makefile.am + + # convert to UTF-8 + iconv -f LATIN1 -t UTF-8 < README > README~ + mv -f README~ README + + edos2unix README + eautoreconf +} + +src_configure() { + econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README sampledb.sql + + # remove obsolete *.la file + rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_ta/metadata.xml b/dev-db/lib_mysqludf_ta/metadata.xml new file mode 100644 index 000000000000..4ac18c38ace4 --- /dev/null +++ b/dev-db/lib_mysqludf_ta/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">joaocosta/lib_mysqludf_ta</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_udf/Manifest b/dev-db/lib_mysqludf_udf/Manifest new file mode 100644 index 000000000000..15c3abe29586 --- /dev/null +++ b/dev-db/lib_mysqludf_udf/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_udf_0.0.3.tar.gz 2516 SHA256 47b46f6112d8d69798904f4bd33f703b4af47e6e13fecd2d1ca546322356b895 SHA512 5fdaa12b3846eb3921f8fbdf9001706155287066dd488fff2bb8419b306b20cad24e677224368c80e3f3af0379a4038e5a532d855ce16366c7a152cd1127c162 WHIRLPOOL 694910134dc11644d8e85fd51481f38644603810a8ee136e2e56e08d593551cd1582647297c61ae4768b5833e42d634dcf12b1c40cbbbcc089b866c7122f1123 diff --git a/dev-db/lib_mysqludf_udf/lib_mysqludf_udf-0.0.3.ebuild b/dev-db/lib_mysqludf_udf/lib_mysqludf_udf-0.0.3.ebuild new file mode 100644 index 000000000000..8bb33bcce7be --- /dev/null +++ b/dev-db/lib_mysqludf_udf/lib_mysqludf_udf-0.0.3.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +DESCRIPTION="MySQL UDFs for reporting internals from the udf interface" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_udf/" +SRC_URI="http://www.mysqludf.org/${PN}/${PN}_${PV}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${PN}.so + dodoc ${PN}.sql +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_udf/metadata.xml b/dev-db/lib_mysqludf_udf/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_udf/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lib_mysqludf_xql/Manifest b/dev-db/lib_mysqludf_xql/Manifest new file mode 100644 index 000000000000..81fa34125725 --- /dev/null +++ b/dev-db/lib_mysqludf_xql/Manifest @@ -0,0 +1 @@ +DIST lib_mysqludf_xql-1.0.0.tar.gz 328273 SHA256 f992fcd77f7596aee32ddeccbd9b31aa67c9cf2cd04f84959db63f87e1ca0321 SHA512 3f9e9d4234c0f991a176dd9b1bf3be7edbec19c9df9fe79ce4897eeb5c4528faf0a942866e67f934d1e151732552493f3a5a57acb3db43094d2295e0cafc886b WHIRLPOOL 6bf3138e2ec5184fe0bf184f12a98abfc5d9b21e6830a57e63fd5858a96fd7885c07c4a90dc41236f255dcacec72e015378a4cf029e0daf2974ac49fbef93932 diff --git a/dev-db/lib_mysqludf_xql/lib_mysqludf_xql-1.0.0.ebuild b/dev-db/lib_mysqludf_xql/lib_mysqludf_xql-1.0.0.ebuild new file mode 100644 index 000000000000..b8a9097c3f6a --- /dev/null +++ b/dev-db/lib_mysqludf_xql/lib_mysqludf_xql-1.0.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="MySQL UDFs which can be used to create XML output directly from MySQL" +HOMEPAGE="http://www.mysqludf.org/lib_mysqludf_xql/" +SRC_URI="http://www.mysqludf.org/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1 + dev-libs/libxml2" +RDEPEND="${DEPEND}" + +RESTRICT="test" + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + edos2unix API installdb.sql + eautoreconf +} + +src_configure() { + econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" +} + +src_install() { + local X + emake DESTDIR="${D}" install + [ -f ${PN}.html ] && dohtml ${PN}.html + [ -d doc/html ] && dohtml -r doc/html/. + for X in API AUTHORS ChangeLog NEWS README *installdb.sql; do + [ -s "${X}" ] && dodoc "${X}" + done + + # remove obsolete *.la file + rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/lib_mysqludf_xql/metadata.xml b/dev-db/lib_mysqludf_xql/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/lib_mysqludf_xql/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/libdbi-drivers/Manifest b/dev-db/libdbi-drivers/Manifest new file mode 100644 index 000000000000..8187cca2d4c6 --- /dev/null +++ b/dev-db/libdbi-drivers/Manifest @@ -0,0 +1 @@ +DIST libdbi-drivers-0.9.0.tar.gz 1829864 SHA256 43d2eacd573a4faff296fa925dd97fbf2aedbf1ae35c6263478210c61004c854 SHA512 f4d3aaa71014697c53012a10bf9f0af398bcf5ee5872af165f8f43a682d2fb3045a9172ffea0e068dcbfcad52494878c037d8d90fadfaf176936e42f7f1e85c1 WHIRLPOOL 6ed745a19afe4b6b5d51f7730ca9698e645fac529051aeaae886938e063f8fcd3357c2f24913a5428db4847de1de38e931acc1e3e20aeed3e6d71b6877a104d6 diff --git a/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch b/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch new file mode 100644 index 000000000000..d0d74221fdb0 --- /dev/null +++ b/dev-db/libdbi-drivers/files/libdbi-drivers-0.9.0-doc-build-fix.patch @@ -0,0 +1,22 @@ +diff -Nuar libdbi-drivers-0.9.0.orig/configure.in libdbi-drivers-0.9.0/configure.in +--- libdbi-drivers-0.9.0.orig/configure.in 2013-03-11 23:41:05.000000000 +0000 ++++ libdbi-drivers-0.9.0/configure.in 2013-08-29 15:52:57.632105403 +0000 +@@ -165,14 +165,13 @@ + dnl See whether to build the docs + dnl ============================== + +-ac_docs="YES" ++ac_docs="yes" + AC_ARG_ENABLE(docs, + [ --disable-docs do not build and install the documentation.], +- [ if test "$enable_docs" = "no"; then +- ac_docs="NO" +- fi]) ++ [ ac_docs="$enableval" ], ++ [ ac_docs="no" ]) + +-if test "$ac_docs" = "YES"; then ++if test "$ac_docs" = "yes"; then + docs_subdirs="doc" + else + docs_subdirs="" diff --git a/dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild b/dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild new file mode 100644 index 000000000000..ebfa017ffc80 --- /dev/null +++ b/dev-db/libdbi-drivers/libdbi-drivers-0.9.0.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils autotools + +DESCRIPTION="The libdbi-drivers project maintains drivers for libdbi" +SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${P}/${P}.tar.gz" +HOMEPAGE="http://libdbi-drivers.sourceforge.net/" +LICENSE="LGPL-2.1" + +IUSE="doc firebird mysql oci8 postgres +sqlite static-libs" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +SLOT=0 +REQUIRED_USE="|| ( mysql postgres sqlite firebird oci8 )" +RESTRICT="firebird? ( bindist )" + +RDEPEND=" + >=dev-db/libdbi-0.9.0 + firebird? ( dev-db/firebird ) + mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + sqlite? ( dev-db/sqlite:3 ) +" +DEPEND="${RDEPEND} + doc? ( app-text/openjade ) +" + +DOCS="AUTHORS ChangeLog NEWS README README.osx TODO" + +pkg_setup() { + use oci8 && [[ -z "${ORACLE_HOME}" ]] && die "\$ORACLE_HOME is not set!" +} + +src_prepare() { + #"${FILESDIR}"/${P}-fix-ac-macro.patch \ + #"${FILESDIR}"/${PN}-0.8.3-oracle-build-fix.patch \ + #"${FILESDIR}"/${PN}-0.8.3-firebird-fix.patch + epatch \ + "${FILESDIR}"/${PN}-0.9.0-doc-build-fix.patch + eautoreconf +} + +src_configure() { + local myconf="" + # WARNING: the configure script does NOT work correctly + # --without-$driver does NOT work + # so do NOT use `use_with...` + # Future additions: + # msql + # freetds + # ingres + # db2 + use mysql && myconf+=" --with-mysql" + use postgres && myconf+=" --with-pgsql" + use sqlite && myconf+=" --with-sqlite3" + use firebird && myconf+=" --with-firebird" + if use oci8; then + [[ -z "${ORACLE_HOME}" ]] && die "\$ORACLE_HOME is not set!" + myconf+=" --with-oracle-dir=${ORACLE_HOME} --with-oracle" + fi + + econf \ + $(use_enable doc docs) \ + $(use_enable static-libs static) \ + ${myconf} +} + +src_test() { + if [[ -z "${WANT_INTERACTIVE_TESTS}" ]]; then + ewarn "Tests disabled due to interactivity." + ewarn "Run with WANT_INTERACTIVE_TESTS=1 if you want them." + return 0 + fi + einfo "Running interactive tests" + emake check +} + +src_install() { + default + + prune_libtool_files --all +} diff --git a/dev-db/libdbi-drivers/metadata.xml b/dev-db/libdbi-drivers/metadata.xml new file mode 100644 index 000000000000..dfe597613c3d --- /dev/null +++ b/dev-db/libdbi-drivers/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">libdbi-drivers</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/libdbi/Manifest b/dev-db/libdbi/Manifest new file mode 100644 index 000000000000..bc30e36d9b42 --- /dev/null +++ b/dev-db/libdbi/Manifest @@ -0,0 +1 @@ +DIST libdbi-0.9.0.tar.gz 1194284 SHA256 dafb6cdca524c628df832b6dd0bf8fabceb103248edb21762c02d3068fca4503 SHA512 ee8777195af43057409d051a6055ec0467cd926d48da076458b09f91d2f0995a1cc4bc071762e401b7bdcd8a4173fd8ea3472db3a1518e34b4c5b5ed24e4e2ce WHIRLPOOL 32770a9247670f30cd280a7c2111239d251e09d7c72e6b3890d02fdf3db7384de88e899431999e1b476ac099d4b8cd9f4d727d9610d47d62dccb9229bcdb36b7 diff --git a/dev-db/libdbi/files/dbi.pc.in b/dev-db/libdbi/files/dbi.pc.in new file mode 100644 index 000000000000..a0144549db9b --- /dev/null +++ b/dev-db/libdbi/files/dbi.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@/dbi + +Name: libdbi +Description: database-independent abstraction layer in C +Version: @VERSION@ +Libs: -L${libdir} -ldbi +Cflags: -I${includedir} -I${includedir}/dbi diff --git a/dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch b/dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch new file mode 100644 index 000000000000..c0818b9c295b --- /dev/null +++ b/dev-db/libdbi/files/libdbi-0.9.0-doc-build-fix.patch @@ -0,0 +1,22 @@ +diff -Nuar libdbi-0.9.0.orig/configure.in libdbi-0.9.0/configure.in +--- libdbi-0.9.0.orig/configure.in 2013-08-29 15:34:54.883102666 +0000 ++++ libdbi-0.9.0/configure.in 2013-08-29 15:36:07.827905613 +0000 +@@ -201,14 +201,13 @@ + dnl See whether to build the docs + dnl ============================== + +-ac_docs="YES" ++ac_docs="yes" + AC_ARG_ENABLE(docs, + [ --disable-docs do not build and install the documentation.], +- [ if test "$enable_docs" = "no"; then +- ac_docs="NO" +- fi]) ++ [ ac_docs="$enableval" ], ++ [ ac_docs="no" ]) + +-if test "$ac_docs" = "YES"; then ++if test "$ac_docs" = "yes"; then + docs_subdirs="doc" + else + docs_subdirs="" diff --git a/dev-db/libdbi/libdbi-0.9.0.ebuild b/dev-db/libdbi/libdbi-0.9.0.ebuild new file mode 100644 index 000000000000..f4a26ba90390 --- /dev/null +++ b/dev-db/libdbi/libdbi-0.9.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils autotools multilib + +DESCRIPTION="libdbi is a database-independent abstraction layer in C, similar to the DBI/DBD layer in Perl" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +HOMEPAGE="http://libdbi.sourceforge.net/" +LICENSE="LGPL-2.1" + +IUSE="doc static-libs" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd" +SLOT=0 + +DOCS="AUTHORS ChangeLog README README.osx TODO" + +RDEPEND="" +DEPEND="${RDEPEND} + >=sys-apps/sed-4 + virtual/pkgconfig + doc? ( app-text/openjade ) +" +PDEPEND=">=dev-db/libdbi-drivers-0.9.0" # On purpose, libdbi-drivers 0.8.4 does not exist + +src_unpack() { + unpack ${A} + chown -R portage:portage "${S}" +} + +src_prepare() { + #epatch "${FILESDIR}"/${PN}-0.9.0-fix-ac-macro.patch + #epatch "${FILESDIR}"/libdbi-0.8.1-pkg-config.patch + #cp -f "${FILESDIR}"/dbi.pc.in "${S}"/dbi.pc.in + epatch "${FILESDIR}"/libdbi-0.9.0-doc-build-fix.patch + + # configure.in has been changed + eautoreconf + # should append CFLAGS, not replace them + sed -i.orig -e 's/^CFLAGS = /CFLAGS += /g' src/Makefile.in +} + +src_configure() { + econf \ + $(use_enable doc docs) \ + $(use_enable static-libs static) +} + +src_install () { + default + + prune_libtool_files --all + + # syslog-ng requires dbi.pc + insinto /usr/$(get_libdir)/pkgconfig/ + doins dbi.pc +} diff --git a/dev-db/libdbi/metadata.xml b/dev-db/libdbi/metadata.xml new file mode 100644 index 000000000000..f3e9046633f0 --- /dev/null +++ b/dev-db/libdbi/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">libdbi</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/libiodbc/Manifest b/dev-db/libiodbc/Manifest new file mode 100644 index 000000000000..c74ce7e0c469 --- /dev/null +++ b/dev-db/libiodbc/Manifest @@ -0,0 +1 @@ +DIST libiodbc-3.52.8.zip 1188493 SHA256 f96cee2f04ab01b3c32297262ebf97b3faed1e49688399e656e8e4743ed72a0c SHA512 76da1e69a6e7ab1b7ba103547070c5dfe7c40fa88d82c243640d862c93c19e731d5a35d0575038491a148bb1d1cb7c5168dc30bf3f9600b31f4e014350f16551 WHIRLPOOL b6dafe709c3dff771ef43f023e62f528d92f9f9b05f0b986942826a2ded16e3cc2ccdae1606b2c31931ee487d01c25a173488c5e6d6c1ddafddb8f6be7dd326b diff --git a/dev-db/libiodbc/files/fix-runpaths.patch b/dev-db/libiodbc/files/fix-runpaths.patch new file mode 100644 index 000000000000..e913b4c7c4cc --- /dev/null +++ b/dev-db/libiodbc/files/fix-runpaths.patch @@ -0,0 +1,15 @@ +--- samples/Makefile.am 2012-03-27 05:15:02.000000000 +0200 ++++ samples/Makefile.am.new 2013-04-09 14:07:48.303789999 +0200 +@@ -78,12 +78,10 @@ + # + iodbctest_SOURCES = iodbctest.c + iodbctest_LDADD = ../iodbc/libiodbc.la +-iodbctest_LDFLAGS = -static + + iodbctestw_CFLAGS = -DUNICODE + iodbctestw_SOURCES = iodbctest.c + iodbctestw_LDADD = ../iodbc/libiodbc.la +-iodbctestw_LDFLAGS = -static + + EXTRA_DIST = $(srcdir)/Makefile.sample + diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch new file mode 100644 index 000000000000..5e19d1e68094 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug501100.patch @@ -0,0 +1,14 @@ +Index: libiodbc2-3.52.7/include/sqltypes.h +=================================================================== +--- libiodbc2-3.52.7.orig/include/sqltypes.h 2010-06-26 21:15:00.000000000 +0200 ++++ libiodbc2-3.52.7/include/sqltypes.h 2010-06-26 21:15:36.000000000 +0200 +@@ -96,6 +96,9 @@ + extern "C" { + #endif + ++#ifndef _IODBCUNIX_H ++#include <iodbcunix.h> ++#endif + + /* + * Environment specific definitions diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch new file mode 100644 index 000000000000..d1e80184e5b1 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-debian_bug508480.patch @@ -0,0 +1,14 @@ +Index: libiodbc2-3.52.7/iodbcinst/inifile.c +=================================================================== +--- libiodbc2-3.52.7.orig/iodbcinst/inifile.c 2010-06-26 21:29:43.000000000 +0200 ++++ libiodbc2-3.52.7/iodbcinst/inifile.c 2010-06-26 21:30:07.000000000 +0200 +@@ -1023,7 +1023,8 @@ + + if (!_iodbcdm_cfg_find (pCfg, lpszSection, NULL)) + { +- while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg)) ++ while (curr < cbRetBuffer && 0 == _iodbcdm_cfg_nextentry (pCfg) ++ && pCfg->section) + { + if (_iodbcdm_cfg_section (pCfg)) + break; diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch new file mode 100644 index 000000000000..83fc954d46c9 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-gtk.patch @@ -0,0 +1,16 @@ +diff -pruN 3.52.6-1/configure.in 3.52.6-1ubuntu1/configure.in +--- 3.52.6-1/configure.in 2007-10-08 14:04:32.000000000 +0100 ++++ 3.52.6-1ubuntu1/configure.in 2007-12-06 00:12:00.000000000 +0000 +@@ -315,12 +315,6 @@ then + no_gtk="" + # Check for GTK+ 2.x + AM_PATH_GTK_2_0(2.0.0) +- if test x$no_gtk != x +- then +- # Try GTK 1.2.x instead +- no_gtk="" +- AM_PATH_GTK(1.2.3) +- fi + if test x$no_gtk = x + then + USE_GTK=true diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch new file mode 100644 index 000000000000..73e81d30aec0 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-multilib.patch @@ -0,0 +1,35 @@ +--- bin/iodbc-config.in.orig 2006-01-23 11:29:22.000000000 +0100 ++++ bin/iodbc-config.in 2009-06-04 17:48:19.000000000 +0200 +@@ -145,10 +145,10 @@ + echo_libs=yes + ;; + --static-libs) +- echo_staticlibs=yes ++ echo_libs=yes + ;; + --libtool-libs) +- echo_libtoollibs=yes ++ echo_libs=yes + ;; + --data-dir) + echo_data_dir=yes +@@ -196,19 +196,5 @@ + if test "$lib_iodbc" = "yes"; then + libs="$libs -liodbc -liodbcinst" + fi +- echo "-L@libdir@ $libs" +-fi +-if test "$echo_staticlibs" = "yes"; then +- libs="" +- if test "$lib_iodbc" = "yes"; then +- libs="@libdir@/libiodbc.a @libdir@/libiodbcinst.a @LIBADD_DL@" +- fi +- echo "$libs" +-fi +-if test "$echo_libtoollibs" = "yes"; then +- libs="" +- if test "$lib_iodbc" = "yes"; then +- libs="@libdir@/libiodbc.la @libdir@/libiodbcinst.la" +- fi + echo "$libs" + fi diff --git a/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch b/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch new file mode 100644 index 000000000000..67730ec65556 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.7-unicode_includes.patch @@ -0,0 +1,12 @@ +Index: libiodbc2-3.52.7/iodbcinst/unicode.h +=================================================================== +--- libiodbc2-3.52.7.orig/iodbcinst/unicode.h 2009-09-09 14:13:17.000000000 +0200 ++++ libiodbc2-3.52.7/iodbcinst/unicode.h 2010-06-26 21:16:26.000000000 +0200 +@@ -76,6 +76,7 @@ + + #ifndef _UNICODE_H + #define _UNICODE_H ++#include <iodbc.h> + + + #if defined (__APPLE__) && !defined (MACOSX102) && !defined (HAVE_CONFIG_H) diff --git a/dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch b/dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch new file mode 100644 index 000000000000..7278499aff35 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.8-gtk-parallel-make.patch @@ -0,0 +1,23 @@ +diff -u -r iODBC-3.52.8.orig/iodbcadm/Makefile.am iODBC-3.52.8/iodbcadm/Makefile.am +--- iODBC-3.52.8.orig/iodbcadm/Makefile.am 2012-03-27 05:15:02.000000000 -0500 ++++ iODBC-3.52.8/iodbcadm/Makefile.am 2013-01-08 08:12:58.639414826 -0600 +@@ -96,7 +96,7 @@ + + if GTK + libiodbcadm_la_LIBADD = \ +- ../iodbcadm/gtk/libiodbcadm-gtk.la \ ++ gtk/libiodbcadm-gtk.la \ + $(LIBADD_DL) \ + @GTK_LIBS@ \ + ../iodbcinst/libiodbc_common.la \ +@@ -117,8 +117,8 @@ + + iodbcadm_gtk_SOURCES = + iodbcadm_gtk_LDADD = \ +- ../iodbcadm/gtk/main.lo \ +- ../iodbcadm/libiodbcadm.la \ ++ gtk/main.lo \ ++ libiodbcadm.la \ + ../iodbcinst/libiodbcinst.la \ + ../iodbc/libiodbc.la \ + @GTK_LIBS@ diff --git a/dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch b/dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch new file mode 100644 index 000000000000..50724ba46b48 --- /dev/null +++ b/dev-db/libiodbc/files/libiodbc-3.52.8-runtime-failures.patch @@ -0,0 +1,56 @@ +diff -u -r iODBC-3.52.8.orig/configure.in iODBC-3.52.8/configure.in +--- iODBC-3.52.8.orig/configure.in 2012-03-27 05:15:02.000000000 -0500 ++++ iODBC-3.52.8/configure.in 2013-01-08 10:31:39.740041040 -0600 +@@ -87,7 +87,7 @@ + AC_CONFIG_SRCDIR([include/isql.h]) + AC_CONFIG_AUX_DIR(admin) + AC_CONFIG_MACRO_DIR(admin) +-AM_CONFIG_HEADER(include/config.h) ++AC_CONFIG_HEADER(include/config.h) + AM_INIT_AUTOMAKE(AC_PACKAGE_TARNAME, AC_PACKAGE_VERSION) + AC_CANONICAL_HOST + AM_MAINTAINER_MODE +diff -u -r iODBC-3.52.8.orig/iodbcadm/gtk/administrator.c iODBC-3.52.8/iodbcadm/gtk/administrator.c +--- iODBC-3.52.8.orig/iodbcadm/gtk/administrator.c 2012-03-27 05:15:02.000000000 -0500 ++++ iODBC-3.52.8/iodbcadm/gtk/administrator.c 2013-01-08 10:29:51.758462953 -0600 +@@ -72,6 +72,13 @@ + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + ++#ifdef __linux ++# ifndef _GNU_SOURCE ++# define _GNU_SOURCE /* make sure dladdr is declared */ ++# endif ++# define HAVE_DL_INFO 1 ++#endif ++ + #include <iodbc.h> + #include <dlfcn.h> + #include <sys/stat.h> +@@ -82,7 +89,7 @@ + #include "odbc4.xpm" + + +-#if !defined(HAVE_DL_INFO) ++#if defined (HAVE_DLADDR) && !defined(HAVE_DL_INFO) + typedef struct + { + const char *dli_fname; /* File name of defining object. */ +@@ -90,6 +97,7 @@ + const char *dli_sname; /* Name of nearest symbol. */ + void *dli_saddr; /* Exact value of nearest symbol. */ + } Dl_info; ++ + #endif /* HAVE_DL_INFO */ + + static char *szDriverButtons[] = { +diff -u -r iODBC-3.52.8.orig/iodbcadm/gtk/gui.h iODBC-3.52.8/iodbcadm/gtk/gui.h +--- iODBC-3.52.8.orig/iodbcadm/gtk/gui.h 2012-03-27 05:15:02.000000000 -0500 ++++ iODBC-3.52.8/iodbcadm/gtk/gui.h 2013-01-08 10:30:48.124240299 -0600 +@@ -219,5 +219,6 @@ + void addlistofdir_to_optionmenu(GtkWidget* widget, LPCSTR path, TDSNCHOOSER *choose_t); + LPSTR create_keyval (HWND wnd, LPCSTR attrs, BOOL *verify_conn); + LPSTR create_fgensetup (HWND hwnd, LPCSTR dsn, LPCSTR attrs, BOOL add, BOOL *verify_conn); ++void create_message (HWND hwnd, LPCSTR dsn, LPCSTR text); + + #endif diff --git a/dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild b/dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild new file mode 100644 index 000000000000..20769287343a --- /dev/null +++ b/dev-db/libiodbc/libiodbc-3.52.8-r2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit autotools eutils multilib-minimal + +MY_PN="iODBC" + +DESCRIPTION="ODBC Interface for Linux" +HOMEPAGE="http://www.iodbc.org/" +SRC_URI="https://github.com/openlink/${MY_PN}/archive/v${PV}.zip -> ${P}.zip" + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos" +LICENSE="|| ( LGPL-2 BSD )" +SLOT="0" +IUSE="gtk" + +RDEPEND="gtk? ( x11-libs/gtk+:2[${MULTILIB_USEDEP}] )" + +DEPEND="${RDEPEND}" + +DOCS="AUTHORS ChangeLog NEWS README" + +S="${WORKDIR}/${MY_PN}-${PV}" + +MULTILIB_CHOST_TOOLS=( + /usr/bin/iodbc-config +) + +src_prepare() { + sed -i.orig \ + -e '/^cd "$PREFIX"/,/^esac/d' \ + iodbc/install_libodbc.sh || die "sed failed" + epatch \ + "${FILESDIR}"/libiodbc-3.52.7-debian_bug501100.patch \ + "${FILESDIR}"/libiodbc-3.52.7-debian_bug508480.patch \ + "${FILESDIR}"/libiodbc-3.52.7-gtk.patch \ + "${FILESDIR}"/libiodbc-3.52.7-multilib.patch \ + "${FILESDIR}"/libiodbc-3.52.7-unicode_includes.patch \ + "${FILESDIR}"/libiodbc-3.52.8-gtk-parallel-make.patch \ + "${FILESDIR}"/libiodbc-3.52.8-runtime-failures.patch \ + "${FILESDIR}"/fix-runpaths.patch + chmod -x include/*.h || die + eautoreconf +} + +multilib_src_configure() { + ECONF_SOURCE=${S} \ + econf \ + --disable-static \ + --enable-odbc3 \ + --enable-pthreads \ + --with-layout=gentoo \ + --with-iodbc-inidir=yes \ + $(use_enable gtk gui) +} + +multilib_src_install_all() { + einstalldocs + prune_libtool_files + + # Install lintian overrides + insinto /usr/share/lintian/overrides + newins debian/iodbc.lintian-overrides iodbc + newins debian/libiodbc2.lintian-overrides libiodbc2 +} diff --git a/dev-db/libiodbc/metadata.xml b/dev-db/libiodbc/metadata.xml new file mode 100644 index 000000000000..ccf439c60983 --- /dev/null +++ b/dev-db/libiodbc/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>olemarkus@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">openlink/iODBC</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/libodbc++/Manifest b/dev-db/libodbc++/Manifest new file mode 100644 index 000000000000..91af151f77de --- /dev/null +++ b/dev-db/libodbc++/Manifest @@ -0,0 +1 @@ +DIST libodbc++-0.2.5.tar.bz2 362310 SHA256 ba3030a27b34e4aafbececa2ddbbf42a38815e9534f34c051620540531b5e23e SHA512 cc2485a0dae8a3f548a26a759f1421133a0a23715296f632067f5967b61778ca64e1339e19a4de15d06fb80b4e43ec8ddb13ba170b70dd7202c4d07b5669c2c7 WHIRLPOOL e39b35d288f6a37ea84815346540f07f39ed30fca3cdf9ce768ef48a3133301364a45fc2495daf11d6655d3d7748a7b9ab833b16213e67bce92c403dfdc9806f diff --git a/dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch b/dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch new file mode 100644 index 000000000000..e750c198123f --- /dev/null +++ b/dev-db/libodbc++/files/libodbc++-0.2.3-doxygen.patch @@ -0,0 +1,12 @@ +diff -ur libodbc++-0.2.3-orig/doc/progref/Doxyfile libodbc++-0.2.3/doc/progref/Doxyfile +--- libodbc++-0.2.3-orig/doc/progref/Doxyfile 2006-04-08 01:03:20.000000000 -0400 ++++ libodbc++-0.2.3/doc/progref/Doxyfile 2006-04-08 01:06:03.000000000 -0400 +@@ -256,7 +256,7 @@ + # each generated HTML page. If it is left blank doxygen will generate a + # standard footer. + +-HTML_FOOTER = footer ++HTML_FOOTER = + + # The HTML_STYLESHEET tag can be used to specify a user defined cascading + # style sheet that is used by each HTML page. It can be used to diff --git a/dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch new file mode 100644 index 000000000000..089277fbd722 --- /dev/null +++ b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc41.patch @@ -0,0 +1,12 @@ +diff -ur libodbc++-0.2.3-orig/include/odbc++/drivermanager.h libodbc++-0.2.3/include/odbc++/drivermanager.h +--- libodbc++-0.2.3-orig/include/odbc++/drivermanager.h 2006-04-08 00:54:19.000000000 -0400 ++++ libodbc++-0.2.3/include/odbc++/drivermanager.h 2006-04-08 00:56:15.000000000 -0400 +@@ -26,6 +26,8 @@ + + #include <odbc++/types.h> + ++#include <odbc++/errorhandler.h> ++ + /** The namespace where all <b>libodbc++</b> classes reside */ + namespace odbc { + diff --git a/dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch new file mode 100644 index 000000000000..415ae0185e08 --- /dev/null +++ b/dev-db/libodbc++/files/libodbc++-0.2.3-gcc44.patch @@ -0,0 +1,11 @@ +--- libodbc++-0.2.3-orig/src/datastream.h 2009-06-12 13:31:54.000000000 +0200 ++++ libodbc++-0.2.3/src/datastream.h 2009-06-12 13:32:11.000000000 +0200 +@@ -25,6 +25,7 @@ + #include <odbc++/types.h> + + #if defined(ODBCXX_HAVE_ISO_CXXLIB) ++# include <cstdio> + # include <istream> + # include <streambuf> + #else + diff --git a/dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild b/dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild new file mode 100644 index 000000000000..3d5b2f54e6b8 --- /dev/null +++ b/dev-db/libodbc++/libodbc++-0.2.5-r2.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils flag-o-matic + +DESCRIPTION="C++ class library that provides a subset of the well-known JDBC 2.0(tm) and runs on top of ODBC" +SRC_URI="mirror://sourceforge/libodbcxx/${P}.tar.bz2" +HOMEPAGE="http://libodbcxx.sourceforge.net/" + +LICENSE="LGPL-2.1" +SLOT=0 +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~x86" + +IUSE="static-libs" + +DEPEND="dev-db/unixODBC + sys-libs/ncurses" +RDEPEND="${DEPEND}" + +SB="${S}-build" +SB_MT="${S}-build-mt" +# QT3 is no longer supported in Gentoo. +#SB_QT="${S}-build_qt" +#SB_QT_MT="${S}-build_qt-mt" + +src_prepare() { + #epatch "${FILESDIR}"/${PN}-0.2.3-std-streamsize.patch + epatch "${FILESDIR}"/${PN}-0.2.3-doxygen.patch + epatch "${FILESDIR}"/${PN}-0.2.3-gcc41.patch + #epatch "${FILESDIR}"/${PN}-0.2.3-gcc43.patch + #epatch "${FILESDIR}"/${PN}-0.2.3-typecast.patch + epatch "${FILESDIR}"/${PN}-0.2.3-gcc44.patch + + # Fix configure to use ncurses instead of termcap (bug #103105) + sed -i -e 's~termcap~ncurses~g' configure + + # Fix undeclared ODBCXX_STRING_PERCENT symbol, bug #532356 + sed -i -e 's/ODBCXX_STRING_PERCENT/"%"/' src/dtconv.h || die + + epatch_user +} + +src_configure() { + local commonconf buildlist + commonconf="--with-odbc=/usr --without-tests" + commonconf="${commonconf} $(use_enable static-libs static) --enable-shared" + # " --enable-threads" + + export ECONF_SOURCE="${S}" + append-flags -DODBCXX_DISABLE_READLINE_HACK + + buildlist="${SB} ${SB_MT}" + #use qt3 && buildlist="${buildlist} $SB_QT $SB_QT_MT" + + for sd in ${buildlist}; do + einfo "Doing configure pass for $sd" + mkdir -p "${sd}" + cd "${sd}" + commonconf2='' + LIBS='' + [ "${sd}" == "${SB_MT}" -o "${sd}" == "${SB_QT_MT}" ] && commonconf2="${commonconf2} --enable-threads" + [ "${sd}" == "${SB_QT}" -o "${sd}" == "${SB_QT_MT}" ] && commonconf2="${commonconf2} --with-qt" + # isql++ tool fails to compile: + #libodbc++-0.2.5/isql++/isql++.cpp: In constructor 'Isql::Isql(odbc::Connection*)': + #libodbc++-0.2.5/isql++/isql++.cpp:275: error: invalid cast to function type 'char** ()()' + #[ "${sd}" == "${SB}" ] && commonconf2="${commonconf2} --with-isqlxx" + # Upstream configure is broken as well, passing --without or + # --with-isqlxx=no will turn it ON instead of forcing it off. + #commonconf2="${commonconf2} _-without-isqlxx" + [ "${sd}" == "${SB_QT}" ] && commonconf2="${commonconf2} --with-qtsqlxx" + export LIBS + # using without-qt breaks the build + #--without-qt \ + econf \ + ${commonconf} \ + ${commonconf2} \ + || die "econf failed" + done +} + +src_compile() { + local buildlist failures + buildlist="${SB} ${SB_MT}" + #use qt3 && buildlist="${buildlist} $SB_QT $SB_QT_MT" + for sd in ${buildlist}; do + einfo "Doing compile pass for $sd" + cd "${sd}" + emake LIBS='' || failures="${failures} ${sd//${S}-}" + done + [ -n "${failures}" ] && die "Failures: ${failures}" +} + +src_install () { + dodoc AUTHORS BUGS ChangeLog NEWS README THANKS TODO + + buildlist="${SB} ${SB_MT}" + #use qt3 && buildlist="${buildlist} $SB_QT $SB_QT_MT" + for sd in ${buildlist}; do + einfo "Doing install pass for $sd" + cd ${sd} + emake DESTDIR="${D}" install + done + if [[ "${P}" != "${PF}" ]]; then + mv "${D}"/usr/share/doc/${P}/* "${D}"/usr/share/doc/${PF}/ + rmdir "${D}"/usr/share/doc/${P} + fi +} diff --git a/dev-db/libodbc++/metadata.xml b/dev-db/libodbc++/metadata.xml new file mode 100644 index 000000000000..9dcf9557004e --- /dev/null +++ b/dev-db/libodbc++/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>cpp</herd> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">libodbcxx</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/libzdb/Manifest b/dev-db/libzdb/Manifest new file mode 100644 index 000000000000..ff9cff8735c5 --- /dev/null +++ b/dev-db/libzdb/Manifest @@ -0,0 +1,5 @@ +DIST libzdb-2.11.1.tar.gz 599354 SHA256 390cdee70dcdd77f4ae113949564056b7a0648a931a918c0b626fa7e6d820c8c SHA512 b630c8ce8ee9eaee53cd801cca08af543faaf7f945c9bfd2721bba0a5569980949ab8212c4bf17fec56b5c5c107cef17cfa893e293444a39bd32116d47edb2c5 WHIRLPOOL 1fca845c84c7f5a867f6de7e5e3cae28e73a2ff0b7f261d385a87893c716b8640a60d262aaaedc5cd36f91dfbabfb818f820906d3e1eefcebc9e20928d3b66c7 +DIST libzdb-2.11.2.tar.gz 603149 SHA256 23d8cc201f4d4417963a440005bf3a93fc2010032a275056b0970c060910a298 SHA512 482510fcf382e3b235ae7a5615f175d46f2d0244ed2d06c6c2df14ea5cebff5dbf6ac855aedc28a7981b77f3662c505049c5439c33e29a762af2d2a793d959c9 WHIRLPOOL a04cd2c25bfaf7fd899c8d334e8836a3d574b033ba2c5e43986f1d915e3090d1f9b0bb9a3bb7a6f4b6897fda028f143492156081c331b11ad51df3582ff6cfba +DIST libzdb-2.11.3.tar.gz 604720 SHA256 3ad2ffa8533b8b4524104a66345659235cec56211664906eba83134e3b305028 SHA512 89305e5ecfc6a630936268f2b70f417c9a66bcc37063f4d87fcc0d1e6b106f0fec0b299da9c7375087e77de07abf3ae81fb48027fd741f150cffef7027930c66 WHIRLPOOL 449924b519cd84904b72aa9d5a3557489f0c0c62d024ee2cd23b978ea26b2323ee58faa0a55388c48de5bfadb2a5d6a6cdbe9ae5abe69d7190a65329e267689f +DIST libzdb-2.12.tar.gz 599160 SHA256 37e6bd3d8254be7d8fe1419cf0500b9006783d0e3544eeeffc5e6954cbcd07d4 SHA512 d2fbf7e0d7a8f37f8ce3404a0bf249165daafb54dfff31e6c7cea964b8360c1322bcd8cdc97a0ec8fec0a3be5bbe4f1690cb36a956bbcbea7b6a795655089f6f WHIRLPOOL 06449cf801f062dbbd322f95f80027b09f33b6e8a514638988ad33b47ef8d44a83fa31a21b1e561883bf487dfbd0c4196f04bb73ed62ff9924feccac7e9291ff +DIST libzdb-3.0.tar.gz 700284 SHA256 e334bcb9ca1410e863634a164e3b1b5784018eb6e90b6c2b527780fc29a123c8 SHA512 ce29b0b381695b874627c38a12fe808179ed74a07898fce10bbf7db0279256192eba377a89c9daaf3c6981e29aa67f95e0b21615d9a94c36b0e2e90c9ce6e12d WHIRLPOOL a4efb05a761cf8a5dfee390910c0dbdb5e0256e5e9aefd0d2d3ea510eca31435607d27ed03ebc99f80bef6c9b7498a69aec36c853327612605f397c46491162b diff --git a/dev-db/libzdb/files/sqlite_configure.patch b/dev-db/libzdb/files/sqlite_configure.patch new file mode 100644 index 000000000000..5ea7914091bb --- /dev/null +++ b/dev-db/libzdb/files/sqlite_configure.patch @@ -0,0 +1,18 @@ +--- configure.ac_orig 2012-07-14 07:14:19.000000000 +1000 ++++ configure.ac 2012-07-23 14:17:38.702411605 +1000 +@@ -298,12 +298,11 @@ + CPPFLAGS="-I$with_sqlite/include $CPPFLAGS" + AC_CHECK_HEADERS([sqlite3.h], [ + sqlite="yes" +- if test -r "$with_sqlite/lib/libsqlite3.a"; then ++ AC_CHECK_LIB(sqlite3, main,[ ++ + DBCPPFLAGS="$DBCPPFLAGS -I$with_sqlite/include" + DBLDFLAGS="$DBLDFLAGS -L$with_sqlite/lib/ -lsqlite3" +- else +- sqlite="no" +- fi ++ ],[sqlite="no"]) + ], [sqlite="no"]) + LDFLAGS=$svd_LDFLAGS + CPPFLAGS=$svd_CPPFLAGS diff --git a/dev-db/libzdb/libzdb-2.11.1.ebuild b/dev-db/libzdb/libzdb-2.11.1.ebuild new file mode 100644 index 000000000000..d4318ff57c5b --- /dev/null +++ b/dev-db/libzdb/libzdb-2.11.1.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="A thread safe high level multi-database connection pool library" +HOMEPAGE="http://www.tildeslash.com/libzdb/" +SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug doc mysql postgres +sqlite ssl static-libs" +REQUIRED_USE=" || ( postgres mysql sqlite )" + +RESTRICT=test + +RDEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +src_prepare() { + sed -i -e "s|&& ./pool||g" test/Makefile.in || die +} + +src_configure() { + ## TODO: check what --enable-optimized actually does + ## TODO: find someone with oracle db to add oci8 support + myconf="" + if [[ $(gcc-version) < 4.1 ]];then + myconf="${myconf} --disable-protected" + else + myconf="${myconf} --enable-protected" + fi + + if use sqlite; then + myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock" + else + myconf="${myconf} --without-sqlite" + fi + + if use mysql; then + myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config" + else + myconf="${myconf} --without-mysql" + fi + + if use postgres; then + myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config" + else + myconf="${myconf} --without-postgresql" + fi + + econf \ + $(use_enable debug profiling) \ + $(use_enable static-libs static) \ + $(use_enable ssl openssl) \ + --without-oci \ + ${myconf} +} + +src_compile() { + default_src_compile + if use doc; then + emake doc + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # the --disable-static flag only skips .a + use static-libs || rm -f "${D}"/usr/lib*/libzdb.la + + dodoc AUTHORS CHANGES README + if use doc;then + dohtml -r "${S}/doc/api-docs"/* + fi +} + +src_test() { + emake verify +} diff --git a/dev-db/libzdb/libzdb-2.11.2.ebuild b/dev-db/libzdb/libzdb-2.11.2.ebuild new file mode 100644 index 000000000000..089b7dacff3b --- /dev/null +++ b/dev-db/libzdb/libzdb-2.11.2.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="A thread safe high level multi-database connection pool library" +HOMEPAGE="http://www.tildeslash.com/libzdb/" +SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug doc mysql postgres +sqlite ssl static-libs" +REQUIRED_USE=" || ( postgres mysql sqlite )" + +RESTRICT=test + +RDEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +src_prepare() { + sed -i -e "s|&& ./pool||g" test/Makefile.in || die +} + +src_configure() { + ## TODO: check what --enable-optimized actually does + ## TODO: find someone with oracle db to add oci8 support + myconf="" + if [[ $(gcc-version) < 4.1 ]];then + myconf="${myconf} --disable-protected" + else + myconf="${myconf} --enable-protected" + fi + + if use sqlite; then + myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock" + else + myconf="${myconf} --without-sqlite" + fi + + if use mysql; then + myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config" + else + myconf="${myconf} --without-mysql" + fi + + if use postgres; then + myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config" + else + myconf="${myconf} --without-postgresql" + fi + + econf \ + $(use_enable debug profiling) \ + $(use_enable static-libs static) \ + $(use_enable ssl openssl) \ + --without-oci \ + ${myconf} +} + +src_compile() { + default_src_compile + if use doc; then + emake doc + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # the --disable-static flag only skips .a + use static-libs || rm -f "${D}"/usr/lib*/libzdb.la + + dodoc AUTHORS CHANGES README + if use doc;then + dohtml -r "${S}/doc/api-docs"/* + fi +} + +src_test() { + emake verify +} diff --git a/dev-db/libzdb/libzdb-2.11.3.ebuild b/dev-db/libzdb/libzdb-2.11.3.ebuild new file mode 100644 index 000000000000..089b7dacff3b --- /dev/null +++ b/dev-db/libzdb/libzdb-2.11.3.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="A thread safe high level multi-database connection pool library" +HOMEPAGE="http://www.tildeslash.com/libzdb/" +SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug doc mysql postgres +sqlite ssl static-libs" +REQUIRED_USE=" || ( postgres mysql sqlite )" + +RESTRICT=test + +RDEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +src_prepare() { + sed -i -e "s|&& ./pool||g" test/Makefile.in || die +} + +src_configure() { + ## TODO: check what --enable-optimized actually does + ## TODO: find someone with oracle db to add oci8 support + myconf="" + if [[ $(gcc-version) < 4.1 ]];then + myconf="${myconf} --disable-protected" + else + myconf="${myconf} --enable-protected" + fi + + if use sqlite; then + myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock" + else + myconf="${myconf} --without-sqlite" + fi + + if use mysql; then + myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config" + else + myconf="${myconf} --without-mysql" + fi + + if use postgres; then + myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config" + else + myconf="${myconf} --without-postgresql" + fi + + econf \ + $(use_enable debug profiling) \ + $(use_enable static-libs static) \ + $(use_enable ssl openssl) \ + --without-oci \ + ${myconf} +} + +src_compile() { + default_src_compile + if use doc; then + emake doc + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # the --disable-static flag only skips .a + use static-libs || rm -f "${D}"/usr/lib*/libzdb.la + + dodoc AUTHORS CHANGES README + if use doc;then + dohtml -r "${S}/doc/api-docs"/* + fi +} + +src_test() { + emake verify +} diff --git a/dev-db/libzdb/libzdb-2.12.ebuild b/dev-db/libzdb/libzdb-2.12.ebuild new file mode 100644 index 000000000000..d4318ff57c5b --- /dev/null +++ b/dev-db/libzdb/libzdb-2.12.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="A thread safe high level multi-database connection pool library" +HOMEPAGE="http://www.tildeslash.com/libzdb/" +SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug doc mysql postgres +sqlite ssl static-libs" +REQUIRED_USE=" || ( postgres mysql sqlite )" + +RESTRICT=test + +RDEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +src_prepare() { + sed -i -e "s|&& ./pool||g" test/Makefile.in || die +} + +src_configure() { + ## TODO: check what --enable-optimized actually does + ## TODO: find someone with oracle db to add oci8 support + myconf="" + if [[ $(gcc-version) < 4.1 ]];then + myconf="${myconf} --disable-protected" + else + myconf="${myconf} --enable-protected" + fi + + if use sqlite; then + myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock" + else + myconf="${myconf} --without-sqlite" + fi + + if use mysql; then + myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config" + else + myconf="${myconf} --without-mysql" + fi + + if use postgres; then + myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config" + else + myconf="${myconf} --without-postgresql" + fi + + econf \ + $(use_enable debug profiling) \ + $(use_enable static-libs static) \ + $(use_enable ssl openssl) \ + --without-oci \ + ${myconf} +} + +src_compile() { + default_src_compile + if use doc; then + emake doc + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # the --disable-static flag only skips .a + use static-libs || rm -f "${D}"/usr/lib*/libzdb.la + + dodoc AUTHORS CHANGES README + if use doc;then + dohtml -r "${S}/doc/api-docs"/* + fi +} + +src_test() { + emake verify +} diff --git a/dev-db/libzdb/libzdb-3.0.ebuild b/dev-db/libzdb/libzdb-3.0.ebuild new file mode 100644 index 000000000000..089b7dacff3b --- /dev/null +++ b/dev-db/libzdb/libzdb-3.0.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils toolchain-funcs + +DESCRIPTION="A thread safe high level multi-database connection pool library" +HOMEPAGE="http://www.tildeslash.com/libzdb/" +SRC_URI="http://www.tildeslash.com/${PN}/dist/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="debug doc mysql postgres +sqlite ssl static-libs" +REQUIRED_USE=" || ( postgres mysql sqlite )" + +RESTRICT=test + +RDEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql ) + sqlite? ( >=dev-db/sqlite-3.7:3[unlock-notify(+)] ) + ssl? ( dev-libs/openssl )" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( app-doc/doxygen )" + +src_prepare() { + sed -i -e "s|&& ./pool||g" test/Makefile.in || die +} + +src_configure() { + ## TODO: check what --enable-optimized actually does + ## TODO: find someone with oracle db to add oci8 support + myconf="" + if [[ $(gcc-version) < 4.1 ]];then + myconf="${myconf} --disable-protected" + else + myconf="${myconf} --enable-protected" + fi + + if use sqlite; then + myconf="${myconf} --with-sqlite=${EPREFIX}/usr/ --enable-sqliteunlock" + else + myconf="${myconf} --without-sqlite" + fi + + if use mysql; then + myconf="${myconf} --with-mysql=${EPREFIX}/usr/bin/mysql_config" + else + myconf="${myconf} --without-mysql" + fi + + if use postgres; then + myconf="${myconf} --with-postgresql=${EPREFIX}/usr/bin/pg_config" + else + myconf="${myconf} --without-postgresql" + fi + + econf \ + $(use_enable debug profiling) \ + $(use_enable static-libs static) \ + $(use_enable ssl openssl) \ + --without-oci \ + ${myconf} +} + +src_compile() { + default_src_compile + if use doc; then + emake doc + fi +} + +src_install() { + emake DESTDIR="${D}" install + + # the --disable-static flag only skips .a + use static-libs || rm -f "${D}"/usr/lib*/libzdb.la + + dodoc AUTHORS CHANGES README + if use doc;then + dohtml -r "${S}/doc/api-docs"/* + fi +} + +src_test() { + emake verify +} diff --git a/dev-db/libzdb/metadata.xml b/dev-db/libzdb/metadata.xml new file mode 100644 index 000000000000..89be866c29bc --- /dev/null +++ b/dev-db/libzdb/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>lordvan@gentoo.org</email> + <name>Thomas Raschbacher</name> + </maintainer> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Proxy Maintainer. CC on bugs</description> + </maintainer> +</pkgmetadata> diff --git a/dev-db/lmdb++/Manifest b/dev-db/lmdb++/Manifest new file mode 100644 index 000000000000..c403bd5e8fe0 --- /dev/null +++ b/dev-db/lmdb++/Manifest @@ -0,0 +1 @@ +DIST lmdbxx-0.9.14.0.tar.gz 14732 SHA256 f74c55184bff19de607948a5f00fe1073de5b59c4309ab2e8ebc488cf675f419 SHA512 8eff8c89e0cb9989d8a0cedfd483856aeb2fcf810d59cf8afca3086034711ff22f2bb88ba967ef745d36fdaa1b5e79fb75655af764cddcdb2ac59fc255da670d WHIRLPOOL ab023a06e43d8f5189a83dc6eaf04b632eff83c028991ff440fd06a3c7f582f2aa0cf0332ef182837194979fbabb3a4cab6df7252d06455baec498db1941a635 diff --git a/dev-db/lmdb++/lmdb++-0.9.14.0.ebuild b/dev-db/lmdb++/lmdb++-0.9.14.0.ebuild new file mode 100644 index 000000000000..8dc44ea5464d --- /dev/null +++ b/dev-db/lmdb++/lmdb++-0.9.14.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_P="${P/lmdb++/lmdbxx}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="C++11 wrapper for the LMDB database library" +HOMEPAGE="http://lmdbxx.sourceforge.net/" +SRC_URI="mirror://sourceforge/lmdbxx/${PV}/${MY_P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND="dev-db/lmdb" + +src_install() { + emake PREFIX="${D}/usr" install + dodoc AUTHORS CREDITS INSTALL README TODO UNLICENSE +} diff --git a/dev-db/lmdb++/metadata.xml b/dev-db/lmdb++/metadata.xml new file mode 100644 index 000000000000..834fd0316544 --- /dev/null +++ b/dev-db/lmdb++/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>nicolasbock@gentoo.org</email> + <name>Nicolas Bock</name> + </maintainer> + <longdescription lang="en"> + This is a comprehensive C++ wrapper for the LMDB embedded database + library, offering both an error-checked procedural interface and an + object-oriented resource interface with RAII semantics. + </longdescription> + <upstream> + <remote-id type="sourceforge">lmdbxx</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/lmdb/Manifest b/dev-db/lmdb/Manifest new file mode 100644 index 000000000000..1e01e5b965b3 --- /dev/null +++ b/dev-db/lmdb/Manifest @@ -0,0 +1 @@ +DIST lmdb-0.9.14.tar.gz 128170 SHA256 3b14dfe2134521cfebd98168b925f7327b9bd07c715640b79f3526e54f0ccb1f SHA512 d5bde616fb22631fe1689e2c77babfbf5098833cf313bce59a5daab1e450d2998a65f087929879e73e0a897b934ff40b8e340c79ec7b2b1c1fe7e1eea7da6267 WHIRLPOOL 0ebda52fd50d9d73bc079e6a613b2e2cdaa1032665d91e499dea9dcf1698095bfe84b03a931118baae8048c616e9bae7153972446502d368e7dc9ee33105e777 diff --git a/dev-db/lmdb/lmdb-0.9.14.ebuild b/dev-db/lmdb/lmdb-0.9.14.ebuild new file mode 100644 index 000000000000..63868c2578b1 --- /dev/null +++ b/dev-db/lmdb/lmdb-0.9.14.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit toolchain-funcs + +DESCRIPTION="An ultra-fast, ultra-compact key-value embedded data store" +HOMEPAGE="http://symas.com/mdb/" +SRC_URI="https://gitorious.org/mdb/mdb/archive/2f587ae081d076e3707360c5db086520c219d3ea.tar.gz + -> lmdb-0.9.14.tar.gz" + +LICENSE="OPENLDAP" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ppc ppc64 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~x86-solaris" +IUSE="static-libs" + +DEPEND="" +# =net-nds/openldap-2.4.40 installs lmdb files. +RDEPEND="!=net-nds/openldap-2.4.40" + +S="${WORKDIR}/mdb-mdb/libraries/liblmdb" + +src_prepare() { + sed -i -e "s/^CC.*/CC = $(tc-getCC)/" \ + -e "s/^CFLAGS.*/CFLAGS = ${CFLAGS}/" \ + -e "s/ar rs/$(tc-getAR) rs/" \ + -e "s:^prefix.*:prefix = /usr:" \ + -e "s:/man/:/share/man/:" \ + -e "/for f/s:lib:$(get_libdir):" \ + -e "s:shared:shared -Wl,-soname,liblmdb.so.0:" \ + "${S}/Makefile" || die +} + +src_configure() { + : +} + +src_compile() { + emake LDLIBS+=" -pthread" +} + +src_install() { + mkdir -p "${D}"/usr/{bin,$(get_libdir),include,share/man/man1} + default + + mv "${D}"/usr/$(get_libdir)/liblmdb.so{,.0} || die + dosym liblmdb.so.0 /usr/$(get_libdir)/liblmdb.so + + use static-libs || rm -f "${D}"/usr/$(get_libdir)/liblmdb.a +} diff --git a/dev-db/lmdb/metadata.xml b/dev-db/lmdb/metadata.xml new file mode 100644 index 000000000000..02b69a4700a6 --- /dev/null +++ b/dev-db/lmdb/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<longdescription lang="en"> + An ultra-fast, ultra-compact key-value embedded data store +</longdescription> +<herd>ldap</herd> +<maintainer> + <email>eras@gentoo.org</email> + <name>Eray Aslan</name> +</maintainer> +</pkgmetadata> diff --git a/dev-db/m17n-contrib/Manifest b/dev-db/m17n-contrib/Manifest new file mode 100644 index 000000000000..af11f37ea2f3 --- /dev/null +++ b/dev-db/m17n-contrib/Manifest @@ -0,0 +1,2 @@ +DIST m17n-contrib-1.1.13.tar.gz 697293 SHA256 adcf708ea7abd651b4a72562059b4b2408b9729527330a28f1a467168d27de6c SHA512 09b04315162b197bbada94e4213108a7b02e2349e519e311b545faefcb057f0bd5345a18f8eb3e9bb96843c2e8f04f56685e0347ede0ccade1b79caf459cb945 WHIRLPOOL e1bdcf80b41bcacc4717e4c5a364c10c0e857e14528420f3537ed7d76d4ae28daedb98e023433fa192cb78169c1cbdb2d38fd3691f7e5ad7798c5e858ce158b6 +DIST m17n-contrib-1.1.14.tar.gz 698611 SHA256 4f623be23979e2d52c1275621b3d4488c24b9fbd81f5a9d28260d88f93d23d2c SHA512 569149dc4318e033ecde347cd9f935b6e18fefdd8f24d8a447aed3f754a920cec53b5f7a806d93032a45c05a346076c38a3a5b6398cf4caadc7db0e52baf5ced WHIRLPOOL be907582d6774dcc48a94c2bd689dd19a01ffa456cd22728dcdd4ba3b340daa093eca7890b32f88b38e570d9c5b7316e7c7552f547199ff1efd687801549d088 diff --git a/dev-db/m17n-contrib/m17n-contrib-1.1.13.ebuild b/dev-db/m17n-contrib/m17n-contrib-1.1.13.ebuild new file mode 100644 index 000000000000..ae4ce3928278 --- /dev/null +++ b/dev-db/m17n-contrib/m17n-contrib-1.1.13.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="Contribution database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +# Strict version to avoid collision +RDEPEND=">=dev-db/m17n-db-1.6.3" + +src_configure() { + # force the script not to test for m17n presence, trust Portage + # dependency handling. + export HAVE_M17N_DB=yes + + econf +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README +} diff --git a/dev-db/m17n-contrib/m17n-contrib-1.1.14.ebuild b/dev-db/m17n-contrib/m17n-contrib-1.1.14.ebuild new file mode 100644 index 000000000000..77583eae171f --- /dev/null +++ b/dev-db/m17n-contrib/m17n-contrib-1.1.14.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="Contribution database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://download.savannah.gnu.org/releases/m17n/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +# Strict version to avoid collision +RDEPEND=">=dev-db/m17n-db-1.6.4" + +src_configure() { + # force the script not to test for m17n presence, trust Portage + # dependency handling. + export HAVE_M17N_DB=yes + + econf +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README +} diff --git a/dev-db/m17n-contrib/metadata.xml b/dev-db/m17n-contrib/metadata.xml new file mode 100644 index 000000000000..2896f95fba7b --- /dev/null +++ b/dev-db/m17n-contrib/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cjk</herd> +<longdescription lang="en"> +The m17n-contrib is a collection of contributed works to be used with the m17n library. +</longdescription> +</pkgmetadata> + diff --git a/dev-db/m17n-db/Manifest b/dev-db/m17n-db/Manifest new file mode 100644 index 000000000000..ea7740941881 --- /dev/null +++ b/dev-db/m17n-db/Manifest @@ -0,0 +1,5 @@ +DIST m17n-db-1.5.2.tar.gz 1284002 SHA256 d05ecb11faafffbb7f07c6620a75d612bf27009e06da0e71a2163b2292bdd448 SHA512 d24acc5a067d1fefce438c1af4a1a2245f5ec609206226f03cdd3a2af2d32e602c0bec197207fbe89f90748626f2ff064d8dfcdc7690f6801f060ce15f3d0903 WHIRLPOOL bbe70a28ab4cb3ffa7a139d70caadc708c76510b1d5a4803736fbc6cb3025bd7497de32fea1bcb45beafdb55292a242ea6a0256bb3aab0ab38a9eb368a815700 +DIST m17n-db-1.5.5.tar.gz 1322255 SHA256 4f5bb75e3a0252a47b2628a09adf1ff16c4f160a38aea7ac394b74878ceed14f SHA512 40ad61d9843d0ae37744d63dc8835084e4eba55ac41a307cb10d79e0cbeed849fd53cb3ddeab0d234f5c783e04205cb84a75ec093beb2a2eba11c45f0b57b1f7 WHIRLPOOL b3a06c7808e0b98b369308639a01b0f1c16e00b091eaf72d835350d6def3b4dd45f2ffa4fb3db389032babe588d24b4ec30c5f1678dfffc771d7f304d557e892 +DIST m17n-db-1.6.2.tar.gz 1385431 SHA256 757ce99b852cb08867b2027223c5324248f3fab0b81fb71f478f8dfdfb3cfb24 SHA512 89c51eba7d30f284c4e226eff95984f7b736bfb45ef69bf98fbb419c26f8b7bb2d41adf01c6f108c12ffaf2d7d84492edf33c10763dfe4f068e36586b9ac88cf WHIRLPOOL da58f44d3a423c38956bb267c90e8661f00e1fdec94f5234836be758577c72b5404571dea4694f724bd75a124501bbb26a31cc44c7e088057513d721ff70629c +DIST m17n-db-1.6.3.tar.gz 1384587 SHA256 5f1d11b43efa4c1fcc9681d0c0e13f8d241450625f34351a9deb2a7194cac211 SHA512 4a808b7f8298b9c15c479e7e2dbe26dfe39b0756da5f7a5f968700950d5e41527ce935bc6ced6e65d5e0d57c5f8402dba7f6001144f805129def8237d272625f WHIRLPOOL 55657e6fdc47da30de6ec9094b27b861d37b74a65a5d25b5dcd3ccc94a1057692442cdc40f68b0e67e893688aa5eb6fffa8f118d158d3518ae188638c3a26fdc +DIST m17n-db-1.6.4.tar.gz 1390344 SHA256 530ecb1615a9a64d4caca9ffc59c0dd1c551d34e0c19e39694d083db0506d017 SHA512 54016284335630fca5403e540863aaff5f135429c5716c35404fc38d40544c03a213ad26af5ea7eb82567b11f4645608f66cde95036187e6e23ce0dae17e2324 WHIRLPOOL 9eb0d78319b46864f8d7bec05d30299c798153416ac912119f487990fe26540554d41b89cb06ec427161102b8b312a48ff224adcf6e8c2c5268cef00796d1767 diff --git a/dev-db/m17n-db/files/do-not-commit-extra-space.patch b/dev-db/m17n-db/files/do-not-commit-extra-space.patch new file mode 100644 index 000000000000..465078a20119 --- /dev/null +++ b/dev-db/m17n-db/files/do-not-commit-extra-space.patch @@ -0,0 +1,16 @@ +Index: MIM/zh-util.mim +=================================================================== +RCS file: /cvs/m17n/m17n-db/MIM/zh-util.mim,v +retrieving revision 1.3 +diff -u -r1.3 zh-util.mim +--- MIM/zh-util.mim 11 Jul 2008 01:28:53 -0000 1.3 ++++ MIM/zh-util.mim 5 Nov 2010 07:07:48 -0000 +@@ -65,7 +65,7 @@ + ((BackSpace))) + + (commit-preedit +- ((S-\ )))) ++ ((\ )))) + + (state + (check-undo diff --git a/dev-db/m17n-db/m17n-db-1.5.2.ebuild b/dev-db/m17n-db/m17n-db-1.5.2.ebuild new file mode 100644 index 000000000000..021ddf150e73 --- /dev/null +++ b/dev-db/m17n-db/m17n-db-1.5.2.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86" +IUSE="" + +DEPEND="sys-devel/gettext" +RDEPEND="" + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README + docinto FORMATS; dodoc FORMATS/* + docinto UNIDATA; dodoc UNIDATA/* +} diff --git a/dev-db/m17n-db/m17n-db-1.5.5.ebuild b/dev-db/m17n-db/m17n-db-1.5.5.ebuild new file mode 100644 index 000000000000..a75b46824a07 --- /dev/null +++ b/dev-db/m17n-db/m17n-db-1.5.5.ebuild @@ -0,0 +1,23 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +DESCRIPTION="Database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="sys-devel/gettext" +RDEPEND="virtual/libintl" + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README || die + docinto FORMATS; dodoc FORMATS/* || die + docinto UNIDATA; dodoc UNIDATA/* || die +} diff --git a/dev-db/m17n-db/m17n-db-1.6.2-r1.ebuild b/dev-db/m17n-db/m17n-db-1.6.2-r1.ebuild new file mode 100644 index 000000000000..6f8854f39585 --- /dev/null +++ b/dev-db/m17n-db/m17n-db-1.6.2-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="Database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="" + +DEPEND="sys-devel/gettext" +RDEPEND="virtual/libintl" + +src_prepare() { + epatch "${FILESDIR}"/do-not-commit-extra-space.patch +} + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README + docinto FORMATS; dodoc FORMATS/* + docinto UNIDATA; dodoc UNIDATA/* +} diff --git a/dev-db/m17n-db/m17n-db-1.6.3.ebuild b/dev-db/m17n-db/m17n-db-1.6.3.ebuild new file mode 100644 index 000000000000..6fb4bff18cfc --- /dev/null +++ b/dev-db/m17n-db/m17n-db-1.6.3.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="Database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://www.m17n.org/m17n-lib-download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86" +IUSE="" + +DEPEND="sys-devel/gettext" +RDEPEND="virtual/libintl" + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README + docinto FORMATS; dodoc FORMATS/* + docinto UNIDATA; dodoc UNIDATA/* +} diff --git a/dev-db/m17n-db/m17n-db-1.6.4.ebuild b/dev-db/m17n-db/m17n-db-1.6.4.ebuild new file mode 100644 index 000000000000..1a90500a9ada --- /dev/null +++ b/dev-db/m17n-db/m17n-db-1.6.4.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils + +DESCRIPTION="Database for the m17n library" +HOMEPAGE="https://savannah.nongnu.org/projects/m17n" +SRC_URI="http://download.savannah.gnu.org/releases/m17n/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sh sparc x86" +IUSE="" + +DEPEND="sys-devel/gettext" +RDEPEND="virtual/libintl" + +src_install() { + emake DESTDIR="${D}" install || die + + dodoc AUTHORS ChangeLog NEWS README + docinto FORMATS; dodoc FORMATS/* + docinto UNIDATA; dodoc UNIDATA/* +} diff --git a/dev-db/m17n-db/metadata.xml b/dev-db/m17n-db/metadata.xml new file mode 100644 index 000000000000..2d5852c16c60 --- /dev/null +++ b/dev-db/m17n-db/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cjk</herd> +</pkgmetadata> diff --git a/dev-db/maatkit/Manifest b/dev-db/maatkit/Manifest new file mode 100644 index 000000000000..0bfd7cce09fd --- /dev/null +++ b/dev-db/maatkit/Manifest @@ -0,0 +1 @@ +DIST maatkit-7540.tar.gz 1312812 SHA256 618b8ba8f8df1c8ac04d127986a7bb6a834643523000c9c5ea4ee7d95aeef9a8 SHA512 98cb44a5ebce09322b4d9a8cfa9e14e2ccb54ef9e0e8a95ee92b0fee5277f06157415152566497893488967735049d95c6efadc0d57c8a70060c7bc714afef9a WHIRLPOOL 73685d156a750263ec8d8ba6d22c6e96aa98ed2247523b74a336572ef8e6ae8239f84dd2e7839752c921baca55d911195c0bb1e83d42a87b3a721fa7d0e8439d diff --git a/dev-db/maatkit/maatkit-7540-r1.ebuild b/dev-db/maatkit/maatkit-7540-r1.ebuild new file mode 100644 index 000000000000..a17ea575e367 --- /dev/null +++ b/dev-db/maatkit/maatkit-7540-r1.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-app perl-module toolchain-funcs + +DESCRIPTION="essential command-line utilities for MySQL" +HOMEPAGE="http://www.maatkit.org/" +SRC_URI="http://maatkit.googlecode.com/files/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="udf" + +COMMON_DEPEND="dev-perl/DBI + dev-perl/DBD-mysql + virtual/perl-Time-HiRes" +RDEPEND="${COMMON_DEPEND} + virtual/perl-Getopt-Long + virtual/perl-Time-Local + virtual/perl-Digest-MD5 + virtual/perl-IO-Compress + virtual/perl-File-Temp + virtual/perl-File-Spec + virtual/perl-Time-HiRes + virtual/perl-Scalar-List-Utils + dev-perl/TermReadKey" +DEPEND="${COMMON_DEPEND} + udf? ( dev-db/mysql ) + virtual/perl-ExtUtils-MakeMaker" + +mysql-udf_src_compile() { + local udfdir="${T}/udf/" + mkdir -p "${udfdir}" + + local udfname udffile udfext udfoutpath + udfname="${1}" + udfext=".so" + udffile="${udfname}${udfext}" + udfoutpath="${udfdir}/${udffile}" + shift + CXX="$(tc-getCXX)" + local src="$@" + if [ -z "$@" ]; then + src="${udfname}.cc" + fi + for f in ${src} ; do + [ -f "${f}" ] || \ + die "UDF ${udfname}: Cannot find source file ${f} to compile" + done + einfo "UDF ${udfname}: compiling from ${src}" + ${CXX} \ + ${CXXFLAGS} -I/usr/include/mysql \ + ${LDFLAGS} -fPIC -shared -o "${udfoutpath}" $src \ + || die "UDF ${udfname}: Failed to compile" +} + +mysql-udf_src_install() { + local udfdir="${T}/udf/" + local udfname udfext udffile udfoutpath + udfname="${1}" + udfext=".so" + udffile="${udfname}${udfext}" + udfoutpath="${udfdir}/${udffile}" + insinto /usr/$(get_libdir)/mysql/plugins + doins "${udfoutpath}" +} + +udf_done_intro=0 +mysql-udf_pkg_postinst() { + local udfname udffile udfext udffunc udfreturn + udfname="${1}" + udfext=".so" + udffile="${udfname}${udfext}" + udffunc="${2}" + udfreturn="${3}" + if [ ${udf_done_intro} -eq 0 ]; then + elog "To use the UDFs that were built:" + elog "Update your configuration to include 'plugin_dir=/usr/$(get_libdir)/mysql/plugins'" + elog "Issue the following commands as a user with FUNCTION privileges:" + udf_done_intro=1 + fi + elog "CREATE FUNCTION ${udffunc} RETURNS ${udfreturn} SONAME '${udffile}'" +} + +src_compile() { + perl-app_src_compile + if use udf; then + cd "${S}"/udf + mysql-udf_src_compile murmur_udf + mysql-udf_src_compile fnv_udf + fi +} + +src_install() { + perl-module_src_install + if use udf; then + mysql-udf_src_install murmur_udf + mysql-udf_src_install fnv_udf + fi +} + +pkg_postinst() { + if use udf; then + mysql-udf_pkg_postinst murmur_udf murmur_hash INTEGER + mysql-udf_pkg_postinst fnv_udf fnv_64 INTEGER + fi +} diff --git a/dev-db/maatkit/metadata.xml b/dev-db/maatkit/metadata.xml new file mode 100644 index 000000000000..d9b6d84de617 --- /dev/null +++ b/dev-db/maatkit/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <longdescription>maatkit, formerly MySQL Toolkit, is a collection of command-line utilities that +provide missing functionality for MySQL. Some of the tools implement lacking +server functionality, such as online consistency checks for master/slave +replication; others are client-side utilities such as a query profiler.</longdescription> + <use> + <flag name="udf">Build the MySQL UDFs shipped with maatkit, requires non-minimal MySQL</flag> + </use> + <upstream> + <remote-id type="google-code">maatkit</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mariadb-galera/Manifest b/dev-db/mariadb-galera/Manifest new file mode 100644 index 000000000000..aac69700d298 --- /dev/null +++ b/dev-db/mariadb-galera/Manifest @@ -0,0 +1,4 @@ +DIST mariadb-galera-10.0.19.tar.gz 56520261 SHA256 df5c0e8ff2db0dbf2490c52f5d9b509216e2d89bf6d340920aad2b41d4d1ae75 SHA512 9acba0d851c8bdfe0b28e3ec3dc9a21a41c8f283322d73a3c05ac10b9e9400302b9e6fe47d0d5ef73307254af715bc3ed144acaa325ce6c78841ddd14ee754c7 WHIRLPOOL 2c60ee6a82e8f6effed3b376a7647f0bc804de633d770bb215f37774bd7cd1f38b0ef173b68ec3f3eab9f59ffee77cb05668159873a5ebd863d0d96735f39edb +DIST mariadb-galera-10.0.20.tar.gz 56558895 SHA256 f6b979cbae803d1b33e85407fcd2aaf19b07fb5e183726666e8c990f1f7d5ce8 SHA512 dbae146c798d08f624fcdac86d7f69aea2ebe8540f659004fee11dba4a0a6c234b7235544ae4adf3b58add989649533f86dbe1de4107eb7bbd433add42f55dad WHIRLPOOL 93ad52daae91463772a163a59beab57496102fc2cd23ba7f9b009875ea8cb7b854d8a0d857ddb90d6e3ec3e034ae8403eb7aedba55f9d2a97f72dbc999085f69 +DIST mysql-extras-20141215-0144Z.tar.bz2 1494767 SHA256 4757043858110654d52b0e6dccab064987ab5db8ae4ae99863cf86df0b90f947 SHA512 7a9b733d09f44b1faff19a496a3e820e444b339838665e6f37c4fddc8f2ad67e805082d598c4edc06fda9364f9906e4cf95520552f72d6b6df34413f38e7a2ed WHIRLPOOL 99ea6890a5faf097b941707538b68f62390e1a49ee662a87c27435a317a9a3f37f00802e72f86b52993b3d1674b57645db0f7e73379ab88fbc1d0ef791cf4326 +DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22 diff --git a/dev-db/mariadb-galera/files/my.cnf-5.5 b/dev-db/mariadb-galera/files/my.cnf-5.5 new file mode 100644 index 000000000000..08a2060844cd --- /dev/null +++ b/dev-db/mariadb-galera/files/my.cnf-5.5 @@ -0,0 +1,159 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +# These settings are required for Galera clustering +#mysql settings +binlog_format=ROW +default-storage-engine=innodb +innodb_autoinc_lock_mode=2 +query_cache_size=0 +query_cache_type=0 +bind-address=0.0.0.0 +# Uncomment this section to activate Galera clustering +#wsrep_provider=@GENTOO_PORTAGE_EPREFIX@/usr/lib/galera/libgalera_smm.so +# You should change this name to something meaningful +#wsrep_cluster_name="my_wsrep_cluster" +# List all nodes of the cluster including this one +#wsrep_cluster_address="gcomm://172.16.8.5,172.16.8.6,172.16.8.4" +#wsrep_sst_method=rsync + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/mariadb-galera/files/my.cnf-5.6 b/dev-db/mariadb-galera/files/my.cnf-5.6 new file mode 100644 index 000000000000..c0b221c22792 --- /dev/null +++ b/dev-db/mariadb-galera/files/my.cnf-5.6 @@ -0,0 +1,159 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 4M +table_open_cache = 400 +sort_buffer_size = 512K +net_buffer_length = 16K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 128M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 48M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +# These settings are required for Galera clustering +#mysql settings +binlog_format=ROW +default-storage-engine=innodb +innodb_autoinc_lock_mode=2 +query_cache_size=0 +query_cache_type=0 +bind-address=0.0.0.0 +# Uncomment this section to activate Galera clustering +#wsrep_provider=@GENTOO_PORTAGE_EPREFIX@/usr/lib/galera/libgalera_smm.so +# You should change this name to something meaningful +#wsrep_cluster_name="my_wsrep_cluster" +# List all nodes of the cluster including this one +#wsrep_cluster_address="gcomm://172.16.8.5,172.16.8.6,172.16.8.4" +#wsrep_sst_method=rsync + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout + +[mariadb] diff --git a/dev-db/mariadb-galera/mariadb-galera-10.0.19.ebuild b/dev-db/mariadb-galera/mariadb-galera-10.0.19.ebuild new file mode 100644 index 000000000000..8082cb43d0f6 --- /dev/null +++ b/dev-db/mariadb-galera/mariadb-galera-10.0.19.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20141215-0144Z" +WSREP_REVISION="25" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-galera-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + # wsrep.variables: + # Expects the sys-cluster/galera library to be installed and configured + # + # wsrep.foreign_key: + # Issues a configuration deprecation warning which does not affect data + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp main.bootstrap \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help wsrep.variables wsrep.foreign_key \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + # The PATH addition is required for the galera suite to find the sst scripts + # Skipping galera tests for now until MDEV-7544 is resovled + WSREP_LOG_DIR="${T}/var-tests/wsrep" \ + PATH="${BUILD_DIR}/scripts:${PATH}" \ + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --skip-test=galera + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb-galera/mariadb-galera-10.0.20-r1.ebuild b/dev-db/mariadb-galera/mariadb-galera-10.0.20-r1.ebuild new file mode 100644 index 000000000000..ca543de4bbe8 --- /dev/null +++ b/dev-db/mariadb-galera/mariadb-galera-10.0.20-r1.ebuild @@ -0,0 +1,137 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150717-1707Z" +WSREP_REVISION="25" +HAS_TOOLS_PATCH="1" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-galera-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if use server ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # Create a symlink to provided binaries so the tests can find them when client-libs is off + if ! use client-libs ; then + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror" + fi + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + # wsrep.variables: + # Expects the sys-cluster/galera library to be installed and configured + # + # wsrep.foreign_key: + # Issues a configuration deprecation warning which does not affect data + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp main.bootstrap \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help wsrep.variables wsrep.foreign_key \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + # The PATH addition is required for the galera suite to find the sst scripts + # Skipping galera tests for now until MDEV-7544 is resovled + WSREP_LOG_DIR="${T}/var-tests/wsrep" \ + PATH="${BUILD_DIR}/scripts:${PATH}" \ + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --skip-test=galera + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb-galera/mariadb-galera-10.0.20.ebuild b/dev-db/mariadb-galera/mariadb-galera-10.0.20.ebuild new file mode 100644 index 000000000000..8082cb43d0f6 --- /dev/null +++ b/dev-db/mariadb-galera/mariadb-galera-10.0.20.ebuild @@ -0,0 +1,128 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20141215-0144Z" +WSREP_REVISION="25" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-galera-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + # wsrep.variables: + # Expects the sys-cluster/galera library to be installed and configured + # + # wsrep.foreign_key: + # Issues a configuration deprecation warning which does not affect data + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp main.bootstrap \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help wsrep.variables wsrep.foreign_key \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + # The PATH addition is required for the galera suite to find the sst scripts + # Skipping galera tests for now until MDEV-7544 is resovled + WSREP_LOG_DIR="${T}/var-tests/wsrep" \ + PATH="${BUILD_DIR}/scripts:${PATH}" \ + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --skip-test=galera + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb-galera/metadata.xml b/dev-db/mariadb-galera/metadata.xml new file mode 100644 index 000000000000..e0a0598ce6ff --- /dev/null +++ b/dev-db/mariadb-galera/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<!-- +Please note that this list is shared between the following packages: +dev-db/mysql +dev-db/mariadb +--> +<use> + <flag name='client-libs'>Build the libmysqlclient libraries</flag> + <flag name='cluster'>Add support for NDB clustering (deprecated)</flag> + <flag name='community'>Enables the community features from upstream.</flag> + <flag name='embedded'>Build embedded server (libmysqld)</flag> + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> + <flag name='minimal'>Install client programs only, no server</flag> + <flag name='oqgraph'>Add support for the Open Query GRAPH engine</flag> + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> + <flag name='server'>Build the server program</flag> + <flag name='sst-rsync'>Add tools needed to support the rsync SST method</flag> + <flag name='sst-xtrabackup'>Add tools needed to support the xtrabackup and xtrabackup-v2 SST methods</flag> + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> + <flag name='sphinx'>Add suport for the sphinx full-text search engine</flag> + <flag name='test'>Install upstream testsuites for end use.</flag> + <flag name='tokudb'>Add support for TokuDB storage engine</flag> + <flag name='tools'>Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag> +</use> +</pkgmetadata> diff --git a/dev-db/mariadb/Manifest b/dev-db/mariadb/Manifest new file mode 100644 index 000000000000..982a907949f6 --- /dev/null +++ b/dev-db/mariadb/Manifest @@ -0,0 +1,7 @@ +DIST mariadb-10.0.19.tar.gz 56224123 SHA256 2fbf5e5d7d8094691601ece8ae60b941478d73c98a58a960aeebfa021091a132 SHA512 bfb2a3e9225b3dd7481c0240143346f38be80c426887e05ec2b8eeab251991e2a5f74788f421322342a0fa8f85294cf4c7f5d4fd10d7bc6b9da720f6168003f3 WHIRLPOOL d08c53228c40df18793316dd0eddb160ce5b67a853f16c4ddcdcedb049833b35b9ae9d0763e1fcc1e447e3528ae9a7ab2e6587dd2e2c0a225224f28a951dc3dd +DIST mariadb-10.0.20.tar.gz 56241178 SHA256 3a4f6963c794977af5d5fd9ec06a337a2ad556b3a287196fddbd2243c1388b7b SHA512 40214e29ec3fd6402b6e075644ab3fc3acd080e9e0d6e77db83c14d928f69a9af366c5df715d3d52692b90259c6b6d28160376a4d6e05811ed9973741a3ba445 WHIRLPOOL 5a5dfa7a53254a22fc4540aa78a6ac3704e17e90b22d1bae32f40bddd906e6e9409161c973e9229d48af27419df410c7214859bd979137221ba394d37cf1bbbb +DIST mariadb-10.0.21.tar.gz 56216903 SHA256 4b9a32e15ceadefdb1057a02eb3e0addf702b75aef631a3c9194b832ecfa3545 SHA512 75aa4b019f3432a61483bb325a0f088ea92d6fede44d7a300c15659411c8927fa2a0586182226315b6d6796641ca1d8746f7fd49e21fe21505adec1fc38ae32f WHIRLPOOL b086fb34363b2426f5e91c14916b747787feadf37c609f4aea1f08bd235e9e97df17f5bfa0eb9e65e93fbed3df5eb6c021287c4eb987a3362ea87cf96eaf268e +DIST mariadb-5.5.45.tar.gz 45686618 SHA256 4dc3aff6941ef1068412002915d795bcf67db0eaa38a5c6f3af57474c4226fb0 SHA512 57501670605cfcdd231ef57d2db7ac9bf460856e63c0660d050ad11aa0392d3d6ce6730ae119dca5d00847c9170990f375c8499593bf0d02c1995395191236ba WHIRLPOOL e5ef471c097c2b8921596b88f26df6914e031daafdcd878d79a16c20be6ba8c97fb79069e48d7d1b9aa405ced063f66feac1c52503907e06ee4b577def2c57fa +DIST mysql-extras-20141215-0144Z.tar.bz2 1494767 SHA256 4757043858110654d52b0e6dccab064987ab5db8ae4ae99863cf86df0b90f947 SHA512 7a9b733d09f44b1faff19a496a3e820e444b339838665e6f37c4fddc8f2ad67e805082d598c4edc06fda9364f9906e4cf95520552f72d6b6df34413f38e7a2ed WHIRLPOOL 99ea6890a5faf097b941707538b68f62390e1a49ee662a87c27435a317a9a3f37f00802e72f86b52993b3d1674b57645db0f7e73379ab88fbc1d0ef791cf4326 +DIST mysql-extras-20150509-1847Z.tar.bz2 1494301 SHA256 de9c9fbb67998604cb3c0409842e4601646c8ad17f2aa301f55ffd4aed7a483d SHA512 f87d96ab8c35236d4453182c49f87f6e703af9dc217916546e4dd7368caa18a2340c9063decd96c22251d1097d7e2cac58bef30e6ff75c23aedf8926dbc3d3b4 WHIRLPOOL f60297c8ee1dfd9867ed6b29a8b04a002f23bc36b1e8d9b5db30e1e454a49fe06ffc37b10d934b11235364eecdc62beb50ce24690ab3d07a50056357906fa0fa +DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22 diff --git a/dev-db/mariadb/files/my.cnf-5.1 b/dev-db/mariadb/files/my.cnf-5.1 new file mode 100644 index 000000000000..a5e8bb0fc57a --- /dev/null +++ b/dev-db/mariadb/files/my.cnf-5.1 @@ -0,0 +1,146 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +language = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/english + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# uncomment the following directives if you are using BDB tables +#bdb_cache_size = 4M +#bdb_max_lock = 10000 + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/mariadb/files/my.cnf-5.5 b/dev-db/mariadb/files/my.cnf-5.5 new file mode 100644 index 000000000000..221edcb91765 --- /dev/null +++ b/dev-db/mariadb/files/my.cnf-5.5 @@ -0,0 +1,150 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout + +[mariadb] diff --git a/dev-db/mariadb/files/my.cnf-5.6 b/dev-db/mariadb/files/my.cnf-5.6 new file mode 100644 index 000000000000..7374a81ff3d3 --- /dev/null +++ b/dev-db/mariadb/files/my.cnf-5.6 @@ -0,0 +1,143 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 4M +table_open_cache = 400 +sort_buffer_size = 512K +net_buffer_length = 16K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 128M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 48M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout + +[mariadb] diff --git a/dev-db/mariadb/mariadb-10.0.19.ebuild b/dev-db/mariadb/mariadb-10.0.19.ebuild new file mode 100644 index 000000000000..6a68b6e795b2 --- /dev/null +++ b/dev-db/mariadb/mariadb-10.0.19.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20141215-0144Z" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help main.bootstrap \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" + + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb/mariadb-10.0.20-r1.ebuild b/dev-db/mariadb/mariadb-10.0.20-r1.ebuild new file mode 100644 index 000000000000..1ad5303538d1 --- /dev/null +++ b/dev-db/mariadb/mariadb-10.0.20-r1.ebuild @@ -0,0 +1,122 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150717-1707Z" +HAS_TOOLS_PATCH="1" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +IUSE="${IUSE}" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + if use server ; then + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Create a symlink to provided binaries so the tests can find them when client-libs is off + if ! use client-libs ; then + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror" + fi + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might run out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help main.bootstrap \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder + + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb/mariadb-10.0.20.ebuild b/dev-db/mariadb/mariadb-10.0.20.ebuild new file mode 100644 index 000000000000..fb96f68b0d60 --- /dev/null +++ b/dev-db/mariadb/mariadb-10.0.20.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20141215-0144Z" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help main.bootstrap \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" + + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb/mariadb-10.0.21-r1.ebuild b/dev-db/mariadb/mariadb-10.0.21-r1.ebuild new file mode 100644 index 000000000000..a694bf1216ea --- /dev/null +++ b/dev-db/mariadb/mariadb-10.0.21-r1.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150717-1707Z" +HAS_TOOLS_PATCH="1" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +IUSE="${IUSE}" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + if use server ; then + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Create a symlink to provided binaries so the tests can find them when client-libs is off + if ! use client-libs ; then + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror" + fi + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might run out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help main.bootstrap \ + archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" --reorder + + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb/mariadb-10.0.21.ebuild b/dev-db/mariadb/mariadb-10.0.21.ebuild new file mode 100644 index 000000000000..e96613962ade --- /dev/null +++ b/dev-db/mariadb/mariadb-10.0.21.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20141215-0144Z" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MariaDB 10.0 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql main.bootstrap + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock + # main.mysql_client_test_comp: + # segfaults at random under Portage only, suspect resource limits. + # + # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # + # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + main.mysql_client_test_comp \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help main.bootstrap \ + archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" + + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb/mariadb-5.5.45.ebuild b/dev-db/mariadb/mariadb-5.5.45.ebuild new file mode 100644 index 000000000000..07001858ff32 --- /dev/null +++ b/dev-db/mariadb/mariadb-5.5.45.ebuild @@ -0,0 +1,123 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150509-1847Z" + +# Build system +BUILD="cmake" + +inherit toolchain-funcs mysql-v2 +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mariadb-X.X.XX.ebuild \ +# digest clean package +src_test() { + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find the replace util + ln -s "${BUILD_DIR}/extra/replace" "${BUILD_DIR}/client/" + + # These are failing in MariaDB 5.5 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help, funcs_1.is_triggers, funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test, main.mysql_client_test_nonblock: + # segfaults at random under Portage only, suspect resource limits. + # + # archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + + for t in main.mysql_client_test main.mysql_client_test_nonblock \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help \ + archive.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + funcs_1.is_triggers funcs_1.is_tables_mysql funcs_1.is_columns_mysql ; do + mysql-v2_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --testcase-timeout=30 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mariadb/metadata.xml b/dev-db/mariadb/metadata.xml new file mode 100644 index 000000000000..1ff7642ea9db --- /dev/null +++ b/dev-db/mariadb/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<use> + <flag name='client-libs'>Build the libmysqlclient libraries</flag> + <flag name='cluster'>Add support for NDB clustering (deprecated)</flag> + <flag name='community'>Enables the community features from upstream.</flag> + <flag name='embedded'>Build embedded server (libmysqld)</flag> + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> + <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag> + <flag name='minimal'>Install client programs only, no server</flag> + <flag name='oqgraph'>Add support for the Open Query GRAPH engine</flag> + <flag name='pam'>Enable the optional PAM authentication plugin for the server</flag> + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> + <flag name='server'>Build the server program</flag> + <flag name='sphinx'>Add suport for the sphinx full-text search engine</flag> + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> + <flag name='tools'>Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag> + <flag name='test'>Install upstream testsuites for end use.</flag> + <flag name='tokudb'>Add support for TokuDB storage engine</flag> +</use> +</pkgmetadata> diff --git a/dev-db/metadata.xml b/dev-db/metadata.xml new file mode 100644 index 000000000000..7ef0dd98662b --- /dev/null +++ b/dev-db/metadata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE catmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<catmetadata> + <longdescription lang="en"> + The dev-db category contains libraries and utilities for database + related programming. + </longdescription> + <longdescription lang="de"> + Die Kategorie dev-db enhält Bibliotheken und Werkzeuge für die + Datenbank-Programmierung. + </longdescription> + <longdescription lang="es"> + La categoría dev-db contiene librerias y utilidades para programación + referente a bases de datos. + </longdescription> + <longdescription lang="ja"> + dev-dbカテゴリーにはデータベース・プログラミングに関連したライブラリーと + ユーティリティが含まれます。 + </longdescription> + <longdescription lang="nl"> + De dev-db categorie bevat bibliotheken en hulpmiddelen voor het gebruik + van verschillende database-programmeertalen. + </longdescription> + <longdescription lang="vi"> + Nhóm dev-db chứa các thư viện và tiện ích liên quan + đến Cơ sở dữ liệu. + </longdescription> + <longdescription lang="it"> + La categoria dev-db contiene librerie ed utilità per la programmazione di basi di dati. + </longdescription> + <longdescription lang="pt"> + A categoria dev-db contém bibliotecas e utilitários para a + programação relacionada a bancos de dados. + </longdescription> + <longdescription lang="pl"> + Kategoria dev-db zawiera biblioteki i narzędzia związane z + programowaniem związanym z bazami danych. + </longdescription> +</catmetadata> + diff --git a/dev-db/metakit/Manifest b/dev-db/metakit/Manifest new file mode 100644 index 000000000000..3ff4322ec26f --- /dev/null +++ b/dev-db/metakit/Manifest @@ -0,0 +1 @@ +DIST metakit-2.4.9.7.tar.gz 868310 SHA256 d1ba361d2d8517925cff5c23e8602822da9c8c347a75a15c225ec656ff7ca94d SHA512 94be6ae8ae5f1f24d255a427b0c01eccd2543cd49c5620df7c47f5bf09854ed464a01c52fc8441f7a8e9d5bdc8b966dc77ed34c15cbf9cdfe75a3063572cb8b9 WHIRLPOOL 2736564da532bf50982c9a529fcb50cf95c1e27192bba15ac19606eba98a9c97408ca8888f9ddd38b2a07496e1ee020e2fcd3de77142267b27148cae3ed1a5d9 diff --git a/dev-db/metakit/files/metakit-2.4.9.7-linking.patch b/dev-db/metakit/files/metakit-2.4.9.7-linking.patch new file mode 100644 index 000000000000..55453a2d8e4a --- /dev/null +++ b/dev-db/metakit/files/metakit-2.4.9.7-linking.patch @@ -0,0 +1,45 @@ + unix/Makefile.in | 10 +++++----- + 1 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/unix/Makefile.in b/unix/Makefile.in +index bf187ba..763558f 100755 +--- a/unix/Makefile.in ++++ b/unix/Makefile.in +@@ -43,7 +43,7 @@ CXX_FLAGS = @CPPFLAGS@ @CXXFLAGS@ @MK_THREADS@ @SHLIB_CFLAGS@ \ + # (e.g. in Mk4py). This does not affect standard operation, *only* errors. + # Happens in gcc 2.95.3, it has been disabled for now (even though slower). + #CXXFLAGS = -fomit-frame-pointer $(CXX_FLAGS) +-CXXFLAGS = $(CXX_FLAGS) ++CXXFLAGS += -I$(srcdir)/../include + #CXXFLAGS = -Dq4_CHECK $(CXX_FLAGS) + #CXXFLAGS = -Wall -pedantic -Wno-unused $(CXX_FLAGS) + +@@ -134,24 +134,24 @@ libmk4$(LIB_SUFFIX): $(LOBJS) + ranlib $@ + + libmk4$(SHLIB_SUFFIX): $(LOBJS) $(LINK_SPECIAL_FILES) +- $(SHLIB_LD) -o $@ $(LOBJS) $(LINK_SPECIAL_FLAGS) ++ $(SHLIB_LD) $(LDFLAGS) -o $@ $(LOBJS) $(LINK_SPECIAL_FLAGS) + + Mk4tcl$(LIB_SUFFIX): mk4tcl.o mk4too.o $(LOBJS) + ar rcu $@ mk4tcl.o mk4too.o $(LOBJS) + ranlib $@ + + Mk4tcl$(SHLIB_SUFFIX): mk4tcl.o mk4too.o $(LOBJS) $(LINK_SPECIAL_FILES) +- $(SHLIB_LD) -o $@ mk4tcl.o mk4too.o $(LOBJS) $(LINK_SPECIAL_FLAGS) ++ $(SHLIB_LD) $(LDFLAGS) -o $@ mk4tcl.o mk4too.o $(LOBJS) $(LINK_SPECIAL_FLAGS) + + Mk4py$(LIB_SUFFIX): $(PYOBJS) $(LOBJS) + ar cru $@ $(PYOBJS) $(LOBJS) + ranlib $@ + + Mk4py$(SHLIB_SUFFIX): $(PYOBJS) $(LOBJS) $(LINK_SPECIAL_FILES) +- $(SHLIB_LD) -o $@ $(PYOBJS) $(LOBJS) $(LINK_SPECIAL_FLAGS) ++ $(SHLIB_LD) $(LDFLAGS) -o $@ $(PYOBJS) -L. -lmk4 $(LINK_SPECIAL_FLAGS) $(PYTHON_LIB) + + Mk4lua$(SHLIB_SUFFIX): mk4lua.o $(LOBJS) $(LINK_SPECIAL_FILES) +- $(SHLIB_LD) -o $@ mk4lua.o $(LOBJS) $(LINK_SPECIAL_FLAGS) ++ $(SHLIB_LD) $(LDFLAGS) -o $@ mk4lua.o $(LOBJS) $(LINK_SPECIAL_FLAGS) + + demo: $(srcdir)/../demos/demo.cpp libmk4$(LIBEXT) + $(CXX) $(CXX_SWITCHES) -o $@$(EXEEXT) \ diff --git a/dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch b/dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch new file mode 100644 index 000000000000..cbf4ce3549f6 --- /dev/null +++ b/dev-db/metakit/files/metakit-2.4.9.7-tcltk86.patch @@ -0,0 +1,70 @@ + tcl/mk4tcl.cpp | 10 +++++++--- + tcl/mk4too.cpp | 6 +++++- + 2 files changed, 12 insertions(+), 4 deletions(-) + +diff --git a/tcl/mk4tcl.cpp b/tcl/mk4tcl.cpp +index 049bf8e..8d2249e 100755 +--- a/tcl/mk4tcl.cpp ++++ b/tcl/mk4tcl.cpp +@@ -28,6 +28,10 @@ + #define MyInitStubs(x) 1 + #endif + ++#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86 ++#define Tcl_GetErrorLine(interp) (interp)->errorLine ++#endif ++ + // definition of valid property name - alpha numerics, underscore, percent, + // or any extended utf-8 character + #define ISNAME(c) (isalnum((c)) || (c) == '_' || (c) == '%' || (c) & 0x80) +@@ -979,7 +983,7 @@ const c4_Property &AsProperty(Tcl_Obj *objPtr, const c4_View &view_) { + void *tag = (&view_[0])._seq; // horrific hack to get at c4_Sequence pointer + if (objPtr->typePtr != &mkPropertyType || objPtr + ->internalRep.twoPtrValue.ptr1 != tag) { +- Tcl_ObjType *oldTypePtr = objPtr->typePtr; ++ CONST86 Tcl_ObjType *oldTypePtr = objPtr->typePtr; + + char type = 'S'; + +@@ -1083,7 +1087,7 @@ int SetCursorFromAny(Tcl_Interp *interp, Tcl_Obj *objPtr) { + } + + if (objPtr->typePtr != &mkCursorType) { +- Tcl_ObjType *oldTypePtr = objPtr->typePtr; ++ CONST86 Tcl_ObjType *oldTypePtr = objPtr->typePtr; + + const char *string = Tcl_GetStringFromObj(objPtr, 0); + +@@ -2156,7 +2160,7 @@ int MkTcl::LoopCmd() { + _error = TCL_OK; + else if (_error == TCL_ERROR) { + char msg[100]; +- sprintf(msg, "\n (\"mk::loop\" body line %d)", interp->errorLine); ++ sprintf(msg, "\n (\"mk::loop\" body line %d)", Tcl_GetErrorLine(interp)); + Tcl_AddObjErrorInfo(interp, msg, - 1); + } + break; +diff --git a/tcl/mk4too.cpp b/tcl/mk4too.cpp +index 7c845c0..ffcbc4e 100644 +--- a/tcl/mk4too.cpp ++++ b/tcl/mk4too.cpp +@@ -7,6 +7,10 @@ + #include <stdio.h> + #include <string.h> + ++#if 10 * TCL_MAJOR_VERSION + TCL_MINOR_VERSION < 86 ++#define Tcl_GetErrorLine(interp) (interp)->errorLine ++#endif ++ + /////////////////////////////////////////////////////////////////////////////// + // Defined in this file: + +@@ -612,7 +616,7 @@ int MkView::LoopCmd() { + _error = TCL_OK; + else if (_error == TCL_ERROR) { + char msg[100]; +- sprintf(msg, "\n (\"mk::loop\" body line %d)", interp->errorLine); ++ sprintf(msg, "\n (\"mk::loop\" body line %d)", Tcl_GetErrorLine(interp)); + Tcl_AddObjErrorInfo(interp, msg, - 1); + } + break; diff --git a/dev-db/metakit/metadata.xml b/dev-db/metakit/metadata.xml new file mode 100644 index 000000000000..1470e032181b --- /dev/null +++ b/dev-db/metakit/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/metakit/metakit-2.4.9.7-r2.ebuild b/dev-db/metakit/metakit-2.4.9.7-r2.ebuild new file mode 100644 index 000000000000..5a874187299e --- /dev/null +++ b/dev-db/metakit/metakit-2.4.9.7-r2.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +PYTHON_COMPAT=( python2_7 ) + +inherit eutils flag-o-matic multilib python-single-r1 toolchain-funcs + +DESCRIPTION="Embedded database library" +HOMEPAGE="http://www.equi4.com/metakit/" +SRC_URI="http://www.equi4.com/pub/mk/${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="amd64 ppc x86" +IUSE="python static tcl" + +DEPEND=" + python? ( ${PYTHON_DEPS} ) + tcl? ( dev-lang/tcl:0= )" +RDEPEND="${DEPEND}" + +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RESTRICT="test" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + epatch \ + "${FILESDIR}"/${P}-linking.patch \ + "${FILESDIR}"/${P}-tcltk86.patch +} + +src_configure() { + local myconf mycxxflags + use tcl && myconf+=" --with-tcl=${EPREFIX}/usr/include,${EPREFIX}/usr/$(get_libdir)" + use static && myconf+=" --disable-shared" + use static || append-cxxflags -fPIC + + CXXFLAGS="${CXXFLAGS} ${mycxxflags}" unix/configure \ + ${myconf} \ + --host=${CHOST} \ + --prefix="${EPREFIX}/usr" \ + --libdir="${EPREFIX}/usr/$(get_libdir)" \ + --infodir="${EPREFIX}/usr/share/info" \ + --mandir="${EPREFIX}/usr/share/man" +} + +src_compile() { + emake SHLIB_LD="$(tc-getCXX) -shared -Wl,-soname,libmk4.so.2.4" + + if use python; then + emake \ + SHLIB_LD="$(tc-getCXX) -shared" \ + pyincludedir="$(python_get_includedir)" \ + PYTHON_LIB="-l${EPYTHON}" \ + python + fi +} + +src_install () { + default + + mv "${ED}"//usr/$(get_libdir)/libmk4.so{,.2.4} + dosym libmk4.so.2.4 /usr/$(get_libdir)/libmk4.so.2 + dosym libmk4.so.2.4 /usr/$(get_libdir)/libmk4.so + + if use python; then + mkdir -p "${D%/}$(python_get_sitedir)" || die + emake \ + DESTDIR="${D}" \ + pylibdir="$(python_get_sitedir)" \ + install-python + fi + + dohtml Metakit.html + dohtml -a html,gif,png,jpg -r doc/* +} diff --git a/dev-db/mongodb/Manifest b/dev-db/mongodb/Manifest new file mode 100644 index 000000000000..b17d87bf1551 --- /dev/null +++ b/dev-db/mongodb/Manifest @@ -0,0 +1,7 @@ +DIST 20140409-mms-monitoring-agent.zip 40122 SHA256 9c4f89cfba10b4604512ab21eb082248104aeabe7e813b852db2b86f47d7ecb2 SHA512 5290a813c407251b5e4def813ce6fe7e09d6c3a1907fd409e326b15b07aed39f7db3a28710ecdaffe2771136c9433253c5d1857c823844a4b75dd38f1d15eefd WHIRLPOOL ce80870e2618f3d9ed80af41b1069ed5bd97af475089564eed1bc111e820c048bc5cbaa03f859349e772fe232f876127e0627c75c135a9b2e196ab13258ed9f1 +DIST mongodb-src-r2.4.13.tar.gz 14183056 SHA256 9ad8a3b58457c35b6dd020ca2364ee605e30b839f5475449a229fdcd4115866c SHA512 26256410593f2072e8a8728fbb2665bb98d4c73f3601136e8306d1d6b421421827f66e4073515fea7dfbc0a27f5615cd30f8a85e5980ea3dd46f2f06366946cb WHIRLPOOL 6e64a8ba466da74342f7eabd41b8eb86a3d1cd99c5665e54872642230ec0ed86216c0e533b08d21e0c6b6c20b7d7887a34aad0679ba32523dd3ca0e464190348 +DIST mongodb-src-r2.4.14.tar.gz 15120808 SHA256 f5ed949cf7c9669267e6f426f3dc30bf6c0e2d68ba7df9e29f16799e8212e7ce SHA512 6811f27a57a2df07f59215f544948708cd5846237c24df6eb14bf09384db4136d964587d82008ff2b0a4dea94d6869fc1dcf2ccd07e5f285da5012a0a091a74f WHIRLPOOL c89b2f4f1a77523f895b3fa21ec82813a4859391c82e3934952b25ab8602c30ac13b9e6b2a00082bbe7bace32edacdb3270e46ac0f3a8c0ab10ea48b5911e019 +DIST mongodb-src-r2.6.10.tar.gz 16456717 SHA256 74228a22aaf99570e706ecde20658165e3983ee8a9f327e80974f82a4e819476 SHA512 acce5faf1986e9650469359fac48a5e83475c1e1e34d3bdeaaaf12da08f7f01eb68f4885ee9877b012f0d705b4f814be2832b3de446cab72ba254afba1e33c7f WHIRLPOOL b39766df876d9e225683bf806f0b05b70d3140900c04c9de3d3640bd933d0c942fbbe74968dcd9d6523750df076ad99e31b59ef09f7d1b2a620e7d2848c0e1ce +DIST mongodb-src-r2.6.8.tar.gz 14545274 SHA256 1997f60d9de17320f22c604d8aa1cbe5f38d877142cd0e9130fe3dae7b311a06 SHA512 6fa69750debb40d0be4d5d057125320d97e882e30c43c664fcb6ec6a9e6a8bff5e63637fc8952a6d898556b2c2ce84254d135387dc0879bf65dbd5e91b8732ef WHIRLPOOL ba87ca07258ad4df90c92bc300da6cc661117a98f254a8ba62ac362a857ecc2462eb9ddf1d929a6e2187853233053e975aa02139f880d736e47e542a9504bd28 +DIST mongodb-src-r3.0.4.tar.gz 26615962 SHA256 6de7aa8b12ad892ee3852ac949069fda8cb87b3ee606a88226817505e2864360 SHA512 bd35a252cd351a2d755edf5e20c69c904de326d7e47aebc055cd0160476ecf966cf53f3263410c32f70e108ff2a019f86a21e1a71917246c2f13db9251082bc3 WHIRLPOOL 224ca39c0411b1608f75191eb14d86256434d3e5ce293a9ac5d1febc3d0285bf79db0875e97fd5559f47734c7f97fedc1bcff3a28aec0a39924da1a4cc24744d +DIST mongodb-src-r3.0.5.tar.gz 26332788 SHA256 05b16a7991aa65b1d396a3dc622107fba3216fffa8b9ed0817e76ae95f5f7fdb SHA512 17c66f9501e6517feba069f85bb468a421c45300306977ebfed71e6ce120e2bed64f14698e470c644360e23f40132171d64ac85f0962aa3ba824a48cf228775a WHIRLPOOL 7ed1f2b0daf7cb9ff081e69823e79504b8c99a221c74c2a541d673febacad9e555ef34eb4f2e97effe7e6fddafb81b903ab5a4ac8c4e8951640a0f2c6828ba14 diff --git a/dev-db/mongodb/files/mms-agent.confd b/dev-db/mongodb/files/mms-agent.confd new file mode 100644 index 000000000000..d19b21e2d32b --- /dev/null +++ b/dev-db/mongodb/files/mms-agent.confd @@ -0,0 +1,9 @@ +# Your API key - See: http://mms.10gen.com/settings +API_KEY="" +SECRET_KEY="" + +# Seconds between Mongo status checks +#COLLECTION_INTERVAL=56 + +# Seconds between cloud configuration checks +#CONF_INTERVAL=120
\ No newline at end of file diff --git a/dev-db/mongodb/files/mms-agent.initd b/dev-db/mongodb/files/mms-agent.initd new file mode 100644 index 000000000000..7f7196501639 --- /dev/null +++ b/dev-db/mongodb/files/mms-agent.initd @@ -0,0 +1,41 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +ROOTDIR=/opt/mms-agent +PIDFILE=/var/run/mm-agent.pid +EXEC="/usr/bin/env python agent.py" +LOGFILE=/var/log/mongodb/mms-agent.log + +depend() { + need net + use syslog +} + +start() { + ebegin "Starting ${SVCNAME}" + + checkpath -d -m 0755 -o root:root /var/run/ + + # Setup API/SECRETY KEYS + sed -i -e "s/^mms_key.*/mms_key = '${API_KEY}'/g" \ + -e "s/^secret_key.*/secret_key = '${SECRET_KEY}'/g" ${ROOTDIR}/settings.py &>/dev/null + + # Tune the agent + [ -z "${COLLECTION_INTERVAL}" ] || sed -i \ + -e "s/^collection_interval.*/collection_interval = ${COLLECTION_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null + [ -z "${CONF_INTERVAL}" ] || sed -i \ + -e "s/^conf_interval.*/conf_interval = ${CONF_INTERVAL}/g" ${ROOTDIR}/settings.py &>/dev/null + + start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \ + --pidfile "${PIDFILE}" --make-pidfile --background \ + --user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE} + eend $? +} + +stop() { + ebegin "Requesting ${SVCNAME} to stop" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} diff --git a/dev-db/mongodb/files/mms-agent.initd-r1 b/dev-db/mongodb/files/mms-agent.initd-r1 new file mode 100644 index 000000000000..66d408b08322 --- /dev/null +++ b/dev-db/mongodb/files/mms-agent.initd-r1 @@ -0,0 +1,31 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +ROOTDIR=/opt/mms-agent +PIDFILE=/var/run/mm-agent.pid +EXEC="/usr/bin/env python agent.py" +LOGFILE=/var/log/mongodb/mms-agent.log + +depend() { + need net + use syslog +} + +start() { + ebegin "Starting ${SVCNAME}" + + checkpath -d -m 0755 -o root:root /var/run/ + + start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \ + --pidfile "${PIDFILE}" --make-pidfile --background \ + --user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE} + eend $? +} + +stop() { + ebegin "Requesting ${SVCNAME} to stop" + start-stop-daemon --stop --pidfile "${PIDFILE}" + eend $? +} diff --git a/dev-db/mongodb/files/mms-agent.initd-r2 b/dev-db/mongodb/files/mms-agent.initd-r2 new file mode 100644 index 000000000000..9c63be02245d --- /dev/null +++ b/dev-db/mongodb/files/mms-agent.initd-r2 @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +logfile=/var/log/mongodb/mms-agent.log +run_dir=${run_dir:-/run/mongodb} + +command="/usr/bin/python2 agent.py &>${logfile}" +command_background="true" + +pidfile=${run_dir}/${SVCNAME}.pid +user=${user:-mongodb} +group=${group:-mongodb} +start_stop_daemon_args="--user ${user} --group ${group}" + +depend() { + need net + use syslog +} + +start_pre() { + checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}" + cd /opt/mms-agent +} diff --git a/dev-db/mongodb/files/mongodb-2.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.0-fix-scons.patch new file mode 100644 index 000000000000..a52e3a30a77d --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.0-fix-scons.patch @@ -0,0 +1,36 @@ +--- a/SConstruct 2011-11-16 22:11:39.000000000 +0100 ++++ b/SConstruct 2011-11-17 16:30:16.144117550 +0100 +@@ -688,7 +688,7 @@ + env["CXX"] = "distcc " + env["CXX"] + + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. +- env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) ++ env.Append( CPPFLAGS="-fPIC -fno-strict-aliasing -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch" ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux: + env.Append( CPPFLAGS=" -Werror " ) +@@ -696,7 +696,9 @@ + env.Append( CPPFLAGS=" -fno-builtin-memcmp " ) # glibc's memcmp is faster than gcc's + + env.Append( CPPDEFINES="_FILE_OFFSET_BITS=64" ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS']) + env.Append( CXXFLAGS=" -Wnon-virtual-dtor " ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + env.Append( LINKFLAGS=" -fPIC -pthread -rdynamic" ) + env.Append( LIBS=[] ) + +@@ -706,12 +708,13 @@ + + if linux and has_option( "sharedclient" ): + env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " ) ++ env.Append( SHLINKFLAGS=" -Wl,-soname=libmongoclient.so " ) + + if debugBuild: + env.Append( CPPFLAGS=" -O0 -fstack-protector " ); + env['ENV']['GLIBCXX_FORCE_NEW'] = 1; # play nice with valgrind + else: +- env.Append( CPPFLAGS=" -O3 " ) ++ env.Append( CXXFLAGS=" -O3 " ) + #env.Append( CPPFLAGS=" -fprofile-generate" ) + #env.Append( LINKFLAGS=" -fprofile-generate" ) + # then: diff --git a/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch b/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch new file mode 100644 index 000000000000..4ccb898ec6fd --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.0-r1-boost-1.50.patch @@ -0,0 +1,245 @@ +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/db.cpp mongodb-src-r2.0.6-patched/db/db.cpp +--- mongodb-src-r2.0.6/db/db.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/db/db.cpp 2012-07-10 22:27:16.496886220 +0200 +@@ -326,7 +326,7 @@ + boost::filesystem::path path( dbpath ); + for ( boost::filesystem::directory_iterator i( path ); + i != boost::filesystem::directory_iterator(); ++i ) { +- string fileName = boost::filesystem::path(*i).leaf(); ++ string fileName = boost::filesystem::path(*i).leaf().string(); + if ( boost::filesystem::is_directory( *i ) && + fileName.length() && fileName[ 0 ] == '$' ) + boost::filesystem::remove_all( *i ); +@@ -655,11 +655,6 @@ + dbExecCommand = argv[0]; + + srand(curTimeMicros()); +-#if( BOOST_VERSION >= 104500 ) +- boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); +-#else +- boost::filesystem::path::default_name_check( boost::filesystem::no_check ); +-#endif + + { + unsigned x = 0x12345678; +@@ -976,7 +971,7 @@ + if (params.count("shutdown")){ + bool failed = false; + +- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); ++ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string(); + if ( !boost::filesystem::exists( name ) || boost::filesystem::file_size( name ) == 0 ) + failed = true; + +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur.cpp mongodb-src-r2.0.6-patched/db/dur.cpp +--- mongodb-src-r2.0.6/db/dur.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/db/dur.cpp 2012-07-10 21:56:28.866778732 +0200 +@@ -692,7 +692,7 @@ + + bool samePartition = true; + try { +- const string dbpathDir = boost::filesystem::path(dbpath).native_directory_string(); ++ const string dbpathDir = boost::filesystem::path(dbpath).string(); + samePartition = onSamePartition(getJournalDir().string(), dbpathDir); + } + catch(...) { +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur_journal.cpp mongodb-src-r2.0.6-patched/db/dur_journal.cpp +--- mongodb-src-r2.0.6/db/dur_journal.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/db/dur_journal.cpp 2012-07-10 22:04:18.583472723 +0200 +@@ -169,7 +169,7 @@ + for ( boost::filesystem::directory_iterator i( getJournalDir() ); + i != boost::filesystem::directory_iterator(); + ++i ) { +- string fileName = boost::filesystem::path(*i).leaf(); ++ string fileName = boost::filesystem::path(*i).leaf().string(); + if( str::startsWith(fileName, "j._") ) + return true; + } +@@ -185,7 +185,7 @@ + for ( boost::filesystem::directory_iterator i( getJournalDir() ); + i != boost::filesystem::directory_iterator(); + ++i ) { +- string fileName = boost::filesystem::path(*i).leaf(); ++ string fileName = boost::filesystem::path(*i).leaf().string(); + if( str::startsWith(fileName, "j._") ) { + try { + removeOldJournalFile(*i); +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/dur_recover.cpp mongodb-src-r2.0.6-patched/db/dur_recover.cpp +--- mongodb-src-r2.0.6/db/dur_recover.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/db/dur_recover.cpp 2012-07-10 22:02:18.226799055 +0200 +@@ -71,7 +71,7 @@ + i != filesystem::directory_iterator(); + ++i ) { + filesystem::path filepath = *i; +- string fileName = filesystem::path(*i).leaf(); ++ string fileName = filesystem::path(*i).leaf().string(); + if( str::startsWith(fileName, "j._") ) { + unsigned u = str::toUnsigned( str::after(fileName, '_') ); + if( m.count(u) ) { +@@ -84,7 +84,7 @@ + if( i != m.begin() && m.count(i->first - 1) == 0 ) { + uasserted(13532, + str::stream() << "unexpected file in journal directory " << dir.string() +- << " : " << filesystem::path(i->second).leaf() << " : can't find its preceeding file"); ++ << " : " << filesystem::path(i->second).leaf().string() << " : can't find its preceeding file"); + } + files.push_back(i->second); + } +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/instance.cpp mongodb-src-r2.0.6-patched/db/instance.cpp +--- mongodb-src-r2.0.6/db/instance.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/db/instance.cpp 2012-07-10 22:08:55.213488817 +0200 +@@ -645,13 +645,13 @@ + i != boost::filesystem::directory_iterator(); ++i ) { + if ( directoryperdb ) { + boost::filesystem::path p = *i; +- string dbName = p.leaf(); ++ string dbName = p.leaf().string(); + p /= ( dbName + ".ns" ); + if ( MMF::exists( p ) ) + names.push_back( dbName ); + } + else { +- string fileName = boost::filesystem::path(*i).leaf(); ++ string fileName = boost::filesystem::path(*i).leaf().string(); + if ( fileName.length() > 3 && fileName.substr( fileName.length() - 3, 3 ) == ".ns" ) + names.push_back( fileName.substr( 0, fileName.length() - 3 ) ); + } +@@ -893,7 +893,7 @@ + } + + void acquirePathLock(bool doingRepair) { +- string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); ++ string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).string(); + + bool oldFile = false; + +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/db/pdfile.cpp mongodb-src-r2.0.6-patched/db/pdfile.cpp +--- mongodb-src-r2.0.6/db/pdfile.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/db/pdfile.cpp 2012-07-10 22:11:44.103498643 +0200 +@@ -1987,7 +1987,7 @@ + virtual bool apply( const Path &p ) { + if ( !boost::filesystem::exists( p ) ) + return false; +- boostRenameWrapper( p, newPath_ / ( p.leaf() + ".bak" ) ); ++ boostRenameWrapper( p, newPath_ / ( p.leaf().string() + ".bak" ) ); + return true; + } + virtual const char * op() const { +@@ -2093,7 +2093,7 @@ + uniqueReservedPath( ( preserveClonedFilesOnFailure || backupOriginalFiles ) ? + "backup" : "$tmp" ); + BOOST_CHECK_EXCEPTION( boost::filesystem::create_directory( reservedPath ) ); +- string reservedPathString = reservedPath.native_directory_string(); ++ string reservedPathString = reservedPath.string(); + + bool res; + { +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/dbtests/framework.cpp mongodb-src-r2.0.6-patched/dbtests/framework.cpp +--- mongodb-src-r2.0.6/dbtests/framework.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/dbtests/framework.cpp 2012-07-10 22:29:20.610226773 +0200 +@@ -281,7 +281,7 @@ + boost::filesystem::create_directory(p); + } + +- string dbpathString = p.native_directory_string(); ++ string dbpathString = p.string(); + dbpath = dbpathString.c_str(); + + cmdLine.prealloc = false; +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/pch.h mongodb-src-r2.0.6-patched/pch.h +--- mongodb-src-r2.0.6/pch.h 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/pch.h 2012-07-10 21:35:57.133373738 +0200 +@@ -79,7 +79,7 @@ + //#include <boost/any.hpp> + #include "boost/thread/once.hpp" + //#include <boost/archive/iterators/transform_width.hpp> +-#define BOOST_FILESYSTEM_VERSION 2 ++#define BOOST_FILESYSTEM_VERSION 3 + #include <boost/filesystem/convenience.hpp> + #include <boost/filesystem/exception.hpp> + #include <boost/filesystem/operations.hpp> +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/shell/shell_utils.cpp mongodb-src-r2.0.6-patched/shell/shell_utils.cpp +--- mongodb-src-r2.0.6/shell/shell_utils.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/shell/shell_utils.cpp 2012-07-10 22:38:58.443593723 +0200 +@@ -388,7 +388,7 @@ + #endif + } + +- argv_.push_back( programPath.native_file_string() ); ++ argv_.push_back( programPath.string() ); + + port_ = -1; + +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/tools/restore.cpp mongodb-src-r2.0.6-patched/tools/restore.cpp +--- mongodb-src-r2.0.6/tools/restore.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/tools/restore.cpp 2012-07-10 22:45:00.046948094 +0200 +@@ -131,7 +131,7 @@ + log(2) << "drillDown: " << root.string() << endl; + + // skip hidden files and directories +- if (root.leaf()[0] == '.' && root.leaf() != ".") ++ if (root.leaf().string()[0] == '.' && root.leaf().string() != ".") + return; + + if ( is_directory( root ) ) { +@@ -210,7 +210,7 @@ + ns += "." + _coll; + } + else { +- string l = root.leaf(); ++ string l = root.leaf().string(); + l = l.substr( 0 , l.find_last_of( "." ) ); + ns += "." + l; + } +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/tools/tool.cpp mongodb-src-r2.0.6-patched/tools/tool.cpp +--- mongodb-src-r2.0.6/tools/tool.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/tools/tool.cpp 2012-07-10 22:23:53.356874403 +0200 +@@ -113,12 +113,6 @@ + // we want durability to be disabled. + cmdLine.dur = false; + +-#if( BOOST_VERSION >= 104500 ) +- boost::filesystem::path::default_name_check( boost::filesystem2::no_check ); +-#else +- boost::filesystem::path::default_name_check( boost::filesystem::no_check ); +-#endif +- + _name = argv[0]; + + /* using the same style as db.cpp */ +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/background.cpp mongodb-src-r2.0.6-patched/util/background.cpp +--- mongodb-src-r2.0.6/util/background.cpp 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/util/background.cpp 2012-07-10 21:47:40.420081320 +0200 +@@ -89,7 +89,7 @@ + if ( msTimeOut ) { + // add msTimeOut millisecond to current time + boost::xtime xt; +- boost::xtime_get( &xt, boost::TIME_UTC ); ++ boost::xtime_get( &xt, boost::TIME_UTC_ ); + + unsigned long long ns = msTimeOut * 1000000ULL; // milli to nano + if ( xt.nsec + ns < 1000000000 ) { +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/concurrency/mutex.h mongodb-src-r2.0.6-patched/util/concurrency/mutex.h +--- mongodb-src-r2.0.6/util/concurrency/mutex.h 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/util/concurrency/mutex.h 2012-07-10 21:45:51.333408307 +0200 +@@ -29,7 +29,7 @@ + + inline boost::xtime incxtimemillis( long long s ) { + boost::xtime xt; +- boost::xtime_get(&xt, boost::TIME_UTC); ++ boost::xtime_get(&xt, boost::TIME_UTC_); + xt.sec += (int)( s / 1000 ); + xt.nsec += (int)(( s % 1000 ) * 1000000); + if ( xt.nsec >= 1000000000 ) { +diff -ru '--exclude=mongo_vstudio.cpp' mongodb-src-r2.0.6/util/queue.h mongodb-src-r2.0.6-patched/util/queue.h +--- mongodb-src-r2.0.6/util/queue.h 2012-06-04 15:42:54.000000000 +0200 ++++ mongodb-src-r2.0.6-patched/util/queue.h 2012-07-10 22:14:00.243506560 +0200 +@@ -82,7 +82,7 @@ + Timer timer; + + boost::xtime xt; +- boost::xtime_get(&xt, boost::TIME_UTC); ++ boost::xtime_get(&xt, boost::TIME_UTC_); + xt.sec += maxSecondsToWait; + + scoped_lock l( _lock ); diff --git a/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch new file mode 100644 index 000000000000..b6c9a1eb55df --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.2-r1-fix-boost.patch @@ -0,0 +1,13 @@ +--- mongodb-src-r2.2.0/SConstruct.old 2012-10-09 12:41:25.000000000 -0400 ++++ mongodb-src-r2.2.0/SConstruct 2012-10-09 12:41:41.000000000 -0400 +@@ -171,8 +171,8 @@ + add_option( "extrapathdyn", "comma separated list of add'l paths (--extrapath /opt/foo/,/foo) dynamic linking" , 1 , True ) + add_option( "extralib", "comma separated list of libraries (--extralib js_static,readline" , 1 , True ) + +-add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , True , "boostCompiler" ) +-add_option( "boost-version", "boost version for linking(1_38)" , 1 , True , "boostVersion" ) ++add_option( "boost-compiler", "compiler used for boost (gcc41)" , 1 , False , "boostCompiler" ) ++add_option( "boost-version", "boost version for linking(1_38)" , 1 , False , "boostVersion" ) + + add_option( "no-glibc-check" , "don't check for new versions of glibc" , 0 , False ) + diff --git a/dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch b/dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch new file mode 100644 index 000000000000..553967e8dedd --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.4-fix-sasl.patch @@ -0,0 +1,33 @@ +--- a/src/mongo/client/sasl_client_session.cpp 2014-10-15 00:40:29.000000000 +0400 ++++ b/src/mongo/client/sasl_client_session.cpp 2015-02-07 18:56:02.287762467 +0300 +@@ -29,17 +29,26 @@ + * doesn't initialize the library for us. + */ + +- void* saslOurMalloc(unsigned long sz) { ++// Version 2.1.26 is the first version to use size_t in the allocator signatures ++#if (SASL_VERSION_FULL >= ((2 << 16) | (1 << 8) | 26)) ++ typedef size_t SaslAllocSize; ++#else ++ typedef unsigned long SaslAllocSize; ++#endif ++ ++ typedef int(*SaslCallbackFn)(); ++ ++ void* saslOurMalloc(SaslAllocSize sz) { + return ourmalloc(sz); + } + +- void* saslOurCalloc(unsigned long count, unsigned long size) { ++ void* saslOurCalloc(SaslAllocSize count, SaslAllocSize size) { + void* ptr = calloc(count, size); +- if (!ptr) printStackAndExit(0); ++ if (!ptr) abort(); + return ptr; + } + +- void* saslOurRealloc(void* ptr, unsigned long sz) { ++ void* saslOurRealloc(void* ptr, SaslAllocSize sz) { + return ourrealloc(ptr, sz); + } + diff --git a/dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch b/dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch new file mode 100644 index 000000000000..19efad676839 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.4-fix-v8-pythonpath.patch @@ -0,0 +1,11 @@ +--- a/src/third_party/v8/SConscript 2014-05-26 11:00:37.725508098 +0200 ++++ b/src/third_party/v8/SConscript 2014-05-26 11:01:13.265029083 +0200 +@@ -29,7 +29,7 @@ + import sys + from os.path import join, dirname, abspath + root_dir = dirname(File('SConscript').rfile().abspath) +-sys.path.append(join(root_dir, 'tools')) ++sys.path.insert(0, join(root_dir, 'tools')) + import js2c + + Import("env windows linux darwin solaris freebsd debugBuild") diff --git a/dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch new file mode 100644 index 000000000000..5050fe7daa35 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.4.11-fix-scons.patch @@ -0,0 +1,23 @@ +--- b/SConstruct 2014-09-01 19:12:24.289585592 +0200 ++++ a/SConstruct 2014-09-01 19:14:12.550312261 +0200 +@@ -704,7 +704,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -719,9 +718,10 @@ + env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread", "-rdynamic"] ) +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy'] ) + + #make scons colorgcc friendly + for key in ('HOME', 'TERM'): diff --git a/dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch new file mode 100644 index 000000000000..4f4c13455430 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.4.5-fix-scons.patch @@ -0,0 +1,28 @@ +--- a/SConstruct 2013-06-26 10:31:56.209089504 +0200 ++++ b/SConstruct 2013-06-26 10:33:59.177045991 +0200 +@@ -702,7 +702,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -710,14 +709,14 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux: +- env.Append( CCFLAGS=["-Werror", "-pipe"] ) + if not has_option('clang'): + env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS']) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread", "-rdynamic"] ) +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy'] ) + + #make scons colorgcc friendly + for key in ('HOME', 'TERM'): diff --git a/dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch new file mode 100644 index 000000000000..031d84373b71 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.6.1-fix-scons.patch @@ -0,0 +1,35 @@ +diff --git SConstruct SConstruct +index 3886d1b..81c59a9 100644 +--- SConstruct ++++ SConstruct +@@ -811,19 +811,17 @@ if nix: + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", + "-Wno-unknown-pragmas", + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet +- if linux or darwin: +- env.Append( CCFLAGS=["-Werror", "-pipe"] ) + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS']) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -840,7 +838,7 @@ if nix: + if not darwin: + env.Append( LINKFLAGS=["-rdynamic"] ) + +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] ) + + #make scons colorgcc friendly + for key in ('HOME', 'TERM'): diff --git a/dev-db/mongodb/files/mongodb-2.6.10-fix-boost-1.57.patch b/dev-db/mongodb/files/mongodb-2.6.10-fix-boost-1.57.patch new file mode 100644 index 000000000000..5f289c078831 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.6.10-fix-boost-1.57.patch @@ -0,0 +1,13 @@ +diff -up mongodb-src-r2.6.7/src/mongo/shell/linenoise_utf8.h\~ mongodb-src-r2.6.7/src/mongo/shell/linenoise_utf8.h +--- mongodb-src-r2.6.7/src/mongo/shell/linenoise_utf8.h~ 2015-01-13 18:12:06.000000000 +0100 ++++ mongodb-src-r2.6.7/src/mongo/shell/linenoise_utf8.h 2015-01-28 22:22:50.538934558 +0100 +@@ -17,6 +17,7 @@ + + #include <boost/smart_ptr/scoped_array.hpp> + #include <string.h> ++#include <algorithm> + + namespace linenoise_utf8 { + + +Diff finished. Wed Jan 28 22:24:47 2015 diff --git a/dev-db/mongodb/files/mongodb-2.6.2-fix-scons.patch b/dev-db/mongodb/files/mongodb-2.6.2-fix-scons.patch new file mode 100644 index 000000000000..76feba7bfe76 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-2.6.2-fix-scons.patch @@ -0,0 +1,35 @@ +--- a/SConstruct 2014-06-16 19:32:46.274507258 +0200 ++++ b/SConstruct 2014-06-16 19:34:04.763586829 +0200 +@@ -813,7 +813,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -821,13 +820,13 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux or darwin: +- env.Append( CCFLAGS=["-pipe"] ) + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -844,7 +843,7 @@ + if not darwin: + env.Append( LINKFLAGS=["-rdynamic"] ) + +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] ) + + #make scons colorgcc friendly + for key in ('HOME', 'TERM'): diff --git a/dev-db/mongodb/files/mongodb-3.0.0-fix-scons.patch b/dev-db/mongodb/files/mongodb-3.0.0-fix-scons.patch new file mode 100644 index 000000000000..b7378d8ac416 --- /dev/null +++ b/dev-db/mongodb/files/mongodb-3.0.0-fix-scons.patch @@ -0,0 +1,35 @@ +--- SConstruct.orig 2015-02-05 16:33:41.000000000 +0000 ++++ SConstruct 2015-02-18 08:21:23.120134258 +0000 +@@ -1008,7 +1008,6 @@ + # -Winvalid-pch Warn if a precompiled header (see Precompiled Headers) is found in the search path but can't be used. + env.Append( CCFLAGS=["-fPIC", + "-fno-strict-aliasing", +- "-ggdb", + "-pthread", + "-Wall", + "-Wsign-compare", +@@ -1016,13 +1015,13 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux or darwin: +- env.Append( CCFLAGS=["-pipe"] ) + if not has_option("disable-warnings-as-errors"): + env.Append( CCFLAGS=["-Werror"] ) + + env.Append( CPPDEFINES=["_FILE_OFFSET_BITS=64"] ) +- env.Append( CXXFLAGS=["-Wnon-virtual-dtor", "-Woverloaded-virtual"] ) + env.Append( LINKFLAGS=["-fPIC", "-pthread"] ) ++ env.Append( CXXFLAGS=os.environ['CXXFLAGS'] ) ++ env.Append( LINKFLAGS=os.environ['LDFLAGS'] ) + + # SERVER-9761: Ensure early detection of missing symbols in dependent libraries at program + # startup. +@@ -1039,7 +1038,7 @@ + if not darwin: + env.Append( LINKFLAGS=["-rdynamic"] ) + +- env.Append( LIBS=[] ) ++ env.Append( LIBS=['pcre', 'pcrecpp', 'snappy', 'yaml-cpp'] ) + + #make scons colorgcc friendly + for key in ('HOME', 'TERM'): diff --git a/dev-db/mongodb/files/mongodb.conf b/dev-db/mongodb/files/mongodb.conf new file mode 100644 index 000000000000..c5272b7f2df3 --- /dev/null +++ b/dev-db/mongodb/files/mongodb.conf @@ -0,0 +1,8 @@ +# See http://www.mongodb.org/display/DOCS/File+Based+Configuration for format details +# Run mongod --help to see a list of options + +bind_ip = 127.0.0.1 +quiet = true +dbpath = /var/lib/mongodb +logpath = /var/log/mongodb/mongod.log +logappend = true diff --git a/dev-db/mongodb/files/mongodb.conf-r2 b/dev-db/mongodb/files/mongodb.conf-r2 new file mode 100644 index 000000000000..8e8a64408cdf --- /dev/null +++ b/dev-db/mongodb/files/mongodb.conf-r2 @@ -0,0 +1,33 @@ +# !! IMPORTANT !! +# +# This file uses the YAML format as described in the documentation: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +storage: + dbPath: "/var/lib/mongodb" + +systemLog: + destination: file + path: "/var/log/mongodb/mongodb.log" + quiet: true + logAppend: true + +net: + port: 27017 + bindIp: 127.0.0.1 +# ssl: +# mode: disabled + +#security: + #keyFile: + #clusterAuthMode: + +#replication: + #replSetName: + +# Specifies one of the MongoDB parameters described here: +# http://docs.mongodb.org/manual/reference/parameters/ +# +# You can specify multiple setParameter fields such as: +# setParameter: {enableTestCommands: 1} +#setParameter: diff --git a/dev-db/mongodb/files/mongodb.conf-r3 b/dev-db/mongodb/files/mongodb.conf-r3 new file mode 100644 index 000000000000..83b4cc0589ad --- /dev/null +++ b/dev-db/mongodb/files/mongodb.conf-r3 @@ -0,0 +1,34 @@ +# !! IMPORTANT !! +# +# This file uses the YAML format as described in the documentation: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +storage: + dbPath: "/var/lib/mongodb" + #engine: wiredTiger + +systemLog: + destination: file + path: "/var/log/mongodb/mongodb.log" + quiet: true + logAppend: true + +net: + port: 27017 + bindIp: 127.0.0.1 + #ssl: + # mode: disabled + +#security: + #keyFile: + #clusterAuthMode: + +#replication: + #replSetName: + +# Specifies one of the MongoDB parameters described here: +# http://docs.mongodb.org/manual/reference/parameters/ +# +# You can specify multiple setParameter fields such as: +# setParameter: {enableTestCommands: 1} +#setParameter: diff --git a/dev-db/mongodb/files/mongodb.confd b/dev-db/mongodb/files/mongodb.confd new file mode 100644 index 000000000000..4f76c5a79f9f --- /dev/null +++ b/dev-db/mongodb/files/mongodb.confd @@ -0,0 +1,14 @@ +# Mongodb essentials +MONGODB_EXEC="/usr/bin/mongod" +MONGODB_RUN="/var/run/mongodb" +MONGODB_DATA="/var/lib/mongodb" +MONGODB_USER="mongodb" + +# Listen to specified IP, comment this to listen to all +MONGODB_IP="127.0.0.1" + +# Listen to specified port +MONGODB_PORT="27017" + +# Set extra options here, such as disabling the admin web server +MONGODB_OPTIONS="--journal" diff --git a/dev-db/mongodb/files/mongodb.confd-r2 b/dev-db/mongodb/files/mongodb.confd-r2 new file mode 100644 index 000000000000..dddb67e9301d --- /dev/null +++ b/dev-db/mongodb/files/mongodb.confd-r2 @@ -0,0 +1,12 @@ +# !! IMPORTANT !! +# +# This file is ONLY used to override some of the init script configuration. +# +# You should NOT use this file to configure your mongodb instance, +# see the /etc/mongodb.conf file instead. +# +# Available init script modifiers : +# - config_file : the configuration file to use (default : /etc/mongodb.conf) +# - user : the user used to run your mongodb instance (default : mongodb) +# - group : the group used to run your mongodb instance (default : mongodb) +# - run_dir : the run directory for your PID files (default : /run/mongodb) diff --git a/dev-db/mongodb/files/mongodb.initd-r1 b/dev-db/mongodb/files/mongodb.initd-r1 new file mode 100644 index 000000000000..f52cca2fd408 --- /dev/null +++ b/dev-db/mongodb/files/mongodb.initd-r1 @@ -0,0 +1,40 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net +} + +start() { + checkpath -d -m 0750 -o "${MONGODB_USER}":mongodb "${MONGODB_RUN}" + + # Listen to MONGODB_IP if configured + [ -z "${MONGODB_IP}" ] || MONGODB_OPTIONS="--bind_ip ${MONGODB_IP} ${MONGODB_OPTIONS}" + + # Baselayout-1 user should use --chuid instead of --user + local USEROPT="--user" + if [ ! -f /etc/init.d/sysfs ]; then + USEROPT="--chuid" + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --background --start --make-pidfile \ + --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid \ + ${USEROPT} ${MONGODB_USER:-mongodb} \ + --exec ${MONGODB_EXEC:-/usr/bin/mongod} \ + -- \ + --port ${MONGODB_PORT:-27017} \ + --dbpath ${MONGODB_DATA:-/var/lib/mongodb} \ + --unixSocketPrefix ${MONGODB_RUN:-/var/run/mongodb} \ + --logappend --logpath /var/log/mongodb/${SVCNAME}.log \ + ${MONGODB_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile ${MONGODB_RUN:-/var/run/mongodb}/${SVCNAME}.pid + eend $? +} diff --git a/dev-db/mongodb/files/mongodb.initd-r2 b/dev-db/mongodb/files/mongodb.initd-r2 new file mode 100644 index 000000000000..fd78ed578881 --- /dev/null +++ b/dev-db/mongodb/files/mongodb.initd-r2 @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +config_file=${config_file:-/etc/${SVCNAME}.conf} +run_dir=${run_dir:-/run/mongodb} + +command="/usr/bin/mongod" +command_args="--config ${config_file}" +command_background="true" +pidfile=${run_dir}/${SVCNAME}.pid +user=${user:-mongodb} +group=${group:-mongodb} +start_stop_daemon_args="--user ${user} --group ${group}" + +depend() { + use net +} + +start_pre() { + checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}" + if [ ! -f ${config_file} ]; then + eerror "Missing configuration file ${config_file}" + return 1 + fi +} diff --git a/dev-db/mongodb/files/mongodb.logrotate b/dev-db/mongodb/files/mongodb.logrotate new file mode 100644 index 000000000000..f95a438b5b2c --- /dev/null +++ b/dev-db/mongodb/files/mongodb.logrotate @@ -0,0 +1,13 @@ +# Default log rotation / compression keeps 1 year of logs. +/var/log/mongodb/*.log { + daily + rotate 365 + dateext + copytruncate + delaycompress + compress + notifempty + extension gz + sharedscripts + missingok +} diff --git a/dev-db/mongodb/files/mongodb.service b/dev-db/mongodb/files/mongodb.service new file mode 100644 index 000000000000..78d551183838 --- /dev/null +++ b/dev-db/mongodb/files/mongodb.service @@ -0,0 +1,10 @@ +[Unit] +Description=High-performance, schema-free document-oriented database +After=network.target + +[Service] +User=mongodb +ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf + +[Install] +WantedBy=multi-user.target diff --git a/dev-db/mongodb/files/mongos.conf-r2 b/dev-db/mongodb/files/mongos.conf-r2 new file mode 100644 index 000000000000..fc0068962cfd --- /dev/null +++ b/dev-db/mongodb/files/mongos.conf-r2 @@ -0,0 +1,30 @@ +# !! IMPORTANT !! +# +# This file uses the YAML format as described in the documentation: +# http://docs.mongodb.org/manual/reference/configuration-options/ + +systemLog: + destination: file + path: "/var/log/mongodb/mongos.log" + quiet: true + logAppend: true + +net: + port: 27017 + bindIp: 127.0.0.1 + ssl: + mode: disabled + +#security: + #keyFile: + #clusterAuthMode: + +#sharding: + #configDB: + +# Specifies one of the MongoDB parameters described here: +# http://docs.mongodb.org/manual/reference/parameters/ +# +# You can specify multiple setParameter fields such as: +# setParameter: {enableTestCommands: 1} +#setParameter: diff --git a/dev-db/mongodb/files/mongos.confd b/dev-db/mongodb/files/mongos.confd new file mode 100644 index 000000000000..644cd0a2522d --- /dev/null +++ b/dev-db/mongodb/files/mongos.confd @@ -0,0 +1,16 @@ +# Mongos essentials +MONGOS_EXEC="/usr/bin/mongos" +MONGOS_RUN="/var/run/mongodb" +MONGOS_USER="mongodb" + +# Listen to specified IP, comment this to listen to all +MONGOS_IP="127.0.0.1" + +# Listen to specified port +MONGOS_PORT="27018" + +# 1 to 3 comma separated config servers (mandatory) +MONGOS_CONFIGDB="" + +# Set extra options here +MONGOS_OPTIONS="" diff --git a/dev-db/mongodb/files/mongos.confd-r2 b/dev-db/mongodb/files/mongos.confd-r2 new file mode 100644 index 000000000000..0dc2a189ff67 --- /dev/null +++ b/dev-db/mongodb/files/mongos.confd-r2 @@ -0,0 +1,12 @@ +# !! IMPORTANT !! +# +# This file is ONLY used to override some of the init script configuration. +# +# You should NOT use this file to configure your mongos instance, +# see the /etc/mongos.conf file instead. +# +# Available init script modifiers : +# - config_file : the configuration file to use (default : /etc/mongos.conf) +# - user : the user used to run your mongodb instance (default : mongodb) +# - group : the group used to run your mongodb instance (default : mongodb) +# - run_dir : the run directory for your PID files (default : /run/mongodb) diff --git a/dev-db/mongodb/files/mongos.initd-r1 b/dev-db/mongodb/files/mongos.initd-r1 new file mode 100644 index 000000000000..c72292573a45 --- /dev/null +++ b/dev-db/mongodb/files/mongos.initd-r1 @@ -0,0 +1,50 @@ +#!/sbin/runscript +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net +} + +checkconfig() { + if [ -z "${MONGOS_CONFIGDB}" ]; then + eerror "MONGOS_CONFIGDB is not defined, check your configuration file !" + return 1 + fi + return 0 +} + +start() { + checkconfig || return 1 + + checkpath -d -m 0750 -o "${MONGOS_USER}":mongodb "${MONGOS_RUN}" + + # Listen to MONGOS_IP if configured + [ -z "${MONGOS_IP}" ] || MONGOS_OPTIONS="--bind_ip ${MONGOS_IP} ${MONGOS_OPTIONS}" + + # Baselayout-1 user should use --chuid instead of --user + local USEROPT="--user" + if [ ! -f /etc/init.d/sysfs ]; then + USEROPT="--chuid" + fi + + ebegin "Starting ${SVCNAME}" + start-stop-daemon --background --start --make-pidfile \ + --pidfile ${MONGOS_RUN:-/var/run/mongodb}/${SVCNAME}.pid \ + ${USEROPT} ${MONGOS_USER:-mongodb} \ + --exec ${MONGOS_EXEC:-/usr/bin/mongos} \ + -- \ + --port ${MONGOS_PORT:-27018} \ + --unixSocketPrefix ${MONGOS_RUN:-/var/run/mongodb} \ + --logappend --logpath /var/log/mongodb/${SVCNAME}.log \ + --configdb ${MONGOS_CONFIGDB} \ + ${MONGOS_OPTIONS} + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --pidfile ${MONGOS_RUN:-/var/run/mongodb}/${SVCNAME}.pid + eend $? +} diff --git a/dev-db/mongodb/files/mongos.initd-r2 b/dev-db/mongodb/files/mongos.initd-r2 new file mode 100644 index 000000000000..e8845a0555dc --- /dev/null +++ b/dev-db/mongodb/files/mongos.initd-r2 @@ -0,0 +1,27 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +config_file=${config_file:-/etc/${SVCNAME}.conf} +run_dir=${run_dir:-/run/mongodb} + +command="/usr/bin/mongos" +command_args="--config ${config_file}" +command_background="true" +pidfile=${run_dir}/${SVCNAME}.pid +user=${user:-mongodb} +group=${group:-mongodb} +start_stop_daemon_args="--user ${user} --group ${group}" + +depend() { + use net +} + +start_pre() { + checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}" + if [ ! -f ${config_file} ]; then + eerror "Missing configuration file ${config_file}" + return 1 + fi +} diff --git a/dev-db/mongodb/metadata.xml b/dev-db/mongodb/metadata.xml new file mode 100644 index 000000000000..e184e5dc6d53 --- /dev/null +++ b/dev-db/mongodb/metadata.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>ultrabug@gentoo.org</email> + <name>Alexys Jacob</name> + </maintainer> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Proxy Maintainer. CC on bugs</description> + </maintainer> + <longdescription lang="en"> + MongoDB (from "humongous") is a scalable, high-performance, open source, + schema-free, document-oriented database. Written in C++, MongoDB features: + + MongoDB bridges the gap between key-value stores (which are fast and highly + scalable) and traditional RDBMS systems (which provide structured schemas + and powerful queries). + </longdescription> + <use> + <flag name="mms-agent">Install the MongoDB Monitoring Service agent</flag> + <flag name="sharedclient">build client shared library libmongoclient.so</flag> + <flag name="spidermonkey">Use embedded SpiderMonkey engine + (<pkg>dev-lang/spidermonkey</pkg>) instead of v8</flag> + <flag name="tools">Install the MongoDB tools (mongoimport, mongodump...) + from <pkg>app-admin/mongo-tools</pkg></flag> + </use> +</pkgmetadata> diff --git a/dev-db/mongodb/mongodb-2.4.13.ebuild b/dev-db/mongodb/mongodb-2.4.13.ebuild new file mode 100644 index 000000000000..4a6d5bed92cf --- /dev/null +++ b/dev-db/mongodb/mongodb-2.4.13.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +SCONS_MIN_VERSION="1.2.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" + +inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz + mms-agent? ( http://dev.gentoo.org/~ultrabug/20140409-mms-monitoring-agent.zip )" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="kerberos mms-agent sharedclient spidermonkey ssl static-libs" + +PDEPEND="mms-agent? ( dev-python/pymongo app-arch/unzip )" +RDEPEND=" + >=dev-libs/boost-1.50[threads(+)] + dev-libs/libpcre[cxx] + dev-util/google-perftools[-minimal] + net-libs/libpcap + app-arch/snappy + ssl? ( >=dev-libs/openssl-1.0.1c )" +DEPEND="${RDEPEND} + sys-libs/readline + sys-libs/ncurses + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts=" --disable-warnings-as-errors --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --use-system-tcmalloc" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-boost" + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use sharedclient; then + scons_opts+=" --sharedclient" + fi + + if use spidermonkey; then + scons_opts+=" --usesm" + else + scons_opts+=" --usev8" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.4.11-fix-scons.patch" + epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch" + epatch "${FILESDIR}/${PN}-2.4-fix-v8-pythonpath.patch" + epatch "${FILESDIR}/${PN}-2.4-fix-sasl.patch" + + # bug #462606 + sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die + + # bug #482576 + sed -i -e "/-Werror/d" src/third_party/v8/SConscript || die +} + +src_compile() { + escons ${scons_opts} all +} + +src_install() { + escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr + + use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete + + if ! use spidermonkey; then + pax-mark m "${ED}"/usr/bin/{mongo,mongod} + fi + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd-r1" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s} + systemd_dounit "${FILESDIR}"/${PN}.service + insinto /etc + doins "${FILESDIR}"/${PN}.conf + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + if use mms-agent; then + local MY_PN="mms-agent" + local MY_D="/opt/${MY_PN}" + insinto ${MY_D} + doins "${WORKDIR}/${MY_PN}/"* + fowners -R mongodb:mongodb ${MY_D} + newinitd "${FILESDIR}/${MY_PN}.initd-r1" ${MY_PN} + fi +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} + +src_test() { + escons ${scons_opts} test + "${S}"/test --dbpath=unittest || die +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 2.4 ]]; then + ewarn "You just upgraded from a previous version of mongodb !" + ewarn "Make sure you run 'mongod --upgrade' before using this version." + fi + elog "Journaling is now enabled by default, see /etc/conf.d/${PN}" + if use mms-agent; then + elog "You have to configure MMS Agent yourself :" + elog "Edit the settings.py file in the /opt/mms-agent/ folder." + fi +} diff --git a/dev-db/mongodb/mongodb-2.4.14.ebuild b/dev-db/mongodb/mongodb-2.4.14.ebuild new file mode 100644 index 000000000000..d9c383aec650 --- /dev/null +++ b/dev-db/mongodb/mongodb-2.4.14.ebuild @@ -0,0 +1,150 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +SCONS_MIN_VERSION="1.2.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" + +inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz + mms-agent? ( http://dev.gentoo.org/~ultrabug/20140409-mms-monitoring-agent.zip )" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="kerberos mms-agent sharedclient spidermonkey ssl static-libs" + +PDEPEND="mms-agent? ( dev-python/pymongo app-arch/unzip )" +RDEPEND=" + >=dev-libs/boost-1.50[threads(+)] + dev-libs/libpcre[cxx] + dev-util/google-perftools[-minimal] + net-libs/libpcap + app-arch/snappy + ssl? ( >=dev-libs/openssl-1.0.1c )" +DEPEND="${RDEPEND} + sys-libs/readline + sys-libs/ncurses + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts=" --disable-warnings-as-errors --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --use-system-tcmalloc" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-boost" + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use sharedclient; then + scons_opts+=" --sharedclient" + fi + + if use spidermonkey; then + scons_opts+=" --usesm" + else + scons_opts+=" --usev8" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.4.11-fix-scons.patch" + epatch "${FILESDIR}/${PN}-2.2-r1-fix-boost.patch" + epatch "${FILESDIR}/${PN}-2.4-fix-v8-pythonpath.patch" + epatch "${FILESDIR}/${PN}-2.4-fix-sasl.patch" + + # bug #462606 + sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die + + # bug #482576 + sed -i -e "/-Werror/d" src/third_party/v8/SConscript || die +} + +src_compile() { + escons ${scons_opts} all +} + +src_install() { + escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr + + use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete + + if ! use spidermonkey; then + pax-mark m "${ED}"/usr/bin/{mongo,mongod} + fi + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r1" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd-r1" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd" ${PN/db/s} + systemd_dounit "${FILESDIR}"/${PN}.service + insinto /etc + doins "${FILESDIR}"/${PN}.conf + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + if use mms-agent; then + local MY_PN="mms-agent" + local MY_D="/opt/${MY_PN}" + insinto ${MY_D} + doins "${WORKDIR}/${MY_PN}/"* + fowners -R mongodb:mongodb ${MY_D} + newinitd "${FILESDIR}/${MY_PN}.initd-r1" ${MY_PN} + fi +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} + +src_test() { + escons ${scons_opts} test + "${S}"/test --dbpath=unittest || die +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 2.4 ]]; then + ewarn "You just upgraded from a previous version of mongodb !" + ewarn "Make sure you run 'mongod --upgrade' before using this version." + fi + elog "Journaling is now enabled by default, see /etc/conf.d/${PN}" + if use mms-agent; then + elog "You have to configure MMS Agent yourself :" + elog "Edit the settings.py file in the /opt/mms-agent/ folder." + fi +} diff --git a/dev-db/mongodb/mongodb-2.6.10.ebuild b/dev-db/mongodb/mongodb-2.6.10.ebuild new file mode 100644 index 000000000000..53eff802bc26 --- /dev/null +++ b/dev-db/mongodb/mongodb-2.6.10.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +SCONS_MIN_VERSION="1.2.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz + mms-agent? ( http://dev.gentoo.org/~ultrabug/20140409-mms-monitoring-agent.zip )" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug kerberos mms-agent ssl static-libs" + +PDEPEND="mms-agent? ( dev-python/pymongo app-arch/unzip )" +RDEPEND=" + app-arch/snappy + >=dev-cpp/yaml-cpp-0.5.1 + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.37[cxx] + dev-libs/snowball-stemmer + dev-util/google-perftools[-minimal] + net-libs/libpcap + ssl? ( >=dev-libs/openssl-1.0.1g )" +DEPEND="${RDEPEND} + sys-libs/ncurses + sys-libs/readline + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --disable-warnings-as-errors" + scons_opts+=" --use-system-boost" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-stemmer" + scons_opts+=" --use-system-tcmalloc" + scons_opts+=" --use-system-yaml" + scons_opts+=" --usev8" + + if use debug; then + scons_opts+=" --dbg=on" + fi + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.6.2-fix-scons.patch" + epatch "${FILESDIR}/${PN}-2.4-fix-v8-pythonpath.patch" + epatch "${FILESDIR}/${PN}-2.6.10-fix-boost-1.57.patch" + + # fix yaml-cpp detection + sed -i -e "s/\[\"yaml\"\]/\[\"yaml-cpp\"\]/" SConstruct || die + + # bug #462606 + sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die + + # bug #482576 + sed -i -e "/-Werror/d" src/third_party/v8/SConscript || die +} + +src_configure() { + # filter some problematic flags + filter-flags "-march=*" + filter-flags -O? +} + +src_compile() { + escons ${scons_opts} all +} + +src_install() { + escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr + + use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s} + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r2" ${PN}.conf + newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} + + if use mms-agent; then + local MY_PN="mms-agent" + local MY_D="/opt/${MY_PN}" + + insinto /etc + newins "${WORKDIR}/${MY_PN}/settings.py" mms-agent.conf + rm "${WORKDIR}/${MY_PN}/settings.py" + + insinto ${MY_D} + doins "${WORKDIR}/${MY_PN}/"* + dosym /etc/mms-agent.conf ${MY_D}/settings.py + + fowners -R mongodb:mongodb ${MY_D} + newinitd "${FILESDIR}/${MY_PN}.initd-r2" ${MY_PN} + fi +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} + +src_test() { + escons ${scons_opts} test + "${S}"/test --dbpath=unittest || die +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 2.6 ]]; then + ewarn "!! IMPORTANT !!" + ewarn " " + ewarn "${PN} configuration files have changed !" + ewarn " " + ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf" + ewarn " http://docs.mongodb.org/manual/reference/configuration-options/" + ewarn " " + ewarn "Make sure you also follow the upgrading process :" + ewarn " http://docs.mongodb.org/master/release-notes/2.6-upgrade/" + ewarn " " + if use mms-agent; then + ewarn "MMS Agent configuration file has been moved to :" + ewarn " /etc/mms-agent.conf" + fi + else + if use mms-agent; then + elog "Edit your MMS Agent configuration file :" + elog " /etc/mms-agent.conf" + fi + fi +} diff --git a/dev-db/mongodb/mongodb-2.6.8.ebuild b/dev-db/mongodb/mongodb-2.6.8.ebuild new file mode 100644 index 000000000000..1ffaa5914404 --- /dev/null +++ b/dev-db/mongodb/mongodb-2.6.8.ebuild @@ -0,0 +1,180 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +SCONS_MIN_VERSION="1.2.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz + mms-agent? ( http://dev.gentoo.org/~ultrabug/20140409-mms-monitoring-agent.zip )" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug kerberos mms-agent ssl static-libs" + +PDEPEND="mms-agent? ( dev-python/pymongo app-arch/unzip )" +RDEPEND=" + app-arch/snappy + >=dev-cpp/yaml-cpp-0.5.1 + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + dev-libs/snowball-stemmer + dev-util/google-perftools[-minimal] + net-libs/libpcap + ssl? ( >=dev-libs/openssl-1.0.1g )" +DEPEND="${RDEPEND} + sys-libs/ncurses + sys-libs/readline + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --disable-warnings-as-errors" + scons_opts+=" --use-system-boost" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-stemmer" + scons_opts+=" --use-system-tcmalloc" + scons_opts+=" --use-system-yaml" + scons_opts+=" --usev8" + + if use debug; then + scons_opts+=" --dbg=on" + fi + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.6.2-fix-scons.patch" + epatch "${FILESDIR}/${PN}-2.4-fix-v8-pythonpath.patch" + epatch "${FILESDIR}/${PN}-2.6.10-fix-boost-1.57.patch" + + # fix yaml-cpp detection + sed -i -e "s/\[\"yaml\"\]/\[\"yaml-cpp\"\]/" SConstruct || die + + # bug #462606 + sed -i -e "s@\$INSTALL_DIR/lib@\$INSTALL_DIR/$(get_libdir)@g" src/SConscript.client || die + + # bug #482576 + sed -i -e "/-Werror/d" src/third_party/v8/SConscript || die +} + +src_configure() { + # filter some problematic flags + filter-flags "-march=*" + filter-flags -O? +} + +src_compile() { + escons ${scons_opts} all +} + +src_install() { + escons ${scons_opts} --full --nostrip install --prefix="${ED}"/usr + + use static-libs || find "${ED}"/usr/ -type f -name "*.a" -delete + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s} + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r2" ${PN}.conf + newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} + + if use mms-agent; then + local MY_PN="mms-agent" + local MY_D="/opt/${MY_PN}" + + insinto /etc + newins "${WORKDIR}/${MY_PN}/settings.py" mms-agent.conf + rm "${WORKDIR}/${MY_PN}/settings.py" + + insinto ${MY_D} + doins "${WORKDIR}/${MY_PN}/"* + dosym /etc/mms-agent.conf ${MY_D}/settings.py + + fowners -R mongodb:mongodb ${MY_D} + newinitd "${FILESDIR}/${MY_PN}.initd-r2" ${MY_PN} + fi +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} + +src_test() { + escons ${scons_opts} test + "${S}"/test --dbpath=unittest || die +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 2.6 ]]; then + ewarn "!! IMPORTANT !!" + ewarn " " + ewarn "${PN} configuration files have changed !" + ewarn " " + ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf" + ewarn " http://docs.mongodb.org/manual/reference/configuration-options/" + ewarn " " + ewarn "Make sure you also follow the upgrading process :" + ewarn " http://docs.mongodb.org/master/release-notes/2.6-upgrade/" + ewarn " " + if use mms-agent; then + ewarn "MMS Agent configuration file has been moved to :" + ewarn " /etc/mms-agent.conf" + fi + else + if use mms-agent; then + elog "Edit your MMS Agent configuration file :" + elog " /etc/mms-agent.conf" + fi + fi +} diff --git a/dev-db/mongodb/mongodb-3.0.4.ebuild b/dev-db/mongodb/mongodb-3.0.4.ebuild new file mode 100644 index 000000000000..3151cfe7e1f9 --- /dev/null +++ b/dev-db/mongodb/mongodb-3.0.4.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +SCONS_MIN_VERSION="2.3.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug kerberos mms-agent ssl +tools" + +RDEPEND="app-arch/snappy + >=dev-cpp/yaml-cpp-0.5.1 + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + dev-libs/snowball-stemmer + dev-util/google-perftools[-minimal] + net-libs/libpcap + sys-libs/zlib + mms-agent? ( app-admin/mms-agent ) + ssl? ( >=dev-libs/openssl-1.0.1g:= )" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.8.2:* + sys-libs/ncurses + sys-libs/readline + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX)" + scons_opts+=" --disable-warnings-as-errors" + scons_opts+=" --use-system-boost" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-stemmer" + scons_opts+=" --use-system-tcmalloc" + scons_opts+=" --use-system-yaml" + + if use debug; then + scons_opts+=" --dbg=on" + fi + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.0.0-fix-scons.patch" +} + +src_compile() { + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi + escons ${scons_opts} core tools +} + +src_install() { + escons ${scons_opts} --nostrip install --prefix="${ED}"/usr + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s} + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf + newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} + +src_test() { + escons ${scons_opts} dbtest + "${S}"/dbtest --dbpath=unittest || die "dbtest failed" + escons ${scons_opts} smokeCppUnittests --smokedbprefix="smokecpptest" || die "smokeCppUnittests tests failed" +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then + ewarn "!! IMPORTANT !!" + ewarn " " + ewarn "${PN} configuration files have changed !" + ewarn " " + ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf" + ewarn " http://docs.mongodb.org/manual/reference/configuration-options/" + ewarn " " + ewarn "Make sure you also follow the upgrading process :" + ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/" + ewarn " " + ewarn "MongoDB 3.0 introduces the WiredTiger storage engine." + ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it." + ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf" + ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger" + fi +} diff --git a/dev-db/mongodb/mongodb-3.0.5.ebuild b/dev-db/mongodb/mongodb-3.0.5.ebuild new file mode 100644 index 000000000000..7fa4bb104e6a --- /dev/null +++ b/dev-db/mongodb/mongodb-3.0.5.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +SCONS_MIN_VERSION="2.3.0" +CHECKREQS_DISK_BUILD="2400M" +CHECKREQS_DISK_USR="512M" +CHECKREQS_MEMORY="1024M" + +inherit eutils flag-o-matic multilib pax-utils scons-utils systemd user versionator check-reqs + +MY_P=${PN}-src-r${PV/_rc/-rc} + +DESCRIPTION="A high-performance, open source, schema-free document-oriented database" +HOMEPAGE="http://www.mongodb.org" +SRC_URI="http://downloads.mongodb.org/src/${MY_P}.tar.gz" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug kerberos mms-agent ssl +tools" + +RDEPEND="app-arch/snappy + >=dev-cpp/yaml-cpp-0.5.1 + >=dev-libs/boost-1.57[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + dev-libs/snowball-stemmer + net-libs/libpcap + sys-libs/zlib + mms-agent? ( app-admin/mms-agent ) + ssl? ( >=dev-libs/openssl-1.0.1g:= )" +DEPEND="${RDEPEND} + >=sys-devel/gcc-4.8.2:* + sys-libs/ncurses + sys-libs/readline + kerberos? ( dev-libs/cyrus-sasl[kerberos] )" +PDEPEND="tools? ( >=app-admin/mongo-tools-${PV} )" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup mongodb + enewuser mongodb -1 -1 /var/lib/${PN} mongodb + + # Maintainer notes + # + # --use-system-tcmalloc is strongly NOT recommended: + # https://www.mongodb.org/about/contributors/tutorial/build-mongodb-from-source/ + # + # --c++11 is required by scons instead of auto detection: + # https://jira.mongodb.org/browse/SERVER-19661 + + scons_opts="--variant-dir=build --cc=$(tc-getCC) --cxx=$(tc-getCXX) --c++11" + scons_opts+=" --disable-warnings-as-errors" + scons_opts+=" --use-system-boost" + scons_opts+=" --use-system-pcre" + scons_opts+=" --use-system-snappy" + scons_opts+=" --use-system-stemmer" + scons_opts+=" --use-system-yaml" + + if use debug; then + scons_opts+=" --dbg=on" + fi + + if use prefix; then + scons_opts+=" --cpppath=${EPREFIX}/usr/include" + scons_opts+=" --libpath=${EPREFIX}/usr/$(get_libdir)" + fi + + if use kerberos; then + scons_opts+=" --use-sasl-client" + fi + + if use ssl; then + scons_opts+=" --ssl" + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-3.0.0-fix-scons.patch" +} + +src_compile() { + # respect mongoDB upstream's basic recommendations + # see bug #536688 and #526114 + if ! use debug; then + filter-flags '-m*' + filter-flags '-O?' + fi + escons ${scons_opts} core tools +} + +src_install() { + escons ${scons_opts} --nostrip install --prefix="${ED}"/usr + + for x in /var/{lib,log}/${PN}; do + keepdir "${x}" + fowners mongodb:mongodb "${x}" + done + + doman debian/mongo*.1 + dodoc README docs/building.md + + newinitd "${FILESDIR}/${PN}.initd-r2" ${PN} + newconfd "${FILESDIR}/${PN}.confd-r2" ${PN} + newinitd "${FILESDIR}/${PN/db/s}.initd-r2" ${PN/db/s} + newconfd "${FILESDIR}/${PN/db/s}.confd-r2" ${PN/db/s} + + insinto /etc + newins "${FILESDIR}/${PN}.conf-r3" ${PN}.conf + newins "${FILESDIR}/${PN/db/s}.conf-r2" ${PN/db/s}.conf + + systemd_dounit "${FILESDIR}/${PN}.service" + + insinto /etc/logrotate.d/ + newins "${FILESDIR}/${PN}.logrotate" ${PN} + + # see bug #526114 + pax-mark emr "${ED}"/usr/bin/{mongo,mongod,mongos} +} + +pkg_preinst() { + # wrt bug #461466 + if [[ "$(get_libdir)" == "lib64" ]]; then + rmdir "${ED}"/usr/lib/ &>/dev/null + fi +} + +src_test() { + escons ${scons_opts} dbtest + "${S}"/dbtest --dbpath=unittest || die "dbtest failed" + escons ${scons_opts} smokeCppUnittests --smokedbprefix="smokecpptest" || die "smokeCppUnittests tests failed" +} + +pkg_postinst() { + if [[ ${REPLACING_VERSIONS} < 3.0 ]]; then + ewarn "!! IMPORTANT !!" + ewarn " " + ewarn "${PN} configuration files have changed !" + ewarn " " + ewarn "Make sure you migrate from /etc/conf.d/${PN} to the new YAML standard in /etc/${PN}.conf" + ewarn " http://docs.mongodb.org/manual/reference/configuration-options/" + ewarn " " + ewarn "Make sure you also follow the upgrading process :" + ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/" + ewarn " " + ewarn "MongoDB 3.0 introduces the WiredTiger storage engine." + ewarn "WiredTiger is incompatible with MMAPv1 and you need to dump/reload your data if you want to use it." + ewarn "Once you have your data dumped, you need to set storage.engine: wiredTiger in /etc/${PN}.conf" + ewarn " http://docs.mongodb.org/master/release-notes/3.0-upgrade/#change-storage-engine-to-wiredtiger" + fi +} diff --git a/dev-db/mtop/Manifest b/dev-db/mtop/Manifest new file mode 100644 index 000000000000..85b6b635cbb4 --- /dev/null +++ b/dev-db/mtop/Manifest @@ -0,0 +1 @@ +DIST mtop-0.6.6.tar.gz 48161 SHA256 2e7fc09511d2d0f130da1f52bf85fcfeea0be2cc3aa3d93b88498605c0281d74 SHA512 9befb1d44ef537c4abe0246ebbf20019499875d7e8efeac2fd1cf068dc577c2809bb0333ebf633982852446a0160d73ccfa0006dcfa42f7d95bbbf765f12ce17 WHIRLPOOL 7f85fa504882a789eb78919aa63084db2f7555a4d584b4a04f0183e92da7750f417357ab40b4558fcb928d6c8e6af0157888ad59186cdb3d0bdf82bc093d96ed diff --git a/dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch b/dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch new file mode 100644 index 000000000000..1d10acc42a99 --- /dev/null +++ b/dev-db/mtop/files/mtop-0.6.6-globalstatusfix.patch @@ -0,0 +1,12 @@ +diff -ur mtop-0.6.6/work/mtop-0.6.6/mtop.PL mtop-0.6.6-r1/work/mtop-0.6.6/mtop.PL +--- mtop-0.6.6/work/mtop-0.6.6/mtop.PL 2004-09-13 00:22:03.000000000 +0200 ++++ mtop-0.6.6-r1/work/mtop-0.6.6/mtop.PL 2009-12-08 15:04:56.000000000 +0100 +@@ -568,7 +568,7 @@ + die "Unable to connect to mysql [", $DBI::errstr, "]\n"; + + my $st_procs = $dbh->prepare("show full processlist"); +-my $st_status = $dbh->prepare("show status"); ++my $st_status = $dbh->prepare("show global status"); + my $st_kill = $dbh->prepare("kill ?"); + my $st_flush = $dbh->prepare("flush status"); + my $st_vars = $dbh->prepare("show variables"); diff --git a/dev-db/mtop/metadata.xml b/dev-db/mtop/metadata.xml new file mode 100644 index 000000000000..69b243a45bee --- /dev/null +++ b/dev-db/mtop/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mysql</herd> + <upstream> + <remote-id type="sourceforge">mtop</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mtop/mtop-0.6.6-r3.ebuild b/dev-db/mtop/mtop-0.6.6-r3.ebuild new file mode 100644 index 000000000000..c483ea566ba4 --- /dev/null +++ b/dev-db/mtop/mtop-0.6.6-r3.ebuild @@ -0,0 +1,34 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit perl-module + +DESCRIPTION="Mysql top monitors a MySQL server" +HOMEPAGE="http://mtop.sourceforge.net" +SRC_URI="mirror://sourceforge/mtop/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" +DEPEND="dev-perl/Curses + dev-perl/DBI + dev-perl/DBD-mysql + virtual/perl-libnet" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/mtop-0.6.6-globalstatusfix.patch ) +DOCS=( ChangeLog README README.devel ) + +warnmsg() { + einfo "Upstream no longer maintains mtop. You should consider dev-db/mytop instead." +} + +pkg_postinst() { + warnmsg +} + +pkg_preinst() { + warnmsg +} diff --git a/dev-db/mydumper/Manifest b/dev-db/mydumper/Manifest new file mode 100644 index 000000000000..65f8cf4f41e7 --- /dev/null +++ b/dev-db/mydumper/Manifest @@ -0,0 +1 @@ +DIST mydumper-0.6.2.tar.gz 40165 SHA256 fa28563e8967752828954c5d81e26ef50aad9083d50a977bf5733833b23e3330 SHA512 ef9e48cc481f2674456659c061c45f3cb056180ab5576805e75d458658e94998758b894e45ddc06fb716c1d37fedefb644158f07cf6e77f4b5477663e954eb83 WHIRLPOOL 867b7efa6ca00dcfbb32f5dda2b63de038d0da3ac1a127059cbfdae9af577fef74868c38dad2bd5b5a9b4de76f7d108fcb6232b27c41d3062f413eac4cac843b diff --git a/dev-db/mydumper/metadata.xml b/dev-db/mydumper/metadata.xml new file mode 100644 index 000000000000..5ff5cf8ca05f --- /dev/null +++ b/dev-db/mydumper/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>pavel.stratil-jun@fenix.cz</email> + <description>Proxied co-maintainer, assign bugs to him</description> + </maintainer> + <maintainer> + <email>flameeyes@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="launchpad">mydumper</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mydumper/mydumper-0.6.2.ebuild b/dev-db/mydumper/mydumper-0.6.2.ebuild new file mode 100644 index 000000000000..beedabda0b94 --- /dev/null +++ b/dev-db/mydumper/mydumper-0.6.2.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit cmake-utils versionator + +DESCRIPTION="A high-performance multi-threaded backup (and restore) toolset for MySQL and Drizzle" +HOMEPAGE="https://launchpad.net/mydumper" +SRC_URI="http://launchpad.net/mydumper/$(get_version_component_range 1-2)/${PV}/+download/${P}.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +RDEPEND="dev-libs/libpcre + virtual/mysql + dev-libs/glib:2" +DEPEND="${RDEPEND} + virtual/pkgconfig + doc? ( <dev-python/sphinx-1.3 )" + +DOCS=( README ) + +src_prepare() { + # respect user cflags; do not expand ${CMAKE_C_FLAGS} (!) + sed -i -e 's:-Werror -O3 -g:${CMAKE_C_FLAGS}:' CMakeLists.txt + # fix doc install path + sed -i -e "s:share/doc/mydumper:share/doc/${PF}:" docs/CMakeLists.txt +} + +src_configure() { + mycmakeargs=( $(cmake-utils_use doc BUILD_DOCS) ) + + cmake-utils_src_configure +} diff --git a/dev-db/myodbc/Manifest b/dev-db/myodbc/Manifest new file mode 100644 index 000000000000..42f54f28a417 --- /dev/null +++ b/dev-db/myodbc/Manifest @@ -0,0 +1 @@ +DIST mysql-connector-odbc-5.2.7-src.tar.gz 606472 SHA256 0ad8fcccb4c41c7100fe02ec0aa87938d33329d23f7b68d1b9031c87750392c9 SHA512 f54ac8a23ade71da85e1335e95eccdccfd68a8687d17a584ced103812bdc5aee8014769a84eaa22724bb2cb23d34c7188c964d3283723defeaef5157a4b3c60f WHIRLPOOL 928808ac5b623ec345c8c1b8495ca1de7f10e65f0d14720e9bee6ab154ccf818ca690745a57fa7fa1c008ba57b24705657398cd9146fbf2e385c178deca0e499 diff --git a/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch new file mode 100644 index 000000000000..6cfe7cd274b3 --- /dev/null +++ b/dev-db/myodbc/files/5.2.7-mariadb-dynamic-array.patch @@ -0,0 +1,79 @@ +diff -aurN a/driver/catalog_no_i_s.c b/driver/catalog_no_i_s.c +--- a/driver/catalog_no_i_s.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/catalog_no_i_s.c 2014-08-20 14:08:33.997339096 -0400 +@@ -1093,7 +1093,11 @@ + unsigned long *lengths; + SQLRETURN rc= SQL_SUCCESS; + ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0, MYF(0)); ++#else + my_init_dynamic_array(&records, sizeof(MY_FOREIGN_KEY_FIELD), 0, 0); ++#endif + + /* Get the list of tables that match szCatalog and szTable */ + pthread_mutex_lock(&stmt->dbc->lock); +diff -aurN a/driver/desc.c b/driver/desc.c +--- a/driver/desc.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/desc.c 2014-08-20 14:07:37.409169269 -0400 +@@ -63,8 +63,12 @@ + but in desc_get_rec we manually get a pointer to it. This avoids + having to call set_dynamic after modifying the DESCREC. + */ ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0, MYF(0))) ++#else + if (my_init_dynamic_array(&desc->records, sizeof(DESCREC), 0, 0)) ++#endif + { + x_free((char *)desc); + return NULL; + } +@@ -995,9 +1003,15 @@ + + /* copy the records */ + delete_dynamic(&dest->records); ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ if (my_init_dynamic_array(&dest->records, sizeof(DESCREC), ++ src->records.max_element, ++ src->records.alloc_increment, MYF(0))) ++#else + if (my_init_dynamic_array(&dest->records, sizeof(DESCREC), + src->records.max_element, + src->records.alloc_increment)) ++#endif + { + return set_desc_error(dest, "HY001", + "Memory allocation error", +diff -aurN a/driver/handle.c b/driver/handle.c +--- a/driver/handle.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/handle.c 2014-08-20 14:05:00.364248403 -0400 +@@ -403,7 +403,11 @@ + } + } + ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10, MYF(0)); ++#else + my_init_dynamic_array(*param_bind, sizeof(MYSQL_BIND), elements, 10); ++#endif + memset((*param_bind)->buffer, 0, sizeof(MYSQL_BIND) * + (*param_bind)->max_element); + +diff -aurN a/driver/parse.c b/driver/parse.c +--- a/driver/parse.c 2014-06-18 18:50:16.000000000 -0400 ++++ b/driver/parse.c 2014-08-20 14:03:54.336383876 -0400 +@@ -129,8 +129,13 @@ + + /* TODO: Store offsets rather than ptrs. In this case we will be fine + if work with copy of the originally parsed string */ ++#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID > 100001 ++ my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10, MYF(0)); ++ my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10, MYF(0)); ++#else + my_init_dynamic_array(&pq->token, sizeof(uint), 20, 10); + my_init_dynamic_array(&pq->param_pos, sizeof(uint), 10, 10); ++#endif + } + + return pq; diff --git a/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch new file mode 100644 index 000000000000..2bdb4a581c89 --- /dev/null +++ b/dev-db/myodbc/files/5.2.7-r1-cxxlinkage.patch @@ -0,0 +1,40 @@ +diff -uarN a/cmake/FindMySQL.cmake b/cmake/FindMySQL.cmake +--- a/cmake/FindMySQL.cmake 2014-06-18 18:50:16.000000000 -0400 ++++ b/cmake/FindMySQL.cmake 2014-08-20 10:05:00.191485304 -0400 +@@ -105,16 +105,16 @@ + # Finally remove the dot + STRING(REGEX REPLACE "[.]" "" MYSQL_NUM_VERSION "${MYSQL_NUM_VERSION}") + +- IF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ IF(MYSQL_CXX_LINKAGE) + EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cxxflags" + OUTPUT_VARIABLE _mysql_config_output + ) + SET(MYSQL_CXX_LINKAGE 1) +- ELSE (MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ ELSE (MYSQL_CXX_LINKAGE) + EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags" + OUTPUT_VARIABLE _mysql_config_output + ) +- ENDIF(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ ENDIF(MYSQL_CXX_LINKAGE) + + # Remove the stl4port dependency + STRING(REGEX REPLACE "-library=stlport4" "" _mysql_config_output "${_mysql_config_output}") +diff -aurN mysql-connector-odbc-5.2.7-src.orig/CMakeLists.txt mysql-connector-odbc-5.2.7-src/CMakeLists.txt +--- a/CMakeLists.txt 2014-08-27 13:51:27.050553560 -0400 ++++ b/CMakeLists.txt 2014-08-27 13:55:41.702359680 -0400 +@@ -256,10 +256,9 @@ + SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_BINARY_DIR}/bin") + SET(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib") + +-SET(LIB_SUBDIR "lib") +-IF(RPM_BUILD AND CMAKE_SYSTEM_PROCESSOR MATCHES "(x86_64|ppc64|ppc64p7|s390x|sparc64)") +- SET(LIB_SUBDIR "lib64") +-ENDIF() ++IF(NOT LIB_SUBDIR) ++ MESSAGE(ERROR "LIB_SUBDIR is not set") ++ENDIF(NOT LIB_SUBDIR) + MESSAGE(STATUS "Installation library subdir: ${LIB_SUBDIR}") + + INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}) diff --git a/dev-db/myodbc/files/cmake-doc-path.patch b/dev-db/myodbc/files/cmake-doc-path.patch new file mode 100644 index 000000000000..c7f7d9d37ce7 --- /dev/null +++ b/dev-db/myodbc/files/cmake-doc-path.patch @@ -0,0 +1,43 @@ +=== modified file 'CMakeLists.txt' +--- CMakeLists.txt 2013-03-09 09:51:06 +0000 ++++ CMakeLists.txt 2013-03-09 11:05:27 +0000 +@@ -33,6 +33,12 @@ + SET(CONNECTOR_MAJOR "5") + SET(CONNECTOR_MINOR "2") + ++IF(WITH_DOCUMENTATION_INSTALL_PATH) ++ set(DOCUMENTATION_INSTALL_PATH ${WITH_DOCUMENTATION_INSTALL_PATH}) ++ELSE(WITH_DOCUMENTATION_INSTALL_PATH) ++ set(DOCUMENTATION_INSTALL_PATH ${CMAKE_INSTALL_PREFIX}/share/doc/myodbc-${CONNECTOR_MAJOR}.${CONNECTOR_MINOR}) ++ENDIF(WITH_DOCUMENTATION_INSTALL_PATH) ++ + IF(CONNECTOR_MINOR LESS 10) + SET(CONNECTOR_MINOR_PADDED "0${CONNECTOR_MINOR}") + ELSE(CONNECTOR_MINOR LESS 10) +@@ -329,19 +335,17 @@ + + ELSE(WIN32) + +- INSTALL(FILES ChangeLog DESTINATION .) +- INSTALL(FILES README DESTINATION .) +- INSTALL(FILES README.debug DESTINATION .) +- INSTALL(FILES INSTALL DESTINATION .) ++ INSTALL(FILES ChangeLog DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES README DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES README.debug DESTINATION ${DOCUMENTATION_INSTALL_PATH}) ++ INSTALL(FILES INSTALL DESTINATION ${DOCUMENTATION_INSTALL_PATH}) + IF(EXISTS "${CMAKE_SOURCE_DIR}/COPYING") +- INSTALL(FILES COPYING DESTINATION .) + ELSE() +- INSTALL(FILES LICENSE.mysql DESTINATION .) + ENDIF() + + ENDIF(WIN32) + +-INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION .) ++INSTALL(FILES Licenses_for_Third-Party_Components.txt DESTINATION ${DOCUMENTATION_INSTALL_PATH}) + + INCLUDE(CPack) + + + diff --git a/dev-db/myodbc/files/odbc.ini.m4 b/dev-db/myodbc/files/odbc.ini.m4 new file mode 100644 index 000000000000..8783f4e1c7d6 --- /dev/null +++ b/dev-db/myodbc/files/odbc.ini.m4 @@ -0,0 +1,18 @@ +# $Id$ +# vim:ts=4 noexpandtab ft=dosini: +# +[ODBC Data Sources] +__PN__-test = MySQL ODBC __PF__ Driver Testing DSN + +# see http://www.mysql.com/products/myodbc/faq_toc.html +# for details about the following entry +[__PN__-test] +Description = MySQL ODBC __PF__ Driver Testing DSN +Driver = __PN__ +Socket = /var/run/mysqld/mysqld.sock +Server = localhost +User = root +Database = test +Option = 3 +#Port = +#Password = diff --git a/dev-db/myodbc/files/odbcinst.ini.m4 b/dev-db/myodbc/files/odbcinst.ini.m4 new file mode 100644 index 000000000000..7b3c8fc5e551 --- /dev/null +++ b/dev-db/myodbc/files/odbcinst.ini.m4 @@ -0,0 +1,6 @@ +# $Id$ +# vim:ts=4 noexpandtab ft=dosini: +# +[__PN__] +Description = MySQL ODBC __PF__ Driver +Driver = /usr/lib/libmyodbc3.so diff --git a/dev-db/myodbc/metadata.xml b/dev-db/myodbc/metadata.xml new file mode 100644 index 000000000000..716e7d4301bd --- /dev/null +++ b/dev-db/myodbc/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +</pkgmetadata> diff --git a/dev-db/myodbc/myodbc-5.2.7-r1.ebuild b/dev-db/myodbc/myodbc-5.2.7-r1.ebuild new file mode 100644 index 000000000000..59c2005b55ce --- /dev/null +++ b/dev-db/myodbc/myodbc-5.2.7-r1.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit cmake-multilib eutils flag-o-matic versionator + +MAJOR="$(get_version_component_range 1-2 $PV)" +MY_PN="mysql-connector-odbc" +MY_P="${MY_PN}-${PV/_p/r}-src" + +DESCRIPTION="ODBC driver for MySQL" +HOMEPAGE="http://www.mysql.com/products/myodbc/" +SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz" +RESTRICT="primaryuri" + +LICENSE="GPL-2" +SLOT="${MAJOR}" +KEYWORDS="amd64 ppc x86" +IUSE="" + +RDEPEND=" + dev-db/unixODBC[${MULTILIB_USEDEP}] + >=virtual/mysql-5.5[${MULTILIB_USEDEP}] + abi_x86_32? ( + !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] + ) +" +DEPEND="${RDEPEND}" +S=${WORKDIR}/${MY_P} + +# Careful! +DRIVER_NAME="${PN}-${SLOT}" + +src_prepare() { + # Remove Tests + sed -i -e "s/ADD_SUBDIRECTORY(test)//" \ + "${S}/CMakeLists.txt" + + # Fix as-needed on the installer binary + echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt" + + # Patch document path so it doesn't install files to /usr + epatch "${FILESDIR}/cmake-doc-path.patch" \ + "${FILESDIR}/${PVR}-cxxlinkage.patch" \ + "${FILESDIR}/${PV}-mariadb-dynamic-array.patch" +} + +multilib_src_configure() { + # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64" + # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB + mycmakeargs+=( + -DMYSQL_CXX_LINKAGE=0 + -DWITH_UNIXODBC=1 + -DMYSQLCLIENT_LIB_NAME="libmysqlclient_r.so" + -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF} + -DMYSQL_LIB_DIR="${ROOT}/usr/$(get_libdir)" + -DLIB_SUBDIR="$(get_libdir)" + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + debug-print-function ${FUNCNAME} "$@" + + dodir /usr/share/${PN}-${SLOT} + for i in odbc.ini odbcinst.ini; do + einfo "Building $i" + sed \ + -e "s,__PN__,${DRIVER_NAME},g" \ + -e "s,__PF__,${MAJOR},g" \ + -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \ + >"${D}"/usr/share/${PN}-${SLOT}/${i} \ + <"${FILESDIR}"/${i}.m4 \ + || die "Failed to build $i" + done; + mv "${D}/usr/bin/myodbc-installer" \ + "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary" +} + +pkg_config() { + + [ "${ROOT}" != "/" ] && \ + die 'Sorry, non-standard ROOT setting is not supported :-(' + + local msg='MySQL ODBC driver' + local drivers=$(/usr/bin/odbcinst -q -d) + + if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then + ebegin "Installing ${msg}" + /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini + rc=$? + eend $rc + [ $rc -ne 0 ] && die + else + einfo "Skipping already installed ${msg}" + fi + + local sources=$(/usr/bin/odbcinst -q -s) + msg='sample MySQL ODBC DSN' + if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then + ebegin "Installing ${msg}" + /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini + rc=$? + eend $rc + [ $rc -ne 0 ] && die + else + einfo "Skipping already installed ${msg}" + fi +} + +pkg_postinst() { + + elog "If this is a new install, please run the following command" + elog "to configure the MySQL ODBC drivers and sources:" + elog "emerge --config =${CATEGORY}/${PF}" + elog "Please note that the driver name used to form the DSN now includes the SLOT." + elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}" +} diff --git a/dev-db/myodbc/myodbc-5.2.7-r2.ebuild b/dev-db/myodbc/myodbc-5.2.7-r2.ebuild new file mode 100644 index 000000000000..cf7133d47176 --- /dev/null +++ b/dev-db/myodbc/myodbc-5.2.7-r2.ebuild @@ -0,0 +1,121 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit cmake-multilib eutils flag-o-matic versionator + +MAJOR="$(get_version_component_range 1-2 $PV)" +MY_PN="mysql-connector-odbc" +MY_P="${MY_PN}-${PV/_p/r}-src" + +DESCRIPTION="ODBC driver for MySQL" +HOMEPAGE="http://www.mysql.com/products/myodbc/" +SRC_URI="mirror://mysql/Downloads/Connector-ODBC/${MAJOR}/${MY_P}.tar.gz" +RESTRICT="primaryuri" + +LICENSE="GPL-2" +SLOT="${MAJOR}" +KEYWORDS="~amd64 ~ppc ~x86" +IUSE="" + +# Does not build with mysql-connector-c +RDEPEND=" + dev-db/unixODBC[${MULTILIB_USEDEP}] + ~virtual/libmysqlclient-18[${MULTILIB_USEDEP}] + abi_x86_32? ( + !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] + ) + !dev-db/mysql-connector-c +" +DEPEND="${RDEPEND}" +S=${WORKDIR}/${MY_P} + +# Careful! +DRIVER_NAME="${PN}-${SLOT}" + +src_prepare() { + # Remove Tests + sed -i -e "s/ADD_SUBDIRECTORY(test)//" \ + "${S}/CMakeLists.txt" + + # Fix as-needed on the installer binary + echo "TARGET_LINK_LIBRARIES(myodbc-installer odbc)" >> "${S}/installer/CMakeLists.txt" + + # Patch document path so it doesn't install files to /usr + epatch "${FILESDIR}/cmake-doc-path.patch" \ + "${FILESDIR}/${PVR}-cxxlinkage.patch" \ + "${FILESDIR}/${PV}-mariadb-dynamic-array.patch" +} + +multilib_src_configure() { + # The RPM_BUILD flag does nothing except install to /usr/lib64 when "x86_64" + # MYSQL_CXX_LINKAGE expects "mysql_config --cxxflags" which doesn't exist on MariaDB + mycmakeargs+=( + -DMYSQL_CXX_LINKAGE=0 + -DWITH_UNIXODBC=1 + -DMYSQLCLIENT_LIB_NAME="libmysqlclient_r.so" + -DWITH_DOCUMENTATION_INSTALL_PATH=/usr/share/doc/${PF} + -DMYSQL_LIB_DIR="${ROOT}/usr/$(get_libdir)" + -DLIB_SUBDIR="$(get_libdir)" + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + debug-print-function ${FUNCNAME} "$@" + + dodir /usr/share/${PN}-${SLOT} + for i in odbc.ini odbcinst.ini; do + einfo "Building $i" + sed \ + -e "s,__PN__,${DRIVER_NAME},g" \ + -e "s,__PF__,${MAJOR},g" \ + -e "s,libmyodbc3.so,libmyodbc${SLOT:0:1}a.so,g" \ + >"${D}"/usr/share/${PN}-${SLOT}/${i} \ + <"${FILESDIR}"/${i}.m4 \ + || die "Failed to build $i" + done; + mv "${D}/usr/bin/myodbc-installer" \ + "${D}/usr/bin/myodbc-installer-${MAJOR}" || die "failed to move slotted binary" +} + +pkg_config() { + + [ "${ROOT}" != "/" ] && \ + die 'Sorry, non-standard ROOT setting is not supported :-(' + + local msg='MySQL ODBC driver' + local drivers=$(/usr/bin/odbcinst -q -d) + + if echo $drivers | grep -vq "^\[${DRIVER_NAME}\]$" ; then + ebegin "Installing ${msg}" + /usr/bin/odbcinst -i -d -f /usr/share/${PN}-${SLOT}/odbcinst.ini + rc=$? + eend $rc + [ $rc -ne 0 ] && die + else + einfo "Skipping already installed ${msg}" + fi + + local sources=$(/usr/bin/odbcinst -q -s) + msg='sample MySQL ODBC DSN' + if echo $sources | grep -vq "^\[${DRIVER_NAME}-test\]$"; then + ebegin "Installing ${msg}" + /usr/bin/odbcinst -i -s -l -f /usr/share/${PN}-${SLOT}/odbc.ini + rc=$? + eend $rc + [ $rc -ne 0 ] && die + else + einfo "Skipping already installed ${msg}" + fi +} + +pkg_postinst() { + + elog "If this is a new install, please run the following command" + elog "to configure the MySQL ODBC drivers and sources:" + elog "emerge --config =${CATEGORY}/${PF}" + elog "Please note that the driver name used to form the DSN now includes the SLOT." + elog "The myodbc-install utility is installed as myodbc-install-${MAJOR}" +} diff --git a/dev-db/mysql++/Manifest b/dev-db/mysql++/Manifest new file mode 100644 index 000000000000..97fa3e5a783f --- /dev/null +++ b/dev-db/mysql++/Manifest @@ -0,0 +1,3 @@ +DIST mysql++-2.3.2.tar.gz 1627115 SHA256 3544b964964bc8981118119e82e4883dc9d1de8a72861a19e6687719ed3efce9 SHA512 b546c8369550e541c1a0b1b0e301fdd298a771cb709ad6c6ea3450a8f8bbe7533989a82d1c19cd9bf9a261d7a1fc4c3760919d3d5e3e43b5d698b75b7abf07f7 WHIRLPOOL 2bfc961193baad0053ff9909075db9f5ccfc7c00334483842bc25a94044a1331392f3dc0283bf5f33e69f67c20505bf5b12a01635a0f92716a0c341af5fe637e +DIST mysql++-3.1.0.tar.gz 1944101 SHA256 256c39a583e7d60947916851754c626312428e9b1d8af3309e34d64ff8404e92 SHA512 bb57bbf03c80edabff701132877f407ecfa1b76958d7655415c59ec939e80fbe250951a16c3d5ea6988dd2c778b623605cb65bf810501f392be2f6b6ad07ad90 WHIRLPOOL 0b5274e0fbc1b2cb40ade9699ddc46d5837e66f3a506502f4dae5f5de4689ac2ccf3989a674db073a36075c541046b174e80bbac3d7df393bd61ef3bfc99fd32 +DIST mysql++-3.2.1.tar.gz 2256735 SHA256 aee521873d4dbb816d15f22ee93b6aced789ce4e3ca59f7c114a79cb72f75d20 SHA512 936021dcf8568d3ee0c935e5c552acc6fd2b57849d1cc60e68b45b690d798d7bfbc1dedc04e21417d1b4c27017b471e4f6cb70de7f1904949b9222090a777de9 WHIRLPOOL 56579d4a1afb5985dc8487d211ea7e5aedfe7acfbcd6130b28b07364e66d6b0142831296a6c6ce2f4de78f45e94572c1ef289db41ee504b05d04f3623d48b2aa diff --git a/dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch b/dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch new file mode 100644 index 000000000000..f9456e8f88e5 --- /dev/null +++ b/dev-db/mysql++/files/mysql++-2.3.2-gcc-4.3.patch @@ -0,0 +1,11 @@ +diff -Naur mysql++-2.3.2-orig/lib/const_string.h mysql++-2.3.2/lib/const_string.h +--- mysql++-2.3.2-orig/lib/const_string.h 2008-03-22 16:16:39.000000000 -0600 ++++ mysql++-2.3.2/lib/const_string.h 2008-03-22 16:18:47.000000000 -0600 +@@ -35,6 +35,7 @@ + #include <iostream> + #include <stdexcept> + #include <string> ++#include <cstring> + + namespace mysqlpp { + diff --git a/dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch b/dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch new file mode 100644 index 000000000000..d240761ec7a8 --- /dev/null +++ b/dev-db/mysql++/files/mysql++-3.0-gcc-as-needed.patch @@ -0,0 +1,130 @@ +=== modified file 'lib/refcounted.h' +--- a/lib/refcounted.h 2012-10-18 11:37:55.322732178 -0300 ++++ b/lib/refcounted.h 2012-10-18 11:40:10.303349659 -0300 +@@ -29,6 +29,7 @@ + #define MYSQLPP_REFCOUNTED_H + + #include <memory> ++#include <cstddef> + + namespace mysqlpp { + +=== modified file 'ssx/genv2.cpp' +--- a/ssx/genv2.cpp 2013-02-14 12:29:16.523261203 -0500 ++++ b/ssx/genv2.cpp 2013-02-14 12:29:29.983070930 -0500 +@@ -35,6 +35,7 @@ + #include <iostream> + #include <fstream> + #include <typeinfo> ++#include <cstring> + + using namespace std; + +== modified file 'Makefile.in' +--- a/Makefile.in 2013-02-14 13:14:10.954718894 -0500 ++++ b/Makefile.in 2013-02-14 13:15:23.463679996 -0500 +@@ -471,87 +471,87 @@ + $(RANLIB) $@ + + ssqlsxlat$(EXEEXT): $(SSQLSXLAT_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) $(LIBPREFIX)mysqlpp_ssqls2parse$(LIBEXT) +- $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp -lmysqlpp_ssqls2parse $(LIBS) ++ $(CXX) -o $@ $(SSQLSXLAT_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp -lmysqlpp_ssqls2parse $(LDFLAGS) $(LIBS) + + $(__ssqlsxlat___mac_setfilecmd) + + test_array_index$(EXEEXT): $(TEST_ARRAY_INDEX_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_ARRAY_INDEX_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_array_index___mac_setfilecmd) + + test_cpool$(EXEEXT): $(TEST_CPOOL_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_CPOOL_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_cpool___mac_setfilecmd) + + test_datetime$(EXEEXT): $(TEST_DATETIME_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_DATETIME_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_datetime___mac_setfilecmd) + + test_inttypes$(EXEEXT): $(TEST_INTTYPES_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_INTTYPES_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_inttypes___mac_setfilecmd) + + test_insertpolicy$(EXEEXT): $(TEST_INSERTPOLICY_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_INSERTPOLICY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_insertpolicy___mac_setfilecmd) + + test_manip$(EXEEXT): $(TEST_MANIP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_MANIP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_MANIP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_manip___mac_setfilecmd) + + test_null_comparison$(EXEEXT): $(TEST_NULL_COMPARISON_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_NULL_COMPARISON_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_null_comparison___mac_setfilecmd) + + test_query_copy$(EXEEXT): $(TEST_QUERY_COPY_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_QUERY_COPY_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_query_copy___mac_setfilecmd) + + test_qssqls$(EXEEXT): $(TEST_QSSQLS_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_QSSQLS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_qssqls___mac_setfilecmd) + + test_qstream$(EXEEXT): $(TEST_QSTREAM_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_QSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_qstream___mac_setfilecmd) + + test_sqlstream$(EXEEXT): $(TEST_SQLSTREAM_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_SQLSTREAM_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_sqlstream___mac_setfilecmd) + + test_ssqls2$(EXEEXT): $(TEST_SSQLS2_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) $(LIBPREFIX)mysqlpp_ssqls2parse$(LIBEXT) +- $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp -lmysqlpp_ssqls2parse $(LIBS) ++ $(CXX) -o $@ $(TEST_SSQLS2_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp -lmysqlpp_ssqls2parse $(LDFLAGS) $(LIBS) + + $(__test_ssqls2___mac_setfilecmd) + + test_string$(EXEEXT): $(TEST_STRING_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_STRING_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_STRING_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_string___mac_setfilecmd) + + test_tcp$(EXEEXT): $(TEST_TCP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_TCP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_TCP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_tcp___mac_setfilecmd) + + test_uds$(EXEEXT): $(TEST_UDS_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_UDS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_UDS_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_uds___mac_setfilecmd) + + test_wnp$(EXEEXT): $(TEST_WNP_OBJECTS) $(DLLPREFIX)mysqlpp$(__mysqlpp___targetsuf3) +- $(CXX) -o $@ $(TEST_WNP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ $(LDFLAGS) -lmysqlpp $(LIBS) ++ $(CXX) -o $@ $(TEST_WNP_OBJECTS) -L. -l@MYSQL_C_LIB_NAME@ @PTHREAD_LIBS@ @MYSQLPP_EXTRA_LIBS@ -lmysqlpp $(LDFLAGS) $(LIBS) + + $(__test_wnp___mac_setfilecmd) + diff --git a/dev-db/mysql++/files/mysql++-3.2.1-gold.patch b/dev-db/mysql++/files/mysql++-3.2.1-gold.patch new file mode 100644 index 000000000000..6c7ec7da6e5e --- /dev/null +++ b/dev-db/mysql++/files/mysql++-3.2.1-gold.patch @@ -0,0 +1,11 @@ +--- Makefile.in.orig 2013-09-27 09:51:48.646667442 -0400 ++++ Makefile.in 2013-09-27 09:52:22.026603184 -0400 +@@ -36,7 +36,7 @@ + CXX = @CXX@ + CXXFLAGS = @CXXFLAGS@ + CPPFLAGS = @CPPFLAGS@ +-LDFLAGS = @LDFLAGS@ ++LDFLAGS = @LDFLAGS@ @PTHREAD_CFLAGS@ + + ### Variables: ### + diff --git a/dev-db/mysql++/metadata.xml b/dev-db/mysql++/metadata.xml new file mode 100644 index 000000000000..716e7d4301bd --- /dev/null +++ b/dev-db/mysql++/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +</pkgmetadata> diff --git a/dev-db/mysql++/mysql++-2.3.2.ebuild b/dev-db/mysql++/mysql++-2.3.2.ebuild new file mode 100644 index 000000000000..e42181ba0420 --- /dev/null +++ b/dev-db/mysql++/mysql++-2.3.2.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils + +DESCRIPTION="C++ API interface to the MySQL database" +HOMEPAGE="http://tangentsoft.net/mysql++/" +SRC_URI="http://www.tangentsoft.net/mysql++/releases/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0" +KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86" +IUSE="" + +RDEPEND=">=virtual/mysql-4.0" +DEPEND="${RDEPEND} + >=sys-devel/gcc-3" + +src_prepare() { + + epatch "${FILESDIR}"/${P}-gcc-4.3.patch + + for i in "${S}"/lib/*.h ; do + sed -i \ + -e '/#include </s,mysql.h,mysql/mysql.h,g' \ + -e '/#include </s,mysql_version.h,mysql/mysql_version.h,g' \ + "${i}" || die "Failed to sed ${i} for fixing MySQL includes" + done +} + +src_configure() { + local myconf + # we want C++ exceptions turned on + myconf="--enable-exceptions" + # give threads a try + myconf="${myconf} --enable-thread-check" + # not including the directives to where MySQL is because it seems to + # find it just fine without + + # force the cflags into place otherwise they get totally ignored by + # configure + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + econf ${myconf} +} + +src_install() { + default + # install the docs and HTML pages + dodoc README* CREDITS ChangeLog HACKERS Wishlist + dohtml -r doc/html/* + rm -r doc/html || die + dodoc -r doc/* +} diff --git a/dev-db/mysql++/mysql++-3.1.0.ebuild b/dev-db/mysql++/mysql++-3.1.0.ebuild new file mode 100644 index 000000000000..8db9d7d6ca9f --- /dev/null +++ b/dev-db/mysql++/mysql++-3.1.0.ebuild @@ -0,0 +1,50 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils + +DESCRIPTION="C++ API interface to the MySQL database" +HOMEPAGE="http://tangentsoft.net/mysql++/" +SRC_URI="http://www.tangentsoft.net/mysql++/releases/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0/3" +KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +RDEPEND=">=virtual/mysql-4.0" +DEPEND="${RDEPEND} + || ( >=sys-devel/gcc-3 >=sys-devel/gcc-apple-4 )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-3.0-gcc-as-needed.patch + epatch "${FILESDIR}"/${PN}-3.2.1-gold.patch + + for i in "${S}"/lib/*.h ; do + sed -i \ + -e '/#include </s,mysql.h,mysql/mysql.h,g' \ + -e '/#include </s,mysql_version.h,mysql/mysql_version.h,g' \ + "${i}" + done + epatch_user +} + +src_configure() { + local myconf + use prefix || local EPREFIX= + myconf="--enable-thread-check --with-mysql=${EPREFIX}/usr" + + CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \ + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + # install the docs and HTML pages + dodoc README* CREDITS* ChangeLog HACKERS.txt Wishlist doc/ssqls-pretty + dodoc -r doc/pdf/ doc/refman/ doc/userman/ + dohtml -r doc/html/ +} diff --git a/dev-db/mysql++/mysql++-3.2.1.ebuild b/dev-db/mysql++/mysql++-3.2.1.ebuild new file mode 100644 index 000000000000..0ce369c2e68f --- /dev/null +++ b/dev-db/mysql++/mysql++-3.2.1.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils + +DESCRIPTION="C++ API interface to the MySQL database" +HOMEPAGE="http://tangentsoft.net/mysql++/" +SRC_URI="http://www.tangentsoft.net/mysql++/releases/${P}.tar.gz" + +LICENSE="LGPL-2" +SLOT="0/3" +KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86 ~amd64-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="" + +RDEPEND=">=virtual/mysql-4.0" +DEPEND="${RDEPEND}" + +src_prepare() { + epatch "${FILESDIR}/${P}-gold.patch" + epatch_user +} + +src_configure() { + local myconf="--enable-thread-check --with-mysql=${EPREFIX}/usr" + econf ${myconf} +} + +src_install() { + default + # install the docs and HTML pages + dodoc CREDITS* HACKERS.txt Wishlist doc/ssqls-pretty + dodoc -r doc/pdf/ doc/refman/ doc/userman/ + dohtml -r doc/html/ +} diff --git a/dev-db/mysql-cluster/Manifest b/dev-db/mysql-cluster/Manifest new file mode 100644 index 000000000000..b433e0d55d79 --- /dev/null +++ b/dev-db/mysql-cluster/Manifest @@ -0,0 +1,6 @@ +DIST mysql-cluster-gpl-7.2.19.tar.gz 25959966 SHA256 f4d8772108bbe30852129602f1d4106dc42adbe14d4bbc45065cb6e7314803b4 SHA512 2a30d6bdb82ff9b4c3bcdc2b44ed0707c2292efc45137ada62635b41424ecd4286b18718542fe2120e57636f998b38ac3768d4f9f6b018e65a82ef76d81a310e WHIRLPOOL 21cec46fdfcd3509f4dd01864976c19aefa2adc53212a0724e9b30bf0fa6d63be7d4395b68be13de942b1c399a174e8cfd3f65594921b70b7e6cec0d7dc95183 +DIST mysql-cluster-gpl-7.2.20.tar.gz 25999156 SHA256 60ca80b10680b5048cd358ae543ad16e8e8c31395aaa69163bde923b22085874 SHA512 62fac1db476e08109885660d2e2728bb0c2c8144acb602fdb679d802bcdc459254349eb914ae600f51dca33f42cd9dfa0db9a21b07edb0d0c316497a62e1fc6f WHIRLPOOL 8f8787151648f34f3cfd64d05da793e40e8fe3d053f5cff72ecff7b799a536bf56ead2e19fd72620fda967b6903bc5ec01fec171144f581f32c4e0f0426573b5 +DIST mysql-cluster-gpl-7.3.8.tar.gz 42400435 SHA256 eddcc2954ff7fbbc72b1266bd64a9548e9b9d7a4115d42b54c13257c226248ca SHA512 4118449bc9bd2c88caff1585ebfa6b2e2a85b960fa12bc50a00245d1a6d42b3411ee0b2e32b2b10afd46b97e01e5b4fad924dbed852b2ab49b43c123c649a2d3 WHIRLPOOL fc1c6cd68e1f1b0f0430c0374b24c41ba7df83f43897d71e023706228c63024dc10ad6a5eef1696a24a6898be4387a1e4cf47309cabf7abaebc1767ae66da773 +DIST mysql-cluster-gpl-7.3.9.tar.gz 42489084 SHA256 eba6e37313608514aa41b7f948ccaef3153bf46270f0153b0246492573621b78 SHA512 d7897b5b16ae9179c3ac93e078e55597b89cacaeb4c9ca4477eb8230eb6dbdddf220b55df9dc91b5600e43adcd0d9a1ab470bcc970c20eaa78cd8300ef9ee80e WHIRLPOOL cdfd11a78a52c6b69add0b468a3e87304fdacddb1eb856bdf4e64d28337b7530288fdc1c0a1e25523081bce42fada8a161cd186d20e765a793d4e7160a2b013b +DIST mysql-extras-20150210-1758Z.tar.bz2 1494128 SHA256 1d82bc96e294b5479491fe2d8cf83f25f6b4d34c0033238848afde7cc7592e2c SHA512 0256cfe8af6f7c198d3e1aa15b6ac14363d4392422a379f24465e3e16dea75f3779bfe727fd74c404b126041bde2396ff521479c164b5d6c44a7340cad9fce33 WHIRLPOOL bde91051187f4f6f39a52d80d2a9648f9c05187ce200eea89c496cb9e99c70fe049f9f0b490ccfaaecd43081e6988841d94c3ede9fa4e9fb8773580f20047fbb +DIST mysql-extras-20150710-1911Z.tar.bz2 1494443 SHA256 9a4755dce3c5b7dfebda87c2fd73eb7b94786be43a9bd97451a8134dc95e6983 SHA512 9a42616dafba562dad5485ea16d8a2b7521668323414329052a64e32da606860af9c0d8a1bdc634afc0e55d1d2329297488c90ff712eac0eb74d8843ca9081aa WHIRLPOOL 33ee7e5cc90a26722fa4f6ff7f8604ac1a1396a867a5ca45b81510cb26638fa57dc3f0e8f2471a8c05c26f5341765c2c370989fcb1602b30e7c05bc00b247e34 diff --git a/dev-db/mysql-cluster/files/my.cnf-5.5 b/dev-db/mysql-cluster/files/my.cnf-5.5 new file mode 100644 index 000000000000..b3ab74cbeaaa --- /dev/null +++ b/dev-db/mysql-cluster/files/my.cnf-5.5 @@ -0,0 +1,148 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout + diff --git a/dev-db/mysql-cluster/files/my.cnf-5.6 b/dev-db/mysql-cluster/files/my.cnf-5.6 new file mode 100644 index 000000000000..ee85e99f83fa --- /dev/null +++ b/dev-db/mysql-cluster/files/my.cnf-5.6 @@ -0,0 +1,140 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 4M +table_open_cache = 400 +sort_buffer_size = 512K +net_buffer_length = 16K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 128M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 48M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/mysql-cluster/metadata.xml b/dev-db/mysql-cluster/metadata.xml new file mode 100644 index 000000000000..0fd723f94d87 --- /dev/null +++ b/dev-db/mysql-cluster/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<use> + <flag name='cluster'>Add support for NDB clustering</flag> + <flag name='community'>Enables the community features from upstream.</flag> + <flag name='embedded'>Build embedded server (libmysqld)</flag> + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> + <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag> + <flag name='minimal'>Install client programs only, no server</flag> + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> + <flag name='test'>Install upstream testsuites for end use.</flag> +</use> +</pkgmetadata> diff --git a/dev-db/mysql-cluster/mysql-cluster-7.2.19.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.2.19.ebuild new file mode 100644 index 000000000000..efd8e059d609 --- /dev/null +++ b/dev-db/mysql-cluster/mysql-cluster-7.2.19.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +MY_EXTRAS_VER="20150210-1758Z" +BUILD="cmake" + +inherit toolchain-funcs java-pkg-opt-2 mysql-v2 +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +# This is often broken still +EPATCH_EXCLUDE='02040_all_embedded-library-shared-5.1.43.patch ' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="!media-sound/amarok[embedded]" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='cluster extraengine perl ssl community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-cluster-X.X.XX.ebuild \ +# digest clean package +src_test() { + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MySQL 5.5 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, ndb.ndbinfo, ndb_binlog.ndb_binlog_index + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # sys_vars.plugin_dir_basic + # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin + # instead of MYSQL_LIBDIR/plugin + # + # main.flush_read_lock_kill + # fails because of unknown system variable 'DEBUG_SYNC' + # + # main.openssl_1 + # error message changing + # -mysqltest: Could not open connection 'default': 2026 SSL connection + # error: ASN: bad other signature confirmation + # +mysqltest: Could not open connection 'default': 2026 SSL connection + # error: error:00000001:lib(0):func(0):reason(1) + # + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin main.flush_read_lock_kill \ + sys_vars.plugin_dir_basic main.openssl_1 \ + ndb.ndbinfo ndb_binlog.ndb_binlog_index ; do + mysql-v2_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --parallel=auto + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql-cluster/mysql-cluster-7.2.20.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.2.20.ebuild new file mode 100644 index 000000000000..2f90922ca1c1 --- /dev/null +++ b/dev-db/mysql-cluster/mysql-cluster-7.2.20.ebuild @@ -0,0 +1,124 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +MY_EXTRAS_VER="20150210-1758Z" +BUILD="cmake" + +inherit toolchain-funcs java-pkg-opt-2 mysql-v2 +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +# This is often broken still +#EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="!media-sound/amarok[embedded]" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='cluster extraengine perl ssl community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-cluster-X.X.XX.ebuild \ +# digest clean package +src_test() { + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MySQL 5.5 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, ndb.ndbinfo, ndb_binlog.ndb_binlog_index + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # sys_vars.plugin_dir_basic + # fails because PLUGIN_DIR is set to MYSQL_LIBDIR64/plugin + # instead of MYSQL_LIBDIR/plugin + # + # main.flush_read_lock_kill + # fails because of unknown system variable 'DEBUG_SYNC' + # + # main.openssl_1 + # error message changing + # -mysqltest: Could not open connection 'default': 2026 SSL connection + # error: ASN: bad other signature confirmation + # +mysqltest: Could not open connection 'default': 2026 SSL connection + # error: error:00000001:lib(0):func(0):reason(1) + # + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin main.flush_read_lock_kill \ + sys_vars.plugin_dir_basic main.openssl_1 \ + ndb.ndbinfo ndb_binlog.ndb_binlog_index ; do + mysql-v2_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --parallel=auto + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql-cluster/mysql-cluster-7.3.8.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.3.8.ebuild new file mode 100644 index 000000000000..4a10e32edc31 --- /dev/null +++ b/dev-db/mysql-cluster/mysql-cluster-7.3.8.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +MY_EXTRAS_VER="20150210-1758Z" + +inherit toolchain-funcs java-pkg-opt-2 mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +# This is often broken still +#EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="!media-sound/amarok[embedded]" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='cluster extraengine perl ssl community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-cluster-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysqld--help-notwinfuncs_1.is_triggers \ + main.mysql_client_test \ + mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8 + for t in \ + ndb.ndbinfo \ + ndb_binlog.ndb_binlog_index ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo (NDB)" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql-cluster/mysql-cluster-7.3.9-r1.ebuild b/dev-db/mysql-cluster/mysql-cluster-7.3.9-r1.ebuild new file mode 100644 index 000000000000..20b5fee46b98 --- /dev/null +++ b/dev-db/mysql-cluster/mysql-cluster-7.3.9-r1.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +MY_EXTRAS_VER="20150710-1911Z" +SUBSLOT="18" + +inherit toolchain-funcs java-pkg-opt-2 mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~amd64 ~x86" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +# This is often broken still +#EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="!media-sound/amarok[embedded]" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='cluster extraengine perl ssl community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-cluster-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysqld--help-notwinfuncs_1.is_triggers \ + main.mysql_client_test \ + mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + # ndb.ndbinfo, ndb_binlog.ndb_binlog_index: latin1/utf8 + for t in \ + ndb.ndbinfo \ + ndb_binlog.ndb_binlog_index ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo (NDB)" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql-connector-c++/Manifest b/dev-db/mysql-connector-c++/Manifest new file mode 100644 index 000000000000..e17d5fc148dd --- /dev/null +++ b/dev-db/mysql-connector-c++/Manifest @@ -0,0 +1,4 @@ +DIST mysql-connector-c++-1.1.1.tar.gz 492659 SHA256 31c3e4f637153bd270812dffc6a50708dfc686a8afa7ea1c88a9dfda0d8af52e SHA512 d6b34fd4aeaf1032870d6de4f57ae92230790a3661c24af4ffed30f715f9a1941d0d063abbc0d703c15697c054731af6e39240d6dd70459371f25435595ec903 WHIRLPOOL f9fddb59df913a728769824aa7cc39b9ba55b1d3de56048148bf5ca37a366772f34a85bae58f0d5efead4010b0aac7ab5b897bd4a0db113e99fdf4898a31d26c +DIST mysql-connector-c++-1.1.3.tar.gz 496226 SHA256 4b1516f183f29c011c1677d5a9b174d0f5c3b761d2e8056e79690c55c01ea690 SHA512 c03a4ae25e9d189a5114ab630bef6edaefd1aee809dbb1ec26b765f5e84b93fbe17e5f7357a4fe2a95c179cd2028b676151df4baf4e3da7515543ecc0834afd7 WHIRLPOOL 5f04231cec63de16c2a076143b2e0409544ebdf600d7423f63c8c2db45f1b63048e1da108a9f374dda6b6ff0d4c13b509190390e797f4674e14284acbaa9e2e5 +DIST mysql-connector-c++-1.1.5.tar.gz 519440 SHA256 f3696726da29d56e0daad7046b30aa51444360a3ff112c079eb942929eb1cce8 SHA512 6e6e6ed7f7496d5d51f6709a7fb47b8031d5639b0729a439056466ae24e4e24d419fad19c54571e0485f3717d7a07ccd840795724a8b79deb8e93c59d447595b WHIRLPOOL 8c0be70301454d130797d6dd74da5f29a77f543bf4c2353e53b6ebfa8c9f8282850ba6266d4988e7d305c5be14d64b41133ad05ded2f70662235f254f76d75ea +DIST mysql-connector-c++-1.1.6.tar.gz 522236 SHA256 ad710b3900cae3be94656825aa70319cf7a96e1ad46bf93e07275f3606f69447 SHA512 e940b6ee090f792bad8acbbfa3dacd46310ac40c7993c4097eeebb6be4b792d3f1856574e603a71e2795773db97169f47c9ed76a127654472370c726bcb291c7 WHIRLPOOL b3027423cf2e250f1fd7340b58ff5ff55ce771c91cc435e37cddd156f681621206438b6329a49df760dce660ef983b3cf3e5060af527668de64ed06e69830d12 diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0-disable-tests.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0-disable-tests.patch new file mode 100644 index 000000000000..e6345c046b63 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0-disable-tests.patch @@ -0,0 +1,14 @@ +diff -urNad mysql-connector-c++-1.0.6~r754~/CMakeLists.txt mysql-connector-c++-1.0.6~r754/CMakeLists.txt +--- mysql-connector-c++-1.0.6~r754~/CMakeLists.txt 2009-08-20 22:25:35.000000000 +0200 ++++ mysql-connector-c++-1.0.6~r754/CMakeLists.txt 2009-08-20 22:25:57.000000000 +0200 +@@ -241,10 +241,6 @@ + ADD_SUBDIRECTORY(cppconn) + ADD_SUBDIRECTORY(driver) + ADD_SUBDIRECTORY(examples) +-ADD_SUBDIRECTORY(test) +-ADD_SUBDIRECTORY(test/framework) +-ADD_SUBDIRECTORY(test/CJUnitTestsPort) +-ADD_SUBDIRECTORY(test/unit) + + IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # see also README diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0-fix-cmake.patch new file mode 100644 index 000000000000..d32fa07f1e0b --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.0-fix-cmake.patch @@ -0,0 +1,85 @@ +diff -urN mysql-connector-c++-1.1.0.old/CMakeLists.txt mysql-connector-c++-1.1.0/CMakeLists.txt +--- mysql-connector-c++-1.1.0.old/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ mysql-connector-c++-1.1.0/CMakeLists.txt 2011-07-30 13:16:18.000000000 +0200 +@@ -232,7 +232,7 @@ + "install_manifest.txt") + SET(PRJ_COMMON_IGNORE_FILES ${COMMON_IGNORE_FILES} "ANNOUNCEMENT_102_ALPHA" "ANNOUNCEMENT_103_ALPHA" "ANNOUNCEMENT_104_BETA" "ANNOUNCEMENT_105_GA" "ANNOUNCEMENT_110_GA" "ANNOUNCEMENT_DRAFT" ) + +-SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "./cppconn/config.h$" "./driver/nativeapi/binding_config.h$") ++SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h$" "${CMAKE_CURRENT_SOURCE_DIR}/driver/nativeapi/binding_config.h$") + SET(CPACK_PACKAGE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "something_there" ) + SET(CPACK_SOURCE_GENERATOR "TGZ") + +diff -urN mysql-connector-c++-1.1.0.old/cppconn/CMakeLists.txt mysql-connector-c++-1.1.0/cppconn/CMakeLists.txt +--- mysql-connector-c++-1.1.0.old/cppconn/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ mysql-connector-c++-1.1.0/cppconn/CMakeLists.txt 2011-07-30 14:10:34.000000000 +0200 +@@ -55,7 +55,7 @@ + + SET(MYSQLCPPCONN_INSTALL_HEADERS + build_config.h +- config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h + connection.h + datatype.h + driver.h +diff -urN mysql-connector-c++-1.1.0.old/driver/CMakeLists.txt mysql-connector-c++-1.1.0/driver/CMakeLists.txt +--- mysql-connector-c++-1.1.0.old/driver/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ mysql-connector-c++-1.1.0/driver/CMakeLists.txt 2011-07-30 13:20:36.000000000 +0200 +@@ -26,6 +26,9 @@ + + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/driver/nativeapi) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}) + MESSAGE(STATUS "BOOST_INCLUDE_DIRS=${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}") + +@@ -149,20 +152,22 @@ + nativeapi/native_statement_wrapper.h + nativeapi/mysql_native_resultset_wrapper.h + nativeapi/native_resultset_wrapper.h +- ../cppconn/warning.h +- ../cppconn/statement.h +- ../cppconn/sqlstring.h +- ../cppconn/resultset_metadata.h +- ../cppconn/resultset.h +- ../cppconn/prepared_statement.h +- ../cppconn/parameter_metadata.h +- ../cppconn/metadata.h +- ../cppconn/exception.h +- ../cppconn/driver.h +- ../cppconn/datatype.h +- ../cppconn/connection.h +- ../cppconn/config.h +- ../cppconn/build_config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/warning.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/sqlstring.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/prepared_statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/parameter_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/exception.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/driver.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/datatype.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/connection.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/build_config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/build_config.h + + ) + +@@ -271,8 +276,8 @@ + ) + ELSE(WIN32) + INSTALL(TARGETS mysqlcppconn mysqlcppconn-static +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + ENDIF(WIN32) + diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch new file mode 100644 index 000000000000..5f0669ca3381 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.3-fix-cmake.patch @@ -0,0 +1,123 @@ +--- a/CMakeLists.txt 2014-05-04 21:27:59.000000000 -0400 ++++ b/CMakeLists.txt 2014-05-04 21:47:31.460572470 -0400 +@@ -38,7 +38,7 @@ + + if(COMMAND cmake_policy AND POLICY CMP0015) + cmake_policy(SET CMP0015 NEW) +-endif(COMMAND cmake_policy) ++endif(COMMAND cmake_policy AND POLICY CMP0015) + + #----------------- + # CPPFLAGS, CXXFLAGS and LDFLAGS from the environment +@@ -258,14 +258,14 @@ + ${CPACK_RESOURCE_FILE_LICENSE} + "${CMAKE_SOURCE_DIR}/Licenses_for_Third-Party_Components.txt" + "${CMAKE_SOURCE_DIR}/ANNOUNCEMENT" +- DESTINATION "." OPTIONAL) ++ DESTINATION "${INSTALL_DOCS}" OPTIONAL) + + SET(COMMON_IGNORE_FILES "/CMakeFiles/" "/Testing/" "/.bzr/" "_CPack_Packages/" + ".cmake$" "~" ".swp" ".log" ".gz" ".directory$" "CMakeCache.txt" "Makefile" + "install_manifest.txt") + SET(PRJ_COMMON_IGNORE_FILES ${COMMON_IGNORE_FILES} "ANNOUNCEMENT_102_ALPHA" "ANNOUNCEMENT_103_ALPHA" "ANNOUNCEMENT_104_BETA" "ANNOUNCEMENT_105_GA" "ANNOUNCEMENT_110_GA" "ANNOUNCEMENT_111_GA" "ANNOUNCEMENT_DRAFT" ) + +-SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "./cppconn/config.h$" "./driver/nativeapi/binding_config.h$") ++SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h$" "${CMAKE_CURRENT_SOURCE_DIR}/driver/nativeapi/binding_config.h$") + SET(CPACK_PACKAGE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "something_there" ) + SET(CPACK_SOURCE_GENERATOR "TGZ") + +@@ -292,10 +292,6 @@ + ADD_SUBDIRECTORY(cppconn) + ADD_SUBDIRECTORY(driver) + ADD_SUBDIRECTORY(examples) +-ADD_SUBDIRECTORY(test) +-ADD_SUBDIRECTORY(test/framework) +-ADD_SUBDIRECTORY(test/CJUnitTestsPort) +-ADD_SUBDIRECTORY(test/unit) + + IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # see also README +--- a/FindMySQL.cm 2014-05-04 22:20:50.000000000 -0400 ++++ b/FindMySQL.cm 2014-05-04 22:21:40.325384447 -0400 +@@ -58,7 +58,7 @@ + EXECUTE_PROCESS(COMMAND ${MYSQL_CONFIG_EXECUTABLE} "--cflags" + OUTPUT_VARIABLE _mysql_config_output + ) +- STRING(REGEX MATCHALL "-m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}") ++ STRING(REGEX MATCHALL " -m([^\r\n]+)" MYSQL_LINK_FLAGS "${_mysql_config_output}") + STRING(REGEX REPLACE "[\r\n]$" "" MYSQL_CXXFLAGS "${_mysql_config_output}") + # ADD_DEFINITIONS("${MYSQL_CXXFLAGS}") + ELSE (MYSQL_CONFIG_EXECUTABLE AND NOT WIN32) +diff -urN a/cppconn/CMakeLists.txt b/cppconn/CMakeLists.txt +--- a/cppconn/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ b/cppconn/CMakeLists.txt 2011-07-30 14:10:34.000000000 +0200 +@@ -55,7 +55,7 @@ + + SET(MYSQLCPPCONN_INSTALL_HEADERS + build_config.h +- config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h + connection.h + datatype.h + driver.h +diff -urN mysql-connector-c++-1.1.0.old/driver/CMakeLists.txt mysql-connector-c++-1.1.0/driver/CMakeLists.txt +--- a/driver/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ b/driver/CMakeLists.txt 2011-07-30 13:20:36.000000000 +0200 +@@ -26,6 +26,9 @@ + + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/driver/nativeapi) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}) + MESSAGE(STATUS "BOOST_INCLUDE_DIRS=${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}") + +@@ -149,20 +152,22 @@ + nativeapi/native_statement_wrapper.h + nativeapi/mysql_native_resultset_wrapper.h + nativeapi/native_resultset_wrapper.h +- ../cppconn/warning.h +- ../cppconn/statement.h +- ../cppconn/sqlstring.h +- ../cppconn/resultset_metadata.h +- ../cppconn/resultset.h +- ../cppconn/prepared_statement.h +- ../cppconn/parameter_metadata.h +- ../cppconn/metadata.h +- ../cppconn/exception.h +- ../cppconn/driver.h +- ../cppconn/datatype.h +- ../cppconn/connection.h +- ../cppconn/config.h +- ../cppconn/build_config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/warning.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/sqlstring.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/prepared_statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/parameter_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/exception.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/driver.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/datatype.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/connection.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/build_config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/build_config.h + + ) + +@@ -271,8 +276,8 @@ + ) + ELSE(WIN32) + INSTALL(TARGETS mysqlcppconn mysqlcppconn-static +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib ++ LIBRARY DESTINATION lib${LIB_SUFFIX} ++ ARCHIVE DESTINATION lib${LIB_SUFFIX} + ) + ENDIF(WIN32) + diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-cmake.patch new file mode 100644 index 000000000000..33479092561f --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-cmake.patch @@ -0,0 +1,106 @@ +--- a/CMakeLists.txt 2014-05-04 21:27:59.000000000 -0400 ++++ b/CMakeLists.txt 2014-05-04 21:47:31.460572470 -0400 +@@ -269,14 +269,14 @@ + ${CPACK_RESOURCE_FILE_LICENSE} + "${CMAKE_SOURCE_DIR}/Licenses_for_Third-Party_Components.txt" + "${CMAKE_SOURCE_DIR}/ANNOUNCEMENT" +- DESTINATION "." OPTIONAL) ++ DESTINATION "${INSTALL_DOCS}" OPTIONAL) + + SET(COMMON_IGNORE_FILES "/CMakeFiles/" "/Testing/" "/.bzr/" "_CPack_Packages/" + "~" ".swp" ".log" ".gz" ".directory$" "CMakeCache.txt" "Makefile" + "install_manifest.txt") + SET(PRJ_COMMON_IGNORE_FILES ${COMMON_IGNORE_FILES} "ANNOUNCEMENT_102_ALPHA" "ANNOUNCEMENT_103_ALPHA" "ANNOUNCEMENT_104_BETA" "ANNOUNCEMENT_105_GA" "ANNOUNCEMENT_110_GA" "ANNOUNCEMENT_111_GA" "ANNOUNCEMENT_DRAFT" ) + +-SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "./cppconn/config.h$" "./driver/nativeapi/binding_config.h$" "./driver/version_info.h$") ++SET(CPACK_SOURCE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h$" "${CMAKE_CURRENT_SOURCE_DIR}/driver/nativeapi/binding_config.h$" "${CMAKE_CURRENT_SOURCE_DIR}/driver/version_info.h$") + SET(CPACK_PACKAGE_IGNORE_FILES ${PRJ_COMMON_IGNORE_FILES} "something_there" ) + SET(CPACK_SOURCE_GENERATOR "TGZ") + +@@ -303,10 +303,6 @@ + ADD_SUBDIRECTORY(cppconn) + ADD_SUBDIRECTORY(driver) + ADD_SUBDIRECTORY(examples) +-ADD_SUBDIRECTORY(test) +-ADD_SUBDIRECTORY(test/framework) +-ADD_SUBDIRECTORY(test/CJUnitTestsPort) +-ADD_SUBDIRECTORY(test/unit) + + IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # see also README +diff -urN a/cppconn/CMakeLists.txt b/cppconn/CMakeLists.txt +--- a/cppconn/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ b/cppconn/CMakeLists.txt 2011-07-30 14:10:34.000000000 +0200 +@@ -55,7 +55,7 @@ + + SET(MYSQLCPPCONN_INSTALL_HEADERS + build_config.h +- config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/config.h + connection.h + datatype.h + driver.h +diff -urN mysql-connector-c++-1.1.0.old/driver/CMakeLists.txt mysql-connector-c++-1.1.0/driver/CMakeLists.txt +--- a/driver/CMakeLists.txt 2011-07-30 13:15:44.000000000 +0200 ++++ b/driver/CMakeLists.txt 2011-07-30 13:20:36.000000000 +0200 +@@ -26,6 +26,9 @@ + + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_SOURCE_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/cppconn) ++INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BINARY_DIR}/driver/nativeapi) + INCLUDE_DIRECTORIES(${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}) + MESSAGE(STATUS "BOOST_INCLUDE_DIRS=${MYSQLCPPCONN_BOOST_INCLUDE_DIRS}") + +@@ -149,21 +152,23 @@ + nativeapi/native_statement_wrapper.h + nativeapi/mysql_native_resultset_wrapper.h + nativeapi/native_resultset_wrapper.h +- ../cppconn/warning.h +- ../cppconn/statement.h +- ../cppconn/sqlstring.h +- ../cppconn/resultset_metadata.h +- ../cppconn/resultset.h +- ../cppconn/prepared_statement.h +- ../cppconn/parameter_metadata.h +- ../cppconn/metadata.h +- ../cppconn/exception.h +- ../cppconn/driver.h +- ../cppconn/datatype.h +- ../cppconn/variant.h +- ../cppconn/connection.h +- ../cppconn/config.h +- ../cppconn/build_config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/warning.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/sqlstring.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/resultset.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/prepared_statement.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/parameter_metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/metadata.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/exception.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/driver.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/datatype.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/variant.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/connection.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/config.h ++ ${CMAKE_CURRENT_SOURCE_DIR}/cppconn/build_config.h ++ ${CMAKE_CURRENT_BINARY_DIR}/cppconn/build_config.h + + ) + +diff -aruN a/FindMySQL.cmake b/FindMySQL.cmake +--- a/FindMySQL.cmake 2014-11-19 08:37:11.000000000 -0500 ++++ b/FindMySQL.cmake 2015-02-21 21:58:20.264446822 -0500 +@@ -462,7 +462,7 @@ + endif() + + if(NOT MYSQL_CXXFLAGS) +- if(MYSQL_CXX_LINKAGE OR MYSQL_NUM_VERSION GREATER 50603) ++ if(MYSQL_CXX_LINKAGE) + _mysql_conf(MYSQL_CXXFLAGS "--cxxflags") + set(MYSQL_CXX_LINKAGE 1) + else() diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch new file mode 100644 index 000000000000..fa36e3bad936 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.5-fix-mariadb.patch @@ -0,0 +1,45 @@ +diff -aruN a/driver/nativeapi/libmysql_static_proxy.cpp b/driver/nativeapi/libmysql_static_proxy.cpp +--- a/driver/nativeapi/libmysql_static_proxy.cpp 2014-11-19 08:37:11.000000000 -0500 ++++ b/driver/nativeapi/libmysql_static_proxy.cpp 2015-02-21 22:19:50.119234140 -0500 +@@ -319,7 +319,7 @@ + int + LibmysqlStaticProxy::get_option(MYSQL * mysql, enum mysql_option option, const void *arg) + { +-#if MYSQL_VERSION_ID >= 50703 ++#if MYSQL_VERSION_ID >= 50703 && !defined( MARIADB_BASE_VERSION ) + if (::mysql_get_option(mysql, option, arg)) { + throw sql::InvalidArgumentException("Unsupported option provided to mysql_get_option()"); + } else { +diff -aruN a/driver/mysql_connection.cpp b/driver/mysql_connection.cpp +--- a/driver/mysql_connection.cpp 2014-11-19 08:37:11.000000000 -0500 ++++ b/driver/mysql_connection.cpp 2015-02-21 22:28:48.920210376 -0500 +@@ -1015,6 +1015,7 @@ + MY_CHARSET_INFO cs; + proxy->get_character_set_info(&cs); + *(static_cast<int *>(optionValue)) = cs.mbmaxlen; ++#ifndef MARIADB_BASE_VERSION + /* mysql_get_option() was added in mysql 5.7.3 version */ + } else if ( proxy->get_server_version() >= 50703 ) { + try { +@@ -1029,6 +1030,7 @@ + CPP_ERR_FMT("Unsupported option : %d:(%s) %s", proxy->errNo(), proxy->sqlstate().c_str(), proxy->error().c_str()); + throw e; + } ++#endif /* MARIADB_BASE_VERSION */ + } + } + /* }}} */ +@@ -1046,11 +1048,13 @@ + MY_CHARSET_INFO cs; + proxy->get_character_set_info(&cs); + return cs.dir ? sql::SQLString(cs.dir) : ""; ++#ifndef MARIADB_BASE_VERSION + } else if ( proxy->get_server_version() >= 50703 ) { + const char* optionValue= NULL; + if (GET_CONN_OPTION(optionName, &optionValue, stringOptions)) { + return optionValue ? sql::SQLString(optionValue) : ""; + } ++#endif /* MARIADB_BASE_VERSION */ + } + return ""; + } diff --git a/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch new file mode 100644 index 000000000000..18d4e9a80410 --- /dev/null +++ b/dev-db/mysql-connector-c++/files/mysql-connector-c++-1.1.6-fix-cmake.patch @@ -0,0 +1,23 @@ +diff -aurN a/CMakeLists.txt b/CMakeLists.txt +--- a/CMakeLists.txt 2015-06-04 08:58:30.000000000 -0400 ++++ b/CMakeLists.txt 2015-07-21 10:41:59.081091000 -0400 +@@ -300,7 +300,7 @@ + SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY}") + ENDIF(WIN32) + +-SET(DOC_DESTINATION ".") ++SET(DOC_DESTINATION ${INSTALL_DOCS}) + IF(RPM_LAYOUT) + SET(DOC_DESTINATION "share/doc/${CPACK_PACKAGE_NAME}-${MYSQLCPPCONN_VERSION}") + ENDIF() +@@ -373,10 +373,6 @@ + ADD_SUBDIRECTORY(cppconn) + ADD_SUBDIRECTORY(driver) + ADD_SUBDIRECTORY(examples) +-ADD_SUBDIRECTORY(test) +-ADD_SUBDIRECTORY(test/framework) +-ADD_SUBDIRECTORY(test/CJUnitTestsPort) +-ADD_SUBDIRECTORY(test/unit) + + IF(DEFINED CMAKE_SYSTEM_NAME AND ${CMAKE_SYSTEM_NAME} STREQUAL "SunOS") + # see also README diff --git a/dev-db/mysql-connector-c++/metadata.xml b/dev-db/mysql-connector-c++/metadata.xml new file mode 100644 index 000000000000..306a658a7fa8 --- /dev/null +++ b/dev-db/mysql-connector-c++/metadata.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<herd>proxy-maintainers</herd> +<use> +<flag name='gcov'>Build coverage support</flag> +</use> + <maintainer> + <email>h.mth@web.de</email> + <description>Proxied developer. Please CC on bugs.</description> + <name>Hanno Meyer-Thurow</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.1.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.1.ebuild new file mode 100644 index 000000000000..dac36731dd28 --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.1.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils cmake-utils flag-o-matic multilib + +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" +HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/" +URI_DIR="Connector-C++" +SRC_URI="mirror://mysql/Downloads/${URI_DIR}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ppc ppc64 ~sparc x86" +IUSE="debug examples gcov static-libs" + +DEPEND=">=virtual/mysql-5.1 + dev-libs/boost + dev-libs/openssl" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.0-fix-cmake.patch" + "${FILESDIR}/${PN}-1.1.0-disable-tests.patch" +) + +src_configure() { + # native lib/wrapper needs this! + append-flags "-fno-strict-aliasing" + + local mycmakeargs=( + "-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF" + "-DMYSQLCPPCONN_ICU_ENABLE=OFF" + $(cmake-utils_use debug MYSQLCPPCONN_TRACE_ENABLE) + $(cmake-utils_use gcov MYSQLCPPCONN_GCOV_ENABLE) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # static lib has wrong name so we need to rename it + if use static-libs; then + mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \ + "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die + else + rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a + fi + + # docs are installed poorly + rm -rf "${ED}"/usr/{ANNOUNCEMENT,COPYING,README} + dodoc ANNOUNCEMENT README + + # examples + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins "${S}"/examples/* + fi +} diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild new file mode 100644 index 000000000000..ab50a1ac6860 --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.3.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils cmake-utils flag-o-matic multilib + +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" +HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/" +URI_DIR="Connector-C++" +SRC_URI="mirror://mysql/Downloads/${URI_DIR}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 arm ppc ppc64 sparc x86" +IUSE="debug examples gcov static-libs" + +DEPEND=">=virtual/mysql-5.1 + dev-libs/boost + dev-libs/openssl:0" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.3-fix-cmake.patch" +) + +src_configure() { + # native lib/wrapper needs this! + append-flags "-fno-strict-aliasing" + + local mycmakeargs=( + "-DMYSQLCPPCONN_BUILD_EXAMPLES=OFF" + "-DMYSQLCPPCONN_ICU_ENABLE=OFF" + $(cmake-utils_use debug MYSQLCPPCONN_TRACE_ENABLE) + $(cmake-utils_use gcov MYSQLCPPCONN_GCOV_ENABLE) + -DINSTALL_DOCS="/usr/share/doc/${PF}" + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # static lib has wrong name so we need to rename it + if use static-libs; then + mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \ + "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die + else + rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a + fi + + # examples + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins "${S}"/examples/* + fi +} diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.5.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.5.ebuild new file mode 100644 index 000000000000..98c1aeb42d2f --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.5.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils cmake-utils flag-o-matic multilib + +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" +HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/" +URI_DIR="Connector-C++" +SRC_URI="mirror://mysql/Downloads/${URI_DIR}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug examples gcov static-libs" + +DEPEND=">=virtual/mysql-5.5:0= + dev-libs/boost:0= + dev-libs/openssl:0=" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.5-fix-cmake.patch" + "${FILESDIR}/${PN}-1.1.5-fix-mariadb.patch" +) + +src_configure() { + # native lib/wrapper needs this! + append-flags "-fno-strict-aliasing" + + local mycmakeargs=( + -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF + -DMYSQLCPPCONN_ICU_ENABLE=OFF + $(cmake-utils_use debug MYSQLCPPCONN_TRACE_ENABLE) + $(cmake-utils_use gcov MYSQLCPPCONN_GCOV_ENABLE) + -DINSTALL_DOCS="/usr/share/doc/${PF}" + -DMYSQL_CXX_LINKAGE=0 + -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # static lib has wrong name so we need to rename it + if use static-libs; then + mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \ + "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die + else + rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a + fi + + # examples + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins "${S}"/examples/* + fi +} diff --git a/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild new file mode 100644 index 000000000000..b32600fc7d88 --- /dev/null +++ b/dev-db/mysql-connector-c++/mysql-connector-c++-1.1.6.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils cmake-utils flag-o-matic multilib + +DESCRIPTION="MySQL database connector for C++ (mimics JDBC 4.0 API)" +HOMEPAGE="http://dev.mysql.com/downloads/connector/cpp/" +URI_DIR="Connector-C++" +SRC_URI="mirror://mysql/Downloads/${URI_DIR}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~sparc ~x86" +IUSE="debug examples gcov static-libs" + +DEPEND=">=virtual/mysql-5.5:0= + dev-libs/boost:0= + dev-libs/openssl:0=" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}/${PN}-1.1.6-fix-cmake.patch" + "${FILESDIR}/${PN}-1.1.5-fix-mariadb.patch" +) + +src_configure() { + # native lib/wrapper needs this! + append-flags "-fno-strict-aliasing" + + local mycmakeargs=( + -DMYSQLCPPCONN_BUILD_EXAMPLES=OFF + -DMYSQLCPPCONN_ICU_ENABLE=OFF + $(cmake-utils_use debug MYSQLCPPCONN_TRACE_ENABLE) + $(cmake-utils_use gcov MYSQLCPPCONN_GCOV_ENABLE) + -DINSTALL_DOCS="/usr/share/doc/${PF}" + -DMYSQL_CXX_LINKAGE=0 + -DMYSQL_INCLUDE_DIR=$(mysql_config --variable=pkgincludedir) + ) + + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # static lib has wrong name so we need to rename it + if use static-libs; then + mv "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a \ + "${ED}"/usr/$(get_libdir)/libmysqlcppconn.a || die + else + rm -f "${ED}"/usr/$(get_libdir)/libmysqlcppconn-static.a + fi + + # examples + if use examples; then + insinto /usr/share/doc/${PF}/examples + doins "${S}"/examples/* + fi +} diff --git a/dev-db/mysql-connector-c/Manifest b/dev-db/mysql-connector-c/Manifest new file mode 100644 index 000000000000..5c0e7d8c438f --- /dev/null +++ b/dev-db/mysql-connector-c/Manifest @@ -0,0 +1,2 @@ +DIST mysql-connector-c-6.1.5-src.tar.gz 3455028 SHA256 278f2b40f3980079bc7ad247cb2bf08967ce56ef79da468ae26ff2e2a560be66 SHA512 be47ed70865744ff9ecb9376972208504327514f03635e54c05e81d324bcf9ba777300a12738d8ca32b95c9c31d734dc9f6ebb7bb24fd11821560a6b0f09bb56 WHIRLPOOL bfdd17908cae63ef5b5006bdf28432bb12738044fe99960fdddab6da527ab41211a48396270a778ce500c5758c2f5d50c1fd850a92c684996612ab7c38637c61 +DIST mysql-connector-c-6.1.6-src.tar.gz 3475044 SHA256 2222433012c415871958b61bc4f3683e1ebe77e3389f698b267058c12533ea78 SHA512 2a3db4aec5b8e5357fa407d6e2b52534f7aa9c0b78c4ebe9a61e2e25dc5f7dc1f1962f6e6fd847107ce53ca369e0babe7118b947a87189495212596348cfd760 WHIRLPOOL 6a0a55a47a88606c12511f9fd155bafcf5d73b1ffa2c4877b838bca018f4a8a8f4427ac6af6e4c567eced7e1108dba4a613255f813ab481e8ea948b3a6cdff33 diff --git a/dev-db/mysql-connector-c/files/conn-c-includes.patch b/dev-db/mysql-connector-c/files/conn-c-includes.patch new file mode 100644 index 000000000000..fcde71f3f4ee --- /dev/null +++ b/dev-db/mysql-connector-c/files/conn-c-includes.patch @@ -0,0 +1,15 @@ +diff -aurN a/include/CMakeLists.txt b/include/CMakeLists.txt +--- a/include/CMakeLists.txt 2015-07-14 13:06:04.424091000 -0400 ++++ b/include/CMakeLists.txt 2015-07-14 13:24:43.434091000 -0400 +@@ -55,6 +55,11 @@ + byte_order_generic_x86.h + little_endian.h + big_endian.h ++ my_thread_local.h ++ thr_cond.h ++ thr_lock.h ++ thr_mutex.h ++ thr_rwlock.h + ${HEADERS_GEN_CONFIGURE} + ) + diff --git a/dev-db/mysql-connector-c/files/openssl-cmake-detection.patch b/dev-db/mysql-connector-c/files/openssl-cmake-detection.patch new file mode 100644 index 000000000000..3a5f53e7ba35 --- /dev/null +++ b/dev-db/mysql-connector-c/files/openssl-cmake-detection.patch @@ -0,0 +1,12 @@ +diff -aurN a/cmake/ssl.cmake b/cmake/ssl.cmake +--- a/cmake/ssl.cmake 2014-11-21 00:39:51.000000000 -0500 ++++ b/cmake/ssl.cmake 2015-01-27 08:45:36.771744344 -0500 +@@ -166,7 +166,7 @@ + # Encoded as MNNFFPPS: major minor fix patch status + FILE(STRINGS "${OPENSSL_INCLUDE_DIR}/openssl/opensslv.h" + OPENSSL_VERSION_NUMBER +- REGEX "^#define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*" ++ REGEX "^#[\t ]*define[\t ]+OPENSSL_VERSION_NUMBER[\t ]+0x[0-9].*" + ) + STRING(REGEX REPLACE + "^.*OPENSSL_VERSION_NUMBER[\t ]+0x([0-9]).*$" "\\1" diff --git a/dev-db/mysql-connector-c/metadata.xml b/dev-db/mysql-connector-c/metadata.xml new file mode 100644 index 000000000000..eada17468398 --- /dev/null +++ b/dev-db/mysql-connector-c/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<use> +</use> +</pkgmetadata> diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.5.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.5.ebuild new file mode 100644 index 000000000000..8e6ed893135b --- /dev/null +++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.5.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +CMAKE_MIN_VERSION="2.8.12" + +inherit cmake-multilib eutils + +MULTILIB_WRAPPED_HEADERS+=( + /usr/include/mysql/my_config.h +) + +DESCRIPTION="C client library for MariaDB/MySQL" +HOMEPAGE="https://dev.mysql.com/downloads/connector/c/" +LICENSE="GPL-2" + +SRC_URI="mirror://mysql/Downloads/Connector-C/${P}-src.tar.gz" +S="${WORKDIR}/${P}-src" +KEYWORDS="~amd64 ~x86" + +SLOT="0/18" +IUSE="+ssl static-libs" + +CDEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] + ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) + " +RDEPEND="${CDEPEND} + !dev-db/mysql[client-libs(+)] + !dev-db/mysql-cluster[client-libs(+)] + !dev-db/mariadb[client-libs(+)] + !dev-db/mariadb-connector-c[mysqlcompat] + !dev-db/mariadb-galera[client-libs(+)] + !dev-db/percona-server[client-libs(+)] + " +DEPEND="${CDEPEND}" + +DOCS=( README Docs/ChangeLog ) + +src_prepare() { + epatch "${FILESDIR}/openssl-cmake-detection.patch" + epatch_user +} + +multilib_src_configure() { + mycmakeargs+=( + -DINSTALL_LAYOUT=RPM + -DINSTALL_LIBDIR=$(get_libdir) + -DWITH_DEFAULT_COMPILER_OPTIONS=OFF + -DWITH_DEFAULT_FEATURE_SET=OFF + -DENABLED_LOCAL_INFILE=ON + -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DWITH_ZLIB=system + -DENABLE_DTRACE=OFF + -DWITH_SSL=$(usex ssl system bundled) + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + if ! use static-libs ; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/dev-db/mysql-connector-c/mysql-connector-c-6.1.6.ebuild b/dev-db/mysql-connector-c/mysql-connector-c-6.1.6.ebuild new file mode 100644 index 000000000000..9c8061a8fc68 --- /dev/null +++ b/dev-db/mysql-connector-c/mysql-connector-c-6.1.6.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +CMAKE_MIN_VERSION="2.8.12" + +inherit cmake-multilib eutils + +MULTILIB_WRAPPED_HEADERS+=( + /usr/include/mysql/my_config.h +) + +# wrap the config script +MULTILIB_CHOST_TOOLS=( /usr/bin/mysql_config ) + +DESCRIPTION="C client library for MariaDB/MySQL" +HOMEPAGE="https://dev.mysql.com/downloads/connector/c/" +LICENSE="GPL-2" + +SRC_URI="mirror://mysql/Downloads/Connector-C/${P}-src.tar.gz" +S="${WORKDIR}/${P}-src" +KEYWORDS="~amd64 ~x86" + +SLOT="0/18" +IUSE="+ssl static-libs" + +CDEPEND=" + sys-libs/zlib:=[${MULTILIB_USEDEP}] + ssl? ( dev-libs/openssl:=[${MULTILIB_USEDEP}] ) + " +RDEPEND="${CDEPEND} + !dev-db/mysql[client-libs(+)] + !dev-db/mysql-cluster[client-libs(+)] + !dev-db/mariadb[client-libs(+)] + !dev-db/mariadb-connector-c[mysqlcompat] + !dev-db/mariadb-galera[client-libs(+)] + !dev-db/percona-server[client-libs(+)] + " +DEPEND="${CDEPEND}" + +DOCS=( README Docs/ChangeLog ) + +src_prepare() { + epatch "${FILESDIR}/openssl-cmake-detection.patch" \ + "${FILESDIR}/conn-c-includes.patch" + epatch_user +} + +multilib_src_configure() { + mycmakeargs+=( + -DINSTALL_LAYOUT=RPM + -DINSTALL_LIBDIR=$(get_libdir) + -DWITH_DEFAULT_COMPILER_OPTIONS=OFF + -DWITH_DEFAULT_FEATURE_SET=OFF + -DENABLED_LOCAL_INFILE=ON + -DMYSQL_UNIX_ADDR="${EPREFIX}/var/run/mysqld/mysqld.sock" + -DWITH_ZLIB=system + -DENABLE_DTRACE=OFF + -DWITH_SSL=$(usex ssl system bundled) + ) + cmake-utils_src_configure +} + +multilib_src_install_all() { + if ! use static-libs ; then + find "${ED}" -name "*.a" -delete || die + fi +} diff --git a/dev-db/mysql-init-scripts/files/conf.d-2.0 b/dev-db/mysql-init-scripts/files/conf.d-2.0 new file mode 100644 index 000000000000..eefb867f0b79 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/conf.d-2.0 @@ -0,0 +1,79 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +# If you want a non-stock location for the config file, uncomment or update +# either of these as needed. If you do use it, you must make sure that none of +# your socket, pidfile, datadir, logfiles, binary logs, relay logs or InnoDB +# files collide with each other. +MY_CNF="/etc/mysql/my.cnf" +#MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" +#MY_CNF="${MY_CNF:-/etc/mysql/my-${SVCNAME/mysql.}.cnf}" + +# Place any additional arguments here that you might need +# Common/useful options: +# --skip-slave-start=1 - For bringing up replication initially +# --server-id=NNN - Server ID for replication +# --skip-networking - lock it down to UNIX sockets only +MY_ARGS="" + +# This setting (in seconds) should be high enough to allow InnoDB to do a full +# checkpoint recovery. 900 is the default used in the upstream RPM startup +# scripts. 30 seconds should be sufficent if you just have a tiny <1GiB +# database. After the core startup is done, we wait this long for the UNIX +# socket to appear. +STARTUP_TIMEOUT="900" + +# This is how long, in milliseconds, we wait for pidfile to be created, early +# in the startup. +STARTUP_EARLY_TIMEOUT="1000" + +# How long (in seconds) should we wait for shutdown? +STOP_TIMEOUT=120 + +# integer [-20 .. 19 ] default 0 +# change the priority of the server -20 (high) to 19 (low) +# see nice(1) for description +#NICE=0 + +# See start-stop-daemon(8) for possible settings +#IONICE=2 + +# If defined, --verbose gets passed to S-S-D +#DEBUG=1 + +# Depending on your usage of MySQL, you may also wish to start it after some +# other services are up. Uncomment the lines below as needed. If these aren't +# enough for you, we encourage you to file a bug, and help us understand how +# you are using MySQL. + +# Do your MySQL ACLs refer to hostnames not in your /etc/hosts? +# If so, you need DNS before you can accept connections. +# Avoid dependency circular loops if you use MySQL to power a local DNS server. +#rc_use="dns" +#rc_after="dns" + +# Does your MySQL bind to an IP on an interface other than net.lo? +# Alternatively you might wish to specify the exact interface here. +#rc_use="net" +#rc_after="net" + +# Do you store your MySQL files on a SAN or other network filesystem, that is +# provided by the netmount init script? +#rc_need="netmount" + +# Or from NFS? P.S. This is not a good idea in most cases, but does have some +# valid usage cases, so we provide the option. +#rc_need="nfsmount" + +# Should any one of the instances satisfy the requirement for MySQL coming up? +# By default, we say no. +[ "${SVCNAME}" != mysql ] && rc_provide="!mysql" +# But uncomment this next instead if you think it should. +#rc_provide="mysql" + +# The conditional above has a false-positive "failure" return value as a +# side-effect, and since it's the last statement, without the next line, this +# script returns failure. +return 0 +# vim: ft=gentoo-conf-d et ts=4 sw=4: diff --git a/dev-db/mysql-init-scripts/files/init.d-2.0 b/dev-db/mysql-init-scripts/files/init.d-2.0 new file mode 100644 index 000000000000..0402789f6032 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/init.d-2.0 @@ -0,0 +1,160 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="checkconfig" + +depend() { + use net.lo + # localmount needed for $basedir + need localmount +} + +get_config() { + my_print_defaults --config-file="$1" mysqld | + sed -n -e "s/^--$2=//p" +} + +mysql_svcname() { + local ebextra= + case "${SVCNAME}" in + mysql*) ;; + *) ebextra=" (mysql)" ;; + esac + echo "${SVCNAME}${ebextra}" +} + +start() { + # Check for old conf.d variables that mean migration was not yet done. + set | egrep -sq '^(mysql_slot_|MYSQL_BLOG_PID_FILE|STOPTIMEOUT)' + rc=$? + # Yes, MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING is a hidden variable. + # It does have a use in testing, as it is possible to build a config file + # that works with both the old and new init scripts simulateously. + if [ "${rc}" = 0 -a -z "${MYSQL_INIT_I_KNOW_WHAT_I_AM_DOING}" ]; then + eerror "You have not updated your conf.d for the new mysql-init-scripts-2 revamp." + eerror "Not proceeding because it may be dangerous." + return 1 + fi + + # Check the config or die + checkconfig || return 1 + + # Now we can startup + ebegin "Starting $(mysql_svcname)" + + MY_CNF="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" + + if [ ! -r "${MY_CNF}" ] ; then + eerror "Cannot read the configuration file \`${MY_CNF}'" + return 1 + fi + + # tail -n1 is critical as these we only want the last instance of the option + local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) + local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) + local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) + local socket=$(get_config "${MY_CNF}" socket | tail -n1) + local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) + + if [ -n "${chroot}" ] ; then + socket="${chroot}/${socket}" + pidfile="${chroot}/${pidfile}" + fi + + if [ ! -d "${datadir}" ] ; then + eerror "MySQL datadir \`${datadir}' is empty or invalid" + eerror "Please check your config file \`${MY_CNF}'" + return 1 + fi + + if [ ! -d "${datadir}"/mysql ] ; then + # find which package is installed to report an error + local EROOT=$(portageq envvar EROOT) + local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql)) + if [ -z ${DBPKG_P} ] ; then + eerror "You don't appear to have a server package installed yet." + else + eerror "You don't appear to have the mysql database installed yet." + eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..." + fi + return 1 + fi + + local piddir="${pidfile%/*}" + checkpath -d --owner mysql:mysql --mode 0755 "$piddir" + rc=$? + if [ $rc -ne 0 ]; then + eerror "Directory $piddir for pidfile does not exist and cannot be created" + return 1 + fi + + local startup_timeout=${STARTUP_TIMEOUT:-900} + local startup_early_timeout=${STARTUP_EARLY_TIMEOUT:-1000} + local tmpnice="${NICE:+"--nicelevel "}${NICE}" + local tmpionice="${IONICE:+"--ionice "}${IONICE}" + start-stop-daemon \ + ${DEBUG:+"--verbose"} \ + --start \ + --exec "${basedir}"/sbin/mysqld \ + --pidfile "${pidfile}" \ + --background \ + --wait ${startup_early_timeout} \ + ${tmpnice} \ + ${tmpionice} \ + -- --defaults-file="${MY_CNF}" ${MY_ARGS} + local ret=$? + if [ ${ret} -ne 0 ] ; then + eend ${ret} + return ${ret} + fi + + ewaitfile ${startup_timeout} "${socket}" + eend $? || return 1 + + save_options pidfile "${pidfile}" + save_options basedir "${basedir}" +} + +stop() { + ebegin "Stopping $(mysql_svcname)" + + local pidfile="$(get_options pidfile)" + local basedir="$(get_options basedir)" + local stop_timeout=${STOP_TIMEOUT:-120} + + start-stop-daemon \ + ${DEBUG:+"--verbose"} \ + --stop \ + --exec "${basedir}"/sbin/mysqld \ + --pidfile "${pidfile}" \ + --retry ${stop_timeout} + eend $? +} + +checkconfig() { + local my_cnf="${MY_CNF:-/etc/${SVCNAME}/my.cnf}" + local basedir=$(get_config "${my_cnf}" basedir | tail -n1) + local svc_name=$(mysql_svcname) + ebegin "Checking mysqld configuration for ${svc_name}" + + if [ ${RC_CMD} = "checkconfig" ] ; then + # We are calling checkconfig specifically. Print warnings regardless. + "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null + else + # Suppress output to check the return value + "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1 + + # If the above command does not return 0, + # then there is an error to echo to the user + if [ $? -ne 0 ] ; then + "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null + fi + fi + + eend $? "${svc_name} config check failed" +} + +# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: + diff --git a/dev-db/mysql-init-scripts/files/init.d-s6 b/dev-db/mysql-init-scripts/files/init.d-s6 new file mode 100644 index 000000000000..3c6feeca2057 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/init.d-s6 @@ -0,0 +1,129 @@ +#!/sbin/openrc-run +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + use net.lo + # localmount needed for $basedir + need localmount s6-svscan +} + +get_config() { + my_print_defaults --config-file="$1" mysqld | + sed -n -e "s/^--$2=//p" +} + +mysql_svcname() { + local ebextra= + case "${svc_name}" in + mysql*) ;; + *) ebextra=" (mysql)" ;; + esac + echo "${svc_name}${ebextra}" +} + +extra_commands="checkconfig" +supervisor=s6 +name=$(mysql_svcname) +s6_service_timeout_stop="$((1000*${STOP_TIMEOUT:-120}))" +#s6_svwait_options_start="-U -t $((1000*${STARTUP_EARLY_TIMEOUT:-1000}))" +svc_name=${RC_SVCNAME%-s6} +s6_service_path=/var/svc.d/${svc_name} + +start_pre() { + # Check the config or die + checkconfig || return 1 + + MY_CNF="${MY_CNF:-/etc/${svc_name}/my.cnf}" + + if [ ! -r "${MY_CNF}" ] ; then + eerror "Cannot read the configuration file \`${MY_CNF}'" + return 1 + fi + + # tail -n1 is critical as these we only want the last instance of the option + local basedir=$(get_config "${MY_CNF}" basedir | tail -n1) + local datadir=$(get_config "${MY_CNF}" datadir | tail -n1) + local pidfile=$(get_config "${MY_CNF}" pid-file | tail -n1) + local socket=$(get_config "${MY_CNF}" socket | tail -n1) + local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) + + if [ -n "${chroot}" ] ; then + socket="${chroot}/${socket}" + pidfile="${chroot}/${pidfile}" + fi + + if [ ! -d "${datadir}" ] ; then + eerror "MySQL datadir \`${datadir}' is empty or invalid" + eerror "Please check your config file \`${MY_CNF}'" + return 1 + fi + + if [ ! -d "${datadir}"/mysql ] ; then + # find which package is installed to report an error + local EROOT=$(portageq envvar EROOT) + local DBPKG_P=$(portageq match ${EROOT} $(portageq expand_virtual ${EROOT} virtual/mysql)) + if [ -z ${DBPKG_P} ] ; then + eerror "You don't appear to have a server package installed yet." + else + eerror "You don't appear to have the mysql database installed yet." + eerror "Please run \`emerge --config =${DBPKG_P}\` to have this done..." + fi + return 1 + fi + + local piddir="${pidfile%/*}" + checkpath -d --owner mysql:mysql --mode 0755 "$piddir" + rc=$? + if [ $rc -ne 0 ]; then + eerror "Directory $piddir for pidfile does not exist and cannot be created" + return 1 + fi + + # Prepare env files to source + mkdir -p "/var/svc.d/${svc_name}" + echo "MY_CNF=\"${MY_CNF}\"" > "/var/svc.d/${svc_name}/env" + echo "MY_ARGS=\"${MY_ARGS}\"" >> "/var/svc.d/${svc_name}/env" + echo "basedir=\"${basedir}\"" >> "/var/svc.d/${svc_name}/env" + mkdir -p "/var/svc.d/${svc_name}/log" + echo "SVCNAME=\"${svc_name}\"" > "/var/svc.d/${svc_name}/log/env" + echo "S6_LOG_OPTIONS=\"${S6_LOG_OPTIONS}\"" > "/var/svc.d/${svc_name}/log/env" +} + +start_post() { + local socket=$(get_config "${MY_CNF}" socket | tail -n1) + local chroot=$(get_config "${MY_CNF}" chroot | tail -n1) + local startup_timeout=${STARTUP_TIMEOUT:-900} + + if [ -n "${chroot}" ] ; then + socket="${chroot}/${socket}" + fi + ewaitfile ${startup_timeout} "${socket}" +} + +checkconfig() { + local my_cnf="${MY_CNF:-/etc/${svc_name}/my.cnf}" + local basedir=$(get_config "${my_cnf}" basedir | tail -n1) + local svc_name=$(mysql_svcname) + ebegin "Checking mysqld configuration for ${svc_name}" + + if [ ${RC_CMD} = "checkconfig" ] ; then + # We are calling checkconfig specifically. Print warnings regardless. + "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null + else + # Suppress output to check the return value + "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null 2>&1 + + # If the above command does not return 0, + # then there is an error to echo to the user + if [ $? -ne 0 ] ; then + "${basedir}"/sbin/mysqld --defaults-file="${my_cnf}" --help --verbose > /dev/null + fi + fi + + eend $? "${svc_name} config check failed" +} + +# vim: filetype=gentoo-init-d sw=2 ts=2 sts=2 noet: + diff --git a/dev-db/mysql-init-scripts/files/log-s6 b/dev-db/mysql-init-scripts/files/log-s6 new file mode 100644 index 000000000000..15be384fc734 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/log-s6 @@ -0,0 +1,12 @@ +#!/bin/sh +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +if [ -e ./env ] ; then source ./env ; else echo "failed to source env" ; fi +mkdir -p "/var/log/mysql/${SVCNAME}" +if [ ${S6_LOG_OPTIONS} ] ; then + exec s6-log ${S6_LOG_OPTIONS} +else + exec s6-log -b n20 S15000000 !"gzip -nq9" "/var/log/mysql/${SVCNAME}" +fi diff --git a/dev-db/mysql-init-scripts/files/logrotate.mysql b/dev-db/mysql-init-scripts/files/logrotate.mysql new file mode 100644 index 000000000000..2367d938c045 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/logrotate.mysql @@ -0,0 +1,15 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +/var/log/mysql/mysql.err /var/log/mysql/mysql.log /var/log/mysql/mysqld.err { +monthly +create 660 mysql mysql +notifempty +size 5M +sharedscripts +missingok +postrotate +[ -f /var/run/mysqld/mysqld.pid ] && /bin/kill -HUP `cat /var/run/mysqld/mysqld.pid` +endscript +} diff --git a/dev-db/mysql-init-scripts/files/mysql.conf b/dev-db/mysql-init-scripts/files/mysql.conf new file mode 100644 index 000000000000..74cd5f836e76 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/mysql.conf @@ -0,0 +1 @@ +d /var/run/mysqld 0755 mysql mysql - diff --git a/dev-db/mysql-init-scripts/files/mysqld-wait-ready b/dev-db/mysql-init-scripts/files/mysqld-wait-ready new file mode 100644 index 000000000000..9e5d3e4d85e0 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/mysqld-wait-ready @@ -0,0 +1,56 @@ +#!/bin/sh + +# This script waits for mysqld to be ready to accept connections +# (which can be many seconds or even minutes after launch, if there's +# a lot of crash-recovery work to do). +# Running this as ExecStartPost is useful so that services declared as +# "After mysqld" won't be started until the database is really ready. + +# Service file passes us the daemon's PID (actually, mysqld_safe's PID) +daemon_pid="$1" + +# extract value of a MySQL option from config files +# Usage: get_mysql_option SECTION VARNAME DEFAULT +# result is returned in $result +# We use my_print_defaults which prints all options from multiple files, +# with the more specific ones later; hence take the last match. +get_mysql_option(){ + result=`/usr/bin/my_print_defaults "$1" | sed -n "s/^--$2=//p" | tail -n 1` + if [ -z "$result" ]; then + # not found, use default + result="$3" + fi +} + +# Defaults here had better match what mysqld_safe will default to +get_mysql_option mysqld datadir "/var/lib/mysql" +datadir="$result" +get_mysql_option mysqld socket "/var/lib/mysql/mysql.sock" +socketfile="$result" + +# Wait for the server to come up or for the mysqld process to disappear +ret=0 +while /bin/true; do + RESPONSE=`/usr/bin/mysqladmin --no-defaults --socket="$socketfile" --user=UNKNOWN_MYSQL_USER ping 2>&1` + mret=$? + if [ $mret -eq 0 ]; then + break + fi + # exit codes 1, 11 (EXIT_CANNOT_CONNECT_TO_SERVICE) are expected, + # anything else suggests a configuration error + if [ $mret -ne 1 -a $mret -ne 11 ]; then + ret=1 + break + fi + # "Access denied" also means the server is alive + echo "$RESPONSE" | grep -q "Access denied for user" && break + + # Check process still exists + if ! /bin/kill -0 $daemon_pid 2>/dev/null; then + ret=1 + break + fi + sleep 1 +done + +exit $ret diff --git a/dev-db/mysql-init-scripts/files/mysqld.service b/dev-db/mysql-init-scripts/files/mysqld.service new file mode 100644 index 000000000000..de9ea2f1ec31 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/mysqld.service @@ -0,0 +1,26 @@ +[Unit] +Description=MySQL database server +After=syslog.target +After=network.target + +[Service] +Type=simple +User=mysql +Group=mysql + +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# https://bugzilla.redhat.com/show_bug.cgi?id=547485 +ExecStart=/usr/bin/mysqld_safe --basedir=/usr +ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# We rely on systemd, not mysqld_safe, to restart mysqld if it dies +Restart=always + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/dev-db/mysql-init-scripts/files/mysqld_at.service b/dev-db/mysql-init-scripts/files/mysqld_at.service new file mode 100644 index 000000000000..f46cf9e3ebf0 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/mysqld_at.service @@ -0,0 +1,26 @@ +[Unit] +Description=MySQL database server +ConditionPathExists=/etc/mysql/my%I.cnf +After=network.target + +[Service] +Type=simple +User=mysql +Group=mysql + +# Note: we set --basedir to prevent probes that might trigger SELinux alarms, +# https://bugzilla.redhat.com/show_bug.cgi?id=547485 +ExecStart=/usr/bin/mysqld_safe --defaults-file=/etc/mysql/my%I.cnf --basedir=/usr +ExecStartPost=/usr/libexec/mysqld-wait-ready $MAINPID + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# We rely on systemd, not mysqld_safe, to restart mysqld if it dies +Restart=always + +# Place temp files in a secure directory, not /tmp +PrivateTmp=true + +[Install] +WantedBy=multi-user.target diff --git a/dev-db/mysql-init-scripts/files/run-s6 b/dev-db/mysql-init-scripts/files/run-s6 new file mode 100644 index 000000000000..e493a7bf35f4 --- /dev/null +++ b/dev-db/mysql-init-scripts/files/run-s6 @@ -0,0 +1,7 @@ +#!/bin/sh +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +if [ -e ./env ] ; then source ./env ; else echo "failed to source env" ; fi +exec "${basedir}/sbin/mysqld" --defaults-file="${MY_CNF}" ${MY_ARGS} 2>&1 diff --git a/dev-db/mysql-init-scripts/metadata.xml b/dev-db/mysql-init-scripts/metadata.xml new file mode 100644 index 000000000000..abf3529deac0 --- /dev/null +++ b/dev-db/mysql-init-scripts/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mysql</herd> +</pkgmetadata> diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.0-r1.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0-r1.ebuild new file mode 100644 index 000000000000..13da3d528eb5 --- /dev/null +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.0-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit systemd + +DESCRIPTION="Gentoo MySQL init scripts" +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +DEPEND="" +# This _will_ break with MySQL 5.0, 4.x, 3.x +# It also NEEDS openrc for the save_options/get_options builtins. +RDEPEND="!<dev-db/mysql-5.1" +# Need to set S due to PMS saying we need it existing, but no SRC_URI +S=${WORKDIR} + +src_install() { + newconfd "${FILESDIR}/conf.d-${PV}" "mysql" + newinitd "${FILESDIR}/init.d-${PV}" "mysql" + + # systemd unit installation + exeinto /usr/libexec + doexe "${FILESDIR}"/mysqld-wait-ready + systemd_dounit "${FILESDIR}/mysqld.service" + systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" + systemd_dotmpfilesd "${FILESDIR}/mysql.conf" + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate.mysql" "mysql" +} + +pkg_postinst() { + grep -sq mysql_slot "${ROOT}"/etc/conf.d/mysql + old_conf_present=$? + grep -sq get_slot_config "${ROOT}"/etc/init.d/mysql + old_init_present=$? + + egrep -sq 'MY_CNF|MY_ARGS|(STARTUP|STOP)_TIMEOUT' "${ROOT}"/etc/conf.d/mysql + new_conf_present=$? + egrep -sq 'MY_ARGS|STOP_TIMEOUT' "${ROOT}"/etc/init.d/mysql + new_init_present=$? + + einfo "Please note that if you are using multiple internal 'slots' in the" + einfo "old conf.d file, you should use multiple init files now." + echo old $old_conf_present $old_init_present + echo new $new_conf_present $new_init_present + + # new scripts present + if [ $new_conf_present -eq 0 -a $new_init_present -eq 0 -a \ + $old_conf_present -eq 1 -a $old_init_present -eq 1 ]; then + : + elif [ $old_conf_present -eq 0 -a $old_init_present -eq 0 -a \ + $new_conf_present -eq 1 -a $new_init_present -eq 1 ]; then + ewarn "Old /etc/init.d/mysql and /etc/conf.d/mysql still present!" + ewarn "Update both of those files to the new versions!" + else + eerror "DANGER, mixed update of /etc/init.d/mysql and /etc/conf.d/mysql" + eerror "detected! You must update BOTH to the new versions" + fi +} diff --git a/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild new file mode 100644 index 000000000000..05983a5ca254 --- /dev/null +++ b/dev-db/mysql-init-scripts/mysql-init-scripts-2.1_alpha4.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit systemd s6 + +DESCRIPTION="Gentoo MySQL init scripts." +HOMEPAGE="http://www.gentoo.org/" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd" +IUSE="" + +DEPEND="" +# This _will_ break with MySQL 5.0, 4.x, 3.x +# It also NEEDS openrc for the save_options/get_options builtins. +# The s6 support was added after openrc 0.16.2 +RDEPEND=" + !<dev-db/mysql-5.1 + !<sys-apps/openrc-0.16.2 + " +# Need to set S due to PMS saying we need it existing, but no SRC_URI +S=${WORKDIR} + +src_install() { + newconfd "${FILESDIR}/conf.d-2.0" "mysql" + + # s6 init scripts + if use amd64 || use x86 ; then + newconfd "${FILESDIR}/conf.d-2.0" "mysql-s6" + newinitd "${FILESDIR}/init.d-s6" "mysql-s6" + s6_install_service mysql "${FILESDIR}/run-s6" + s6_install_service mysql/log "${FILESDIR}/log-s6" + fi + + newinitd "${FILESDIR}/init.d-2.0" "mysql" + + # systemd unit installation + exeinto /usr/libexec + doexe "${FILESDIR}"/mysqld-wait-ready + systemd_dounit "${FILESDIR}/mysqld.service" + systemd_newunit "${FILESDIR}/mysqld_at.service" "mysqld@.service" + systemd_dotmpfilesd "${FILESDIR}/mysql.conf" + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate.mysql" "mysql" +} + +pkg_postinst() { + if use amd64 || use x86 ; then + elog "To use the mysql-s6 script, you need to install the optional sys-apps/s6 package." + elog "If you wish to use s6 logging support, comment out the log-error setting in your my.cnf" + fi +} diff --git a/dev-db/mysql-proxy/Manifest b/dev-db/mysql-proxy/Manifest new file mode 100644 index 000000000000..1a9dc987aca4 --- /dev/null +++ b/dev-db/mysql-proxy/Manifest @@ -0,0 +1 @@ +DIST mysql-proxy-0.8.2.tar.gz 861995 SHA256 3955d9a60249d36b2c5c949706f7a3294419d2563c1e8474164a3a307865f550 SHA512 e083ea6344bf2d3b85a38127e42cbab659a959684f7f0f63272fa0df926d6d32dbbaaab2b6479ee8fc227fbc9af6f24e855d19700ec1ab4b904c5e638b4d64c8 WHIRLPOOL e7c3355b221c7d150004a3bcb02db28c67759d9c83f9d8d4219c2b8e403d176fdbe562e05f5e7ea1e6768f78144a4438678991fcc974448e2c271405d8c6f3a2 diff --git a/dev-db/mysql-proxy/files/mysql-proxy.cnf b/dev-db/mysql-proxy/files/mysql-proxy.cnf new file mode 100644 index 000000000000..7d15674f6b9d --- /dev/null +++ b/dev-db/mysql-proxy/files/mysql-proxy.cnf @@ -0,0 +1,47 @@ +# MySQL Proxy's configuration file (mysql-proxy.cnf) +# This file must be 0660 or more restrictive +# otherwise mysql-proxy will refuse to load +[mysql-proxy] +#basedir = ... +#daemon = true +#defaults-file = ... +#event-threads = ... +keepalive = true +log-backtrace-on-crash = true +log-file = /var/log/mysql/mysql-proxy.log +log-level = warning +#log-use-syslog = true +#lua-cpath = ... +#lua-path = ... +#max-open-files = ... +pid-file = /var/run/mysql-proxy.pid +#plugin-dir = ... +#plugins = admin,proxy,debug,replicant +#plugins = admin,proxy +plugins = proxy +#user = ... + +# module: admin +admin-address = 127.0.0.1:4041 +#admin-lua-script = ... +#admin-password = ... +#admin-username = ... + +# module: proxy +#no-proxy = false +proxy-address = 127.0.0.1:4040 +proxy-backend-addresses = 127.0.0.1:3306 +proxy-fix-bug-25371 = false +#proxy-lua-script = ... +#proxy-pool-no-change-user = ... +#proxy-read-only-backend-addresses = ... +proxy-skip-profiling = false + +# module: replicant +#replicant-master-address = ... +#replicant-username = ... +#replicant-password = ... +#replicant-read-binlogs = ... + +# module: debug +debug-address = 127.0.0.1:4043 diff --git a/dev-db/mysql-proxy/files/mysql-proxy.confd b/dev-db/mysql-proxy/files/mysql-proxy.confd new file mode 100644 index 000000000000..079530159f82 --- /dev/null +++ b/dev-db/mysql-proxy/files/mysql-proxy.confd @@ -0,0 +1,12 @@ +# /etc/conf.d/mysql-proxy: config file for /etc/init.d/mysql-proxy + +# location of pidfile +PIDFILE="/var/run/mysql-proxy.pid" + +# general options for mysql-proxy +# do NOT specify --daemon or --pid-file=... here! +OPTS="--log-use-syslog" + +# if you want mysql-proxy to depend on mysql, enable this: +#RC_NEED="mysql" # baselayout-1 +#rc_need="mysql" # baselayout-2/OpenRC diff --git a/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1 b/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1 new file mode 100644 index 000000000000..8b86431a3d8f --- /dev/null +++ b/dev-db/mysql-proxy/files/mysql-proxy.confd-0.8.0-r1 @@ -0,0 +1,12 @@ +# /etc/conf.d/mysql-proxy: config file for /etc/init.d/mysql-proxy + +# location of pidfile +PIDFILE="/var/run/mysql-proxy.pid" + +# general options for mysql-proxy +# do NOT specify --daemon or --pid-file=... here! +OPTS="--defaults-file=/etc/mysql/mysql-proxy.cnf" + +# if you want mysql-proxy to depend on mysql, enable this: +#RC_NEED="mysql" # baselayout-1 +#rc_need="mysql" # baselayout-2/OpenRC diff --git a/dev-db/mysql-proxy/files/mysql-proxy.initd b/dev-db/mysql-proxy/files/mysql-proxy.initd new file mode 100755 index 000000000000..fbbc8df72d97 --- /dev/null +++ b/dev-db/mysql-proxy/files/mysql-proxy.initd @@ -0,0 +1,23 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need net +} + +start() { + ebegin "Starting MySQL Proxy" + start-stop-daemon --start --quiet \ + --exec /usr/bin/mysql-proxy \ + -- --daemon --pid-file="${PIDFILE}" ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping MySQL Proxy" + start-stop-daemon --stop --quiet \ + --pidfile "${PIDFILE}" + eend $? +} diff --git a/dev-db/mysql-proxy/metadata.xml b/dev-db/mysql-proxy/metadata.xml new file mode 100644 index 000000000000..44ff01d6a5d3 --- /dev/null +++ b/dev-db/mysql-proxy/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>neurogeek@gentoo.org</email> + <name>Jesus Rivero</name> + <description>Primary maintainer</description> + </maintainer> + <longdescription> +MySQL Proxy is a simple program that sits between your client and MySQL +server(s) that can monitor, analyze or transform their communication. Its +flexibility allows for unlimited uses; common ones include: load balancing; +failover; query analysis; query filtering and modification; and many more. +</longdescription> + <upstream> + <remote-id type="launchpad">mysql-proxy</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild b/dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild new file mode 100644 index 000000000000..c36723282cbd --- /dev/null +++ b/dev-db/mysql-proxy/mysql-proxy-0.8.2-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils versionator + +MY_PV=$(get_version_component_range 1-2) +DESCRIPTION="A Proxy for the MySQL Client/Server protocol" +HOMEPAGE="http://dev.mysql.com/doc/mysql-proxy/en/" +SRC_URI="https://launchpad.net/${PN}/${MY_PV}/${PV}/+download/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="examples" +RDEPEND=">=dev-libs/libevent-2.1 + >=dev-libs/glib-2.16 + >=dev-lang/lua-5.1:0" +DEPEND="${RDEPEND} + >=virtual/mysql-5.0 + virtual/pkgconfig" + +src_prepare() { + sed -i \ + -e 's|_EVENT_VERSION|LIBEVENT_VERSION|g' \ + src/chassis-mainloop.c || die +} + +src_configure() { + econf \ + --includedir=/usr/include/${PN} \ + --with-mysql \ + --with-lua \ + || die "econf failed" +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed" + newinitd "${FILESDIR}"/${PN}.initd ${PN} || die + newconfd "${FILESDIR}"/${PN}.confd-0.8.0-r1 ${PN} || die + dodoc ChangeLog NEWS README + if use examples; then + docinto examples + dodoc examples/*.lua || die + dodoc lib/*.lua || die + fi + # mysql-proxy will refuse to start unless the config file is at most 0660. + insinto /etc/mysql + insopts -m0660 + doins "${FILESDIR}"/${PN}.cnf || die +} diff --git a/dev-db/mysql-super-smack/Manifest b/dev-db/mysql-super-smack/Manifest new file mode 100644 index 000000000000..5812e917a00d --- /dev/null +++ b/dev-db/mysql-super-smack/Manifest @@ -0,0 +1 @@ +DIST super-smack-1.3.tar.gz 155375 SHA256 969d40e772faa8580f8e8f2dfa2a381fbadbd79fc0c94304347d594dba2a9bd9 SHA512 5343fa78bdf483c1019c9e25d1fdb15581342d49b863a536eb1cf8c38bde5641fdf135fe5a8ec87f74051fd9766b2f5e4f09f963afe2eb1cd7ea41edfa260920 WHIRLPOOL df63a45d1b860d888b1d2abcd6d82c17f1551554416d249f4ad86a11e82e5ca7de61bb855e94472fe447b08ce37c6de86f3e2c64cc7dc7de52913bf3e43d66c1 diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch new file mode 100644 index 000000000000..02399905a11e --- /dev/null +++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.2.destdir.patch @@ -0,0 +1,13 @@ +--- super-smack-1.2/Makefile.am.orig 2004-02-23 19:57:22.000000000 -0800 ++++ super-smack-1.2/Makefile.am 2004-02-23 19:57:40.000000000 -0800 +@@ -23,8 +23,8 @@ + DATADIR= @DATADIR@ + + install-data-local: +- $(mkinstalldirs) $(SMACKS_DIR) $(DATADIR) +- cp -rp $(srcdir)/smacks/* $(SMACKS_DIR) ++ $(mkinstalldirs) $(DESTDIR)$(SMACKS_DIR) $(DESTDIR)$(DATADIR) ++ cp -rp $(srcdir)/smacks/* $(DESTDIR)$(SMACKS_DIR) + + + dist-hook: diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch new file mode 100644 index 000000000000..6cf69580b887 --- /dev/null +++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-automake-1.13.patch @@ -0,0 +1,256 @@ +diff -aurwN a/configure.ac b/configure.ac +--- a/configure.ac 2014-06-20 14:43:52.744753334 -0400 ++++ b/configure.ac 2014-06-20 14:59:51.263609319 -0400 +@@ -16,9 +16,9 @@ + + # Process this file with autoconf to produce a configure script. + +-AC_INIT() ++AC_INIT([super-smack], [1.1]) + AM_CONFIG_HEADER(config.h) +-AM_INIT_AUTOMAKE(super-smack, 1.1) ++AM_INIT_AUTOMAKE + AC_DEFINE_UNQUOTED(VERSION, "$VERSION") + + # Checks for programs. +@@ -31,6 +31,14 @@ + AM_PROG_LEX + AC_PROG_YACC + ++AH_TEMPLATE([HAVE_CRYPT], [Define if we have a crypt()]) ++AH_TEMPLATE([HAVE_MYSQL], [MySQL Support]) ++AH_TEMPLATE([HAVE_ORACLE], [PostgreSQL Support]) ++AH_TEMPLATE([HAVE_PGSQL], [Oracle Support]) ++AH_TEMPLATE([SMACK_DATADIR], [Sample .smack data files]) ++ ++AC_CONFIG_MACRO_DIRS([m4]) ++ + # get super-smack datadir + AC_ARG_WITH(datadir, + [ --with-datadir=DIR Specify default smack datadir], +diff -aurwN a/m4/crypt.m4 b/m4/crypt.m4 +--- a/m4/crypt.m4 1969-12-31 19:00:00.000000000 -0500 ++++ b/m4/crypt.m4 2014-06-20 15:06:42.289976907 -0400 +@@ -0,0 +1,5 @@ ++AC_DEFUN([AC_FUNC_CRYPT], [ ++ AC_CHECK_LIB(crypt, crypt) ++ AC_CHECK_FUNC(crypt, AC_DEFINE(HAVE_CRYPT)) ++]) ++ +diff -aruwN a/m4/lex.m4 b/m4/lex.m4 +--- a/m4/lex.m4 1969-12-31 19:00:00.000000000 -0500 ++++ b/m4/lex.m4 2014-06-20 16:51:23.548854098 -0400 +@@ -0,0 +1,6 @@ ++AC_DEFUN([AM_PROG_LEX], ++[missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) ++AC_CHECK_PROGS(LEX, flex lex, "$missing_dir/missing flex") ++AC_PROG_LEX ++AC_DECL_YYTEXT]) ++ +diff -aurwN a/m4/libz.m4 b/m4/libz.m4 +--- a/m4/libz.m4 1969-12-31 19:00:00.000000000 -0500 ++++ b/m4/libz.m4 2014-06-20 15:06:24.260569878 -0400 +@@ -0,0 +1,4 @@ ++AC_DEFUN([AC_LIB_Z], [ ++ AC_CHECK_LIB(z, compress) ++]) ++ +diff -aurwN a/m4/mysql.m4 b/m4/mysql.m4 +--- a/m4/mysql.m4 1969-12-31 19:00:00.000000000 -0500 ++++ b/m4/mysql.m4 2014-06-20 15:10:48.291892456 -0400 +@@ -0,0 +1,76 @@ ++#serial 1 ++AC_DEFUN([AC_LIB_MYSQL], [ ++ AC_ARG_WITH(mysql-lib, ++ [ --with-mysql-lib=DIR Look for MySQL client library in DIR], ++ mysql_lib=$withval, mysql_lib="") ++ ++ if test "x$want_mysql" = "xyes" ++ then ++ AC_MSG_CHECKING([for libmysqlclient]) ++ AC_MSG_RESULT() ++ ++ mysql_ok=no ++ ++ SAVE_LIBS=$LIBS ++ ++ mysql_lib="$mysql_lib /usr/lib /usr/lib/mysql \ ++ /usr/local/lib /usr/local/lib/mysql \ ++ /usr/local/mysql/lib" ++ ++ for dir in $mysql_lib; do ++ if test "x$mysql_found" != "xyes" ++ then ++ if test -f "$dir/libmysqlclient.so" ; ++ then ++ LIBS="-L$dir $SAVE_LIBS $LIBZ_LIB" ++ MYSQL_LIB="-L$dir -lmysqlclient $LIBZ_LIB" ++ AC_SUBST(MYSQL_LIB) ++ AC_CHECK_LIB(mysqlclient, mysql_real_connect, ++ mysql_ok=yes, mysql_ok=no) ++ fi ++ fi ++ done ++ ++ if test "x$mysql_ok" != "xyes" ++ then ++ AC_MSG_ERROR([Could not find libmysqlclient in '$mysql_lib']) ++ fi ++ fi ++]) ++ ++AC_DEFUN([AC_HEADER_MYSQL], [ ++ AC_ARG_WITH(mysql-include, ++ [ --with-mysql-include=DIR ++ Look for MySQL include files in DIR], ++ mysql_include=$withval, mysql_include="") ++ ++ if test "x$want_mysql" = "xyes" ++ then ++ AC_MSG_CHECKING([for mysql.h]) ++ AC_MSG_RESULT() ++ ++ mysql_found=no ++ ++ mysql_include="$mysql_include /usr/include /usr/include/mysql \ ++ /usr/local/include /usr/local/include/mysql \ ++ /usr/local/mysql/include" ++ ++ for dir in $mysql_include; do ++ if test "x$mysql_found" != "xyes" ++ then ++ if test -f "$dir/mysql.h" ++ then ++ MYSQL_INCLUDE="-I$dir" ++ AC_SUBST(MYSQL_INCLUDE) ++ mysql_found=yes ++ fi ++ fi ++ done ++ ++ if test "x$mysql_found" != "xyes" ++ then ++ AC_MSG_ERROR([Could not find mysql.h in '$mysql_include']) ++ fi ++ fi ++]) ++ +diff -aurwN a/m4/oracle.m4 b/m4/oracle.m4 +--- a/m4/oracle.m4 1969-12-31 19:00:00.000000000 -0500 ++++ b/m4/oracle.m4 2014-06-20 15:05:05.543169365 -0400 +@@ -0,0 +1,10 @@ ++AC_DEFUN([AC_LIB_ORACLE], [ ++ ORACLE_LIB="" ++ AC_SUBST(ORACLE_LIB) ++]) ++ ++AC_DEFUN([AC_HEADER_ORACLE], [ ++ ORACLE_INCLUDE="" ++ AC_SUBST(ORACLE_INCLUDE) ++]) ++ +diff -aurwN a/m4/postgresql.m4 b/m4/postgresql.m4 +--- a/m4/postgresql.m4 1969-12-31 19:00:00.000000000 -0500 ++++ b/m4/postgresql.m4 2014-06-20 15:06:09.311064874 -0400 +@@ -0,0 +1,75 @@ ++AC_DEFUN([AC_LIB_PGSQL], [ ++ AC_ARG_WITH(pgsql-lib, ++ [ --with-pgsql-lib=DIR Look for PostgreSQL client library in DIR], ++ pgsql_lib=$withval, pgsql_lib="") ++ ++ if test "x$want_pgsql" = "xyes" ++ then ++ AC_MSG_CHECKING([for libpq]) ++ AC_MSG_RESULT() ++ ++ pgsql_ok=no ++ ++ SAVE_LIBS=$LIBS ++ ++ pgsql_lib="$pgsql_lib /usr/lib /usr/lib/pgsql \ ++ /usr/local/lib /usr/local/lib/pgsql \ ++ /usr/local/pgsql/lib" ++ ++ for dir in $pgsql_lib; do ++ if test "x$pgsql_found" != "xyes" ++ then ++ if test -f "$dir/libpq.so" ++ then ++ LIBS="-L$dir $SAVE_LIBS" ++ PGSQL_LIB="-L$dir -lpq" ++ AC_SUBST(PGSQL_LIB) ++ AC_CHECK_LIB(pq, PQconnectdb, ++ pgsql_ok=yes, pgsql_ok=no) ++ fi ++ fi ++ done ++ ++ if test "x$pgsql_ok" != "xyes" ++ then ++ AC_MSG_ERROR([Could not find libpq in '$pgsql_lib']) ++ fi ++ fi ++]) ++ ++AC_DEFUN([AC_HEADER_PGSQL], [ ++ AC_ARG_WITH(pgsql-include, ++ [ --with-pgsql-include=DIR ++ Look for PostgreSQL include files in DIR], ++ pgsql_include=$withval, pgsql_include="") ++ ++ if test "x$want_pgsql" = "xyes" ++ then ++ AC_MSG_CHECKING([for libpq-fe.h]) ++ AC_MSG_RESULT() ++ ++ pgsql_found=no ++ ++ pgsql_include="$pgsql_include /usr/include /usr/include/pgsql \ ++ /usr/local/include /usr/local/include/pgsql \ ++ /usr/local/pgsql/include" ++ ++ for dir in $pgsql_include; do ++ if test "x$pgsql_found" != "xyes" ++ then ++ if test -f "$dir/libpq-fe.h" ++ then ++ PGSQL_INCLUDE="-I$dir" ++ AC_SUBST(PGSQL_INCLUDE) ++ pgsql_found=yes ++ fi ++ fi ++ done ++ ++ if test "x$pgsql_found" != "xyes" ++ then ++ AC_MSG_ERROR([Could not find libpq-fe.h in '$pgsql_include']) ++ fi ++ fi ++]) ++ +diff -aurwN a/src/Makefile.am b/src/Makefile.am +--- a/src/Makefile.am 2014-06-20 14:37:35.266956252 -0400 ++++ b/src/Makefile.am 2014-06-20 15:12:40.278227315 -0400 +@@ -16,7 +16,8 @@ + + # Process this file with automake to create Makefile.in + +-INCLUDES = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ @ORACLE_INCLUDE@ ++AM_CPPFLAGS = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ @ORACLE_INCLUDE@ ++BUILT_SOURCES = super-smack-yacc.hh + + noinst_PROGRAMS=test-dictionary test-client test_tcp_client + bin_PROGRAMS=super-smack super-smack-gen-data +diff -aurN a/src/super-smack-lex.ll b/src/super-smack-lex.ll +--- a/src/super-smack-lex.ll 2003-05-14 21:08:34.000000000 -0400 ++++ b/src/super-smack-lex.ll 2014-06-24 08:56:05.970614176 -0400 +@@ -6,7 +6,7 @@ + #include <ctype.h> + #include "query.h" + #include "parse.h" +- #include "super-smack-yacc.h" ++ #include "super-smack-yacc.hh" + + static string q_str = ""; + %} + diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch new file mode 100644 index 000000000000..37abfe35ec97 --- /dev/null +++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3-gen-data.patch @@ -0,0 +1,45 @@ +diff -Nuar super-smack-1.3.orig/smacks/select-key.smack super-smack-1.3/smacks/select-key.smack +--- super-smack-1.3.orig/smacks/select-key.smack 2005-05-30 03:04:38.000000000 -0700 ++++ super-smack-1.3/smacks/select-key.smack 2008-11-13 22:27:48.125627179 -0800 +@@ -24,7 +24,7 @@ + min_rows "90000"; // the table must have at least that many rows + data_file "words.dat"; // if the table is empty, load the data from + //this file +- gen_data_file "gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d"; ++ gen_data_file "super-smack-gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d"; + // if the file above does not exist, generate it with the above shell command + // you can replace this command with anything that prints comma-delimited + // data to stdout, just make sure you have the right number of columns +diff -Nuar super-smack-1.3.orig/smacks/update-select.smack super-smack-1.3/smacks/update-select.smack +--- super-smack-1.3.orig/smacks/update-select.smack 2005-05-30 03:04:51.000000000 -0700 ++++ super-smack-1.3/smacks/update-select.smack 2008-11-13 22:27:45.070167829 -0800 +@@ -24,7 +24,7 @@ + min_rows "90000"; // the table must have at least that many rows + data_file "words.dat"; // if the table is empty, load the data from + //this file +- gen_data_file "gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d"; ++ gen_data_file "super-smack-gen-data -n 90000 -f %12-12s%n,%25-25s,%n,%d"; + // if the file above does not exist, generate it with the above command + } + +diff -Nuar super-smack-1.3.orig/src/Makefile.am super-smack-1.3/src/Makefile.am +--- super-smack-1.3.orig/src/Makefile.am 2001-02-24 03:44:30.000000000 -0800 ++++ super-smack-1.3/src/Makefile.am 2008-11-13 22:27:37.693573246 -0800 +@@ -19,7 +19,7 @@ + INCLUDES = @MYSQL_INCLUDE@ @PGSQL_INCLUDE@ @ORACLE_INCLUDE@ + + noinst_PROGRAMS=test-dictionary test-client test_tcp_client +-bin_PROGRAMS=super-smack gen-data ++bin_PROGRAMS=super-smack super-smack-gen-data + test_dictionary_SOURCES=test-dictionary.cc \ + dictionary.cc dictionary.h \ + die.cc die.h \ +@@ -57,7 +57,7 @@ + tcp_client.h tcp_client.cc + super_smack_LDADD = @MYSQL_LIB@ @PGSQL_LIB@ @ORACLE_LIB@ + +-gen_data_SOURCES=gen-data.cc die.cc die.h ++super_smack_gen_data_SOURCES=gen-data.cc die.cc die.h + + # yacc needs to generate a y.tab.h + YFLAGS = -d diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch new file mode 100644 index 000000000000..c2c5db0c56f0 --- /dev/null +++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.amd64.patch @@ -0,0 +1,20 @@ +--- supesmack-1.3/src/query.cc.orig 2005-04-30 14:51:29.000000000 +0100 ++++ supesmack-1.3/src/query.cc 2006-08-15 22:06:06.000000000 +0100 +@@ -197,7 +197,7 @@ + { + string s((*i).first); + int str_len = (*i).first.length(); +- if((unsigned)p + str_len + 3 *sizeof(int) < (unsigned)p_end ) ++ if((unsigned long)p + str_len + 3 *sizeof(int) < (unsigned long)p_end ) + { + *p++ = (char) str_len; + const char* q_type_name = s.c_str(); +@@ -216,7 +216,7 @@ + die(0, "report buffer overflow -- too many query types"); + } + +- len = (unsigned)p - (unsigned)buf; ++ len = (unsigned long)p - (unsigned long)buf; + *(buf) = num_recs; + + if(write(fd, buf, len) != len) diff --git a/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch new file mode 100644 index 000000000000..23bcd56e019c --- /dev/null +++ b/dev-db/mysql-super-smack/files/mysql-super-smack-1.3.gcc4.3.patch @@ -0,0 +1,9 @@ +--- src/dictionary.h.orig 2008-10-31 19:12:51.000000000 +0100 ++++ src/dictionary.h 2008-10-31 19:13:12.000000000 +0100 +@@ -23,6 +23,7 @@ + + #include <string> + #include <vector> ++#include <cstring> + #include <time.h> + #include <stdlib.h> diff --git a/dev-db/mysql-super-smack/metadata.xml b/dev-db/mysql-super-smack/metadata.xml new file mode 100644 index 000000000000..51ac8e7be178 --- /dev/null +++ b/dev-db/mysql-super-smack/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mysql</herd> + <maintainer><email>robbat2@gentoo.org</email></maintainer> +</pkgmetadata> diff --git a/dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild b/dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild new file mode 100644 index 000000000000..bd1fc8638faf --- /dev/null +++ b/dev-db/mysql-super-smack/mysql-super-smack-1.3-r3.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +WANT_AUTOMAKE="1.13" +AUTOTOOLS_AUTORECONF="YES" +#AUTOTOOLS_IN_SOURCE_BUILD="YES" + +inherit eutils autotools-utils + +MY_PN="super-smack" +MY_P="${MY_PN}-${PV}" +DESCRIPTION="Benchmarking, stress testing, and load generation tool for MySQL & PostGreSQL" +HOMEPAGE="http://vegan.net/tony/supersmack/" +SRC_URI="http://vegan.net/tony/supersmack/${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ~ppc x86" +IUSE="+mysql postgres" +REQUIRED_USE="|| ( mysql postgres )" + +DEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql[server] )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.2.destdir.patch + "${FILESDIR}"/${PN}-1.3.amd64.patch + "${FILESDIR}"/${PN}-1.3.gcc4.3.patch + "${FILESDIR}"/${PN}-1.3-gen-data.patch + "${FILESDIR}"/${PN}-1.3-automake-1.13.patch +) +DOCS=( CHANGES INSTALL MANUAL README TUTORIAL ) + +src_prepare() { + # Clean up files so eautoreconf does not pick up any + # deprecated autotools macros. + rm acinclude.m4 aclocal.m4 acconfig.h config.status config.h || die + mv configure.in configure.ac || die + autotools-utils_src_prepare +} + +src_configure() { + local myeconfargs=( + $(usex mysql --with-mysql "") + $(usex postgres --with-pgsql "") + --with-datadir=/var/tmp/${MY_PN} + --with-smacks-dir=/usr/share/${MY_PN} + ) + autotools-utils_src_configure +} + +pkg_postinst() { + elog "The gen-data binary is now installed as super-smack-gen-data" +} diff --git a/dev-db/mysql-udf-base64/Manifest b/dev-db/mysql-udf-base64/Manifest new file mode 100644 index 000000000000..efd5a74f76df --- /dev/null +++ b/dev-db/mysql-udf-base64/Manifest @@ -0,0 +1,2 @@ +DIST mysql-udf-base64-20010618.c 7106 SHA256 6d1efdee8489ee2b5d133d0d8997dce08d417d511b8dc80019bed2ca44a56472 SHA512 23d2d1da7481626ebdb8ca3e31d01ae17903ff431415c7bca6ab20e414dc8751ab105a73e55b66a380e0e11ac0fc949b79d5f3c34f3d353abc1a52627be45f86 WHIRLPOOL 2ed00abd547ed54a38adece50682f4866bcdae8d5e72aaa9b113bfdafbfcab20ed8d321b4cd664d145bf4f8d193dca85a175bc8e40cf3163a4f04514f5c297b8 +DIST mysql-udf-base64-20010618.readme 222 SHA256 39f41fd56716021358b2f49c290871ca6618fba77ad45ce8c904250a569c09a9 SHA512 2e2a17d7d1f1435bda59c89529e38a4843be814de5cb0db57643f8feb99a59cadf1e518e2903c470cd5931a964541dc5cc5d1b7f9041e7ed49442c37f139b2aa WHIRLPOOL 3f3abbc448e23a0642e43f70bffa81771eea344b266d41859b91f0d1ced6c9ba16229e4c5109a8e29f2df2c4b6671c8f84ce95bb410aac7ec1aa2d1bef6b92ac diff --git a/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch b/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch new file mode 100644 index 000000000000..5084a9dd0128 --- /dev/null +++ b/dev-db/mysql-udf-base64/files/mysql-udf-base64-signedness.patch @@ -0,0 +1,29 @@ +--- mysql-udf-base64.c.orig 2011-10-16 14:17:13.000000000 +0200 ++++ mysql-udf-base64.c 2011-10-16 14:18:41.000000000 +0200 +@@ -49,7 +49,7 @@ + #include <string.h> + #include <mysql/mysql.h> + +-static char base64_table[] = ++static const char base64_table[] = + { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', +@@ -101,7 +101,7 @@ + unsigned long len; + + /* *is_null=0; */ +- current = args->args[0]; ++ current = (unsigned char*) args->args[0]; + len = args->lengths[0]; + + if (len <= 0 || args->arg_type[0] != STRING_RESULT ) +@@ -211,7 +211,7 @@ + } + } + +- current = args->args[0]; ++ current = (unsigned char*) args->args[0]; + len = args->lengths[0]; + + if (len <= 0 || args->arg_type[0] != STRING_RESULT ) diff --git a/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql b/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql new file mode 100644 index 000000000000..619d4b0013d2 --- /dev/null +++ b/dev-db/mysql-udf-base64/files/mysql-udf-base64.sql @@ -0,0 +1,5 @@ +drop function base64encode; +drop function base64decode; + +create function base64encode returns string soname 'mysql_udf_base64.so'; +create function base64decode returns string soname 'mysql_udf_base64.so'; diff --git a/dev-db/mysql-udf-base64/metadata.xml b/dev-db/mysql-udf-base64/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/mysql-udf-base64/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild b/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild new file mode 100644 index 000000000000..89b942b0b31c --- /dev/null +++ b/dev-db/mysql-udf-base64/mysql-udf-base64-20010618.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +MY_PN="${PN//-/_}" + +DESCRIPTION="MySQL UDFs that provide base64 encode/decode" +HOMEPAGE="http://mirrors.sohu.com/mysql/Contrib/Old-Versions/" +SRC_URI="http://mirrors.sohu.com/mysql/Contrib/Old-Versions/${PN}.c -> ${P}.c + http://mirrors.sohu.com/mysql/Contrib/Old-Versions/${PN}.readme -> ${P}.readme" + +LICENSE="PHP-2.02" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_unpack() { + cp -f "${DISTDIR}/${P}.c" "${S}/${PN}.c" + cp -f "${DISTDIR}/${P}.readme" "${S}/${PN}.readme" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-signedness.patch" +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${MY_PN}.so ${PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe ${MY_PN}.so + newdoc ${PN}.readme README + newdoc "${FILESDIR}/${PN}.sql" ${MY_PN}.sql +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/mysql-udf-http/Manifest b/dev-db/mysql-udf-http/Manifest new file mode 100644 index 000000000000..169aabf6a54a --- /dev/null +++ b/dev-db/mysql-udf-http/Manifest @@ -0,0 +1 @@ +DIST mysql-udf-http-1.0.tar.gz 322160 SHA256 c487b140bcf030e080279e5274e0de71838241a0ef0ac464bcf0d93a31a3c26a SHA512 84feb7cfec052e368131bdf44937868339d9d8694128cd5257aa248ce3d1e2e660f3df1e7da99f64b3954fa66c29ed7af5a809fa5ebbd93a96c6cd2ec2ec81de WHIRLPOOL dd3954d530c4c46238c8102ba2feed0d8dafe180b70767ba260ec3396ba6afa7ce11756292434749ff7553e3cfdbabb51eeb0b7382d6f1a0a38a37e980be7bda diff --git a/dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch b/dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch new file mode 100644 index 000000000000..6e371fc4a835 --- /dev/null +++ b/dev-db/mysql-udf-http/files/mysql-udf-http-stdlib.patch @@ -0,0 +1,10 @@ +--- src/mysql-udf-http.c.orig 2010-09-06 06:00:32.000000000 +0200 ++++ src/mysql-udf-http.c 2011-10-18 16:36:37.000000000 +0200 +@@ -2,6 +2,7 @@ + #include <string.h> + + #include <stdio.h> ++#include <stdlib.h> + #include <curl/curl.h> + #include "mysql-udf-http.h" + diff --git a/dev-db/mysql-udf-http/metadata.xml b/dev-db/mysql-udf-http/metadata.xml new file mode 100644 index 000000000000..02da99f388bb --- /dev/null +++ b/dev-db/mysql-udf-http/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="google-code">mysql-udf-http</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild b/dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild new file mode 100644 index 000000000000..cc3d4cab4d5b --- /dev/null +++ b/dev-db/mysql-udf-http/mysql-udf-http-1.0.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs autotools + +DESCRIPTION="MySQL User-defined function (UDF) for HTTP REST" +HOMEPAGE="http://code.google.com/p/mysql-udf-http/" +SRC_URI="http://${PN}.googlecode.com/files/${P}.tar.gz" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1 + net-misc/curl" +RDEPEND="${DEPEND}" + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + # fix README + sed -i -e "s|${PN}\(\.so\)|${PN//-/_}\1|g" README + + # fix Makefile.am + sed -i -e "s|${PN}\([_\.]la\)|${PN//-/_}\1|g" \ + -e "s|\(-module\)|\1 -avoid-version|g" src/Makefile.am + + epatch "${FILESDIR}/${PN}-stdlib.patch" + eautoreconf +} + +src_configure() { + econf --with-pic --disable-static --libdir="${MYSQL_PLUGINDIR}" \ + --with-mysql="$(type -p mysql_config)" +} + +src_install() { + emake DESTDIR="${D}" install + dodoc README + + # remove obsolete *.la file + rm -f -- "${D}${MYSQL_PLUGINDIR}"/*.la +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/mysql-udf-infusion/Manifest b/dev-db/mysql-udf-infusion/Manifest new file mode 100644 index 000000000000..4d1a582d468c --- /dev/null +++ b/dev-db/mysql-udf-infusion/Manifest @@ -0,0 +1 @@ +DIST infusion-udf_infusion-8599a9c.tar.gz 5470 SHA256 46e924a7d22d61bbede7f22cb87c06b8c1c7cdc5357a9b2ad199f234f9a23441 SHA512 4a9cee8b45b0cd8e7e00210de79f8a42cc3154185c1b31e441f27d51300c113a46639ecce98d0c748aada0538e9bbfc55ef71f017c19c403a84c2e5d478c09fe WHIRLPOOL c55a070c2010afa248127848f0807c45b622f00f0e1389ae541463cde419e7b0de298873450e9fa790b024c22dd7efdb43f886c5939fb8aafb7b711a8aac73d7 diff --git a/dev-db/mysql-udf-infusion/metadata.xml b/dev-db/mysql-udf-infusion/metadata.xml new file mode 100644 index 000000000000..0b109bb657ef --- /dev/null +++ b/dev-db/mysql-udf-infusion/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">infusion/udf_infusion</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mysql-udf-infusion/mysql-udf-infusion-20110109.ebuild b/dev-db/mysql-udf-infusion/mysql-udf-infusion-20110109.ebuild new file mode 100644 index 000000000000..69d5b4552956 --- /dev/null +++ b/dev-db/mysql-udf-infusion/mysql-udf-infusion-20110109.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +MY_REV="8599a9c" # checkout revision +MY_USR="infusion" # user name + +MY_PN="udf_infusion" +MY_P="${MY_USR}-${MY_PN}-${MY_REV}" + +DESCRIPTION="New functions for MySQL implemented as UDF" +HOMEPAGE="http://www.xarg.org/2010/11/mysql-my-new-playground/" +SRC_URI="https://github.com/${MY_USR}/${MY_PN}/tarball/${MY_REV} -> ${MY_P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=">=virtual/mysql-5.1" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + # fix soname + sed -i -e "s|${MY_PN}\.so|${PN//-/_}.so|g" *.sql + + # add LF + echo >> create.sql + echo >> delete.sql +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o ${PN//-/_}.so ${MY_PN}.c +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe *.so + dodoc *.sql +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/mysql-udf-ipv6/Manifest b/dev-db/mysql-udf-ipv6/Manifest new file mode 100644 index 000000000000..66886a81f1e1 --- /dev/null +++ b/dev-db/mysql-udf-ipv6/Manifest @@ -0,0 +1 @@ +DIST watchmouse-mysql-udf-ipv6-01c591b05b79.tar.bz2 10105 SHA256 4975c8edbea6c44eccb967697ba43becd6d105c63ace7af01db0482d20d3b251 SHA512 21bcd207076dfbab251b343eb4bf9dd8f783f0ce666ba266b2b9101acfcb764dbb1b4cc2f4b0608a128d0e684b31e9d97d58978b2cdb3a5452c1656780671287 WHIRLPOOL fc6397eee33da05f1164f522abdd8dd7ea16a4ee17eddef3fc6c59f656038762ae4ea9ae934943f9e7576961cd61699eb428804fa2c082e84a23a765b3eeb4dd diff --git a/dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch b/dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch new file mode 100644 index 000000000000..392ecd3c4f53 --- /dev/null +++ b/dev-db/mysql-udf-ipv6/files/mysql-udf-ipv6-warnings.patch @@ -0,0 +1,28 @@ +--- mysql_udf_ipv6.c.orig 2011-08-10 10:45:49.000000000 +0200 ++++ mysql_udf_ipv6.c 2011-10-18 16:27:58.000000000 +0200 +@@ -282,7 +282,7 @@ + { + unsigned long length = args->lengths[0]; + long long mask = *((long long *) args->args[1]); +- unsigned char mask8, i; ++ unsigned char i; + + if (!args->args[0] || !length) + { +@@ -299,7 +299,7 @@ + + // my ugly get-the-job-done 128-bit masking + memset(result, 0, INET6_ADDRLEN); +- for (i = 0; i < INET6_ADDRLEN, mask >= 8; i++, mask -= 8) ++ for (i = 0; i < INET6_ADDRLEN && mask >= 8; i++, mask -= 8) + { + result[i] = args->args[0][i]; + } +@@ -347,7 +347,6 @@ + { + struct addrinfo *info; + char *addr; +- ushort i; + + if (!args->args[0] || !args->lengths[0]) + { diff --git a/dev-db/mysql-udf-ipv6/metadata.xml b/dev-db/mysql-udf-ipv6/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/mysql-udf-ipv6/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild b/dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild new file mode 100644 index 000000000000..2c36b9b40d3e --- /dev/null +++ b/dev-db/mysql-udf-ipv6/mysql-udf-ipv6-0.4.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils toolchain-funcs + +MY_REV="01c591b05b79" # checkout revision +MY_USR="watchmouse" # user name + +MY_P="${MY_USR}-${PN}-${MY_REV}" + +DESCRIPTION="IPv6 and internationalized domain (IDNA) functions for MySQL" +HOMEPAGE="http://labs.watchmouse.com/2009/10/extending-mysql-5-with-ipv6-functions/" +SRC_URI="https://bitbucket.org/${MY_USR}/${PN}/get/${MY_REV}.tar.bz2 -> ${MY_P}.tar.bz2" + +LICENSE="EUPL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="idn" + +DEPEND=">=virtual/mysql-5.1 + idn? ( net-dns/libidn )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${MY_P}" + +# compile helper +_compile() { + local CC="$(tc-getCC)" + echo "${CC} ${@}" && "${CC}" "${@}" +} + +pkg_setup() { + MYSQL_PLUGINDIR="$(mysql_config --plugindir)" + MYSQL_INCLUDE="$(mysql_config --include)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-warnings.patch" +} + +src_compile() { + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} \ + -shared ${LDFLAGS} -o mysql_udf_ipv6.so mysql_udf_ipv6.c + + if use idn; then + _compile ${CFLAGS} -Wall -fPIC ${MYSQL_INCLUDE} -lidn \ + -shared ${LDFLAGS} -o mysql_udf_idna.so mysql_udf_idna.c + fi +} + +src_install() { + exeinto "${MYSQL_PLUGINDIR}" + doexe mysql_udf_*.so + newdoc Changelog ChangeLog + dodoc README +} + +pkg_postinst() { + elog + elog "Please have a look at the documentation, how to" + elog "enable/disable the UDF functions of ${PN}." + elog + elog "The documentation is located here:" + elog "/usr/share/doc/${PF}" + elog +} diff --git a/dev-db/mysql-workbench/Manifest b/dev-db/mysql-workbench/Manifest new file mode 100644 index 000000000000..28b7d1c7b140 --- /dev/null +++ b/dev-db/mysql-workbench/Manifest @@ -0,0 +1,3 @@ +DIST antlr-3.4-complete.jar 2388361 SHA256 9d3e866b610460664522520f73b81777b5626fb0a282a5952b9800b751550bf7 SHA512 04be4dfba3a21f3ab9d9e439a64958bd8e844a9f151b798383bd9e0dd6ebc416783ae7cb1d1dbb27fb7288ab9756b13b8338cdb8ceb41a10949c852ad45ab1f2 WHIRLPOOL 488b7b9af1d1d06cca163d43e7be190730e2f0421796c21a26ace11196ee37a16b1bdeea78a1e2e64f8ca0e87f67a2aecd066af21505f3dd92dd76de40a94fa0 +DIST mysql-workbench-community-6.3.3-src.tar.gz 14892631 SHA256 4511d63145b2a979310d84c9f0ca61b7460af2c87b81787b2f2404fd5095f419 SHA512 9736ed4f896b2819d5cde76a000a56b6ce36606262a83b5a0ba8dfc8760476eb43bcda08f258d856297924f3ddca2d89aadf0139fb156beb345f2a6fe5b0bc45 WHIRLPOOL 9e1054b8c18e854918133da62f67cc109f212812cd2509edfc775d4ebbc91b402a7b88b530e540eb67dadba6f6fd3d901b3f7a30b7a03a5a33537c677bbd0024 +DIST mysql-workbench-community-6.3.4-src.tar.gz 14954524 SHA256 be47f30c48c04f951a1be9b6496e4d94d5b975d6c693933ba2fa6e96718179d3 SHA512 8d7eacd46fd3cac912dac2fdbc0669759f9411796507cca76b0ad47228381b15b7f88e60a7a5a8763e704b456884828783cb0c7ed218025edb35aa5033d7d02f WHIRLPOOL 9e00ce475e573ee8b875d9f25d73d488cf68ff96b2eb006dba1dc7e424c70a0650cac42dcc3ed34648c5879354cab5311eaf6729e9b307718935d543c4f43bf5 diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.1.7-mysql_options4.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.1.7-mysql_options4.patch new file mode 100644 index 000000000000..e0dbc2bef5e0 --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.1.7-mysql_options4.patch @@ -0,0 +1,29 @@ +Patch taken from opensuse: +https://www.mail-archive.com/opensuse-commit@opensuse.org/msg60296.html + +Modified to be conditional on MARIADB_BASE_VERSION + +++++++ mysql-workbench-mysql_options4.patch ++++++ +diff --git a/plugins/migration/copytable/copytable.cpp +b/plugins/migration/copytable/copytable.cpp +index b273287..77c227b 100644 +--- a/plugins/migration/copytable/copytable.cpp ++++ b/plugins/migration/copytable/copytable.cpp +@@ -1633,12 +1633,17 @@ MySQLCopyDataTarget::MySQLCopyDataTarget(const + std::string &hostname, int port, + _truncate = false; + + mysql_init(&_mysql); ++ /* This is optional has compiled in for MySQL >= 5.6.6 ++ * Looks like MariaDB does not support this as supposed, ++ * so disable completly. */ ++#ifndef MARIADB_BASE_VERSION + #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH) + #if MYSQL_CHECK_VERSION(5,6,6) + mysql_options4(&_mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", app_name.c_str()); + #endif + #endif ++#endif + + // _bulk_insert_record is used to prepare a single record string, the connection + // is needed to escape binary data properly diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.1.7-wbcopytables.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.1.7-wbcopytables.patch new file mode 100644 index 000000000000..7f4013a2ecf3 --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.1.7-wbcopytables.patch @@ -0,0 +1,10 @@ +--- plugins/migration/CMakeLists.txt.~1~ 2014-07-12 08:45:56.808929549 +0200 ++++ plugins/migration/CMakeLists.txt 2014-07-12 08:49:26.659049880 +0200 +@@ -7,6 +7,7 @@ + + add_definitions(${ODBC_DEFINITIONS}) + ++SET(CMAKE_INSTALL_RPATH "${WB_INSTALL_LIB_DIR}") + add_executable(wbcopytables + copytable/copytable.cpp + copytable/python_copy_data_source.cpp diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch new file mode 100644 index 000000000000..6e9a4d5e1410 --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-CMakeLists.patch @@ -0,0 +1,43 @@ +--- mysql-workbench-community-6.0.7-src/CMakeLists.txt 2013-08-30 18:05:12.000000000 +0200 ++++ mysql-workbench-community-6.0.7-src/CMakeLists.txt 2013-09-08 11:41:18.723838826 +0200 +@@ -18,6 +18,9 @@ + find_package(PkgConfig REQUIRED) + + find_package(GTK2 2.20 REQUIRED gtk gtkmm) ++if (NOT GTK2_FOUND) ++ message( FATAL_ERROR "Not all GTK2 components were found!" ) ++endif() + pkg_check_modules(GTHREAD REQUIRED gthread-2.0) + pkg_check_modules(GMODULE REQUIRED gmodule-2.0) + set(GTK2_INCLUDE_DIRS ${GTK2_INCLUDE_DIRS} ${GTHREAD_INCLUDE_DIRS} ${GMODULE_INCLUDE_DIRS}) +@@ -32,7 +35,8 @@ + endif () + + # All known publicly available versions of Antlr3C are buggy +- ++# see: https://bugzilla.redhat.com/show_bug.cgi?id=966973 ++# patch seems to be only applied partially to antlr-3.4, bug is present in antlr-3.5, too + if (SKIP_BUNDLED_ANTLR) + find_package(Antlr3C) + endif () +@@ -89,7 +93,8 @@ + pkg_check_modules(CAIRO REQUIRED cairo>=1.5.12) + pkg_check_modules(UUID REQUIRED uuid) + pkg_check_modules(LIBZIP REQUIRED libzip) +-if (UNIX) ++ ++if (UNIX AND USE_GNOME_KEYRING) + pkg_check_modules(GNOME_KEYRING gnome-keyring-1) + if (GNOME_KEYRING_FOUND) + set(KEYRING_DEFINITION "HAVE_GNOME_KEYRING") +@@ -99,7 +104,10 @@ + set(KEYRING_DEFINITION "HAVE_OLD_GNOME_KEYRING") + endif() + endif() ++ if (NOT GNOME_KEYRING_FOUND) ++ message( FATAL_ERROR "Gnome keyring libraries could not be found" ) ++ endif() + endif() + + include (CheckFunctionExists) + diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-ctemplate.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-ctemplate.patch new file mode 100644 index 000000000000..fbcd5bc05999 --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-ctemplate.patch @@ -0,0 +1,35 @@ +Fix compilation with ctemplate 2.3 by avoiding long-deprecated method. + +Patch by Marcel Pennewiß in https://bugs.gentoo.org/show_bug.cgi?id=533086 + +Unresolved upstream bug http://bugs.mysql.com/bug.php?id=72585 + +--- mysql-workbench-community-6.0.9-src/backend/wbpublic/sqlide/recordset_text_storage.cpp ++++ mysql-workbench-community-6.0.9-src/backend/wbpublic/sqlide/recordset_text_storage.cpp +@@ -204,7 +204,7 @@ + if (!pre_tpl) + g_warning("Failed to open template file: `%s`", pre_tpl_path.c_str()); + else +- pre_tpl->ReloadIfChanged(); ++ pre_tpl->ReloadAllIfChanged(); + } + if (g_file_test((name+".post.tpl").c_str(), G_FILE_TEST_EXISTS)) + { +@@ -213,7 +213,7 @@ + if (!post_tpl) + g_warning("Failed to open template file: `%s`", post_tpl_path.c_str()); + else +- post_tpl->ReloadIfChanged(); ++ post_tpl->ReloadAllIfChanged(); + } + } + +@@ -222,7 +222,7 @@ + throw std::runtime_error(strfmt("Failed to open output file: `%s`", _file_path.c_str())); + } + +- tpl->ReloadIfChanged(); ++ tpl->ReloadAllIfChanged(); + + std::auto_ptr<TemplateDictionary> dict(new TemplateDictionary("/")); + BOOST_FOREACH (const Parameters::value_type ¶m, _parameters) diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-glib.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-glib.patch new file mode 100644 index 000000000000..96da8534944b --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-glib.patch @@ -0,0 +1,42 @@ +Patch to make the query results window work with glib 2.42. +https://bugs.gentoo.org/show_bug.cgi?id=536024 +http://bugs.mysql.com/bug.php?id=74147 + + +=== modified file frontend/linux/linux_utilities/listmodel_wrapper.cpp +--- frontend/linux/linux_utilities/listmodel_wrapper.cpp 2014-03-17 16:42:25 +0000 ++++ frontend/linux/linux_utilities/listmodel_wrapper.cpp 2014-10-16 10:33:12 +0000 +@@ -528,7 +528,6 @@ + ListModelWrapper::ListModelWrapper(bec::ListModel* tm, Gtk::TreeView *treeview, const std::string& name) + : Glib::ObjectBase(typeid(ListModelWrapper)) + , Glib::Object() +- , Gtk::TreeModel() + , _treeview(treeview) + , _iconview(0) + , _context_menu(0) + +=== modified file frontend/linux/linux_utilities/listmodel_wrapper.h +--- frontend/linux/linux_utilities/listmodel_wrapper.h 2013-12-05 13:10:03 +0000 ++++ frontend/linux/linux_utilities/listmodel_wrapper.h 2014-10-16 10:33:12 +0000 +@@ -232,9 +232,16 @@ + + //============================================================================== + +-class ListModelWrapper : public Glib::Object, public Gtk::TreeModel, +- public Gtk::TreeDragDest, public Gtk::TreeDragSource, +- public base::trackable ++#if GLIB_CHECK_VERSION(2, 42, 0) ++class ListModelWrapper : public Gtk::TreeModel, public Glib::Object, ++ public Gtk::TreeDragDest, public Gtk::TreeDragSource, ++ public base::trackable ++#else ++class ListModelWrapper : public Glib::Object, public Gtk::TreeModel, ++ public Gtk::TreeDragDest, public Gtk::TreeDragSource, ++ public base::trackable ++ ++#endif + { + friend class ColumnsModel; + protected: + + diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-paramiko.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-paramiko.patch new file mode 100644 index 000000000000..ad131b781ace --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.3-paramiko.patch @@ -0,0 +1,51 @@ +Last-Update: 2014-10-07 +Forwarded: not-needed +From: Alfredo Kojima +Bug-Upstream: http://bugs.mysql.com/bug.php?id=74223 +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=763971 +Description: fix connectivity through SSH tunnel. + +=== modified file 'plugins/wb.admin/backend/wb_admin_ssh.py' +--- a/plugins/wb.admin/backend/wb_admin_ssh.py ++++ b/plugins/wb.admin/backend/wb_admin_ssh.py +@@ -84,10 +84,14 @@ + m = Message() + m.add_byte(chr(MSG_CHANNEL_OPEN)) + m.add_string(kind) + m.add_int(chanid) +- m.add_int(self.window_size) +- m.add_int(self.max_packet_size) ++ if server_version_str2tuple(paramiko.__version__) < (1, 15, 0): ++ m.add_int(self.window_size) ++ m.add_int(self.max_packet_size) ++ else: ++ m.add_int(self.default_window_size) ++ m.add_int(self.default_max_packet_size) + if (kind == 'forwarded-tcpip') or (kind == 'direct-tcpip'): + m.add_string(dest_addr[0]) + m.add_int(dest_addr[1]) + m.add_string(src_addr[0]) +@@ -99,9 +103,12 @@ + self._channels.put(chanid, chan) + self.channel_events[chanid] = event = threading.Event() + self.channels_seen[chanid] = True + chan._set_transport(self) +- chan._set_window(self.window_size, self.max_packet_size) ++ if server_version_str2tuple(paramiko.__version__) < (1, 15, 0): ++ chan._set_window(self.window_size, self.max_packet_size) ++ else: ++ chan._set_window(self.default_window_size, self.default_max_packet_size) + finally: + self.lock.release() + self._send_user_message(m) + ts = time.time() + OPEN_CHANNEL_TIMEOUT if (timeout is None) else timeout +@@ -669,8 +676,9 @@ + + read_timeout = 10 + + if self.client is not None: ++ chan = None + transport = self.client.get_transport() + try: + spawn_process = False + if 'nohup' in cmd: diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch new file mode 100644 index 000000000000..0fcc837fef01 --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.2.5-wbcopytables.patch @@ -0,0 +1,12 @@ +--- plugins/migration/CMakeLists.txt.~1~ 2015-02-25 09:08:47.000000000 +0100 ++++ plugins/migration/CMakeLists.txt 2015-03-07 07:28:56.745378152 +0100 +@@ -10,7 +10,8 @@ + if (UNIX) + configure_file(wbcopytables.in wbcopytables) + install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/wbcopytables DESTINATION ${WB_INSTALL_BIN_DIR}) +- ++ ++ SET(CMAKE_INSTALL_RPATH "${WB_INSTALL_LIB_DIR}") + add_executable(wbcopytables-bin + copytable/copytable.cpp + copytable/python_copy_data_source.cpp diff --git a/dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch b/dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch new file mode 100644 index 000000000000..7fb9c8d57fc5 --- /dev/null +++ b/dev-db/mysql-workbench/files/mysql-workbench-6.3.3-mysql_options4.patch @@ -0,0 +1,40 @@ +--- plugins/migration/copytable/copytable.cpp.~1~ 2015-04-15 15:54:19.000000000 +0200 ++++ plugins/migration/copytable/copytable.cpp 2015-04-26 08:53:08.871167725 +0200 +@@ -1920,12 +1920,17 @@ + _incoming_data_charset = "latin1"; + + mysql_init(&_mysql); ++/* This is optional has compiled in for MySQL >= 5.6.6 ++ * Looks like MariaDB does not support this as supposed, ++ * so disable completly. */ ++#ifndef MARIADB_BASE_VERSION + #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH) + #if MYSQL_CHECK_VERSION(5,6,6) + if (is_mysql_version_at_least(5,6,6)) + mysql_options4(&_mysql, MYSQL_OPT_CONNECT_ATTR_ADD, "program_name", app_name.c_str()); + #endif + #endif ++#endif + + // _bulk_insert_record is used to prepare a single record string, the connection + // is needed to escape binary data properly +--- plugins/migration/copytable/copytable.cpp.~1~ 2015-04-26 08:57:30.444285953 +0200 ++++ plugins/migration/copytable/copytable.cpp 2015-04-26 10:16:39.234711324 +0200 +@@ -2875,6 +2875,9 @@ + + // This function is used to create a legal SQL string that you can use in an SQL statement + // This is needed because the escaping depends on the character set in use by the server ++ #ifdef MARIADB_BASE_VERSION ++ length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); ++ #else + #if defined(MYSQL_VERSION_MAJOR) && defined(MYSQL_VERSION_MINOR) && defined(MYSQL_VERSION_PATCH) + #if MYSQL_CHECK_VERSION(5,7,6) + if (is_mysql_version_at_least(5,7,6)) +@@ -2885,6 +2888,7 @@ + length += mysql_real_escape_string(_mysql, buffer + length, data, (unsigned long)dlength); + #endif + #endif ++ #endif + + return true; + } diff --git a/dev-db/mysql-workbench/metadata.xml b/dev-db/mysql-workbench/metadata.xml new file mode 100644 index 000000000000..bf21d6777471 --- /dev/null +++ b/dev-db/mysql-workbench/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>graaff@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">antlr/website-antlr3</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mysql-workbench/mysql-workbench-6.3.3.ebuild b/dev-db/mysql-workbench/mysql-workbench-6.3.3.ebuild new file mode 100644 index 000000000000..28d9faad5412 --- /dev/null +++ b/dev-db/mysql-workbench/mysql-workbench-6.3.3.ebuild @@ -0,0 +1,103 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +GCONF_DEBUG="no" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite" + +CMAKE_MIN_VERSION="2.8.11.1" + +inherit gnome2 eutils flag-o-matic python-single-r1 cmake-utils + +MY_P="${PN}-community-${PV}-src" + +DESCRIPTION="MySQL Workbench" +HOMEPAGE="http://dev.mysql.com/workbench/" +SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux" +IUSE="debug doc gnome-keyring" + +# glibc: deprecated mutex functions, removed in 2.36.0 +CDEPEND="${PYTHON_DEPS} + dev-libs/glib:2 + dev-cpp/atkmm + dev-cpp/pangomm + >=dev-cpp/glibmm-2.14:2 + >=dev-cpp/gtkmm-2.14:2.4 + dev-libs/atk + x11-libs/pango + >=x11-libs/gtk+-2.20:2 + gnome-base/libglade:2.0 + >=x11-libs/cairo-1.5.12[glib,svg] + dev-libs/libsigc++:2 + dev-libs/boost + >=dev-cpp/ctemplate-0.95 + >=dev-libs/libxml2-2.6.2:2 + dev-libs/libzip + >=virtual/mysql-5.1 + dev-libs/libpcre + >=sci-libs/gdal-1.11.1-r1[-mdb] + virtual/opengl + >=dev-lang/lua-5.1[deprecated] + || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) + dev-libs/tinyxml[stl] + dev-db/mysql-connector-c++ + dev-db/vsqlite++ + || ( dev-db/libiodbc dev-db/unixODBC ) + gnome-keyring? ( gnome-base/libgnome-keyring ) + dev-python/pexpect + >=dev-python/paramiko-1.7.4 + " + +# lua perhaps no longer needed? Was used via libgrt only + +RDEPEND="${CDEPEND} + app-admin/sudo + >=sys-apps/net-tools-1.60_p20120127084908" + +DEPEND="${CDEPEND} + dev-lang/swig + virtual/jre + virtual/pkgconfig" + +S="${WORKDIR}"/"${MY_P}" + +src_unpack() { + unpack ${PN}-community-${PV}-src.tar.gz +} + +src_prepare() { + ## Patch CMakeLists.txt + epatch "${FILESDIR}/${PN}-6.2.3-CMakeLists.patch" \ + "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch" \ + "${FILESDIR}/${PN}-6.3.3-mysql_options4.patch" + + ## remove hardcoded CXXFLAGS + sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die + + ## package is very fragile... + strip-flags + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_use gnome-keyring GNOME_KEYRING) + -DLIB_INSTALL_DIR="/usr/$(get_libdir)" + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + ) + ANTLR_JAR_PATH="${DISTDIR}/antlr-3.4-complete.jar" cmake-utils_src_configure +} + +src_compile() { + # Work around parallel build issues, bug 507838 + cmake-utils_src_compile -j1 +} diff --git a/dev-db/mysql-workbench/mysql-workbench-6.3.4.ebuild b/dev-db/mysql-workbench/mysql-workbench-6.3.4.ebuild new file mode 100644 index 000000000000..4ff41e5f6334 --- /dev/null +++ b/dev-db/mysql-workbench/mysql-workbench-6.3.4.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +GCONF_DEBUG="no" + +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE="sqlite" + +CMAKE_MIN_VERSION="2.8.11.1" + +inherit gnome2 eutils flag-o-matic python-single-r1 cmake-utils + +MY_P="${PN}-community-${PV}-src" + +DESCRIPTION="MySQL Workbench" +HOMEPAGE="http://dev.mysql.com/workbench/" +SRC_URI="mirror://mysql/Downloads/MySQLGUITools/${MY_P}.tar.gz https://github.com/antlr/website-antlr3/blob/gh-pages/download/antlr-3.4-complete.jar?raw=true -> antlr-3.4-complete.jar" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="debug doc gnome-keyring" + +# glibc: deprecated mutex functions, removed in 2.36.0 +CDEPEND="${PYTHON_DEPS} + dev-libs/glib:2 + dev-cpp/atkmm + dev-cpp/pangomm + >=dev-cpp/glibmm-2.14:2 + >=dev-cpp/gtkmm-2.14:2.4 + dev-libs/atk + x11-libs/pango + >=x11-libs/gtk+-2.20:2 + gnome-base/libglade:2.0 + >=x11-libs/cairo-1.5.12[glib,svg] + dev-libs/libsigc++:2 + >=dev-libs/boost-1.55.0 + >=dev-cpp/ctemplate-0.95 + >=dev-libs/libxml2-2.6.2:2 + dev-libs/libzip + >=virtual/mysql-5.1 + dev-libs/libpcre + >=sci-libs/gdal-1.11.1-r1[-mdb] + virtual/opengl + >=dev-lang/lua-5.1[deprecated] + || ( sys-libs/e2fsprogs-libs dev-libs/ossp-uuid ) + dev-libs/tinyxml[stl] + dev-db/mysql-connector-c++ + dev-db/vsqlite++ + || ( dev-db/libiodbc dev-db/unixODBC ) + gnome-keyring? ( gnome-base/libgnome-keyring ) + dev-python/pexpect + >=dev-python/paramiko-1.7.4 + " + +# lua perhaps no longer needed? Was used via libgrt only + +RDEPEND="${CDEPEND} + app-admin/sudo + >=sys-apps/net-tools-1.60_p20120127084908" + +DEPEND="${CDEPEND} + dev-lang/swig + virtual/jre + virtual/pkgconfig" + +S="${WORKDIR}"/"${MY_P}" + +src_unpack() { + unpack ${PN}-community-${PV}-src.tar.gz +} + +src_prepare() { + ## Patch CMakeLists.txt + epatch "${FILESDIR}/${PN}-6.2.3-CMakeLists.patch" \ + "${FILESDIR}/${PN}-6.2.5-wbcopytables.patch" \ + "${FILESDIR}/${PN}-6.3.3-mysql_options4.patch" + + sed -i -e '/target_link_libraries/ s/sqlparser.grt/sqlparser.grt sqlparser/' \ + modules/db.mysql.sqlparser/CMakeLists.txt + + ## remove hardcoded CXXFLAGS + sed -i -e 's/-O0 -g3//' ext/scintilla/gtk/CMakeLists.txt || die + + ## package is very fragile... + strip-flags + + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_use gnome-keyring GNOME_KEYRING) + -DLIB_INSTALL_DIR="/usr/$(get_libdir)" + -DPYTHON_INCLUDE_DIR="$(python_get_includedir)" + -DPYTHON_LIBRARY="$(python_get_library_path)" + ) + ANTLR_JAR_PATH="${DISTDIR}/antlr-3.4-complete.jar" cmake-utils_src_configure +} + +src_compile() { + # Work around parallel build issues, bug 507838 + cmake-utils_src_compile -j1 +} diff --git a/dev-db/mysql/Manifest b/dev-db/mysql/Manifest new file mode 100644 index 000000000000..b6734e4161c5 --- /dev/null +++ b/dev-db/mysql/Manifest @@ -0,0 +1,9 @@ +DIST mysql-5.5.44.tar.gz 21789766 SHA256 85f05b257db39e63c82ff4b5ce4e0c6d2b07560b5fc1646d47d7ae48eab3e5de SHA512 05707b96c3e0d39ca103d965640aa1a9461a513f788fc7f2acce4b3933ec578b3d66df53955b0dff1b6c9e5acd98441cfe1df5b3154a1058293babc39c26dad5 WHIRLPOOL 870d9728c78f6732fcd6f95e62833a769c937c96298a39bb023b33a9138552e254d2a3f6285d8f4f0b740de9d7397fa1a0987234a0a4dfa13c787fc068053d78 +DIST mysql-5.5.45.tar.gz 21832364 SHA256 744efd3c39265b5fdeebd25f58ecb34a6eb06e02d9ec2febd3164942f2c89332 SHA512 1c8ddf294232b106562537d6e9b4a3956dd1a290562f313d311f2bbe09f1cb95c28e7e9a4c92a1fcc91a394514bc1190d185b1134003a9f6183ecc2a06d618e8 WHIRLPOOL 3daed09edfc1ca7a0ae379b876e061c2318755fdd14be9630b7c5311985e91ea46cf0e0b1eab98c758cc2809d5d562fcfd2f22022100051746343e147f3d4ebc +DIST mysql-5.6.24.tar.gz 33178592 SHA256 37e27305b67d76883c5902dce59c89d596beee9dca7dbadd4a2e117f8101dfeb SHA512 cb4c27f67aad02e2120edb9dfaffa623d8ddb5861ee77055553c50cce76cbfe0a1e473e01cef3cf86b6362c719e1db18e69808a0e4e457f879a37297f14b9fd7 WHIRLPOOL 26e51a1c48d04c2f24f8914beb84bcd8122ecc569b922d001c05271c3b7dc3339652272e27169001c762356c6fffa9ba88a6ccd8b2235e41063b5948e1dd2011 +DIST mysql-5.6.25.tar.gz 33203321 SHA256 15079c0b83d33a092649cbdf402c9225bcd3f33e87388407be5cdbf1432c7fbd SHA512 cd15180281b015a29d5a9f12bafd5878ecb8ca68ada2e0d016916d77f606592b4b9a8e4a3728fc0d90326bcdda26fdd371fc731ca524f06bd06cc3b19ae93243 WHIRLPOOL 68932bcbec0e58aade1c00fe00651ecac1003e80e5cd29298c23a79190df76390c7f16a29fcb5bff9ad63e721f53978d5d727a0ae9c5df0eb97a002a4c3e4194 +DIST mysql-5.6.26.tar.gz 33278710 SHA256 b44c6ce5f95172c56c73edfa8b710b39242ec7af0ab182c040208c41866e5070 SHA512 455bf66e1c63e3368a3dd53f80a3393e33a20605cde320ee0bb61339d0853c2187d4947812405b85ea93a7da722787e958515fc69807c3fab131878fe9604f62 WHIRLPOOL e5fe46e4f1c8a20d955b5921c6773823cb1c01bd78319485528c478f213a37dc8ce8a1bc5c61904595e8931dec1376d471387a3f85119a0791cb8f6d9303eb6f +DIST mysql-extras-20150127-1351Z.tar.bz2 1494648 SHA256 74497659f1fb3b0cb620e38a911cf2e59a084149dd175199eb7cf4be18b4c328 SHA512 886e42697b3b0a90d8542bafaf3a7ccedf075f9f0065fec995bf58f645edff3a5d62f29be1cfa2e01d002d6382ee02279832cea8c21db6a774c2567c75ab6a35 WHIRLPOOL 9ddb5ccd914a6a6a19741ff93df78534d2273cf918f24af427c018b7c4f424a90d9f57f167633c48e2fa4102a4fae0873fd6dec7529839f229af855cbddf82d4 +DIST mysql-extras-20150410-1944Z.tar.bz2 1493690 SHA256 e327adf02be4c2bce5121f01d6b139309c72814b8c50a29559dfddee12a0b4e2 SHA512 e2e5345290134e597734514041e413f0633b8078bfddb8b8e7695468ce7341735b732d5bb602ab7aa9a4045d71571b73aac01a5d96687d4fbd380736f5ed650c WHIRLPOOL f65f294905fd1d04e2be79a803b658ed432338501665a75cbe0cc5b3af8abf0615f1f808465c3ca3c7e850b9277f451f5c77b518977f4bee8dc77d6089ff88fb +DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22 +DIST mysql-extras-20150729-1849Z.tar.bz2 1491783 SHA256 18c3fadae04f1729169e587083135353680d7c59478cdb6ec0784b238ae8d34a SHA512 555156a00305732093173f83dd22dfa545ef0a3215d7cf419298b7f5be0f9bb8a527ae9c03f58d845223b40543e3dbd054ea103a105f282892cdbce67a864308 WHIRLPOOL 56a61fcd4af096b69318d9d158bf012944dc104aff01b2a55d20ae4a53dc462e9d7c67afb4a6643f93eef8da1f150f613b87880044fc244b040cbbc080c96034 diff --git a/dev-db/mysql/files/my.cnf-5.1 b/dev-db/mysql/files/my.cnf-5.1 new file mode 100644 index 000000000000..cd8721b79185 --- /dev/null +++ b/dev-db/mysql/files/my.cnf-5.1 @@ -0,0 +1,145 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +language = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/english + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# uncomment the following directives if you are using BDB tables +#bdb_cache_size = 4M +#bdb_max_lock = 10000 + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/mysql/files/my.cnf-5.5 b/dev-db/mysql/files/my.cnf-5.5 new file mode 100644 index 000000000000..24d6deb72b3e --- /dev/null +++ b/dev-db/mysql/files/my.cnf-5.5 @@ -0,0 +1,148 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +#loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout + diff --git a/dev-db/mysql/files/my.cnf-5.6 b/dev-db/mysql/files/my.cnf-5.6 new file mode 100644 index 000000000000..ee85e99f83fa --- /dev/null +++ b/dev-db/mysql/files/my.cnf-5.6 @@ -0,0 +1,140 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 4M +table_open_cache = 400 +sort_buffer_size = 512K +net_buffer_length = 16K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 128M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 48M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/mysql/metadata.xml b/dev-db/mysql/metadata.xml new file mode 100644 index 000000000000..f5f14d5b85f2 --- /dev/null +++ b/dev-db/mysql/metadata.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<!-- +Please note that this list is shared between the following packages: +dev-db/mysql +dev-db/mariadb +--> +<use> + <flag name='client-libs'>Build the libmysqlclient libraries</flag> + <flag name='cluster'>Add support for NDB clustering (deprecated)</flag> + <flag name='community'>Enables the community features from upstream.</flag> + <flag name='embedded'>Build embedded server (libmysqld)</flag> + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> + <flag name='max-idx-128'>Raise the max index per table limit from 64 to 128</flag> + <flag name='minimal'>Install client programs only, no server</flag> + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> + <flag name='server'>Build the server program</flag> + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> + <flag name='test'>Install upstream testsuites for end use.</flag> + <flag name='tools'>Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag> +</use> +</pkgmetadata> diff --git a/dev-db/mysql/mysql-5.5.44.ebuild b/dev-db/mysql/mysql-5.5.44.ebuild new file mode 100644 index 000000000000..9cd6470d4a9a --- /dev/null +++ b/dev-db/mysql/mysql-5.5.44.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150127-1351Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" + +# Build type +BUILD="cmake" + +inherit toolchain-funcs mysql-v2 +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# Define the mysql-extras source +EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +src_test() { + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do + mysql-v2_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --testcase-timeout=30 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql/mysql-5.5.45.ebuild b/dev-db/mysql/mysql-5.5.45.ebuild new file mode 100644 index 000000000000..45c467ce099e --- /dev/null +++ b/dev-db/mysql/mysql-5.5.45.ebuild @@ -0,0 +1,126 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150729-1849Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" + +# Build type +BUILD="cmake" + +inherit toolchain-funcs mysql-v2 +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# Define the mysql-extras source +EGIT_REPO_URI="git://anongit.gentoo.org/proj/mysql-extras.git" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +src_test() { + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do + mysql-v2_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --testcase-timeout=30 --reorder + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql/mysql-5.6.24.ebuild b/dev-db/mysql/mysql-5.6.24.ebuild new file mode 100644 index 000000000000..8e67a635ef25 --- /dev/null +++ b/dev-db/mysql/mysql-5.6.24.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150410-1944Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # rpl.rpl_plugin_load + # fails due to included file not listed in expected result + # appears to be poor planning + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysql_client_test \ + main.mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + rpl.rpl_plugin_load \ + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + if ! use extraengine ; then + # bug 401673, 530766 + for t in federated.federated_plugin ; do + mysql-multilib_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" + done + fi + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --suite-timeout=5000 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql/mysql-5.6.25-r1.ebuild b/dev-db/mysql/mysql-5.6.25-r1.ebuild new file mode 100644 index 000000000000..5a1ac383777c --- /dev/null +++ b/dev-db/mysql/mysql-5.6.25-r1.ebuild @@ -0,0 +1,161 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150717-1707Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" +HAS_TOOLS_PATCH="1" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='server embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if use server ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Create a symlink to provided binaries so the tests can find them when client-libs is off + if ! use client-libs ; then + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror" + fi + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # rpl.rpl_plugin_load + # fails due to included file not listed in expected result + # appears to be poor planning + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysql_client_test \ + main.mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + rpl.rpl_plugin_load \ + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + if ! use extraengine ; then + # bug 401673, 530766 + for t in federated.federated_plugin ; do + mysql-multilib_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" + done + fi + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --suite-timeout=5000 --reorder + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql/mysql-5.6.25.ebuild b/dev-db/mysql/mysql-5.6.25.ebuild new file mode 100644 index 000000000000..0240d411c011 --- /dev/null +++ b/dev-db/mysql/mysql-5.6.25.ebuild @@ -0,0 +1,153 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150410-1944Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # rpl.rpl_plugin_load + # fails due to included file not listed in expected result + # appears to be poor planning + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysql_client_test \ + main.mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + rpl.rpl_plugin_load \ + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + if ! use extraengine ; then + # bug 401673, 530766 + for t in federated.federated_plugin ; do + mysql-multilib_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" + done + fi + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --suite-timeout=5000 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql/mysql-5.6.26-r1.ebuild b/dev-db/mysql/mysql-5.6.26-r1.ebuild new file mode 100644 index 000000000000..365c7de4ede6 --- /dev/null +++ b/dev-db/mysql/mysql-5.6.26-r1.ebuild @@ -0,0 +1,165 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150717-1707Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" +HAS_TOOLS_PATCH="1" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# validate_password plugin uses exceptions when it shouldn't yet (until 5.7) +# disable until we see what happens with it +MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1" + +# Official test instructions: +# USE='server embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if use server ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Create a symlink to provided binaries so the tests can find them when client-libs is off + if ! use client-libs ; then + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror" + fi + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # rpl.rpl_plugin_load + # fails due to included file not listed in expected result + # appears to be poor planning + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysql_client_test \ + main.mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + rpl.rpl_plugin_load \ + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + if ! use extraengine ; then + # bug 401673, 530766 + for t in federated.federated_plugin ; do + mysql-multilib_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" + done + fi + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --suite-timeout=5000 --reorder + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysql/mysql-5.6.26.ebuild b/dev-db/mysql/mysql-5.6.26.ebuild new file mode 100644 index 000000000000..f244db558d03 --- /dev/null +++ b/dev-db/mysql/mysql-5.6.26.ebuild @@ -0,0 +1,158 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +MY_EXTRAS_VER="20150410-1944Z" +MY_PV="${PV//_alpha_pre/-m}" +MY_PV="${MY_PV//_/-}" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ~ppc ppc64 ~s390 ~sh ~sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# validate_password plugin uses exceptions when it shouldn't yet (until 5.7) +# disable until we see what happens with it +MYSQL_CMAKE_NATIVE_DEFINES="-DWITHOUT_VALIDATE_PASSWORD=1" + +# Official test instructions: +# USE='embedded extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild mysql-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # create symlink for the tests to find mysql_tzinfo_to_sql + ln -s "${BUILD_DIR}/sql/mysql_tzinfo_to_sql" "${S}/sql/" + + # These are failing in MySQL 5.5/5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # funcs_1.is_triggers funcs_1.is_tables_mysql, + # funcs_1.is_columns_mysql, binlog.binlog_mysqlbinlog_filter, + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt, + # mysqld--help-notwin, funcs_1.is_triggers, funcs_1.is_tables_mysql, funcs_1.is_columns_mysql + # perfschema.binlog_edge_stmt, perfschema.binlog_edge_mix, binlog.binlog_mysqlbinlog_filter + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # rpl.rpl_plugin_load + # fails due to included file not listed in expected result + # appears to be poor planning + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # fails due to bad cleanup of previous tests when run in parallel + # The tool is deprecated anyway + # Bug 532288 + for t in \ + binlog.binlog_mysqlbinlog_filter \ + binlog.binlog_statement_insert_delayed \ + funcs_1.is_columns_mysql \ + funcs_1.is_tables_mysql \ + funcs_1.is_triggers \ + main.information_schema \ + main.mysql_client_test \ + main.mysqld--help-notwin \ + perfschema.binlog_edge_mix \ + perfschema.binlog_edge_stmt \ + rpl.rpl_plugin_load \ + main.mysqlhotcopy_archive main.mysqlhotcopy_myisam \ + ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + if ! use extraengine ; then + # bug 401673, 530766 + for t in federated.federated_plugin ; do + mysql-multilib_disable_test "$t" "Test $t requires USE=extraengine (Need federated engine)" + done + fi + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --suite-timeout=5000 --reorder + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/mysqltuner/Manifest b/dev-db/mysqltuner/Manifest new file mode 100644 index 000000000000..321f0351d85b --- /dev/null +++ b/dev-db/mysqltuner/Manifest @@ -0,0 +1 @@ +DIST mysqltuner-1.2.0.tar.gz 24562 SHA256 54b743808f7f1d882cc912ffbb62dae57303e3e17f45aefd55a16825c016bc9d SHA512 b38277c31c1a870525f20bc1c023fe9675403834313a65c99c445a5fa1048c7aa3dc8ed5a9a9255c4844bdb001b28ee45be807306d0f1739c170d8ee9e0ab53f WHIRLPOOL 5290f77df91bcb23cc2bbb5097a08df54bc4e32560732ff078005bdd9acdf74a8f76647b893ab600dee4d848a70d6a6923e9806b30fb9504c6d3f5d31067be75 diff --git a/dev-db/mysqltuner/metadata.xml b/dev-db/mysqltuner/metadata.xml new file mode 100644 index 000000000000..ad3f83695628 --- /dev/null +++ b/dev-db/mysqltuner/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">rackerhacker/MySQLTuner-perl</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/mysqltuner/mysqltuner-1.2.0.ebuild b/dev-db/mysqltuner/mysqltuner-1.2.0.ebuild new file mode 100644 index 000000000000..ac272ddb7c71 --- /dev/null +++ b/dev-db/mysqltuner/mysqltuner-1.2.0.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="MySQLTuner is a high-performance MySQL tuning script" +HOMEPAGE="http://www.mysqltuner.com" +SRC_URI="https://github.com/rackerhacker/MySQLTuner-perl/tarball/05813a1faa447fe16c2a7efdab9b22c3bcbc5485 -> ${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND=">=dev-lang/perl-5.6 + virtual/perl-Getopt-Long + >=virtual/mysql-3.23" + +S="${WORKDIR}"/rackerhacker-MySQLTuner-perl-05813a1 + +src_install() { + mv "${PN}".pl "${PN}" + dobin "${PN}" + dodoc README +} diff --git a/dev-db/mytop/Manifest b/dev-db/mytop/Manifest new file mode 100644 index 000000000000..411147ef316a --- /dev/null +++ b/dev-db/mytop/Manifest @@ -0,0 +1 @@ +DIST mytop-1.6.tar.gz 19720 SHA256 b17c702598b10bb0ce2695f609122637c799eaaaec1afaa73246b048f07be9bd SHA512 672209d828c70fd740a791f2e4dfac1e4c594adff197b8bc43322249f03f6c7b18a750da0892c1519fe29e24b661e41d40cdad3a29b546dec4b3a747155566e2 WHIRLPOOL 4fd03d2e871db6b56db2fa7f39046f415a668c3732f47c0668f73ab7109048a8872cfdc01704ba4152d92500f2ab5c5c66b8d2e948748e43ab56e508980c3b08 diff --git a/dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch b/dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch new file mode 100644 index 000000000000..b911f9067baa --- /dev/null +++ b/dev-db/mytop/files/mytop-1.6-getopt-long-2.38-fixup.patch @@ -0,0 +1,14 @@ +Getopt-Long-2.38 is stricter about what it allows. + +diff -Nuar mytop-1.6.orig/mytop mytop-1.6/mytop +--- mytop-1.6.orig/mytop 2009-04-10 00:47:31.007111359 -0700 ++++ mytop-1.6/mytop 2009-04-10 00:50:39.875391905 -0700 +@@ -153,7 +153,7 @@ + "idle|i" => \$config{idle}, + "resolve|r" => \$config{resolve}, + "prompt!" => \$config{prompt}, +- "long|!" => \$config{long_nums}, ++ "long!" => \$config{long_nums}, + "mode|m=s" => \$config{mode}, + "sort=s" => \$config{sort}, + ); diff --git a/dev-db/mytop/files/mytop-1.6-global-status.patch b/dev-db/mytop/files/mytop-1.6-global-status.patch new file mode 100644 index 000000000000..ae75ac7867af --- /dev/null +++ b/dev-db/mytop/files/mytop-1.6-global-status.patch @@ -0,0 +1,103 @@ +Use GLOBAL STATUS instead of implicit session status. + +As of MySQL-5.0.72, many of the status variables split for session and global +variants. Importantly, the Com_* and Questions ones did, and this broke the +statistics at the top of mytop. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> +MySQL-Bug: 41131 +MySQL-Bug-URL: http://bugs.mysql.com/bug.php?id=41131 + +diff -Nuar --exclude '*~' mytop-1.6.orig/mytop mytop-1.6/mytop +--- mytop-1.6.orig/mytop 2007-02-16 20:57:46.000000000 -0800 ++++ mytop-1.6/mytop 2008-11-30 15:18:05.818845253 -0800 +@@ -98,7 +98,7 @@ + my %qcache = (); ## The query cache--used for full query info support. + my %ucache = (); ## The user cache--used for full killing by user + my %dbcache = (); ## The db cache. This should be merged at some point. +-my %statcache = (); ## The show status cache for GetShowStatus() ++my %statcache = (); ## The show global status cache for GetShowStatus() + + my (%STATUS, %OLD_STATUS); # header stuff. + +@@ -710,7 +710,7 @@ + ## + if ($config{header}) + { +- my @recs = Hashes("show status"); ++ my @recs = Hashes("show global status"); + + ## if the server died or we lost connectivity + if (not @recs) +@@ -755,7 +755,7 @@ + + ## Query Cache info + ## +- ## mysql> show status like 'qcache%'; ++ ## mysql> show global status like 'qcache%'; + ## +-------------------------+----------+ + ## | Variable_name | Value | + ## +-------------------------+----------+ +@@ -1064,7 +1064,7 @@ + + sub GetQPS() + { +- my($data) = Hashes('SHOW STATUS LIKE "Questions"'); ++ my($data) = Hashes('SHOW GLOBAL STATUS LIKE "Questions"'); + my $num = $data->{Value}; + + if (not defined $questions) ## first time? +@@ -1126,7 +1126,7 @@ + } + + # Variable_name and Value pairs come back... +- my @data = Hashes("SHOW STATUS LIKE 'Com_%'"); ++ my @data = Hashes("SHOW GLOBAL STATUS LIKE 'Com_%'"); + my %cmd_data; + my %cmd_delta; + my %cmd_pct; +@@ -1216,7 +1216,7 @@ + sub GetShowStatus() + { + Clear() unless $config{batchmode}; +- my @rows = Hashes("SHOW STATUS"); ++ my @rows = Hashes("SHOW GLOBAL STATUS"); + + printf "%32s %10s %10s\n", 'Counter', 'Total', 'Change'; + printf "%32s %10s %10s\n", '-------', '-----', '------'; +@@ -1543,7 +1543,7 @@ + + And you obviously need access to a MySQL server (version 3.22.x or + 3.23.x) with the necessary security to run the I<SHOW PROCESSLIST> and +-I<SHOW STATUS> commands. ++I<SHOW GLOBAL STATUS> commands. + + If you are a Windows user, using ActiveState's Perl, you can use PPM + (the Perl Package Manager) to install the MySQL and Term::ReadKey +@@ -1599,7 +1599,7 @@ + notice features from each of them here. + + B<mytop> will connect to a MySQL server and periodically run the +-I<SHOW PROCESSLIST> and I<SHOW STATUS> commands and attempt to ++I<SHOW PROCESSLIST> and I<SHOW GLOBAL STATUS> commands and attempt to + summarize the information from them in a useful format. + + =head2 The Display +@@ -1817,7 +1817,7 @@ + + =item B<c> + +-Show "command counters" based on the Com_* values in SHOW STATUS. ++Show "command counters" based on the Com_* values in SHOW GLOBAL STATUS. + This is a new feature. Feedback welcome. + + =item B<d> +@@ -1904,7 +1904,7 @@ + + Some performance information is not available when talking to a + version 3.22.x MySQL server. Additional information (about threads +-mostly) was added to the output of I<SHOW STATUS> in MySQL 3.23.x and ++mostly) was added to the output of I<SHOW GLOBAL STATUS> in MySQL 3.23.x and + B<mytop> makes use of it. If the information is not available, you + will simply see zeros where the real numbers should be. + diff --git a/dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch b/dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch new file mode 100644 index 000000000000..f1e139fe7471 --- /dev/null +++ b/dev-db/mytop/files/mytop-1.6-queries-vs-questions-mysql-5.0.76.patch @@ -0,0 +1,72 @@ +In MySQL 5.0.72 the Questions variable was changed to only contain the number +of client-initiated queries, NOT the number of overall queries. This caused +problems with the select/insert/update/delete percentages because Com_* was +still based on the overall queries. + +MySQL 5.0.76 introduced a new variable 'Queries' with the behavior of the old +Questions variable. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> +MySQL-Bug: 41131 +MySQL-Bug-URL: http://bugs.mysql.com/?id=41131 + +==== +Revision 2: +The first revision missed changing the instances of $OLD_STATUS{Questions}. + +diff -Nuar mytop-1.6.orig/mytop mytop-1.6/mytop +--- mytop-1.6.orig/mytop 2009-02-14 17:28:38.696187159 -0800 ++++ mytop-1.6/mytop 2009-02-14 17:36:31.192890507 -0800 +@@ -800,8 +800,15 @@ + + ## Queries per second... + +- my $avg_queries_per_sec = sprintf("%.2f", $STATUS{Questions} / $STATUS{Uptime}); +- my $num_queries = $STATUS{Questions}; ++ my ($num_queries, $old_num_queries); ++ if(defined($STATUS{Queries})) { ++ $num_queries = $STATUS{Queries}; ++ $old_num_queries = $OLD_STATUS{Queries}; ++ } else { ++ $num_queries = $STATUS{Questions}; ++ $old_num_queries = $OLD_STATUS{Questions}; ++ } ++ my $avg_queries_per_sec = sprintf("%.2f", $num_queries / $STATUS{Uptime}); + + my @t = localtime(time); + +@@ -820,25 +827,25 @@ + + + printf " Queries: %-5s qps: %4.0f Slow: %7s Se/In/Up/De(%%): %02.0f/%02.0f/%02.0f/%02.0f \n", +- make_short( $STATUS{Questions} ), # q total +- $STATUS{Questions} / $STATUS{Uptime}, # qps, average ++ make_short( $num_queries ), # q total ++ $num_queries / $STATUS{Uptime}, # qps, average + make_short( $STATUS{Slow_queries} ), # slow + + # hmm. a Qcache hit is really a select and should be counted. +- 100 * ($STATUS{Com_select} + ($STATUS{Qcache_hits}||0) ) / $STATUS{Questions}, +- 100 * ($STATUS{Com_insert} + $STATUS{Com_replace} ) / $STATUS{Questions}, +- 100 * ($STATUS{Com_update} ) / $STATUS{Questions}, +- 100 * $STATUS{Com_delete} / $STATUS{Questions}; ++ 100 * ($STATUS{Com_select} + ($STATUS{Qcache_hits}||0) ) / $num_queries, ++ 100 * ($STATUS{Com_insert} + $STATUS{Com_replace} ) / $num_queries, ++ 100 * ($STATUS{Com_update} ) / $num_queries, ++ 100 * $STATUS{Com_delete} / $num_queries; + + $lines_left--; + + if ($t_delta) + { +- my $q_diff = ( $STATUS{Questions} - $OLD_STATUS{Questions} ); +-# print("q_diff: $STATUS{Questions} - $OLD_STATUS{Questions} / $t_delta = $q_diff\n"); ++ my $q_diff = ( $num_queries - $old_num_queries ); ++# print("q_diff: $num_queries - $old_num_queries / $t_delta = $q_diff\n"); + + printf(" qps now: %4.0f Slow qps: %3.1f Threads: %4.0f (%4.0f/%4.0f) %02.0f/%02.0f/%02.0f/%02.0f \n", +- ( $STATUS{Questions} - $OLD_STATUS{Questions} ) / $t_delta, ++ ( $num_queries - $old_num_queries ) / $t_delta, + ( # slow now (qps) + ($STATUS{Slow_queries} ) ? + ( $STATUS{Slow_queries} - $OLD_STATUS{Slow_queries} ) / $t_delta : diff --git a/dev-db/mytop/metadata.xml b/dev-db/mytop/metadata.xml new file mode 100644 index 000000000000..716e7d4301bd --- /dev/null +++ b/dev-db/mytop/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +</pkgmetadata> diff --git a/dev-db/mytop/mytop-1.6-r4.ebuild b/dev-db/mytop/mytop-1.6-r4.ebuild new file mode 100644 index 000000000000..b0230f1a8f80 --- /dev/null +++ b/dev-db/mytop/mytop-1.6-r4.ebuild @@ -0,0 +1,37 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-module + +DESCRIPTION="mytop - a top clone for mysql" +HOMEPAGE="http://jeremy.zawodny.com/mysql/mytop/" +SRC_URI="http://jeremy.zawodny.com/mysql/mytop/${P}.tar.gz" + +LICENSE="|| ( Artistic GPL-2 )" +KEYWORDS="alpha amd64 ppc sparc x86" +SLOT="0" +IUSE="" + +RDEPEND="dev-perl/DBD-mysql + virtual/perl-Getopt-Long + dev-perl/TermReadKey + virtual/perl-Term-ANSIColor + virtual/perl-Time-HiRes" +DEPEND="${RDEPEND} + >=sys-apps/sed-4" + +PATCHES=( "${FILESDIR}/${PN}-1.6-global-status.patch" + "${FILESDIR}/${PN}-1.6-queries-vs-questions-mysql-5.0.76.patch" + "${FILESDIR}/${PN}-1.6-getopt-long-2.38-fixup.patch" + ) +SRC_TEST="do" + +src_install() { + perl-module_src_install + sed -i -r\ + -e "s|socket( +)=> '',|socket\1=> '/var/run/mysqld/mysqld.sock',|g" \ + "${D}"/usr/bin/mytop +} diff --git a/dev-db/octopus/Manifest b/dev-db/octopus/Manifest new file mode 100644 index 000000000000..65f198fe8b0f --- /dev/null +++ b/dev-db/octopus/Manifest @@ -0,0 +1,2 @@ +DIST octopus-3.0-1.src.tar.gz 25968343 SHA256 9f37514f0540c64aba2163b4c4faa5d5327db6c7f1946fcbe7dc0a36a2097cac SHA512 5591fa2bd8098260c240ed7e7294c7ec1aa4212b14f949c9497496d60a3ea1e6db989ef948c134e984e92ba2cbeecb0b3530ad5e4d0ad687a5e1a5f37d618315 WHIRLPOOL 5b67c458c7f418fa330cd539096438f472c14fdfd666ef5768075d5e1fd3c4d5c55690104b414cfd8609791904af8466a93d7db2cebdfebd903e7fd54becd564 +DIST octopus-xmls-3.0.1.tar.bz2 22492 SHA256 e92e32cfca1955e7de2cd6a02bdd9bf279b2cf9471bd0ba93a4e13532e4f4095 SHA512 88add21ac12e6b3898ab40db724464153c30ff4bf4826f71c26fa6c2aa53602793b5decc44428d150579bcd433246a64514469cd005f6fc76506194ae4e20e66 WHIRLPOOL 42da61f432da0613816bc4f352d02b5415ede2d9b98f239d0e8591f4e67ddc6b87ed6993127ee1f138bb35ca2922f4747ce2512cca51ba582caccaf2a9fa271a diff --git a/dev-db/octopus/files/octopus-3.0.1-gentoo-build.xml b/dev-db/octopus/files/octopus-3.0.1-gentoo-build.xml new file mode 100644 index 000000000000..fbd16ba766a8 --- /dev/null +++ b/dev-db/octopus/files/octopus-3.0.1-gentoo-build.xml @@ -0,0 +1,497 @@ +<?xml version="1.0"?> + +<project name="octopus" default="jar"> + <!-- some properties --> + <property name="dist.dir" value="dist" /> + <property name="build.top.dir" value="build" /> + <property name="docs.top.dir" value="docs" /> + <property name="target.jdk" value="1.4" /> + + <!-- init --> + <target name="init"> + <mkdir dir="${dist.dir}" /> + <mkdir dir="${docs.top.dir}" /> + <mkdir dir="${build.top.dir}" /> + + <mkdir dir="${build.octopus.dir}" /> + <mkdir dir="${docs.octopus.dir}" /> + + <mkdir dir="${build.octopus-generator.dir}" /> + <mkdir dir="${docs.octopus-generator.dir}" /> + + <mkdir dir="${build.octopus-task.dir}" /> + <mkdir dir="${docs.octopus-task.dir}" /> + + <mkdir dir="${build.octopus-test.dir}" /> + <mkdir dir="${docs.octopus-test.dir}" /> + + <mkdir dir="${build.csvjdbc.dir}" /> + <mkdir dir="${docs.csvjdbc.dir}" /> + + <mkdir dir="${build.xmljdbc.dir}" /> + <mkdir dir="${docs.xmljdbc.dir}" /> + + <mkdir dir="${build.log4jlogger.dir}" /> + <mkdir dir="${docs.log4jlogger.dir}" /> + + <mkdir dir="${build.i18njdbc.dir}" /> + <mkdir dir="${docs.i18njdbc.dir}" /> + + <mkdir dir="${build.xmlutil.dir}" /> + <mkdir dir="${docs.xmlutil.dir}" /> + </target> + + + <!-- jar all --> + <target name="jar-all" + depends="jar-octopus, jar-xmlutil, jar-octopus-generator, jar-octopus-task, jar-octopus-test, jar-xmlutil, jar-csvjdbc, jar-xmljdbc, jar-log4jlogger, jar-i18njdbc" /> + + <!-- docs all --> + <target name="docs-all" + depends="docs-octopus, docs-xmlutil, docs-octopus-generator, docs-octopus-task, docs-octopus-test, docs-xmlutil, docs-csvjdbc, docs-xmljdbc, docs-log4jlogger, docs-i18njdbc" /> + + <!-- sourcezip all --> + <target name="sourcezip-all" + depends="sourcezip-octopus, sourcezip-xmlutil, sourcezip-octopus-generator, sourcezip-octopus-task, sourcezip-octopus-test, sourcezip-xmlutil, sourcezip-csvjdbc, sourcezip-xmljdbc, sourcezip-log4jlogger, sourcezip-i18njdbc" /> + + + <!-- ############## --> + <!-- Octopus module --> + <!-- ############## --> + <property name="build.octopus.dir" value="build/Octopus" /> + <property name="docs.octopus.dir" value="docs/Octopus" /> + <property name="src.octopus.dir" value="Octopus" /> + <property name="jar.octopus" value="${dist.dir}/Octopus.jar" /> + + <!-- compile everything --> + <target name="compile-octopus" depends="init"> + <javac srcdir="${src.octopus.dir}/src" + destdir="${build.octopus.dir}" + source="${target.jdk}" + target="${target.jdk}" /> + + <copy todir="${build.octopus.dir}"> + <fileset dir="${src.octopus.dir}/xmls" /> + </copy> + </target> + + <!-- build the jar file --> + <target name="jar-octopus" depends="compile-octopus"> + <jar jarfile="${jar.octopus}" basedir="${build.octopus.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-octopus" depends="init"> + <javadoc sourcepath="${src.octopus.dir}/src" + packagenames="org.*" + destdir="${docs.octopus.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API" /> + </target> + + <!-- zip Octopus sources --> + <target name="sourcezip-octopus"> + <zip destfile="${dist.dir}/Octopus-src.zip"> + <zipfileset dir="${src.octopus.dir}/src" /> + </zip> + </target> + + + + <!-- ############## --> + <!-- xmlutil module --> + <!-- ############## --> + <property name="build.xmlutil.dir" value="build/XMLutil" /> + <property name="docs.xmlutil.dir" value="docs/XMLutil" /> + <property name="src.xmlutil.dir" value="XMLutil" /> + <property name="jar.xmlutil" value="${dist.dir}/xmlutil.jar" /> + + <!-- compile everything --> + <target name="compile-xmlutil" depends="init"> + <javac srcdir="${src.xmlutil.dir}/src/src" + destdir="${build.xmlutil.dir}" + source="${target.jdk}" + target="${target.jdk}" /> + </target> + + <!-- build the jar file --> + <target name="jar-xmlutil" depends="compile-xmlutil"> + <jar jarfile="${jar.xmlutil}" basedir="${build.xmlutil.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-xmlutil" depends="init"> + <javadoc sourcepath="${src.xmlutil.dir}/src/src" + packagenames="org.*" + destdir="${docs.xmlutil.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API" /> + </target> + + <!-- zip xmlutil sources --> + <target name="sourcezip-xmlutil"> + <zip destfile="${dist.dir}/XMLutil-src.zip"> + <zipfileset dir="${src.xmlutil.dir}/src/src" /> + </zip> + </target> + + + + <!-- ####################### --> + <!-- OctopusGenerator module --> + <!-- ####################### --> + <property name="build.octopus-generator.dir" value="build/OctopusGenerator" /> + <property name="docs.octopus-generator.dir" value="docs/OctopusGenerator" /> + <property name="src.octopus-generator.dir" value="OctopusGenerator" /> + <property name="jar.octopus-generator" value="${dist.dir}/OctopusGenerator.jar" /> + + <!-- compile everything --> + <target name="compile-octopus-generator" depends="init, jar-xmlutil, jar-octopus"> + <javac srcdir="${src.octopus-generator.dir}/src" + destdir="${build.octopus-generator.dir}" + source="${target.jdk}" + target="${target.jdk}"> + <classpath> + <pathelement path="${jar.octopus}" /> + <pathelement path="${jar.xmlutil}" /> + </classpath> + </javac> + + <copy todir="${build.octopus-generator.dir}"> + <fileset dir="${src.octopus-generator.dir}/src"> + <exclude name="**/*.java" /> + </fileset> + </copy> + </target> + + <!-- build the jar file --> + <target name="jar-octopus-generator" depends="compile-octopus-generator"> + <jar jarfile="${jar.octopus-generator}" basedir="${build.octopus-generator.dir}"> + <manifest> + <attribute name="Main-Class" value="org.webdocwf.util.loader.wizard.WizardFrame" /> + </manifest> + </jar> + </target> + + <!-- generate javadocs --> + <target name="docs-octopus-generator" depends="init, jar-xmlutil, jar-octopus"> + <javadoc sourcepath="${src.octopus-generator.dir}/src" + packagenames="org.*" + destdir="${docs.octopus-generator.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API"> + <classpath> + <pathelement path="${jar.octopus}" /> + <pathelement path="${jar.xmlutil}" /> + </classpath> + </javadoc> + </target> + + <!-- zip OctopusGenerator sources --> + <target name="sourcezip-octopus-generator"> + <zip destfile="${dist.dir}/OctopusGenerator-src.zip"> + <zipfileset dir="${src.octopus-generator.dir}/src" /> + </zip> + </target> + + + + + + <!-- ################### --> + <!-- OctopusTasks module --> + <!-- ################### --> + <property name="build.octopus-task.dir" value="build/OctopusTask" /> + <property name="docs.octopus-task.dir" value="docs/OctopusTask" /> + <property name="src.octopus-task.dir" value="OctopusTask" /> + <property name="jar.octopus-task" value="${dist.dir}/OctopusTask.jar" /> + + <!-- compile everything --> + <target name="compile-octopus-task" depends="init"> + <javac srcdir="${src.octopus-task.dir}/src" + destdir="${build.octopus-task.dir}" + source="${target.jdk}" + target="${target.jdk}" /> + </target> + + <!-- build the jar file --> + <target name="jar-octopus-task" depends="compile-octopus-task"> + <jar jarfile="${jar.octopus-task}" basedir="${build.octopus-task.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-octopus-task" depends="init"> + <javadoc sourcepath="${src.octopus-task.dir}/src" + packagenames="org.*" + destdir="${docs.octopus-task.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API" /> + </target> + + <!-- zip OctopusTask sources --> + <target name="sourcezip-octopus-task"> + <zip destfile="${dist.dir}/OctopusTask-src.zip"> + <zipfileset dir="${src.octopus-task.dir}/src" /> + </zip> + </target> + + + + <!-- ################## --> + <!-- OctopusTest module --> + <!-- ################## --> + <property name="build.octopus-test.dir" value="build/OctopusTest" /> + <property name="docs.octopus-test.dir" value="docs/OctopusTest" /> + <property name="src.octopus-test.dir" value="OctopusTest" /> + <property name="jar.octopus-test" value="${dist.dir}/OctopusTest.jar" /> + + <!-- compile everything --> + <target name="compile-octopus-test" depends="init, jar-octopus"> + <javac srcdir="${src.octopus-test.dir}/src" + destdir="${build.octopus-test.dir}" + source="${target.jdk}" + target="${target.jdk}"> + <classpath> + <pathelement path="${jar.octopus}" /> + </classpath> + </javac> + </target> + + <!-- build the jar file --> + <target name="jar-octopus-test" depends="compile-octopus-test"> + <jar jarfile="${jar.octopus-test}" basedir="${build.octopus-test.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-octopus-test" depends="init, jar-octopus"> + <javadoc sourcepath="${src.octopus-test.dir}/src" + packagenames="org.*" + destdir="${docs.octopus-test.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API"> + <classpath> + <pathelement path="${jar.octopus}" /> + </classpath> + </javadoc> + </target> + + <!-- zip OctopusTest sources --> + <target name="sourcezip-octopus-test"> + <zip destfile="${dist.dir}/OctopusTest-src.zip"> + <zipfileset dir="${src.octopus-test.dir}/src" /> + </zip> + </target> + + + + + <!-- ############## --> + <!-- Csvjdbc module --> + <!-- ############## --> + <property name="build.csvjdbc.dir" value="build/Csvjdbc" /> + <property name="docs.csvjdbc.dir" value="docs/Csvjdbc" /> + <property name="src.csvjdbc.dir" value="Csvjdbc" /> + <property name="jar.csvjdbc" value="${dist.dir}/csvjdbc.jar" /> + + <!-- compile everything --> + <target name="compile-csvjdbc" depends="init"> + <javac srcdir="${src.csvjdbc.dir}/src/src/java" + destdir="${build.csvjdbc.dir}" + source="${target.jdk}" + target="${target.jdk}" /> + </target> + + <!-- build the jar file --> + <target name="jar-csvjdbc" depends="compile-csvjdbc"> + <jar jarfile="${jar.csvjdbc}" basedir="${build.csvjdbc.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-csvjdbc" depends="init"> + <javadoc sourcepath="${src.csvjdbc.dir}/src/src/java" + packagenames="org.*" + destdir="${docs.csvjdbc.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API" /> + </target> + + <!-- zip Csvjdbc sources --> + <target name="sourcezip-csvjdbc"> + <zip destfile="${dist.dir}/Csvjdbc-src.zip"> + <zipfileset dir="${src.csvjdbc.dir}/src/src/java" /> + </zip> + </target> + + + + + <!-- ############## --> + <!-- xmljdbc module --> + <!-- ############## --> + <property name="build.xmljdbc.dir" value="build/XMLjdbc" /> + <property name="docs.xmljdbc.dir" value="docs/XMLjdbc" /> + <property name="src.xmljdbc.dir" value="XMLjdbc" /> + <property name="jar.xmljdbc" value="${dist.dir}/xmljdbc.jar" /> + + <!-- compile everything --> + <target name="compile-xmljdbc" depends="init, jar-xmlutil"> + <javac srcdir="${src.xmljdbc.dir}/src/src" + destdir="${build.xmljdbc.dir}" + source="${target.jdk}" + target="${target.jdk}"> + <classpath> + <pathelement path="${jar.xmlutil}" /> + </classpath> + </javac> + </target> + + <!-- build the jar file --> + <target name="jar-xmljdbc" depends="compile-xmljdbc"> + <jar jarfile="${jar.xmljdbc}" basedir="${build.xmljdbc.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-xmljdbc" depends="init, jar-xmlutil"> + <javadoc sourcepath="${src.xmljdbc.dir}/src/src" + packagenames="org.*" + destdir="${docs.xmljdbc.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API"> + <classpath> + <pathelement path="${jar.xmlutil}" /> + </classpath> + </javadoc> + </target> + + <!-- zip XMLjdbc sources --> + <target name="sourcezip-xmljdbc"> + <zip destfile="${dist.dir}/XMLjdbc-src.zip"> + <zipfileset dir="${src.xmljdbc.dir}/src" /> + </zip> + </target> + + + + + <!-- ################## --> + <!-- Log4jlogger module --> + <!-- ################## --> + <property name="build.log4jlogger.dir" value="build/Log4jlogger" /> + <property name="docs.log4jlogger.dir" value="docs/Log4jlogger" /> + <property name="src.log4jlogger.dir" value="Log4jlogger" /> + <property name="jar.log4jlogger" value="${dist.dir}/Log4jlogger.jar" /> + + <!-- compile everything --> + <target name="compile-log4jlogger" depends="init, jar-octopus"> + <javac srcdir="${src.log4jlogger.dir}/src" + destdir="${build.log4jlogger.dir}" + source="${target.jdk}" + target="${target.jdk}"> + <classpath> + <pathelement path="${jar.octopus}" /> + </classpath> + </javac> + </target> + + <!-- build the jar file --> + <target name="jar-log4jlogger" depends="compile-log4jlogger"> + <jar jarfile="${jar.log4jlogger}" basedir="${build.log4jlogger.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-log4jlogger" depends="init, jar-octopus"> + <javadoc sourcepath="${src.log4jlogger.dir}/src" + packagenames="org.*" + destdir="${docs.log4jlogger.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API"> + <classpath> + <pathelement path="${jar.octopus}" /> + </classpath> + </javadoc> + </target> + + <!-- zip Log4jlogger sources --> + <target name="sourcezip-log4jlogger"> + <zip destfile="${dist.dir}/Log4jlogger-src.zip"> + <zipfileset dir="${src.log4jlogger.dir}/src" /> + </zip> + </target> + + + + + <!-- ############### --> + <!-- i18njdbc module --> + <!-- ############### --> + <property name="build.i18njdbc.dir" value="build/i18njdbc" /> + <property name="docs.i18njdbc.dir" value="docs/i18njdbc" /> + <property name="src.i18njdbc.dir" value="i18njdbc" /> + <property name="jar.i18njdbc" value="${dist.dir}/i18njdbc.jar" /> + + <!-- compile everything --> + <target name="compile-i18njdbc" depends="init"> + <javac srcdir="${src.i18njdbc.dir}/src" + destdir="${build.i18njdbc.dir}" + source="${target.jdk}" + target="${target.jdk}" /> + </target> + + <!-- build the jar file --> + <target name="jar-i18njdbc" depends="compile-i18njdbc"> + <jar jarfile="${jar.i18njdbc}" basedir="${build.i18njdbc.dir}" /> + </target> + + <!-- generate javadocs --> + <target name="docs-i18njdbc" depends="init"> + <javadoc sourcepath="${src.i18njdbc.dir}/src" + packagenames="org.*" + destdir="${docs.i18njdbc.dir}" + author="true" + version="true" + use="true" + source="${target.jdk}" + windowtitle="${ant.project.name} API" /> + </target> + + <!-- zip Octopus sources --> + <target name="sourcezip-i18njdbc"> + <zip destfile="${dist.dir}/i18njdbc-src.zip"> + <zipfileset dir="${src.i18njdbc.dir}/src" /> + </zip> + </target> + + + <!-- clean up --> + <target name="clean"> + <delete dir="${build.top.dir}" /> + <delete dir="${docs.top.dir}" /> + <delete dir="${dist.dir}" /> + </target> + + +</project> diff --git a/dev-db/octopus/files/octopus-jdk-1.5.patch b/dev-db/octopus/files/octopus-jdk-1.5.patch new file mode 100644 index 000000000000..4d4996995376 --- /dev/null +++ b/dev-db/octopus/files/octopus-jdk-1.5.patch @@ -0,0 +1,220 @@ +diff -Naur XMLutil.bak/src/src/org/enhydra/xml/AttrImpl.java XMLutil/src/src/org/enhydra/xml/AttrImpl.java +--- XMLutil/src/src/org/enhydra/xml/AttrImpl.java 2009-09-18 17:39:19.000000000 +1200 ++++ XMLutil/src/src/org/enhydra/xml/AttrImpl.java 2009-09-18 18:03:36.000000000 +1200 +@@ -20,6 +20,7 @@ + + import org.w3c.dom.Attr; + import org.w3c.dom.Element; ++import org.w3c.dom.TypeInfo; + + + /** +@@ -186,4 +187,18 @@ + public Element getOwnerElement() { + return owner; + } +-} +\ No newline at end of file ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public TypeInfo getSchemaTypeInfo() { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public boolean isId() { ++ return false; ++ } ++} +diff -Naur XMLutil.bak/src/src/org/enhydra/xml/CharacterDataImpl.java XMLutil/src/src/org/enhydra/xml/CharacterDataImpl.java +--- XMLutil/src/src/org/enhydra/xml/CharacterDataImpl.java 2009-09-18 17:39:19.000000000 +1200 ++++ XMLutil/src/src/org/enhydra/xml/CharacterDataImpl.java 2009-09-18 18:06:38.000000000 +1200 +@@ -177,5 +177,4 @@ + return super.getNamespaceURI(); + } + +- + } +diff -Naur XMLutil.bak/src/src/org/enhydra/xml/ElementImpl.java XMLutil/src/src/org/enhydra/xml/ElementImpl.java +--- XMLutil/src/src/org/enhydra/xml/ElementImpl.java 2009-09-18 17:39:19.000000000 +1200 ++++ XMLutil/src/src/org/enhydra/xml/ElementImpl.java 2009-09-18 18:25:24.000000000 +1200 +@@ -33,6 +33,7 @@ + import org.w3c.dom.NamedNodeMap; + import org.w3c.dom.Node; + import org.w3c.dom.NodeList; ++import org.w3c.dom.TypeInfo; + + /** + * @author Tweety +@@ -564,4 +565,33 @@ + sb.append("</" + this.nodeName + ">"); + // } + } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public TypeInfo getSchemaTypeInfo() { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public void setIdAttribute(String name, ++ boolean idId) ++ throws DOMException { } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public void setIdAttributeNS(String name, ++ String localName, ++ boolean isId) ++ throws DOMException {} ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public void setIdAttributeNode(Attr idAttr, ++ boolean isId) ++ throws DOMException {} + } +diff -Naur XMLutil.bak/src/src/org/enhydra/xml/NodeImpl.java XMLutil/src/src/org/enhydra/xml/NodeImpl.java +--- XMLutil/src/src/org/enhydra/xml/NodeImpl.java 2009-09-18 17:39:19.000000000 +1200 ++++ XMLutil/src/src/org/enhydra/xml/NodeImpl.java 2009-09-18 18:19:58.000000000 +1200 +@@ -33,6 +33,7 @@ + import org.w3c.dom.NamedNodeMap; + import org.w3c.dom.Node; + import org.w3c.dom.NodeList; ++import org.w3c.dom.UserDataHandler; + + /** + * @author Tweety +@@ -784,6 +785,92 @@ + return sb.toString(); + } + ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public String getBaseURI() { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public short compareDocumentPosition(Node other) ++ throws DOMException { ++ throw new DOMException(DOMException.NOT_SUPPORTED_ERR, ++ "Unimplemented method"); ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public String getTextContent() throws DOMException { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public void setTextContent(String textContent) ++ throws DOMException { } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public boolean isSameNode(Node other) { ++ return false; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public String lookupPrefix(String namespaceURI) { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public boolean isDefaultNamespace(String namespaceURI) { ++ return true; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public String lookupNamespaceURI(String prefix) { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public boolean isEqualNode(Node arg) { ++ return false; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public Object getFeature(String feature, String version) { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public Object setUserData(String key, Object data, ++ UserDataHandler handler) { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public Object getUserData(String key) { ++ return null; ++ } ++ + + /** + * Method beginToString should be redefined in extended classes. +diff -Naur XMLutil.bak/src/src/org/enhydra/xml/TextImpl.java XMLutil/src/src/org/enhydra/xml/TextImpl.java +--- XMLutil/src/src/org/enhydra/xml/TextImpl.java 2009-09-18 17:39:19.000000000 +1200 ++++ XMLutil/src/src/org/enhydra/xml/TextImpl.java 2009-09-18 18:27:04.000000000 +1200 +@@ -161,4 +161,26 @@ + + } + ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public boolean isElementContentWhitespace() { ++ return false; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public String getWholeText() { ++ return null; ++ } ++ ++ /** ++ * Unimplemented method included in DOM Level 3 (aka 1.5). ++ */ ++ public Text replaceWholeText(String content) ++ throws DOMException { ++ return null; ++ } ++ + } diff --git a/dev-db/octopus/metadata.xml b/dev-db/octopus/metadata.xml new file mode 100644 index 000000000000..1ba612179c83 --- /dev/null +++ b/dev-db/octopus/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>java</herd> + <longdescription> + A Java-based Extraction, Transformation, and Loading (ETL) tool. + It may connect to any JDBC data sources and perform transformations + defined in an XML file. + </longdescription> +</pkgmetadata> diff --git a/dev-db/octopus/octopus-3.0.1-r3.ebuild b/dev-db/octopus/octopus-3.0.1-r3.ebuild new file mode 100644 index 000000000000..7e182f6b7fd4 --- /dev/null +++ b/dev-db/octopus/octopus-3.0.1-r3.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" +JAVA_PKG_IUSE="doc source" +JAVA_PKG_WANT_BOOTCLASSPATH="1.5" + +inherit versionator java-pkg-2 java-ant-2 + +MY_PV=${PV//./-} +MY_PV=${MY_PV/-/.} +DESCRIPTION="A Java-based Extraction, Transformation, and Loading (ETL) tool" +SRC_URI="http://download.forge.objectweb.org/${PN}/${PN}-${MY_PV}.src.tar.gz + mirror://gentoo/${PN}-xmls-${PV}.tar.bz2" +HOMEPAGE="http://octopus.objectweb.org" +LICENSE="LGPL-2.1" +SLOT="3.0" +KEYWORDS="amd64 x86" +IUSE="" +COMMON_DEP=" + >=dev-java/xerces-2.7 + >=dev-java/log4j-1.2.8 + =dev-java/rhino-1.6* + =dev-java/junit-3.8* + >=dev-java/ant-core-1.4" + +RDEPEND=">=virtual/jre-1.5 + ${COMMON_DEP}" + +DEPEND=">=virtual/jdk-1.5 + ${COMMON_DEP}" + +# uses enum as identifier +JAVA_PKG_WANT_SOURCE="1.4" +JAVA_PKG_WANT_TARGET="1.4" + +TOPDIR="${PN}-$(get_version_component_range 1-2)" +S=${WORKDIR}/${TOPDIR}/Octopus-src + +java_prepare() { + rm -fr ${TOPDIR}/maven + + mv "${WORKDIR}/xmls" "${S}/modules/Octopus" + + cd "${S}"/modules + cp "${FILESDIR}/${P}-gentoo-build.xml" build.xml + java-ant_rewrite-classpath build.xml + java-pkg_filter-compiler jikes + java-ant_rewrite-bootclasspath 1.5 + + epatch "${FILESDIR}/${PN}-jdk-1.5.patch" +} + +EANT_GENTOO_CLASSPATH="xerces-2,rhino-1.6,ant-core,junit,log4j" + +src_compile() { + cd "${S}/modules" + + use source && antflags="${antflags} sourcezip-all" + + eant jar-all $(use_doc docs-all) ${antflags} +} + +RESTRICT="test" + +# Would need maven to work properly as the build.xml just launches maven +#src_test() { +# eant test +#} + +src_install() { + dodoc ChangeLog.txt ReleaseNotes.txt + + cd "${S}/modules" + java-pkg_dojar dist/*.jar + + if use source; then + dodir /usr/share/doc/${PF}/source + cp dist/*-src.zip "${D}usr/share/doc/${PF}/source" + fi + if use doc; then + docinto html/api + # Has multiple javadoc subdirs here + java-pkg_dohtml -r docs/* + fi +} diff --git a/dev-db/octopus/octopus-3.0.1-r4.ebuild b/dev-db/octopus/octopus-3.0.1-r4.ebuild new file mode 100644 index 000000000000..3bd56f350799 --- /dev/null +++ b/dev-db/octopus/octopus-3.0.1-r4.ebuild @@ -0,0 +1,87 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +JAVA_PKG_IUSE="doc source" +JAVA_PKG_WANT_BOOTCLASSPATH="1.5" + +inherit versionator java-pkg-2 java-ant-2 + +MY_PV=${PV//./-} +MY_PV=${MY_PV/-/.} +DESCRIPTION="A Java-based Extraction, Transformation, and Loading (ETL) tool" +SRC_URI="http://download.forge.objectweb.org/${PN}/${PN}-${MY_PV}.src.tar.gz + mirror://gentoo/${PN}-xmls-${PV}.tar.bz2" +HOMEPAGE="http://octopus.objectweb.org" +LICENSE="LGPL-2.1" +SLOT="3.0" +KEYWORDS="~amd64 ~x86" +IUSE="" +COMMON_DEP=" + >=dev-java/xerces-2.7 + >=dev-java/log4j-1.2.8 + =dev-java/rhino-1.6* + =dev-java/junit-3.8* + >=dev-java/ant-core-1.4" + +RDEPEND=">=virtual/jre-1.6 + ${COMMON_DEP}" + +DEPEND=">=virtual/jdk-1.6 + ${COMMON_DEP}" + +# uses enum as identifier +JAVA_PKG_WANT_SOURCE="1.4" +JAVA_PKG_WANT_TARGET="1.4" + +TOPDIR="${PN}-$(get_version_component_range 1-2)" +S=${WORKDIR}/${TOPDIR}/Octopus-src + +java_prepare() { + rm -fr ${TOPDIR}/maven || die + mv "${WORKDIR}/xmls" "${S}/modules/Octopus" || die + cd "${S}"/modules || die + + cp "${FILESDIR}/${P}-gentoo-build.xml" build.xml || die + java-ant_rewrite-classpath build.xml + java-pkg_filter-compiler jikes + java-ant_rewrite-bootclasspath 1.5 + + epatch "${FILESDIR}/${PN}-jdk-1.5.patch" +} + +EANT_GENTOO_CLASSPATH="xerces-2,rhino-1.6,ant-core,junit,log4j" + +src_compile() { + cd "${S}/modules" || die + + use source && antflags="${antflags} sourcezip-all" + + eant jar-all $(use_doc docs-all) ${antflags} +} + +RESTRICT="test" + +# Would need maven to work properly as the build.xml just launches maven +#src_test() { +# eant test +#} + +src_install() { + dodoc ChangeLog.txt ReleaseNotes.txt + + cd "${S}/modules" || die + java-pkg_dojar dist/*.jar + + if use source; then + dodir /usr/share/doc/${PF}/source + cp dist/*-src.zip "${D}usr/share/doc/${PF}/source" + fi + + if use doc; then + docinto html/api + # Has multiple javadoc subdirs here + java-pkg_dohtml -r docs/* + fi +} diff --git a/dev-db/odbtp/Manifest b/dev-db/odbtp/Manifest new file mode 100644 index 000000000000..e6e267ae640a --- /dev/null +++ b/dev-db/odbtp/Manifest @@ -0,0 +1 @@ +DIST odbtp-1.1.4.tar.gz 1049975 SHA256 c4f4e0b01610d0e547dfe70e9e2184fc35c8944a44be6a70ec8c8fc28dffe705 SHA512 4b87c8733fc1f017546024901874b0ea2f410646ef39f9581cc170773639077c3f885813550422966e8797489c66b32b75de85fa658e3bb84da285b96c0a7b70 WHIRLPOOL b5443d5639e9d1f938d3708153cdc10a92ba6c2f8e4a1615c897ac05aebb88d59903ddde59092130373abcf8daefe59086c6eac9f686dce753be03cd68012d4a diff --git a/dev-db/odbtp/files/odbtp-1.1.4-amd64.patch b/dev-db/odbtp/files/odbtp-1.1.4-amd64.patch new file mode 100644 index 000000000000..1ba2cb3b71e5 --- /dev/null +++ b/dev-db/odbtp/files/odbtp-1.1.4-amd64.patch @@ -0,0 +1,11 @@ +--- odbtp-1.1.4/odbtp.h.old 2006-11-05 21:29:33.000000000 +0100 ++++ odbtp-1.1.4/odbtp.h 2006-11-05 21:29:44.000000000 +0100 +@@ -22,7 +22,7 @@ + #define _ODBTP_H_ + + /* The below line must be uncommented for 64-bit systems, such as Tru64. */ +-/* #define _C_LONG_64_ 1 */ ++#define _C_LONG_64_ 1 + + #define ODBTP_LIB_VERSION "1.1.4" + diff --git a/dev-db/odbtp/metadata.xml b/dev-db/odbtp/metadata.xml new file mode 100644 index 000000000000..63c0c25310b1 --- /dev/null +++ b/dev-db/odbtp/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">odbtp</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/odbtp/odbtp-1.1.4.ebuild b/dev-db/odbtp/odbtp-1.1.4.ebuild new file mode 100644 index 000000000000..8604f7e45aed --- /dev/null +++ b/dev-db/odbtp/odbtp-1.1.4.ebuild @@ -0,0 +1,39 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils toolchain-funcs + +DESCRIPTION="Fast, efficient TCP/IP protocol for connecting to Win32-based databases from any platform" +HOMEPAGE="http://odbtp.sourceforge.net/" +SRC_URI="mirror://sourceforge/odbtp/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc" + +src_unpack() { + unpack ${A} + cd "${S}" + + # Patch according to the README.64bitOS + use amd64 && epatch "${FILESDIR}/${P}-amd64.patch" +} + +src_compile() { + # respect $CC (bug #243768) + tc-export CC + econf || die "econf failed" + emake -j1 || die "emake failed" +} + +src_install() { + make DESTDIR="${D}" install || die "make install failed" + + # Install various documentation + dodoc AUTHORS INSTALL NEWS README* + if use doc ; then + dohtml -r docs/* + fi +} diff --git a/dev-db/opendbx/Manifest b/dev-db/opendbx/Manifest new file mode 100644 index 000000000000..7949aa68c773 --- /dev/null +++ b/dev-db/opendbx/Manifest @@ -0,0 +1,3 @@ +DIST libopendbx-1.5.0.tar.gz 583894 SHA256 1a274939847c3b3d3614c19cad86539007737c60ba0d7259614a0967b1fd71d9 SHA512 7e4e9b8c62fd981276f6747f8184d7e34d743b866bfd76c8126a16371b50dc682177fd563212333d2dbebe2128d0b1527fc69029833329ba8cc0311308fa9bb5 WHIRLPOOL c5a933fcbffe6f7c7589a43d7f4148375b30d81d7221a0148bece6f3d3f1ea490fade6b8c160f4db0576ada31aab00a69d828418e67f2c8b0b4df6f31fcf184b +DIST opendbx-1.4.5.tar.gz 582915 SHA256 206c998f370d1677a5692a64941470205dc6cd8ad95be1af6b033df50a6431cd SHA512 e46289f9a7eb8b6e4084863834f8c4ca080eb3343b5f9d5837c476bab0a39e798a6364c8648f9fb53e52ab60cae57749b9f7e9bd23cb95b8ff21160f1bf4247e WHIRLPOOL 0a518ee0993447c67731141bc105ff5c082cb434c575a64b3df53614ffc6a72e8734b2720ffa46697b52e81e544e4a3752517059b534faae5698060af71bc5ef +DIST opendbx-1.4.6.tar.gz 587514 SHA256 2246a03812c7d90f10194ad01c2213a7646e383000a800277c6fb8d2bf81497c SHA512 dd6d53d29157057dbf4e273fd82c7694e8bc626d3409d6ab9c25627a0fec96418326550fa8004b5341facdc4cd8aae12516224e8bb84e2562482885780ff0e55 WHIRLPOOL b66761e99e04119f2aaefa071c8a35a9f0af84a012e7e2f908eb9fefc9bae99a26a9942c1adf3e5dc6061ff78fb4ae0d0397bebcb709ea10c7a7797f95f03aad diff --git a/dev-db/opendbx/metadata.xml b/dev-db/opendbx/metadata.xml new file mode 100644 index 000000000000..35926e0cab20 --- /dev/null +++ b/dev-db/opendbx/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> + <email>alicef@gentoo.org</email> + <name>Alice Ferrazzi</name> +</maintainer> +</pkgmetadata> diff --git a/dev-db/opendbx/opendbx-1.4.5-r1.ebuild b/dev-db/opendbx/opendbx-1.4.5-r1.ebuild new file mode 100644 index 000000000000..0811f962c82a --- /dev/null +++ b/dev-db/opendbx/opendbx-1.4.5-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit flag-o-matic multilib + +DESCRIPTION="OpenDBX - A database abstraction layer" +HOMEPAGE="http://www.linuxnetworks.de/doc/index.php/OpenDBX" +SRC_URI="http://www.linuxnetworks.de/opendbx/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="firebird +mysql oracle postgres sqlite" +RESTRICT="firebird? ( bindist )" + +DEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 ) + oracle? ( dev-db/oracle-instantclient-basic ) + firebird? ( dev-db/firebird )" +RDEPEND="${DEPEND}" + +pkg_setup() { + if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite ) + then + ewarn "You should enable at least one of the following USE flags:" + ewarn "firebird, mysql, oracle, postgres or sqlite" + fi + + if use oracle && [[ ! -d ${ORACLE_HOME} ]] + then + die "Oracle support requested, but ORACLE_HOME not set to a valid directory!" + fi + + use mysql && append-cppflags -I/usr/include/mysql + use firebird && append-cppflags -I/opt/firebird/include + use oracle && append-ldflags -L"${ORACLE_HOME}"/lib +} + +src_configure() { + local backends="" + + use firebird && backends="${backends} firebird" + use mysql && backends="${backends} mysql" + use oracle && backends="${backends} oracle" + use postgres && backends="${backends} pgsql" + use sqlite && backends="${backends} sqlite3" + + econf --with-backends="${backends}" +} + +src_compile() { + # bug #322221 + emake -j1 +} + +src_install() { + emake -j1 install DESTDIR="${D}" + dodoc AUTHORS ChangeLog README + + rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la} +} diff --git a/dev-db/opendbx/opendbx-1.4.6-r1.ebuild b/dev-db/opendbx/opendbx-1.4.6-r1.ebuild new file mode 100644 index 000000000000..3aca2ca22967 --- /dev/null +++ b/dev-db/opendbx/opendbx-1.4.6-r1.ebuild @@ -0,0 +1,65 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit flag-o-matic multilib + +DESCRIPTION="OpenDBX - A database abstraction layer" +HOMEPAGE="http://www.linuxnetworks.de/doc/index.php/OpenDBX" +SRC_URI="http://www.linuxnetworks.de/opendbx/download/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="firebird +mysql oracle postgres sqlite" +RESTRICT="firebird? ( bindist )" + +DEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 ) + oracle? ( dev-db/oracle-instantclient-basic ) + firebird? ( dev-db/firebird )" +RDEPEND="${DEPEND}" + +pkg_setup() { + if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite ) + then + ewarn "You should enable at least one of the following USE flags:" + ewarn "firebird, mysql, oracle, postgres or sqlite" + fi + + if use oracle && [[ ! -d ${ORACLE_HOME} ]] + then + die "Oracle support requested, but ORACLE_HOME not set to a valid directory!" + fi + + use mysql && append-cppflags -I/usr/include/mysql + use firebird && append-cppflags -I/opt/firebird/include + use oracle && append-ldflags -L"${ORACLE_HOME}"/lib +} + +src_configure() { + local backends="" + + use firebird && backends="${backends} firebird" + use mysql && backends="${backends} mysql" + use oracle && backends="${backends} oracle" + use postgres && backends="${backends} pgsql" + use sqlite && backends="${backends} sqlite3" + + econf --with-backends="${backends}" || die "econf failed" +} + +src_compile() { + # bug #322221 + emake -j1 || die "emake failed" +} + +src_install() { + emake -j1 install DESTDIR="${D}" || die "make install failed" + dodoc AUTHORS ChangeLog README + + rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la} +} diff --git a/dev-db/opendbx/opendbx-1.5.0-r1.ebuild b/dev-db/opendbx/opendbx-1.5.0-r1.ebuild new file mode 100644 index 000000000000..237b027d9b47 --- /dev/null +++ b/dev-db/opendbx/opendbx-1.5.0-r1.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit flag-o-matic multilib + +MY_PN="lib${PN}" +MY_P="${MY_PN}-${PV}" + +DESCRIPTION="OpenDBX - A database abstraction layer" +HOMEPAGE="http://www.linuxnetworks.de/doc/index.php/OpenDBX" +SRC_URI="http://www.linuxnetworks.de/opendbx/download/${MY_P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~x64-solaris" +IUSE="firebird +mysql oracle postgres sqlite" +RESTRICT="firebird? ( bindist )" + +DEPEND="mysql? ( virtual/mysql ) + postgres? ( dev-db/postgresql:* ) + sqlite? ( dev-db/sqlite:3 ) + oracle? ( dev-db/oracle-instantclient-basic ) + firebird? ( dev-db/firebird )" +RDEPEND="${DEPEND}" + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite ) + then + ewarn "You should enable at least one of the following USE flags:" + ewarn "firebird, mysql, oracle, postgres or sqlite" + fi + + if use oracle && [[ ! -d ${ORACLE_HOME} ]] + then + die "Oracle support requested, but ORACLE_HOME not set to a valid directory!" + fi + + use mysql && append-cppflags -I/usr/include/mysql + use firebird && append-cppflags -I/opt/firebird/include + use oracle && append-ldflags -L"${ORACLE_HOME}"/lib +} + +src_configure() { + local backends="" + + use firebird && backends="${backends} firebird" + use mysql && backends="${backends} mysql" + use oracle && backends="${backends} oracle" + use postgres && backends="${backends} pgsql" + use sqlite && backends="${backends} sqlite3" + + econf --with-backends="${backends}" || die "econf failed" +} + +src_compile() { + # bug #322221 + emake -j1 || die "emake failed" +} + +src_install() { + emake -j1 install DESTDIR="${D}" || die "make install failed" + dodoc AUTHORS ChangeLog README + + rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la} +} diff --git a/dev-db/oracle-instantclient-basic/Manifest b/dev-db/oracle-instantclient-basic/Manifest new file mode 100644 index 000000000000..466c86e32785 --- /dev/null +++ b/dev-db/oracle-instantclient-basic/Manifest @@ -0,0 +1,16 @@ +DIST instantclient-basic-linux-11.2.0.3.0.zip 58502865 SHA256 1d5f9a3db6cdf91c332e75aa42995729e499f794bea6c5806ecba357c1258239 SHA512 c790f593e67bcc7c114a6287e1f064c03f292472e0a1a5e617a9f19017f06442f31502f66af8e6cfdf2235a18546104dc9aac164a3aa641db5728b66685c9302 WHIRLPOOL 5d2f256cfb39af3207698b261c12837a2b8385e4e11cee8d2bad6978899168962d396c2239d9a92f7656a44b9e3391057d23e176749fc74b6622a8d386d7241c +DIST instantclient-basic-linux-11.2.0.4.0.zip 58793148 SHA256 462c300f43a87d053e8254982bf955d850ddc7b2801bbf6686dcf5ea8139b06d SHA512 b333c9334e960617ac7cc68ad1c7b45f990d5c24c7a5bc8e51b3bc8ff6476acfb6a032521f75ba39327c71ee9676d1163b252066d52e97c1dfe9c092a92a62a0 WHIRLPOOL efd4ea8c7c3fe52203f81b0c236d0da2b169069d5bb27e1ec985606051d4fa7ce95e1e53525b534a392b2e647916431a8b9cda34f408ce2c16c3740eaee0b098 +DIST instantclient-basic-linux-x86-64-10.2.0.3-20070103.zip 36454483 SHA256 9195ab13e59365bfef6b2b43732a652d77d7ef8b93019f31104bc13832c6a491 +DIST instantclient-basic-linux-x86-64-11.2.0.2.0.zip 59090676 SHA256 eeaa8101138b59c73c22bbb25e2a1cfd415dc830cafba6f9f19696789ab666e2 +DIST instantclient-basic-linux.x64-11.2.0.3.0.zip 60331694 SHA256 202d8abc5a3e626e00fdba805b60b3e4bd21aaa94a49cc3fc36bc4ed616ab436 SHA512 708940b5ca5bc4e0617da2c4da61d0a85834e3e0731ac328a201954558a624162f71d342d674b08ec2cf076e8f639c230f88a73f6d9bfe8908b0e76805e617b7 WHIRLPOOL 3b9653c2bebcd63177158d1a9520296368afbf63b1d7693ee15104b4869aa7573b9227d5958eda7c1a520a98ca98bae780209077487e0885bd09396071c90e95 +DIST instantclient-basic-linux.x64-11.2.0.4.0.zip 60704657 SHA256 77efd0021c3e122075bf994786646e123063af843475395eb95b139501387160 SHA512 01ed32f1771bfa2f8ef1b81314843fb2b7b81582f33c07d86670c959bbb08355dc7cc8da586852bb353a3a914658d1e7828d6b5df884215de8d76881c956a989 WHIRLPOOL 467612cc84bd40cf2871e4b4477c3a92d2926adbca2e1e47f5cfed9626f2d2e4a8d01bb8050e93ad1ff8302fa6b5b934389efdcff07ecd43fd263092997a25d2 +DIST instantclient-basic-linux32-10.2.0.3-20061115.zip 34556803 SHA256 11fce485c405afa4a30f34eba36ad0d566a599617f80dfc565bd08d8c421e1ae +DIST instantclient-basic-linux32-11.2.0.2.0.zip 57278802 SHA256 53f97a73991b2380e987f7cf4e1ba650a866044892c378b9340dc2e695160c14 +DIST instantclient-sdk-linux-11.2.0.3.0.zip 639306 SHA256 f51b3c91a63f176443a681881fb15281c4487dde637c9c6e5b0703462a330bee SHA512 fa0f98d4b2002982fab4438f734904e0ebfab777d601321423b454f9188c3b863e853fc5486c9958771f7ff8c9a544ce73e80750d745c3142872927ed1777ee1 WHIRLPOOL fb9c18785c62b2b6eef274c7c0e58d59b30491ef377eca4be4abbe263099660138bcb4d58da56b7184ad39d5226a3b16aedb9358eed252c3b46a3f7ae6f1a2cb +DIST instantclient-sdk-linux-11.2.0.4.0.zip 643080 SHA256 672e4a73f6015fd744082f1c788df154c48d2e4efd1ca038a35c7dab6513ab9a SHA512 09e14a0ed88182b685a00b6370da4379710c4179fcf2d5ebdb43684b7099484122f7f5181a80352464f03ae9d0150f5c2ee5f20ede98faa9073294324b9faec8 WHIRLPOOL 4dd283fc2144af2cc164dd9756c84503210d9ce0032cd8e7c4c9a9ad733a2182334aeefddd9f3375e2c0a4bd83cd994042963a65198465fa325e014482e466de +DIST instantclient-sdk-linux-x86-64-10.2.0.3-20070103.zip 603137 SHA256 d9da1494a9d19e96bff79c3ff77d079633d18c7d9b462a37eacc9a2a40641912 SHA512 25b00c407d4ed04287cc8473cf156c7c987e2c36787cf1bac229b902adc2781554f10f1a50b17bae96e2704b217ff60c4eb9f8c79ecdb3d44b13c9a84784a766 WHIRLPOOL 752ba8c748705b21048927b8204bf8696cb7b3c69157b9477af21fee666e8bf29c6110705fae6531e37244d72412808482ea711b9258a196e3db4fe4b0431bee +DIST instantclient-sdk-linux-x86-64-11.2.0.2.0.zip 638214 SHA256 9faf4edec8806e8ed38419d17587e19de673a9e0bbdeb24a9e232e118681500e +DIST instantclient-sdk-linux.x64-11.2.0.3.0.zip 641586 SHA256 6c7be8e2ad4288eb2e7453ca73a5ead89b6016dc4fd4e10b38bc95bbd2748ece SHA512 08b3fdc68e09f262549e2505867943aff5c3927d158569ea7e0bca4f958af725a46143d325dcf80a6d48d09f9240f147470439ac55ea848a27df3eeedd28f732 WHIRLPOOL e8a3c583b82c0adefff4200b5945704bfa6c106d32be82ce7c64adb10f92af0085b53f15836d4f92c177f20f33d5ca1fc60b6ddd972eb1ddb502f3091e9e9ff5 +DIST instantclient-sdk-linux.x64-11.2.0.4.0.zip 643089 SHA256 44473954a2e7031a4eec4692766cbf3c69e55c217bd1c5f8bee29a36da555dcc SHA512 7198ddc7d8804353900e45b36de79659d75dee0197c4dd58bd4d69408e7131c95025223bbd1f39ef208269bff379daa6e05f4371af83a82b83997cafadc1d642 WHIRLPOOL a673fa91683939c4a32aef3ccb8ab5374eee05d41478bfbfb6908ebe08ea624ac7661ccaed52a5ab55a3b87eaded4b6e6f6d2374e7f7c4b9f1ce802b15c4e69f +DIST instantclient-sdk-linux32-10.2.0.3-20061115.zip 602897 SHA256 6893a784e1802e18300230dcac1ed2ecd6dc68a7060c02717f73bf268d43f6a5 +DIST instantclient-sdk-linux32-11.2.0.2.0.zip 638200 SHA256 172c0116de16f55abd775aaf4dd1666d0e64eb1226b43388974ccf83235c8b18 diff --git a/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch b/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch new file mode 100644 index 000000000000..efcc2c6fac7c --- /dev/null +++ b/dev-db/oracle-instantclient-basic/files/11.2.0.3-makefile.patch @@ -0,0 +1,57 @@ +Fake demo_xe.mk found in Oracle eXpress Edition, +known by CPAN DBD::Oracle (bug#165834). +This provides absolute paths for headers and libraries. + +Paranoia drops those REMOVE lines. +--- sdk/demo/demo.mk.orig 2012-03-06 17:11:57.636990449 +0100 ++++ sdk/demo/demo.mk 2012-03-06 17:19:37.985324293 +0100 +@@ -28,8 +28,9 @@ + CC=/opt/SunProd/SUNWspro6.1/bin/CC + cc=/opt/SunProd/SUNWspro6.1/bin/cc + +-ICINCHOME=../ +-ICLIBHOME=../../ ++LIBDIR=lib ++ICINCHOME=$(ORACLE_HOME)/ ++ICLIBHOME=$(ORACLE_HOME)/$(LIBDIR) + ICLIBPATH=-L$(ICLIBHOME) + THREADLIBS=-lthread + CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS) +@@ -64,18 +64,18 @@ + all: clean buildoci $(OCCIDEMO) $(OCCIOBJDEMO) + + buildoci: $(CLNCACHE) $(LIBCLNT) $(CDEMOOBJS) +- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT) +- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT) ++# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT) ++# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT) + $(CC) -o $(CDEMOEXE) $(LDFLAGS) $(CDEMOOBJS) $(CCLIB) +- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) +- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) ++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) ++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) + + buildocci: $(CLNCACHE) $(LIBCLNT) $(OBJS) +- $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT) +- $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT) ++# $(MKLINK) $(ICLIBHOME)libclntsh$(SO_EXT).11.1 $(ICLIBHOME)libclntsh$(SO_EXT) ++# $(MKLINK) $(ICLIBHOME)libocci$(SO_EXT).11.1 $(ICLIBHOME)libocci$(SO_EXT) + $(CC) -o $(EXE) $(LDFLAGS) $(OBJS) $(CCLIB) +- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) +- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) ++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) ++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) + + $(OCCIDEMO): + $(MAKE) -f $(MAKEFILE) buildocci OBJS=$@.o EXE=$@ +@@ -93,8 +93,8 @@ + + cleancache: + $(REMOVE) $(CACHEDIR) +- $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) +- $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) ++# $(REMOVE) $(ICLIBHOME)libclntsh$(SO_EXT) ++# $(REMOVE) $(ICLIBHOME)libocci$(SO_EXT) + + clean: $(CLNCACHE) + $(REMOVE) cdemo81 cdemo81.o occidml occidml.o occiobj occiobj.o occiobjo* occiobjm* occiobj.h occiobjout.type diff --git a/dev-db/oracle-instantclient-basic/files/oracle-instantclient-basic-10.2.0.3-makefile.patch b/dev-db/oracle-instantclient-basic/files/oracle-instantclient-basic-10.2.0.3-makefile.patch new file mode 100644 index 000000000000..80df560a1014 --- /dev/null +++ b/dev-db/oracle-instantclient-basic/files/oracle-instantclient-basic-10.2.0.3-makefile.patch @@ -0,0 +1,11 @@ +--- instantclient_10_2/sdk/demo/demo.mk.orig 2007-02-06 17:51:47.018247041 -0800 ++++ instantclient_10_2/sdk/demo/demo.mk 2007-02-06 17:52:35.374869934 -0800 +@@ -30,7 +30,7 @@ + + ICINCHOME=../ + ICLIBHOME=../../ +-ICLIBPATH=-L$(ICLIBHOME) ++ICLIBPATH=-L$(ICLIBHOME) -L$(ORACLE_HOME)/lib + THREADLIBS=-lthread + CCLIB=$(ICLIBPATH) -locci -lclntsh $(THREADLIBS) + diff --git a/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample b/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample new file mode 100644 index 000000000000..f0524f5993cd --- /dev/null +++ b/dev-db/oracle-instantclient-basic/files/tnsnames.ora.sample @@ -0,0 +1,93 @@ +# This file contains the syntax information for +# the entries to be put in any tnsnames.ora file +# The entries in this file are need based. +# There are no defaults for entries in this file +# that Sqlnet/Net3 use that need to be overridden +# +# Typically you could have two tnsnames.ora files +# in the system, one that is set for the entire system +# and is called the system tnsnames.ora file, and a +# second file that is used by each user locally so that +# he can override the definitions dictated by the system +# tnsnames.ora file. + +# The entries in tnsnames.ora are an alternative to using +# the names server with the onames adapter. +# They are a collection of aliases for the addresses that +# the listener(s) is(are) listening for a database or +# several databases. + +# The following is the general syntax for any entry in +# a tnsnames.ora file. There could be several such entries +# tailored to the user's needs. + +<alias>= [ (DESCRIPTION_LIST = # Optional depending on whether u have + # one or more descriptions + # If there is just one description, unnecessary ] + (DESCRIPTION= + [ (SDU=2048) ] # Optional, defaults to 2048 + # Can take values between 512 and 32K + [ (ADDRESS_LIST= # Optional depending on whether u have + # one or more addresses + # If there is just one address, unnecessary ] + (ADDRESS= + [ (COMMUNITY=<community_name>) ] + (PROTOCOL=tcp) + (HOST=<hostname>) + (PORT=<portnumber (1521 is a standard port used)>) + ) + [ (ADDRESS= + (PROTOCOL=ipc) + (KEY=<ipckey (PNPKEY is a standard key used)>) + ) + ] + [ (ADDRESS= + [ (COMMUNITY=<community_name>) ] + (PROTOCOL=decnet) + (NODE=<nodename>) + (OBJECT=<objectname>) + ) + ] + ... # More addresses + [ ) ] # Optional depending on whether ADDRESS_LIST is used or not + [ (CONNECT_DATA= + (SID=<oracle_sid>) + [ (GLOBAL_NAME=<global_database_name>) ] + ) + ] + [ (SOURCE_ROUTE=yes) ] + ) + (DESCRIPTION= + [ (SDU=2048) ] # Optional, defaults to 2048 + # Can take values between 512 and 32K + [ (ADDRESS_LIST= ] # Optional depending on whether u have more + # than one address or not + # If there is just one address, unnecessary + (ADDRESS + [ (COMMUNITY=<community_name>) ] + (PROTOCOL=tcp) + (HOST=<hostname>) + (PORT=<portnumber (1521 is a standard port used)>) + ) + [ (ADDRESS= + (PROTOCOL=ipc) + (KEY=<ipckey (PNPKEY is a standard key used)>) + ) + ] + ... # More addresses + [ ) ] # Optional depending on whether ADDRESS_LIST + # is being used + [ (CONNECT_DATA= + (SID=<oracle_sid>) + [ (GLOBAL_NAME=<global_database_name>) ] + ) + ] + [ (SOURCE_ROUTE=yes) ] + ) + [ (CONNECT_DATA= + (SID=<oracle_sid>) + [ (GLOBAL_NAME=<global_database_name>) ] + ) + ] + ... # More descriptions + [ ) ] # Optional depending on whether DESCRIPTION_LIST is used or not diff --git a/dev-db/oracle-instantclient-basic/metadata.xml b/dev-db/oracle-instantclient-basic/metadata.xml new file mode 100644 index 000000000000..f189d943b5d8 --- /dev/null +++ b/dev-db/oracle-instantclient-basic/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> + <email>haubi@gentoo.org</email> +</maintainer> +<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription> +</pkgmetadata> diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.3-r1.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.3-r1.ebuild new file mode 100644 index 000000000000..4ef0ba4aed4a --- /dev/null +++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-10.2.0.3-r1.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}-20061115" +MY_PSDK_x86="${MY_P_x86/basic/sdk}" + +MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20070103" +MY_PSDK_amd64="${MY_P_amd64/basic/sdk}" + +S=${WORKDIR} +DESCRIPTION="Oracle 10g client installation for Linux with SDK" +HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html" +SRC_URI="amd64? ( ${MY_P_amd64}.zip ${MY_PSDK_amd64}.zip ) + x86? ( ${MY_P_x86}.zip ${MY_PSDK_x86}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="-* amd64 x86" +RESTRICT="fetch" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="~virtual/libstdc++-3.3" + +my_arch() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} + MY_PSDK=MY_PSDK_${ARCH} + export MY_PSDK=${!MY_PSDK} +} + +pkg_setup() { + my_arch +} + +pkg_nofetch() { + my_arch + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "select your platform and download the" + eerror "Basic client package with SDK, which are:" + eerror " ${MY_P}.zip" + eerror " ${MY_PSDK}.zip" + eerror "Then after downloading put them in:" + eerror " ${DISTDIR}" +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip" + unzip "${DISTDIR}"/${MY_PSDK}.zip || die "unsuccesful unzip ${MY_PSDK}.zip" +} + +src_install() { + # Patch the SDK makefile + epatch "${FILESDIR}"/${P}-makefile.patch + + # SDK makefile + dodir /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo + cd "${S}"/instantclient_10_2/sdk/demo + mv demo.mk demo_xe.mk + insinto /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo + doins demo_xe.mk + + # library + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_10_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins *.jar *.so *.so.10.1 + + # fixes symlinks + dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so.10.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so + dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so.10.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so + dosym /usr/$(get_libdir)/oracle/${PV}/client/include /usr/$(get_libdir)/oracle/${PV}/client/rdbms/public + + # includes + dodir /usr/$(get_libdir)/oracle/${PV}/client/include + insinto /usr/$(get_libdir)/oracle/${PV}/client/include + cd "${S}"/instantclient_10_2/sdk/include + doins *.h + # link to original location + dodir /usr/include/oracle/${PV}/ + ln -s "${D}"/usr/$(get_libdir)/oracle/${PV}/client/include "${D}"/usr/include/oracle/${PV}/client + + # share info + cd "${S}"/instantclient_10_2/sdk/demo + dodoc * + + # Add OCI libs to library path + dodir /etc/env.d + echo "ORACLE_HOME=/usr/$(get_libdir)/oracle/${PV}/client" >> "${D}"/etc/env.d/50oracle-instantclient-basic + echo "LDPATH=/usr/$(get_libdir)/oracle/${PV}/client/lib" >> "${D}"/etc/env.d/50oracle-instantclient-basic + echo "C_INCLUDE_PATH=/usr/$(get_libdir)/oracle/${PV}/client/include" >> "${D}"/etc/env.d/50oracle-instantclient-basic + echo "TNS_ADMIN=/etc/oracle/" >> "${D}"/etc/env.d/50oracle-instantclient-basic + + # create path for tnsnames.ora + dodir /etc/oracle +} + +pkg_postinst() { + elog "The Basic client page for Oracle 10g has been installed." + elog "You may also wish to install the oracle-instantclient-jdbc (for" + elog "supplemental JDBC functionality with Oracle) and the" + elog "oracle-instantclient-sqlplus (for running the SQL*Plus application)" + elog "packages as well." + elog + elog "Examples are located in /usr/share/doc/${PF}/" + elog + elog "oracle-instantclient-* packages aren't installed in different" + elog "SLOTs any longer. You may want to uninstall older versions." + elog + elog "TNS_ADMIN has been set to "${ROOT}"etc/oracle by default, put your" + elog "tnsnames.ora there or configure TNS_ADMIN to point to" + elog "your user specific configuration." +} diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.2.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.2.ebuild new file mode 100644 index 000000000000..372e20ef1f64 --- /dev/null +++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.2.ebuild @@ -0,0 +1,115 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}.0" +MY_PSDK_x86="${MY_P_x86/basic/sdk}" + +MY_PBASE_amd64="${PN/oracle-instantclient-basic/instantclient-basic-linux}-x86-64-${PV}.0" +MY_P_amd64="${PN/oracle-instantclient-basic/instantclient-basic-linux}-x86-64-${PV}.0" +MY_PSDK_amd64="${MY_PBASE_amd64/basic/sdk}" + +DESCRIPTION="Oracle 11g client installation for Linux with SDK" +HOMEPAGE="http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html" +SRC_URI="x86? ( ${MY_P_x86}.zip ${MY_PSDK_x86}.zip ) + amd64? ( ${MY_P_amd64}.zip ${MY_PSDK_amd64}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="-* ~x86 ~amd64" +RESTRICT="fetch" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="dev-libs/libaio" + +S="${WORKDIR}" + +my_arch() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} + MY_PSDK=MY_PSDK_${ARCH} + export MY_PSDK=${!MY_PSDK} +} + +pkg_setup() { + my_arch +} + +pkg_nofetch() { + my_arch + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "select your platform and download the" + eerror "Basic client package with SDK, which are:" + eerror " ${MY_P}.zip" + eerror " ${MY_PSDK}.zip" + eerror "Then after downloading put them in:" + eerror " ${DISTDIR}" +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip" + unzip "${DISTDIR}"/${MY_PSDK}.zip || die "unsuccesful unzip ${MY_PSDK}.zip" +} + +src_install() { + # SDK makefile + dodir /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo + cd "${S}"/instantclient_11_2/sdk/demo + mv demo.mk demo_xe.mk + insinto /usr/$(get_libdir)/oracle/${PV}/client/rdbms/demo + doins demo_xe.mk + + # library + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_11_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins *.jar *.so *.so.11.1 + + # fixes symlinks + dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so.11.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libocci.so + dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so.11.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libclntsh.so + dosym /usr/$(get_libdir)/oracle/${PV}/client/include /usr/$(get_libdir)/oracle/${PV}/client/rdbms/public + + # includes + dodir /usr/$(get_libdir)/oracle/${PV}/client/include + insinto /usr/$(get_libdir)/oracle/${PV}/client/include + cd "${S}"/instantclient_11_2/sdk/include + # Remove ldap.h, #299562 + rm ldap.h || die "rm failed" + doins *.h + # link to original location + dodir /usr/include/oracle/${PV}/ + ln -s "${D}"/usr/$(get_libdir)/oracle/${PV}/client/include "${D}"/usr/include/oracle/${PV}/client + + # share info + cd "${S}"/instantclient_11_2/sdk/demo + dodoc * + + # Add OCI libs to library path + dodir /etc/env.d + echo "ORACLE_HOME=/usr/$(get_libdir)/oracle/${PV}/client" >> "${D}"/etc/env.d/50oracle-instantclient-basic + echo "LDPATH=/usr/$(get_libdir)/oracle/${PV}/client/lib" >> "${D}"/etc/env.d/50oracle-instantclient-basic + echo "C_INCLUDE_PATH=/usr/$(get_libdir)/oracle/${PV}/client/include" >> "${D}"/etc/env.d/50oracle-instantclient-basic + echo "TNS_ADMIN=/etc/oracle/" >> "${D}"/etc/env.d/50oracle-instantclient-basic + + # create path for tnsnames.ora + dodir /etc/oracle +} + +pkg_postinst() { + elog "The Basic client package for Oracle 11g has been installed." + elog "You may also wish to install the oracle-instantclient-jdbc (for" + elog "supplemental JDBC functionality with Oracle) and the" + elog "oracle-instantclient-sqlplus (for running the SQL*Plus application)" + elog "packages as well." + elog + elog "Examples are located in /usr/share/doc/${PF}/" + elog + elog "TNS_ADMIN has been set to "${ROOT}"etc/oracle by default, put your" + elog "tnsnames.ora there or configure TNS_ADMIN to point to" + elog "your user specific configuration." +} diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild new file mode 100644 index 000000000000..f1ea34b85b11 --- /dev/null +++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.3.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib + +MY_PLAT_x86="Linux x86" +MY_BITS_x86=32 +MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip" +MY_ASDK_x86="${MY_A_x86/basic/sdk}" + +MY_PLAT_amd64="Linux x86-64" +MY_BITS_amd64=64 +MY_A_amd64="${PN/oracle-}-linux.x64-${PV}.0.zip" +MY_ASDK_amd64="${MY_A_amd64/basic/sdk}" + +DESCRIPTION="Oracle 11g Instant Client with SDK" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + x86? ( ${MY_A_x86} ${MY_ASDK_x86} ) + amd64? ( ${MY_A_amd64} ${MY_ASDK_amd64} multilib? ( ${MY_A_x86} ) ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch" +IUSE="multilib" + +EMULTILIB_PKG="true" + +DEPEND="app-arch/unzip" +RDEPEND=" + dev-libs/libaio + multilib? ( >=dev-libs/libaio-0.3.109-r3 ) +" + +S="${WORKDIR}" + +QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*" + +set_my_abivars() { + S="${WORKDIR}/${ABI}/instantclient_11_2" + + local abi=${ABI} + [[ ${abi} == 'default' ]] && abi=${ARCH} + MY_PLAT=MY_PLAT_${abi}; MY_PLAT=${!MY_PLAT} # platform name + MY_BITS=MY_BITS_${abi}; MY_BITS=${!MY_BITS} # platform bitwidth + MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile + MY_ASDK=MY_ASDK_${abi}; MY_ASDK=${!MY_ASDK} # sdk distfile + + [[ -n ${MY_PLAT} ]] +} + +oic_distfile_status() { + if [[ -r ${DISTDIR}/${1} ]]; then + echo "already here" + else + echo "still absent" + fi +} + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + for ABI in $(get_install_abis) + do + set_my_abivars || continue + eerror "Instant Client for ${MY_PLAT}" + eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}" + if is_final_abi; then + eerror " SDK: ($(oic_distfile_status ${MY_ASDK})) ${MY_ASDK}" + fi + done + eerror "After downloading these files (for *all* shown architectures), put them in:" + eerror " ${DISTDIR}/" +} + +src_unpack() { + for ABI in $(get_install_abis) + do + set_my_abivars || continue + mkdir "${WORKDIR}"/${ABI} || die + cd "${WORKDIR}"/${ABI} || die + unpack ${MY_A} + if is_final_abi; then + unpack ${MY_ASDK} + fi + done +} + +src_prepare() { + # need to patch for the final ABI only + set_my_abivars || die "${ABI} ABI not supported!" + cd "${S}" || die + epatch "${FILESDIR}"/11.2.0.3-makefile.patch +} + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + local ldpath= + for ABI in $(get_install_abis) # last iteration is final ABI + do + if ! set_my_abivars; then + elog "Skipping unsupported ABI ${ABI}." + continue + fi + einfo "Installing runtime for ${MY_PLAT} ..." + + cd "${S}" || die + + # shared libraries + dolib.so lib*$(get_libname)* + + # ensure to be linkable + [[ -e libocci$(get_libname) ]] || + dosym libocci$(get_libname 11.1) \ + "${oracle_home}"/$(get_libdir)/libocci$(get_libname) + [[ -e libclntsh$(get_libname) ]] || + dosym libclntsh$(get_libname 11.1) \ + "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname) + + # java archives + insinto "${oracle_home}"/$(get_libdir) + doins *.jar + + # runtime library path + ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir) + + eend $? + done + + # ensure ORACLE_HOME/lib exists + [[ -e ${ED}${oracle_home}/lib ]] || + dosym $(get_libdir) "${oracle_home}"/lib + + einfo "Installing SDK ..." + cd "${S}"/sdk || die + + # SDK makefile, for #165834 + # As we change the relative filesystem layout compared + # to vanilla instantclient.zip content, it feels easier + # to fake the layout found in Oracle eXpress Edition. + # Both layouts are known to DBD::Oracle (cpan). + insinto "${oracle_home}"/rdbms/demo + newins demo/demo.mk demo_xe.mk + + # Remove ldap.h, #299562 + rm include/ldap.h || die + # DBD::Oracle needs rdbms/public as real directory + insinto "${oracle_home}"/rdbms/public + doins include/*.h + dosym rdbms/public "${oracle_home}"/include + # ruby-oci8 expects the headers here + dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${PV}/client + + dodoc demo/* + + eend $? + + # create path for tnsnames.ora + insinto /etc/oracle + doins "${FILESDIR}"/tnsnames.ora.sample + + # Add OCI libs to library path + { + echo "ORACLE_HOME=${EPREFIX}${oracle_home}" + echo "LDPATH=${ldpath}" +# who does need this? +# echo "C_INCLUDE_PATH=${oracle_home}/include" + echo "TNS_ADMIN=/etc/oracle/" + } > "${T}"/50oracle-instantclient-basic + doenvd "${T}"/50oracle-instantclient-basic +} + +pkg_postinst() { + elog "${P} does not provide an sqlnet.ora" + elog "configuration file, redirecting oracle diagnostics for database-" + elog "and network-issues into ~USER/oradiag_USER/ instead." + elog "It should be safe to ignore this message in sqlnet.log there:" + elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []" + elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference." + elog "If you want to directly analyse low-level debug info or don't want" + elog "to see it at all, so you really need an sqlnet.ora file, please" + elog "consult http://search.oracle.com/search/search?q=sqlnet.ora" + elog "" + elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default," + elog "put your tnsnames.ora there or configure TNS_ADMIN" + elog "to point to your user specific configuration." + ewarn "Please re-source your shell settings for ORACLE_HOME" + ewarn " changes, such as: source /etc/profile" +} diff --git a/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild new file mode 100644 index 000000000000..fa7547f640bc --- /dev/null +++ b/dev-db/oracle-instantclient-basic/oracle-instantclient-basic-11.2.0.4.ebuild @@ -0,0 +1,200 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib-minimal + +MY_PLAT_x86="Linux x86" +MY_BITS_x86=32 +MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip" +MY_ASDK_x86="${MY_A_x86/basic/sdk}" + +MY_PLAT_amd64="Linux x86-64" +MY_BITS_amd64=64 +MY_A_amd64="${PN/oracle-}-linux.x64-${PV}.0.zip" +MY_ASDK_amd64="${MY_A_amd64/basic/sdk}" + +DESCRIPTION="Oracle 11g Instant Client with SDK" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + abi_x86_32? ( ${MY_A_x86} !abi_x86_64? ( ${MY_ASDK_x86} ) ) + abi_x86_64? ( ${MY_A_amd64} ${MY_ASDK_amd64} ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch splitdebug" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND=">=dev-libs/libaio-0.3.109-r5[${MULTILIB_USEDEP}]" + +S="${WORKDIR}" + +QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*" + +set_my_abivars() { + S="${WORKDIR}/${ABI}/instantclient_11_2" + + local abi=${ABI} + [[ ${abi} == 'default' ]] && abi=${ARCH} + MY_PLAT=MY_PLAT_${abi}; MY_PLAT=${!MY_PLAT} # platform name + MY_BITS=MY_BITS_${abi}; MY_BITS=${!MY_BITS} # platform bitwidth + MY_A=MY_A_${abi} ; MY_A=${!MY_A} # runtime distfile + MY_ASDK=MY_ASDK_${abi}; MY_ASDK=${!MY_ASDK} # sdk distfile + + [[ -n ${MY_PLAT} ]] +} + +oic_distfile_status() { + if [[ -r ${DISTDIR}/${1} ]]; then + echo "already here" + else + echo "still absent" + fi +} + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + local ABI + for ABI in $(multilib_get_enabled_abis) + do + set_my_abivars || continue + eerror "Instant Client for ${MY_PLAT}" + eerror " Basic: ($(oic_distfile_status ${MY_A})) ${MY_A}" + multilib_is_native_abi && + eerror " SDK: ($(oic_distfile_status ${MY_ASDK})) ${MY_ASDK}" + done + eerror "After downloading these files (for *all* shown architectures), put them in:" + eerror " ${DISTDIR}/" +} + +src_unpack() { + local ABI + for ABI in $(multilib_get_enabled_abis) + do + set_my_abivars || continue + mkdir "${WORKDIR}"/${ABI} || die + cd "${WORKDIR}"/${ABI} || die + unpack ${MY_A} + multilib_is_native_abi && + unpack ${MY_ASDK} + done +} + +src_prepare() { + local ABI + for ABI in $(multilib_get_enabled_abis) + do : # need to patch for the final ABI only + done + set_my_abivars || die "${ABI} ABI not supported!" + cd "${S}" || die + epatch "${FILESDIR}"/11.2.0.3-makefile.patch +} + +# suppress configure&compile messages from multilib-minimal +src_configure() { :; } +src_compile() { :; } + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + local ldpath= ABI + for ABI in $(multilib_get_enabled_abis) # last iteration is final ABI + do + if ! set_my_abivars; then + elog "Skipping unsupported ABI ${ABI}." + continue + fi + einfo "Installing runtime for ${MY_PLAT} ..." + + cd "${S}" || die + + # shared libraries + dolib.so lib*$(get_libname)* + + # ensure to be linkable + [[ -e libocci$(get_libname) ]] || + dosym libocci$(get_libname 11.1) \ + "${oracle_home}"/$(get_libdir)/libocci$(get_libname) + [[ -e libclntsh$(get_libname) ]] || + dosym libclntsh$(get_libname 11.1) \ + "${oracle_home}"/$(get_libdir)/libclntsh$(get_libname) + + # java archives + insinto "${oracle_home}"/$(get_libdir) + doins *.jar + + # runtime library path + ldpath+=${ldpath:+:}${oracle_home}/$(get_libdir) + + eend $? + done + + # ensure ORACLE_HOME/lib exists + [[ -e ${ED}${oracle_home}/lib ]] || + dosym $(get_libdir) "${oracle_home}"/lib + + einfo "Installing SDK ..." + cd "${S}"/sdk || die + + # SDK makefile, for #165834 + # As we change the relative filesystem layout compared + # to vanilla instantclient.zip content, it feels easier + # to fake the layout found in Oracle eXpress Edition. + # Both layouts are known to DBD::Oracle (cpan). + insinto "${oracle_home}"/rdbms/demo + newins demo/demo.mk demo_xe.mk + + # Remove ldap.h, #299562 + rm include/ldap.h || die + # DBD::Oracle needs rdbms/public as real directory + insinto "${oracle_home}"/rdbms/public + doins include/*.h + dosym rdbms/public "${oracle_home}"/include + # ruby-oci8 expects the headers here + dosym "${oracle_home}"/rdbms/public /usr/include/oracle/${PV}/client + + dodoc demo/* + + eend $? + + # create path for tnsnames.ora + insinto /etc/oracle + doins "${FILESDIR}"/tnsnames.ora.sample + + # Add OCI libs to library path + { + echo "ORACLE_HOME=${EPREFIX}${oracle_home}" + echo "LDPATH=${ldpath}" +# who does need this? +# echo "C_INCLUDE_PATH=${oracle_home}/include" + echo "TNS_ADMIN=/etc/oracle/" + } > "${T}"/50oracle-instantclient-basic + doenvd "${T}"/50oracle-instantclient-basic +} + +pkg_postinst() { + elog "${P} does not provide an sqlnet.ora" + elog "configuration file, redirecting oracle diagnostics for database-" + elog "and network-issues into ~USER/oradiag_USER/ instead." + elog "It should be safe to ignore this message in sqlnet.log there:" + elog " Directory does not exist for read/write [ORACLE_HOME/client/log] []" + elog "See https://bugs.gentoo.org/show_bug.cgi?id=465252 for reference." + elog "If you want to directly analyse low-level debug info or don't want" + elog "to see it at all, so you really need an sqlnet.ora file, please" + elog "consult http://search.oracle.com/search/search?q=sqlnet.ora" + elog "" + elog "TNS_ADMIN has been set to ${EROOT}etc/oracle by default," + elog "put your tnsnames.ora there or configure TNS_ADMIN" + elog "to point to your user specific configuration." + ewarn "Please re-source your shell settings for ORACLE_HOME" + ewarn " changes, such as: source /etc/profile" +} diff --git a/dev-db/oracle-instantclient-jdbc/Manifest b/dev-db/oracle-instantclient-jdbc/Manifest new file mode 100644 index 000000000000..bd22d6d496c0 --- /dev/null +++ b/dev-db/oracle-instantclient-jdbc/Manifest @@ -0,0 +1,8 @@ +DIST instantclient-jdbc-linux-11.2.0.3.0.zip 1562543 SHA256 45f9b5ecfba90e3936418e8047660b7d2c90b276a78b5f51c70235abefc50acd +DIST instantclient-jdbc-linux-11.2.0.4.0.zip 1562440 SHA256 d933485f6f8a1d19b009ad9803ec4a7037bb6813a8b54668925534078df4cdd8 SHA512 0a92a6529642203d48846d3f22f3756ada22942ea5e7c36d779d220dc7195301d4016edd8ee5124f9e51429bb77d9890602c1a18884eec58ff40c2aed24e55f9 WHIRLPOOL a55b4a47f1f533d6a45932ea205b6ffeedd0cabc2e154269753759a28fdc93976792050bbec834a95e5057fb37a5aee593f8c2610be8a2a9de12048346686591 +DIST instantclient-jdbc-linux-x86-64-10.2.0.3-20070103.zip 1493549 SHA256 894a015af4105e2f65a415e597e62e6bd9702d6f75a99e27af74cd901f5e7ee9 +DIST instantclient-jdbc-linux-x86-64-11.2.0.2.0.zip 1563157 SHA256 07fcfbd61a183588813fb755dafd04c052a771959fcbc4ee89e2180337d6c537 +DIST instantclient-jdbc-linux.x64-11.2.0.3.0.zip 1562504 SHA256 cfbcaacd85cd2964dae8478337e9020312b9827284ce86140db3c5e310436df1 +DIST instantclient-jdbc-linux.x64-11.2.0.4.0.zip 1562474 SHA256 07df3f6fc76b0cba17534e1d79a4d14fca6e42a1fe803cc2f33edc6e5e2ab7ac SHA512 289a08bddc81687b73a42fb35ae6ea294dd8f536ae9d3e95142ab78ad72eeebf66947fa6f5585e48e35b7f92e65fe6a295fb564b8353d389e76bfecf35c48c18 WHIRLPOOL 6530de00fc8a2a30ed6f37a735355b65c068971f2e7f95b58a60a6d111161ce596715eeefc04dc7ee8d39deeaa2fb46bf3481e2dfe982e4696c4cd7d1fc2185d +DIST instantclient-jdbc-linux32-10.2.0.3-20061115.zip 1482939 SHA256 23536b1bf8113f231e2f197e1011b6ddf04a79c5ccedae542cb6100eae28a547 +DIST instantclient-jdbc-linux32-11.2.0.2.0.zip 1562555 SHA256 25b58a2a42407d665af6e913066de716d9fe16ebda140954b8f03b71056871cb diff --git a/dev-db/oracle-instantclient-jdbc/metadata.xml b/dev-db/oracle-instantclient-jdbc/metadata.xml new file mode 100644 index 000000000000..f189d943b5d8 --- /dev/null +++ b/dev-db/oracle-instantclient-jdbc/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> + <email>haubi@gentoo.org</email> +</maintainer> +<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription> +</pkgmetadata> diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-10.2.0.3.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-10.2.0.3.ebuild new file mode 100644 index 000000000000..624655954164 --- /dev/null +++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-10.2.0.3.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}-20061115" +MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20070103" + +S=${WORKDIR} +DESCRIPTION="Oracle 10g client installation for Linux: JDBC supplement" +HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html" +SRC_URI="amd64? ( ${MY_P_amd64}.zip ) + x86? ( ${MY_P_x86}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="-* amd64 x86" +RESTRICT="fetch" +IUSE="" + +RDEPEND=">=dev-db/oracle-instantclient-basic-${PV}" +DEPEND="${RDEPEND} + app-arch/unzip" + +pkg_setup() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} +} + +pkg_nofetch() { + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "and download the JDBC supplemental package. Put it in:" + eerror " ${DISTDIR}" + eerror "after downloading it." +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip +} + +src_install() { + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_10_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins libheteroxa10.so orai18n.jar +} + +pkg_postinst() { + elog "The JDBC supplement package for Oracle 10g has been installed." + elog "You may wish to install the oracle-instantclient-sqlplus (for " + elog "running the SQL*Plus application) package as well." + elog + elog "oracle-instantclient-* packages aren't installed in different" + elog "SLOTs any longer. You may want to uninstall older versions." +} diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.2.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.2.ebuild new file mode 100644 index 000000000000..7adb159310f6 --- /dev/null +++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}.0" +MY_P_amd64="${PN/oracle-instantclient-/instantclient-}-linux-x86-64-${PV}.0" + +S="${WORKDIR}" +DESCRIPTION="Oracle 11g client installation for Linux: JDBC supplement" +HOMEPAGE="http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html" +SRC_URI="x86? ( ${MY_P_x86}.zip ) + amd64? ( ${MY_P_amd64}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="~x86 ~amd64" +RESTRICT="fetch" +IUSE="" + +RDEPEND=">=dev-db/oracle-instantclient-basic-${PV}" +DEPEND="${RDEPEND} + app-arch/unzip" + +pkg_setup() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} +} + +pkg_nofetch() { + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "and download the JDBC supplemental package. Put it in:" + eerror " ${DISTDIR}" + eerror "after downloading it." +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip +} + +src_install() { + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_11_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins libheteroxa11.so orai18n.jar +} + +pkg_postinst() { + elog "The JDBC supplement package for Oracle 11g has been installed." + elog "You may wish to install the oracle-instantclient-sqlplus (for " + elog "running the SQL*Plus application) package as well." +} diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild new file mode 100644 index 000000000000..bf95264c5c80 --- /dev/null +++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.3.ebuild @@ -0,0 +1,110 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: JDBC supplement" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + x86? ( ${MY_A_x86} ) + amd64? ( ${MY_A_amd64} multilib? ( ${MY_A_x86} ) ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch" +IUSE="multilib" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}" + +QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*" + +default_abi() { + [[ ${DEFAULT_ABI} == 'default' ]] && echo ${ARCH} || echo ${DEFAULT_ABI} +} + +abi_list() { + if use multilib; then + echo ${MULTILIB_ABIS} + else + default_abi + fi + return 0 +} + +set_abivars() { + local abi=$1 + # platform name + MY_PLAT=MY_PLAT_${abi} + MY_PLAT=${!MY_PLAT} + # runtime distfile + MY_A=MY_A_${abi} + MY_A=${!MY_A} + # abi sourcedir + MY_S="${S}/${abi}/instantclient_11_2" + # ABI might not need to be set at all + [[ -n ${ABI} ]] && MY_ABI=${abi} || MY_ABI= + # abi libdir + MY_LIBDIR=$(ABI=${MY_ABI} get_libdir) +} + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + local abi + for abi in $(abi_list) + do + set_abivars ${abi} + eerror "Instant Client for ${MY_PLAT}" + eerror " JDBC: ${MY_A}" + done + eerror "After downloading, put them in:" + eerror " ${DISTDIR}/" +} + +src_unpack() { + local abi + for abi in $(abi_list) + do + set_abivars ${abi} + mkdir -p "${MY_S%/*}" || die + cd "${MY_S%/*}" || die + unpack ${MY_A} + done +} + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + local abi + for abi in $(abi_list) + do + set_abivars ${abi} + einfo "Installing runtime for ${MY_PLAT} ..." + + cd "${MY_S}" || die + + ABI=${MY_ABI} dolib.so lib*$(get_libname)* + + insinto "${oracle_home}"/${MY_LIBDIR} + doins *.jar + + eend $? + done +} diff --git a/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild new file mode 100644 index 000000000000..4b1d92a70726 --- /dev/null +++ b/dev-db/oracle-instantclient-jdbc/oracle-instantclient-jdbc-11.2.0.4.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib-minimal + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: JDBC supplement" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + abi_x86_32? ( ${MY_A_x86} ) + abi_x86_64? ( ${MY_A_amd64} ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch splitdebug" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}" + +QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*" + +set_my_abivars() { + MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name + MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile + # ABI sourcedir + MY_S="${S}/${ABI}/instantclient_11_2" + + [[ -n ${MY_PLAT} ]] +} + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + local ABI + for ABI in $(multilib_get_enabled_abis) + do + set_my_abivars || continue + eerror "Instant Client for ${MY_PLAT}" + eerror " JDBC: ${MY_A}" + done + eerror "After downloading, put them in:" + eerror " ${DISTDIR}/" +} + +src_unpack() { + local ABI + for ABI in $(multilib_get_enabled_abis) + do + set_my_abivars || continue + mkdir -p "${MY_S%/*}" || die + cd "${MY_S%/*}" || die + unpack ${MY_A} + done +} + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + local ABI + for ABI in $(multilib_get_enabled_abis) + do + if ! set_my_abivars; then + elog "Skipping unsupported ABI ${ABI}." + continue + fi + einfo "Installing runtime for ${MY_PLAT} ..." + + cd "${MY_S}" || die + + dolib.so lib*$(get_libname)* + + insinto "${oracle_home}"/$(get_libdir) + doins *.jar + + eend $? + done +} diff --git a/dev-db/oracle-instantclient-odbc/Manifest b/dev-db/oracle-instantclient-odbc/Manifest new file mode 100644 index 000000000000..08f6ea072423 --- /dev/null +++ b/dev-db/oracle-instantclient-odbc/Manifest @@ -0,0 +1,6 @@ +DIST instantclient-odbc-linux-11.2.0.3.0.zip 273840 SHA256 e327fc2627d792a296085d15638eb79df85ce4fcc16ed5c7d304d406131d5d3b +DIST instantclient-odbc-linux-11.2.0.4.0.zip 274999 SHA256 5d44811162df4647e67fceb9dfa48b8d96e30c9238e6c889dedb48b822251c74 SHA512 64d75c6f9aa4e5b74da12a2a293e6ee7017017a12a724596d51606d3a8d7a9d9653c158d389a5faeb02893ca6a6a93650605d71f885f9439427847583f5cc820 WHIRLPOOL bd2948f4b8076cb5c3381fb509d3b01c45d46b0f0571630c2196f98c710e403d3c8b2022fb11df6363f7d9ed04ba931b862028a51ff2361084a8f6f543a8de15 +DIST instantclient-odbc-linux-x86-64-11.2.0.2.0.zip 308445 SHA256 1d24d3f7b38a7d1cd1fa67c34a4c64aa556c0e4c93777bc7ceb0ee32e3504dc0 +DIST instantclient-odbc-linux.x64-11.2.0.3.0.zip 309061 SHA256 78584746ada1ed09e5587e3f39980e45c5c4d7c7fa4aaca3bd606be08c9f2e61 +DIST instantclient-odbc-linux.x64-11.2.0.4.0.zip 310560 SHA256 b6856d3bcc22715ba613cdf1b5d58b987bafcb0ee4fc79fa2106da118082c0f8 SHA512 19f999207e5ea2b5db18b40c0eb40c6ec1ea8a3117915a723338e5c423122b747c5e371446d631c00a5c01005453f85da1d2e680a2c1771a495dc0b68812df69 WHIRLPOOL ec813ad4736dc14fcd6073febf8559dc42a3612dec798e08ada972b53f4220ad76b4139cd74fc87547fd28ab24d9a21f4ffa2a4343e2f5e8e117063c64b044f5 +DIST instantclient-odbc-linux32-11.2.0.2.0.zip 273410 SHA256 a09d8c913bdb8d6afc84fe42b17505cceccac620077ce4a21c8db313773000a1 diff --git a/dev-db/oracle-instantclient-odbc/metadata.xml b/dev-db/oracle-instantclient-odbc/metadata.xml new file mode 100644 index 000000000000..bac144407a93 --- /dev/null +++ b/dev-db/oracle-instantclient-odbc/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> + <email>haubi@gentoo.org</email> +</maintainer> +<longdescription>Instant Client Package - ODBC Supplement</longdescription> +</pkgmetadata> diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.2-r1.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.2-r1.ebuild new file mode 100644 index 000000000000..492de268c3c2 --- /dev/null +++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.2-r1.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}.0" +MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}.0" + +DESCRIPTION="Oracle 11g client installation ODBC supplement" +HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html" +SRC_URI="x86? ( ${MY_P_x86}.zip ) + amd64? ( ${MY_P_amd64}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="-* ~x86 ~amd64" +RESTRICT="fetch" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="dev-db/oracle-instantclient-basic" + +S="${WORKDIR}" + +my_arch() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} +} + +pkg_setup() { + my_arch +} + +pkg_nofetch() { + my_arch + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "select your platform and download the" + eerror "ODBC supplement, which is:" + eerror " ${MY_P}.zip" + eerror "Then after downloading put it in:" + eerror " ${DISTDIR}" +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip || die "unsuccesful unzip ${MY_P}.zip" +} + +src_install() { + # library + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_11_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins *.so.11.1 + + # fixes symlinks + dosym /usr/$(get_libdir)/oracle/${PV}/client/lib/libsqora.so.11.1 /usr/$(get_libdir)/oracle/${PV}/client/lib/libsqora.so + + # odbc_update_ini.sh + dodir /usr/$(get_libdir)/oracle/${PV}/client/bin + cd "${S}"/instantclient_11_2 + exeinto /usr/$(get_libdir)/oracle/${PV}/client/bin + doexe odbc_update_ini.sh + + # documentation + dodoc *htm* +} diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild new file mode 100644 index 000000000000..1040d54d6c34 --- /dev/null +++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.3.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: ODBC supplement" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + x86? ( ${MY_A_x86} ) + amd64? ( ${MY_A_amd64} multilib? ( ${MY_A_x86} ) ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch" +IUSE="multilib" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}" + +QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*" + +default_abi() { + [[ ${DEFAULT_ABI} == 'default' ]] && echo ${ARCH} || echo ${DEFAULT_ABI} +} + +abi_list() { + if use multilib; then + echo ${MULTILIB_ABIS} + else + default_abi + fi + return 0 +} + +set_abivars() { + local abi=$1 + # platform name + MY_PLAT=MY_PLAT_${abi} + MY_PLAT=${!MY_PLAT} + # runtime distfile + MY_A=MY_A_${abi} + MY_A=${!MY_A} + # abi sourcedir + MY_S="${S}/${abi}/instantclient_11_2" + # ABI might not need to be set at all + [[ -n ${ABI} ]] && MY_ABI=${abi} || MY_ABI= + # abi libdir + MY_LIBDIR=$(ABI=${MY_ABI} get_libdir) +} + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + local abi + for abi in $(abi_list) + do + set_abivars ${abi} + eerror "Instant Client for ${MY_PLAT}" + eerror " ODBC: ${MY_A}" + done + eerror "After downloading, put them in:" + eerror " ${DISTDIR}/" +} + +src_unpack() { + local abi + for abi in $(abi_list) + do + set_abivars ${abi} + mkdir -p "${MY_S%/*}" || die + cd "${MY_S%/*}" || die + unpack ${MY_A} + done +} + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + local abi + for abi in $(abi_list) + do + set_abivars ${abi} + einfo "Installing runtime for ${MY_PLAT} ..." + + cd "${MY_S}" || die + + ABI=${MY_ABI} dolib.so libsqora*$(get_libname)* + + # ensure to be linkable + [[ -e libsqora$(get_libname) ]] || + dosym libsqora$(get_libname 11.1) \ + "${oracle_home}"/${MY_LIBDIR}/libsqora$(get_libname) + + eend $? + done + + set_abivars $(default_abi) + cd "${MY_S}" || die + dobin odbc_update_ini.sh + dodoc *htm* +} diff --git a/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild new file mode 100644 index 000000000000..5fb8138a69e2 --- /dev/null +++ b/dev-db/oracle-instantclient-odbc/oracle-instantclient-odbc-11.2.0.4.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib-minimal + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN/oracle-/}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN/oracle-/}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: ODBC supplement" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + abi_x86_32? ( ${MY_A_x86} ) + abi_x86_64? ( ${MY_A_amd64} ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch splitdebug" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}" + +QA_PREBUILT="usr/lib*/oracle/${PV}/client/lib*/lib*" + +set_my_abivars() { + MY_PLAT=MY_PLAT_${ABI}; MY_PLAT=${!MY_PLAT} # platform name + MY_A=MY_A_${ABI} ; MY_A=${!MY_A} # runtime distfile + # ABI sourcedir + MY_S="${S}/${ABI}/instantclient_11_2" + + [[ -n ${MY_PLAT} ]] +} + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + local ABI + for ABI in $(multilib_get_enabled_abis) + do + set_my_abivars || continue + eerror "Instant Client for ${MY_PLAT}" + eerror " ODBC: ${MY_A}" + done + eerror "After downloading, put them in:" + eerror " ${DISTDIR}/" +} + +src_unpack() { + local ABI + for ABI in $(multilib_get_enabled_abis) + do + set_my_abivars || continue + mkdir -p "${MY_S%/*}" || die + cd "${MY_S%/*}" || die + unpack ${MY_A} + done +} + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + local ABI + for ABI in $(multilib_get_enabled_abis) + do + if ! set_my_abivars; then + elog "Skipping unsupported ABI ${ABI}." + continue + fi + einfo "Installing runtime for ${MY_PLAT} ..." + + cd "${MY_S}" || die + + dolib.so libsqora*$(get_libname)* + + # ensure to be linkable + [[ -e libsqora$(get_libname) ]] || + dosym libsqora$(get_libname 11.1) "${oracle_home}"/$(get_libdir)/libsqora$(get_libname) + + eend $? + done + + dobin odbc_update_ini.sh + dodoc *htm* +} diff --git a/dev-db/oracle-instantclient-sqlplus/Manifest b/dev-db/oracle-instantclient-sqlplus/Manifest new file mode 100644 index 000000000000..a97e523b5bdd --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/Manifest @@ -0,0 +1,8 @@ +DIST instantclient-sqlplus-linux-11.2.0.3.0.zip 796570 SHA256 338de20fb4b52359c53969e8d6c5441629a0ddaf676ab98edb19206f21edce43 SHA512 241d812b3955b11efba7764f463417e79dd973ce7ad0624144e661403b71b1c4fb091c6e42d05759eaf74355dfe432970375064d4018cae9ae67cd1401095460 WHIRLPOOL 44543784f7671ad923fce517f451b797c5fe37fea14249689493b9b12846fce74dfa47fbc02461149dccba760ecf70efe833ab745a2050600dffb036de2b75e7 +DIST instantclient-sqlplus-linux-11.2.0.4.0.zip 792608 SHA256 b42d41cae8122be31048ab88693f23ceea0dc11a63dae94644fb36566a5fec4f SHA512 8f5ff27043a036eab038080bbdc056325cc2c197e12de34e74a8da17bf69b44e4fd4200b638881d86fdf1dc1450d8e1d033daaa56386bd2c8784d556ba0093ce WHIRLPOOL b993db311d46246ca04b3e8c1e967dd7587e7108eaeb3af6978bce45a7b7b5d1614392c69784950e489a0c73e08fc02d643fb200b59e420a0bf8830d176ef568 +DIST instantclient-sqlplus-linux-x86-64-10.2.0.3-20070103.zip 789884 SHA256 8dcc95e3bf5723a7b1d6deccce049490bc70d99c0b9ac6ef13320b6b426303f6 SHA512 5800c0f1c39a0ec4a2da1bc09a9102d62d4efb42618dfb5a2494da81c9268c1e29af5576dee72917019b12d1ed6c55ec0f80b96017a6812f6c20c660180c324b WHIRLPOOL e92c0e8529e248ea9b60d1d5c81acd11d569183e9459933ce08c0e815e2d43cef2f5a7ecec4c2c0fe3d9321c42c813a35d748107a9e58c15d2c7b0c36b0a3d44 +DIST instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zip 837382 SHA256 6975856f27c66d44b5c57c9ffa877f8aa5648ae8e4bda925d719b8609bbbf285 +DIST instantclient-sqlplus-linux.x64-11.2.0.3.0.zip 837574 SHA256 b1df9ed4d5a0e51caeed1641d973e4c90fce48604069ab9b7278a87dc2fc8547 SHA512 55bbac5e8267a4de2c7f9f6750f0e38dcf7c775bccc2e1e05df7fda9e6ffa7d394776e605980d8b67176acf52ba88f2dcaa959934740a1ca6f91d10b12d14024 WHIRLPOOL f172391bd05845ef88a0c4951e4d46b81e9fd5326709da057deb747cd34f4098ca22189dfc0d7de70a8da8adf86fd48086a2976d6397dfb7386d666f73ac218d +DIST instantclient-sqlplus-linux.x64-11.2.0.4.0.zip 834491 SHA256 618357a8dc470de19214294f8fd8e2a466544355abc8ebfa2032c3c276e817e9 SHA512 b7180b5667e604564cf379b9eb55a2fc8994b87cfb993e728b4c1bdd297cab134a55580018429bdbb2b101ebdf8a350bacc1ddf5a30e1cc419092054c79a108b WHIRLPOOL 6d69932bc46a9a9475bf2df082566c0b2b285ceeefd10efec87e2899d9c30f4db032293020abb8a479c61dbb350079e2d2c4758f089f2f5cce03c485f5ca670a +DIST instantclient-sqlplus-linux32-10.2.0.3-20061115.zip 741699 SHA256 aad12fd25a234fec76d672f7993911b9f267732b7bf244d76f44bc212edbd76a +DIST instantclient-sqlplus-linux32-11.2.0.2.0.zip 795691 SHA256 35f1d447b0b368bcafd4fcff6bb04139e568176f0081a60aea1939099754ea0a diff --git a/dev-db/oracle-instantclient-sqlplus/metadata.xml b/dev-db/oracle-instantclient-sqlplus/metadata.xml new file mode 100644 index 000000000000..f189d943b5d8 --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/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> + <email>haubi@gentoo.org</email> +</maintainer> +<longdescription>Instant Client Package - Basic: All files required to run OCI, OCCI, and JDBC-OCI applications</longdescription> +</pkgmetadata> diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-10.2.0.3.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-10.2.0.3.ebuild new file mode 100644 index 000000000000..c69d47c40125 --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-10.2.0.3.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}-20061115" +MY_P_amd64="${PN/oracle-/}-linux-x86-64-${PV}-20070103" + +S=${WORKDIR} +DESCRIPTION="Oracle 10g client installation for Linux: SQL*Plus" +HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html" +SRC_URI="amd64? ( ${MY_P_amd64}.zip ) + x86? ( ${MY_P_x86}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="-* amd64 x86" +RESTRICT="fetch" +IUSE="" + +RDEPEND=">=dev-db/oracle-instantclient-basic-${PV}" +DEPEND="${RDEPEND} + app-arch/unzip" + +pkg_setup() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} +} + +pkg_nofetch() { + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "select your platform and download the" + eerror "SQL*Plus package. Put it in:" + eerror " ${DISTDIR}" + eerror "after downloading it." +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip +} + +src_install() { + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_10_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins glogin.sql libsqlplus.so libsqlplusic.so + + dodir /usr/$(get_libdir)/oracle/${PV}/client/bin + cd "${S}"/instantclient_10_2 + exeinto /usr/$(get_libdir)/oracle/${PV}/client/bin + doexe sqlplus + + dodir /usr/bin + dosym "${D}"/usr/$(get_libdir)/oracle/${PV}/client/bin/sqlplus /usr/bin/sqlplus +} + +pkg_postinst() { + elog "The SQL*Plus package for Oracle 10g has been installed." + elog "You may wish to install the oracle-instantclient-jdbc (for" + elog "the supplemental JDBC functionality) package as well." + elog + elog "If you have any questions, be sure to read the README:" + elog "http://otn.oracle.com/docs/tech/sql_plus/10102/readme_ic.htm" + elog + elog "oracle-instantclient-* packages aren't installed in different" + elog "SLOTs any longer. You may want to uninstall older versions." +} diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.2.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.2.ebuild new file mode 100644 index 000000000000..6e8dcecfd246 --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.2.ebuild @@ -0,0 +1,68 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils multilib + +MY_P_x86="${PN/oracle-/}-linux32-${PV}.0" +MY_P_amd64="${PN/oracle-instantclient-/instantclient-}-linux-x86-64-${PV}.0" + +S="${WORKDIR}" +DESCRIPTION="Oracle 11g client installation for Linux: SQL*Plus" +HOMEPAGE="http://www.oracle.com/technology/tech/oci/instantclient/index.html" +SRC_URI="x86? ( ${MY_P_x86}.zip ) + amd64? ( ${MY_P_amd64}.zip )" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="~x86 ~amd64" +RESTRICT="fetch" +IUSE="" + +RDEPEND=">=dev-db/oracle-instantclient-basic-${PV}" +DEPEND="${RDEPEND} + app-arch/unzip" + +pkg_setup() { + MY_P=MY_P_${ARCH} + export MY_P=${!MY_P} +} + +pkg_nofetch() { + eerror "Please go to:" + eerror " ${HOMEPAGE}" + eerror "select your platform and download the" + eerror "SQL*Plus package. Put it in:" + eerror " ${DISTDIR}" + eerror "after downloading it." +} + +src_unpack() { + unzip "${DISTDIR}"/${MY_P}.zip +} + +src_install() { + dodir /usr/$(get_libdir)/oracle/${PV}/client/lib + cd "${S}"/instantclient_11_2 + insinto /usr/$(get_libdir)/oracle/${PV}/client/lib + doins libsqlplus.so libsqlplusic.so + insinto /usr/$(get_libdir)/oracle/${PV}/client/sqlplus/admin/ + doins glogin.sql + + dodir /usr/$(get_libdir)/oracle/${PV}/client/bin + cd "${S}"/instantclient_11_2 + exeinto /usr/$(get_libdir)/oracle/${PV}/client/bin + doexe sqlplus + + dodir /usr/bin + dosym "${D}"/usr/$(get_libdir)/oracle/${PV}/client/bin/sqlplus /usr/bin/sqlplus +} + +pkg_postinst() { + elog "The SQL*Plus package for Oracle 11g has been installed." + elog "You may wish to install the oracle-instantclient-jdbc (for" + elog "the supplemental JDBC functionality) package as well." + elog + elog "If you have any questions, be sure to read the README:" + elog "http://otn.oracle.com/docs/tech/sql_plus/10102/readme_ic.htm" +} diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild new file mode 100644 index 000000000000..00b6f5aa1d01 --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3-r1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib pax-utils + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: SQL*Plus" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + x86? ( ${MY_A_x86} ) + amd64? ( ${MY_A_amd64} ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}"/instantclient_11_2 + +QA_PREBUILT=" + usr/lib*/oracle/${PV}/client/lib*/lib* + usr/lib*/oracle/${PV}/client/bin/sqlplus +" + +my_arch() { + # platform name + MY_PLAT=MY_PLAT_${ARCH} + export MY_PLAT=${!MY_PLAT} + # distfile + MY_A=MY_A_${ARCH} + export MY_A=${!MY_A} +} + +pkg_nofetch() { + my_arch + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + eerror "Instant Client for ${MY_PLAT}" + eerror " SQL*Plus: ${MY_A}" + eerror "After downloading, put it in:" + eerror " ${DISTDIR}/" +} + +src_install() { + # all binaries go here + local oracle_home=usr/$(get_libdir)/oracle/${PV}/client + into /"${oracle_home}" + + dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname) + dobin sqlplus + + insinto /"${oracle_home}"/sqlplus/admin + doins glogin.sql + + pax-mark -c "${ED}${oracle_home}"/bin/sqlplus || die + + dosym /"${oracle_home}"/bin/sqlplus /usr/bin/sqlplus +} diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild new file mode 100644 index 000000000000..5f8b6928bfae --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.3.ebuild @@ -0,0 +1,70 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils multilib + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: SQL*Plus" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + x86? ( ${MY_A_x86} ) + amd64? ( ${MY_A_amd64} ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}"/instantclient_11_2 + +QA_PREBUILT=" + usr/lib*/oracle/${PV}/client/lib*/lib* + usr/lib*/oracle/${PV}/client/bin/sqlplus +" + +my_arch() { + # platform name + MY_PLAT=MY_PLAT_${ARCH} + export MY_PLAT=${!MY_PLAT} + # distfile + MY_A=MY_A_${ARCH} + export MY_A=${!MY_A} +} + +pkg_nofetch() { + my_arch + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + eerror "Instant Client for ${MY_PLAT}" + eerror " SQL*Plus: ${MY_A}" + eerror "After downloading, put it in:" + eerror " ${DISTDIR}/" +} + +src_install() { + # all binaries go here + local oracle_home=/usr/$(get_libdir)/oracle/${PV}/client + into "${oracle_home}" + + dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname) + dobin sqlplus + + insinto "${oracle_home}"/sqlplus/admin + doins glogin.sql + + dosym "${oracle_home}"/bin/sqlplus /usr/bin/sqlplus +} diff --git a/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild new file mode 100644 index 000000000000..11bb63fe8389 --- /dev/null +++ b/dev-db/oracle-instantclient-sqlplus/oracle-instantclient-sqlplus-11.2.0.4.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils pax-utils + +MY_PLAT_x86="Linux x86" +MY_A_x86="${PN#oracle-}-linux-${PV}.0.zip" + +MY_PLAT_amd64="Linux x86-64" +MY_A_amd64="${PN#oracle-}-linux.x64-${PV}.0.zip" + +DESCRIPTION="Oracle 11g Instant Client: SQL*Plus" +HOMEPAGE="http://www.oracle.com/technetwork/database/features/instant-client/index.html" +SRC_URI=" + x86? ( ${MY_A_x86} ) + amd64? ( ${MY_A_amd64} ) +" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +RESTRICT="fetch splitdebug" +IUSE="" + +DEPEND="app-arch/unzip" +RDEPEND="~dev-db/oracle-instantclient-basic-${PV}" + +S="${WORKDIR}"/instantclient_11_2 + +QA_PREBUILT=" + usr/lib*/oracle/${PV}/client/lib*/lib* + usr/lib*/oracle/${PV}/client/bin/sqlplus +" + +my_arch() { + # platform name + MY_PLAT=MY_PLAT_${ARCH} + export MY_PLAT=${!MY_PLAT} + # distfile + MY_A=MY_A_${ARCH} + export MY_A=${!MY_A} +} + +pkg_nofetch() { + my_arch + eerror "Please go to" + eerror " ${HOMEPAGE%/*}/index-097480.html" + eerror " and download" + eerror "Instant Client for ${MY_PLAT}" + eerror " SQL*Plus: ${MY_A}" + eerror "After downloading, put it in:" + eerror " ${DISTDIR}/" +} + +src_install() { + # all binaries go here + local oracle_home=usr/$(get_libdir)/oracle/${PV}/client + into /"${oracle_home}" + + dolib.so libsqlplus$(get_libname) libsqlplusic$(get_libname) + dobin sqlplus + + insinto /"${oracle_home}"/sqlplus/admin + doins glogin.sql + + pax-mark -c "${ED}${oracle_home}"/bin/sqlplus || die + + dosym /"${oracle_home}"/bin/sqlplus /usr/bin/sqlplus +} diff --git a/dev-db/percona-server/Manifest b/dev-db/percona-server/Manifest new file mode 100644 index 000000000000..3d85c628dad5 --- /dev/null +++ b/dev-db/percona-server/Manifest @@ -0,0 +1,4 @@ +DIST mysql-extras-20150113-1853Z.tar.bz2 1494439 SHA256 420553dc8557d0622ad762ee6924900acc74fd4f367fd3840acab03114fada4d SHA512 b1252d905b71a6f42484eaa796ebcd2f0769affc566e6c277ef3bc0ef9bc446a1c22aac3faa48ef7b9305056a1302b37d7ef86b547c44514528a5956ce61d372 WHIRLPOOL d14f0d88358eb0bbd2c338052ec086ab8260988497ef09da934365ded3c30c7e905ea936a0c9817ccb49d1f6e3408b3f6a438455a2455c65c2f26a9fc6367ff3 +DIST mysql-extras-20150717-1707Z.tar.bz2 1491956 SHA256 d67cc1e2c581ab7c57122b7d29864643869799893a95a158a18e14201d4ffc10 SHA512 3a7cb07773099e766f8e796d4e555d42874b85285cc2c7c60220370cc6aafc36a60eb340008637298d85d83f529e73392895a81c1438ffccff9eb8f354b29ba9 WHIRLPOOL 11e75f4b696e2547c1da40e69d8ab75df4bf7080426204c040632f24846407b07d71061c09c4ff4a1d21a9d14a94769d8f8ef62421d0aecd99efe832caf4dd22 +DIST percona-server-5.6.24-72.2.tar.gz 34099689 SHA256 5aa6469f3a55fe0fd1cfe315f2f9cacb0ce318620086c93821c9000d6e25c0de SHA512 46e013b272d96d995af48e0a55c94e7ded1a2cf6e8a4e3c7e1674171ac288e2b211e5761eecbe6f0cacf40a026dccbf102f517745c7c07865165fe3a8e922088 WHIRLPOOL ee200bbf7454c16afb349713ea031e4d8acf4fab2fe3d594336443997c683c0d987704c6a300451d6b77df271e32905ca892753320666438ca797a484a499856 +DIST percona-server-5.6.25-73.0.tar.gz 34152178 SHA256 790d056931b9dd5b158a732812490fdaf9407012aaf93d3f1c1b21942dcdc251 SHA512 9bb4ee29ceb7e80460d2ffa779ca0aefaa6c0af1c4e5309c1c5f37840da4e85da1196a936e1862bacb3f36d064a6dcb6ad45b3eb55f60b033f2741ec6b487b9d WHIRLPOOL 76c59da78fda5cf70802117e59ceb0a877513ed83b0069c6d5a3f169595eac43516897bc02c092caa71cb059424ed3d4cbb97133c6946f870ab7734e8ca7a282 diff --git a/dev-db/percona-server/files/my.cnf-5.5 b/dev-db/percona-server/files/my.cnf-5.5 new file mode 100644 index 000000000000..4e3433075ecd --- /dev/null +++ b/dev-db/percona-server/files/my.cnf-5.5 @@ -0,0 +1,149 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 1M +table_open_cache = 64 +sort_buffer_size = 512K +net_buffer_length = 8K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the following is the InnoDB configuration +# if you wish to disable innodb instead +# uncomment just the next line +#skip-innodb +# +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 16M +# this is the default, increase it if you have lots of tables +innodb_additional_mem_pool_size = 2M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 5M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout + diff --git a/dev-db/percona-server/files/my.cnf-5.6 b/dev-db/percona-server/files/my.cnf-5.6 new file mode 100644 index 000000000000..bcbaeb319689 --- /dev/null +++ b/dev-db/percona-server/files/my.cnf-5.6 @@ -0,0 +1,141 @@ +# @GENTOO_PORTAGE_EPREFIX@/etc/mysql/my.cnf: The global mysql configuration file. +# $Id$ + +# The following options will be passed to all MySQL clients +[client] +#password = your_password +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock + +[mysql] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqladmin] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlcheck] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqldump] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlimport] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[mysqlshow] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets +default-character-set=utf8 + +[myisamchk] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +[myisampack] +character-sets-dir=@GENTOO_PORTAGE_EPREFIX@/usr/share/mysql/charsets + +# use [safe_mysqld] with mysql-3 +[mysqld_safe] +err-log = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysql.err + +# add a section [mysqld-4.1] or [mysqld-5.0] for specific configurations +[mysqld] +character-set-server = utf8 +user = mysql +port = 3306 +socket = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.sock +pid-file = @GENTOO_PORTAGE_EPREFIX@/var/run/mysqld/mysqld.pid +log-error = @GENTOO_PORTAGE_EPREFIX@/var/log/mysql/mysqld.err +basedir = @GENTOO_PORTAGE_EPREFIX@/usr +datadir = @DATADIR@ +skip-external-locking +key_buffer_size = 16M +max_allowed_packet = 4M +table_open_cache = 400 +sort_buffer_size = 512K +net_buffer_length = 16K +read_buffer_size = 256K +read_rnd_buffer_size = 512K +myisam_sort_buffer_size = 8M +lc_messages_dir = @GENTOO_PORTAGE_EPREFIX@/usr/share/mysql +#Set this to your desired error message language +lc_messages = en_US + +# security: +# using "localhost" in connects uses sockets by default +# skip-networking +bind-address = 127.0.0.1 + +log-bin +server-id = 1 + +# point the following paths to different dedicated disks +tmpdir = @GENTOO_PORTAGE_EPREFIX@/tmp/ +#log-update = @GENTOO_PORTAGE_EPREFIX@/path-to-dedicated-directory/hostname + +# you need the debug USE flag enabled to use the following directives, +# if needed, uncomment them, start the server and issue +# #tail -f @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.trace +# this will show you *exactly* what's happening in your server ;) + +#log = @GENTOO_PORTAGE_EPREFIX@/tmp/mysqld.sql +#gdb +#debug = d:t:i:o,/tmp/mysqld.trace +#one-thread + +# the rest of the innodb config follows: +# don't eat too much memory, we're trying to be safe on 64Mb boxes +# you might want to bump this up a bit on boxes with more RAM +innodb_buffer_pool_size = 128M +# +# i'd like to use @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/innodb, but that is seen as a database :-( +# and upstream wants things to be under @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/, so that's the route +# we have to take for the moment +#innodb_data_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_arch_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +#innodb_log_group_home_dir = @GENTOO_PORTAGE_EPREFIX@/var/lib/mysql/ +# you may wish to change this size to be more suitable for your system +# the max is there to avoid run-away growth on your machine +innodb_data_file_path = ibdata1:10M:autoextend:max:128M +# we keep this at around 25% of of innodb_buffer_pool_size +# sensible values range from 1MB to (1/innodb_log_files_in_group*innodb_buffer_pool_size) +innodb_log_file_size = 48M +# this is the default, increase it if you have very large transactions going on +innodb_log_buffer_size = 8M +# this is the default and won't hurt you +# you shouldn't need to tweak it +innodb_log_files_in_group=2 +# see the innodb config docs, the other options are not always safe +innodb_flush_log_at_trx_commit = 1 +innodb_lock_wait_timeout = 50 +innodb_file_per_table + +# Uncomment this to get FEDERATED engine support +#plugin-load=federated=ha_federated.so +loose-federated + +[mysqldump] +quick +max_allowed_packet = 16M + +[mysql] +# uncomment the next directive if you are not familiar with SQL +#safe-updates + +[isamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer = 2M +write_buffer = 2M + +[myisamchk] +key_buffer_size = 20M +sort_buffer_size = 20M +read_buffer_size = 2M +write_buffer_size = 2M + +[mysqlhotcopy] +interactive-timeout diff --git a/dev-db/percona-server/metadata.xml b/dev-db/percona-server/metadata.xml new file mode 100644 index 000000000000..8bb730147803 --- /dev/null +++ b/dev-db/percona-server/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>mysql</herd> +<use> + <flag name='client-libs'>Build the libmysqlclient libraries</flag> + <flag name='cluster'>Add support for NDB clustering (deprecated)</flag> + <flag name='community'>Enables the community features from upstream.</flag> + <flag name='embedded'>Build embedded server (libmysqld)</flag> + <flag name='extraengine'>Add support for alternative storage engines (Archive, CSV, Blackhole, Federated(X), Partition)</flag> + <flag name="jemalloc">Use <pkg>dev-libs/jemalloc</pkg> for allocations.</flag> + <flag name='latin1'>Use LATIN1 encoding instead of UTF8</flag> + <flag name='minimal'>Install client programs only, no server</flag> + <flag name='profiling'>Add support for statement profiling (requires USE=community).</flag> + <flag name='server'>Build the server program</flag> + <flag name="systemtap">Build support for profiling and tracing using <pkg>dev-util/systemtap</pkg></flag> + <flag name='test'>Install upstream testsuites for end use.</flag> + <flag name='tools'>Build the command line tools (mysql, mysqldump, mysqladmin, etc)</flag> +</use> +</pkgmetadata> diff --git a/dev-db/percona-server/percona-server-5.6.24.72.2.ebuild b/dev-db/percona-server/percona-server-5.6.24.72.2.ebuild new file mode 100644 index 000000000000..7119b470e8c4 --- /dev/null +++ b/dev-db/percona-server/percona-server-5.6.24.72.2.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150113-1853Z" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild percona-server-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in Percona 5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt + # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers + # engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate + # engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 + # engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # main.percona_bug1289599 + # Looks to be a syntax error in the test file itself + # + # main.variables main.myisam main.merge_recover + # fails due to ulimit not able to open enough files (needs 5000) + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # Called with bad parameters should be reported upstream + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \ + perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \ + funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \ + main.variables main.myisam main.merge_recover \ + engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \ + engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \ + engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \ + main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --testcase-timeout=30 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/percona-server/percona-server-5.6.25.73.0-r1.ebuild b/dev-db/percona-server/percona-server-5.6.25.73.0-r1.ebuild new file mode 100644 index 000000000000..395c76ad4645 --- /dev/null +++ b/dev-db/percona-server/percona-server-5.6.25.73.0-r1.ebuild @@ -0,0 +1,147 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150717-1707Z" +HAS_TOOLS_PATCH="1" +SUBSLOT="18" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild percona-server-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if use server ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # Create a symlink to provided binaries so the tests can find them when client-libs is off + if ! use client-libs ; then + ln -srf /usr/bin/my_print_defaults "${BUILD_DIR}/client/my_print_defaults" || die + ln -srf /usr/bin/perror "${BUILD_DIR}/client/perror" || die + mysql-multilib_disable_test main.perror "String mismatch due to not building local perror" + fi + + # These are failing in Percona 5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt + # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers + # engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate + # engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 + # engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # main.percona_bug1289599 + # Looks to be a syntax error in the test file itself + # + # main.variables main.myisam main.merge_recover + # fails due to ulimit not able to open enough files (needs 5000) + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # Called with bad parameters should be reported upstream + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \ + perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \ + funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \ + main.variables main.myisam main.merge_recover \ + engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \ + engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \ + engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \ + main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --testcase-timeout=30 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/percona-server/percona-server-5.6.25.73.0.ebuild b/dev-db/percona-server/percona-server-5.6.25.73.0.ebuild new file mode 100644 index 000000000000..7119b470e8c4 --- /dev/null +++ b/dev-db/percona-server/percona-server-5.6.25.73.0.ebuild @@ -0,0 +1,138 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +MY_EXTRAS_VER="20150113-1853Z" + +inherit toolchain-funcs mysql-multilib +# only to make repoman happy. it is really set in the eclass +IUSE="$IUSE" + +# REMEMBER: also update eclass/mysql*.eclass before committing! +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-linux" + +# When MY_EXTRAS is bumped, the index should be revised to exclude these. +EPATCH_EXCLUDE='' + +DEPEND="|| ( >=sys-devel/gcc-3.4.6 >=sys-devel/gcc-apple-4.0 )" +RDEPEND="${RDEPEND}" + +# Please do not add a naive src_unpack to this ebuild +# If you want to add a single patch, copy the ebuild to an overlay +# and create your own mysql-extras tarball, looking at 000_index.txt + +# Official test instructions: +# USE='extraengine perl ssl static-libs community' \ +# FEATURES='test userpriv -usersandbox' \ +# ebuild percona-server-X.X.XX.ebuild \ +# digest clean package +multilib_src_test() { + + if ! multilib_is_native_abi ; then + einfo "Server tests not available on non-native abi". + return 0; + fi + + local TESTDIR="${CMAKE_BUILD_DIR}/mysql-test" + local retstatus_unit + local retstatus_tests + + # Bug #213475 - MySQL _will_ object strenously if your machine is named + # localhost. Also causes weird failures. + [[ "${HOSTNAME}" == "localhost" ]] && die "Your machine must NOT be named localhost" + + if ! use "minimal" ; then + + if [[ $UID -eq 0 ]]; then + die "Testing with FEATURES=-userpriv is no longer supported by upstream. Tests MUST be run as non-root." + fi + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + einfo ">>> Test phase [test]: ${CATEGORY}/${PF}" + addpredict /this-dir-does-not-exist/t9.MYI + + # Run CTest (test-units) + cmake-utils_src_test + retstatus_unit=$? + [[ $retstatus_unit -eq 0 ]] || eerror "test-unit failed" + + # Ensure that parallel runs don't die + export MTR_BUILD_THREAD="$((${RANDOM} % 100))" + # Enable parallel testing, auto will try to detect number of cores + # You may set this by hand. + # The default maximum is 8 unless MTR_MAX_PARALLEL is increased + export MTR_PARALLEL="${MTR_PARALLEL:-auto}" + + # create directories because mysqladmin might right out of order + mkdir -p "${T}"/var-tests{,/log} + + # These are failing in Percona 5.6 for now and are believed to be + # false positives: + # + # main.information_schema, binlog.binlog_statement_insert_delayed, + # main.mysqld--help-notwin, binlog.binlog_mysqlbinlog_filter + # perfschema.binlog_edge_mix, perfschema.binlog_edge_stmt + # funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers + # engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate + # engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 + # engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate + # fails due to USE=-latin1 / utf8 default + # + # main.mysql_client_test: + # segfaults at random under Portage only, suspect resource limits. + # + # main.percona_bug1289599 + # Looks to be a syntax error in the test file itself + # + # main.variables main.myisam main.merge_recover + # fails due to ulimit not able to open enough files (needs 5000) + # + # main.mysqlhotcopy_archive main.mysqlhotcopy_myisam + # Called with bad parameters should be reported upstream + + for t in main.mysql_client_test \ + binlog.binlog_statement_insert_delayed main.information_schema \ + main.mysqld--help-notwin binlog.binlog_mysqlbinlog_filter \ + perfschema.binlog_edge_mix perfschema.binlog_edge_stmt \ + funcs_1.is_columns_mysql funcs_1.is_tables_mysql funcs_1.is_triggers \ + main.variables main.myisam main.merge_recover \ + engines/funcs.db_alter_character_set engines/funcs.db_alter_character_set_collate \ + engines/funcs.db_alter_collate_ascii engines/funcs.db_alter_collate_utf8 \ + engines/funcs.db_create_character_set engines/funcs.db_create_character_set_collate \ + main.percona_bug1289599 main.mysqlhotcopy_archive main.mysqlhotcopy_myisam ; do + mysql-multilib_disable_test "$t" "False positives in Gentoo" + done + + # Run mysql tests + pushd "${TESTDIR}" + + # Set file limits higher so tests run + ulimit -n 3000 + + # run mysql-test tests + perl mysql-test-run.pl --force --vardir="${T}/var-tests" \ + --testcase-timeout=30 + retstatus_tests=$? + [[ $retstatus_tests -eq 0 ]] || eerror "tests failed" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + popd + + # Cleanup is important for these testcases. + pkill -9 -f "${S}/ndb" 2>/dev/null + pkill -9 -f "${S}/sql" 2>/dev/null + + failures="" + [[ $retstatus_unit -eq 0 ]] || failures="${failures} test-unit" + [[ $retstatus_tests -eq 0 ]] || failures="${failures} tests" + has usersandbox $FEATURES && eerror "Some tests may fail with FEATURES=usersandbox" + + [[ -z "$failures" ]] || die "Test failures: $failures" + einfo "Tests successfully completed" + + else + + einfo "Skipping server tests due to minimal build." + fi +} diff --git a/dev-db/percona-toolkit/Manifest b/dev-db/percona-toolkit/Manifest new file mode 100644 index 000000000000..84e15a8cb5d9 --- /dev/null +++ b/dev-db/percona-toolkit/Manifest @@ -0,0 +1,2 @@ +DIST percona-toolkit-2.2.11.tar.gz 1389718 SHA256 848a8a57bf04dc1b2cc2ab555dd594a2c708b76656042ff38b1a91b8ccb1df4b SHA512 d5e34fce1b6b69dfc1a8ecd7bcbe84e586e950976553f4fd30afb887a850770c08990216e41fc194bdd0a5642034905ee2d69c2f8b3781503c9b4aab47017cdb WHIRLPOOL 79e02087c97b86e6e282215cf73c89d7d6842978a1d40d3b9e2a484437e6939a9957c7028feb8690ffc8b915c26627c943204f230f4cb09749bb3e22ec4189ff +DIST percona-toolkit-2.2.7.tar.gz 1451687 SHA256 49ed1fa6d46b8211ba82355ec3c9dd0614c3b29fd31993123f2041e85a38891e SHA512 d3d7c4162de08c381810b815600effc683d1b79a8df2ccacd16e2b333924b6634c135f08387784c88867c90ce4ee1b334eae6d7f974e9587008da30b7206c5d3 WHIRLPOOL b6d02d5bc0aafbd8fdabc48efb4fa8e0d04634d31185c2c12c2c2776e36e80f138f7bcd1a6fcd2c079ca0cd25c56e79a6aea0e1615dfc7ad26a553c60716674d diff --git a/dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch b/dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch new file mode 100644 index 000000000000..d6d38177b18f --- /dev/null +++ b/dev-db/percona-toolkit/files/percona-toolkit-2.2.7-no-versioncheck.patch @@ -0,0 +1,216 @@ +diff -rupN old/percona-toolkit-2.2.7/bin/pt-archiver new/percona-toolkit-2.2.7/bin/pt-archiver +--- old/percona-toolkit-2.2.7/bin/pt-archiver 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-archiver 2014-05-21 18:13:49.148631547 +0200 +@@ -7465,8 +7465,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-config-diff new/percona-toolkit-2.2.7/bin/pt-config-diff +--- old/percona-toolkit-2.2.7/bin/pt-config-diff 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-config-diff 2014-05-21 18:13:38.012402960 +0200 +@@ -5563,8 +5563,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-deadlock-logger new/percona-toolkit-2.2.7/bin/pt-deadlock-logger +--- old/percona-toolkit-2.2.7/bin/pt-deadlock-logger 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-deadlock-logger 2014-05-21 18:11:18.923569703 +0200 +@@ -5332,8 +5332,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-diskstats new/percona-toolkit-2.2.7/bin/pt-diskstats +--- old/percona-toolkit-2.2.7/bin/pt-diskstats 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-diskstats 2014-05-21 18:11:04.041268359 +0200 +@@ -5468,8 +5468,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker new/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker +--- old/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-duplicate-key-checker 2014-05-21 18:12:51.993462828 +0200 +@@ -5430,8 +5430,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-find new/percona-toolkit-2.2.7/bin/pt-find +--- old/percona-toolkit-2.2.7/bin/pt-find 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-find 2014-05-21 18:09:46.496705351 +0200 +@@ -4440,8 +4440,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-fk-error-logger new/percona-toolkit-2.2.7/bin/pt-fk-error-logger +--- old/percona-toolkit-2.2.7/bin/pt-fk-error-logger 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-fk-error-logger 2014-05-21 18:12:39.277202489 +0200 +@@ -4335,8 +4335,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-heartbeat new/percona-toolkit-2.2.7/bin/pt-heartbeat +--- old/percona-toolkit-2.2.7/bin/pt-heartbeat 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-heartbeat 2014-05-21 18:09:29.885373476 +0200 +@@ -6019,8 +6019,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-index-usage new/percona-toolkit-2.2.7/bin/pt-index-usage +--- old/percona-toolkit-2.2.7/bin/pt-index-usage 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-index-usage 2014-05-21 18:08:58.139739567 +0200 +@@ -7348,8 +7348,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-kill new/percona-toolkit-2.2.7/bin/pt-kill +--- old/percona-toolkit-2.2.7/bin/pt-kill 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-kill 2014-05-21 18:11:45.264103271 +0200 +@@ -7626,8 +7626,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-online-schema-change new/percona-toolkit-2.2.7/bin/pt-online-schema-change +--- old/percona-toolkit-2.2.7/bin/pt-online-schema-change 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-online-schema-change 2014-05-21 18:13:04.843724091 +0200 +@@ -11298,8 +11298,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-query-digest new/percona-toolkit-2.2.7/bin/pt-query-digest +--- old/percona-toolkit-2.2.7/bin/pt-query-digest 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-query-digest 2014-05-21 18:12:23.127872894 +0200 +@@ -16265,8 +16265,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-slave-delay new/percona-toolkit-2.2.7/bin/pt-slave-delay +--- old/percona-toolkit-2.2.7/bin/pt-slave-delay 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-slave-delay 2014-05-21 18:08:11.586811388 +0200 +@@ -4698,8 +4698,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-slave-restart new/percona-toolkit-2.2.7/bin/pt-slave-restart +--- old/percona-toolkit-2.2.7/bin/pt-slave-restart 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-slave-restart 2014-05-21 18:11:32.423843497 +0200 +@@ -5638,8 +5638,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-table-checksum new/percona-toolkit-2.2.7/bin/pt-table-checksum +--- old/percona-toolkit-2.2.7/bin/pt-table-checksum 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-table-checksum 2014-05-21 18:14:03.377924135 +0200 +@@ -12314,8 +12314,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-table-sync new/percona-toolkit-2.2.7/bin/pt-table-sync +--- old/percona-toolkit-2.2.7/bin/pt-table-sync 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-table-sync 2014-05-21 18:10:18.476350097 +0200 +@@ -12501,8 +12501,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-upgrade new/percona-toolkit-2.2.7/bin/pt-upgrade +--- old/percona-toolkit-2.2.7/bin/pt-upgrade 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-upgrade 2014-05-21 18:08:38.344342935 +0200 +@@ -11003,8 +11003,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two +diff -rupN old/percona-toolkit-2.2.7/bin/pt-variable-advisor new/percona-toolkit-2.2.7/bin/pt-variable-advisor +--- old/percona-toolkit-2.2.7/bin/pt-variable-advisor 2014-02-20 08:20:28.000000000 +0100 ++++ new/percona-toolkit-2.2.7/bin/pt-variable-advisor 2014-05-21 18:10:01.967017827 +0200 +@@ -5968,8 +5968,6 @@ Show version and exit. + + =item --[no]version-check + +-default: yes +- + Check for the latest version of Percona Toolkit, MySQL, and other programs. + + This is a standard "check for updates automatically" feature, with two diff --git a/dev-db/percona-toolkit/metadata.xml b/dev-db/percona-toolkit/metadata.xml new file mode 100644 index 000000000000..1e00b85e5e96 --- /dev/null +++ b/dev-db/percona-toolkit/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>mysql</herd> + <maintainer> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> + <longdescription>Percona Toolkit, formerly Maatkit and Aspersa, formerly MySQL Toolkit, + is a collection of command-line utilities that provide missing + functionality for MySQL. Some of the tools implement lacking server + functionality, such as online consistency checks for master/slave + replication; others are client-side utilities such as a query + profiler.</longdescription> + <!-- + <upstream> + <remote-id type="launchpad">percona-toolkit</remote-id> + </upstream> + --> +</pkgmetadata> diff --git a/dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild b/dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild new file mode 100644 index 000000000000..b01433eccc03 --- /dev/null +++ b/dev-db/percona-toolkit/percona-toolkit-2.2.11.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils perl-app perl-module toolchain-funcs + +DESCRIPTION="essential command-line utilities for MySQL" +HOMEPAGE="http://www.percona.com/software/percona-toolkit/" +SRC_URI="http://www.percona.com/downloads/${PN}/${PV}/${P}.tar.gz" + +LICENSE="|| ( GPL-2 Artistic )" +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +# Package warrants IUSE doc +IUSE="" + +COMMON_DEPEND="dev-perl/DBI + dev-perl/DBD-mysql + virtual/perl-Time-HiRes" +RDEPEND="${COMMON_DEPEND} + dev-perl/JSON + dev-perl/libwww-perl + dev-perl/Role-Tiny + virtual/perl-File-Path + virtual/perl-Getopt-Long + virtual/perl-Time-Local + virtual/perl-Digest-MD5 + virtual/perl-IO-Compress + virtual/perl-File-Temp + virtual/perl-File-Spec + virtual/perl-Scalar-List-Utils + dev-perl/TermReadKey" +DEPEND="${COMMON_DEPEND} + virtual/perl-ExtUtils-MakeMaker" + +src_prepare() { + # bug 501904 - CVE-2014-2029 + # sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/* + epatch "${FILESDIR}/${PN}-2.2.7-no-versioncheck.patch" +} + +# Percona Toolkit does NOT contain the UDF code for Murmur/FNV any more. +src_install() { + perl-module_src_install + dodoc docs/percona-toolkit.pod +} diff --git a/dev-db/percona-toolkit/percona-toolkit-2.2.7.ebuild b/dev-db/percona-toolkit/percona-toolkit-2.2.7.ebuild new file mode 100644 index 000000000000..96dad03e311d --- /dev/null +++ b/dev-db/percona-toolkit/percona-toolkit-2.2.7.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils perl-app perl-module toolchain-funcs + +DESCRIPTION="essential command-line utilities for MySQL" +HOMEPAGE="http://www.percona.com/software/percona-toolkit/" +SRC_URI="http://www.percona.com/downloads/${PN}/${PV}/${P}.tar.gz" + +LICENSE="|| ( GPL-2 Artistic )" +SLOT="0" +KEYWORDS="amd64 x86 ~amd64-linux ~x86-linux" +# Package warrants IUSE doc +IUSE="" + +COMMON_DEPEND="dev-perl/DBI + dev-perl/DBD-mysql + virtual/perl-Time-HiRes" +RDEPEND="${COMMON_DEPEND} + dev-perl/JSON + dev-perl/libwww-perl + dev-perl/Role-Tiny + virtual/perl-File-Path + virtual/perl-Getopt-Long + virtual/perl-Time-Local + virtual/perl-Digest-MD5 + virtual/perl-IO-Compress + virtual/perl-File-Temp + virtual/perl-File-Spec + virtual/perl-Scalar-List-Utils + dev-perl/TermReadKey" +DEPEND="${COMMON_DEPEND} + virtual/perl-ExtUtils-MakeMaker" + +src_prepare() { + # bug 501904 - CVE-2014-2029 + # sed -i -e '/^=item --\[no\]version-check/,/^default: yes/{/^default: yes/d}' bin/* + epatch "${FILESDIR}/${P}-no-versioncheck.patch" +} + +# Percona Toolkit does NOT contain the UDF code for Murmur/FNV any more. +src_install() { + perl-module_src_install + dodoc docs/percona-toolkit.pod +} diff --git a/dev-db/pg_activity/Manifest b/dev-db/pg_activity/Manifest new file mode 100644 index 000000000000..79483d3df98c --- /dev/null +++ b/dev-db/pg_activity/Manifest @@ -0,0 +1 @@ +DIST pg_activity-1.2.0.tar.gz 88863 SHA256 e93f09263f9111963818dafe6a8f166ed9c1b272e56e046925d7524ebf779d92 SHA512 0bf2f3f746755cb3bc6cbff6a9377d172b15a82c836a19cd52ef8073c39cbb8ffaf2f9583fca437cabc7251bab55a874e1ee8e0559778881d42bcc030bf5d0c4 WHIRLPOOL ec8f5d414290bdbb59821ca37cd1a0d098db3771e7d51f0f4f5125c999889a69bf0a71e94288ee7d0e90821b78f5eef3d907f5eac46a5e8e6a5bcf68a241163b diff --git a/dev-db/pg_activity/metadata.xml b/dev-db/pg_activity/metadata.xml new file mode 100644 index 000000000000..f6601797b296 --- /dev/null +++ b/dev-db/pg_activity/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>ago@gentoo.org</email> + <name>Agostino Sarubbo</name> + </maintainer> + <upstream> + <remote-id type="github">julmon/pg_activity</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/pg_activity/pg_activity-1.2.0.ebuild b/dev-db/pg_activity/pg_activity-1.2.0.ebuild new file mode 100644 index 000000000000..ca7439b0e77c --- /dev/null +++ b/dev-db/pg_activity/pg_activity-1.2.0.ebuild @@ -0,0 +1,25 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python2_7 ) + +inherit distutils-r1 + +DESCRIPTION="Realtime PostgreSQL database server monitoring tool" +HOMEPAGE="https://github.com/julmon/pg_activity/" +SRC_URI="https://github.com/julmon/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" +KEYWORDS="~amd64 ~x86" +SLOT="0" +LICENSE="POSTGRESQL" + +DEPEND="" +RDEPEND="dev-python/psutil[${PYTHON_USEDEP}] + dev-python/setuptools[${PYTHON_USEDEP}] + dev-python/psycopg:2[${PYTHON_USEDEP}]" + +src_install() { + distutils-r1_src_install + doman docs/man/${PN}.1 +} diff --git a/dev-db/pg_top/Manifest b/dev-db/pg_top/Manifest new file mode 100644 index 000000000000..60fce1c7bea5 --- /dev/null +++ b/dev-db/pg_top/Manifest @@ -0,0 +1,2 @@ +DIST pg_top-3.6.2.tar.bz2 220985 SHA256 8a749f6aec44625d834e477982c67ba0a76262a6a8c87b20e20df9ea07ce714d SHA512 0e7f33cccd7a1debce4965a11ff3d5d6868aace53651ca1c486f061728034f0ab3901ddfbded022c9297d3393eaea32585ca779334954c87fd0c13c8fa523074 WHIRLPOOL c92e62a1765a734da290b2df78fc6770819f8a566baf8c69929bbace89aa46b0cf4399e25e594947e57cf74f46a22a35a25d5db0d407fd28738343eab0f74558 +DIST pg_top-3.7.0.tar.bz2 236076 SHA256 c48d726e8cd778712e712373a428086d95e2b29932e545ff2a948d043de5a6a2 SHA512 509cd3ce65a9b549097eaab5ae27106fa469cdeb4f37950564654f3df01390e1a771c8fa4f5858c3e4c1e76470b6c0fd9b07e8268564f59285e30bf824d7c4ec WHIRLPOOL 29c8f326f08e31a13b7f903d025b4608107524de5b65c8567788e6855df6b01a2991b95312e8b3da88a3df0d946834929cab681599340a647e93d8401114ed83 diff --git a/dev-db/pg_top/files/pg_top-3.6.2.patch b/dev-db/pg_top/files/pg_top-3.6.2.patch new file mode 100644 index 000000000000..03ef912ed2b8 --- /dev/null +++ b/dev-db/pg_top/files/pg_top-3.6.2.patch @@ -0,0 +1,29 @@ +--- configure.ac.orig 2013-09-20 10:11:20.256444684 +0400 ++++ configure.ac 2013-09-20 10:16:30.262459612 +0400 +@@ -90,7 +90,7 @@ + + DBCFLAGS="-I$INCLUDEDIR" + LIBDIR=`$PG_CONFIG --libdir` +-DBLDFLAGS="-L$LIBDIR -lpq" ++DBLDFLAGS="-L$LIBDIR" + + AC_SUBST(DBCFLAGS) + AC_SUBST(DBLDFLAGS) +@@ -109,6 +109,8 @@ + AC_SEARCH_LIBS(inet_aton, resolv, AC_DEFINE(HAVE_INET_ATON, 1, + [inet_aton is already defined])) + ++AC_SEARCH_LIBS(PQexec, pq) ++ + # check for libraries required by extension + extlibs="" + if test -n "$with_ext" -a -f "${srcdir}/ext/$with_ext.libs"; then +@@ -216,8 +218,6 @@ + AC_SUBST(SRC) + AC_SUBST(OBJ) + +-CFLAGS="-Wall -g" +- + AC_MSG_CHECKING(for installation settings) + # calculate appropriate settings + OWNER="" diff --git a/dev-db/pg_top/files/pg_top-3.7.0.patch b/dev-db/pg_top/files/pg_top-3.7.0.patch new file mode 100644 index 000000000000..6367a1dc03dc --- /dev/null +++ b/dev-db/pg_top/files/pg_top-3.7.0.patch @@ -0,0 +1,29 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -103,7 +103,7 @@ + AC_SEARCH_LIBS(elf32_getphdr, elf) + # -lmld -lmach + AC_SEARCH_LIBS(vm_statistics, mach) +-AC_SEARCH_LIBS(tgetent, termcap curses ncurses) ++AC_SEARCH_LIBS(tgetent, termcap tinfo curses ncurses) + AC_SEARCH_LIBS(exp, m) + + AC_SEARCH_LIBS(dlerror, dl) +@@ -111,6 +111,8 @@ + AC_SEARCH_LIBS(inet_aton, resolv, AC_DEFINE(HAVE_INET_ATON, 1, + [inet_aton is already defined])) + ++AC_SEARCH_LIBS(PQexec, pq) ++ + # check for libraries required by extension + extlibs="" + if test -n "$with_ext" -a -f "${srcdir}/ext/$with_ext.libs"; then +@@ -217,8 +219,6 @@ + AC_SUBST(SRC) + AC_SUBST(OBJ) + +-CFLAGS="-Wall -g" +- + AC_MSG_CHECKING(for installation settings) + # calculate appropriate settings + OWNER="" diff --git a/dev-db/pg_top/metadata.xml b/dev-db/pg_top/metadata.xml new file mode 100644 index 000000000000..fd5d8d805d91 --- /dev/null +++ b/dev-db/pg_top/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <longdescription lang="en"> + pg_top is 'top' for PostgreSQL. It is derived from Unix Top. Similar to + top, pg_top allows you to monitor PostgreSQL processes. + </longdescription> +</pkgmetadata> + diff --git a/dev-db/pg_top/pg_top-3.6.2-r1.ebuild b/dev-db/pg_top/pg_top-3.6.2-r1.ebuild new file mode 100644 index 000000000000..3a5ffa91df71 --- /dev/null +++ b/dev-db/pg_top/pg_top-3.6.2-r1.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +AUTOTOOLS_AUTORECONF=1 +inherit autotools-utils eutils + +DESCRIPTION="'top' for PostgreSQL" +HOMEPAGE="http://ptop.projects.postgresql.org/" +SRC_URI="http://pgfoundry.org/frs/download.php/1780/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +RDEPEND="dev-db/postgresql" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS=( FAQ HISTORY README TODO Y2K ) +PATCHES=( "${FILESDIR}/${P}.patch" ) + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} diff --git a/dev-db/pg_top/pg_top-3.7.0.ebuild b/dev-db/pg_top/pg_top-3.7.0.ebuild new file mode 100644 index 000000000000..8aac387fe90a --- /dev/null +++ b/dev-db/pg_top/pg_top-3.7.0.ebuild @@ -0,0 +1,31 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +AUTOTOOLS_AUTORECONF=1 +inherit autotools-utils eutils + +DESCRIPTION="'top' for PostgreSQL" +HOMEPAGE="http://ptop.projects.postgresql.org/" +SRC_URI="http://pgfoundry.org/frs/download.php/3504/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +RDEPEND="dev-db/postgresql" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +DOCS=( FAQ HISTORY README TODO Y2K ) +PATCHES=( "${FILESDIR}/${P}.patch" ) + +src_configure() { + local myeconfargs=( + $(use_enable debug) + ) + autotools-utils_src_configure +} diff --git a/dev-db/pgadmin3/Manifest b/dev-db/pgadmin3/Manifest new file mode 100644 index 000000000000..264e85c60655 --- /dev/null +++ b/dev-db/pgadmin3/Manifest @@ -0,0 +1,2 @@ +DIST pgadmin3-1.18.1.tar.gz 14265392 SHA256 27ac3e296a6ca3da9da8ee22ed98eabfe1377be507877ffc26048fc2a9c6cbc0 SHA512 e292aaf95159eda98fe5f5112aad758cc08c38fe325ef92c698009defeb3891d9e0d485c00a0cbb82b70a95f54755eeb7f90b82a34354e77b485f738b5458c99 WHIRLPOOL 1f1af18a721c2c99b0dc52ec571e5831aac89eb998d9917e82134f9a900fce5b5a8edcc55640c962bd9b14de1ebae42cf9d896e1a3f84a05402674252dfeeb17 +DIST pgadmin3-1.20.0.tar.gz 14394997 SHA256 0773d7826a9c7a998c4872e9b00b998e0bbb10448984d66853420c95fa626b8c SHA512 83521a16d60bf8c9cffb03e4fb401a31e28f764c31608c0b223f7c88a14a09f665c976f3472debd4ad8b6cd54f0fbd2b8de352c296180e6ea6f8088cb45447bc WHIRLPOOL 336e785e7ed6d67d129bba3230a73900cc8404ce29371d4a9ec1db98d2ceb4fb6fd60ea75a2b432c2fe1bbec886db76d9dbbc4ffe77b067709f8e250fa348fe7 diff --git a/dev-db/pgadmin3/files/pgadmin3-desktop.patch b/dev-db/pgadmin3/files/pgadmin3-desktop.patch new file mode 100644 index 000000000000..0453d8d7e4b3 --- /dev/null +++ b/dev-db/pgadmin3/files/pgadmin3-desktop.patch @@ -0,0 +1,16 @@ +diff -Naruw a/pkg/pgadmin3.desktop b/pkg/pgadmin3.desktop +--- a/pkg/pgadmin3.desktop 2013-02-22 12:21:19.000000000 -0500 ++++ b/pkg/pgadmin3.desktop 2015-02-04 15:36:34.845312953 -0500 +@@ -2,9 +2,9 @@ + Encoding=UTF-8 + Name=pgAdmin III + Exec=/usr/bin/pgadmin3 +-Icon=/usr/share/pgadmin3/pgAdmin3.png ++Icon=/usr/share/pixmaps/pgadmin3.png + Type=Application +-Categories=Application;Development; +-MimeType=text/html ++Categories=Development; ++MimeType=text/html; + DocPath=/usr/share/pgadmin3/docs/en_US/index.html + Comment=PostgreSQL Tools diff --git a/dev-db/pgadmin3/files/pgadmin3-menu-assert.patch b/dev-db/pgadmin3/files/pgadmin3-menu-assert.patch new file mode 100644 index 000000000000..ae6615d1f877 --- /dev/null +++ b/dev-db/pgadmin3/files/pgadmin3-menu-assert.patch @@ -0,0 +1,14 @@ +X-Git-Url: http://git.postgresql.org/gitweb/?p=pgadmin3.git;a=blobdiff_plain;f=pgadmin%2Fctl%2FctlMenuToolbar.cpp;h=4a70089698c37f1f4fcd1bdd78948b4b4336969d;hp=8951aa409177c5e72e9cc0a7a31d177966a7a104;hb=a00916753f88ee9323abd2ea8cddb01428b296fc;hpb=e3ab3ddd6b5faafbc883cfb5003b6a2cecef2ce2 + +diff --git a/pgadmin/ctl/ctlMenuToolbar.cpp b/pgadmin/ctl/ctlMenuToolbar.cpp +index 8951aa4..4a70089 100644 +--- a/pgadmin/ctl/ctlMenuToolbar.cpp ++++ b/pgadmin/ctl/ctlMenuToolbar.cpp +@@ -109,7 +109,7 @@ void ctlMenuButton::DoProcessLeftClick(wxMouseEvent &event) + menu_pos.y = button_size.GetHeight(); + } + +- PopupMenu(m_menu, menu_pos); ++ DoPopupMenu(m_menu, menu_pos.x, menu_pos.y); + } + diff --git a/dev-db/pgadmin3/metadata.xml b/dev-db/pgadmin3/metadata.xml new file mode 100644 index 000000000000..d74b804b6ad0 --- /dev/null +++ b/dev-db/pgadmin3/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> +<use> + <flag name='databasedesigner'>Enable the Database Designer component</flag> +</use> +</pkgmetadata> diff --git a/dev-db/pgadmin3/pgadmin3-1.18.1.ebuild b/dev-db/pgadmin3/pgadmin3-1.18.1.ebuild new file mode 100644 index 000000000000..ffdba422ead2 --- /dev/null +++ b/dev-db/pgadmin3/pgadmin3-1.18.1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +WX_GTK_VER="2.8" + +inherit multilib versionator wxwidgets + +DESCRIPTION="wxWidgets GUI for PostgreSQL" +HOMEPAGE="http://www.pgadmin.org/" +SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz" + +LICENSE="POSTGRESQL" +KEYWORDS="amd64 ppc x86 ~x86-fbsd" +SLOT="0" +IUSE="debug +databasedesigner" + +DEPEND="x11-libs/wxGTK:2.8[X,debug=] + >=dev-db/postgresql-8.4.0 + >=dev-libs/libxml2-2.6.18 + >=dev-libs/libxslt-1.1" +RDEPEND="${DEPEND}" + +pkg_setup() { + local pgslot=$(postgresql-config show) + + if [[ ${pgslot//.} < 84 ]] ; then + eerror "PostgreSQL slot must be set to 8.4 or higher." + eerror " postgresql-config set 8.4" + die "PostgreSQL slot is not set to 8.4 or higher." + fi +} + +src_prepare() { + epatch "${FILESDIR}/pgadmin3-desktop.patch" +} + +src_configure() { + econf --with-wx-version=2.8 \ + $(use_enable debug) \ + $(use_enable databasedesigner) +} + +src_install() { + emake DESTDIR="${D}" install + + newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png + + # icon location for the desktop file provided in pkg folder + insinto /usr/share/pgadmin3 + doins "${S}/pgadmin/include/images/pgAdmin3.png" + + domenu "${S}/pkg/pgadmin3.desktop" + + # Fixing world-writable files + fperms -R go-w /usr/share +} diff --git a/dev-db/pgadmin3/pgadmin3-1.20.0-r1.ebuild b/dev-db/pgadmin3/pgadmin3-1.20.0-r1.ebuild new file mode 100644 index 000000000000..980c022298e4 --- /dev/null +++ b/dev-db/pgadmin3/pgadmin3-1.20.0-r1.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit multilib versionator wxwidgets + +DESCRIPTION="wxWidgets GUI for PostgreSQL" +HOMEPAGE="http://www.pgadmin.org/" +SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz" + +LICENSE="POSTGRESQL" +KEYWORDS="amd64 ppc x86 ~x86-fbsd" +SLOT="0" +IUSE="debug +databasedesigner" + +DEPEND="x11-libs/wxGTK:=[X,debug=] + >=dev-db/postgresql-8.4.0:= + >=dev-libs/libxml2-2.6.18 + >=dev-libs/libxslt-1.1" +RDEPEND="${DEPEND}" + +pkg_setup() { + local pgslot=$(postgresql-config show) + + if [[ ${pgslot//.} < 84 ]] ; then + eerror "PostgreSQL slot must be set to 8.4 or higher." + eerror " postgresql-config set 8.4" + die "PostgreSQL slot is not set to 8.4 or higher." + fi +} + +src_prepare() { + epatch "${FILESDIR}/pgadmin3-desktop.patch" +} + +src_configure() { + WX_GTK_PV=$(best_version x11-libs/wxGTK[X,debug=]) + WX_GTK_VER=$(get_version_component_range 1-2 ${WX_GTK_PV#x11-libs/wxGTK-}) + + need-wxwidgets unicode + + econf --with-wx-version=${WX_GTK_VER} \ + $(use_enable debug) \ + $(use_enable databasedesigner) +} + +src_install() { + emake DESTDIR="${D}" install + + newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png + + domenu "${S}/pkg/pgadmin3.desktop" + + # Fixing world-writable files + fperms -R go-w /usr/share +} diff --git a/dev-db/pgadmin3/pgadmin3-1.20.0-r2.ebuild b/dev-db/pgadmin3/pgadmin3-1.20.0-r2.ebuild new file mode 100644 index 000000000000..9add92060c9f --- /dev/null +++ b/dev-db/pgadmin3/pgadmin3-1.20.0-r2.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib versionator wxwidgets + +DESCRIPTION="wxWidgets GUI for PostgreSQL" +HOMEPAGE="http://www.pgadmin.org/" +SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz" + +LICENSE="POSTGRESQL" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" +SLOT="0" +IUSE="debug +databasedesigner" + +DEPEND="x11-libs/wxGTK:=[X,debug=] + >=dev-db/postgresql-8.4.0:= + >=dev-libs/libxml2-2.6.18 + >=dev-libs/libxslt-1.1" +RDEPEND="${DEPEND}" + +pkg_setup() { + local pgslot=$(postgresql-config show) + + if [[ ${pgslot//.} < 84 ]] ; then + eerror "PostgreSQL slot must be set to 8.4 or higher." + eerror " postgresql-config set 8.4" + die "PostgreSQL slot is not set to 8.4 or higher." + fi +} + +src_prepare() { + epatch "${FILESDIR}/pgadmin3-desktop.patch" \ + "${FILESDIR}/pgadmin3-menu-assert.patch" + + epatch_user +} + +src_configure() { + WX_GTK_PV=$(best_version x11-libs/wxGTK[X,debug=]) + WX_GTK_VER=$(get_version_component_range 1-2 ${WX_GTK_PV#x11-libs/wxGTK-}) + + need-wxwidgets unicode + + econf --with-wx-version=${WX_GTK_VER} \ + $(use_enable debug) \ + $(use_enable databasedesigner) +} + +src_install() { + emake DESTDIR="${D}" install + + newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png + + domenu "${S}/pkg/pgadmin3.desktop" + + # Fixing world-writable files + fperms -R go-w /usr/share +} diff --git a/dev-db/pgadmin3/pgadmin3-1.20.0.ebuild b/dev-db/pgadmin3/pgadmin3-1.20.0.ebuild new file mode 100644 index 000000000000..d95f2b62978f --- /dev/null +++ b/dev-db/pgadmin3/pgadmin3-1.20.0.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +WX_GTK_VER="2.8" + +inherit multilib versionator wxwidgets + +DESCRIPTION="wxWidgets GUI for PostgreSQL" +HOMEPAGE="http://www.pgadmin.org/" +SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz" + +LICENSE="POSTGRESQL" +KEYWORDS="~amd64 ~ppc ~x86 ~x86-fbsd" +SLOT="0" +IUSE="debug +databasedesigner" + +DEPEND="x11-libs/wxGTK:2.8[X,debug=] + >=dev-db/postgresql-8.4.0 + >=dev-libs/libxml2-2.6.18 + >=dev-libs/libxslt-1.1" +RDEPEND="${DEPEND}" + +pkg_setup() { + local pgslot=$(postgresql-config show) + + if [[ ${pgslot//.} < 84 ]] ; then + eerror "PostgreSQL slot must be set to 8.4 or higher." + eerror " postgresql-config set 8.4" + die "PostgreSQL slot is not set to 8.4 or higher." + fi +} + +src_prepare() { + epatch "${FILESDIR}/pgadmin3-desktop.patch" +} + +src_configure() { + econf --with-wx-version=2.8 \ + $(use_enable debug) \ + $(use_enable databasedesigner) +} + +src_install() { + emake DESTDIR="${D}" install + + newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png + + # icon location for the desktop file provided in pkg folder + insinto /usr/share/pgadmin3 + doins "${S}/pgadmin/include/images/pgAdmin3.png" + + domenu "${S}/pkg/pgadmin3.desktop" + + # Fixing world-writable files + fperms -R go-w /usr/share +} diff --git a/dev-db/pgagent/Manifest b/dev-db/pgagent/Manifest new file mode 100644 index 000000000000..8b9ee02172f3 --- /dev/null +++ b/dev-db/pgagent/Manifest @@ -0,0 +1,2 @@ +DIST pgAgent-3.3.0-Source.tar.gz 43722 SHA256 110f2fd811a05ea8a420a79fcbb25b971e60f10f8abb8ab2bede8419c58b7321 SHA512 928d72d578beacc7725cfd3e206d81a732baf6d654a681dd1d603b68e54c0d20e54fad793759924fdad7efc5c6b2047d372e6cd8ae7539c76c06db3a8963657a WHIRLPOOL ce44d26ef314ff0076ab376377c1f2b4e826366da346f4aac77e0e877a49fbbf9f6018869b8dc6db24b7ef519bb4d6499d6436da3a4a5053e1cd787028003856 +DIST pgAgent-3.4.0-Source.tar.gz 45081 SHA256 0da0ac8f453cf34ab6f708eee036bed0fd0e5fa311de283b92d2ff06600bbb3d SHA512 3b068fc6f5e51ff20604f8cec3e067d04b5b1537229da15ee442000f5fe834697a4eae86be0e9a58b8ee5da24cc985c8c9804d71cb2a50e93ec4cf9a424a4ff0 WHIRLPOOL df619ddbfd5c01cf9e17b22becf74742ea7caa783504fd5942d63992bc80913b36f1c85d7ce2d3dd31634b524617a943ed07a3eba675caddc7cd7f3fc79d8c1c diff --git a/dev-db/pgagent/files/pgagent.confd b/dev-db/pgagent/files/pgagent.confd new file mode 100644 index 000000000000..0b2c7d788dd2 --- /dev/null +++ b/dev-db/pgagent/files/pgagent.confd @@ -0,0 +1,22 @@ +# Pool time interval +PGA_POLL="10" + +# Retry period +PGA_RETRY="30" + +# Log file +PGA_LOG="/var/log/pgagent.log" + +# Logging verbosity +# ERROR=0, WARNING=1, DEBUG=2 +PGA_LEVEL="1" + +# Server parameters +# Host address +PG_HOST="localhost" + +# DB name +PG_DBNAME="postgres" + +# Username +PG_USER="postgres"
\ No newline at end of file diff --git a/dev-db/pgagent/files/pgagent.initd b/dev-db/pgagent/files/pgagent.initd new file mode 100644 index 000000000000..d168e9a27d2c --- /dev/null +++ b/dev-db/pgagent/files/pgagent.initd @@ -0,0 +1,25 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +PGAGENTOPT="-t ${PGA_POLL} -r ${PGA_RETRY} -s ${PGA_LOG} -l ${PGA_LEVEL}" + +PGOPT="hostaddr=${PG_HOST} dbname=${PG_DBNAME} user=${PG_USER}" + +depend() { + use net + need postgresql +} + +start() { + ebegin "Starting pgagent" + start-stop-daemon --start --exec /usr/bin/pgagent -- ${PGAGENTOPT} ${PGOPT} + eend $? +} + +stop() { + ebegin "Stopping pgagent" + start-stop-daemon --stop --name pgagent + eend $? +} diff --git a/dev-db/pgagent/metadata.xml b/dev-db/pgagent/metadata.xml new file mode 100644 index 000000000000..adf45800ffea --- /dev/null +++ b/dev-db/pgagent/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> +</pkgmetadata> diff --git a/dev-db/pgagent/pgagent-3.3.0.ebuild b/dev-db/pgagent/pgagent-3.3.0.ebuild new file mode 100644 index 000000000000..ac96c34bfdd0 --- /dev/null +++ b/dev-db/pgagent/pgagent-3.3.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit cmake-utils eutils wxwidgets + +MY_PN=${PN/a/A} + +KEYWORDS="amd64 x86" + +DESCRIPTION="${MY_PN} is a job scheduler for PostgreSQL" +HOMEPAGE="http://www.pgadmin.org/download/pgagent.php" +SRC_URI="mirror://postgresql/pgadmin3/release/${PN}/${MY_PN}-${PV}-Source.tar.gz" +LICENSE="POSTGRESQL GPL-2" +SLOT="0" +IUSE="" + +RDEPEND=">=dev-db/postgresql-8.3.0 + x11-libs/wxGTK:2.8 +" +DEPEND="${RDEPEND} + >=dev-util/cmake-2.6 +" + +S="${WORKDIR}/${MY_PN}-${PV}-Source" + +src_prepare() { + sed -e "s:share):share/${P}):" \ + -i CMakeLists.txt || die "Couldn't patch CMakeLists.txt" +} + +src_configure() { + WX_GTK_VER="2.8" + if has_version "x11-libs/wxGTK[X]"; then + need-wxwidgets unicode + else + need-wxwidgets base-unicode + fi + mycmakeargs="-DSTATIC_BUILD:BOOLEAN=FALSE" + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd "${FILESDIR}/pgagent.initd" ${PN} + newconfd "${FILESDIR}/pgagent.confd" ${PN} + + rm "${ED}"/usr/{LICENSE,README} || die "Failed to remove useless docs" +} diff --git a/dev-db/pgagent/pgagent-3.4.0.ebuild b/dev-db/pgagent/pgagent-3.4.0.ebuild new file mode 100644 index 000000000000..1ba18eac7923 --- /dev/null +++ b/dev-db/pgagent/pgagent-3.4.0.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +CMAKE_IN_SOURCE_BUILD=1 +inherit cmake-utils eutils wxwidgets + +MY_PN=${PN/a/A} + +KEYWORDS="amd64 x86" + +DESCRIPTION="${MY_PN} is a job scheduler for PostgreSQL" +HOMEPAGE="http://www.pgadmin.org/download/pgagent.php" +SRC_URI="mirror://postgresql/pgadmin3/release/${PN}/${MY_PN}-${PV}-Source.tar.gz" +LICENSE="POSTGRESQL GPL-2" +SLOT="0" +IUSE="" + +RDEPEND=">=dev-db/postgresql-9.0.0 + x11-libs/wxGTK:2.8 +" +DEPEND="${RDEPEND} + >=dev-util/cmake-2.6 +" + +S="${WORKDIR}/${MY_PN}-${PV}-Source" + +src_prepare() { + sed -e "s:share):share/${P}):" \ + -i CMakeLists.txt || die "Couldn't patch CMakeLists.txt" +} + +src_configure() { + WX_GTK_VER="2.8" + if has_version "x11-libs/wxGTK[X]"; then + need-wxwidgets unicode + else + need-wxwidgets base-unicode + fi + mycmakeargs="-DSTATIC_BUILD:BOOLEAN=FALSE" + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + newinitd "${FILESDIR}/pgagent.initd" ${PN} + newconfd "${FILESDIR}/pgagent.confd" ${PN} + + rm "${ED}"/usr/{LICENSE,README} || die "Failed to remove useless docs" +} diff --git a/dev-db/pgbadger/Manifest b/dev-db/pgbadger/Manifest new file mode 100644 index 000000000000..33601bd28763 --- /dev/null +++ b/dev-db/pgbadger/Manifest @@ -0,0 +1,3 @@ +DIST pgbadger-6.2.tar.gz 291146 SHA256 70dc0c3604baa7db9d8cc67b0c09447f8e64bd925af7f0380b79d0bdad951a8c SHA512 03cba824621d79cd1d4d77c997eb94278e22b0af413379155017fd3e8ab98ba437e5d6c27d3278ff4b84e2a0cb8c42cdbdfd65ae4c8f3db38fceedc14f62e016 WHIRLPOOL 97cf0eb88e281856484536ebb1a730460933f07662eb63dd1b0199f43d25e9c85fd22ce42688cfb6a96a0205f9231c2171c67f36fb8efb816bdfc45cf85e71dd +DIST pgbadger-6.4.tar.gz 293529 SHA256 a2a3b38e64c20b95d3ae395f93f41cda30492f844885a7ec5d5b2fbb090ec2f3 SHA512 438662dedf79bf81d4372dd9fb5e5e28b06f7e9d21811a00043923ba4a40e6b79f73d9203158b82df5e17bf7d7d90fa298cb7728db2133694ea55381b986e132 WHIRLPOOL e2da6885dbc7fdb5395a28e530e0a2d375466ebeb5e05b326f48afacac96d874bdf32cf8181420b1b741679453c2ceae7a1993adde174e0e33cd3ccd3bb71872 +DIST pgbadger-7.0.tar.gz 305008 SHA256 7c81afca0bd61ceb96c76ba2de4f3b116b529cb74610674fe20f6ea701f1279b SHA512 fa2d514da6b03a18060409e22364f91d267b0023381fcdba7e5ebe4ac2a7dfe03c83d77499ca781ec501cd24d793ea42cc06b2950875bf31eeea69395adece43 WHIRLPOOL 4eb7143c04dd62e660d279a25bb12e8d56c74ab6df205b2411201c49d2efc6a22a0254ed62962d01f1cf2a0d41f503e4b1aa6e13d643d725bb6662ac6b2d1a2d diff --git a/dev-db/pgbadger/metadata.xml b/dev-db/pgbadger/metadata.xml new file mode 100644 index 000000000000..53749dd60425 --- /dev/null +++ b/dev-db/pgbadger/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <upstream> + <remote-id type="sourceforge">pgbadger</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/pgbadger/pgbadger-6.2.ebuild b/dev-db/pgbadger/pgbadger-6.2.ebuild new file mode 100644 index 000000000000..ffa909d96040 --- /dev/null +++ b/dev-db/pgbadger/pgbadger-6.2.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-app + +DESCRIPTION="pgBadger is a PostgreSQL log analyzer" +HOMEPAGE="http://dalibo.github.io/pgbadger/" +SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="dev-perl/Text-CSV_XS" +RDEPEND="${DEPEND}" diff --git a/dev-db/pgbadger/pgbadger-6.4.ebuild b/dev-db/pgbadger/pgbadger-6.4.ebuild new file mode 100644 index 000000000000..5ce63a974bba --- /dev/null +++ b/dev-db/pgbadger/pgbadger-6.4.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-app + +DESCRIPTION="pgBadger is a PostgreSQL log analyzer" +HOMEPAGE="http://dalibo.github.io/pgbadger/" +SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="dev-perl/Text-CSV_XS" +RDEPEND="${DEPEND}" diff --git a/dev-db/pgbadger/pgbadger-7.0.ebuild b/dev-db/pgbadger/pgbadger-7.0.ebuild new file mode 100644 index 000000000000..444b4fc43bf3 --- /dev/null +++ b/dev-db/pgbadger/pgbadger-7.0.ebuild @@ -0,0 +1,19 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit perl-app + +DESCRIPTION="pgBadger is a PostgreSQL log analyzer." +HOMEPAGE="http://dalibo.github.io/pgbadger/" +SRC_URI="mirror://sourceforge/project/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="dev-perl/Text-CSV_XS" +RDEPEND="${DEPEND}" diff --git a/dev-db/pgbouncer/Manifest b/dev-db/pgbouncer/Manifest new file mode 100644 index 000000000000..ca2a3cbd5293 --- /dev/null +++ b/dev-db/pgbouncer/Manifest @@ -0,0 +1,2 @@ +DIST pgbouncer-1.5.4.tar.gz 339610 SHA256 08040482f4c887e14d8c8c46fab838fff640c0f3cf231f86ad7f766b7a292280 SHA512 ade8304eba682a468a5e4c1c5e661d67ea64fad951d6f767a3157de4e5398c52492b2ca022f274c55e43022df8d5fad87e45fc60adbcbab00a5ac843a26c6b71 WHIRLPOOL 107d028eaa4ea9f0469994ca9fa3caab64fc33dd2c7228aa7784b04b89091352a6b086fe7123ddfbcc9900b1c1cadef4c08030d9b9a5b169a4be4441ff3a6f02 +DIST pgbouncer-1.5.5.tar.gz 336145 SHA256 d65a192d1e2e69bf445d536f10211857959fc38e0247d1974e8008253080e234 SHA512 fd31b25ab2c0fb206797d54cba42f221bf5d9d1bae76d8f0b77ae746b504b51640cab04d60589c7d96f275c50b98b8bdf854702981838b74c23ed7095d85e853 WHIRLPOOL 115a45a4c9e9589c4d872c9469619a7fa6199d8a010d090e530051867210ed5647565c93c118b83717fc70b73b99f6f1309815d767bbb768b46e1ab2b9378c29 diff --git a/dev-db/pgbouncer/files/logrotate b/dev-db/pgbouncer/files/logrotate new file mode 100644 index 000000000000..9617eafa66b0 --- /dev/null +++ b/dev-db/pgbouncer/files/logrotate @@ -0,0 +1,7 @@ +/var/log/pgbouncer/pgbouncer.log { + missingok + sharedscripts + postrotate + /etc/init.d/pgbouncer -q reload + endscript +}
\ No newline at end of file diff --git a/dev-db/pgbouncer/files/pgbouncer-dirs.patch b/dev-db/pgbouncer/files/pgbouncer-dirs.patch new file mode 100644 index 000000000000..62bcd0b84409 --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer-dirs.patch @@ -0,0 +1,26 @@ +diff -Naruw a/etc/pgbouncer.ini b/etc/pgbouncer.ini +--- a/etc/pgbouncer.ini 2012-06-10 19:57:01.000000000 +0000 ++++ b/etc/pgbouncer.ini 2013-07-17 02:25:59.598888628 +0000 +@@ -29,7 +29,7 @@ + ;;; + + logfile = /var/log/pgbouncer/pgbouncer.log +-pidfile = /var/run/pgbouncer/pgbouncer.pid ++pidfile = /run/pgbouncer/pgbouncer.pid + + ;;; + ;;; Where to wait for clients +@@ -40,10 +40,9 @@ + listen_port = 6432 + + ; unix socket is also used for -R. +-; On debian it should be /var/run/postgresql +-;unix_socket_dir = /tmp +-;unix_socket_mode = 0777 +-;unix_socket_group = ++unix_socket_dir = /run/postgresql ++unix_socket_mode = 0777 ++unix_socket_group = postgres + + ;;; + ;;; Authentication settings diff --git a/dev-db/pgbouncer/files/pgbouncer.confd b/dev-db/pgbouncer/files/pgbouncer.confd new file mode 100644 index 000000000000..e2c584011884 --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer.confd @@ -0,0 +1,12 @@ +# Location of configuration file for PgBouncer. +INIFILE="/etc/pgbouncer.ini" + +# How long to wait in seconds for a safe shutdown. Equivalent to +# issuing 'PAUSE;' and 'SHUTDOWN;' on psql console. (See 'man 1 pgbouncer'.) +NICE_TIMEOUT=60 + +# Set to 'YES' to perform an immediate shutdown if the nice shutdown +# doesn't work. Same as issuing 'SHUTDOWN;' on console. (See 'man 1 +# pgbouncer'.) +FORCE_QUIT="no" +FORCE_QUIT_TIMEOUT=2
\ No newline at end of file diff --git a/dev-db/pgbouncer/files/pgbouncer.initd b/dev-db/pgbouncer/files/pgbouncer.initd new file mode 100644 index 000000000000..f97481501aaf --- /dev/null +++ b/dev-db/pgbouncer/files/pgbouncer.initd @@ -0,0 +1,88 @@ +#!/sbin/runscript + +extra_started_commands="reload" + +depend() { + use net + after postgresql +} + +get_config() { + [ -f "${INIFILE}" ] || eend 1 "'${INIFILE}' not found" + + eval echo $(sed -e 's:;.*::' "${INIFILE}" | \ + awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') +} + +PIDFILE="$(get_config pidfile)" +UNIX_SOCKET_DIR="$(get_config unix_socket_dir)" + +prep() { + if [ -n "${UNIX_SOCKET_DIR}" ] ; then + checkpath -o postgres:postgres -m 0775 -d "${UNIX_SOCKET_DIR}" \ + || return 1 + fi + checkpath -o pgbouncer:postgres -m 0755 -d "$(dirname ${PIDFILE})" \ + || return 1 + checkpath -o pgbouncer:postgres -m 0644 -f "${PIDFILE}" \ + || return 1 + checkpath -o pgbouncer:postgres -m 0755 -d "$(dirname $(get_config logfile))" \ + || return 1 + checkpath -o pgbouncer:postgres -m 0640 -f "$(get_config logfile)" \ + || return 1 + + return 0 +} + +start() { + ebegin "Starting PgBouncer" + prep + local ret=$? + if [ $ret -ne 0 ] ; then + eend $ret + exit $ret + fi + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --user pgbouncer \ + --exec /usr/bin/pgbouncer -- -q -d "${INIFILE}" + eend $? +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${FORCE_QUIT_TIMEOUT} )) + ebegin "Stopping PgBouncer (this can take up to ${seconds} seconds)" + + local retries=SIGINT/${NICE_TIMEOUT} + + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + retries="${retries}/SIGTERM/${FORCE_QUIT_TIMEOUT}" + fi + + # Loops through nice and force quit in one go. + start-stop-daemon --stop \ + --pidfile ${PIDFILE} \ + --retry ${retries} + + eend $? +} + +restart() { + if [ -n "${UNIX_SOCKET_DIR}" ] ; then + ebegin "Performing online restart of PgBouncer" + start-stop-daemon --start \ + --pidfile ${PIDFILE} \ + --user pgbouncer \ + --exec /usr/bin/pgbouncer -- -q -d -R "${INIFILE}" + eend $? + else + stop && start + fi +} + +reload() { + ebegin "Reloading PgBouncer configuration from '${INIFILE}'" + start-stop-daemon --signal HUP --pidfile ${PIDFILE} + eend $? +} diff --git a/dev-db/pgbouncer/metadata.xml b/dev-db/pgbouncer/metadata.xml new file mode 100644 index 000000000000..f9bdcdbde21a --- /dev/null +++ b/dev-db/pgbouncer/metadata.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <herd>proxy-maintainers</herd> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Proxy-Maintainer, assign bugs</description> + </maintainer> + <maintainer> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> + <use> + <flag name="libevent">Use libevent 2.0+ and evdns as the DNS backend</flag> + <flag name="udns">Use udns as the DNS backend. Supports IPv4 only.</flag> + </use> +</pkgmetadata> diff --git a/dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild b/dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild new file mode 100644 index 000000000000..c6ed67e55048 --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.5.4-r1.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Upstream has *way* broken tests. +RESTRICT="test" + +inherit eutils user + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="http://pgfoundry.org/projects/pgbouncer/" +SRC_URI="mirror://postgresql/projects/pgFoundry/${PN}/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="debug doc libevent udns" +REQUIRED_USE=" + libevent? ( !udns ) + udns? ( !libevent ) +" +RDEPEND=" + >=sys-libs/glibc-2.10 + libevent? ( >=dev-libs/libevent-2.0 ) + udns? ( >=net-libs/udns-0.1 ) +" + +DEPEND=" + ${RDEPEND} + app-text/docbook-xml-dtd:4.5 + app-text/xmlto + >=app-text/asciidoc-8.4 +" + +pkg_setup() { + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + enewuser pgbouncer -1 -1 -1 postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgbouncer-dirs.patch" +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --docdir=/usr/share/doc/${PF} \ + --enable-debug \ + $(use_enable debug cassert) \ + $(use_with libevent) \ + $(use_with udns) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + doins etc/pgbouncer.ini + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" pgbouncer +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + fi +} diff --git a/dev-db/pgbouncer/pgbouncer-1.5.4.ebuild b/dev-db/pgbouncer/pgbouncer-1.5.4.ebuild new file mode 100644 index 000000000000..1d97ebd3a95b --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.5.4.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Upstream has *way* broken tests. +RESTRICT="test" + +inherit eutils user + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="http://pgfoundry.org/projects/pgbouncer/" +SRC_URI="mirror://postgresql/projects/pgFoundry/${PN}/${PN}/${PV}/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc libevent udns" +REQUIRED_USE=" + libevent? ( !udns ) + udns? ( !libevent ) +" +RDEPEND=" + >=sys-libs/glibc-2.10 + libevent? ( >=dev-libs/libevent-2.0 ) + udns? ( >=net-libs/udns-0.1 ) +" + +DEPEND=" + ${RDEPEND} + doc? ( + app-text/docbook-xml-dtd:4.5 + app-text/xmlto + >=app-text/asciidoc-8.4 + ) +" + +pkg_setup() { + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + enewuser pgbouncer -1 -1 -1 postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgbouncer-dirs.patch" +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --docdir=/usr/share/doc/${PF} \ + --enable-debug \ + $(use_enable debug cassert) \ + $(use_with libevent) \ + $(use_with udns) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + doins etc/pgbouncer.ini + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" pgbouncer +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + fi +} diff --git a/dev-db/pgbouncer/pgbouncer-1.5.5.ebuild b/dev-db/pgbouncer/pgbouncer-1.5.5.ebuild new file mode 100644 index 000000000000..a461bd5c2c11 --- /dev/null +++ b/dev-db/pgbouncer/pgbouncer-1.5.5.ebuild @@ -0,0 +1,84 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Upstream has *way* broken tests. +RESTRICT="test" + +inherit eutils user + +DESCRIPTION="Lightweight connection pooler for PostgreSQL" +HOMEPAGE="https://pgbouncer.github.io" +SRC_URI="https://pgbouncer.github.io/downloads/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc libevent udns" +REQUIRED_USE=" + libevent? ( !udns ) + udns? ( !libevent ) +" +RDEPEND=" + >=sys-libs/glibc-2.10 + libevent? ( >=dev-libs/libevent-2.0 ) + udns? ( >=net-libs/udns-0.1 ) +" + +DEPEND=" + ${RDEPEND} + app-text/docbook-xml-dtd:4.5 + app-text/xmlto + >=app-text/asciidoc-8.4 +" + +pkg_setup() { + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + enewuser pgbouncer -1 -1 -1 postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgbouncer-dirs.patch" +} + +src_configure() { + # --enable-debug is only used to disable stripping + econf \ + --docdir=/usr/share/doc/${PF} \ + --enable-debug \ + $(use_enable debug cassert) \ + $(use_with libevent) \ + $(use_with udns) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc AUTHORS + + newconfd "${FILESDIR}/${PN}.confd" "${PN}" + newinitd "${FILESDIR}/${PN}.initd" "${PN}" + + insinto /etc + doins etc/pgbouncer.ini + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate" pgbouncer +} + +pkg_postinst() { + if [[ -z ${REPLACING_VERSIONS} ]] ; then + einfo "Please read the config.txt for Configuration Directives" + einfo + einfo "For Administration Commands, see:" + einfo " man pgbouncer" + einfo + einfo "By default, PgBouncer does not have access to any database." + einfo "GRANT the permissions needed for your application and make sure that it" + einfo "exists in PgBouncer's auth_file." + fi +} diff --git a/dev-db/pgmemcache/Manifest b/dev-db/pgmemcache/Manifest new file mode 100644 index 000000000000..e45287d53336 --- /dev/null +++ b/dev-db/pgmemcache/Manifest @@ -0,0 +1,3 @@ +DIST pgmemcache-2.1.2.tar.gz 16685 SHA256 015bf72efd6e7bc392814e9ae49bc9c486e699e9dc80f0c437b42408b7155d67 SHA512 2be9aeef214f569473efcb849611e10c4fdb179e5cb8b1105f63fe0ab7bd829648a7891fd4e21109afc1b6375aeae0c2449a977a67631ee4d505e3faf83bc3f3 WHIRLPOOL 7f7c62400316da6c8ed2da0e1909ab8034e8f845d4b3d439fbdf54b310d8fe1100e7c487a3d7485a3e86358fe493bf1bb5107b4d0f4ab1091bf6467a04fe6eac +DIST pgmemcache-2.2.0.tar.gz 17742 SHA256 c16e062f6ae4ad9345b26ae0caf70e7169eb2a4fa316197b578a76095df5c5a2 SHA512 8d63aa25fec9c5f1895cf5107bbb261be2b35d5e05ac03e8fa59597ed18cf123c45aa0690eafeca4a26bdfabf61088bd1e2518c3fa13b683333b1ca0b5d8446f WHIRLPOOL a8a01bb98cb56ee3d0d19b2d7aeeeee38953c3310bafc2cd6737eb3114ceb78cd11d28626abb14114d92429cf1812a377b65470696fd4141a25253b0b9a92e0a +DIST pgmemcache-2.3.0.tar.gz 21135 SHA256 7f9f545c02e13c842b20a1cb387e209ec0fb654ebb083828bcf08023ed6657e2 SHA512 75ae3b7c9087078b2276ebadf66f9d419323927f6b8c8f61f8681fe939d086dbfe6aa935f20afa3acc11171e00329e5758a8a6a952cfbcf3aef45c8cc3f50a3b WHIRLPOOL 2aad23d17a357ddf1ff00ef0b99501d25ffb420e7250e338924281a94f686a360daad167d7d136934083b390fb191da016c17db448fcbbb1e37ba41e1c8addd1 diff --git a/dev-db/pgmemcache/metadata.xml b/dev-db/pgmemcache/metadata.xml new file mode 100644 index 000000000000..bccdfddea398 --- /dev/null +++ b/dev-db/pgmemcache/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + </maintainer> + <upstream> + <remote-id type="github">ohmu/pgmemcache</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/pgmemcache/pgmemcache-2.1.2.ebuild b/dev-db/pgmemcache/pgmemcache-2.1.2.ebuild new file mode 100644 index 000000000000..801b31b29598 --- /dev/null +++ b/dev-db/pgmemcache/pgmemcache-2.1.2.ebuild @@ -0,0 +1,20 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A PostgreSQL API based on libmemcached to interface with memcached" +HOMEPAGE="http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache" +SRC_URI="https://github.com/ohmu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-db/postgresql + dev-libs/cyrus-sasl + >=dev-libs/libmemcached-1.0.18[sasl]" +RDEPEND="${DEPEND}" + +DOCS=( NEWS README TODO ) diff --git a/dev-db/pgmemcache/pgmemcache-2.2.0.ebuild b/dev-db/pgmemcache/pgmemcache-2.2.0.ebuild new file mode 100644 index 000000000000..871ae8f9a4b4 --- /dev/null +++ b/dev-db/pgmemcache/pgmemcache-2.2.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A PostgreSQL API based on libmemcached to interface with memcached" +HOMEPAGE="http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache" +SRC_URI="https://github.com/ohmu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-db/postgresql + dev-libs/cyrus-sasl + >=dev-libs/libmemcached-1.0.18[sasl]" +RDEPEND="${DEPEND}" + +DOCS=( NEWS README TODO ) + +src_install() { + emake -j1 DESTDIR="${D}" install +} diff --git a/dev-db/pgmemcache/pgmemcache-2.3.0.ebuild b/dev-db/pgmemcache/pgmemcache-2.3.0.ebuild new file mode 100644 index 000000000000..ab530aec01fc --- /dev/null +++ b/dev-db/pgmemcache/pgmemcache-2.3.0.ebuild @@ -0,0 +1,24 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +DESCRIPTION="A PostgreSQL API based on libmemcached to interface with memcached" +HOMEPAGE="http://pgfoundry.org/projects/pgmemcache https://github.com/ohmu/pgmemcache" +SRC_URI="https://github.com/ohmu/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz" +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="dev-db/postgresql + dev-libs/cyrus-sasl + >=dev-libs/libmemcached-1.0.18[sasl]" +RDEPEND="${DEPEND}" + +DOCS=( NEWS README TODO ) + +src_install() { + emake -j1 DESTDIR="${D}" install +} diff --git a/dev-db/pgpool2/Manifest b/dev-db/pgpool2/Manifest new file mode 100644 index 000000000000..cbaabe77bc3c --- /dev/null +++ b/dev-db/pgpool2/Manifest @@ -0,0 +1,3 @@ +DIST pgpool-II-3.2.5.tar.gz 1643267 SHA256 aecac952fd3d292584c9aa359d72f89b144c29f45c9f848cb030e46215a814f7 SHA512 c6dd033462de7f56724f7416fca3ee3e25835f113604fb03b97deee2e3ab25a07cfd9aea33ec36211aa0ec41c2bcea31ca9befe0cfe8f6389a39c2f6495388b6 WHIRLPOOL 5db077d51c5aa8692ba23c0f5ad3b3291c42448724cf633db13850d9b22df256c2aedc15b95fe74a33e486e09f4cc6a37daed0d39becff38acd40fa52b78ab8d +DIST pgpool-II-3.3.6.tar.gz 1812394 SHA256 8e0a9829122ed96793b4c340799d62778eb4176ee0f93288d8d4100fc620ff0e SHA512 64edf6ee96fc18bccaf72e79dc165318587da49f45f7d9748e051a9b87f1938b79eefc020a70f1be31fdf922e6d646710105d97961aef1e0c1538b29cdb0575c WHIRLPOOL a4bfc20115e3a17474e9d57c5abec48ca613568f9e5dcea171a39a114dc5ef3ad59ecd7fba4f0cad703bf6f3dcf7fb1d9dea7b30faa818403bf450f8df10a7c3 +DIST pgpool-II-3.3.7.tar.gz 1808677 SHA256 b1bfc8c48be252f6c4e54521d24a0e28e86d0027b18aa4ccf6b8405508319032 SHA512 814f8a59ed8488a3ab049cc31ee4579ec954672f4cbca9102d8aa4d18dd2c169fd16518461cbcab24c28394c629234c54d9799d6df9f3ffdf0c57c56dfb2d094 WHIRLPOOL b8ca5e6689d1ac947b2da45c601c3206653b9ae5a181bd63f667a3df6ceecc012621ba4349671caa2e0d1ad371409e046b278e9a6b558786aa7ceed6583ccd9f diff --git a/dev-db/pgpool2/files/pgpool2.confd b/dev-db/pgpool2/files/pgpool2.confd new file mode 100644 index 000000000000..b2dd2a69e02e --- /dev/null +++ b/dev-db/pgpool2/files/pgpool2.confd @@ -0,0 +1,17 @@ +# NICE_QUIT ignores new connections and wait for clients to disconnect from +# server before shutting down. NICE_TIMEOUT in seconds determines how long to +# wait for this to succeed. +NICE_TIMEOUT=60 + +# Forecfully disconnect clients from server and shut down. This is performed +# after NICE_QUIT. Terminated client connections have their open transactions +# rolled back. +# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds. +RUDE_QUIT="YES" +RUDE_TIMEOUT=30 + +# If the server still fails to shutdown, you can force it to quit by setting +# this to YES. +# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds. +FORCE_QUIT="NO" +FORCE_TIMEOUT=2
\ No newline at end of file diff --git a/dev-db/pgpool2/files/pgpool2.initd b/dev-db/pgpool2/files/pgpool2.initd new file mode 100644 index 000000000000..e2bb1870153a --- /dev/null +++ b/dev-db/pgpool2/files/pgpool2.initd @@ -0,0 +1,83 @@ +#!/sbin/runscript +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +CONFIGFILE="/etc/pgpool2/pgpool.conf" +LOGFILE="/var/log/pgpool2.log" + +depend() { + use net + use postgresql + after logger +} + +get_config() { + [ -f ${CONFIGFILE} ] || return 1 + + eval echo $(sed -e 's:#.*::' ${CONFIGFILE} | \ + awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') +} + +PIDFILE="$(get_config pid_file_name)" +: ${PIDFILE:='/run/pgpool/pgpool.pid'} + +prep() { + # $logdir contains status file(s), not log files. + local logdir=$(get_config logdir) + local socket_dir=$(get_config socket_dir) + local pcp_socket_dir=$(get_config pcp_socket_dir) + + checkpath -o pgpool:postgres -m 0770 -d $(dirname ${PIDFILE}) || return 1 + checkpath -o pgpool:postgres -m 0770 -d ${logdir:-'/run/pgpool'} || return 1 + checkpath -o pgpool:postgres -m 0660 -f ${LOGFILE} || return 1 + checkpath -o postgres:postgres -m 0770 \ + -d ${socket_dir:-'/run/postgresql'} || return 1 + checkpath -o postgres:postgres -m 0770 \ + -d ${pcp_socket_dir:-'/run/postgresql'} || return 1 +} + +start() { + prep || return 1 + + ebegin "Starting pgpool2" + + start-stop-daemon --start \ + --user pgpool:postgres \ + --pidfile ${PIDFILE} \ + --exec /usr/bin/pgpool + + eend +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) + ebegin "Stopping pgpool (this can take up to ${seconds} seconds)" + + local retval + local retries=SIGTERM/${NICE_TIMEOUT} + + if [ "${RUDE_QUIT}" != "NO" ] ; then + einfo "RUDE_QUIT enabled." + retries="${retries}/SIGINT/${RUDE_TIMEOUT}" + fi + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + ewarn "A recover-run might be executed on next startup." + retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" + fi + + # Loops through nice, rude, and force quit in one go. + start-stop-daemon --stop \ + --pidfile ${PIDFILE} \ + --retry ${retries} + + eend +} + +reload() { + start-stop-daemon --signal HUP \ + --pidfile ${PIDFILE} +} diff --git a/dev-db/pgpool2/files/pgpool_run_paths.patch b/dev-db/pgpool2/files/pgpool_run_paths.patch new file mode 100644 index 000000000000..a1912af15e4c --- /dev/null +++ b/dev-db/pgpool2/files/pgpool_run_paths.patch @@ -0,0 +1,180 @@ +diff -Naurw a/pgpool.conf.sample b/pgpool.conf.sample +--- a/pgpool.conf.sample 2012-07-19 03:06:21.000000000 -0400 ++++ b/pgpool.conf.sample 2012-08-14 07:33:39.200695855 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -43,10 +41,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -176,10 +172,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '@PGPOOL_SOCKETDIR@' + # Directory of pgPool status file + # (change requires restart) + +diff -Naurw a/pgpool.conf.sample-master-slave b/pgpool.conf.sample-master-slave +--- a/pgpool.conf.sample-master-slave 2012-07-16 22:56:37.000000000 -0400 ++++ b/pgpool.conf.sample-master-slave 2012-08-14 07:33:39.201695842 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -43,10 +41,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -176,10 +172,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '@PGPOOL_SOCKETDIR@' + # Directory of pgPool status file + # (change requires restart) + +diff -Naurw a/pgpool.conf.sample-replication b/pgpool.conf.sample-replication +--- a/pgpool.conf.sample-replication 2012-07-16 22:56:37.000000000 -0400 ++++ b/pgpool.conf.sample-replication 2012-08-14 07:33:39.202695830 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -43,10 +41,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -176,10 +172,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '@PGPOOL_SOCKETDIR@' + # Directory of pgPool status file + # (change requires restart) + +diff -Naurw a/pgpool.conf.sample-stream b/pgpool.conf.sample-stream +--- a/pgpool.conf.sample-stream 2012-07-16 22:56:37.000000000 -0400 ++++ b/pgpool.conf.sample-stream 2012-08-14 07:33:39.203695818 -0400 +@@ -31,10 +31,8 @@ + port = 9999 + # Port number + # (change requires restart) +-socket_dir = '/tmp' ++socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + +@@ -43,10 +41,8 @@ + pcp_port = 9898 + # Port number for pcp + # (change requires restart) +-pcp_socket_dir = '/tmp' ++pcp_socket_dir = '@PGSQL_SOCKETDIR@' + # Unix domain socket path for pcp +- # The Debian package defaults to +- # /var/run/postgresql + # (change requires restart) + + # - Backend Connection Settings - +@@ -176,10 +172,10 @@ + # FILE LOCATIONS + #------------------------------------------------------------------------------ + +-pid_file_name = '/var/run/pgpool/pgpool.pid' ++pid_file_name = '@PGPOOL_SOCKETDIR@/pgpool.pid' + # PID file name + # (change requires restart) +-logdir = '/tmp' ++logdir = '@PGPOOL_SOCKETDIR@' + # Directory of pgPool status file + # (change requires restart) + +diff -Naurw a/pool.h b/pool.h +--- a/pool.h 2012-07-02 00:09:18.000000000 -0400 ++++ b/pool.h 2012-08-14 07:26:56.005764702 -0400 +@@ -61,13 +61,13 @@ + #define HBA_CONF_FILE_NAME "pool_hba.conf" + + /* pid file directory */ +-#define DEFAULT_LOGDIR "/tmp" ++#define DEFAULT_LOGDIR "@PGPOOL_SOCKETDIR@" + + /* Unix domain socket directory */ +-#define DEFAULT_SOCKET_DIR "/tmp" ++#define DEFAULT_SOCKET_DIR "@PGSQL_SOCKETDIR@" + + /* pid file name */ +-#define DEFAULT_PID_FILE_NAME "/var/run/pgpool/pgpool.pid" ++#define DEFAULT_PID_FILE_NAME "@PGPOOL_SOCKETDIR@/pgpool.pid" + + /* status file name */ + #define STATUS_FILE_NAME "pgpool_status" diff --git a/dev-db/pgpool2/metadata.xml b/dev-db/pgpool2/metadata.xml new file mode 100644 index 000000000000..d724a3dd009d --- /dev/null +++ b/dev-db/pgpool2/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <use> + <flag name='memcached'>Use memcached for query caching.</flag> + </use> +</pkgmetadata> diff --git a/dev-db/pgpool2/pgpool2-3.2.5.ebuild b/dev-db/pgpool2/pgpool2-3.2.5.ebuild new file mode 100644 index 000000000000..9c9035cbf125 --- /dev/null +++ b/dev-db/pgpool2/pgpool2-3.2.5.ebuild @@ -0,0 +1,107 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +MY_P="${PN/2/-II}-${PV}" + +inherit base user + +DESCRIPTION="Connection pool server for PostgreSQL" +HOMEPAGE="http://www.pgpool.net/" +SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" + +KEYWORDS="~amd64 ~x86" + +IUSE="memcached pam ssl static-libs" + +RDEPEND=" + dev-db/postgresql + memcached? ( dev-libs/libmemcached ) + pam? ( sys-auth/pambase ) + ssl? ( dev-libs/openssl ) +" +DEPEND="${RDEPEND} + sys-devel/bison + !!dev-db/pgpool +" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup postgres 70 + enewuser pgpool -1 -1 -1 postgres + + # We need the postgres user as well so we can set the proper + # permissions on the sockets without getting into fights with + # PostgreSQL's initialization scripts. + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgpool_run_paths.patch" + + local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h" + local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \ + sed 's|.*\"\(.*\)\"|\1|g') + local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool" + + sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \ + -i *.conf.sample* pool.h || die + + sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \ + -i *.conf.sample* pool.h || die +} + +src_configure() { + local myconf + use memcached && \ + myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\"" + use pam && myconf+=' --with-pam' + + econf \ + --disable-rpath \ + --sysconfdir="${EROOT%/}/etc/${PN}" \ + $(use_with ssl openssl) \ + $(use_enable static-libs static) \ + ${myconf} +} + +src_compile() { + emake + + emake -C sql +} + +src_install() { + emake DESTDIR="${D}" install + + emake DESTDIR="${D}" -C sql install + cd "${S}" + + # `contrib' moved to `extension' with PostgreSQL 9.1 + local pgslot=$(postgresql-config show) + if [[ ${pgslot//.} > 90 ]] ; then + cd "${ED%/}$(pg_config --sharedir)" + mv contrib extension || die + cd "${S}" + fi + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + # Documentation + dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg} + dohtml -r doc + + # Examples and extras + insinto "/usr/share/${PN}" + doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample} + mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die + + # One more thing: Evil la files! + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/pgpool2/pgpool2-3.3.6.ebuild b/dev-db/pgpool2/pgpool2-3.3.6.ebuild new file mode 100644 index 000000000000..c2cff651ead3 --- /dev/null +++ b/dev-db/pgpool2/pgpool2-3.3.6.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_P="${PN/2/-II}-${PV}" + +inherit base user + +DESCRIPTION="Connection pool server for PostgreSQL" +HOMEPAGE="http://www.pgpool.net/" +SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" + +KEYWORDS="~amd64 ~x86" + +IUSE="memcached pam ssl static-libs" + +RDEPEND=" + dev-db/postgresql + memcached? ( dev-libs/libmemcached ) + pam? ( sys-auth/pambase ) + ssl? ( dev-libs/openssl ) +" +DEPEND="${RDEPEND} + sys-devel/bison + !!dev-db/pgpool +" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup postgres 70 + enewuser pgpool -1 -1 -1 postgres + + # We need the postgres user as well so we can set the proper + # permissions on the sockets without getting into fights with + # PostgreSQL's initialization scripts. + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgpool_run_paths.patch" + + local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h" + local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \ + sed 's|.*\"\(.*\)\"|\1|g') + local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool" + + sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \ + -i *.conf.sample* pool.h || die + + sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \ + -i *.conf.sample* pool.h || die +} + +src_configure() { + local myconf + use memcached && \ + myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\"" + use pam && myconf+=' --with-pam' + + econf \ + --disable-rpath \ + --sysconfdir="${EROOT%/}/etc/${PN}" \ + $(use_with ssl openssl) \ + $(use_enable static-libs static) \ + ${myconf} +} + +src_compile() { + emake + + emake -C sql +} + +src_install() { + emake DESTDIR="${D}" install + + emake DESTDIR="${D}" -C sql install + cd "${S}" + + # 3.3 appears to have removed this + # `contrib' moved to `extension' with PostgreSQL 9.1 + #local pgslot=$(postgresql-config show) + #if [[ ${pgslot//.} > 90 ]] ; then + # cd "${ED%/}$(pg_config --sharedir)" + # mv contrib extension || die + # cd "${S}" + #fi + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + # Documentation + dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg} + dohtml -r doc + + # Examples and extras + insinto "/usr/share/${PN}" + doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample} + mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die + + # One more thing: Evil la files! + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/pgpool2/pgpool2-3.3.7.ebuild b/dev-db/pgpool2/pgpool2-3.3.7.ebuild new file mode 100644 index 000000000000..c2cff651ead3 --- /dev/null +++ b/dev-db/pgpool2/pgpool2-3.3.7.ebuild @@ -0,0 +1,108 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_P="${PN/2/-II}-${PV}" + +inherit base user + +DESCRIPTION="Connection pool server for PostgreSQL" +HOMEPAGE="http://www.pgpool.net/" +SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" + +KEYWORDS="~amd64 ~x86" + +IUSE="memcached pam ssl static-libs" + +RDEPEND=" + dev-db/postgresql + memcached? ( dev-libs/libmemcached ) + pam? ( sys-auth/pambase ) + ssl? ( dev-libs/openssl ) +" +DEPEND="${RDEPEND} + sys-devel/bison + !!dev-db/pgpool +" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup postgres 70 + enewuser pgpool -1 -1 -1 postgres + + # We need the postgres user as well so we can set the proper + # permissions on the sockets without getting into fights with + # PostgreSQL's initialization scripts. + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgpool_run_paths.patch" + + local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h" + local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \ + sed 's|.*\"\(.*\)\"|\1|g') + local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool" + + sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \ + -i *.conf.sample* pool.h || die + + sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \ + -i *.conf.sample* pool.h || die +} + +src_configure() { + local myconf + use memcached && \ + myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\"" + use pam && myconf+=' --with-pam' + + econf \ + --disable-rpath \ + --sysconfdir="${EROOT%/}/etc/${PN}" \ + $(use_with ssl openssl) \ + $(use_enable static-libs static) \ + ${myconf} +} + +src_compile() { + emake + + emake -C sql +} + +src_install() { + emake DESTDIR="${D}" install + + emake DESTDIR="${D}" -C sql install + cd "${S}" + + # 3.3 appears to have removed this + # `contrib' moved to `extension' with PostgreSQL 9.1 + #local pgslot=$(postgresql-config show) + #if [[ ${pgslot//.} > 90 ]] ; then + # cd "${ED%/}$(pg_config --sharedir)" + # mv contrib extension || die + # cd "${S}" + #fi + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + # Documentation + dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg} + dohtml -r doc + + # Examples and extras + insinto "/usr/share/${PN}" + doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample} + mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die + + # One more thing: Evil la files! + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/pgpool2/pgpool2-9999.ebuild b/dev-db/pgpool2/pgpool2-9999.ebuild new file mode 100644 index 000000000000..4c518f713e6c --- /dev/null +++ b/dev-db/pgpool2/pgpool2-9999.ebuild @@ -0,0 +1,117 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +[[ ${PV} == 9999 ]] && MY_P=${PN/2/-II} || MY_P="${PN/2/-II}-${PV}" + +ECVS_SERVER="cvs.pgfoundry.org:/cvsroot/pgpool" +ECVS_MODULE="pgpool-II" +[[ ${PV} == 9999 ]] && SCM_ECLASS="cvs" +inherit base user ${SCM_ECLASS} +unset SCM_ECLASS + +DESCRIPTION="Connection pool server for PostgreSQL" +HOMEPAGE="http://www.pgpool.net/" +[[ ${PV} == 9999 ]] || SRC_URI="http://www.pgpool.net/download.php?f=${MY_P}.tar.gz -> ${MY_P}.tar.gz" +LICENSE="BSD" +SLOT="0" + +# Don't move KEYWORDS on the previous line or ekeyword won't work # 399061 +[[ ${PV} == 9999 ]] || \ +KEYWORDS="~amd64 ~x86" + +IUSE="memcached pam ssl static-libs" + +RDEPEND=" + dev-db/postgresql + memcached? ( dev-libs/libmemcached ) + pam? ( sys-auth/pambase ) + ssl? ( dev-libs/openssl ) +" +DEPEND="${RDEPEND} + sys-devel/bison + !!dev-db/pgpool +" + +AUTOTOOLS_IN_SOURCE_BUILD="1" + +S=${WORKDIR}/${MY_P} + +pkg_setup() { + enewgroup postgres 70 + enewuser pgpool -1 -1 -1 postgres + + # We need the postgres user as well so we can set the proper + # permissions on the sockets without getting into fights with + # PostgreSQL's initialization scripts. + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres +} + +src_prepare() { + epatch "${FILESDIR}/pgpool_run_paths.patch" + + local pg_config_manual="$(pg_config --includedir)/pg_config_manual.h" + local pgsql_socket_dir=$(grep DEFAULT_PGSOCKET_DIR "${pg_config_manual}" | \ + sed 's|.*\"\(.*\)\"|\1|g') + local pgpool_socket_dir="$(dirname $pgsql_socket_dir)/pgpool" + + sed "s|@PGSQL_SOCKETDIR@|${pgsql_socket_dir}|g" \ + -i *.conf.sample* pool.h || die + + sed "s|@PGPOOL_SOCKETDIR@|${pgpool_socket_dir}|g" \ + -i *.conf.sample* pool.h || die +} + +src_configure() { + local myconf + use memcached && \ + myconf="--with-memcached=\"${EROOT%/}/usr/include/libmemcached\"" + use pam && myconf+=' --with-pam' + + econf \ + --disable-rpath \ + --sysconfdir="${EROOT%/}/etc/${PN}" \ + $(use_with ssl openssl) \ + $(use_enable static-libs static) \ + ${myconf} +} + +src_compile() { + emake + + cd sql + emake +} + +src_install() { + emake DESTDIR="${D}" install + + cd sql + emake DESTDIR="${D}" install + cd "${S}" + + # `contrib' moved to `extension' with PostgreSQL 9.1 + local pgslot=$(postgresql-config show) + if [[ ${pgslot//.} > 90 ]] ; then + cd "${ED%/}$(pg_config --sharedir)" + mv contrib extension || die + cd "${S}" + fi + + newinitd "${FILESDIR}/${PN}.initd" ${PN} + newconfd "${FILESDIR}/${PN}.confd" ${PN} + + # Documentation + dodoc NEWS TODO doc/where_to_send_queries.{pdf,odg} + dohtml -r doc + + # Examples and extras + insinto "/usr/share/${PN}" + doins doc/{pgpool_remote_start,basebackup.sh,recovery.conf.sample} + mv "${ED%/}/usr/share/${PN/2/-II}" "${ED%/}/usr/share/${PN}" || die + + # One more thing: Evil la files! + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/pgrouting/Manifest b/dev-db/pgrouting/Manifest new file mode 100644 index 000000000000..602175e5e41b --- /dev/null +++ b/dev-db/pgrouting/Manifest @@ -0,0 +1 @@ +DIST pgrouting-2.0.0.tar.gz 3765933 SHA256 606309e8ece04abec062522374b48179c16bddb30dd4c5080b89a4298e8d163b SHA512 4a74cc1ce1bbbb8d95ae2aabc712e30c97e0418b1e4f28a255ecd9e57577bd7081a52e6e64a63cb06c9ca659271273b37bdbefb94d49e69b9c2ce45e96911884 WHIRLPOOL ce7492fe1512f7829bd887a7acaadc6c276719fc7e00ceb68a702a2476a9464c83bf929ef78381c8d36a6575dee21587c204f798511e1430731064c2c48a0815 diff --git a/dev-db/pgrouting/files/no-contrib-when-use-extension.patch b/dev-db/pgrouting/files/no-contrib-when-use-extension.patch new file mode 100644 index 000000000000..e26af3ef0da3 --- /dev/null +++ b/dev-db/pgrouting/files/no-contrib-when-use-extension.patch @@ -0,0 +1,76 @@ +diff -Naur pgrouting-2.0.0.orig/CMakeLists.txt pgrouting-2.0.0/CMakeLists.txt +--- pgrouting-2.0.0.orig/CMakeLists.txt 2013-09-24 16:38:31.000000000 -0400 ++++ pgrouting-2.0.0/CMakeLists.txt 2014-11-07 06:48:11.555026180 -0500 +@@ -170,16 +170,13 @@ + OUTPUT_VARIABLE SHARE_DIR) + + if(SHARE_DIR) +- # Always install in "contrib" directory of PostgreSQL +- set(CONTRIB_DIR "${SHARE_DIR}/contrib/pgrouting-${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}") +- message(STATUS "Contrib directory for SQL files is set to ${CONTRIB_DIR}") +- + # Install as extension if supported by the version of PostgreSQL + if(USE_PG_EXTENSION) + set(SHARE_DIR "${SHARE_DIR}/extension") + message(STATUS "Extension directory for SQL files is set to ${SHARE_DIR}") +- #else(USE_PG_EXTENSION) +- # set(SHARE_DIR "/usr/share/pgrouting") ++ else(USE_PG_EXTENSION) ++ set(CONTRIB_DIR "${SHARE_DIR}/contrib/pgrouting-${PGROUTING_VERSION_MAJOR}.${PGROUTING_VERSION_MINOR}") ++ message(STATUS "Contrib directory for SQL files is set to ${CONTRIB_DIR}") + endif(USE_PG_EXTENSION) + else(SHARE_DIR) + message(FATAL_ERROR "pg_config --sharedir failed to return a value. Please check your PostgreSQL installation!") +@@ -347,22 +344,24 @@ + + install(FILES ${LIBS_TO_INSTALL} DESTINATION ${LIB_DIR}) + +-install(FILES ++if(USE_PG_EXTENSION) ++ install(FILES + "${CMAKE_BINARY_DIR}/lib/pgrouting--${PGROUTING_VERSION_STRING}.sql" + "${CMAKE_BINARY_DIR}/lib/pgrouting.control" + "${CMAKE_BINARY_DIR}/lib/pgrouting_legacy.sql" + DESTINATION "${SHARE_DIR}") +- +-# The following probably could be done better +-# The idea is to also have a "pgrouting-x.x" directory in PostgreSQL contrib +-configure_file("${CMAKE_BINARY_DIR}/lib/pgrouting--${PGROUTING_VERSION_STRING}.sql" ++else(USE_PG_EXTENSION) ++ # The following probably could be done better ++ # The idea is to also have a "pgrouting-x.x" directory in PostgreSQL contrib ++ configure_file("${CMAKE_BINARY_DIR}/lib/pgrouting--${PGROUTING_VERSION_STRING}.sql" + "${CMAKE_BINARY_DIR}/lib/pgrouting.sql" COPYONLY) + +-install(FILES ++ install(FILES + "${CMAKE_BINARY_DIR}/lib/pgrouting.sql" + "${CMAKE_BINARY_DIR}/lib/pgrouting.control" + "${CMAKE_BINARY_DIR}/lib/pgrouting_legacy.sql" + DESTINATION "${CONTRIB_DIR}") ++endif(USE_PG_EXTENSION) + + # TODO: The following probably should be done better + if(WITH_DD) +@@ -372,12 +371,14 @@ + configure_file("${PGROUTING_SOURCE_DIR}/src/driving_distance/sql/routing_dd_legacy.sql" + "${CMAKE_BINARY_DIR}/lib/pgrouting_dd_legacy.sql" COPYONLY) + +- install(FILES +- "${CMAKE_BINARY_DIR}/lib/pgrouting_dd_legacy.sql" +- DESTINATION "${SHARE_DIR}") +- +- install(FILES +- "${CMAKE_BINARY_DIR}/lib/pgrouting_dd_legacy.sql" +- DESTINATION "${CONTRIB_DIR}") ++ if(USE_PG_EXTENSION) ++ install(FILES ++ "${CMAKE_BINARY_DIR}/lib/pgrouting_dd_legacy.sql" ++ DESTINATION "${SHARE_DIR}") ++ else(USE_PG_EXTENSION) ++ install(FILES ++ "${CMAKE_BINARY_DIR}/lib/pgrouting_dd_legacy.sql" ++ DESTINATION "${CONTRIB_DIR}") ++ endif(USE_PG_EXTENSION) + endif(WITH_DD) + diff --git a/dev-db/pgrouting/metadata.xml b/dev-db/pgrouting/metadata.xml new file mode 100644 index 000000000000..fb3e2b441365 --- /dev/null +++ b/dev-db/pgrouting/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <use> + <flag name="html">Install HTML formatted documentation</flag> + <flag name="drivingdistance">Enable to calculate driving distance</flag> + </use> + <upstream> + <remote-id type="github">pgRouting/pgrouting</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/pgrouting/pgrouting-2.0.0.ebuild b/dev-db/pgrouting/pgrouting-2.0.0.ebuild new file mode 100644 index 000000000000..5ef7d558993d --- /dev/null +++ b/dev-db/pgrouting/pgrouting-2.0.0.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4} ) + +inherit eutils cmake-utils + +DESCRIPTION="pgRouting extends PostGIS and PostgreSQL with geospatial routing functionality." +HOMEPAGE="http://pgrouting.org/index.html" +LICENSE="GPL-2 MIT Boost-1.0" + +SLOT="0" +KEYWORDS="~amd64 ~x86" +SRC_URI="https://github.com/pgRouting/pgrouting/archive/v${PV}.tar.gz -> ${PN}-${PV}.tar.gz" +IUSE="+drivingdistance doc pdf html" + +REQUIRED_USE="html? ( doc ) pdf? ( doc )" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + >=dev-db/postgis-2.0 + dev-libs/boost + drivingdistance? ( sci-mathematics/cgal ) +" + +DEPEND=" + doc? ( >=dev-python/sphinx-1.1 ) + pdf? ( >=dev-python/sphinx-1.1[latex] ) +" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" +CMAKE_MIN_VERSION="2.8.8" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_pretend() { + postgres_check_slot || die +} + +pkg_setup() { + postgres_check_slot || die +} + +src_prepare() { + epatch "${FILESDIR}/no-contrib-when-use-extension.patch" +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_with drivingdistance DD) + $(cmake-utils_use_with doc DOC) + $(cmake-utils_use_build doc MAN) + $(cmake-utils_use_build html HTML) + $(cmake-utils_use_build pdf LATEX) + ) + + cmake-utils_src_configure +} + +src_compile() { + local make_opts + use doc && make_opts="all doc" + cmake-utils_src_make ${make_opts} +} + +src_install() { + use doc && doman "${BUILD_DIR}"/doc/man/en/pgrouting.7 + use html && dohtml -r "${BUILD_DIR}"/doc/html/* + use pdf && dodoc "${BUILD_DIR}"/doc/latex/en/*.pdf + + dodoc README* VERSION + + cmake-utils_src_install +} diff --git a/dev-db/pgtap/Manifest b/dev-db/pgtap/Manifest new file mode 100644 index 000000000000..1145ca06be0c --- /dev/null +++ b/dev-db/pgtap/Manifest @@ -0,0 +1 @@ +DIST pgtap-0.93.0.zip 219355 SHA256 d1fa168b5d089d031552103c985d1f4b681659ece2f976d27c070ad26f6c1d4c SHA512 6165f8bd107168a3955c3ec4c63277ce9fce31d7c375fdfe13cb31b7df71cb9aae4b20a1c2d961fba97e3ae207b45b8daf9174f0701a220e52f4ffb53dddea94 WHIRLPOOL 2352e71e004ad9486d6a5ed3b6c5967613caa06ea657af7394ea37249f16f266e611b64d3d2106bc737bf10e9810613b67f9eb79faadc578ca3ff16cd132a263 diff --git a/dev-db/pgtap/files/pgtap-pg_config_override.patch b/dev-db/pgtap/files/pgtap-pg_config_override.patch new file mode 100644 index 000000000000..2034b233f00c --- /dev/null +++ b/dev-db/pgtap/files/pgtap-pg_config_override.patch @@ -0,0 +1,25 @@ +diff -Naurw pgtap-0.93.0.orig/Makefile pgtap-0.93.0/Makefile +--- pgtap-0.93.0.orig/Makefile 2013-01-28 20:14:20.000000000 +0000 ++++ pgtap-0.93.0/Makefile 2013-03-30 16:02:45.077880109 +0000 +@@ -9,14 +9,15 @@ + DOCS = doc/pgtap.mmd + REGRESS = $(patsubst test/sql/%.sql,%,$(TESTS)) + REGRESS_OPTS = --inputdir=test --load-language=plpgsql ++ifndef PG_CONFIG + PG_CONFIG = pg_config ++endif + + ifdef NO_PGXS + top_builddir = ../.. + PG_CONFIG := $(top_builddir)/src/bin/pg_config/pg_config + else + # Run pg_config to get the PGXS Makefiles +-PG_CONFIG = pg_config + PGXS := $(shell $(PG_CONFIG) --pgxs) + endif + +@@ -145,4 +146,3 @@ + MultiMarkdown.pl doc/pgtap.mmd > doc/pgtap.html + ./tocgen doc/pgtap.html 2> doc/toc.html + perl -MPod::Simple::XHTML -E "my \$$p = Pod::Simple::XHTML->new; \$$p->html_header_tags('<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">'); \$$p->strip_verbatim_indent(sub { (my \$$i = \$$_[0]->[0]) =~ s/\\S.*//; \$$i }); \$$p->parse_from_file('`perldoc -l pg_prove`')" > doc/pg_prove.html +- diff --git a/dev-db/pgtap/metadata.xml b/dev-db/pgtap/metadata.xml new file mode 100644 index 000000000000..a674b19eabe6 --- /dev/null +++ b/dev-db/pgtap/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <maintainer> + <email>titanofold@gentoo.org</email> + <name>Aaron W. Swenson</name> + </maintainer> + <longdescription> + pgTAP is a suite of database functions that make it easy to write + TAP-emitting unit tests in psql scripts or xUnit-style test functions. + </longdescription> +</pkgmetadata> diff --git a/dev-db/pgtap/pgtap-0.93.0.ebuild b/dev-db/pgtap/pgtap-0.93.0.ebuild new file mode 100644 index 000000000000..2d4b6d886206 --- /dev/null +++ b/dev-db/pgtap/pgtap-0.93.0.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils + +DESCRIPTION="Unit testing for PostgreSQL" +HOMEPAGE="http://pgtap.org/" +SRC_URI="http://api.pgxn.org/dist/${PN}/${PV}/${P}.zip" + +LICENSE="POSTGRESQL" +SLOT="0" +KEYWORDS="amd64" +IUSE="" + +DEPEND=">=dev-db/postgresql-8.4 + dev-perl/TAP-Parser-SourceHandler-pgTAP +" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/pgtap-pg_config_override.patch" + + local pgslots=$(eselect --brief postgresql list) + local pgslot + for pgslot in ${pgslots} ; do + mkdir -p "${WORKDIR}/${pgslot}" + cp -R "${S}" "${WORKDIR}/${pgslot}" + done +} + +src_configure() { + : +} + +src_compile() { + local pgslots=$(eselect --brief postgresql list) + local pgslot + for pgslot in ${pgslots} ; do + cd "${WORKDIR}/${pgslot}/${P}" + PG_CONFIG="pg_config${pgslot//.}" emake + done +} + +src_install() { + local pgslots=$(eselect --brief postgresql list) + local pgslot + for pgslot in ${pgslots} ; do + cd "${WORKDIR}/${pgslot}/${P}" + PG_CONFIG="pg_config${pgslot//.}" emake DESTDIR="${D}" install + done +} diff --git a/dev-db/pgxnclient/Manifest b/dev-db/pgxnclient/Manifest new file mode 100644 index 000000000000..9425b0cea5b2 --- /dev/null +++ b/dev-db/pgxnclient/Manifest @@ -0,0 +1,2 @@ +DIST pgxnclient-1.2.1.tar.gz 87275 SHA256 8e3022bc960aa5d5fc7d4c564786087693a1a99f15e025ad920fc0aa378e1d67 SHA512 3fa864b1ebb5dedaf75515b5efe4c453f02acff558f7b82d2648da62e58c93e050049a7688171a69593784d9963bb62f4ad3674d526284554dbeb4f4a4ea1dbf WHIRLPOOL f0e5df1e841a8da59a0fed16643e30120c188813c69307e2db6055c25d4298368a56c89f08dd54edbb6c6dbc1a8676a462fc9fe1b7982c8334d2c6af040d0d99 +DIST pgxnclient-1.2.tar.gz 86436 SHA256 ad3768d1ed83ea3af8a3ad9abf11fd164dbdeb355371819bce072dc581f43c42 SHA512 d677f8d5346caf4de5d7e0d4e4031b8bdd932e343af7fc33e8895ebe51b1e9e6a11d7300d9e98ddc10242854f7d39c0a4196f41938e42f0b0e5158454e386deb WHIRLPOOL fcb76ce45b4898a56f2ee99317874b1cbecafc67d37d1edabc55c9f6bea644d757ac1ab396fc5f3d0a8d98040e2f70211d3a712a8219c1ba2da23c4fa22b41fa diff --git a/dev-db/pgxnclient/metadata.xml b/dev-db/pgxnclient/metadata.xml new file mode 100644 index 000000000000..0c269f078c8d --- /dev/null +++ b/dev-db/pgxnclient/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <maintainer> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> + <upstream> + <remote-id type="pypi">pgxnclient</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild b/dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild new file mode 100644 index 000000000000..86572ccdd8a7 --- /dev/null +++ b/dev-db/pgxnclient/pgxnclient-1.2-r1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) + +inherit distutils-r1 + +DESCRIPTION="PostgreSQL Extension Network Client" +HOMEPAGE="http://pgxnclient.projects.postgresql.org/ http://pypi.python.org/pypi/${PN}" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + +LICENSE="BSD" +SLOT="0" +IUSE="test" + +RDEPEND=">=dev-db/postgresql-9.1[server]" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +python_test() { + # suite written onlt for py2 + pushd ${PN} > /dev/null + if ! python_is_python3; then + PYTHONPATH=../ "${PYTHON}" -m unittest discover || die "tests failed" + fi + popd > dev/null +} diff --git a/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild b/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild new file mode 100644 index 000000000000..32238af0f3cb --- /dev/null +++ b/dev-db/pgxnclient/pgxnclient-1.2.1.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +PYTHON_COMPAT=( python{2_7,3_3,3_4} ) + +inherit distutils-r1 + +DESCRIPTION="PostgreSQL Extension Network Client" +HOMEPAGE="http://pgxnclient.projects.postgresql.org/ http://pypi.python.org/pypi/${PN}" +SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" + +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" + +LICENSE="BSD" +SLOT="0" +IUSE="test" + +RDEPEND=">=dev-db/postgresql-9.1[server]" +DEPEND="dev-python/setuptools[${PYTHON_USEDEP}]" + +python_test() { + # suite written onlt for py2 + pushd ${PN} > /dev/null + if ! python_is_python3; then + PYTHONPATH=../ "${PYTHON}" -m unittest discover || die "tests failed" + fi + popd > dev/null +} diff --git a/dev-db/phpmyadmin/Manifest b/dev-db/phpmyadmin/Manifest new file mode 100644 index 000000000000..ee3b9d3c6909 --- /dev/null +++ b/dev-db/phpmyadmin/Manifest @@ -0,0 +1,5 @@ +DIST phpMyAdmin-4.0.10.10-all-languages.tar.xz 4775140 SHA256 5f4522227ad9ffce9193b1c25c2fc17f5b014b9da32137cc122f011dcd190b15 SHA512 3f4f06c574f941586d7e48fba45023a5d3126fe8ed29527ddf4de3401f0076c678342b9e493ed99290d5b748df90360c0e2f0612766a993f5f7147685ed144d5 WHIRLPOOL bd0ba9cd5f3de88a33b8e8a87568b3f54d923a0d99bc1b75b772baf42b47e76e4059921300a9b03847f3c8f93c5bc4a1c651ca79d550af21f2fd74b1aa96fa9b +DIST phpMyAdmin-4.2.13.3-all-languages.tar.xz 5205440 SHA256 2d78bd91dc90d95d9f21c7e41294f2995a36dbbe1e4d1209e972b1d855c4877e SHA512 77ad296931666896613b7363c35c5546da66bddcda37fb31609ca5fb78f4b12241f6c976d1916a6491fbbc33d5f837163bcd0c0e0f227458d055076a971b640f WHIRLPOOL c4bb8f0689b0aa2ae7a67793f9c26b761e1a1e28e4e684f495815caf89ef527f4fced30aa53986c10d41ec000f3e295677739d5e73cbfc336466591c9fcf6a3e +DIST phpMyAdmin-4.3.13.1-all-languages.tar.xz 5446988 SHA256 d7484e2449453eae52613aae59e5f3a9342014aba7db88598ad6a90504ebfbd3 SHA512 b08a41721876a4c7c8fcc162f0f1f43bbd67b4f87fc1c0668672addb8eb6f56695755401a2de2c75fc944b074f5187c6df942bec0ff03c16ad34c27b505b87a0 WHIRLPOOL a72b7e4247bb7de68820d5583967b04b8dfd0917383f88d707b48235d119e0ad4fd45a04352dda0f43b11b2ba4def5a4648eca01e2f7ceabd3f788e429dc83ca +DIST phpMyAdmin-4.4.12-all-languages.zip 9982178 SHA256 168c5ec097ae819f3491615e824cb7bfe1886b40f85db2f0f5722dc24a89a81f SHA512 b737ac5e804af38e5331e54a1edb040a98057e3abd06c1d93f3b6fbc4895041145ace5e8e7872f25448b2142aa06ae0f8eefc0cb8b098a6bbb3fd9c3ce1b048a WHIRLPOOL 5bf0abb0f470c0763a0c7e4a97f8c68c768d7e8d3361de9c6c569204fb385c49775a08827aa92037b7f3efa26f89eedb665e79a657d38dc1b6c589b27c6140ff +DIST phpMyAdmin-4.4.6.1-all-languages.tar.xz 5635832 SHA256 d423a81868f01b4ce77f90113d83df96590446acdbe8f00a46aeb670c4a9ac5c SHA512 d25c63f9d354ae3f488d1837c710cfc5bacde3d6421d71eb96ff5868971132ea570aad9875f35d862d22d0318b5e16b208a2d6a7d542424ee2a04e329a619978 WHIRLPOOL 8c5f5e9349e801e328ddafe89322e457b89bfa4c5dbe593be9990ac3168a5d0cfada260ef275388b95f2c806952a682445baff23d6092dd5a66766681759172b diff --git a/dev-db/phpmyadmin/files/postinstall-en-3.1.txt b/dev-db/phpmyadmin/files/postinstall-en-3.1.txt new file mode 100644 index 000000000000..4e72581eb82d --- /dev/null +++ b/dev-db/phpmyadmin/files/postinstall-en-3.1.txt @@ -0,0 +1,36 @@ +If this is a new installation: + +1. Configure ${PN}: + +a) Create config.inc.php. You can use the web-based installer + (this requires the 'setup' USE flag to be enabled): + + mkdir ${MY_INSTALLDIR}/config + chown ${VHOST_SERVER_UID}:${VHOST_SERVER_UID} ${MY_INSTALLDIR}/config + + then go to http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/setup/ + + once you've saved the configuration: + + cp ${MY_INSTALLDIR}/config/config.inc.php ${MY_INSTALLDIR}/config.inc.php + rm -rf ${MY_INSTALLDIR}/config + +b) Alternatively, use an existing configuration: + + cp <path to existing config.inc.php file> ${MY_INSTALLDIR}/ + +c) Alternatively, use the sample config file: + + cp ${MY_INSTALLDIR}/config.sample.inc.php ${MY_INSTALLDIR}/config.inc.php + +2. Be sure that the libraries/ directory is not visible. You can use the + provided .htaccess file. + +================================================================= + +If you are upgrading from an earlier version: + +1. If you are using ${PN}'s features for master/foreign tables, be sure to read + http://${VHOST_HOSTNAME}/${VHOST_APPDIR}/Documentation.html#col_com + + You will need to perform the ALTER TABLE step yourself. diff --git a/dev-db/phpmyadmin/metadata.xml b/dev-db/phpmyadmin/metadata.xml new file mode 100644 index 000000000000..7bb697a7b342 --- /dev/null +++ b/dev-db/phpmyadmin/metadata.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>web-apps</herd> + <maintainer> + <email>jmbsvicetto@gentoo.org</email> + <name>Jorge Manuel B. S. Vicetto</name> + </maintainer> + <use> + <flag name="setup"> + Installs the phpMyAdmin setup utility. + Users who don't use the utility should disable this USE flag + for security reasons as the setup tool was the target of various + exploits in the past. + </flag> + </use> + <upstream> + <remote-id type="sourceforge">phpmyadmin</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/phpmyadmin/phpmyadmin-4.0.10.10.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.0.10.10.ebuild new file mode 100644 index 000000000000..41f2d33b9989 --- /dev/null +++ b/dev-db/phpmyadmin/phpmyadmin-4.0.10.10.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils webapp depend.php + +MY_PV=${PV/_/-} +MY_P="phpMyAdmin-${MY_PV}-all-languages" + +DESCRIPTION="Web-based administration for MySQL database in PHP" +HOMEPAGE="http://www.phpmyadmin.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos" +IUSE="setup" + +RDEPEND=" + dev-lang/php[crypt,ctype,filter,json,session,unicode] + || ( + dev-lang/php[mysqli] + dev-lang/php[mysql] + ) +" + +need_httpd_cgi +need_php_httpd + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + webapp_pkg_setup +} + +src_install() { + webapp_src_preinst + + dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die + rm -f LICENSE README* RELEASE-DATE-${MY_PV} + + if ! use setup; then + rm -rf setup || die "Cannot remove setup utility" + elog "The phpMyAdmin setup utility has been removed." + elog "It is a regular target of various exploits. If you need it, set USE=setup." + else + elog "You should consider disabling the setup USE flag" + elog "to exclude the setup utility if you don't use it." + elog "It regularly is the target of various exploits." + fi + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r . + + webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt + webapp_src_install +} diff --git a/dev-db/phpmyadmin/phpmyadmin-4.2.13.3.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.2.13.3.ebuild new file mode 100644 index 000000000000..41f2d33b9989 --- /dev/null +++ b/dev-db/phpmyadmin/phpmyadmin-4.2.13.3.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils webapp depend.php + +MY_PV=${PV/_/-} +MY_P="phpMyAdmin-${MY_PV}-all-languages" + +DESCRIPTION="Web-based administration for MySQL database in PHP" +HOMEPAGE="http://www.phpmyadmin.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos" +IUSE="setup" + +RDEPEND=" + dev-lang/php[crypt,ctype,filter,json,session,unicode] + || ( + dev-lang/php[mysqli] + dev-lang/php[mysql] + ) +" + +need_httpd_cgi +need_php_httpd + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + webapp_pkg_setup +} + +src_install() { + webapp_src_preinst + + dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die + rm -f LICENSE README* RELEASE-DATE-${MY_PV} + + if ! use setup; then + rm -rf setup || die "Cannot remove setup utility" + elog "The phpMyAdmin setup utility has been removed." + elog "It is a regular target of various exploits. If you need it, set USE=setup." + else + elog "You should consider disabling the setup USE flag" + elog "to exclude the setup utility if you don't use it." + elog "It regularly is the target of various exploits." + fi + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r . + + webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt + webapp_src_install +} diff --git a/dev-db/phpmyadmin/phpmyadmin-4.3.13.1.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.3.13.1.ebuild new file mode 100644 index 000000000000..03cc6615e037 --- /dev/null +++ b/dev-db/phpmyadmin/phpmyadmin-4.3.13.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils webapp depend.php + +MY_PV=${PV/_/-} +MY_P="phpMyAdmin-${MY_PV}-all-languages" + +DESCRIPTION="Web-based administration for MySQL database in PHP" +HOMEPAGE="http://www.phpmyadmin.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz" + +LICENSE="GPL-2" +KEYWORDS="alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos" +IUSE="setup" + +RDEPEND=" + dev-lang/php[crypt,ctype,filter,json,session,unicode] + || ( + dev-lang/php[mysqli] + dev-lang/php[mysql] + ) +" + +need_httpd_cgi +need_php_httpd + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + webapp_pkg_setup +} + +src_install() { + webapp_src_preinst + + dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die + rm -f LICENSE README* RELEASE-DATE-${MY_PV} + + if ! use setup; then + rm -rf setup || die "Cannot remove setup utility" + elog "The phpMyAdmin setup utility has been removed." + elog "It is a regular target of various exploits. If you need it, set USE=setup." + else + elog "You should consider disabling the setup USE flag" + elog "to exclude the setup utility if you don't use it." + elog "It regularly is the target of various exploits." + fi + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r . + + webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt + webapp_src_install +} diff --git a/dev-db/phpmyadmin/phpmyadmin-4.4.12.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.4.12.ebuild new file mode 100644 index 000000000000..d923c97c8086 --- /dev/null +++ b/dev-db/phpmyadmin/phpmyadmin-4.4.12.ebuild @@ -0,0 +1,62 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils webapp + +MY_PV=${PV/_/-} +MY_PN="phpMyAdmin" +MY_P="${MY_PN}-${MY_PV}-all-languages" + +DESCRIPTION="Web-based administration for MySQL database in PHP" +HOMEPAGE="https://www.phpmyadmin.net/" +SRC_URI="https://files.phpmyadmin.net/${MY_PN}/${MY_PV}/${MY_P}.zip" + +LICENSE="GPL-2" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos" +IUSE="setup" + +RDEPEND=" + dev-lang/php[crypt,ctype,filter,json,session,unicode] + || ( + dev-lang/php[mysqli] + dev-lang/php[mysql] + ) + virtual/httpd-php:* +" + +need_httpd_cgi + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + webapp_pkg_setup +} + +src_install() { + webapp_src_preinst + + dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die + rm -f LICENSE README* RELEASE-DATE-${MY_PV} + + if ! use setup; then + rm -rf setup || die "Cannot remove setup utility" + elog "The phpMyAdmin setup utility has been removed." + elog "It is a regular target of various exploits. If you need it, set USE=setup." + else + elog "You should consider disabling the setup USE flag" + elog "to exclude the setup utility if you don't use it." + elog "It regularly is the target of various exploits." + fi + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r . + + webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt + webapp_src_install +} diff --git a/dev-db/phpmyadmin/phpmyadmin-4.4.6.1.ebuild b/dev-db/phpmyadmin/phpmyadmin-4.4.6.1.ebuild new file mode 100644 index 000000000000..03cc6615e037 --- /dev/null +++ b/dev-db/phpmyadmin/phpmyadmin-4.4.6.1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils webapp depend.php + +MY_PV=${PV/_/-} +MY_P="phpMyAdmin-${MY_PV}-all-languages" + +DESCRIPTION="Web-based administration for MySQL database in PHP" +HOMEPAGE="http://www.phpmyadmin.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.xz" + +LICENSE="GPL-2" +KEYWORDS="alpha amd64 hppa ~ia64 ppc ppc64 sparc x86 ~x86-fbsd ~ppc-macos ~x64-macos ~x86-macos" +IUSE="setup" + +RDEPEND=" + dev-lang/php[crypt,ctype,filter,json,session,unicode] + || ( + dev-lang/php[mysqli] + dev-lang/php[mysql] + ) +" + +need_httpd_cgi +need_php_httpd + +S="${WORKDIR}"/${MY_P} + +pkg_setup() { + webapp_pkg_setup +} + +src_install() { + webapp_src_preinst + + dodoc README RELEASE-DATE-${MY_PV} ChangeLog || die + rm -f LICENSE README* RELEASE-DATE-${MY_PV} + + if ! use setup; then + rm -rf setup || die "Cannot remove setup utility" + elog "The phpMyAdmin setup utility has been removed." + elog "It is a regular target of various exploits. If you need it, set USE=setup." + else + elog "You should consider disabling the setup USE flag" + elog "to exclude the setup utility if you don't use it." + elog "It regularly is the target of various exploits." + fi + + insinto "${MY_HTDOCSDIR#${EPREFIX}}" + doins -r . + + webapp_configfile "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + webapp_serverowned "${MY_HTDOCSDIR#${EPREFIX}}"/libraries/config.default.php + + webapp_postinst_txt en "${FILESDIR}"/postinstall-en-3.1.txt + webapp_src_install +} diff --git a/dev-db/phppgadmin/Manifest b/dev-db/phppgadmin/Manifest new file mode 100644 index 000000000000..769490d867ad --- /dev/null +++ b/dev-db/phppgadmin/Manifest @@ -0,0 +1 @@ +DIST phpPgAdmin-5.1.tar.bz2 583620 SHA256 8a450ec4b8c85e8da7ab43b928265bc2ad0280fdea4144b55b40da4ceefd6ec6 SHA512 3a1eebfc4e07a620ea3ec5d65e1fd1f07cb19f12db470f163430ded20542107c828cebbd5d5ae23c470fbe5aa0e2358b8c4d3ba66834009a39ac74440cc751c0 WHIRLPOOL bb6b148efb87efc3120dc2b4e4b4ea031f1b06a89fc316d0dbe6360646c0bff496b42eb6063896baf96ce551706acfc1ffa15956827aa6895534060a63f32fa7 diff --git a/dev-db/phppgadmin/files/postinstall-en.txt b/dev-db/phppgadmin/files/postinstall-en.txt new file mode 100644 index 000000000000..003fe5003bbd --- /dev/null +++ b/dev-db/phppgadmin/files/postinstall-en.txt @@ -0,0 +1,4 @@ +Make sure you edit ${MY_INSTALLDIR}/conf/config.inc.php + +To use the reports database, you have to manually execute +psql -f ${MY_INSTALLDIR}/sql/reports-pgsql.sql diff --git a/dev-db/phppgadmin/metadata.xml b/dev-db/phppgadmin/metadata.xml new file mode 100644 index 000000000000..0a3a1d3dde88 --- /dev/null +++ b/dev-db/phppgadmin/metadata.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>postgresql</herd> +<herd>web-apps</herd> +</pkgmetadata> diff --git a/dev-db/phppgadmin/phppgadmin-5.1.ebuild b/dev-db/phppgadmin/phppgadmin-5.1.ebuild new file mode 100644 index 000000000000..f7663853d341 --- /dev/null +++ b/dev-db/phppgadmin/phppgadmin-5.1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit webapp + +MY_P="phpPgAdmin-${PV}" + +DESCRIPTION="Web-based administration for Postgres database in php" +HOMEPAGE="http://phppgadmin.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +KEYWORDS="amd64 hppa ppc x86 ~x86-fbsd" +IUSE="" + +RDEPEND="dev-lang/php[postgres,session] + || ( <dev-lang/php-5.3[pcre] >=dev-lang/php-5.3 )" + +S="${WORKDIR}/${MY_P}" + +src_install() { + webapp_src_preinst + + local doc + local docs="CREDITS DEVELOPERS FAQ HISTORY INSTALL TODO TRANSLATORS" + dodoc ${docs} + mv conf/config.inc.php-dist conf/config.inc.php + + cp -r * "${D}"${MY_HTDOCSDIR} + for doc in ${docs} INSTALL LICENSE; do + rm -f "${D}"${MY_HTDOCSDIR}/${doc} + done + + webapp_configfile ${MY_HTDOCSDIR}/conf/config.inc.php + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + webapp_src_install +} diff --git a/dev-db/phppgadmin/phppgadmin-9999.ebuild b/dev-db/phppgadmin/phppgadmin-9999.ebuild new file mode 100644 index 000000000000..e2cdc1f04faa --- /dev/null +++ b/dev-db/phppgadmin/phppgadmin-9999.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit webapp git-2 + +DESCRIPTION="Web-based administration for Postgres database in php" +HOMEPAGE="http://phppgadmin.sourceforge.net/" +EGIT_REPO_URI="git://github.com/xzilla/${PN}.git + https://github.com/xzilla/${PN}.git" + +LICENSE="GPL-2" +KEYWORDS="" +IUSE="" + +RDEPEND=" + || ( + <dev-lang/php-5.3[pcre] + >=dev-lang/php-5.3 + ) + dev-lang/php[postgres,session] +" + +pkg_setup() { + webapp_pkg_setup +} + +src_install() { + webapp_src_preinst + + local doc + local docs="CREDITS DEVELOPERS FAQ HISTORY INSTALL TODO TRANSLATORS" + dodoc ${docs} + mv conf/config.inc.php-dist conf/config.inc.php + + cp -r * "${D}"${MY_HTDOCSDIR} + for doc in ${docs} INSTALL LICENSE; do + rm -f "${D}"${MY_HTDOCSDIR}/${doc} + done + + webapp_configfile ${MY_HTDOCSDIR}/conf/config.inc.php + webapp_postinst_txt en "${FILESDIR}"/postinstall-en.txt + webapp_src_install +} diff --git a/dev-db/postgis/Manifest b/dev-db/postgis/Manifest new file mode 100644 index 000000000000..2862459254e4 --- /dev/null +++ b/dev-db/postgis/Manifest @@ -0,0 +1,9 @@ +DIST postgis-2.0.3.tar.gz 5581619 SHA256 7f865a6fdf19afed7d2f3e7178cd504f7254a9e96f2ce6a07d0ea19edc1668a0 SHA512 e49232a0aebd202a053e2f6cb741551e932e49a8c535fadd22fe15c654e3823c2f43a4c78dc0340cddbbc7f9298651dc16e1737be3bfe0779cc4feede032facc WHIRLPOOL 9c7985ab6d50a4a8ffa4e8fa5ea69c7e365aae8d90a3ea70c978149e5a9efe4a29a29d11db5d2a6b5c830dcd5ba458a3263288f32a5af54665f5d1cab3357415 +DIST postgis-2.0.6.tar.gz 5651448 SHA256 438fc9cf8d008c537ed2d6776bc30e726eb1f9a85247df945c2beccc42f33489 SHA512 c838b68b03d08bfd427d8a78c67754697a9409d6333e23e4bf8b63efc4320369258f14a03ba9e21ca4bd967fbfdf99d02720fa370170d4d34c20e31ad47bbf0c WHIRLPOOL 5795385bd146d280c0a8108ccb704417bf206ed80bfa9383c793d1313a3029186d26799438e21b3d6920e92d8859de947e61c1cd55cd0cc275ad800ef128f542 +DIST postgis-2.1.0.tar.gz 6518378 SHA256 fc00481aec904661f3eb11da4305b1666f2040c28b0651de7eac6c22f217b26c SHA512 ed5140aef0e68cb075fc06eaa91733c46d38ce4e01cbf1d97d14ff1a4d447f7cfcaf32924150946c7bb388d334bd5bc9f97753c47c84c16068b9dff6438e8493 WHIRLPOOL a52000a334dd2bb246b665ec7bcd743833c4699cb0cabdd1d9bab3538ee18df6e7b766c06728a97274647f63da1cc130f79902a32cf0621d9a3b8190c8fe596e +DIST postgis-2.1.1.tar.gz 6717940 SHA256 f55acf056362e7e78766bec7a403e02a3b6b087a6d18b4222647b6a932d5c945 SHA512 f85c4d1db32802b3acbda3f4c391ca961bf1301c699a00682265c7a984fbc74ee7b9fbfc5580fc04dff0491921eb6dbe4d8bd73dded216794a4b7f90c3ed650f WHIRLPOOL 807d0ce975b72315a72d4c2ecd192c612b00530a7e542b18429fed0c69cf6cb95285554c34be58e3d2a2c513f436289449dfbe82c7430fba87e901a4bea49c2d +DIST postgis-2.1.4.tar.gz 6854492 SHA256 cd73c2a38428c8736f6cae73b955aee0bd42f9ca4fd8d93c1af464524cb100fc SHA512 1d7dd2547fe9819addea0c9dfb4f4c78f30593af21f7cf05c4e40c2684ea3e04ad50c1937ba72172c69df713384c866e6a336b6cab733c9dd0f273f41df568d2 WHIRLPOOL f685cb2e991319b1a2f7a54ce050217d8ea636c02491fca2dafb1a2f66fe3548d4daff6d3de67925a700d9de42af29dfc4af0d26727e77f969a100a1fe964567 +DIST postgis-2.1.5.tar.gz 6827999 SHA256 0d0e27f72f12b8dba456fbde25ed0f6913f42baf57332a7f1b9bbc6f29fddbf4 SHA512 c1d186b237114c951feb78e97dc7d69896dcb0884c02e49d93e8602590e82d34a808eb12c127c7dc78db3237ac619709f8bd7febb4670909b03615f8278aede2 WHIRLPOOL c203aa2034e899647139445ce0b1e6e7637a0e2ad3c1f6d4ee1f303d9734b219b68d18fb6d6e7da6c9df53f90e8dfd30ce8d4ab8a6c942b96db7e8b55d632417 +DIST postgis-2.1.6.tar.gz 6803831 SHA256 6ffdf655bc4fca2b5495dd96f44b266e84111912d5c3f91b832023c4fec5c222 SHA512 a6c1263d64f2c1828656d5613840d721fb70ecbdfab3e28099c8f6b80d5404d46a9376913c0ab46c7f1109517c04430800b8c3be0c94d964421c6681afb2f997 WHIRLPOOL 98bfcae992f444b63840a28ef90077c01473ea528aa72ae5fd283b4fdcf7b7e37732afeac1a29fc87e330f687ca491d5afbed44b0792fb00763dc682501d37a3 +DIST postgis-2.1.7.tar.gz 6804372 SHA256 00ab79a3f609d7ea458f6fc358032ad059cb720baf88285243d6436a597a7ec2 SHA512 021fcb73c2109dafb67cb9d459eb08e0da7e55cf1a5fab81115aad3b0a61809b8f83d7a278aa04e41ecd633164e4257a90d5dfc0e81339b0c322e7d41d3c5eae WHIRLPOOL 938cacf1af4ba8a2f0f3bbefe11c0014a31cd331186cd7fc7fc0a242528094efb617326a484bdad76704bfb98fd065a7f280ab663088440af0555fc69862e36b +DIST postgis-2.1.8.tar.gz 6811272 SHA256 7c2380b895fe7bda34c2e70deab3fcf4c12b13ab40d7501cdaa6fa36f1a6c662 SHA512 e8aeb739a1ecf95b224a3908d2af3aa38933b56c63713af30d14243653745436165b418a3368601a699b744f6fe61ce645c980319eb159395d68166a3815c5f4 WHIRLPOOL b6675fecbb922379bd50c351abe1553fdbda53543fce56451c688e25a3fa2e9d0813d8f3a349b623b85fcb4016fc4710f6746a224ba7673ec0d2106c7635d3d1 diff --git a/dev-db/postgis/files/postgis-1.5-ldflags.patch b/dev-db/postgis/files/postgis-1.5-ldflags.patch new file mode 100644 index 000000000000..3ccbb712c2d4 --- /dev/null +++ b/dev-db/postgis/files/postgis-1.5-ldflags.patch @@ -0,0 +1,28 @@ +diff -Naurw postgis-1.5.8.orig/loader/Makefile.in postgis-1.5.8/loader/Makefile.in +--- postgis-1.5.8.orig/loader/Makefile.in 2010-09-10 20:44:05.000000000 +0000 ++++ postgis-1.5.8/loader/Makefile.in 2013-01-30 14:31:01.189692941 +0000 +@@ -79,16 +79,16 @@ + $(CC) $(CFLAGS) $(ICONV_CFLAGS) $(PGSQL_FE_CPPFLAGS) -c $< + + $(PGSQL2SHP): shpopen.o dbfopen.o safileio.o getopt.o pgsql2shp.o $(LIBLWGEOM) +- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm -o $@ ++ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm -o $@ + + $(SHP2PGSQL-CLI): stringbuffer.o shpopen.o dbfopen.o safileio.o getopt.o shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) +- $(CC) $(CFLAGS) $^ -o $@ $(ICONV_LDFLAGS) -lm ++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(ICONV_LDFLAGS) -lm + + shp2pgsql-gui.o: shp2pgsql-gui.c + $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c + + $(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o safileio.o shp2pgsql-core.o shp2pgsql-gui.o getopt.o $(LIBLWGEOM) $(GTK_WIN32_RES) +- $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm ++ $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(LDFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm + + installdir: + @mkdir -p $(DESTDIR)$(bindir) +@@ -106,4 +106,3 @@ + + clean: + @rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP) $(GTK_WIN32_RES) +- diff --git a/dev-db/postgis/files/postgis-2.0-arflags.patch b/dev-db/postgis/files/postgis-2.0-arflags.patch new file mode 100644 index 000000000000..fa2e9a8da607 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.0-arflags.patch @@ -0,0 +1,18 @@ +diff -Naruw a/raster/rt_core/Makefile.in b/raster/rt_core/Makefile.in +--- a/raster/rt_core/Makefile.in 2012-03-21 21:36:59.000000000 +0000 ++++ b/raster/rt_core/Makefile.in 2013-04-28 13:23:21.055728249 +0000 +@@ -8,7 +8,7 @@ + # + ############################################################################# + +-AR=ar rs ++ARFLAGS=rs + + CC=@CC@ + LIBLWGEOM_LDFLAGS=../../liblwgeom/.libs/liblwgeom.a +@@ -35,4 +35,4 @@ + rm -f Makefile + + librtcore.a: $(RT_OBJS) $(RT_HEADERS) +- $(AR) $(RT_LIB) $(RT_OBJS) ++ $(AR) $(ARFLAGS) $(RT_LIB) $(RT_OBJS) diff --git a/dev-db/postgis/files/postgis-2.0-ldflags.patch b/dev-db/postgis/files/postgis-2.0-ldflags.patch new file mode 100644 index 000000000000..f48617cd64a9 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.0-ldflags.patch @@ -0,0 +1,26 @@ +diff -Naurw postgis-2.0.2.orig/loader/Makefile.in postgis-2.0.2/loader/Makefile.in +--- postgis-2.0.2.orig/loader/Makefile.in 2012-03-21 21:36:59.000000000 +0000 ++++ postgis-2.0.2/loader/Makefile.in 2013-01-29 21:44:12.566318760 +0000 +@@ -97,11 +97,11 @@ + + $(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ +- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ ++ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ + + $(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ +- $(CC) $(CFLAGS) $^ -o $@ $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) ++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) + + shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h + $(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c +@@ -109,7 +109,7 @@ + $(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES) + $(LIBTOOL) --mode=link \ + $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ \ +- $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) ++ $(LDFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) + + installdir: + @mkdir -p $(DESTDIR)$(bindir) diff --git a/dev-db/postgis/files/postgis-2.0-pkgconfig-json.patch b/dev-db/postgis/files/postgis-2.0-pkgconfig-json.patch new file mode 100644 index 000000000000..45c5b07654e3 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.0-pkgconfig-json.patch @@ -0,0 +1,99 @@ +diff -Naruw postgis-2.0.2.orig/configure.ac postgis-2.0.2/configure.ac +--- postgis-2.0.2.orig/configure.ac 2012-05-17 12:10:04.000000000 +0000 ++++ postgis-2.0.2/configure.ac 2013-02-11 11:57:06.733323130 +0000 +@@ -701,57 +701,14 @@ + dnl Detect if json-c installed + dnl =========================================================================== + +-HAVE_JSON=no +-AC_SUBST([HAVE_JSON]) +- +-AC_ARG_WITH([jsondir], +- [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])], +- [JSONDIR="$withval"], [JSONDIR=]) +- +-if test ! "x$JSONDIR" = "x"; then +- dnl Make sure that the directory exists +- if test "x$JSONDIR" = "xyes"; then +- AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to]) +- else +- dnl We need (libjson.so OR libjson.a OR libjson.dll) AND json/json.h +- if test ! -e "${JSONDIR}/include/json/json.h" -o \ +- ! \( -e "${JSONDIR}/lib/libjson.so" -o \ +- -e "${JSONDIR}/lib/libjson.dll" -o \ +- -e "${JSONDIR}/lib/libjson.dylib" -o \ +- -e "${JSONDIR}/bin/libjson.dll" -o \ +- -e "${JSONDIR}/lib/libjson.a" \) +- then +- AC_MSG_ERROR([Cannot find json dev files in "$JSONDIR"]) +- fi +- AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR]) +- +- dnl Add the include directory to JSON_CPPFLAGS +- JSON_CPPFLAGS="-I$JSONDIR/include" +- JSON_LDFLAGS="-L$JSONDIR/lib -ljson" +- fi +-fi +- +-dnl Check that we can find the json/json.h header file +-CPPFLAGS_SAVE="$CPPFLAGS" +-CPPFLAGS="$JSON_CPPFLAGS" +-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], []) +-CPPFLAGS="$CPPFLAGS_SAVE" +- +-dnl Ensure we can link against libjson +-LIBS_SAVE="$LIBS" +-LIBS="$JSON_LDFLAGS" +-AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes], [], []) +-LIBS="$LIBS_SAVE" +- +-if test "$HAVE_JSON" = "yes"; then ++PKG_CHECK_MODULES([JSON], [json], ++ [ ++ HAVE_JSON=yes + AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) +- if test "x$JSON_LDFLAGS" = "x"; then +- JSON_LDFLAGS="-ljson" +- fi +-fi ++ ], ++ [HAVE_JSON=no]) + +-AC_SUBST([JSON_CPPFLAGS]) +-AC_SUBST([JSON_LDFLAGS]) ++AC_SUBST([HAVE_JSON]) + + dnl =========================================================================== + dnl Detect GTK+2.0 for GUI +@@ -842,10 +799,10 @@ + AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics]) + + +-CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $JSON_CPPFLAGS $XML2_CPPFLAGS" ++CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $JSON_CFLAGS $XML2_CPPFLAGS" + dnl AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS]) + +-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS" ++SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LIBS $XML2_LDFLAGS" + AC_SUBST([SHLIB_LINK]) + dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK]) + +diff -Naruw postgis-2.0.2.orig/postgis/lwgeom_in_geojson.c postgis-2.0.2/postgis/lwgeom_in_geojson.c +--- postgis-2.0.2.orig/postgis/lwgeom_in_geojson.c 2012-12-03 16:18:33.000000000 +0000 ++++ postgis-2.0.2/postgis/lwgeom_in_geojson.c 2013-02-11 12:09:29.017167709 +0000 +@@ -28,8 +28,8 @@ + #ifdef HAVE_LIBJSON + + #include "lwgeom_export.h" +-#include <json/json.h> +-#include <json/json_object_private.h> ++#include <json.h> ++#include <json_object_private.h> + + /* Prototype */ + LWGEOM* parse_geojson(json_object *geojson, bool *hasz, int *root_srid); +@@ -556,4 +556,3 @@ + PG_RETURN_POINTER(geom); + #endif + } +- diff --git a/dev-db/postgis/files/postgis-2.1-ldflags.patch b/dev-db/postgis/files/postgis-2.1-ldflags.patch new file mode 100644 index 000000000000..de11510ea37b --- /dev/null +++ b/dev-db/postgis/files/postgis-2.1-ldflags.patch @@ -0,0 +1,26 @@ +diff -Naruw postgis-2.1.0rc1.orig/loader/Makefile.in postgis-2.1.0rc1/loader/Makefile.in +--- postgis-2.1.0rc1.orig/loader/Makefile.in 2013-05-06 08:30:51.000000000 +0000 ++++ postgis-2.1.0rc1/loader/Makefile.in 2013-07-14 17:19:19.313306844 +0000 +@@ -97,11 +97,11 @@ + + $(PGSQL2SHP-CLI): $(SHPLIB_OBJS) pgsql2shp-core.o pgsql2shp-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ +- $(CC) $(CFLAGS) $^ $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ ++ $(CC) $(CFLAGS) $^ $(LDFLAGS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) -o $@ + + $(SHP2PGSQL-CLI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-cli.o $(LIBLWGEOM) + $(LIBTOOL) --mode=link \ +- $(CC) $(CFLAGS) $^ -o $@ $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) ++ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(GETTEXT_LDFLAGS) $(ICONV_LDFLAGS) + + shp2pgsql-gui.o: shp2pgsql-gui.c shp2pgsql-core.h shpcommon.h + $(CC) $(CFLAGS) $(GTK_CFLAGS) $(PGSQL_FE_CPPFLAGS) -o $@ -c shp2pgsql-gui.c +@@ -109,7 +109,7 @@ + $(SHP2PGSQL-GUI): $(SHPLIB_OBJS) shp2pgsql-core.o shp2pgsql-gui.o pgsql2shp-core.o $(LIBLWGEOM) $(GTK_WIN32_RES) + $(LIBTOOL) --mode=link \ + $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ \ +- $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) ++ $(LDFLAGS) $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) $(GETTEXT_LDFLAGS) + + installdir: + @mkdir -p $(DESTDIR)$(bindir) diff --git a/dev-db/postgis/files/postgis-2.1-pkgconfig-json.patch b/dev-db/postgis/files/postgis-2.1-pkgconfig-json.patch new file mode 100644 index 000000000000..9907e73d7410 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.1-pkgconfig-json.patch @@ -0,0 +1,125 @@ +diff -Naruw postgis-2.1.0.orig/configure.ac postgis-2.1.0/configure.ac +--- postgis-2.1.0.orig/configure.ac 2013-07-09 03:36:15.000000000 +0000 ++++ postgis-2.1.0/configure.ac 2013-08-18 18:14:23.263697970 +0000 +@@ -745,65 +745,21 @@ + dnl Detect if json-c installed + dnl =========================================================================== + +-CHECK_JSON=yes +-HAVE_JSON=no +-AC_SUBST([HAVE_JSON]) +- +-AC_ARG_WITH([json], +- [AS_HELP_STRING([--without-json], [build without json-c support])], +- [CHECK_JSON="$withval"], []) +- +-if test "$CHECK_JSON" != "no"; then dnl { +- +-AC_ARG_WITH([jsondir], +- [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])], +- [JSONDIR="$withval"], [JSONDIR=]) +- +-if test ! "x$JSONDIR" = "x"; then +- dnl Make sure that the directory exists +- if test "x$JSONDIR" = "xyes"; then +- AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to]) +- else +- dnl We need (libjson.so OR libjson.a OR libjson.dll) AND json/json.h +- if test ! -e "${JSONDIR}/include/json/json.h" -o \ +- ! \( -e "${JSONDIR}/lib/libjson.so" -o \ +- -e "${JSONDIR}/lib/libjson.dll" -o \ +- -e "${JSONDIR}/lib/libjson.dylib" -o \ +- -e "${JSONDIR}/bin/libjson.dll" -o \ +- -e "${JSONDIR}/lib/libjson.a" \) +- then +- AC_MSG_ERROR([Cannot find json dev files in "$JSONDIR"]) +- fi +- AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR]) +- +- dnl Add the include directory to JSON_CPPFLAGS +- JSON_CPPFLAGS="-I$JSONDIR/include" +- JSON_LDFLAGS="-L$JSONDIR/lib" +- fi +-fi +- +-dnl Check that we can find the json/json.h header file +-CPPFLAGS_SAVE="$CPPFLAGS" +-CPPFLAGS="$JSON_CPPFLAGS" +-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], []) +-CPPFLAGS="$CPPFLAGS_SAVE" +- +-dnl Ensure we can link against libjson +-LIBS_SAVE="$LIBS" +-LIBS="$JSON_LDFLAGS" +-AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"], [ +- AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson"], [], []) +-], []) +-LIBS="$LIBS_SAVE" +- +-if test "$HAVE_JSON" = "yes"; then ++PKG_CHECK_MODULES([JSON], [json], ++ [ ++ HAVE_JSON=yes + AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) +-fi +- +-AC_SUBST([JSON_CPPFLAGS]) +-AC_SUBST([JSON_LDFLAGS]) ++ ], ++ [ ++ PKG_CHECK_MODULES([JSON], [json-c], ++ [ ++ HAVE_JSON=yes ++ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) ++ ], ++ [HAVE_JSON=no]) ++ ]) + +-fi dnl } ++AC_SUBST([HAVE_JSON]) + + dnl =========================================================================== + dnl Detect GTK+2.0 for GUI +@@ -896,7 +852,7 @@ + CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $CPPFLAGS" + AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS]) + +-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS" ++SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LIBS $XML2_LDFLAGS $SFCGAL_LDFLAGS" + AC_SUBST([SHLIB_LINK]) + dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK]) + +diff -Naruw postgis-2.1.0.orig/liblwgeom/lwin_geojson.c postgis-2.1.0/liblwgeom/lwin_geojson.c +--- postgis-2.1.0.orig/liblwgeom/lwin_geojson.c 2013-02-28 17:42:49.000000000 +0000 ++++ postgis-2.1.0/liblwgeom/lwin_geojson.c 2013-08-18 18:11:52.473943571 +0000 +@@ -17,8 +17,8 @@ + + #ifdef HAVE_LIBJSON + +-#include <json/json.h> +-#include <json/json_object_private.h> ++#include <json.h> ++#include <json_object_private.h> + #include <string.h> + + static void geojson_lwerror(char *msg, int error_code) +@@ -551,5 +551,3 @@ + return lwgeom; + #endif /* HAVE_LIBJSON */ + } +- +- +diff -Naruw postgis-2.1.0.orig/liblwgeom/Makefile.in postgis-2.1.0/liblwgeom/Makefile.in +--- postgis-2.1.0.orig/liblwgeom/Makefile.in 2013-05-09 19:38:17.000000000 +0000 ++++ postgis-2.1.0/liblwgeom/Makefile.in 2013-08-18 18:11:52.477943594 +0000 +@@ -11,8 +11,8 @@ + # ********************************************************************** + + CC = @CC@ +-CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CPPFLAGS@ +-LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LDFLAGS@ ++CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CFLAGS@ ++LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LIBS@ + NUMERICFLAGS = @NUMERICFLAGS@ + top_builddir = @top_builddir@ + prefix = @prefix@ diff --git a/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch b/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch new file mode 100644 index 000000000000..13634abb6de2 --- /dev/null +++ b/dev-db/postgis/files/postgis-2.1.4-pkgconfig-json.patch @@ -0,0 +1,122 @@ +diff --git a/configure.ac b/configure.ac +index a13cf13..c0a7842 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -780,61 +780,19 @@ dnl =========================================================================== + dnl Detect if json-c installed + dnl =========================================================================== + +-CHECK_JSON=yes +-HAVE_JSON=no +-HAVE_JSON_C=no +- +-AC_ARG_WITH([json], +- [AS_HELP_STRING([--without-json], [build without json-c support])], +- [CHECK_JSON="$withval"], []) +- +-if test "$CHECK_JSON" != "no"; then dnl { +- +-AC_ARG_WITH([jsondir], +- [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])], +- [JSONDIR="$withval"], [JSONDIR=]) +- +-if test ! "x$JSONDIR" = "x"; then +- dnl Make sure that the directory exists +- if test "x$JSONDIR" = "xyes"; then +- AC_MSG_ERROR([you must specify a parameter to --with-jsondir, e.g. --with-jsondir=/path/to]) +- else +- AC_MSG_RESULT([Using user-specified json-c directory: $JSONDIR]) +- +- dnl Add the include directory to JSON_CPPFLAGS +- JSON_CPPFLAGS="-I$JSONDIR/include" +- JSON_LDFLAGS="-L$JSONDIR/lib" +- fi +-fi +- +-dnl Check that we can find the json/json.h header file +-CPPFLAGS_SAVE="$CPPFLAGS" +-CPPFLAGS="$JSON_CPPFLAGS" +-AC_CHECK_HEADER([json/json.h], [HAVE_JSON=yes], [ +- AC_CHECK_HEADER([json-c/json.h], [HAVE_JSON=yes; HAVE_JSON_C=yes], []) +-]) +-CPPFLAGS="$CPPFLAGS_SAVE" +- +-dnl Ensure we can link against libjson +-LIBS_SAVE="$LIBS" +-LIBS="$JSON_LDFLAGS" +-AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"], [ +- AC_CHECK_LIB([json], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson"], [], []) +-], []) +-LIBS="$LIBS_SAVE" +- +-if test "$HAVE_JSON" = "yes"; then ++PKG_CHECK_MODULES([JSON], [json], ++ [ ++ HAVE_JSON=yes + AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) +-fi +-if test "$HAVE_JSON_C" = "yes"; then +- AC_DEFINE([HAVE_LIBJSON_C], 1, [Define to 1 if libjson resides in a json-c subdir]) +-fi +- +-AC_SUBST([JSON_CPPFLAGS]) +-AC_SUBST([JSON_LDFLAGS]) +-AC_SUBST([HAVE_JSON]) +- +-fi dnl } ++ ], ++ [ ++ PKG_CHECK_MODULES([JSON], [json-c], ++ [ ++ HAVE_JSON=yes ++ AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present]) ++ ], ++ [HAVE_JSON=no]) ++ ]) + + dnl =========================================================================== + dnl Detect GTK+2.0 for GUI +@@ -927,7 +885,7 @@ AC_DEFINE_UNQUOTED([POSTGIS_USE_STATS], [1], [Enable use of ANALYZE statistics]) + CPPFLAGS="$PGSQL_CPPFLAGS $GEOS_CPPFLAGS $PROJ_CPPFLAGS $XML2_CPPFLAGS $SFCGAL_CPPFLAGS $CPPFLAGS" + AC_MSG_RESULT([CPPFLAGS: $CPPFLAGS]) + +-SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LDFLAGS $XML2_LDFLAGS $SFCGAL_LDFLAGS" ++SHLIB_LINK="$PGSQL_LDFLAGS $GEOS_LDFLAGS $PROJ_LDFLAGS -lgeos_c -lproj $JSON_LIBS $XML2_LDFLAGS $SFCGAL_LDFLAGS" + AC_SUBST([SHLIB_LINK]) + dnl AC_MSG_RESULT([SHLIB_LINK: $SHLIB_LINK]) + +diff --git a/liblwgeom/Makefile.in b/liblwgeom/Makefile.in +index 3cc6256..5ccbb3b 100644 +--- a/liblwgeom/Makefile.in ++++ b/liblwgeom/Makefile.in +@@ -11,8 +11,8 @@ + # ********************************************************************** + + CC = @CC@ +-CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CPPFLAGS@ +-LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LDFLAGS@ ++CFLAGS = @CFLAGS@ @PICFLAGS@ @WARNFLAGS@ @GEOS_CPPFLAGS@ @PROJ_CPPFLAGS@ @JSON_CFLAGS@ ++LDFLAGS = @LDFLAGS@ @GEOS_LDFLAGS@ -lgeos_c @PROJ_LDFLAGS@ -lproj @JSON_LIBS@ + NUMERICFLAGS = @NUMERICFLAGS@ + top_builddir = @top_builddir@ + prefix = @prefix@ +diff --git a/liblwgeom/lwin_geojson.c b/liblwgeom/lwin_geojson.c +index 7019626..ec1d594 100644 +--- a/liblwgeom/lwin_geojson.c ++++ b/liblwgeom/lwin_geojson.c +@@ -19,13 +19,8 @@ + + #include <string.h> + +-#ifdef HAVE_LIBJSON_C +-#include <json-c/json.h> +-#include <json-c/json_object_private.h> +-#else +-#include <json/json.h> +-#include <json/json_object_private.h> +-#endif ++#include <json.h> ++#include <json_object_private.h> + + #ifndef JSON_C_VERSION + // Adds support for libjson < 0.10 diff --git a/dev-db/postgis/files/postgis_dbs b/dev-db/postgis/files/postgis_dbs new file mode 100644 index 000000000000..8a414157f6c6 --- /dev/null +++ b/dev-db/postgis/files/postgis_dbs @@ -0,0 +1,49 @@ +# This file is used by 'emerge --config dev-db/postgis' to determine which +# databases it should install to, upgrade or create as a template. + +# Unlike the previous versions of the PostGIS ebuilds, it no longer creates any +# databases except for templates. All databases you list must already exist in +# the cluster. + +# The user to perform the updates as. This user must have the privileges to +# modify all of the databases you list here. +pguser="postgres" + +# By default, no databases will have PostGIS enabled. The databases listed here +# must already exist. The databases you list here must not already be PostGIS +# enabled. Instead, use the upgrade lists further down. +#databases=( "your" "databases" ) + +# Anything you place in this list will create a database and make it a template. +# It will be PostGIS-enabled. To add additional features, add the template names +# to the following lists. +#templates=( "template_postgis" ) + +# The PostGIS enabled templates will be created using this template. +from_template="template1" + +# For a complete set of EPSG coordinate system definition identifiers, you can +# also load the spatial_ref_sys.sql definitions file and populate the +# spatial_ref_sys table. This will permit you to perform ST_Transform() +# operations on geometries. +#epsg_databases=( "enable" "epsg" "on" "these" "databases" ) + +# Add comments to PostGIS functions to the databases in this list. +#comment_databases=( "comments" "on" "these" "databases" ) + +# Any databases you have that are already PostGIS enabled can be listed among +# the following list to perform a soft upgrade. If the soft upgrade fails, +# you'll need to do a hard upgrade. +# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_upgrade + +# Upgrade from PostGIS 1.3 to 1.5 +#upgrade_from_1_3=( "upgrade" "these" "databases" ) + +# Upgrade from PostGIS 1.4 to 1.5 +#upgrade_from_1_4=( "upgrade" "these" "databases" ) + +# Perform a minor upgrade for PostGIS 1.5 +#upgrade_from_1_5=( "upgrade" "these" "databases" ) + +# Uncomment this once you're satisfied with the settings in this file. +#configured="true" diff --git a/dev-db/postgis/files/postgis_dbs-1.4 b/dev-db/postgis/files/postgis_dbs-1.4 new file mode 100644 index 000000000000..fa7ac2542fa9 --- /dev/null +++ b/dev-db/postgis/files/postgis_dbs-1.4 @@ -0,0 +1,49 @@ +# This file is used by 'emerge --config dev-db/postgis' to determine which +# databases it should install to, upgrade or create as a template. + +# Unlike the previous versions of the PostGIS ebuilds, it no longer creates any +# databases except for templates. All databases you list must already exist in +# the cluster. + +# The user to perform the updates as. This user must have the privileges to +# modify all of the databases you list here. +pguser="postgres" + +# By default, no databases will have PostGIS enabled. The databases listed here +# must already exist. The databases you list here must not already be PostGIS +# enabled. Instead, use the upgrade lists further down. +#databases=( "your" "databases" ) + +# Anything you place in this list will create a database and make it a template. +# It will be PostGIS-enabled. To add additional features, add the template names +# to the following lists. +#templates=( "template_postgis" ) + +# The PostGIS enabled templates will be created using this template. +from_template="template1" + +# For a complete set of EPSG coordinate system definition identifiers, you can +# also load the spatial_ref_sys.sql definitions file and populate the +# spatial_ref_sys table. This will permit you to perform ST_Transform() +# operations on geometries. +#epsg_databases=( "enable" "epsg" "on" "these" "databases" ) + +# Add comments to PostGIS functions to the databases in this list. +#comment_databases=( "comments" "on" "these" "databases" ) + +# Any databases you have that are already PostGIS enabled can be listed among +# the following list to perform a soft upgrade. If the soft upgrade fails, +# you'll need to do a hard upgrade. +# http://postgis.refractions.net/documentation/manual-1.5/ch02.html#hard_upgrade + +# Upgrade from PostGIS 1.2 to 1.4 +#upgrade_from_1_2=( "upgrade" "these" "databases" ) + +# Upgrade from PostGIS 1.3 to 1.4 +#upgrade_from_1_3=( "upgrade" "these" "databases" ) + +# Perform a minor upgrade for PostGIS 1.4 +#upgrade_from_1_4=( "upgrade" "these" "databases" ) + +# Uncomment this once you're satisfied with the settings in this file. +#configured="true" diff --git a/dev-db/postgis/metadata.xml b/dev-db/postgis/metadata.xml new file mode 100644 index 000000000000..59080cd96a27 --- /dev/null +++ b/dev-db/postgis/metadata.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <herd>sci-geosciences</herd> + <use> + <flag name="gtk">Build shp2pgsql-gui a graphical interface to shp2pgsql</flag> + </use> +</pkgmetadata> diff --git a/dev-db/postgis/postgis-2.0.3.ebuild b/dev-db/postgis/postgis-2.0.3.ebuild new file mode 100644 index 000000000000..caed0ad5b76b --- /dev/null +++ b/dev-db/postgis/postgis-2.0.3.ebuild @@ -0,0 +1,265 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit autotools eutils versionator + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk" + +RDEPEND=" + || ( + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + dev-db/postgresql:8.4[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.3.8 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.9 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig +" + +PGIS="$(get_version_component_range 1-2)" + +RESTRICT="test" + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +# Because developers have been fooled into thinking recursive make is a +# good thing. +MAKEOPTS="-j1" + +pkg_setup() { + export PGSLOT="$(postgresql-config show)" + + if [[ ${PGSLOT//.} < 84 || ${PGSLOT//.} > 92 ]] ; then + eerror "You must build ${CATEGORY}/${P} against PostgreSQL 8.4 - 9.2." + eerror "Set an appropriate slot with postgresql-config." + die 'Select a PostgreSQL slot between 8.4 and 9.2' + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-${PGIS}-ldflags.patch" \ + "${FILESDIR}/${PN}-${PGIS}-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf ${myargs} +} + +src_compile() { + # Occasionally, builds fail because of out of order compilation. + # Otherwise, it'd be fine. + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_version + server_version=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null) + if [[ $? = 0 ]] ; then + server_version=$(echo ${server_version} | cut -d " " -f 2 | \ + cut -d "." -f -2 | tr -d .) + if [[ $server_version != ${PGSLOT//.} ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "To enable other databases, change the default slot:" + einfo " postgresql-config set <slot>" + einfo "Then, emerge this package again:" + einfo " emerge -av =${CATEGORY}/${PF}" +} diff --git a/dev-db/postgis/postgis-2.0.6.ebuild b/dev-db/postgis/postgis-2.0.6.ebuild new file mode 100644 index 000000000000..3cb8313abbd7 --- /dev/null +++ b/dev-db/postgis/postgis-2.0.6.ebuild @@ -0,0 +1,262 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit autotools eutils versionator + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk" + +RDEPEND=" + || ( + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + dev-db/postgresql:8.4[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.3.8 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.9 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig +" + +PGIS="$(get_version_component_range 1-2)" + +RESTRICT="test" + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +# Because developers have been fooled into thinking recursive make is a +# good thing. +MAKEOPTS="-j1" + +pkg_setup() { + export PGSLOT="$(postgresql-config show)" + + if [[ ${PGSLOT//.} < 84 || ${PGSLOT//.} > 92 ]] ; then + eerror "You must build ${CATEGORY}/${P} against PostgreSQL 8.4 - 9.2." + eerror "Set an appropriate slot with postgresql-config." + die 'Select a PostgreSQL slot between 8.4 and 9.2' + fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-${PGIS}-ldflags.patch" \ + "${FILESDIR}/${PN}-${PGIS}-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf ${myargs} +} + +src_compile() { + # Occasionally, builds fail because of out of order compilation. + # Otherwise, it'd be fine. + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-2.1.0.ebuild b/dev-db/postgis/postgis-2.1.0.ebuild new file mode 100644 index 000000000000..10c8d4898099 --- /dev/null +++ b/dev-db/postgis/postgis-2.1.0.ebuild @@ -0,0 +1,293 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk" + +RDEPEND=" + || ( + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.3.8 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.3 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig +" + +PGIS="$(get_version_component_range 1-2)" + +RESTRICT="test" + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +# Because developers have been fooled into thinking recursive make is a +# good thing. +MAKEOPTS="-j1" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_pretend() { + postgres_check_slot || die +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + # Occasionally, builds fail because of out of order compilation. + # Otherwise, it'd be fine. + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_version + server_version=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null) + if [[ $? = 0 ]] ; then + server_version=$(echo ${server_version} | cut -d " " -f 2 | \ + cut -d "." -f -2 | tr -d .) + if [[ $server_version != ${PGSLOT//.} ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "To enable other databases, change the default slot:" + einfo " postgresql-config set <slot>" + einfo "Then, emerge this package again:" + einfo " emerge -av =${CATEGORY}/${PF}" +} diff --git a/dev-db/postgis/postgis-2.1.1.ebuild b/dev-db/postgis/postgis-2.1.1.ebuild new file mode 100644 index 000000000000..7f411475294c --- /dev/null +++ b/dev-db/postgis/postgis-2.1.1.ebuild @@ -0,0 +1,298 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + <dev-libs/json-c-0.11 + dev-libs/libxml2:2 + >=sci-libs/geos-3.3.8 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +# Because developers have been fooled into thinking recursive make is a +# good thing. +MAKEOPTS="-j1" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_pretend() { + postgres_check_slot || die +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + # Occasionally, builds fail because of out of order compilation. + # Otherwise, it'd be fine. + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_version + server_version=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null) + if [[ $? = 0 ]] ; then + server_version=$(echo ${server_version} | cut -d " " -f 2 | \ + cut -d "." -f -2 | tr -d .) + if [[ $server_version != ${PGSLOT//.} ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "To enable other databases, change the default slot:" + einfo " postgresql-config set <slot>" + einfo "Then, emerge this package again:" + einfo " emerge -av =${CATEGORY}/${PF}" +} diff --git a/dev-db/postgis/postgis-2.1.4.ebuild b/dev-db/postgis/postgis-2.1.4.ebuild new file mode 100644 index 000000000000..6d7fa207a94a --- /dev/null +++ b/dev-db/postgis/postgis-2.1.4.ebuild @@ -0,0 +1,291 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.4.2 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_pretend() { + postgres_check_slot || die +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-2.1.5.ebuild b/dev-db/postgis/postgis-2.1.5.ebuild new file mode 100644 index 000000000000..6d7fa207a94a --- /dev/null +++ b/dev-db/postgis/postgis-2.1.5.ebuild @@ -0,0 +1,291 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.4.2 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_pretend() { + postgres_check_slot || die +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-2.1.6.ebuild b/dev-db/postgis/postgis-2.1.6.ebuild new file mode 100644 index 000000000000..d3324592d994 --- /dev/null +++ b/dev-db/postgis/postgis-2.1.6.ebuild @@ -0,0 +1,287 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.4.2 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-2.1.7.ebuild b/dev-db/postgis/postgis-2.1.7.ebuild new file mode 100644 index 000000000000..1397b5b15186 --- /dev/null +++ b/dev-db/postgis/postgis-2.1.7.ebuild @@ -0,0 +1,287 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4,5} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.4.2 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-2.1.8.ebuild b/dev-db/postgis/postgis-2.1.8.ebuild new file mode 100644 index 000000000000..1397b5b15186 --- /dev/null +++ b/dev-db/postgis/postgis-2.1.8.ebuild @@ -0,0 +1,287 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4,5} ) + +inherit autotools eutils versionator + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +SRC_URI="http://download.osgeo.org/postgis/source/${MY_P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.4.2 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +PGIS="$(get_version_component_range 1-2)" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" \ + "${FILESDIR}/${PN}-2.0-arflags.patch" \ + "${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgis/postgis-9999.ebuild b/dev-db/postgis/postgis-9999.ebuild new file mode 100644 index 000000000000..0c0588afd8c8 --- /dev/null +++ b/dev-db/postgis/postgis-9999.ebuild @@ -0,0 +1,290 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" +POSTGRES_COMPAT=( 9.{0,1,2,3,4,5} ) + +inherit autotools eutils versionator subversion + +MY_PV=$(replace_version_separator 3 '') +MY_P="${PN}-${MY_PV}" +S="${WORKDIR}/${MY_P}" + +ESVN_REPO_URI="http://svn.osgeo.org/postgis/trunk/" + +DESCRIPTION="Geographic Objects for PostgreSQL" +HOMEPAGE="http://postgis.net" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="" +IUSE="doc gtk static-libs test" + +RDEPEND=" + || ( + dev-db/postgresql:9.5[server] + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-libs/json-c + dev-libs/libxml2:2 + >=sci-libs/geos-3.4.2 + >=sci-libs/proj-4.6.0 + >=sci-libs/gdal-1.10.0 + gtk? ( x11-libs/gtk+:2 ) +" + +DEPEND="${RDEPEND} + doc? ( + app-text/docbook-xsl-stylesheets + app-text/docbook-xml-dtd:4.5 + dev-libs/libxslt + || ( + media-gfx/imagemagick[png] + media-gfx/graphicsmagick[imagemagick,png] + ) + ) + virtual/pkgconfig + test? ( dev-util/cunit ) +" + +# TODO can be read from Version.config +PGIS="2.2" + +REQUIRED_USE="test? ( doc )" + +# Needs a running psql instance, doesn't work out of the box +RESTRICT="test" + +MAKEOPTS+=' -j1' + +# These modules are built using the same *FLAGS that were used to build +# dev-db/postgresql. The right thing to do is to ignore the current +# *FLAGS settings. +QA_FLAGS_IGNORED="usr/lib(64)?/(rt)?postgis-${PGIS}\.so" + +postgres_check_slot() { + if ! declare -p POSTGRES_COMPAT &>/dev/null; then + die 'POSTGRES_COMPAT not declared.' + fi + +# Don't die because we can't run postgresql-config during pretend. +[[ "$EBUILD_PHASE" = "pretend" \ + && -z "$(which postgresql-config 2> /dev/null)" ]] && return 0 + + local res=$(echo ${POSTGRES_COMPAT[@]} \ + | grep -c $(postgresql-config show 2> /dev/null) 2> /dev/null) + + if [[ "$res" -eq "0" ]] ; then + eerror "PostgreSQL slot must be set to one of: " + eerror " ${POSTGRES_COMPAT[@]}" + return 1 + fi + + return 0 +} + +pkg_setup() { + postgres_check_slot || die + export PGSLOT="$(postgresql-config show)" +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1-ldflags.patch" +# epatch "${FILESDIR}/${PN}-2.0-arflags.patch" +# epatch "${FILESDIR}/${PN}-2.1.4-pkgconfig-json.patch" + + local AT_M4DIR="macros" + eautoreconf +} + +src_configure() { + local myargs="" + use gtk && myargs+=" --with-gui" + econf \ + --with-pgconfig="/usr/lib/postgresql-${PGSLOT}/bin/pg_config" \ + ${myargs} +} + +src_compile() { + emake + emake -C topology + + if use doc ; then + emake comments + emake cheatsheets + emake -C doc html + fi +} + +src_install() { + emake DESTDIR="${D}" install + use doc && emake DESTDIR="${D}" comments-install + emake -C topology DESTDIR="${D}" install + dobin ./utils/postgis_restore.pl + + dodoc CREDITS TODO loader/README.* doc/*txt + + use doc && dohtml -r doc/html/* + + docinto topology + dodoc topology/{TODO,README} + + insinto /etc + doins "${FILESDIR}/postgis_dbs" + + use static-libs || find "${ED}" -name '*.a' -delete +} + +pkg_postinst() { + postgresql-config update + + elog "To finish installing or updating PostGIS edit:" + elog " ${EROOT%/}/etc/postgis_dbs" + elog + elog "Then, run:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_config(){ + source "${EROOT%/}/etc/conf.d/postgresql-${PGSLOT}" + source "${EROOT%/}/etc/postgis_dbs" + local postgis_path="${EROOT%/}/usr/share/postgresql-${PGSLOT}/contrib/postgis-${PGIS}" + + if [[ -n ${configured} ]] ; then + einfon "Password for PostgreSQL user '${pguser}': " + read -s PGPASSWORD + export PGPASSWORD + echo + else + eerror "You must edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "Before running 'emerge --config =${CATEGORY}/${PF}'" + eerror + die "Edit postgis_dbs" + fi + + # The server we work with must be the same slot we built against. + local server_match + server_match=$(psql -U ${pguser} -d postgres -p ${PGPORT} \ + -Aqwtc 'SELECT version()' 2> /dev/null | grep -c "PostgreSQL ${PGSLOT}") + if [[ $? = 0 ]] ; then + if [[ $server_match -ne 1 ]] ; then + unset PGPASSWORD + eerror "Server version must be ${PGSLOT}.x" + die "Server version isn't ${PGSLOT}.x" + fi + else + unset PGPASSWORD + eerror "Is the server running?" + die "Couldn't connect to server." + fi + + local retval + safe_exit() { + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + eend $retval + eerror "All actions could not be performed." + eerror "Read above to see what failed." + eerror "Once you fix the issue, you'll need to edit:" + eerror " ${EROOT%/}/etc/postgis_dbs" + eerror "As some things may have succeeded." + eerror + die "All actions could not be performed" + } + + local db + for db in ${databases[@]} ; do + ebegin "Performing CREATE LANGUAGE on ${db}" + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit || eend 0 + + ebegin "Enabling PostGIS on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${templates[@]} ; do + ebegin "Creating template database '${db}'" + createdb -p ${PGPORT} -U ${pguser} -O ${pguser} -T ${from_template} \ + ${db} "PostGIS Template" + retval=$? + [[ $retval != 0 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -c \ + "UPDATE pg_database \ + SET datistemplate = TRUE, datallowconn = TRUE \ + WHERE datname = '${db}'" + retval=$? + [[ $retval != 0 ]] && safe_exit + + createlang -U ${pguser} -p ${PGPORT} plpgsql ${db} + retval=$? + # In this case, only error code 1 is fatal + [[ $retval == 1 ]] && safe_exit + + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${epsg_databases[@]} ; do + ebegin "Adding EPSG to ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/spatial_ref_sys.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${comment_databases[@]} ; do + ebegin "Adding comments on ${db}" + local comment_file + for comment_file in "${postgis_path}"/*_comments.sql ; do + psql -q -U ${pguser} -p ${PGPORT} -d ${db} -f "${comment_file}" + retval=$? + [[ $retval == 0 ]] && continue || safe_exit + done + eend 0 + done + + for db in ${upgrade_from_1_3[@]} ; do + ebegin "Upgrading from PostGIS 1.3 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_13_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_4[@]} ; do + ebegin "Upgrading from PostGIS 1.4 to ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_14_to_${PGIS//.}.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + for db in ${upgrade_from_1_5[@]} ; do + ebegin "Minor upgrade for PostGIS ${PGIS} on ${db}" + psql -q -U ${pguser} -p ${PGPORT} -d ${db} \ + -f "${postgis_path}/postgis_upgrade_${PGIS//.}_minor.sql" + retval=$? + [[ $retval == 0 ]] && eend 0 || safe_exit + done + + # Clean up and make it so the user has to edit postgis_dbs again that + # way this script won't step on any toes due to user error. + unset PGPASSWORD + sed -e 's/\(configured\)/#\1/' -i "${EROOT%/}/etc/postgis_dbs" + einfo "PostgreSQL ${PGSLOT} is now PostGIS enabled." + einfo + einfo "Currently, only one PostgreSQL slot at a time can be PostGIS enabled." +} diff --git a/dev-db/postgresql/Manifest b/dev-db/postgresql/Manifest new file mode 100644 index 000000000000..b345bd1fcf99 --- /dev/null +++ b/dev-db/postgresql/Manifest @@ -0,0 +1,11 @@ +DIST postgresql-9.0.21.tar.bz2 15044880 SHA256 6ed313dd4b12650fc5fc667cfef9f3f53c0f7664a6c2ecfba8d45e2b01709cb8 SHA512 86fcf1e59964b842c413e526a92f7d9042416d32d783f7bef63317ce5497ad3326c389267b217f3d3fb247d387f68c452c9083804823bfbbd0d2ea1237f3b83d WHIRLPOOL c031ff71739681a97a0f9df5f2ad1ccb4a6da91153efc0aaac99ef23a98e7093f9c980049e551d9b3f483b5dd32d84ebcc6ee11a1ab6765357c37120dc30c38f +DIST postgresql-9.0.22.tar.bz2 15046629 SHA256 94d4b20d854cd7fa4c9c322c0b602751edbc5ca0d4f29fe92f996e28bb32f8a5 SHA512 19e7888f92c0cc6c948dd78831768fd7184fc4bc25ca1950a76f5175ed1763b8a34949e90eebbb063b072fbcac64c9fdf6072f5a22eaaae0c33e93cf6c49955b WHIRLPOOL 8b785c90a40fc32975cb81a9d8bf22bdd8667fd26710a962cecbf81c25f6348b3c49f30a91066ad8bb1bffce55658bab50181a2a82e217a7e71d7d361f2e5d92 +DIST postgresql-9.1.17.tar.bz2 15817867 SHA256 ddddd0a250c4b415d2edbf90671808276f29d81ee01971806f8ec5f2beae16aa SHA512 75a3382a70ba673a8ef4a48377acb494d508cb567cfb432f2bc1cf964332facb45d45f501b0b1127e952433a5fa9fbcc70d3823de25579e9624554045d4a207a WHIRLPOOL e428e3633f7478b914dd0ad187cdfa89a66796b45529098d2724ff50992ebc95324fc6e668f4fb4fbdf0fb2004dce4005611dc0002c0b25f58bb68b7faffecc5 +DIST postgresql-9.1.18.tar.bz2 15822081 SHA256 2726d526666904b454f87fe2ae54357c2ab9eb8aba299a4c904829b7598584a8 SHA512 ba51e431c947b749c6522fd887ecbf50bf50cc08f2323b122a35fb18fccceb46d50f0e632a5b19df9855b5a29c98534d19f241d31e5bc235b0b06e8fb210210e WHIRLPOOL 59b5e6fb5626d630e41a8c0497480948d5bb0751fffbe1602dc62009948bad047c2ddc805caa3510157924c0fc74ead2fb2a71d0569d5c1b56eae753d9dbcd1a +DIST postgresql-9.2.12.tar.bz2 16396804 SHA256 5f381b15fb63f7aa6b221ee56677b6029db0ae4f84bc78768ff9e753063b6d03 SHA512 6b4ee661fc979d33b373f759f936bd823616b31c45d4a670500e15a1265e05c06a45888033256bc38ea8bda139147461cbb1f2d5b2aff4f7a6b8939fb6286a1e WHIRLPOOL 2883c1744246af0063605117d4699c6c55448520783eec1042ee1b613f0c37ab2dd06451c1a3633f042461036a5dac041414088ccdce499c2e6a0f4b818327e1 +DIST postgresql-9.2.13.tar.bz2 16401289 SHA256 5dcbd6209a8c0f508504fa433486583a42caaa240c823e1b3576db8a72db6a44 SHA512 0bcf8284aad756a70cd5e6d34a9f2cc17825151740da1c90a459edbf188a9a366831b71999803d301f0de35a5778f524b72779818b89599ffeb41cf1c2140077 WHIRLPOOL 3859e3e5c994441bc931ee92042a08eeb7b1196301b603f311372c2c2c65083b38713f4eac3e06c243703c2446a260b1ae861b7690f1fea03184d0518b10b486 +DIST postgresql-9.3.8.tar.bz2 16960398 SHA256 bc5c3ce755dfc5f6fbc0186a564f97abac3c2914f9a5d5a47f22f4fd354aadfa SHA512 43bb0bac23a8e6908d73739a63562a167c3a043462e40ccbbd7ee478cb7d8e546c8e035a040bba896102c6a3476f3b778571e269d89484ab7b654f230f753e95 WHIRLPOOL ac0d8e0485961d940b4ed6a6f373c580ffb320e9d8b9c938de39935e487448eee48496b3ba0fdd4b8bfea4076ff3d6dc0fa82a0e400b2e4ac088e7b903ca0d40 +DIST postgresql-9.3.9.tar.bz2 16959310 SHA256 f73bd0ec2028511732430beb22414a022d2114231366e8cbe78c149793910549 SHA512 c6a9cae07968c99039910bb98d3e365fc285d2cdef02dd594128bd69ae65926392b18b65b0e13c3f17c366413bffbe226b6e8ce3453774b0439745b18ea129a8 WHIRLPOOL bcbc66a7b846b42c2d17d187e8b2c751afda8e5cdc7fa385ba1145f84e34950fad3b82fc1d04ae7ff9b7de01fd5705d9e507aa841880b97df2edb2ac8749a5fd +DIST postgresql-9.4.3.tar.bz2 17618524 SHA256 734acfd2ac352dd0cd353d226f3199c2e1a2730200998aea5b38cf685136d755 SHA512 8d860c982f3cf62c9f9ef4aad7c2d637e1cf8285338d57fca833051d66747660ecbf46b351a2a1f81ba3fe150c8700e76dcc5219adbf07e9adccfde9f52ae9f1 WHIRLPOOL cf09a4c7445ad77352bf4fc8fb6cbdaef28b4c592e2a3c963f228d1ece962ed454c6025aec0210e07d7ba07a5e2d070ebe285d9c660c2f08637a4f52f74b9356 +DIST postgresql-9.4.4.tar.bz2 17616272 SHA256 538ed99688d6fdbec6fd166d1779cf4588bf2f16c52304e5ef29f904c43b0013 SHA512 e0f0efc2e3a01c93dad98796476808d60be243841104ceb496d2227214a9b4c5a32c5f550f0a456b0c64f2458aae32026960b63f68188269d367d900683a6061 WHIRLPOOL 9041b4b4e1b53bc97345fe587bc874df1185ef76fe105bfb54e9c882f3fd51841448e92deb12e1415ce76158da0683fcff333e08b9e54a8be565562ebfec6175 +DIST postgresql-9.5alpha1.tar.bz2 18103456 SHA256 c97779f6c539e9072fa853fca8273f910f08805ae74456a01ab1fd0841ecfca2 SHA512 b220bf7f3ac97aaa790d09f981c7050ebed0d08517e61749d10e2f837cac0de259ca650aae4c31295147d7791a1a8f1c973057448937e386fb197b1b03cf9ec1 WHIRLPOOL 7bfac23f5942bc557655f2c6f97d6ad1bf6bfd568fb0497ed127c50dec4ef07ae88f89568588e20e00f681c921a512b14e61f3ca6a506508d17e96d8eb4f0817 diff --git a/dev-db/postgresql/files/pg_ctl-exit-status.patch b/dev-db/postgresql/files/pg_ctl-exit-status.patch new file mode 100644 index 000000000000..bbbd4498555d --- /dev/null +++ b/dev-db/postgresql/files/pg_ctl-exit-status.patch @@ -0,0 +1,12 @@ +diff -Naur a/src/bin/pg_ctl/pg_ctl.c b/src/bin/pg_ctl/pg_ctl.c +--- a/src/bin/pg_ctl/pg_ctl.c 2011-04-14 23:18:15 -0400 ++++ b/src/bin/pg_ctl/pg_ctl.c 2011-08-01 19:44:54 -0400 +@@ -975,7 +975,7 @@ + } + } + printf(_("%s: no server running\n"), progname); +- exit(1); ++ exit(3); + } + + diff --git a/dev-db/postgresql/files/postgresql-9.0-no-server.patch b/dev-db/postgresql/files/postgresql-9.0-no-server.patch new file mode 100644 index 000000000000..1b45cd954c5e --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.0-no-server.patch @@ -0,0 +1,135 @@ +diff -Naur a/contrib/Makefile b/contrib/Makefile +--- a/contrib/Makefile 2011-02-02 07:37:16.654175660 -0500 ++++ b/contrib/Makefile 2011-02-08 05:54:00.145582001 -0500 +@@ -5,51 +5,10 @@ + include $(top_builddir)/src/Makefile.global + + SUBDIRS = \ +- adminpack \ +- auto_explain \ +- btree_gin \ +- btree_gist \ +- chkpass \ +- citext \ +- cube \ +- dblink \ +- dict_int \ +- dict_xsyn \ +- earthdistance \ +- fuzzystrmatch \ +- hstore \ +- intagg \ +- intarray \ +- isn \ +- lo \ +- ltree \ + oid2name \ +- pageinspect \ +- passwordcheck \ +- pg_archivecleanup \ +- pg_buffercache \ +- pg_freespacemap \ +- pg_standby \ +- pg_stat_statements \ +- pg_trgm \ +- pg_upgrade \ +- pg_upgrade_support \ + pgbench \ +- pgcrypto \ +- pgrowlocks \ +- pgstattuple \ +- seg \ +- spi \ +- tablefunc \ +- test_parser \ +- tsearch2 \ +- unaccent \ + vacuumlo + +-ifeq ($(with_openssl),yes) +-SUBDIRS += sslinfo +-endif +- + ifeq ($(with_ossp_uuid),yes) + SUBDIRS += uuid-ossp + endif +diff -Naur a/src/backend/Makefile b/src/backend/Makefile +--- a/src/backend/Makefile 2011-02-02 07:37:56.403870592 -0500 ++++ b/src/backend/Makefile 2011-02-08 05:57:26.078497002 -0500 +@@ -45,7 +45,7 @@ + + ########################################################################## + +-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP) ++all: someheaders + + ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) +@@ -114,7 +114,7 @@ + endif # aix + + # Update the commonly used headers before building the subdirectories +-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h ++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/probes.h + + # run this unconditionally to avoid needing to know its dependencies here: + submake-schemapg: +@@ -191,23 +191,7 @@ + + ########################################################################## + +-install: all installdirs install-bin +-ifeq ($(PORTNAME), cygwin) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +-ifeq ($(PORTNAME), win32) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +- $(MAKE) -C catalog install-data +- $(MAKE) -C tsearch install-data +- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample' +- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample' +- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample' +- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample' ++install: + + install-bin: postgres $(POSTGRES_IMP) installdirs + $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)' +diff -Naur a/src/bin/Makefile b/src/bin/Makefile +--- a/src/bin/Makefile 2011-02-02 07:38:35.133570047 -0500 ++++ b/src/bin/Makefile 2011-02-08 05:58:48.819847001 -0500 +@@ -13,8 +13,7 @@ + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + +-SUBDIRS = initdb pg_ctl pg_dump \ +- psql scripts pg_config pg_controldata pg_resetxlog ++SUBDIRS = pg_dump psql scripts pg_config + ifeq ($(PORTNAME), win32) + SUBDIRS+=pgevent + endif +diff -Naur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2011-02-02 07:37:56.283870942 -0500 ++++ b/src/Makefile 2011-02-08 06:00:51.591202002 -0500 +@@ -15,17 +15,11 @@ + + all install installdirs uninstall distprep: + $(MAKE) -C port $@ +- $(MAKE) -C timezone $@ + $(MAKE) -C backend $@ +- $(MAKE) -C backend/utils/mb/conversion_procs $@ +- $(MAKE) -C backend/snowball $@ + $(MAKE) -C include $@ + $(MAKE) -C interfaces $@ +- $(MAKE) -C backend/replication/libpqwalreceiver $@ + $(MAKE) -C bin $@ +- $(MAKE) -C pl $@ + $(MAKE) -C makefiles $@ +- $(MAKE) -C test/regress $@ + + install: install-local + diff --git a/dev-db/postgresql/files/postgresql-9.1-no-server.patch b/dev-db/postgresql/files/postgresql-9.1-no-server.patch new file mode 100644 index 000000000000..64363a0f4112 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.1-no-server.patch @@ -0,0 +1,141 @@ +diff -Naur a/contrib/Makefile b/contrib/Makefile +--- a/contrib/Makefile 2011-09-08 17:13:27.000000000 -0400 ++++ b/contrib/Makefile 2011-09-16 21:58:34.080579316 -0400 +@@ -5,56 +5,10 @@ + include $(top_builddir)/src/Makefile.global + + SUBDIRS = \ +- adminpack \ +- auth_delay \ +- auto_explain \ +- btree_gin \ +- btree_gist \ +- chkpass \ +- citext \ +- cube \ +- dblink \ +- dict_int \ +- dict_xsyn \ +- dummy_seclabel \ +- earthdistance \ +- file_fdw \ +- fuzzystrmatch \ +- hstore \ +- intagg \ +- intarray \ +- isn \ +- lo \ +- ltree \ + oid2name \ +- pageinspect \ +- passwordcheck \ +- pg_archivecleanup \ +- pg_buffercache \ +- pg_freespacemap \ +- pg_standby \ +- pg_stat_statements \ +- pg_test_fsync \ +- pg_trgm \ +- pg_upgrade \ +- pg_upgrade_support \ + pgbench \ +- pgcrypto \ +- pgrowlocks \ +- pgstattuple \ +- seg \ +- spi \ +- tablefunc \ +- test_parser \ +- tsearch2 \ +- unaccent \ + vacuumlo + +-ifeq ($(with_openssl),yes) +-SUBDIRS += sslinfo +-else +-ALWAYS_SUBDIRS += sslinfo +-endif + + ifeq ($(with_ossp_uuid),yes) + SUBDIRS += uuid-ossp +diff -Naur a/src/backend/Makefile b/src/backend/Makefile +--- a/src/backend/Makefile 2011-09-08 17:13:27.000000000 -0400 ++++ b/src/backend/Makefile 2011-09-16 22:01:48.400579314 -0400 +@@ -45,7 +45,7 @@ + + ########################################################################## + +-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP) ++all: someheaders + + ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) +@@ -114,7 +114,7 @@ + endif # aix + + # Update the commonly used headers before building the subdirectories +-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h ++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h + + # run this unconditionally to avoid needing to know its dependencies here: + submake-schemapg: +@@ -206,23 +206,7 @@ + + ########################################################################## + +-install: all installdirs install-bin +-ifeq ($(PORTNAME), cygwin) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +-ifeq ($(PORTNAME), win32) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +- $(MAKE) -C catalog install-data +- $(MAKE) -C tsearch install-data +- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample' +- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample' +- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample' +- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample' ++install: + + install-bin: postgres $(POSTGRES_IMP) installdirs + $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)' +diff -Naur a/src/bin/Makefile b/src/bin/Makefile +--- a/src/bin/Makefile 2011-09-08 17:13:27.000000000 -0400 ++++ b/src/bin/Makefile 2011-09-16 22:03:48.250579314 -0400 +@@ -13,8 +13,7 @@ + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + +-SUBDIRS = initdb pg_ctl pg_dump \ +- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup ++SUBDIRS = pg_dump psql scripts pg_config + + ifeq ($(PORTNAME), win32) + SUBDIRS += pgevent +diff -Naur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2011-09-08 17:13:27.000000000 -0400 ++++ b/src/Makefile 2011-09-16 22:29:17.650579302 -0400 +@@ -14,17 +14,11 @@ + + SUBDIRS = \ + port \ +- timezone \ + backend \ +- backend/utils/mb/conversion_procs \ +- backend/snowball \ + include \ + interfaces \ +- backend/replication/libpqwalreceiver \ + bin \ +- pl \ +- makefiles \ +- test/regress ++ makefiles + + # There are too many interdependencies between the subdirectories, so + # don't attempt parallel make here. diff --git a/dev-db/postgresql/files/postgresql-9.1-tz-dir-overflow.patch b/dev-db/postgresql/files/postgresql-9.1-tz-dir-overflow.patch new file mode 100644 index 000000000000..9d12c57ecc3a --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.1-tz-dir-overflow.patch @@ -0,0 +1,29 @@ +--- a/src/timezone/pgtz.c 2015-02-02 15:45:23.000000000 -0500 ++++ b/src/timezone/pgtz.c 2015-04-07 14:21:22.341832190 -0400 +@@ -586,6 +586,12 @@ + if (direntry->d_name[0] == '.') + continue; + ++ /* if current working directory has the same name as current direntry name, ++ * then skip as this is a recursive fs loop ++ */ ++ if (strncmp(direntry->d_name,tzdirsub,strlen(direntry->d_name)) == 0) ++ continue; ++ + snprintf(tzdir + tzdir_orig_len, MAXPGPATH - tzdir_orig_len, + "/%s", direntry->d_name); + +@@ -1615,6 +1621,13 @@ + if (direntry->d_name[0] == '.') + continue; + ++ /* copy current working directory so that there is no risk of modification by basename(), ++ * and compare to current direntry name; skip if they are the same as this is a recursive fs loop ++ */ ++ snprintf(fullname, MAXPGPATH, "%s", dir->dirname[dir->depth]); ++ if (strncmp(direntry->d_name,basename(fullname),strlen(direntry->d_name)) == 0) ++ continue; ++ + snprintf(fullname, MAXPGPATH, "%s/%s", + dir->dirname[dir->depth], direntry->d_name); + if (stat(fullname, &statbuf) != 0) diff --git a/dev-db/postgresql/files/postgresql-9.2-9.4-tz-dir-overflow.patch b/dev-db/postgresql/files/postgresql-9.2-9.4-tz-dir-overflow.patch new file mode 100644 index 000000000000..59e43c5384e7 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.2-9.4-tz-dir-overflow.patch @@ -0,0 +1,16 @@ +--- a/src/timezone/pgtz.c 2015-02-02 15:45:23.000000000 -0500 ++++ b/src/timezone/pgtz.c 2015-04-07 14:21:22.341832190 -0400 +@@ -1615,6 +1615,13 @@ + if (direntry->d_name[0] == '.') + continue; + ++ /* copy current working directory so that there is no risk of modification by basename(), ++ * and compare to current direntry name; skip if they are the same as this is a recursive fs loop ++ */ ++ snprintf(fullname, MAXPGPATH, "%s", dir->dirname[dir->depth]); ++ if (strncmp(direntry->d_name,basename(fullname),strlen(direntry->d_name)) == 0) ++ continue; ++ + snprintf(fullname, MAXPGPATH, "%s/%s", + dir->dirname[dir->depth], direntry->d_name); + if (stat(fullname, &statbuf) != 0) diff --git a/dev-db/postgresql/files/postgresql-9.2-no-server.patch b/dev-db/postgresql/files/postgresql-9.2-no-server.patch new file mode 100644 index 000000000000..a0c33efc63ae --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.2-no-server.patch @@ -0,0 +1,143 @@ +diff -Naur a/contrib/Makefile b/contrib/Makefile +--- a/contrib/Makefile 2012-05-10 18:35:09.000000000 -0400 ++++ b/contrib/Makefile 2012-05-20 09:33:47.892622992 -0400 +@@ -5,58 +5,10 @@ + include $(top_builddir)/src/Makefile.global + + SUBDIRS = \ +- adminpack \ +- auth_delay \ +- auto_explain \ +- btree_gin \ +- btree_gist \ +- chkpass \ +- citext \ +- cube \ +- dblink \ +- dict_int \ +- dict_xsyn \ +- dummy_seclabel \ +- earthdistance \ +- file_fdw \ +- fuzzystrmatch \ +- hstore \ +- intagg \ +- intarray \ +- isn \ +- lo \ +- ltree \ + oid2name \ +- pageinspect \ +- passwordcheck \ +- pg_archivecleanup \ +- pg_buffercache \ +- pg_freespacemap \ +- pg_standby \ +- pg_stat_statements \ +- pg_test_fsync \ +- pg_test_timing \ +- pg_trgm \ +- pg_upgrade \ +- pg_upgrade_support \ + pgbench \ +- pgcrypto \ +- pgrowlocks \ +- pgstattuple \ +- seg \ +- spi \ +- tablefunc \ +- tcn \ +- test_parser \ +- tsearch2 \ +- unaccent \ + vacuumlo + +-ifeq ($(with_openssl),yes) +-SUBDIRS += sslinfo +-else +-ALWAYS_SUBDIRS += sslinfo +-endif + + ifeq ($(with_ossp_uuid),yes) + SUBDIRS += uuid-ossp +diff -Naur a/src/backend/Makefile b/src/backend/Makefile +--- a/src/backend/Makefile 2012-05-10 18:35:09.000000000 -0400 ++++ b/src/backend/Makefile 2012-05-20 09:36:24.446654842 -0400 +@@ -45,7 +45,7 @@ + + ########################################################################## + +-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP) ++all: someheaders + + ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) +@@ -114,7 +114,7 @@ + endif # aix + + # Update the commonly used headers before building the subdirectories +-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h ++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h + + # run this unconditionally to avoid needing to know its dependencies here: + submake-schemapg: +@@ -207,23 +207,7 @@ + + ########################################################################## + +-install: all installdirs install-bin +-ifeq ($(PORTNAME), cygwin) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +-ifeq ($(PORTNAME), win32) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +- $(MAKE) -C catalog install-data +- $(MAKE) -C tsearch install-data +- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample' +- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample' +- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample' +- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample' ++install: + + install-bin: postgres $(POSTGRES_IMP) installdirs + $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)' +diff -Naur a/src/bin/Makefile b/src/bin/Makefile +--- a/src/bin/Makefile 2012-05-10 18:35:09.000000000 -0400 ++++ b/src/bin/Makefile 2012-05-20 09:41:18.489958216 -0400 +@@ -13,8 +13,7 @@ + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + +-SUBDIRS = initdb pg_ctl pg_dump \ +- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup ++SUBDIRS = pg_dump psql scripts pg_config + + ifeq ($(PORTNAME), win32) + SUBDIRS += pgevent +diff -Naur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2012-05-10 18:35:09.000000000 -0400 ++++ b/src/Makefile 2012-05-20 09:40:13.532774840 -0400 +@@ -14,17 +14,11 @@ + + SUBDIRS = \ + port \ +- timezone \ + backend \ +- backend/utils/mb/conversion_procs \ +- backend/snowball \ + include \ + interfaces \ +- backend/replication/libpqwalreceiver \ + bin \ +- pl \ +- makefiles \ +- test/regress ++ makefiles + + # There are too many interdependencies between the subdirectories, so + # don't attempt parallel make here. diff --git a/dev-db/postgresql/files/postgresql-9.3-no-server.patch b/dev-db/postgresql/files/postgresql-9.3-no-server.patch new file mode 100644 index 000000000000..3ce90d60ae70 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.3-no-server.patch @@ -0,0 +1,148 @@ +diff -Naur a/contrib/Makefile b/contrib/Makefile +--- a/contrib/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/contrib/Makefile 2013-06-09 01:48:22.351874929 +0000 +@@ -5,61 +5,10 @@ + include $(top_builddir)/src/Makefile.global + + SUBDIRS = \ +- adminpack \ +- auth_delay \ +- auto_explain \ +- btree_gin \ +- btree_gist \ +- chkpass \ +- citext \ +- cube \ +- dblink \ +- dict_int \ +- dict_xsyn \ +- dummy_seclabel \ +- earthdistance \ +- file_fdw \ +- fuzzystrmatch \ +- hstore \ +- intagg \ +- intarray \ +- isn \ +- lo \ +- ltree \ + oid2name \ +- pageinspect \ +- passwordcheck \ +- pg_archivecleanup \ +- pg_buffercache \ +- pg_freespacemap \ +- pg_standby \ +- pg_stat_statements \ +- pg_test_fsync \ +- pg_test_timing \ +- pg_trgm \ +- pg_upgrade \ +- pg_upgrade_support \ + pgbench \ +- pgcrypto \ +- pgrowlocks \ +- pgstattuple \ +- pg_xlogdump \ +- postgres_fdw \ +- seg \ +- spi \ +- tablefunc \ +- tcn \ +- test_parser \ +- tsearch2 \ +- unaccent \ +- vacuumlo \ +- worker_spi ++ vacuumlo + +-ifeq ($(with_openssl),yes) +-SUBDIRS += sslinfo +-else +-ALWAYS_SUBDIRS += sslinfo +-endif + + ifeq ($(with_ossp_uuid),yes) + SUBDIRS += uuid-ossp +diff -Naur a/src/backend/Makefile b/src/backend/Makefile +--- a/src/backend/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/backend/Makefile 2013-06-09 01:50:19.655864258 +0000 +@@ -47,7 +47,7 @@ + + ########################################################################## + +-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP) ++all: someheaders + + ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) +@@ -116,7 +116,7 @@ + endif # aix + + # Update the commonly used headers before building the subdirectories +-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h ++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h + + # run this unconditionally to avoid needing to know its dependencies here: + submake-schemapg: +@@ -209,23 +209,8 @@ + + ########################################################################## + +-install: all installdirs install-bin +-ifeq ($(PORTNAME), cygwin) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +-ifeq ($(PORTNAME), win32) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +- $(MAKE) -C catalog install-data +- $(MAKE) -C tsearch install-data +- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample' +- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample' +- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample' +- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample' ++install: ++ + + install-bin: postgres $(POSTGRES_IMP) installdirs + $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)' +diff -Naur a/src/bin/Makefile b/src/bin/Makefile +--- a/src/bin/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/bin/Makefile 2013-06-09 01:51:56.143824442 +0000 +@@ -13,8 +13,7 @@ + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + +-SUBDIRS = initdb pg_ctl pg_dump \ +- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup ++SUBDIRS = pg_dump psql scripts pg_config + + ifeq ($(PORTNAME), win32) + SUBDIRS += pgevent +diff -Naur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/Makefile 2013-06-09 01:54:30.479704228 +0000 +@@ -15,17 +15,11 @@ + SUBDIRS = \ + common \ + port \ +- timezone \ + backend \ +- backend/utils/mb/conversion_procs \ +- backend/snowball \ + include \ + interfaces \ +- backend/replication/libpqwalreceiver \ + bin \ +- pl \ +- makefiles \ +- test/regress ++ makefiles + + # There are too many interdependencies between the subdirectories, so + # don't attempt parallel make here. diff --git a/dev-db/postgresql/files/postgresql-9.4-no-server.patch b/dev-db/postgresql/files/postgresql-9.4-no-server.patch new file mode 100644 index 000000000000..c46146e5ec9e --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.4-no-server.patch @@ -0,0 +1,151 @@ +diff -Naur a/contrib/Makefile b/contrib/Makefile +--- a/contrib/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/contrib/Makefile 2013-06-09 01:48:22.351874929 +0000 +@@ -5,64 +5,10 @@ + include $(top_builddir)/src/Makefile.global + + SUBDIRS = \ +- adminpack \ +- auth_delay \ +- auto_explain \ +- btree_gin \ +- btree_gist \ +- chkpass \ +- citext \ +- cube \ +- dblink \ +- dict_int \ +- dict_xsyn \ +- dummy_seclabel \ +- earthdistance \ +- file_fdw \ +- fuzzystrmatch \ +- hstore \ +- intagg \ +- intarray \ +- isn \ +- lo \ +- ltree \ + oid2name \ +- pageinspect \ +- passwordcheck \ +- pg_archivecleanup \ +- pg_buffercache \ +- pg_freespacemap \ +- pg_prewarm \ +- pg_standby \ +- pg_stat_statements \ +- pg_test_fsync \ +- pg_test_timing \ +- pg_trgm \ +- pg_upgrade \ +- pg_upgrade_support \ + pgbench \ +- pgcrypto \ +- pgrowlocks \ +- pgstattuple \ +- pg_xlogdump \ +- postgres_fdw \ +- seg \ +- spi \ +- tablefunc \ +- tcn \ +- test_decoding \ +- test_parser \ +- test_shm_mq \ +- tsearch2 \ +- unaccent \ +- vacuumlo \ +- worker_spi ++ vacuumlo + +-ifeq ($(with_openssl),yes) +-SUBDIRS += sslinfo +-else +-ALWAYS_SUBDIRS += sslinfo +-endif + + ifeq ($(with_ossp_uuid),yes) + SUBDIRS += uuid-ossp +diff -Naur a/src/backend/Makefile b/src/backend/Makefile +--- a/src/backend/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/backend/Makefile 2013-06-09 01:50:19.655864258 +0000 +@@ -47,7 +47,7 @@ + + ########################################################################## + +-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP) ++all: someheaders + + ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) +@@ -116,7 +116,7 @@ + endif # aix + + # Update the commonly used headers before building the subdirectories +-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h ++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h + + # run this unconditionally to avoid needing to know its dependencies here: + submake-schemapg: +@@ -209,23 +209,8 @@ + + ########################################################################## + +-install: all installdirs install-bin +-ifeq ($(PORTNAME), cygwin) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +-ifeq ($(PORTNAME), win32) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +- $(MAKE) -C catalog install-data +- $(MAKE) -C tsearch install-data +- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample' +- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample' +- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample' +- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample' ++install: ++ + + install-bin: postgres $(POSTGRES_IMP) installdirs + $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)' +diff -Naur a/src/bin/Makefile b/src/bin/Makefile +--- a/src/bin/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/bin/Makefile 2013-06-09 01:51:56.143824442 +0000 +@@ -13,8 +13,7 @@ + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + +-SUBDIRS = initdb pg_ctl pg_dump \ +- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup ++SUBDIRS = pg_dump psql scripts pg_config + + ifeq ($(PORTNAME), win32) + SUBDIRS += pgevent +diff -Naur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/Makefile 2013-06-09 01:54:30.479704228 +0000 +@@ -15,17 +15,11 @@ + SUBDIRS = \ + common \ + port \ +- timezone \ + backend \ +- backend/utils/mb/conversion_procs \ +- backend/snowball \ + include \ + interfaces \ +- backend/replication/libpqwalreceiver \ + bin \ +- pl \ +- makefiles \ +- test/regress ++ makefiles + + # There are too many interdependencies between the subdirectories, so + # don't attempt parallel make here. diff --git a/dev-db/postgresql/files/postgresql-9.5-no-server.patch b/dev-db/postgresql/files/postgresql-9.5-no-server.patch new file mode 100644 index 000000000000..1a12d5b820b2 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-9.5-no-server.patch @@ -0,0 +1,152 @@ +diff --git a/contrib/Makefile b/contrib/Makefile +index b37d0dd..b56fbf6 100644 +--- a/contrib/Makefile ++++ b/contrib/Makefile +@@ -5,64 +5,9 @@ top_builddir = .. + include $(top_builddir)/src/Makefile.global + + SUBDIRS = \ +- adminpack \ +- auth_delay \ +- auto_explain \ +- btree_gin \ +- btree_gist \ +- chkpass \ +- citext \ +- cube \ +- dblink \ +- dict_int \ +- dict_xsyn \ +- dummy_seclabel \ +- earthdistance \ +- file_fdw \ +- fuzzystrmatch \ +- hstore \ +- intagg \ +- intarray \ +- isn \ +- lo \ +- ltree \ + oid2name \ +- pageinspect \ +- passwordcheck \ +- pg_archivecleanup \ +- pg_buffercache \ +- pg_freespacemap \ +- pg_prewarm \ +- pg_standby \ +- pg_stat_statements \ +- pg_test_fsync \ +- pg_test_timing \ +- pg_trgm \ +- pg_upgrade \ +- pg_upgrade_support \ + pgbench \ +- pgcrypto \ +- pgrowlocks \ +- pgstattuple \ +- pg_xlogdump \ +- postgres_fdw \ +- seg \ +- spi \ +- tablefunc \ +- tcn \ +- test_decoding \ +- test_parser \ +- test_shm_mq \ +- tsearch2 \ +- unaccent \ +- vacuumlo \ +- worker_spi +- +-ifeq ($(with_openssl),yes) +-SUBDIRS += sslinfo +-else +-ALWAYS_SUBDIRS += sslinfo +-endif ++ vacuumlo + + ifneq ($(with_uuid),no) + SUBDIRS += uuid-ossp +diff -Naur a/src/backend/Makefile b/src/backend/Makefile +--- a/src/backend/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/backend/Makefile 2013-06-09 01:50:19.655864258 +0000 +@@ -47,7 +47,7 @@ + + ########################################################################## + +-all: submake-libpgport submake-schemapg postgres $(POSTGRES_IMP) ++all: someheaders + + ifneq ($(PORTNAME), cygwin) + ifneq ($(PORTNAME), win32) +@@ -116,7 +116,7 @@ + endif # aix + + # Update the commonly used headers before building the subdirectories +-$(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h ++someheaders $(SUBDIRS:%=%-recursive): $(top_builddir)/src/include/parser/gram.h $(top_builddir)/src/include/catalog/schemapg.h $(top_builddir)/src/include/utils/fmgroids.h $(top_builddir)/src/include/utils/errcodes.h $(top_builddir)/src/include/utils/probes.h + + # run this unconditionally to avoid needing to know its dependencies here: + submake-schemapg: +@@ -209,23 +209,8 @@ + + ########################################################################## + +-install: all installdirs install-bin +-ifeq ($(PORTNAME), cygwin) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +-ifeq ($(PORTNAME), win32) +-ifeq ($(MAKE_DLL), true) +- $(INSTALL_DATA) libpostgres.a '$(DESTDIR)$(libdir)/libpostgres.a' +-endif +-endif +- $(MAKE) -C catalog install-data +- $(MAKE) -C tsearch install-data +- $(INSTALL_DATA) $(srcdir)/libpq/pg_hba.conf.sample '$(DESTDIR)$(datadir)/pg_hba.conf.sample' +- $(INSTALL_DATA) $(srcdir)/libpq/pg_ident.conf.sample '$(DESTDIR)$(datadir)/pg_ident.conf.sample' +- $(INSTALL_DATA) $(srcdir)/utils/misc/postgresql.conf.sample '$(DESTDIR)$(datadir)/postgresql.conf.sample' +- $(INSTALL_DATA) $(srcdir)/access/transam/recovery.conf.sample '$(DESTDIR)$(datadir)/recovery.conf.sample' ++install: ++ + + install-bin: postgres $(POSTGRES_IMP) installdirs + $(INSTALL_PROGRAM) postgres$(X) '$(DESTDIR)$(bindir)/postgres$(X)' +diff -Naur a/src/bin/Makefile b/src/bin/Makefile +--- a/src/bin/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/bin/Makefile 2013-06-09 01:51:56.143824442 +0000 +@@ -13,8 +13,7 @@ + top_builddir = ../.. + include $(top_builddir)/src/Makefile.global + +-SUBDIRS = initdb pg_ctl pg_dump \ +- psql scripts pg_config pg_controldata pg_resetxlog pg_basebackup ++SUBDIRS = pg_dump psql scripts pg_config + + ifeq ($(PORTNAME), win32) + SUBDIRS += pgevent +diff -Naur a/src/Makefile b/src/Makefile +--- a/src/Makefile 2013-05-06 20:57:06.000000000 +0000 ++++ b/src/Makefile 2013-06-09 01:54:30.479704228 +0000 +@@ -15,17 +15,11 @@ + SUBDIRS = \ + common \ + port \ +- timezone \ + backend \ +- backend/utils/mb/conversion_procs \ +- backend/snowball \ + include \ + interfaces \ +- backend/replication/libpqwalreceiver \ + bin \ +- pl \ +- makefiles \ +- test/regress ++ makefiles + + # There are too many interdependencies between the subdirectories, so + # don't attempt parallel make here. diff --git a/dev-db/postgresql/files/postgresql-check-db-dir b/dev-db/postgresql/files/postgresql-check-db-dir new file mode 100644 index 000000000000..861b398e5032 --- /dev/null +++ b/dev-db/postgresql/files/postgresql-check-db-dir @@ -0,0 +1,36 @@ +#!/bin/sh +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +eerror() { + echo "$@" >&2 +} + +# Check that DATA_DIR has been set +if [ -z ${DATA_DIR} ] ; then + eerror "DATA_DIR not set" + exit 1 +fi + +# Check that DATA_DIR exists +if [ ! -d ${DATA_DIR} ] ; then + eerror "Directory not found: ${DATA_DIR}" + eerror "HINT: Ensure that DATA_DIR points to the right path." + eerror "HINT: Or perhaps you need to create the database cluster:" + eerror " emerge --config dev-db/postgresql:@SLOT@" + exit 1 +fi + +# Check for the existence of PostgreSQL's config files, and set the +# proper mode and ownership. +# Only three files should be checked as potentially other files +# may be in PGDATA that should not be touched. +for file in postgresql pg_hba pg_ident ; do + file="${PGDATA%/}/${file}.conf" + if [ ! -f ${file} ] ; then + eerror "${file} not found" + eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}" + exit 1 + fi +done diff --git a/dev-db/postgresql/files/postgresql.confd b/dev-db/postgresql/files/postgresql.confd new file mode 100644 index 000000000000..07b465d9b61a --- /dev/null +++ b/dev-db/postgresql/files/postgresql.confd @@ -0,0 +1,58 @@ +# Which port and socket to bind PostgreSQL +PGPORT="5432" + +# How long to wait for server to start in seconds +START_TIMEOUT=10 + +# NICE_QUIT ignores new connections and wait for clients to disconnect from +# server before shutting down. NICE_TIMEOUT in seconds determines how long to +# wait for this to succeed. +NICE_TIMEOUT=60 + +# Forecfully disconnect clients from server and shut down. This is performed +# after NICE_QUIT. Terminated client connections have their open transactions +# rolled back. +# Set RUDE_QUIT to "NO" to disable. RUDE_TIMEOUT in seconds. +RUDE_QUIT="YES" +RUDE_TIMEOUT=30 + +# If the server still fails to shutdown, you can force it to quit by setting +# this to YES and a recover-run will execute on the next startup. +# Set FORCE_QUIT to "YES" to enable. FORCE_TIMEOUT in seconds. +FORCE_QUIT="NO" +FORCE_TIMEOUT=2 + +# Extra options to run postmaster with, e.g.: +# -N is the maximal number of client connections +# -B is the number of shared buffers and has to be at least 2x the value for -N +# Please read the man-page to postmaster for more options. Many of these +# options can be set directly in the configuration file. +#PGOPTS="-N 512 -B 1024" + +# Pass extra environment variables. If you have to export environment variables +# for the database process, this can be done here. +# Don't forget to escape quotes. +#PG_EXTRA_ENV="PGPASSFILE=\"/path/to/.pgpass\"" + +############################################################################## +# +# The following values should not be arbitrarily changed. +# +# `emerge --config dev-db/postgresql:@SLOT@' uses these values to +# determine where to create the data directory, where to place the +# configuration files, and any additional options to pass to initdb. +# +# The initscript also uses these variables to inform PostgreSQL where to find +# its data directory and configuration files. +# +############################################################################## + +# Location of configuration files +PGDATA="/etc/postgresql-@SLOT@/" + +# Where the data directory is located/to be created +DATA_DIR="/var/lib/postgresql/@SLOT@/data" + +# Additional options to pass to initdb. +# See `man initdb' for available options. +PG_INITDB_OPTS="--encoding=UTF8" diff --git a/dev-db/postgresql/files/postgresql.init b/dev-db/postgresql/files/postgresql.init new file mode 100644 index 000000000000..5f07c4d545fc --- /dev/null +++ b/dev-db/postgresql/files/postgresql.init @@ -0,0 +1,138 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +get_config() { + [ -f ${PGDATA%/}/postgresql.conf ] || return 1 + + eval echo $(sed -e 's:#.*::' ${PGDATA%/}/postgresql.conf \ + | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') +} + +depend() { + use net + provide postgresql + + if [ "$(get_config log_destination)" = "syslog" ]; then + use logger + fi +} + +configured_port=$(get_config port) +: ${configured_port:=${PGPORT}} +socket_path=$(get_config unix_socket_directory) +: ${socket_path:=/run/postgresql} + +checkconfig() { + # Check that DATA_DIR has been set + if [ -z ${DATA_DIR} ] ; then + eerror "DATA_DIR not set" + eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-@SLOT@" + return 1 + fi + + # Check that DATA_DIR exists + if [ ! -d ${DATA_DIR} ] ; then + eerror "Directory not found: ${DATA_DIR}" + eerror "HINT: Ensure that DATA_DIR points to the right path." + eerror "HINT: Or perhaps you need to create the database cluster:" + eerror " emerge --config dev-db/postgresql:@SLOT@" + return 1 + fi + + # Check for the existence of PostgreSQL's config files, and set the + # proper mode and ownership. + # Only three files should be checked as potentially other files + # may be in PGDATA that should not be touched. + local file + for file in postgresql pg_hba pg_ident ; do + file="${PGDATA%/}/${file}.conf" + if [ -f ${file} ] ; then + checkpath -f -m 0600 -o postgres:postgres ${file} + else + eerror "${file} not found" + eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}" + return 1 + fi + done + + # Set the proper permission for the socket path and create it if + # it doesn't exist. + checkpath -d -m 1775 -o postgres:postgres ${socket_path} + if [ -e ${socket_path%/}/.s.PGSQL.${configured_port} ] ; then + eerror "Socket conflict." + eerror "A server is already listening on:" + eerror " ${socket_path%/}/.s.PGSQL.${configured_port}" + eerror "HINT: Change PGPORT to listen on a different socket." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting PostgreSQL" + + rm -f ${DATA_DIR%/}/postmaster.pid + + local extraenv + local x + for x in ${PG_EXTRA_ENV} ; do + extraenv="${extraenv} --env ${x}" + done + + start-stop-daemon --start \ + --user postgres \ + --env "PGPORT=${configured_port}" \ + ${extraenv} \ + --pidfile ${DATA_DIR%/}/postmaster.pid \ + --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl \ + -- start -s -w -t ${START_TIMEOUT} -l ${DATA_DIR%/}/postmaster.log \ + -D ${PGDATA} -o "--data-directory=${DATA_DIR} ${PGOPTS}" + local retval=$? + + if [ $retval -ne 0 ] ; then + eerror "Check the log for a possible explanation of the above error. The log may be" + eerror " ${DATA_DIR%/}/postmaster.log" + eerror "Or wherever you configured PostgreSQL @SLOT@ log messages to be sent." + eend $retval + return $retval + fi + + eend $retval +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) + ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)" + + local retval + local retries=SIGTERM/${NICE_TIMEOUT} + + if [ "${RUDE_QUIT}" != "NO" ] ; then + einfo "RUDE_QUIT enabled." + retries="${retries}/SIGINT/${RUDE_TIMEOUT}" + fi + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + ewarn "A recover-run might be executed on next startup." + retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" + fi + + # Loops through nice, rude, and force quit in one go. + start-stop-daemon --stop \ + --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres \ + --retry ${retries} \ + --pidfile ${DATA_DIR%/}/postmaster.pid + + eend +} + +reload() { + ebegin "Reloading PostgreSQL configuration" + kill -HUP $(head -n1 ${DATA_DIR%/}/postmaster.pid) + eend $? +} diff --git a/dev-db/postgresql/files/postgresql.init-9.3 b/dev-db/postgresql/files/postgresql.init-9.3 new file mode 100644 index 000000000000..1c797c19d683 --- /dev/null +++ b/dev-db/postgresql/files/postgresql.init-9.3 @@ -0,0 +1,143 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +get_config() { + [ -f ${PGDATA%/}/postgresql.conf ] || return 1 + + eval echo $(sed -e 's:#.*::' ${PGDATA%/}/postgresql.conf \ + | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') +} + +depend() { + use net + provide postgresql + + if [ "$(get_config log_destination)" = "syslog" ]; then + use logger + fi +} + +configured_port=$(get_config port) +: ${configured_port:=${PGPORT}} +socket_paths=$(get_config unix_socket_directories) +: ${socket_paths:=/run/postgresql} + +checkconfig() { + # Check that DATA_DIR has been set + if [ -z ${DATA_DIR} ] ; then + eerror "DATA_DIR not set" + eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-@SLOT@" + return 1 + fi + + # Check that DATA_DIR exists + if [ ! -d ${DATA_DIR} ] ; then + eerror "Directory not found: ${DATA_DIR}" + eerror "HINT: Ensure that DATA_DIR points to the right path." + eerror "HINT: Or perhaps you need to create the database cluster:" + eerror " emerge --config dev-db/postgresql:@SLOT@" + return 1 + fi + + # Check for the existence of PostgreSQL's config files, and set the + # proper mode and ownership. + # Only three files should be checked as potentially other files + # may be in PGDATA that should not be touched. + local file + for file in postgresql pg_hba pg_ident ; do + file="${PGDATA%/}/${file}.conf" + if [ -f ${file} ] ; then + checkpath -f -m 0600 -o postgres:postgres ${file} + else + eerror "${file} not found" + eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}" + return 1 + fi + done + + # Set the proper permission for the socket paths and create it if + # it doesn't exist. + set -f; IFS=',' + local s + for s in ${socket_paths}; do + checkpath -d -m 1775 -o postgres:postgres ${s} + if [ -e ${s%/}/.s.PGSQL.${configured_port} ] ; then + eerror "Socket conflict." + eerror "A server is already listening on:" + eerror " ${s%/}/.s.PGSQL.${configured_port}" + eerror "HINT: Change PGPORT to listen on a different socket." + return 1 + fi + done + set +f; unset IFS +} + +start() { + checkconfig || return 1 + + ebegin "Starting PostgreSQL" + + rm -f ${DATA_DIR%/}/postmaster.pid + + local extraenv + local x + for x in ${PG_EXTRA_ENV} ; do + extraenv="${extraenv} --env ${x}" + done + + start-stop-daemon --start \ + --user postgres \ + --env "PGPORT=${configured_port}" \ + ${extraenv} \ + --pidfile ${DATA_DIR%/}/postmaster.pid \ + --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl \ + -- start -s -w -t ${START_TIMEOUT} -l ${DATA_DIR%/}/postmaster.log \ + -D ${PGDATA} -o "--data-directory=${DATA_DIR} ${PGOPTS}" + local retval=$? + + if [ $retval -ne 0 ] ; then + eerror "Check the log for a possible explanation of the above error. The log may be" + eerror " ${DATA_DIR%/}/postmaster.log" + eerror "Or wherever you configured PostgreSQL @SLOT@ log messages to be sent." + eend $retval + return $retval + fi + + eend $retval +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) + ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)" + + local retval + local retries=SIGTERM/${NICE_TIMEOUT} + + if [ "${RUDE_QUIT}" != "NO" ] ; then + einfo "RUDE_QUIT enabled." + retries="${retries}/SIGINT/${RUDE_TIMEOUT}" + fi + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + ewarn "A recover-run might be executed on next startup." + retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" + fi + + # Loops through nice, rude, and force quit in one go. + start-stop-daemon --stop \ + --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres \ + --retry ${retries} \ + --pidfile ${DATA_DIR%/}/postmaster.pid + + eend +} + +reload() { + ebegin "Reloading PostgreSQL configuration" + kill -HUP $(head -n1 ${DATA_DIR%/}/postmaster.pid) + eend $? +} diff --git a/dev-db/postgresql/files/postgresql.init-pre_9.2 b/dev-db/postgresql/files/postgresql.init-pre_9.2 new file mode 100644 index 000000000000..c85c7075c74d --- /dev/null +++ b/dev-db/postgresql/files/postgresql.init-pre_9.2 @@ -0,0 +1,140 @@ +#!/sbin/runscript +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_started_commands="reload" + +get_config() { + [ -f ${PGDATA%/}/postgresql.conf ] || return 1 + + eval echo $(sed -e 's:#.*::' ${PGDATA%/}/postgresql.conf \ + | awk '$1 == "'$1'" { print ($2 == "=" ? $3 : $2) }') +} + +depend() { + use net + provide postgresql + + if [ "$(get_config log_destination)" = "syslog" ]; then + use logger + fi +} + +configured_port=$(get_config port) +: ${configured_port:=${PGPORT}} +socket_path=$(get_config unix_socket_directory) +: ${socket_path:=/run/postgresql} + +checkconfig() { + # Check that DATA_DIR has been set + if [ -z ${DATA_DIR} ] ; then + eerror "DATA_DIR not set" + eerror "HINT: Perhaps you need to update /etc/conf.d/postgresql-@SLOT@" + return 1 + fi + + # Check that DATA_DIR exists + if [ ! -d ${DATA_DIR} ] ; then + eerror "Directory not found: ${DATA_DIR}" + eerror "HINT: Ensure that DATA_DIR points to the right path." + eerror "HINT: Or perhaps you need to create the database cluster:" + eerror " emerge --config dev-db/postgresql:@SLOT@" + return 1 + fi + + # Check for the existence of PostgreSQL's config files, and set the + # proper mode and ownership. + # Only three files should be checked as potentially other files + # may be in PGDATA that should not be touched. + local file + for file in postgresql pg_hba pg_ident ; do + file="${PGDATA%/}/${file}.conf" + if [ -f ${file} ] ; then + checkpath -f -m 0600 -o postgres:postgres ${file} + else + eerror "${file} not found" + eerror "HINT: mv ${DATA_DIR%/}/*.conf ${PGDATA}" + return 1 + fi + done + + # Set the proper permission for the socket path and create it if + # it doesn't exist. + checkpath -d -m 1775 -o postgres:postgres ${socket_path} + if [ -e ${socket_path%/}/.s.PGSQL.${configured_port} ] ; then + eerror "Socket conflict." + eerror "A server is already listening on:" + eerror " ${socket_path%/}/.s.PGSQL.${configured_port}" + eerror "HINT: Change PGPORT to listen on a different socket." + return 1 + fi +} + +start() { + checkconfig || return 1 + + ebegin "Starting PostgreSQL" + + rm -f ${DATA_DIR%/}/postmaster.pid + + local extraenv + local x + for x in ${PG_EXTRA_ENV} ; do + extraenv="${extraenv} --env ${x}" + done + + start-stop-daemon --start \ + --user postgres \ + --env "PGPORT=${configured_port}" \ + ${extraenv} \ + --pidfile ${DATA_DIR%/}/postmaster.pid \ + --wait $((${START_TIMEOUT}*1000)) \ + --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres \ + -- -D ${PGDATA} --data-directory=${DATA_DIR} --silent-mode=true \ + ${PGOPTS} + + local retval=$? + + if [ $retval -ne 0 ] ; then + eerror "Check the log for a possible explanation of the above error. The log may be" + eerror " ${DATA_DIR%/}/postmaster.log" + eerror "Or wherever you configured PostgreSQL @SLOT@ log messages to be sent." + eend $retval + return $retval + fi + + eend $retval +} + +stop() { + local seconds=$(( ${NICE_TIMEOUT} + ${RUDE_TIMEOUT} + ${FORCE_TIMEOUT} )) + ebegin "Stopping PostgreSQL (this can take up to ${seconds} seconds)" + + local retval + local retries=SIGTERM/${NICE_TIMEOUT} + + if [ "${RUDE_QUIT}" != "NO" ] ; then + einfo "RUDE_QUIT enabled." + retries="${retries}/SIGINT/${RUDE_TIMEOUT}" + fi + if [ "${FORCE_QUIT}" = "YES" ] ; then + einfo "FORCE_QUIT enabled." + ewarn "A recover-run might be executed on next startup." + retries="${retries}/SIGQUIT/${FORCE_TIMEOUT}" + fi + + # Loops through nice, rude, and force quit in one go. + start-stop-daemon --stop \ + --exec /usr/@LIBDIR@/postgresql-@SLOT@/bin/postgres \ + --retry ${retries} \ + --pidfile ${DATA_DIR%/}/postmaster.pid + + eend +} + +reload() { + ebegin "Reloading PostgreSQL configuration" + kill -HUP $(head -n1 ${DATA_DIR%/}/postmaster.pid) + eend $? +} diff --git a/dev-db/postgresql/files/postgresql.service b/dev-db/postgresql/files/postgresql.service new file mode 100644 index 000000000000..20ed27a10f29 --- /dev/null +++ b/dev-db/postgresql/files/postgresql.service @@ -0,0 +1,51 @@ +# It's not recommended to modify this file in-place, because it will be +# overwritten during package upgrades. If you want to customize, the +# best way is to create file +# "/etc/systemd/system/postgresql-@SLOT@.service.d/*.conf" +# containing your changes + +# For example, if you want to change the server's port number to 5433, +# create a file named +# "/etc/systemd/system/postgresql-@SLOT@.service.d/port.conf" +# containing: +# [Service] +# Environment=PGPORT=5433 +# This will override the setting appearing below. + +[Unit] +Description=PostgreSQL database server +After=network.target + +[Service] +Type=forking + +User=postgres +Group=postgres + +# Port number for server to listen on +Environment=PGPORT=5432 + +# Location of configuration files +Environment=PGDATA=/etc/postgresql-@SLOT@ + +# Where the data directory is located +Environment=DATA_DIR=/var/lib/postgresql/@SLOT@/data + +# Where to send early-startup messages from the server (before the logging +# options of postgresql.conf take effect) +# This is normally controlled by the global default set by systemd +# StandardOutput=syslog + +ExecStartPre=/usr/bin/postgresql-@SLOT@-check-db-dir +ExecStart=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl start -D ${DATA_DIR} -s -l ${DATA_DIR}/postmaster.log -o "-p ${PGPORT} -D ${PGDATA} --data-directory=${DATA_DIR}" -w -t 300 +ExecStop=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl stop -D ${DATA_DIR} -s -m fast +ExecReload=/usr/@LIBDIR@/postgresql-@SLOT@/bin/pg_ctl reload -D ${DATA_DIR} -s + +# Give a reasonable amount of time for the server to start up/shut down +TimeoutSec=300 + +# Disable OOM kill on the postmaster +OOMScoreAdjust=-1000 + +[Install] +WantedBy=multi-user.target diff --git a/dev-db/postgresql/files/postgresql.tmpfilesd b/dev-db/postgresql/files/postgresql.tmpfilesd new file mode 100644 index 000000000000..26f44efa3288 --- /dev/null +++ b/dev-db/postgresql/files/postgresql.tmpfilesd @@ -0,0 +1 @@ +d /run/postgresql 1775 postgres postgres - diff --git a/dev-db/postgresql/metadata.xml b/dev-db/postgresql/metadata.xml new file mode 100644 index 000000000000..475fe3613c08 --- /dev/null +++ b/dev-db/postgresql/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> + <use> + <flag name='pg_legacytimestamp'> + Use double precision floating-point numbers instead of 64-bit + integers for timestamp storage. + </flag> + <flag name='server'> + Disable to build and install the clients and libraries only. + </flag> + <flag name='uuid'> + Enable server side UUID generation (via + <pkg>dev-libs/ossp-uuid</pkg>). + </flag> + </use> +</pkgmetadata> diff --git a/dev-db/postgresql/postgresql-9.0.21.ebuild b/dev-db/postgresql/postgresql-9.0.21.ebuild new file mode 100644 index 000000000000..74e7e8e33037 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.0.21.ebuild @@ -0,0 +1,371 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Testing within Portage's environment is broken, and the patch no +# longer applies cleanly. +RESTRICT="test" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + epatch "${FILESDIR}/pg_ctl-exit-status.patch" + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} diff --git a/dev-db/postgresql/postgresql-9.0.22.ebuild b/dev-db/postgresql/postgresql-9.0.22.ebuild new file mode 100644 index 000000000000..74e7e8e33037 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.0.22.ebuild @@ -0,0 +1,371 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Testing within Portage's environment is broken, and the patch no +# longer applies cleanly. +RESTRICT="test" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + epatch "${FILESDIR}/pg_ctl-exit-status.patch" + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} diff --git a/dev-db/postgresql/postgresql-9.1.17.ebuild b/dev-db/postgresql/postgresql-9.1.17.ebuild new file mode 100644 index 000000000000..c32c7412b5c2 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.1.17.ebuild @@ -0,0 +1,375 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Testing within Portage's environment is broken, and the patch no +# longer applies cleanly. +RESTRICT="test" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + epatch "${FILESDIR}/pg_ctl-exit-status.patch" + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.1-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} diff --git a/dev-db/postgresql/postgresql-9.1.18.ebuild b/dev-db/postgresql/postgresql-9.1.18.ebuild new file mode 100644 index 000000000000..c32c7412b5c2 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.1.18.ebuild @@ -0,0 +1,375 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +# Testing within Portage's environment is broken, and the patch no +# longer applies cleanly. +RESTRICT="test" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + epatch "${FILESDIR}/pg_ctl-exit-status.patch" + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.1-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-pre_9.2" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} diff --git a/dev-db/postgresql/postgresql-9.2.12.ebuild b/dev-db/postgresql/postgresql-9.2.12.ebuild new file mode 100644 index 000000000000..03805d73c67b --- /dev/null +++ b/dev-db/postgresql/postgresql-9.2.12.ebuild @@ -0,0 +1,387 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9.2.13.ebuild b/dev-db/postgresql/postgresql-9.2.13.ebuild new file mode 100644 index 000000000000..03805d73c67b --- /dev/null +++ b/dev-db/postgresql/postgresql-9.2.13.ebuild @@ -0,0 +1,387 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9.3.8.ebuild b/dev-db/postgresql/postgresql-9.3.8.ebuild new file mode 100644 index 000000000000..df348ff2380d --- /dev/null +++ b/dev-db/postgresql/postgresql-9.3.8.ebuild @@ -0,0 +1,387 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9.3.9.ebuild b/dev-db/postgresql/postgresql-9.3.9.ebuild new file mode 100644 index 000000000000..897d2472f418 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.3.9.ebuild @@ -0,0 +1,387 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with kerberos krb5) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9.4.3.ebuild b/dev-db/postgresql/postgresql-9.4.3.ebuild new file mode 100644 index 000000000000..af586249ef4c --- /dev/null +++ b/dev-db/postgresql/postgresql-9.4.3.ebuild @@ -0,0 +1,419 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) +BSD_LIBC=( elibc_{Free,Net,Open}BSD ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + for i in ${BSD_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=bsd" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + ${uuid_config} \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9.4.4.ebuild b/dev-db/postgresql/postgresql-9.4.4.ebuild new file mode 100644 index 000000000000..8c307f1966a6 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.4.4.ebuild @@ -0,0 +1,419 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +KEYWORDS="~alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +SRC_URI="mirror://postgresql/source/v${PV}/postgresql-${PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) +BSD_LIBC=( elibc_{Free,Net,Open}BSD ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + for i in ${BSD_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=bsd" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + ${uuid_config} \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9.5_alpha1.ebuild b/dev-db/postgresql/postgresql-9.5_alpha1.ebuild new file mode 100644 index 000000000000..8d78aa0a3721 --- /dev/null +++ b/dev-db/postgresql/postgresql-9.5_alpha1.ebuild @@ -0,0 +1,425 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit eutils flag-o-matic linux-info multilib pam prefix python-single-r1 \ + systemd user versionator + +# This is a prerelease version, so no keywords please +KEYWORDS="" +#KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~ppc-macos ~x86-solaris" + +SLOT="$(get_version_component_range 1-2)" + +MY_PV=${PV/_/} + +S=${WORKDIR}/${PN}-${MY_PV} + +SRC_URI="mirror://postgresql/source/v${MY_PV}/postgresql-${MY_PV}.tar.bz2" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="doc kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +# uuid flags -- depend on sys-apps/util-linux for Linux libcs, or if no +# supported libc in use depend on dev-libs/ossp-uuid. For BSD systems, +# the libc includes UUID functions. +UTIL_LINUX_LIBC=( elibc_{glibc,uclibc,musl} ) +BSD_LIBC=( elibc_{Free,Net,Open}BSD ) + +nest_usedep() { + local front back + while [[ ${#} -gt 1 ]]; do + front+="${1}? ( " + back+=" )" + shift + done + echo "${front}${1}${back}" +} + +IUSE+=" ${UTIL_LINUX_LIBC[@]} ${BSD_LIBC[@]}" +CDEPEND+=" +uuid? ( + ${UTIL_LINUX_LIBC[@]/%/? ( sys-apps/util-linux )} + $(nest_usedep ${UTIL_LINUX_LIBC[@]/#/!} ${BSD_LIBC[@]/#/!} dev-libs/ossp-uuid) +)" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_setup() { + use server && CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + use server || epatch "${FILESDIR}/${PN}-${SLOT}-no-server.patch" + + # Fix bug 486556 where the server would crash at start up because of + # an infinite loop caused by a self-referencing symlink. + epatch "${FILESDIR}/postgresql-9.2-9.4-tz-dir-overflow.patch" + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + local i uuid_config="" + if use uuid; then + for i in ${UTIL_LINUX_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=e2fs" + done + for i in ${BSD_LIBC[@]}; do + use ${i} && uuid_config="--with-uuid=bsd" + done + [[ -z $uuid_config ]] && uuid_config="--with-uuid=ossp" + fi + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + ${uuid_config} \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake + emake -C contrib +} + +src_install() { + emake DESTDIR="${D}" install + emake DESTDIR="${D}" install -C contrib + + dodoc README HISTORY doc/{TODO,bug.template} + + # man pages are already built, but if we have the target make them, + # they'll be generated from source before being installed so we + # manually install man pages. + # We use ${SLOT} instead of doman for postgresql.eselect + insinto /usr/share/postgresql-${SLOT}/man/ + doins -r doc/src/sgml/man{1,3,7} + if ! use server; then + # Remove man pages for non-existent binaries + for m in {initdb,pg_{controldata,ctl,resetxlog},post{gres,master}}; do + rm "${ED}/usr/share/postgresql-${SLOT}/man/man1/${m}.1" + done + fi + docompress /usr/share/postgresql-${SLOT}/man/man{1,3,7} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + if use doc ; then + docinto html + dodoc doc/src/sgml/html/* + + docinto sgml + dodoc doc/src/sgml/*.{sgml,dsl} + fi + + if use server; then + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init-9.3" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + if use server ; then + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "http://www.postgresql.org/docs/${SLOT}/static/index.html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" + fi +} + +pkg_prerm() { + if use server && [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + use server || die "USE flag 'server' not enabled. Nothing to configure." + + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if use server && [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + use server || \ + ewarn 'Tests cannot be run without the "server" use flag enabled.' + [[ ${UID} -eq 0 ]] || \ + ewarn 'Tests cannot be run as root. Enable "userpriv" in FEATURES.' + + ewarn 'Skipping.' + fi +} diff --git a/dev-db/postgresql/postgresql-9999.ebuild b/dev-db/postgresql/postgresql-9999.ebuild new file mode 100644 index 000000000000..bba325e8ee3b --- /dev/null +++ b/dev-db/postgresql/postgresql-9999.ebuild @@ -0,0 +1,370 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +PYTHON_COMPAT=( python{2_{6,7},3_{2,3,4}} ) + +inherit base eutils flag-o-matic git-2 linux-info multilib pam prefix \ + python-single-r1 systemd user versionator + +KEYWORDS="" + +# Fix if needed +SLOT="9.6" + +EGIT_REPO_URI="git://git.postgresql.org/git/postgresql.git" + +LICENSE="POSTGRESQL GPL-2" +DESCRIPTION="PostgreSQL RDBMS" +HOMEPAGE="http://www.postgresql.org/" + +LINGUAS="af cs de en es fa fr hr hu it ko nb pl pt_BR ro ru sk sl sv tr + zh_CN zh_TW" +IUSE="kerberos kernel_linux ldap nls pam perl -pg_legacytimestamp python + +readline selinux +server ssl static-libs tcl threads uuid xml zlib" + +for lingua in ${LINGUAS}; do + IUSE+=" linguas_${lingua}" +done + +wanted_languages() { + local enable_langs + + for lingua in ${LINGUAS} ; do + use linguas_${lingua} && enable_langs+="${lingua} " + done + + echo -n ${enable_langs} +} + +CDEPEND=" +>=app-eselect/eselect-postgresql-1.2.0 +sys-apps/less +virtual/libintl +kerberos? ( virtual/krb5 ) +ldap? ( net-nds/openldap ) +pam? ( virtual/pam ) +perl? ( >=dev-lang/perl-5.8 ) +python? ( ${PYTHON_DEPS} ) +readline? ( sys-libs/readline:0= ) +ssl? ( >=dev-libs/openssl-0.9.6-r1:0= ) +tcl? ( >=dev-lang/tcl-8:0= ) +uuid? ( dev-libs/ossp-uuid ) +xml? ( dev-libs/libxml2 dev-libs/libxslt ) +zlib? ( sys-libs/zlib ) +" + +DEPEND="${CDEPEND} +!!<sys-apps/sandbox-2.0 +>=dev-lang/perl-5.8 +app-text/docbook-dsssl-stylesheets +app-text/docbook-sgml-dtd:4.2 +app-text/docbook-xml-dtd:4.2 +app-text/docbook-xsl-stylesheets +app-text/openjade +dev-libs/libxml2 +dev-libs/libxslt +sys-devel/bison +sys-devel/flex +nls? ( sys-devel/gettext ) +xml? ( virtual/pkgconfig ) +" +src_unpack() { + base_src_unpack + git-2_src_unpack +} + +RDEPEND="${CDEPEND} +!dev-db/postgresql-docs:${SLOT} +!dev-db/postgresql-base:${SLOT} +!dev-db/postgresql-server:${SLOT} +selinux? ( sec-policy/selinux-postgresql ) +" + +pkg_pretend() { + ewarn "You are using a live ebuild that uses the current source code as it is" + ewarn "available from PostgreSQL's Git repository at emerge time. Given such," + ewarn "the GNU Makefiles may be altered by upstream without notice and the" + ewarn "documentation for this live version is not readily available" + ewarn "online. Ergo, the ebuild maintainers will not support building a" + ewarn "client-only and/or document-free version." +} + +pkg_setup() { + CONFIG_CHECK="~SYSVIPC" linux-info_pkg_setup + + enewgroup postgres 70 + enewuser postgres 70 /bin/bash /var/lib/postgresql postgres + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + # Work around PPC{,64} compilation bug where bool is already defined + sed '/#ifndef __cplusplus/a #undef bool' -i src/include/c.h || die + + # Set proper run directory + sed "s|\(PGSOCKET_DIR\s\+\)\"/tmp\"|\1\"${EPREFIX}/run/postgresql\"|" \ + -i src/include/pg_config_manual.h || die + + if use pam ; then + sed -e "s/\(#define PGSQL_PAM_SERVICE \"postgresql\)/\1-${SLOT}/" \ + -i src/backend/libpq/auth.c || \ + die 'PGSQL_PAM_SERVICE rename failed.' + fi + + epatch_user +} + +src_configure() { + case ${CHOST} in + *-darwin*|*-solaris*) + use nls && append-libs intl + ;; + esac + + export LDFLAGS_SL="${LDFLAGS}" + export LDFLAGS_EX="${LDFLAGS}" + + local PO="${EPREFIX%/}" + + econf \ + --prefix="${PO}/usr/$(get_libdir)/postgresql-${SLOT}" \ + --datadir="${PO}/usr/share/postgresql-${SLOT}" \ + --docdir="${PO}/usr/share/doc/${PF}" \ + --includedir="${PO}/usr/include/postgresql-${SLOT}" \ + --mandir="${PO}/usr/share/postgresql-${SLOT}/man" \ + --sysconfdir="${PO}/etc/postgresql-${SLOT}" \ + --with-system-tzdata="${PO}/usr/share/zoneinfo" \ + $(use_enable !pg_legacytimestamp integer-datetimes) \ + $(use_enable threads thread-safety) \ + $(use_with kerberos gssapi) \ + $(use_with ldap) \ + $(use_with pam) \ + $(use_with perl) \ + $(use_with python) \ + $(use_with readline) \ + $(use_with ssl openssl) \ + $(use_with tcl) \ + $(use_with uuid ossp-uuid) \ + $(use_with xml libxml) \ + $(use_with xml libxslt) \ + $(use_with zlib) \ + "$(use_enable nls nls "$(wanted_languages)")" +} + +src_compile() { + emake world +} + +src_install() { + emake DESTDIR="${D}" install-world + + dodoc README HISTORY doc/{TODO,bug.template} + + insinto /etc/postgresql-${SLOT} + newins src/bin/psql/psqlrc.sample psqlrc + + dodir /etc/eselect/postgresql/slots/${SLOT} + echo "postgres_ebuilds=\"\${postgres_ebuilds} ${PF}\"" > \ + "${ED}/etc/eselect/postgresql/slots/${SLOT}/base" + + use static-libs || find "${ED}" -name '*.a' -delete + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.confd" | newconfd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.init" | newinitd - ${PN}-${SLOT} + + sed -e "s|@SLOT@|${SLOT}|g" -e "s|@LIBDIR@|$(get_libdir)|g" \ + "${FILESDIR}/${PN}.service" | \ + systemd_newunit - ${PN}-${SLOT}.service + + systemd_newtmpfilesd "${FILESDIR}"/${PN}.tmpfilesd ${PN}-${SLOT}.conf + + newbin "${FILESDIR}"/${PN}-check-db-dir ${PN}-${SLOT}-check-db-dir + + use pam && pamd_mimic system-auth ${PN}-${SLOT} auth account session + + if use prefix ; then + keepdir /run/postgresql + fperms 0775 /run/postgresql + fi +} + +pkg_postinst() { + postgresql-config update + + elog "If you need a global psqlrc-file, you can place it in:" + elog " ${EROOT%/}/etc/postgresql-${SLOT}/" + + elog + elog "Gentoo specific documentation:" + elog "https://wiki.gentoo.org/wiki/PostgreSQL" + elog + elog "Official documentation:" + elog "${EROOT%/}/usr/share/doc/${PF}/html" + elog + elog "The default location of the Unix-domain socket is:" + elog " ${EROOT%/}/run/postgresql/" + elog + elog "Before initializing the database, you may want to edit PG_INITDB_OPTS" + elog "so that it contains your preferred locale, and other options, in:" + elog " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + elog + elog "Then, execute the following command to setup the initial database" + elog "environment:" + elog " emerge --config =${CATEGORY}/${PF}" +} + +pkg_prerm() { + if [[ -z ${REPLACED_BY_VERSION} ]] ; then + ewarn "Have you dumped and/or migrated the ${SLOT} database cluster?" + ewarn "\thttps://wiki.gentoo.org/wiki/PostgreSQL/QuickStart#Migrating_PostgreSQL" + + ebegin "Resuming removal in 10 seconds (Control-C to cancel)" + sleep 10 + eend 0 + fi +} + +pkg_postrm() { + postgresql-config update +} + +pkg_config() { + [[ -f "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" ]] \ + && source "${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + [[ -z "${PGDATA}" ]] && PGDATA="${EROOT%/}/etc/postgresql-${SLOT}/" + [[ -z "${DATA_DIR}" ]] \ + && DATA_DIR="${EROOT%/}/var/lib/postgresql/${SLOT}/data" + + # environment.bz2 may not contain the same locale as the current system + # locale. Unset and source from the current system locale. + if [ -f "${EROOT%/}/etc/env.d/02locale" ]; then + unset LANG + unset LC_CTYPE + unset LC_NUMERIC + unset LC_TIME + unset LC_COLLATE + unset LC_MONETARY + unset LC_MESSAGES + unset LC_ALL + source "${EROOT%/}/etc/env.d/02locale" + [ -n "${LANG}" ] && export LANG + [ -n "${LC_CTYPE}" ] && export LC_CTYPE + [ -n "${LC_NUMERIC}" ] && export LC_NUMERIC + [ -n "${LC_TIME}" ] && export LC_TIME + [ -n "${LC_COLLATE}" ] && export LC_COLLATE + [ -n "${LC_MONETARY}" ] && export LC_MONETARY + [ -n "${LC_MESSAGES}" ] && export LC_MESSAGES + [ -n "${LC_ALL}" ] && export LC_ALL + fi + + einfo "You can modify the paths and options passed to initdb by editing:" + einfo " ${EROOT%/}/etc/conf.d/postgresql-${SLOT}" + einfo + einfo "Information on options that can be passed to initdb are found at:" + einfo " http://www.postgresql.org/docs/${SLOT}/static/creating-cluster.html" + einfo " http://www.postgresql.org/docs/${SLOT}/static/app-initdb.html" + einfo + einfo "PG_INITDB_OPTS is currently set to:" + if [[ -z "${PG_INITDB_OPTS}" ]] ; then + einfo " (none)" + else + einfo " ${PG_INITDB_OPTS}" + fi + einfo + einfo "Configuration files will be installed to:" + einfo " ${PGDATA}" + einfo + einfo "The database cluster will be created in:" + einfo " ${DATA_DIR}" + einfo + while [ "$correct" != "true" ] ; do + einfo "Are you ready to continue? (y/n)" + read answer + if [[ $answer =~ ^[Yy]([Ee][Ss])?$ ]] ; then + correct="true" + elif [[ $answer =~ ^[Nn]([Oo])?$ ]] ; then + die "Aborting initialization." + else + echo "Answer not recognized" + fi + done + + if [ -n "$(ls -A ${DATA_DIR} 2> /dev/null)" ] ; then + eerror "The given directory, '${DATA_DIR}', is not empty." + eerror "Modify DATA_DIR to point to an empty directory." + die "${DATA_DIR} is not empty." + fi + + einfo "Creating the data directory ..." + if [[ ${EUID} == 0 ]] ; then + mkdir -p "${DATA_DIR}" + chown -Rf postgres:postgres "${DATA_DIR}" + chmod 0700 "${DATA_DIR}" + fi + + einfo "Initializing the database ..." + + if [[ ${EUID} == 0 ]] ; then + su postgres -c "${EROOT%/}/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -D \"${DATA_DIR}\" ${PG_INITDB_OPTS}" + else + "${EROOT%/}"/usr/$(get_libdir)/postgresql-${SLOT}/bin/initdb -U postgres -D "${DATA_DIR}" ${PG_INITDB_OPTS} + fi + + if [[ "${DATA_DIR%/}" != "${PGDATA%/}" ]] ; then + mv "${DATA_DIR%/}"/{pg_{hba,ident},postgresql}.conf "${PGDATA}" + ln -s "${PGDATA%/}"/{pg_{hba,ident},postgresql}.conf "${DATA_DIR%/}" + fi + + cat <<- EOF >> "${PGDATA%/}"/postgresql.conf + # This is here because of https://bugs.gentoo.org/show_bug.cgi?id=518522 + # On the off-chance that you might need to work with UTF-8 encoded + # characters in PL/Perl + plperl.on_init = 'use utf8; use re; package utf8; require "utf8_heavy.pl";' + EOF + + einfo "The autovacuum function, which was in contrib, has been moved to the main" + einfo "PostgreSQL functions starting with 8.1, and starting with 8.4 is now enabled" + einfo "by default. You can disable it in the cluster's:" + einfo " ${PGDATA%/}/postgresql.conf" + einfo + einfo "The PostgreSQL server, by default, will log events to:" + einfo " ${DATA_DIR%/}/postmaster.log" + einfo + if use prefix ; then + einfo "The location of the configuration files have moved to:" + einfo " ${PGDATA}" + einfo "To start the server:" + einfo " pg_ctl start -D ${DATA_DIR} -o '-D ${PGDATA} --data-directory=${DATA_DIR}'" + einfo "To stop:" + einfo " pg_ctl stop -D ${DATA_DIR}" + einfo + einfo "Or move the configuration files back:" + einfo "mv ${PGDATA}*.conf ${DATA_DIR}" + else + einfo "You should use the '${EROOT%/}/etc/init.d/postgresql-${SLOT}' script to run PostgreSQL" + einfo "instead of 'pg_ctl'." + fi +} + +src_test() { + einfo ">>> Test phase [check]: ${CATEGORY}/${PF}" + + if [[ ${UID} -ne 0 ]] ; then + emake check + + einfo "If you think other tests besides the regression tests are necessary, please" + einfo "submit a bug including a patch for this ebuild to enable them." + else + [[ ${UID} -eq 0 ]] || \ + ewarn "Tests cannot be run as root. Enable 'userpriv' in FEATURES." + + ewarn "Skipping." + fi +} diff --git a/dev-db/psqlodbc/Manifest b/dev-db/psqlodbc/Manifest new file mode 100644 index 000000000000..091f3befd1ca --- /dev/null +++ b/dev-db/psqlodbc/Manifest @@ -0,0 +1,3 @@ +DIST psqlodbc-09.01.0200.tar.gz 749712 SHA256 89c230f5068dcd17d5c6dab37d13ed03525040da534cc7f49564dceba00a9c2c SHA512 6b1ce9efead84c1f5805561c150d5d6d4fba719472e43332987159918762098e1c41822fe804b4c9732e5fcb19beebd9b5f72ef756c021b764d6582f17bf4565 WHIRLPOOL e200c2014c58055a6ee69decea6f9ff92ad1166d2224c714a1634302ea621308e362760527617d2011db8ccaffcf7f35217431f705a9145f65777ee7a788e9e7 +DIST psqlodbc-09.02.0100.tar.gz 738231 SHA256 6701525030a8c927059f972ebd65e83a41f7f177228cd8e894654893d86cb93c SHA512 5d2eae82596b3a120b00c140441c47af065a201236fef9aa086372f2207bab2f2bffee7d0db177a64c370118eaa4348509dcb3e99a40f564d26d4e938c57cc68 WHIRLPOOL e300672c7608e28af52befbb62a16c8584a709b75fc12edeadf37b2d26a8cdd64a390af026ec752408818d053d51202c829b6ad62d82a543dbce21ce6624d3c0 +DIST psqlodbc-09.03.0210.tar.gz 784548 SHA256 42f2a57ec65c8a2edb0736f57b03c510986f33a9178d3d695616734dcc5e96d9 SHA512 da6b8da28c8ddd0912c57b7c1b8a2b494446b07ef7c6db8b56006b0c26705f64d413bdfed64b99e8baf6db70f1b578e818ad9ead357d16a8765deff7121c0a44 WHIRLPOOL 03f191421d95ab7b7da3c7806fc0081d66588bf5d860097fd9a239219d59ebdbe56790bf62786fb145f6378b60fdeb37ac74196f41de7e6ae7ac5551ba6f47c2 diff --git a/dev-db/psqlodbc/metadata.xml b/dev-db/psqlodbc/metadata.xml new file mode 100644 index 000000000000..9275f1aa9e94 --- /dev/null +++ b/dev-db/psqlodbc/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>postgresql</herd> +<use> +<flag name='iodbc'>Use dev-db/libiodbc. Disable to use dev-db/unixODBC.</flag> +</use> +</pkgmetadata> diff --git a/dev-db/psqlodbc/psqlodbc-09.01.0200.ebuild b/dev-db/psqlodbc/psqlodbc-09.01.0200.ebuild new file mode 100644 index 000000000000..43da089697d7 --- /dev/null +++ b/dev-db/psqlodbc/psqlodbc-09.01.0200.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit multilib versionator + +MY_MAJOR=$(get_major_version) +MY_MINOR=$(get_version_component_range 2) +PGSLOT="${MY_MAJOR#0}.${MY_MINOR#0}" + +DESCRIPTION="Official ODBC driver for PostgreSQL" +HOMEPAGE="http://www.postgresql.org/" +SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz" +SLOT="0" +LICENSE="LGPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="doc iodbc ssl threads unicode" + +DEPEND="dev-db/postgresql:${PGSLOT} + !iodbc? ( dev-db/unixODBC ) + iodbc? ( dev-db/libiodbc ) + ssl? ( dev-libs/openssl ) +" +RDEPEND="${DEPEND}" + +src_configure() { + econf --with-libpq="${EROOT%/}/usr/$(get_libdir)/postgresql-${PGSLOT}/bin/pg_config" \ + $(use_with iodbc) \ + $(use_with !iodbc unixodbc) \ + $(use_enable ssl openssl) \ + $(use_enable threads pthreads) \ + $(use_enable unicode) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc readme.txt + use doc && dohtml docs/* +} diff --git a/dev-db/psqlodbc/psqlodbc-09.02.0100.ebuild b/dev-db/psqlodbc/psqlodbc-09.02.0100.ebuild new file mode 100644 index 000000000000..43da089697d7 --- /dev/null +++ b/dev-db/psqlodbc/psqlodbc-09.02.0100.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit multilib versionator + +MY_MAJOR=$(get_major_version) +MY_MINOR=$(get_version_component_range 2) +PGSLOT="${MY_MAJOR#0}.${MY_MINOR#0}" + +DESCRIPTION="Official ODBC driver for PostgreSQL" +HOMEPAGE="http://www.postgresql.org/" +SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz" +SLOT="0" +LICENSE="LGPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="doc iodbc ssl threads unicode" + +DEPEND="dev-db/postgresql:${PGSLOT} + !iodbc? ( dev-db/unixODBC ) + iodbc? ( dev-db/libiodbc ) + ssl? ( dev-libs/openssl ) +" +RDEPEND="${DEPEND}" + +src_configure() { + econf --with-libpq="${EROOT%/}/usr/$(get_libdir)/postgresql-${PGSLOT}/bin/pg_config" \ + $(use_with iodbc) \ + $(use_with !iodbc unixodbc) \ + $(use_enable ssl openssl) \ + $(use_enable threads pthreads) \ + $(use_enable unicode) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc readme.txt + use doc && dohtml docs/* +} diff --git a/dev-db/psqlodbc/psqlodbc-09.03.0210.ebuild b/dev-db/psqlodbc/psqlodbc-09.03.0210.ebuild new file mode 100644 index 000000000000..43da089697d7 --- /dev/null +++ b/dev-db/psqlodbc/psqlodbc-09.03.0210.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit multilib versionator + +MY_MAJOR=$(get_major_version) +MY_MINOR=$(get_version_component_range 2) +PGSLOT="${MY_MAJOR#0}.${MY_MINOR#0}" + +DESCRIPTION="Official ODBC driver for PostgreSQL" +HOMEPAGE="http://www.postgresql.org/" +SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz" +SLOT="0" +LICENSE="LGPL-2" +KEYWORDS="~x86 ~amd64" +IUSE="doc iodbc ssl threads unicode" + +DEPEND="dev-db/postgresql:${PGSLOT} + !iodbc? ( dev-db/unixODBC ) + iodbc? ( dev-db/libiodbc ) + ssl? ( dev-libs/openssl ) +" +RDEPEND="${DEPEND}" + +src_configure() { + econf --with-libpq="${EROOT%/}/usr/$(get_libdir)/postgresql-${PGSLOT}/bin/pg_config" \ + $(use_with iodbc) \ + $(use_with !iodbc unixodbc) \ + $(use_enable ssl openssl) \ + $(use_enable threads pthreads) \ + $(use_enable unicode) +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc readme.txt + use doc && dohtml docs/* +} diff --git a/dev-db/qdbm/Manifest b/dev-db/qdbm/Manifest new file mode 100644 index 000000000000..cc69d9b8373b --- /dev/null +++ b/dev-db/qdbm/Manifest @@ -0,0 +1 @@ +DIST qdbm-1.8.78.tar.gz 1015429 SHA256 b466fe730d751e4bfc5900d1f37b0fb955f2826ac456e70012785e012cdcb73e SHA512 480549c56071bf82edf714a611aef863599c858ed63702820ae0890fd2c0029d1a231ed94a8090c74420dd648bd3625d270a5c078b113cbb86a12ef509e19037 WHIRLPOOL a42d2c981bf28e5b4619bf166177449abba02ef774a783c33feb7be04ef558cbec4b7e2ea4db85782eb59f57bdebeb0eb8170455e480cc5b578f7a6e0e3a39da diff --git a/dev-db/qdbm/files/qdbm-perl-runpath-vendor.diff b/dev-db/qdbm/files/qdbm-perl-runpath-vendor.diff new file mode 100644 index 000000000000..d46f9b3f236e --- /dev/null +++ b/dev-db/qdbm/files/qdbm-perl-runpath-vendor.diff @@ -0,0 +1,22 @@ +diff -ur qdbm-1.8.62.orig/perl/Makefile.in qdbm-1.8.62/perl/Makefile.in +--- qdbm-1.8.62.orig/perl/Makefile.in ++++ qdbm-1.8.62/perl/Makefile.in +@@ -42,15 +42,15 @@ + all : + cd depot && [ -f Makefile ] || \ + $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \ +- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \ ++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS=vendor ; \ + $(RUNENV) make + cd curia && [ -f Makefile ] || \ + $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \ +- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \ ++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS=vendor ; \ + $(RUNENV) make + cd villa && [ -f Makefile ] || \ + $(RUNENV) perl Makefile.PL CC="$(CC)" INC="$(INC)" OPTIMIZE="$(OPTIMIZE)" \ +- LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" ; \ ++ LD="$(LD)" LIBS="$(LIBS)" PREFIX="$(prefix)" INSTALLDIRS=vendor ; \ + $(RUNENV) make + @printf '\n' + @printf '#================================================================\n' diff --git a/dev-db/qdbm/files/qdbm-ruby19.diff b/dev-db/qdbm/files/qdbm-ruby19.diff new file mode 100644 index 000000000000..51c2800e74d7 --- /dev/null +++ b/dev-db/qdbm/files/qdbm-ruby19.diff @@ -0,0 +1,363 @@ +--- qdbm-1.8.78.orig/ruby/Makefile.in ++++ qdbm-1.8.78/ruby/Makefile.in +@@ -85,27 +85,27 @@ + sync ; sync + cd depot && rm -rf casket + cd depot && \ +- $(RUNENV) ruby -w -Ilib rbdptest write casket 10000 1000 ++ $(RUNENV) ruby -w -Ilib -I. rbdptest write casket 10000 1000 + cd depot && \ +- $(RUNENV) ruby -w -Ilib rbdptest read casket ++ $(RUNENV) ruby -w -Ilib -I. rbdptest read casket + cd depot && \ +- $(RUNENV) ruby -w -Ilib rbdptest misc casket ++ $(RUNENV) ruby -w -Ilib -I. rbdptest misc casket + cd depot && rm -rf casket + cd curia && rm -rf casket + cd curia && \ +- $(RUNENV) ruby -w -Ilib rbcrtest write casket 10000 1000 10 ++ $(RUNENV) ruby -w -Ilib -I. rbcrtest write casket 10000 1000 10 + cd curia && \ +- $(RUNENV) ruby -w -Ilib rbcrtest read casket ++ $(RUNENV) ruby -w -Ilib -I. rbcrtest read casket + cd curia && \ +- $(RUNENV) ruby -w -Ilib rbcrtest misc casket ++ $(RUNENV) ruby -w -Ilib -I. rbcrtest misc casket + cd curia && rm -rf casket + cd villa && rm -rf casket + cd villa && \ +- $(RUNENV) ruby -w -Ilib rbvltest write casket 10000 ++ $(RUNENV) ruby -w -Ilib -I. rbvltest write casket 10000 + cd villa && \ +- $(RUNENV) ruby -w -Ilib rbvltest read casket ++ $(RUNENV) ruby -w -Ilib -I. rbvltest read casket + cd villa && \ +- $(RUNENV) ruby -w -Ilib rbvltest misc casket ++ $(RUNENV) ruby -w -Ilib -I. rbvltest misc casket + cd villa && rm -rf casket + @printf '\n' + @printf '#================================================================\n' +--- qdbm-1.8.78.orig/ruby/curia/mod_curia.c ++++ qdbm-1.8.78/ruby/curia/mod_curia.c +@@ -24,6 +24,13 @@ + + #define MAXOPEN 1024 + ++#ifndef StringValuePtr ++# define StringValuePtr(v) STR2CSTR(v) ++#endif ++#ifndef RSTRING_LEN ++# define RSTRING_LEN(s) (RSTRING(s)->len) ++#endif ++ + + VALUE ccuriaerror; + VALUE ccuriaerror_ENOERR; +@@ -233,7 +240,7 @@ + const char *name; + int index, omode, bnum, dnum; + if((index = getnewindex()) == -1) myerror(DP_EMISC); +- name = STR2CSTR(vname); ++ name = StringValuePtr(vname); + FIXNUM_P(vomode); + omode = FIX2INT(vomode); + FIXNUM_P(vbnum); +@@ -276,10 +283,10 @@ + int index, ksiz, vsiz, dmode; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; +- vbuf = STR2CSTR(vval); +- vsiz = RSTRING(vval)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); ++ vbuf = StringValuePtr(vval); ++ vsiz = RSTRING_LEN(vval); + FIXNUM_P(vdmode); + dmode = FIX2INT(vdmode); + curia = crtable[index]; +@@ -297,8 +304,8 @@ + int index, ksiz; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + curia = crtable[index]; + if(!crout(curia, kbuf, ksiz)){ + if(crsltable[index] && dpecode == DP_ENOITEM) return Qfalse; +@@ -316,8 +323,8 @@ + VALUE vval; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + FIXNUM_P(vstart); + start = FIX2INT(vstart); + FIXNUM_P(vmax); +@@ -339,8 +346,8 @@ + int index, ksiz, vsiz; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + curia = crtable[index]; + if((vsiz = crvsiz(curia, kbuf, ksiz)) == -1){ + if(crsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1); +--- qdbm-1.8.78.orig/ruby/curia/rbcrtest ++++ qdbm-1.8.78/ruby/curia/rbcrtest +@@ -21,7 +21,7 @@ + + # main routine + def main() +- $0.gsub!(/.*\//, "") ++ $0 = $0.gsub(/.*\//, "") + (ARGV.length >= 1) || usage() + if(ARGV[0] == "write") + rv = runwrite() +@@ -283,7 +283,7 @@ + + + # execute main +-$0.gsub!(/.*\//, "") ++$0 = $0.gsub(/.*\//, "") + exit(main()) + + +Only in qdbm-1.8.78/ruby/depot: mkmf.log +--- qdbm-1.8.78.orig/ruby/depot/mod_depot.c ++++ qdbm-1.8.78/ruby/depot/mod_depot.c +@@ -23,6 +23,13 @@ + + #define MAXOPEN 1024 + ++#ifndef StringValuePtr ++# define StringValuePtr(v) STR2CSTR(v) ++#endif ++#ifndef RSTRING_LEN ++# define RSTRING_LEN(s) (RSTRING(s)->len) ++#endif ++ + + VALUE cdepoterror; + VALUE cdepoterror_ENOERR; +@@ -232,7 +239,7 @@ + const char *name; + int index, omode, bnum; + if((index = getnewindex()) == -1) myerror(DP_EMISC); +- name = STR2CSTR(vname); ++ name = StringValuePtr(vname); + FIXNUM_P(vomode); + omode = FIX2INT(vomode); + FIXNUM_P(vbnum); +@@ -273,10 +280,10 @@ + int index, ksiz, vsiz, dmode; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; +- vbuf = STR2CSTR(vval); +- vsiz = RSTRING(vval)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); ++ vbuf = StringValuePtr(vval); ++ vsiz = RSTRING_LEN(vval); + FIXNUM_P(vdmode); + dmode = FIX2INT(vdmode); + depot = dptable[index]; +@@ -294,8 +301,8 @@ + int index, ksiz; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + depot = dptable[index]; + if(!dpout(depot, kbuf, ksiz)){ + if(dpsltable[index] && dpecode == DP_ENOITEM) return Qfalse; +@@ -313,8 +320,8 @@ + VALUE vval; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + FIXNUM_P(vstart); + start = FIX2INT(vstart); + FIXNUM_P(vmax); +@@ -336,8 +343,8 @@ + int index, ksiz, vsiz; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + depot = dptable[index]; + if((vsiz = dpvsiz(depot, kbuf, ksiz)) == -1){ + if(dpsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1); +--- qdbm-1.8.78.orig/ruby/depot/rbdptest ++++ qdbm-1.8.78/ruby/depot/rbdptest +@@ -21,7 +21,7 @@ + + # main routine + def main() +- $0.gsub!(/.*\//, "") ++ $0 = $0.gsub(/.*\//, "") + (ARGV.length >= 1) || usage() + if(ARGV[0] == "write") + rv = runwrite() +@@ -278,7 +278,7 @@ + + + # execute main +-$0.gsub!(/.*\//, "") ++$0 = $0.gsub(/.*\//, "") + exit(main()) + + +--- qdbm-1.8.78.orig/ruby/myrbdoc ++++ qdbm-1.8.78/ruby/myrbdoc +@@ -186,7 +186,7 @@ + + + # execute main +-#$0.gsub!(/.*\//, "") ++#$0 = $0.gsub(/.*\//, "") + exit(main()) + + +--- qdbm-1.8.78.orig/ruby/villa/mod_villa.c ++++ qdbm-1.8.78/ruby/villa/mod_villa.c +@@ -25,6 +25,13 @@ + + #define MAXOPEN 1024 + ++#ifndef StringValuePtr ++# define StringValuePtr(v) STR2CSTR(v) ++#endif ++#ifndef RSTRING_LEN ++# define RSTRING_LEN(s) (RSTRING(s)->len) ++#endif ++ + + VALUE cvillaerror; + VALUE cvillaerror_ENOERR; +@@ -304,7 +311,7 @@ + int index, omode, cmode; + VLCFUNC cmp; + if((index = getnewindex()) == -1) myerror(DP_EMISC); +- name = STR2CSTR(vname); ++ name = StringValuePtr(vname); + FIXNUM_P(vomode); + omode = FIX2INT(vomode); + FIXNUM_P(vcmode); +@@ -352,10 +359,10 @@ + int index, ksiz, vsiz, dmode; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; +- vbuf = STR2CSTR(vval); +- vsiz = RSTRING(vval)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); ++ vbuf = StringValuePtr(vval); ++ vsiz = RSTRING_LEN(vval); + FIXNUM_P(vdmode); + dmode = FIX2INT(vdmode); + villa = vltable[index]; +@@ -373,8 +380,8 @@ + int index, ksiz; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + villa = vltable[index]; + if(!vlout(villa, kbuf, ksiz)){ + if(vlsltable[index] && dpecode == DP_ENOITEM) return Qfalse; +@@ -391,8 +398,8 @@ + VALUE vval; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + villa = vltable[index]; + if(!(vbuf = vlget(villa, kbuf, ksiz, &vsiz))){ + if(vlsltable[index] && dpecode == DP_ENOITEM) return Qnil; +@@ -409,8 +416,8 @@ + int index, ksiz, vsiz; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + villa = vltable[index]; + if((vsiz = vlvsiz(villa, kbuf, ksiz)) == -1){ + if(vlsltable[index] && dpecode == DP_ENOITEM) return INT2FIX(-1); +@@ -426,8 +433,8 @@ + int index, ksiz, vnum; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + villa = vltable[index]; + vnum = vlvnum(villa, kbuf, ksiz); + return INT2FIX(vnum); +@@ -497,8 +504,8 @@ + VALUE vval; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- kbuf = STR2CSTR(vkey); +- ksiz = RSTRING(vkey)->len; ++ kbuf = StringValuePtr(vkey); ++ ksiz = RSTRING_LEN(vkey); + FIXNUM_P(vjmode); + jmode = FIX2INT(vjmode); + villa = vltable[index]; +@@ -551,8 +558,8 @@ + int index, vsiz, cpmode; + FIXNUM_P(vindex); + if((index = FIX2INT(vindex)) == -1) myerror(DP_EMISC); +- vbuf = STR2CSTR(vval); +- vsiz = RSTRING(vval)->len; ++ vbuf = StringValuePtr(vval); ++ vsiz = RSTRING_LEN(vval); + FIXNUM_P(vcpmode); + cpmode = FIX2INT(vcpmode); + villa = vltable[index]; +--- qdbm-1.8.78.orig/ruby/villa/rbvltest ++++ qdbm-1.8.78/ruby/villa/rbvltest +@@ -21,7 +21,7 @@ + + # main routine + def main() +- $0.gsub!(/.*\//, "") ++ $0 = $0.gsub(/.*\//, "") + (ARGV.length >= 1) || usage() + if(ARGV[0] == "write") + rv = runwrite() +@@ -280,7 +280,7 @@ + + + # execute main +-$0.gsub!(/.*\//, "") ++$0 = $0.gsub(/.*\//, "") + exit(main()) + + diff --git a/dev-db/qdbm/files/qdbm-runpath.diff b/dev-db/qdbm/files/qdbm-runpath.diff new file mode 100644 index 000000000000..4fc1a1f70291 --- /dev/null +++ b/dev-db/qdbm/files/qdbm-runpath.diff @@ -0,0 +1,36 @@ +diff -ur qdbm-1.8.77.orig/Makefile.in qdbm-1.8.77/Makefile.in +--- qdbm-1.8.77.orig/Makefile.in ++++ qdbm-1.8.77/Makefile.in +@@ -61,7 +61,7 @@ + LIBS = -lqdbm @LIBS@ + LIBLDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib @LIBS@ + LDFLAGS = @LDFLAGS@ -L. -L$(MYLIBDIR) -L$(HOME)/lib -L/usr/local/lib $(LIBS) +-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib ++LDENV = + AR = @AR@ + ARFLAGS = rcsv + RUNENV = LD_LIBRARY_PATH=.:/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib +diff -urN qdbm-1.8.77.orig/cgi/Makefile.in qdbm-1.8.77/cgi/Makefile.in +--- qdbm-1.8.77.orig/cgi/Makefile.in 2006-08-24 11:55:12.000000000 +0900 ++++ qdbm-1.8.77/cgi/Makefile.in 2007-12-15 22:02:43.804668256 +0900 +@@ -28,7 +28,7 @@ + CFLAGS = -Wall -ansi -pedantic -fsigned-char -O2 + LIBS = -lqdbm @LIBS@ + LDFLAGS = -L$(srcdir)/.. -L$(HOME)/lib -L/usr/local/lib $(LIBS) +-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(HOME)/lib:/usr/local/lib:$(prefix)/lib ++LDENV = + + # Install destinations + prefix = @prefix@ +diff -urN qdbm-1.8.77.orig/plus/Makefile.in qdbm-1.8.77/plus/Makefile.in +--- qdbm-1.8.77.orig/plus/Makefile.in 2007-03-07 11:44:27.000000000 +0900 ++++ qdbm-1.8.77/plus/Makefile.in 2007-12-15 22:02:32.976636806 +0900 +@@ -51,7 +51,7 @@ + -L$(HOME)/lib -L/usr/local/lib $(LIBS) + LDFLAGS = @LDFLAGS@ -L. -L$(srcdir)/.. -L$(MYLIBDIR) \ + -L$(HOME)/lib -L/usr/local/lib -lxqdbm $(LIBS) +-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib ++LDENV = + AR = @AR@ + ARFLAGS = rcsv + RUNENV = LD_LIBRARY_PATH=.:..:/lib:/usr/lib:$(MYLIBDIR):$(HOME)/lib:/usr/local/lib diff --git a/dev-db/qdbm/metadata.xml b/dev-db/qdbm/metadata.xml new file mode 100644 index 000000000000..d4a08224d284 --- /dev/null +++ b/dev-db/qdbm/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hattya@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/qdbm/qdbm-1.8.78-r1.ebuild b/dev-db/qdbm/qdbm-1.8.78-r1.ebuild new file mode 100644 index 000000000000..6baac1adb4f0 --- /dev/null +++ b/dev-db/qdbm/qdbm-1.8.78-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils java-pkg-opt-2 multilib + +DESCRIPTION="Quick Database Manager" +HOMEPAGE="http://fallabs.com/qdbm/" +SRC_URI="http://fallabs.com/${PN}/${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd" +IUSE="cxx debug java perl ruby zlib" + +RDEPEND="java? ( >=virtual/jre-1.4 ) + perl? ( dev-lang/perl ) + ruby? ( dev-lang/ruby ) + zlib? ( sys-libs/zlib )" +DEPEND="${RDEPEND} + java? ( >=virtual/jdk-1.4 )" + +src_prepare() { + epatch "${FILESDIR}"/${PN}-runpath.diff + epatch "${FILESDIR}"/${PN}-perl-runpath-vendor.diff + epatch "${FILESDIR}"/${PN}-ruby19.diff + # apply flags + sed -i "/^CFLAGS/s|$| ${CFLAGS}|" Makefile.in + sed -i "/^OPTIMIZE/s|$| ${CFLAGS}|" perl/Makefile.in + sed -i "/^CXXFLAGS/s|$| ${CXXFLAGS}|" plus/Makefile.in + sed -i "/^JAVACFLAGS/s|$| ${JAVACFLAGS}|" java/Makefile.in + # replace make -> $(MAKE) + sed -i "s/make\( \|$\)/\$(MAKE)\1/g" \ + Makefile.in \ + {cgi,java,perl,plus,ruby}/Makefile.in +} + +qdbm_api_for() { + local u + for u in cxx java perl ruby; do + if ! use "${u}"; then + continue + fi + if [ "${u}" = "cxx" ]; then + u="plus" + fi + cd "${u}" + case "${EBUILD_PHASE}" in + configure) + econf + ;; + compile) + emake + ;; + test) + emake -j1 check + ;; + install) + emake DESTDIR="${D}" MYDATADIR=/usr/share/doc/${P}/html install + esac + cd - + done +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable zlib) \ + --enable-pthread \ + --enable-iconv + qdbm_api_for # configure +} + +src_compile() { + emake + qdbm_api_for # compile +} + +src_test() { + emake -j1 check + qdbm_api_for # test +} + +src_install() { + emake DESTDIR="${D}" install + dodoc ChangeLog NEWS README THANKS + dohtml -r doc/ + rm -rf "${ED}"/usr/share/${PN} + + qdbm_api_for # install + + if use java; then + java-pkg_dojar "${ED}"/usr/$(get_libdir)/*.jar + rm -f "${ED}"/usr/$(get_libdir)/*.jar + fi + if use perl; then + rm -f "${ED}"/$(perl -V:installarchlib | cut -d\' -f2)/*.pod + find "${ED}" -name .packlist -print0 | xargs -0 rm -f + fi + + rm -f "${ED}"/usr/bin/*test + rm -f "${ED}"/usr/share/man/man1/*test.1* +} diff --git a/dev-db/recutils/Manifest b/dev-db/recutils/Manifest new file mode 100644 index 000000000000..2aabf289982c --- /dev/null +++ b/dev-db/recutils/Manifest @@ -0,0 +1,2 @@ +DIST recutils-1.5.tar.gz 1811121 SHA256 7ed67e74468084f52ad9341e4b11c44e5fd9d5325b93b7eb2cb230c839ff5dec SHA512 6c6091618474b5e54948370ef26db3cb446b0d8719d443fa1dbbdee75f046d536ab61ce803a9443f2e31ab7e46774aaf73c3d4fe2bf9da90a2c508dbbcc611be WHIRLPOOL 25363ec7a03990d0114eb0f1cc161d1685ec7a3e4627b927ef8d0439a5e9998f3836915da12107ddb5bc759bca4b630dea25fa657b89b196c361a1156a3daef8 +DIST recutils-1.7.tar.gz 2252648 SHA256 233dc6dedb1916b887de293454da7e36a74bed9ebea364f7e97e74920051bc31 SHA512 80f6996f2bc02986695223db597cff75aae2bd47b88e81b0dfe44c33f79fc3320108e2715b1af086b167ff1124fe94deeec4e337b1ede99807d381927327bd68 WHIRLPOOL 5263e2a7ffec7681b00dccd0d6302a04e81f4c876ef2ebdd32bf3526cc010ae407b9267a7b9444bd21e552117a3b9b6d326f6782f1470c14125cade430c7f98f diff --git a/dev-db/recutils/files/50recutils-gentoo.el b/dev-db/recutils/files/50recutils-gentoo.el new file mode 100644 index 000000000000..1b16da6bbcd7 --- /dev/null +++ b/dev-db/recutils/files/50recutils-gentoo.el @@ -0,0 +1,6 @@ + +;; site-init for dev-db/recutils + +(add-to-list 'load-path "@SITELISP@") +(autoload 'rec-mode "rec-mode" "A mode for viewing/editing rec files." t) +(add-to-list 'auto-mode-alist '("\\.rec$" . rec-mode)) diff --git a/dev-db/recutils/files/recutils-1.5-automagic.patch b/dev-db/recutils/files/recutils-1.5-automagic.patch new file mode 100644 index 000000000000..5b928093ce5e --- /dev/null +++ b/dev-db/recutils/files/recutils-1.5-automagic.patch @@ -0,0 +1,57 @@ +--- recutils-1.5/configure.ac.orig ++++ recutils-1.5/configure.ac +@@ -85,17 +85,35 @@ + fi + AC_SUBST([CHECKLIBS]) + ++AC_ARG_ENABLE([curl], ++ AS_HELP_STRING([--enable-curl], ++ [Enable support for remote descriptors using libcurl (default is YES)]), ++ [curl_enabled=$enableval], [curl_enabled=yes]) ++ + have_curl=no +-AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],) +-if test "x$have_curl" = "xyes"; then +- CURLLIBS=-lcurl ++if test "x$curl_enabled" = "xyes"; then ++ AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],) ++ if test "x$have_curl" = "xyes"; then ++ CURLLIBS=-lcurl ++ else ++ AC_MSG_ERROR([curl support enabled but libcurl not found]) ++ fi + fi + AC_SUBST([CURLLIBS]) + ++AC_ARG_ENABLE([mdb], ++ AS_HELP_STRING([--enable-mdb], ++ [Build the mdb2rec utility (default is YES)]), ++ [mdb_enabled=$enableval], [mdb_enabled=yes]) ++ + have_mdb=no +-AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],) +-if test "x$have_mdb" = "xyes"; then +- MDBLIBS=-lmdb ++if test "x$mdb_enabled" = "xyes"; then ++ AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],) ++ if test "x$have_mdb" = "xyes"; then ++ MDBLIBS=-lmdb ++ else ++ AC_MSG_ERROR([mdb support enabled but libmdb not found]) ++ fi + fi + AC_SUBST([MDBLIBS]) + +@@ -119,8 +137,10 @@ + AC_SUBST([crypt_support]) + + have_glib=no +-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0], +- [have_glib=yes], [have_glib=no]) ++if test "x$mdb_enabled" = "xyes"; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0], ++ [have_glib=yes], [have_glib=no]) ++fi + + AM_CONDITIONAL([COMPILE_MDB2REC], + [test "x$have_glib" = "xyes" && test "x$have_mdb" = "xyes"]) diff --git a/dev-db/recutils/files/recutils-1.5-glibc-2.16.patch b/dev-db/recutils/files/recutils-1.5-glibc-2.16.patch new file mode 100644 index 000000000000..8b4997f099de --- /dev/null +++ b/dev-db/recutils/files/recutils-1.5-glibc-2.16.patch @@ -0,0 +1,29 @@ +--- recutils-1.5/lib/stdio.in.h ++++ recutils-1.5/lib/stdio.in.h +@@ -699,22 +699,11 @@ + # endif + #endif + +-#if @GNULIB_GETS@ +-# if @REPLACE_STDIO_READ_FUNCS@ && @GNULIB_STDIO_H_NONBLOCKING@ +-# if !(defined __cplusplus && defined GNULIB_NAMESPACE) +-# undef gets +-# define gets rpl_gets +-# endif +-_GL_FUNCDECL_RPL (gets, char *, (char *s) _GL_ARG_NONNULL ((1))); +-_GL_CXXALIAS_RPL (gets, char *, (char *s)); +-# else +-_GL_CXXALIAS_SYS (gets, char *, (char *s)); +-# undef gets +-# endif +-_GL_CXXALIASWARN (gets); + /* It is very rare that the developer ever has full control of stdin, +- so any use of gets warrants an unconditional warning. Assume it is +- always declared, since it is required by C89. */ ++ so any use of gets warrants an unconditional warning; besides, C11 ++ removed it. */ ++#undef gets ++#if HAVE_RAW_DECL_GETS + _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); + #endif + diff --git a/dev-db/recutils/files/recutils-1.7-automagic.patch b/dev-db/recutils/files/recutils-1.7-automagic.patch new file mode 100644 index 000000000000..e5d33bf87492 --- /dev/null +++ b/dev-db/recutils/files/recutils-1.7-automagic.patch @@ -0,0 +1,130 @@ +--- recutils-1.7/configure.ac ++++ recutils-1.7/configure.ac +@@ -85,17 +85,32 @@ + fi + AC_SUBST([CHECKLIBS]) + ++AC_ARG_ENABLE([curl], ++ AS_HELP_STRING([--enable-curl], ++ [Enable support for remote descriptors using libcurl (default is YES)]), ++ [curl_enabled=$enableval], [curl_enabled=yes]) + have_curl=no +-AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],) +-if test "x$have_curl" = "xyes"; then +- CURLLIBS=-lcurl ++if test "x$curl_enabled" = "xyes"; then ++ AC_CHECK_LIB([curl],[curl_global_init],[have_curl=yes],) ++ if test "x$have_curl" = "xyes"; then ++ CURLLIBS=-lcurl ++ else ++ AC_MSG_ERROR([curl support enabled but libcurl not found]) ++ fi + fi + AC_SUBST([CURLLIBS]) + ++AC_ARG_ENABLE([uuid], ++ AS_HELP_STRING([--enable-uuid], ++ [Compile recutils with support for uuid types (default is YES)]), ++ [uuid_enabled=$enableval], [uuid_enabled=yes]) ++ + have_uuid=no +-AC_CHECK_LIB([uuid],[uuid_generate],[have_uuid=yes],) +-if test "x$have_uuid" = "xyes"; then +- UUIDLIBS=-luuid ++if test "x$uuid_enabled" = "xyes"; then ++ AC_CHECK_LIB([uuid],[uuid_generate],[have_uuid=yes],) ++ if test "x$have_uuid" = "xyes"; then ++ UUIDLIBS=-luuid ++ fi + fi + AC_SUBST([UUIDLIBS]) + AC_SUBST([have_uuid]) +@@ -119,32 +134,42 @@ + AM_CONDITIONAL([CRYPT], [test "x$crypt_support" = "xyes"]) + AC_SUBST([crypt_support]) + +-have_glib=no +-PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0], +- [have_glib=yes], [have_glib=no]) +- ++AC_ARG_ENABLE([mdb], ++ AS_HELP_STRING([--enable-mdb], ++ [Build the mdb2rec utility (default is YES)]), ++ [mdb_enabled=$enableval], [mdb_enabled=yes]) + have_mdb=no +-AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],) +-if test "x$have_mdb" = "xyes"; then +- MDBLIBS=-lmdb +- +- OLD_CFLAGS=$CFLAGS +- CFLAGS="$CFLAGS $pkg_cv_GLIB_CFLAGS" +- mdb_uses_sdatetime=no +- AC_CHECK_DECL([MDB_SDATETIME],[mdb_uses_sdatetime=yes],,[#include <glib.h> ++if test "x$mdb_enabled" = "xyes"; then ++ AC_CHECK_LIB([mdb],[mdb_init],[have_mdb=yes],) ++ if test "x$have_mdb" = "xyes"; then ++ MDBLIBS=-lmdb ++ ++ OLD_CFLAGS=$CFLAGS ++ CFLAGS="$CFLAGS $pkg_cv_GLIB_CFLAGS" ++ mdb_uses_sdatetime=no ++ AC_CHECK_DECL([MDB_SDATETIME],[mdb_uses_sdatetime=yes],,[#include <glib.h> + #include <mdbtools.h>]) +- CFLAGS=$OLD_CFLAGS ++ CFLAGS=$OLD_CFLAGS + +- if test "x$mdb_uses_sdatetime" = "xyes"; then +- MDB_DATETIME="MDB_SDATETIME" ++ if test "x$mdb_uses_sdatetime" = "xyes"; then ++ MDB_DATETIME="MDB_SDATETIME" ++ else ++ MDB_DATETIME="MDB_DATETIME" ++ fi + else +- MDB_DATETIME="MDB_DATETIME" ++ AC_MSG_ERROR([mdb support enabled but libmdb not found]) + fi + + AC_SUBST([MDB_DATETIME]) + fi + AC_SUBST([MDBLIBS]) + ++have_glib=no ++if test "x$mdb_enabled" = "xyes"; then ++ PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0.0], ++ [have_glib=yes], [have_glib=no]) ++fi ++ + AM_CONDITIONAL([COMPILE_MDB2REC], + [test "x$have_glib" = "xyes" && test "x$have_mdb" = "xyes"]) + AM_CONDITIONAL([REMOTE_DESCRIPTORS], [test "x$have_curl" = "xyes"]) +@@ -233,29 +258,6 @@ + + dnl Report warnings + +-if test "x$have_check" = "xno"; then +- echo "warning: libcheck was not found in the system." +- echo "warning: unit tests wont be compiled and executed upon make check." +-fi +- +-if test "x$have_mdb" = "xno"; then +- echo "warning: libmdb was not found in the system." +- echo "warning: the mdb2rec utility won't get built." +-fi +- +-if test "x$have_glib" = "xno"; then +- echo "warning: glib was not found in the system." +- echo "warning: the mdb2rec utility won't get built." +-fi +- +-if test "x$crypt_support" = "xno"; then +- echo "warning: building recutils without encryption support." +-fi +- +-if test "x$have_uuid" = "xno"; then +- echo "warning: building recutils without support for uuid types." +-fi +- + if test "x$bash_headers_available" = "xno" || test "x$bash_builtins_enabled" = "xno"; then + echo "warning: not building the recutils bash builtins." + fi diff --git a/dev-db/recutils/metadata.xml b/dev-db/recutils/metadata.xml new file mode 100644 index 000000000000..8012f655304e --- /dev/null +++ b/dev-db/recutils/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> + <use> + <flag name="curl">Enable support for remote descriptors using libcurl</flag> + <flag name="mdb">Build the mdb2rec utility</flag> + <flag name="uuid">Enable support for uuid types</flag> + </use> +</pkgmetadata> diff --git a/dev-db/recutils/recutils-1.5.ebuild b/dev-db/recutils/recutils-1.5.ebuild new file mode 100644 index 000000000000..5017f95c8614 --- /dev/null +++ b/dev-db/recutils/recutils-1.5.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools eutils elisp-common + +DESCRIPTION="Tools and libraries to access human-editable, plain text databases" +HOMEPAGE="http://www.gnu.org/software/recutils/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="crypt curl emacs mdb nls static-libs" + +RDEPEND="sys-libs/readline + crypt? ( + dev-libs/libgcrypt:0 + dev-libs/libgpg-error + ) + curl? ( net-misc/curl ) + emacs? ( + app-emacs/org-mode + virtual/emacs + ) + mdb? ( + app-office/mdbtools + dev-libs/glib:2 + ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + virtual/pkgconfig + nls? ( sys-devel/gettext )" + +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + epatch "${FILESDIR}"/${P}-automagic.patch + epatch "${FILESDIR}"/${P}-glibc-2.16.patch + + # Don't unconditionally install emacs files + sed -i -e "/^dist_lisp_DATA/d" etc/Makefile.am || die + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable crypt encryption) \ + $(use_enable curl) \ + $(use_enable mdb) \ + $(use_enable nls) \ + $(use_enable static-libs static) +} + +src_compile() { + default + + if use emacs ; then + elisp-compile etc/*.el || die + fi +} + +src_install() { + default + use static-libs || find "${D}" -name '*.la' -delete + + if use emacs ; then + elisp-install ${PN} etc/*.{el,elc} || die + elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-db/recutils/recutils-1.7.ebuild b/dev-db/recutils/recutils-1.7.ebuild new file mode 100644 index 000000000000..9021fb5f2282 --- /dev/null +++ b/dev-db/recutils/recutils-1.7.ebuild @@ -0,0 +1,88 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils elisp-common + +DESCRIPTION="Tools and libraries to access human-editable, plain text databases" +HOMEPAGE="http://www.gnu.org/software/recutils/" +SRC_URI="mirror://gnu/${PN}/${P}.tar.gz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="crypt curl emacs mdb nls static-libs +uuid" + +RDEPEND="sys-libs/readline + crypt? ( + dev-libs/libgcrypt:0= + dev-libs/libgpg-error + ) + curl? ( net-misc/curl ) + emacs? ( + app-emacs/org-mode + virtual/emacs + ) + mdb? ( + app-office/mdbtools + dev-libs/glib:2 + ) + nls? ( virtual/libintl ) + uuid? ( sys-apps/util-linux )" +DEPEND="${RDEPEND} + virtual/pkgconfig + nls? ( sys-devel/gettext )" + +SITEFILE="50${PN}-gentoo.el" + +src_prepare() { + epatch "${FILESDIR}"/${P}-automagic.patch + + # don't unconditionally install emacs files + sed -i "/^dist_lisp_DATA/d" etc/Makefile.am || die + + eautoreconf +} + +src_configure() { + econf \ + $(use_enable crypt encryption) \ + $(use_enable curl) \ + $(use_enable mdb) \ + $(use_enable nls) \ + $(use_enable uuid) \ + $(use_enable static-libs static) +} + +src_compile() { + default + + if use emacs ; then + elisp-compile etc/*.el || die + fi +} + +src_test() { + # tests have parallel issues + emake -j1 check +} + +src_install() { + default + prune_libtool_files + + if use emacs ; then + elisp-install ${PN} etc/*.{el,elc} || die + elisp-site-file-install "${FILESDIR}"/${SITEFILE} || die + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen +} + +pkg_postrm() { + use emacs && elisp-site-regen +} diff --git a/dev-db/redis/Manifest b/dev-db/redis/Manifest new file mode 100644 index 000000000000..632bcb40ebf3 --- /dev/null +++ b/dev-db/redis/Manifest @@ -0,0 +1,9 @@ +DIST redis-2.6.15.tar.gz 998865 SHA256 b0105c6ec526d40e90a0a0bc9d070a5602d839b930776b8ecaeb9fa32493e3bc SHA512 8614b5531049f99a19e3ba87c7d632ab43d02e1c62b6287534ebec35e4a484e3eefabd94d7ca52eb31eb56675451aef94265514be78fdaebd50db5230a525563 WHIRLPOOL c1eba6bccb17c6733d3b5f6e06933ff7ea8689d4cb16e0005f002fda75bda1d730b815546e5d3b50fcd6f85a05a35585244a7a69263795e7bda53bd1a588db03 +DIST redis-2.6.16.tar.gz 999579 SHA256 81490918dcf82d124b36e48b0a9911bfba3f13abba04d8c89820324eff7df03a SHA512 469a29e2a755543a3b2c3deb467a72ae62b81c54a60ed1baf6f9d5687ef4b87c22d9cec6a43cec43dd90d4b5561f5bbcd2448f6edf8a784041233b80d9403b0b WHIRLPOOL ed10212f6465083cc689d83cb0c4db63e15697a232a7e6621fb3b41e263cb8d16c7c3085317f0147e3cfe2d1620672b40049b764ebfb2f2710fd6737350f4804 +DIST redis-2.8.11.tar.gz 1101257 SHA256 60f0310afb29bc3533d57c5805fb6a693eb1dee454a3a2ef51b07317f803f6d6 SHA512 fd761f02a40cc8697d2d3e5718d4f985b30299099923ba386865fe43c8ee00052cae948fb47e19cffff84e8097b21238027144783986f22a6564ee6a1b1a88a3 WHIRLPOOL d3833555edc600da9cc7cbde90f9afd06a2dc84b4d2381cfbddc3a626c59c7979a0b2456e326b1c0cfcb529692e26bd607fabfcd863d6b6225288357ca19752b +DIST redis-2.8.13.tar.gz 1227538 SHA256 b87bc83d13b9bf1f20d41a0efd06eda78b80002e013566d8b69c332e0cbccb08 SHA512 ca7face85f1d583feb7064eaf0d33cec080c7f0bb7b54734ba91d8ce1091bce263f4d5518bb86277a3ddeb2d0cb95492c5d52953922f1177f61510e1d10f30f7 WHIRLPOOL 264fd7f809f4e671ade206e1f239165c61f37669e782f50c9f12e7a431ed4ef83dff71efd6f88ebc28083b2d61d2637102a28b705a589f72c2a322c61af835a4 +DIST redis-2.8.17.tar.gz 1234543 SHA256 53c7cc639571729fa57d7baa7f81aec1d5886f86bac9c66f6ad06dbdaee236a7 SHA512 29515abd4437e03da20063a1831f0eb11ac65ba9d51cbfbb1987726102e3a55c76a3286b8c9a3bfbaf5290998fb5b662ef4aadbe0d131cd60824c8533e088441 WHIRLPOOL 22eb01f8100a07178352e397f4342d44f478aadda7a0a7bdfa9a08d8cfa1578ac6e98ba0cce0a9828cc226364d9a7995d86bc78adfc73476c04868639307be30 +DIST redis-2.8.19.tar.gz 1254857 SHA256 29bb08abfc3d392b2f0c3e7f48ec46dd09ab1023f9a5575fc2a93546f4ca5145 SHA512 34997b45815cfdec9fbb06cd6664ed6ddf71baf064fd9ac155b7b969fd5945f78927cd5dfde83b043dc8ff1d7e35b172b9403cdf6115b8ca7bdf80c581ee9cdd WHIRLPOOL df3408de1e53a8a13c0b645054ce944453f3a812c264b168b797519a6d8536e0a60095fbd314f591ba21f0532be5b6b37e1ec8b11e928cdd6447ab70dfb8be33 +DIST redis-2.8.8.tar.gz 1073450 SHA256 fd2be11b8d9300d35b6bbed6fcd6fa6d7ef1a72ccaeb0cc991ce44dc49908bc8 SHA512 99cf0c41feaf594c69c625dcc8a40d15d00ae5c3ec7947abdcbe969a18ff844f9d8c60ee047dfa878a23505963b972d7564a27315017cab74bc5925ecae67ab7 WHIRLPOOL be9aa6166f7dd3ef37f2451ac8a2bdaed1f7dfb1bd8b67df04addde1f0a1dd01ec12547dc290374b818bb644a2b05b88acac884f2613a92650bd312b142e7f1e +DIST redis-2.8.9.tar.gz 1097369 SHA256 7834c37f2ff186c46aef8e4a066dfbf1d6772a285aa31c19c58162f264f1007f SHA512 f202c44e16d257e33f7fabaa3b46218bf45848158a4b8c7cc2fab119fdf42bb4e19764a2f5f82fc8c76a3e353754b6b25f2cacf20a253d28244acbf87fd6dd7a WHIRLPOOL 2d968afe427bffc69c67cf8ac7d89166b5946a701787b28587b7a1eb0007dbc5766fb8d8760eec420ff23fbbf8fbac2a2cc6fdf69145f1885b30ef341dd4cd40 +DIST redis-3.0.2.tar.gz 1360182 SHA256 93e422c0d584623601f89b956045be158889ebe594478a2c24e1bf218495633f SHA512 0f72ca45c2970d595a3c533946b77ea293c7588eb59dd48491921ef5e3f3f1463a96a8095b5782a424451007702fbcab243140cc2d885306b5cb821308d0607a WHIRLPOOL 2d47fb142a63233230a9416e7833f8cdc0f630c12f326c73ae0078c82866496459a90e53eb6d0d381284284cd3941f392882ba27d8751651f22550230683950b diff --git a/dev-db/redis/files/configure.ac-2.2 b/dev-db/redis/files/configure.ac-2.2 new file mode 100644 index 000000000000..3ff6650407ca --- /dev/null +++ b/dev-db/redis/files/configure.ac-2.2 @@ -0,0 +1,58 @@ +# -*- Autoconf -*- +# Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.63) +AC_INIT(redis, 2.0.0, antirez@gmail.com) +AM_CFLAGS="-std=c99 -pedantic -Wall -W -D__EXTENSIONS__ -D_XPG6" +if test x"$CFLAGS" = x""; then + AM_CFLAGS="$AM_CFLAGS -O2" +else + AM_CFLAGS="$AM_CFLAGS $CFLAGS" +fi + +# options +AC_MSG_CHECKING([whether to build with debug information]) +AC_ARG_ENABLE([debug], + [AS_HELP_STRING([--enable-debug], + [enable debug data generation (def=no)])], + [debugit="$enableval"], + [debugit=no]) +AC_MSG_RESULT([$debugit]) + +if test x"$debugit" = x"yes"; then + AC_DEFINE([DEBUG],[],[Debug Mode]) + AM_CFLAGS="$AM_CFLAGS -g -rdynamic -ggdb" +else + AC_DEFINE([NDEBUG],[],[No-debug Mode]) +fi +AC_SUBST([AM_CFLAGS]) + +# Checks for programs. +AC_PROG_CC + +# Checks for libraries. + +# Checks for header files. +AC_CHECK_HEADERS([arpa/inet.h fcntl.h inttypes.h limits.h netdb.h netinet/in.h stdlib.h string.h sys/socket.h sys/time.h unistd.h]) + +# Checks for typedefs, structures, and compiler characteristics. +AC_HEADER_STDBOOL +AC_C_INLINE +AC_TYPE_INT16_T +AC_TYPE_INT32_T +AC_TYPE_OFF_T +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T +AC_TYPE_UINT16_T +AC_TYPE_UINT32_T + +# Checks for library functions. +AC_FUNC_ERROR_AT_LINE +AC_FUNC_FORK +AC_FUNC_STRCOLL +AC_FUNC_STRTOD +AC_CHECK_FUNCS([dup2 gethostbyname gettimeofday inet_ntoa memchr memmove memset select socket strcasecmp strchr strerror strstr strtol]) + +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT diff --git a/dev-db/redis/files/redis-2.4.17-shared.patch b/dev-db/redis/files/redis-2.4.17-shared.patch new file mode 100644 index 000000000000..9c607145d38f --- /dev/null +++ b/dev-db/redis/files/redis-2.4.17-shared.patch @@ -0,0 +1,22 @@ +See https://github.com/antirez/redis/pull/137 + +--- src/Makefile 2011-10-17 10:46:00.000000000 +0200 ++++ src/Makefile.2 2011-10-17 13:47:53.000000000 +0200 +@@ -49,7 +49,16 @@ + ifeq ($(USE_JEMALLOC),yes) + ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a + ALLOC_LINK=$(ALLOC_DEP) -ldl +- ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include ++ ALLOC_FLAGS=-DUSE_JEMALLOC ++ ifdef JEMALLOC_SHARED ++ ALLOC_DEP= ++ ALLOC_LINK=-ljemalloc ++ ALLOC_FLAGS=-DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE -I/usr/include ++ else ++ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a ++ ALLOC_LINK=$(ALLOC_DEP) -ldl ++ ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include ++ endif + endif + + CCOPT= $(CFLAGS) $(ARCH) $(PROF)
\ No newline at end of file diff --git a/dev-db/redis/files/redis-2.4.3-shared.patch b/dev-db/redis/files/redis-2.4.3-shared.patch new file mode 100644 index 000000000000..20cdebe41b47 --- /dev/null +++ b/dev-db/redis/files/redis-2.4.3-shared.patch @@ -0,0 +1,22 @@ +See https://github.com/antirez/redis/pull/137 + +--- src/Makefile 2011-10-17 10:46:00.000000000 +0200 ++++ src/Makefile.2 2011-10-17 13:47:53.000000000 +0200 +@@ -49,7 +49,16 @@ + ifeq ($(USE_JEMALLOC),yes) + ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a + ALLOC_LINK=$(ALLOC_DEP) -ldl +- ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include ++ ALLOC_FLAGS=-DUSE_JEMALLOC ++ ifdef JEMALLOC_SHARED ++ ALLOC_DEP= ++ ALLOC_LINK=-ljemalloc ++ ALLOC_FLAGS=-DUSE_JEMALLOC -I/usr/include ++ else ++ ALLOC_DEP=../deps/jemalloc/lib/libjemalloc.a ++ ALLOC_LINK=$(ALLOC_DEP) -ldl ++ ALLOC_FLAGS=-DUSE_JEMALLOC -I../deps/jemalloc/include ++ endif + endif + + CCOPT= $(CFLAGS) $(ARCH) $(PROF) diff --git a/dev-db/redis/files/redis-2.4.4-tcmalloc.patch b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch new file mode 100644 index 000000000000..964ce71d5f78 --- /dev/null +++ b/dev-db/redis/files/redis-2.4.4-tcmalloc.patch @@ -0,0 +1,21 @@ +https://github.com/antirez/redis/pull/218 + +diff --git a/src/Makefile b/src/Makefile +index 72edcad..3e43990 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -35,12 +35,14 @@ else + endif + + ifeq ($(USE_TCMALLOC),yes) ++ USE_JEMALLOC=no + ALLOC_DEP= + ALLOC_LINK=-ltcmalloc + ALLOC_FLAGS=-DUSE_TCMALLOC + endif + + ifeq ($(USE_TCMALLOC_MINIMAL),yes) ++ USE_JEMALLOC=no + ALLOC_DEP= + ALLOC_LINK=-ltcmalloc_minimal + ALLOC_FLAGS=-DUSE_TCMALLOC
\ No newline at end of file diff --git a/dev-db/redis/files/redis-2.6.7-config.patch b/dev-db/redis/files/redis-2.6.7-config.patch new file mode 100644 index 000000000000..0aea1c760ef2 --- /dev/null +++ b/dev-db/redis/files/redis-2.6.7-config.patch @@ -0,0 +1,69 @@ +commit 7f05e59a052941fd070be1825d0623a054c66e2d +Author: jbergstroem <bugs@bergstroem.nu> +Date: Tue Oct 30 13:11:23 2012 +1100 + + Adapt config based on Gentoo defaults + +diff --git a/redis.conf b/redis.conf +index 751a3eb..1a36b12 100644 +--- a/redis.conf ++++ b/redis.conf +@@ -14,11 +14,11 @@ + + # By default Redis does not run as a daemon. Use 'yes' if you need it. + # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. +-daemonize no ++daemonize yes + + # When running daemonized, Redis writes a pid file in /var/run/redis.pid by + # default. You can specify a custom pid file location here. +-pidfile /var/run/redis.pid ++pidfile /var/run/redis/redis.pid + + # Accept connections on the specified port, default is 6379. + # If port 0 is specified Redis will not listen on a TCP socket. +@@ -27,7 +27,7 @@ port 6379 + # If you want you can bind a single interface, if the bind option is not + # specified all the interfaces will listen for incoming connections. + # +-# bind 127.0.0.1 ++bind 127.0.0.1 + + # Specify the path for the unix socket that will be used to listen for + # incoming connections. There is no default, so Redis will not listen +@@ -50,7 +50,7 @@ loglevel notice + # Specify the log file name. Also 'stdout' can be used to force + # Redis to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile stdout ++logfile /var/log/redis/redis.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. +@@ -124,7 +124,7 @@ rdbcompression yes + rdbchecksum yes + + # The filename where to dump the DB +-dbfilename dump.rdb ++dbfilename /var/lib/redis/dump.rdb + + # The working directory. + # +@@ -134,7 +134,7 @@ dbfilename dump.rdb + # Also the Append Only File will be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redis/ + + ################################# REPLICATION ################################# + +@@ -278,7 +278,7 @@ slave-priority 100 + # limit for maxmemory so that there is some free RAM on the system for slave + # output buffers (but this is not needed if the policy is 'noeviction'). + # +-# maxmemory <bytes> ++maxmemory 67108864 + + # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory + # is reached? You can select among five behavior:
\ No newline at end of file diff --git a/dev-db/redis/files/redis-2.6.7-shared.patch b/dev-db/redis/files/redis-2.6.7-shared.patch new file mode 100644 index 000000000000..992af6c490b6 --- /dev/null +++ b/dev-db/redis/files/redis-2.6.7-shared.patch @@ -0,0 +1,36 @@ +commit 6931bf1d81de597b3abc2a36adf081a24c114567 +Author: jbergstroem <bugs@bergstroem.nu> +Date: Tue Oct 23 12:26:04 2012 +1100 + + Build against shared jemalloc + +diff --git a/src/Makefile b/src/Makefile +index 358b4cb..41390f4 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -22,12 +22,7 @@ STD= -std=c99 -pedantic + WARN= -Wall + OPT= $(OPTIMIZATION) + +-# Default allocator +-ifeq ($(uname_S),Linux) +- MALLOC=jemalloc +-else +- MALLOC=libc +-endif ++MALLOC?=jemalloc + + # Backwards compatibility for selecting an allocator + ifeq ($(USE_TCMALLOC),yes) +@@ -71,9 +66,8 @@ ifeq ($(MALLOC),tcmalloc_minimal) + endif + + ifeq ($(MALLOC),jemalloc) +- DEPENDENCY_TARGETS+= jemalloc +- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include +- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl ++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE ++ FINAL_LIBS+= -ljemalloc -ldl + endif + + REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS)
\ No newline at end of file diff --git a/dev-db/redis/files/redis-2.6.9-tclsh86.patch b/dev-db/redis/files/redis-2.6.9-tclsh86.patch new file mode 100644 index 000000000000..00d81dfafcc7 --- /dev/null +++ b/dev-db/redis/files/redis-2.6.9-tclsh86.patch @@ -0,0 +1,57 @@ +diff --git a/runtest b/runtest +index 0eb384c..fadc283 100755 +--- a/runtest ++++ b/runtest +@@ -1,5 +1,5 @@ + #!/bin/sh +-TCL=tclsh8.5 ++TCL=tclsh + which $TCL + if [ "$?" != "0" ] + then +diff --git a/tests/integration/replication-4.tcl b/tests/integration/replication-4.tcl +index 69fcab3..58a70fa 100644 +--- a/tests/integration/replication-4.tcl ++++ b/tests/integration/replication-4.tcl +@@ -1,5 +1,5 @@ + proc start_bg_complex_data {host port db ops} { +- exec tclsh8.5 tests/helpers/bg_complex_data.tcl $host $port $db $ops & ++ exec tclsh tests/helpers/bg_complex_data.tcl $host $port $db $ops & + } + + proc stop_bg_complex_data {handle} { +diff --git a/tests/integration/replication.tcl b/tests/integration/replication.tcl +index da94b08..30baf6a 100644 +--- a/tests/integration/replication.tcl ++++ b/tests/integration/replication.tcl +@@ -78,7 +78,7 @@ start_server {tags {"repl"}} { + } + + proc start_write_load {host port seconds} { +- exec tclsh8.5 tests/helpers/gen_write_load.tcl $host $port $seconds & ++ exec tclsh tests/helpers/gen_write_load.tcl $host $port $seconds & + } + + proc stop_write_load {handle} { +diff --git a/tests/test_helper.tcl b/tests/test_helper.tcl +index b2e58b4..253e955 100644 +--- a/tests/test_helper.tcl ++++ b/tests/test_helper.tcl +@@ -2,6 +2,8 @@ + # This softare is released under the BSD License. See the COPYING file for + # more information. + ++package require Tcl 8.5 ++ + set tcl_precision 17 + source tests/support/redis.tcl + source tests/support/server.tcl +@@ -189,7 +191,7 @@ proc test_server_main {} { + set start_port [expr {$::port+100}] + for {set j 0} {$j < $::numclients} {incr j} { + set start_port [find_available_port $start_port] +- set p [exec tclsh8.5 [info script] {*}$::argv \ ++ set p [exec tclsh [info script] {*}$::argv \ + --client $port --port $start_port &] + lappend ::clients_pids $p + incr start_port 10
\ No newline at end of file diff --git a/dev-db/redis/files/redis-2.8.13-sharedlua.patch b/dev-db/redis/files/redis-2.8.13-sharedlua.patch new file mode 100644 index 000000000000..e13c62f07a11 --- /dev/null +++ b/dev-db/redis/files/redis-2.8.13-sharedlua.patch @@ -0,0 +1,44 @@ +commit de0d4973ddb629dcc80f0724769a0e997fe644ba +Author: Johan Bergström <bugs@bergstroem.nu> +Date: Wed Jul 16 09:47:44 2014 +1000 + + Use a shared lua + +diff --git src/Makefile src/Makefile +index 134694c..a09832e 100644 +--- src/Makefile ++++ src/Makefile +@@ -15,7 +15,7 @@ + release_hdr := $(shell sh -c './mkreleasehdr.sh') + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua ++DEPENDENCY_TARGETS=hiredis linenoise + + # Default settings + STD=-std=c99 -pedantic +@@ -52,6 +52,7 @@ endif + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm ++FINAL_LIBS+=$(shell pkg-config --libs lua) + DEBUG=-g -ggdb + + ifeq ($(uname_S),SunOS) +@@ -108,6 +109,7 @@ endif + REDIS_SERVER_NAME=redis-server + REDIS_SENTINEL_NAME=redis-sentinel + REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o hyperloglog.o latency.o sparkline.o ++REDIS_SERVER_OBJ+=lua_cjson.o lua_cmsgpack.o lua_struct.o strbuf.o + REDIS_CLI_NAME=redis-cli + REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o + REDIS_BENCHMARK_NAME=redis-benchmark +@@ -162,7 +164,7 @@ endif + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/dev-db/redis/files/redis-2.8.17-config.patch b/dev-db/redis/files/redis-2.8.17-config.patch new file mode 100644 index 000000000000..c9f6b2af172b --- /dev/null +++ b/dev-db/redis/files/redis-2.8.17-config.patch @@ -0,0 +1,46 @@ +--- a/redis.conf 2014-12-02 16:22:38.722433643 +0100 ++++ b/redis.conf 2014-12-02 16:22:16.252249350 +0100 +@@ -38,7 +38,7 @@ + + # When running daemonized, Redis writes a pid file in /var/run/redis.pid by + # default. You can specify a custom pid file location here. +-pidfile /var/run/redis.pid ++pidfile /run/redis/redis.pid + + # Accept connections on the specified port, default is 6379. + # If port 0 is specified Redis will not listen on a TCP socket. +@@ -61,7 +61,7 @@ + # Examples: + # + # bind 192.168.1.100 10.0.0.1 +-# bind 127.0.0.1 ++bind 127.0.0.1 + + # Specify the path for the Unix socket that will be used to listen for + # incoming connections. There is no default, so Redis will not listen +@@ -100,7 +100,7 @@ + # Specify the log file name. Also the empty string can be used to force + # Redis to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile "" ++logfile /var/log/redis/redis.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. +@@ -184,7 +184,7 @@ + # The Append Only File will also be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redis/ + + ################################# REPLICATION ################################# + +@@ -403,6 +403,7 @@ + # output buffers (but this is not needed if the policy is 'noeviction'). + # + # maxmemory <bytes> ++maxmemory 67108864 + + # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory + # is reached. You can select among five behaviors: diff --git a/dev-db/redis/files/redis-2.8.19-sharedlua.patch b/dev-db/redis/files/redis-2.8.19-sharedlua.patch new file mode 100644 index 000000000000..2e45cf2b31fa --- /dev/null +++ b/dev-db/redis/files/redis-2.8.19-sharedlua.patch @@ -0,0 +1,44 @@ +commit de0d4973ddb629dcc80f0724769a0e997fe644ba +Author: Johan Bergström <bugs@bergstroem.nu> +Date: Wed Jul 16 09:47:44 2014 +1000 + + Use a shared lua + +diff --git src/Makefile src/Makefile +index 134694c..a09832e 100644 +--- src/Makefile ++++ src/Makefile +@@ -15,7 +15,7 @@ + release_hdr := $(shell sh -c './mkreleasehdr.sh') + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua ++DEPENDENCY_TARGETS=hiredis linenoise + + # Default settings + STD=-std=c99 -pedantic +@@ -52,6 +52,7 @@ endif + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm ++FINAL_LIBS+=$(shell pkg-config --libs lua) + DEBUG=-g -ggdb + + ifeq ($(uname_S),SunOS) +@@ -108,6 +109,7 @@ endif + REDIS_SERVER_NAME=redis-server + REDIS_SENTINEL_NAME=redis-sentinel + REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o migrate.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o hyperloglog.o latency.o sparkline.o ++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o + REDIS_CLI_NAME=redis-cli + REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o + REDIS_BENCHMARK_NAME=redis-benchmark +@@ -162,7 +164,7 @@ endif + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/dev-db/redis/files/redis-2.8.3-config.patch b/dev-db/redis/files/redis-2.8.3-config.patch new file mode 100644 index 000000000000..3f5d95b847ad --- /dev/null +++ b/dev-db/redis/files/redis-2.8.3-config.patch @@ -0,0 +1,59 @@ +commit 66f26c12faaeb8ed85a715d2dfd6a41c978a4bd1 +Author: Johan Bergström <bugs@bergstroem.nu> +Date: Mon Nov 25 09:23:10 2013 +1100 + + Modify config to gentoo defaults + +diff --git redis.conf redis.conf +index 2e3239c..6c7ef4a 100644 +--- redis.conf ++++ redis.conf +@@ -14,11 +14,11 @@ + + # By default Redis does not run as a daemon. Use 'yes' if you need it. + # Note that Redis will write a pid file in /var/run/redis.pid when daemonized. +-daemonize no ++daemonize yes + + # When running daemonized, Redis writes a pid file in /var/run/redis.pid by + # default. You can specify a custom pid file location here. +-pidfile /var/run/redis.pid ++pidfile /run/redis/redis.pid + + # Accept connections on the specified port, default is 6379. + # If port 0 is specified Redis will not listen on a TCP socket. +@@ -32,7 +32,7 @@ port 6379 + # Examples: + # + # bind 192.168.1.100 10.0.0.1 +-# bind 127.0.0.1 ++bind 127.0.0.1 + + # Specify the path for the unix socket that will be used to listen for + # incoming connections. There is no default, so Redis will not listen +@@ -71,7 +71,7 @@ loglevel notice + # Specify the log file name. Also the emptry string can be used to force + # Redis to log on the standard output. Note that if you use standard + # output for logging but daemonize, logs will be sent to /dev/null +-logfile "" ++logfile /var/log/redis/redis.log + + # To enable logging to the system logger, just set 'syslog-enabled' to yes, + # and optionally update the other syslog parameters to suit your needs. +@@ -155,7 +155,7 @@ dbfilename dump.rdb + # The Append Only File will also be created inside this directory. + # + # Note that you must specify a directory here, not a file name. +-dir ./ ++dir /var/lib/redis/ + + ################################# REPLICATION ################################# + +@@ -365,6 +365,7 @@ slave-priority 100 + # output buffers (but this is not needed if the policy is 'noeviction'). + # + # maxmemory <bytes> ++maxmemory 67108864 + + # MAXMEMORY POLICY: how Redis will select what to remove when maxmemory + # is reached. You can select among five behaviors: diff --git a/dev-db/redis/files/redis-2.8.3-shared.patch b/dev-db/redis/files/redis-2.8.3-shared.patch new file mode 100644 index 000000000000..d32484f0cd18 --- /dev/null +++ b/dev-db/redis/files/redis-2.8.3-shared.patch @@ -0,0 +1,36 @@ +commit 388a76f24c96767c831ee7682234fd9f2bc5b9ac +Author: Johan Bergström <bugs@bergstroem.nu> +Date: Mon Nov 25 09:17:14 2013 +1100 + + Use shared jemalloc + +diff --git src/Makefile src/Makefile +index c37549d..77e6255 100644 +--- src/Makefile ++++ src/Makefile +@@ -26,12 +26,7 @@ PREFIX?=/usr/local + INSTALL_BIN=$(PREFIX)/bin + INSTALL=install + +-# Default allocator +-ifeq ($(uname_S),Linux) +- MALLOC=jemalloc +-else +- MALLOC=libc +-endif ++MALLOC?=jemalloc + + # Backwards compatibility for selecting an allocator + ifeq ($(USE_TCMALLOC),yes) +@@ -79,9 +74,8 @@ ifeq ($(MALLOC),tcmalloc_minimal) + endif + + ifeq ($(MALLOC),jemalloc) +- DEPENDENCY_TARGETS+= jemalloc +- FINAL_CFLAGS+= -DUSE_JEMALLOC -I../deps/jemalloc/include +- FINAL_LIBS+= ../deps/jemalloc/lib/libjemalloc.a -ldl ++ FINAL_CFLAGS+= -DUSE_JEMALLOC -DJEMALLOC_NO_DEMANGLE ++ FINAL_LIBS+= -ljemalloc -ldl + endif + + REDIS_CC=$(QUIET_CC)$(CC) $(FINAL_CFLAGS) diff --git a/dev-db/redis/files/redis-3.0.0-sharedlua.patch b/dev-db/redis/files/redis-3.0.0-sharedlua.patch new file mode 100644 index 000000000000..ba983efafc7c --- /dev/null +++ b/dev-db/redis/files/redis-3.0.0-sharedlua.patch @@ -0,0 +1,44 @@ +commit fd0fc43f6e0ea45bce0e1a68c1f736e481fc4429 +Author: Johan Bergström <bugs@bergstroem.nu> +Date: Thu Apr 2 14:33:51 2015 +1100 + + Use shared LUA + +diff --git src/Makefile src/Makefile +index a88f1d2..f71e7b5 100644 +--- src/Makefile ++++ src/Makefile +@@ -15,7 +15,7 @@ + release_hdr := $(shell sh -c './mkreleasehdr.sh') + uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not') + OPTIMIZATION?=-O2 +-DEPENDENCY_TARGETS=hiredis linenoise lua ++DEPENDENCY_TARGETS=hiredis linenoise + + # Default settings + STD=-std=c99 -pedantic +@@ -47,6 +47,7 @@ endif + FINAL_CFLAGS=$(STD) $(WARN) $(OPT) $(DEBUG) $(CFLAGS) $(REDIS_CFLAGS) + FINAL_LDFLAGS=$(LDFLAGS) $(REDIS_LDFLAGS) $(DEBUG) + FINAL_LIBS=-lm ++FINAL_LIBS+=$(shell pkg-config --libs lua) + DEBUG=-g -ggdb + + ifeq ($(uname_S),SunOS) +@@ -108,6 +109,7 @@ endif + REDIS_SERVER_NAME=redis-server + REDIS_SENTINEL_NAME=redis-sentinel + REDIS_SERVER_OBJ=adlist.o ae.o anet.o dict.o redis.o sds.o zmalloc.o lzf_c.o lzf_d.o pqsort.o zipmap.o sha1.o ziplist.o release.o networking.o util.o object.o db.o replication.o rdb.o t_string.o t_list.o t_set.o t_zset.o t_hash.o config.o aof.o pubsub.o multi.o debug.o sort.o intset.o syncio.o cluster.o crc16.o endianconv.o slowlog.o scripting.o bio.o rio.o rand.o memtest.o crc64.o bitops.o sentinel.o notify.o setproctitle.o blocked.o hyperloglog.o latency.o sparkline.o ++REDIS_SERVER_OBJ+=fpconv.o strbuf.o lua_bit.o lua_cjson.o lua_cmsgpack.o lua_struct.o + REDIS_CLI_NAME=redis-cli + REDIS_CLI_OBJ=anet.o sds.o adlist.o redis-cli.o zmalloc.o release.o anet.o ae.o crc64.o + REDIS_BENCHMARK_NAME=redis-benchmark +@@ -162,7 +164,7 @@ endif + + # redis-server + $(REDIS_SERVER_NAME): $(REDIS_SERVER_OBJ) +- $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a ../deps/lua/src/liblua.a $(FINAL_LIBS) ++ $(REDIS_LD) -o $@ $^ ../deps/hiredis/libhiredis.a $(FINAL_LIBS) + + # redis-sentinel + $(REDIS_SENTINEL_NAME): $(REDIS_SERVER_NAME) diff --git a/dev-db/redis/files/redis.confd b/dev-db/redis/files/redis.confd new file mode 100644 index 000000000000..07585fa7a116 --- /dev/null +++ b/dev-db/redis/files/redis.confd @@ -0,0 +1,20 @@ +# Redis user. +REDIS_USER="redis" + +# Redis group. +REDIS_GROUP="redis" + +# Redis configuration file. +REDIS_CONF="/etc/redis.conf" + +# Redis dump directory. +REDIS_DIR="/var/lib/redis" + +# Redis pid file. +# (Be sure to change the main redis configuration file as well if you change +# this from the default.) +REDIS_PID="/var/run/redis/redis.pid" + +# Redis options. +# (Redis expects the first argument to be the configuration file.) +REDIS_OPTS="${REDIS_CONF}" diff --git a/dev-db/redis/files/redis.initd b/dev-db/redis/files/redis.initd new file mode 100644 index 000000000000..eca645edff94 --- /dev/null +++ b/dev-db/redis/files/redis.initd @@ -0,0 +1,41 @@ +#!/sbin/runscript +# $Id$ + +REDIS_EXEC=/usr/sbin/redis-server +REDIS_PID=${REDIS_PID:-/var/run/redis/redis.pid} +REDIS_DIR=${REDIS_DIR:-/var/lib/redis} +REDIS_CONF=${REDIS_CONF:-/etc/redis.conf} +REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"} +REDIS_USER=${REDIS_USER:-redis} +REDIS_GROUP=${REDIS_GROUP:-redis} + +depend() { + use net localmount logger + after keepalived +} + +start() { + + local PID_DIR=$(dirname ${REDIS_PID}) + mkdir -p ${PID_DIR} + chown ${REDIS_USER}:${REDIS_GROUP} ${PID_DIR} + + ebegin "Starting Redis server" + start-stop-daemon --start \ + --chdir "${REDIS_DIR}" \ + --user ${REDIS_USER}:${REDIS_GROUP} \ + --pidfile "${REDIS_PID}" \ + --exec "${REDIS_EXEC}" \ + -- ${REDIS_OPTS} + ret=$? + eend ${ret} + +} + +stop() { + ebegin "Stopping Redis server" + start-stop-daemon --stop --quiet --pidfile "${REDIS_PID}" + ret=$? + rm -f "${REDIS_PID}" + eend ${ret} +} diff --git a/dev-db/redis/files/redis.initd-2 b/dev-db/redis/files/redis.initd-2 new file mode 100644 index 000000000000..c910f53ed1a9 --- /dev/null +++ b/dev-db/redis/files/redis.initd-2 @@ -0,0 +1,23 @@ +#!/sbin/runscript +# $Id$ + +REDIS_DIR=${REDIS_DIR:-/var/lib/redis} +REDIS_CONF=${REDIS_CONF:-/etc/redis.conf} +REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"} +REDIS_USER=${REDIS_USER:-redis} +REDIS_GROUP=${REDIS_GROUP:-redis} + +command=/usr/sbin/redis-server +start_stop_daemon_args="--chdir \"${REDIS_DIR}\" + --user ${REDIS_USER} --group ${REDIS_GROUP}" +command_args="${REDIS_OPTS}" +pidfile=${REDIS_PID:-/var/run/redis/redis.pid} + +depend() { + use net localmount logger + after keepalived +} + +start_pre() { + checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID}) +} diff --git a/dev-db/redis/files/redis.initd-3 b/dev-db/redis/files/redis.initd-3 new file mode 100644 index 000000000000..56bb59376f78 --- /dev/null +++ b/dev-db/redis/files/redis.initd-3 @@ -0,0 +1,32 @@ +#!/sbin/runscript +# $Id$ + +REDIS_DIR=${REDIS_DIR:-/var/lib/redis} +REDIS_CONF=${REDIS_CONF:-/etc/redis.conf} +REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"} +REDIS_USER=${REDIS_USER:-redis} +REDIS_GROUP=${REDIS_GROUP:-redis} + +command=/usr/sbin/redis-server +start_stop_daemon_args="--chdir \"${REDIS_DIR}\" + --user ${REDIS_USER} --group ${REDIS_GROUP}" +command_args="${REDIS_OPTS}" +pidfile=${REDIS_PID:-/run/redis/redis.pid} + +depend() { + use net localmount logger + after keepalived +} + +start_pre() { + checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID}) +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --exec ${retries} \ + --retry 30 \ + --pidfile ${pidfile} + eend +} diff --git a/dev-db/redis/files/redis.initd-4 b/dev-db/redis/files/redis.initd-4 new file mode 100644 index 000000000000..4a765d038b82 --- /dev/null +++ b/dev-db/redis/files/redis.initd-4 @@ -0,0 +1,33 @@ +#!/sbin/runscript +# $Id$ + +REDIS_DIR=${REDIS_DIR:-/var/lib/redis} +REDIS_CONF=${REDIS_CONF:-/etc/redis.conf} +REDIS_OPTS=${REDIS_OPTS:-"${REDIS_CONF}"} +REDIS_USER=${REDIS_USER:-redis} +REDIS_GROUP=${REDIS_GROUP:-redis} +REDIS_TIMEOUT=${REDIS_TIMEOUT:-30} + +command=/usr/sbin/redis-server +pidfile=${REDIS_PID:-/run/redis/redis.pid} +start_stop_daemon_args="--background --make-pidfile --pidfile ${pidfile} + --chdir \"${REDIS_DIR}\" --user ${REDIS_USER} --group ${REDIS_GROUP}" +command_args="${REDIS_OPTS}" + +depend() { + use net localmount logger + after keepalived +} + +start_pre() { + checkpath -d -m 0775 -o ${REDIS_USER}:${REDIS_GROUP} $(dirname ${REDIS_PID}) +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop \ + --exec ${command} \ + --retry ${REDIS_TIMEOUT} \ + --pidfile ${pidfile} + eend +} diff --git a/dev-db/redis/files/redis.service b/dev-db/redis/files/redis.service new file mode 100644 index 000000000000..f1322f69f11e --- /dev/null +++ b/dev-db/redis/files/redis.service @@ -0,0 +1,14 @@ +[Unit] +Description=A persistent key-value database +After=syslog.target network.target + +[Service] +Type=forking +PIDFile=/var/run/redis/redis.pid +ExecStart=/usr/sbin/redis-server /etc/redis.conf +User=redis +Group=redis + +[Install] +WantedBy=multi-user.target + diff --git a/dev-db/redis/files/redis.service-2 b/dev-db/redis/files/redis.service-2 new file mode 100644 index 000000000000..c36d7960ef71 --- /dev/null +++ b/dev-db/redis/files/redis.service-2 @@ -0,0 +1,14 @@ +[Unit] +Description=A persistent key-value database +After=syslog.target network.target + +[Service] +Type=simple +PIDFile=/var/run/redis/redis.pid +ExecStart=/usr/sbin/redis-server /etc/redis.conf +User=redis +Group=redis + +[Install] +WantedBy=multi-user.target + diff --git a/dev-db/redis/files/redis.tmpfiles b/dev-db/redis/files/redis.tmpfiles new file mode 100644 index 000000000000..657d8a551d4b --- /dev/null +++ b/dev-db/redis/files/redis.tmpfiles @@ -0,0 +1,2 @@ +# redis runtime directory +d /var/run/redis 0755 redis root - diff --git a/dev-db/redis/metadata.xml b/dev-db/redis/metadata.xml new file mode 100644 index 000000000000..cdd2dabaed7d --- /dev/null +++ b/dev-db/redis/metadata.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> + <maintainer> + <email>ultrabug@gentoo.org</email> + </maintainer> + <maintainer> + <email>lu_zero@gentoo.org</email> + </maintainer> + <maintainer> + <email>bugs@bergstroem.nu</email> + <name>Johan Bergström</name> + <description>Proxy-Maintainer, assign bugs</description> + </maintainer> + <use> + <flag name="jemalloc"> + Use <pkg>dev-libs/jemalloc</pkg> for allocations. + </flag> + <flag name="tcmalloc"> + Use tcmalloc from <pkg>dev-util/google-perftools</pkg> for allocations. + </flag> + </use> +</pkgmetadata> diff --git a/dev-db/redis/redis-2.6.15-r1.ebuild b/dev-db/redis/redis-2.6.15-r1.ebuild new file mode 100644 index 000000000000..0a14dfe37d6e --- /dev/null +++ b/dev-db/redis/redis-2.6.15-r1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="amd64 x86 ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND=">=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="tcmalloc? ( !jemalloc ) + jemalloc? ( !tcmalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.6.7"-{shared,config}.patch + + # bug 467172, 467174 + sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-3" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.6.16.ebuild b/dev-db/redis/redis-2.6.16.ebuild new file mode 100644 index 000000000000..dca1a5783aca --- /dev/null +++ b/dev-db/redis/redis-2.6.16.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND=">=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="tcmalloc? ( !jemalloc ) + jemalloc? ( !tcmalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.6.7"-{shared,config}.patch + + # bug 467172, 467174 + sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-3" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.8.11.ebuild b/dev-db/redis/redis-2.8.11.ebuild new file mode 100644 index 000000000000..1b5a6939b7a3 --- /dev/null +++ b/dev-db/redis/redis-2.8.11.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~hppa ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND=">=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="tcmalloc? ( !jemalloc ) + jemalloc? ( !tcmalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch + + # bug 467172, 467174 + sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-3" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.8.13.ebuild b/dev-db/redis/redis-2.8.13.ebuild new file mode 100644 index 000000000000..10a16cfa4588 --- /dev/null +++ b/dev-db/redis/redis-2.8.13.ebuild @@ -0,0 +1,111 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~amd64-linux ~hppa ~x86 ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND=">=dev-lang/lua-5.1:0 + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch + epatch "${FILESDIR}"/${P}-sharedlua.patch + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-3" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.8.17-r1.ebuild b/dev-db/redis/redis-2.8.17-r1.ebuild new file mode 100644 index 000000000000..0a6166091e7a --- /dev/null +++ b/dev-db/redis/redis-2.8.17-r1.ebuild @@ -0,0 +1,112 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="amd64 ~hppa x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND=">=dev-lang/lua-5.1:0 + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch + epatch "${FILESDIR}"/${PN}-2.8.17-config.patch + epatch "${FILESDIR}"/${PN}-2.8.13-sharedlua.patch + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-4" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.8.19-r1.ebuild b/dev-db/redis/redis-2.8.19-r1.ebuild new file mode 100644 index 000000000000..e5b8ccad0f66 --- /dev/null +++ b/dev-db/redis/redis-2.8.19-r1.ebuild @@ -0,0 +1,120 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~amd64-linux ~hppa ~x86 ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND=">=dev-lang/lua-5.1:* + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch + epatch "${FILESDIR}"/${PN}-2.8.17-config.patch + epatch "${FILESDIR}"/${P}-sharedlua.patch + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # Avoid glibc noise + # https://github.com/antirez/redis/pull/2189 + [[ ${CHOST} == *linux* ]] && append-cflags "-D_DEFAULT_SOURCE" + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-4" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.8.8.ebuild b/dev-db/redis/redis-2.8.8.ebuild new file mode 100644 index 000000000000..40441f784647 --- /dev/null +++ b/dev-db/redis/redis-2.8.8.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~x86 ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND=">=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="tcmalloc? ( !jemalloc ) + jemalloc? ( !tcmalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch + + # bug 467172, 467174 + sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-3" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-2.8.9.ebuild b/dev-db/redis/redis-2.8.9.ebuild new file mode 100644 index 000000000000..e57c970c60d2 --- /dev/null +++ b/dev-db/redis/redis-2.8.9.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~hppa ~x86 ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND="tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND=">=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="tcmalloc? ( !jemalloc ) + jemalloc? ( !tcmalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-{shared,config}.patch + + # bug 467172, 467174 + sed -i -e 's:AR=:AR?=:g' -e 's:RANLIB=:RANLIB?=:g' "${S}/deps/lua/src/Makefile" || die + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-3" redis + + systemd_dounit "${FILESDIR}/redis.service" + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/redis/redis-3.0.2-r1.ebuild b/dev-db/redis/redis-3.0.2-r1.ebuild new file mode 100644 index 000000000000..0498056bd5f3 --- /dev/null +++ b/dev-db/redis/redis-3.0.2-r1.ebuild @@ -0,0 +1,116 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools eutils flag-o-matic systemd toolchain-funcs user + +DESCRIPTION="A persistent caching system, key-value and data structures database" +HOMEPAGE="http://redis.io/" +SRC_URI="http://download.redis.io/releases/${P}.tar.gz" + +LICENSE="BSD" +KEYWORDS="~amd64 ~hppa ~ppc64 ~x86 ~amd64-linux ~x86-linux ~x86-macos ~x86-solaris" +IUSE="+jemalloc tcmalloc test" +SLOT="0" + +RDEPEND=">=dev-lang/lua-5.1:* + tcmalloc? ( dev-util/google-perftools ) + jemalloc? ( >=dev-libs/jemalloc-3.2 )" +DEPEND="virtual/pkgconfig + >=sys-devel/autoconf-2.63 + test? ( dev-lang/tcl:0= ) + ${RDEPEND}" +REQUIRED_USE="?? ( tcmalloc jemalloc )" + +S="${WORKDIR}/${PN}-${PV/_/-}" + +pkg_setup() { + enewgroup redis 75 + enewuser redis 75 -1 /var/lib/redis redis +} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2.8.3-shared.patch + epatch "${FILESDIR}"/${PN}-2.8.17-config.patch + epatch "${FILESDIR}"/${PN}-3.0.0-sharedlua.patch + + # Copy lua modules into build dir + cp "${S}"/deps/lua/src/{fpconv,lua_bit,lua_cjson,lua_cmsgpack,lua_struct,strbuf}.c "${S}"/src || die + cp "${S}"/deps/lua/src/{fpconv,strbuf}.h "${S}"/src || die + # Append cflag for lua_cjson + # https://github.com/antirez/redis/commit/4fdcd213#diff-3ba529ae517f6b57803af0502f52a40bL61 + append-cflags "-DENABLE_CJSON_GLOBAL" + + # now we will rewrite present Makefiles + local makefiles="" + for MKF in $(find -name 'Makefile' | cut -b 3-); do + mv "${MKF}" "${MKF}.in" + sed -i -e 's:$(CC):@CC@:g' \ + -e 's:$(CFLAGS):@AM_CFLAGS@:g' \ + -e 's: $(DEBUG)::g' \ + -e 's:$(OBJARCH)::g' \ + -e 's:ARCH:TARCH:g' \ + -e '/^CCOPT=/s:$: $(LDFLAGS):g' \ + "${MKF}.in" \ + || die "Sed failed for ${MKF}" + makefiles+=" ${MKF}" + done + # autodetection of compiler and settings; generates the modified Makefiles + cp "${FILESDIR}"/configure.ac-2.2 configure.ac + sed -i -e "s:AC_CONFIG_FILES(\[Makefile\]):AC_CONFIG_FILES([${makefiles}]):g" \ + configure.ac || die "Sed failed for configure.ac" + eautoconf +} + +src_configure() { + econf + + # Linenoise can't be built with -std=c99, see https://bugs.gentoo.org/451164 + # also, don't define ANSI/c99 for lua twice + sed -i -e "s:-std=c99::g" deps/linenoise/Makefile deps/Makefile || die +} + +src_compile() { + tc-export CC AR RANLIB + + local myconf="" + + if use tcmalloc ; then + myconf="${myconf} USE_TCMALLOC=yes" + elif use jemalloc ; then + myconf="${myconf} JEMALLOC_SHARED=yes" + else + myconf="${myconf} MALLOC=yes" + fi + + emake ${myconf} V=1 CC="${CC}" AR="${AR} rcu" RANLIB="${RANLIB}" +} + +src_install() { + insinto /etc/ + doins redis.conf sentinel.conf + use prefix || fowners redis:redis /etc/{redis,sentinel}.conf + fperms 0644 /etc/{redis,sentinel}.conf + + newconfd "${FILESDIR}/redis.confd" redis + newinitd "${FILESDIR}/redis.initd-4" redis + + systemd_newunit "${FILESDIR}/redis.service-2" redis.service + systemd_newtmpfilesd "${FILESDIR}/redis.tmpfiles" redis.conf + + nonfatal dodoc 00-RELEASENOTES BUGS CONTRIBUTING MANIFESTO README + + dobin src/redis-cli + dosbin src/redis-benchmark src/redis-server src/redis-check-aof src/redis-check-dump + fperms 0750 /usr/sbin/redis-benchmark + dosym /usr/sbin/redis-server /usr/sbin/redis-sentinel + + if use prefix; then + diropts -m0750 + else + diropts -m0750 -o redis -g redis + fi + keepdir /var/{log,lib}/redis +} diff --git a/dev-db/repmgr/Manifest b/dev-db/repmgr/Manifest new file mode 100644 index 000000000000..836db3c5ac12 --- /dev/null +++ b/dev-db/repmgr/Manifest @@ -0,0 +1 @@ +DIST repmgr-3.0.1.tar.gz 91724 SHA256 27656442aacc1c97a006039a50cf6da84b4d38fc11542a555df24d93ae6b02bc SHA512 5655745df18132ee53ff36f80b3a2bb8caa6cedd8091350464cf343386baa31c47d46b25c171dda0fd1f4c3402babea9864f4557a10659111449a2eb2e1fa2b9 WHIRLPOOL 48383f717c1ab4f6b07d724af3b52bf7d257855300b289a887d1cb88c66ef7ae434a609e233168ad4cd7310cdb7a47e2101baf5d0ea52436d2576f02eec55a83 diff --git a/dev-db/repmgr/metadata.xml b/dev-db/repmgr/metadata.xml new file mode 100644 index 000000000000..ed88a4488c95 --- /dev/null +++ b/dev-db/repmgr/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> + <maintainer> + <email>betelguese@gentoo.org</email> + </maintainer> + <use> + </use> +</pkgmetadata> diff --git a/dev-db/repmgr/repmgr-3.0.1.ebuild b/dev-db/repmgr/repmgr-3.0.1.ebuild new file mode 100644 index 000000000000..edb43511e096 --- /dev/null +++ b/dev-db/repmgr/repmgr-3.0.1.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils multilib +DESCRIPTION="PostgreSQL Replication Manager" +HOMEPAGE="http://www.repmgr.org/" +SRC_URI="http://www.repmgr.org/download/${P}.tar.gz" +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="" + +DEPEND=">=dev-db/postgresql-9.3[server,static-libs]" +RDEPEND="${DEPEND} + net-misc/rsync" + +src_compile() { + emake USE_PGXS=1 +} + +src_install() { + emake DESTDIR="${D}" USE_PGXS=1 install + export PGSLOT="$(postgresql-config show)" + einfo "PGSLOT: ${PGSLOT}" + PGBASEDIR=/usr/$(get_libdir)/postgresql-${PGSLOT} + PGBINDIR=${PGBASEDIR}/bin/ + PGCONTRIB=/usr/share/postgresql-${PGSLOT}/contrib/ + dodir $PGCONTRIB $PGBINDIR + insinto $PGCONTRIB + doins sql/repmgr2_repmgr3.sql + dosym $PGBINDIR/repmgr /usr/bin/repmgr${PGSLOT//.} + dosym $PGBINDIR/repmgrd /usr/bin/repmgrd${PGSLOT//.} + dodoc CREDITS HISTORY COPYRIGHT TODO *.md *.rst + insinto /etc + newins repmgr.conf.sample repmgr.conf + fowners postgres:postgres /etc/repmgr.conf + ewarn "Remember to modify /etc/repmgr.conf" +} diff --git a/dev-db/slony1/Manifest b/dev-db/slony1/Manifest new file mode 100644 index 000000000000..07bdf097f448 --- /dev/null +++ b/dev-db/slony1/Manifest @@ -0,0 +1,14 @@ +DIST slony1-2.1.3-docs.tar.bz2 1314210 SHA256 8588df1b06086809ce0fef7e1348405bf701c959e2b0affda9d6305f201d6fb4 SHA512 a37bc8432d19833c9cbcc7494c783fabce6d2b5feedf4001e031ff5e5039630497e9b7e4ca4d237d53f41109368cd33708400e64f0c2f45cef3a9916ad9cf4e7 WHIRLPOOL 7d7e0db61956919f5d4fdf96a946b81e9b3502f2c8e5f6fc9b525cb89c37d44cadf349f607fd13a89561c87d1ca2bd722e4ca57b250f809b9c25cd1c56bd523b +DIST slony1-2.1.3.tar.bz2 1512693 SHA256 048b94c990afceb892f8f6631268bb66e93a3c630afc694b3a09f051c338790b SHA512 f02320e3bb85848b93bc43a7d4e0dbb367afcb8af2100cda840888dcd219fead78bd1ac927493bd173cef2bc1195ba4f860679eed0606dd0a2cf9652d671b493 WHIRLPOOL 51641f4dfa78210ab0ecc2827932dc06389867c18df6dfb61d8b43c03ad00d2ac09c529e4171ece07139a803ef45f12c15ac14da39e6bb269bb5a0d7a0270943 +DIST slony1-2.1.4-docs.tar.bz2 1360684 SHA256 e7d8c1939e0e2cf34614940f62c4fc0ce1a52b6b495d8cb2dc2d249756257fc5 SHA512 87d9db938a849171c15d70213ac770f0daf34a930e141411c8a0a9d5f5ca6375c6c0a2ebd88edfbf4144dc81ccaab6494ae8762e3bff863551aa9846d6abc545 WHIRLPOOL 14c455ddcfb64d26d1613d0a6372cd86ad2906d7c1ea438c64075292920cd53b80601a8f5c45d0605b2c878b7dbdc308a385eadd02d557f6d982eedecd0c764a +DIST slony1-2.1.4.tar.bz2 1515755 SHA256 90dc746bb9f12a051f9f563365e693ffd81f07a2353debfc4b8a4d0884ca72a4 SHA512 b882146a158adee27f360fc34d3c64144efe3c3a7d63574a4450cb1eb3dac7d75df19d17e75ffc72f656d27b5c5b7fc64bc536de9753a36fe96848b562e42883 WHIRLPOOL c0b95f72049b7f90caf1c2259c8f97411f0b1f1d5c9a6cc4fd6b1b2e677dec3fbbea84ffaffb0ba15caa40203923c8272ac6cccae8e08a51f83c62b765ce2580 +DIST slony1-2.2.0-docs.tar.bz2 1429244 SHA256 4a97d3c3e9e8e12257a6fcabfeb65ced02b34f211f9154a0d3d8c85dda575070 SHA512 2d55e8d3066525e3bf3f70d5e9ea0f12279dbdc4708c5fff0076318c6cf70baa1d7b388e1846bacc65f1a42820113d38029afbfd8800cfd721c003f120f9b1cb WHIRLPOOL afe1d0e83a6e45c7f157c5eafe6bebd0bc372c7aec1ab126309fa026484a8175e37b99d6fc2ace31f0bbf84e651a62965eb7a532e5bc4a3c1ef3f5a2c71fb46d +DIST slony1-2.2.0.tar.bz2 1467410 SHA256 38e0c78d50ab882bc0cff1801d28b69ef1f7d99a6e55b06fa20e2f4a08fa6049 SHA512 4d05dee4028408c78da068742b4adbcb2c1d37bfb480047f6ee4c59d167e13d340c2b644c45911d29dda8d626aac6fe79cad7f51a81bc5edaff14fa10be7b369 WHIRLPOOL 31253f8d760b16c0e1c77ffc83d8f936d6225b83124727603525180b2d134c6d650cc8b5c59334a3cd29ee058e59b539c1f5d857585b8d9a22631aba4ace2798 +DIST slony1-2.2.1-docs.tar.bz2 1445906 SHA256 7c8fdbe35a5738f38dd4a7774e3e5b3413916da6e3c7fba3bd5554b61e003d30 SHA512 6c213890d45612bd30f995286b6e7ce6c777274a9b96e040794707c1b28bf1337d27d8c1495e0824aafe950e615b2fea01f2c84cf491391132d29cf3fd28d322 WHIRLPOOL b94715e210c6db12e1d431bba2b602f6b8346226a71b058756acf73b449e42c5397979a19f7bd3074a7c8c9b707d001e09ec22be445e161600137e443632af1d +DIST slony1-2.2.1.tar.bz2 1466866 SHA256 8606c2be3ad219fb8d482e5a0f836e37d26df3b49d5bce099fc71fd95961e960 SHA512 0b47180bb16e6d25eb3e6a280fe91bd2448bbf4b9ee10a8811f16bf0c2dbc7eb52d3c029d1fac5e3ff8f0621da3bc174d7deb7b72000c631664131aeb4c25e74 WHIRLPOOL 9c61161fbc87d1ad30dba0ec0274801109c30f8f4f33840337737c7201bb622739b313728ae1ab2c26864dfe8c87e295642000dde034795ddd81babaaef5dcbc +DIST slony1-2.2.2-docs.tar.bz2 1444845 SHA256 f025b42a29e32e65c74b18618fafa552fa878acb8daf0d6cf2bfc926020b011d SHA512 8b3fc427f259a71dd4fb1d914d89d52f320ba2c5f034ecb069f0bf8f4f4a1f5e37b1f0ad4bec7adf0af4f18503421ad41f51a41a0c6b74675bf7dcb1c65c5971 WHIRLPOOL 6c32adffd10c86a40c1235f6266675c9e78ae381de23be08291007983480337c65e5ac83d496655f950164e7aefbdf5ce25bc448097158523bad37ddc46b0371 +DIST slony1-2.2.2.tar.bz2 1466576 SHA256 ef5f0fa6d95fd3a6a6b2fb5bdb4610ba437b85d2ad9210caabcfb1a9a98405d2 SHA512 320d871fc0fa58bd8c7bc4af50f160ff8d8ea008fed3cb69aa15de14adc6bcfbee2d9659fbf196140af8764d192a5914f2a0b1e486c43533b101b91a73dca36c WHIRLPOOL cf9be62309fe0fa80aa9f2bbffea68db2af453d391f27884b1a9cb0f16883f002c340913bfa58cf9dbc2ec9b6c931d0c1681191e96f9e0d8818ddcdc428fb8df +DIST slony1-2.2.3-docs.tar.bz2 1448128 SHA256 de073555cd1d39ad7a9204eb21a7b7bced6cd391983ee34b914a384b544b9617 SHA512 c3be9473c6e248a9f2f96ddde0f4d4bb3212b2ff9ff0db341de0f2c5908a770c5b4a0750d9cb65d0b4f2a19c6d172871fd0cdffef2731c70154c1e1fb6bff1f0 WHIRLPOOL 239c2e912c54157a9e5885b737893489ff451e451a6664a40990801d4f19190dfda20a833bc9634977bb6ea439dca0c1561ad047fcf8356f70801202e92bfeb9 +DIST slony1-2.2.3.tar.bz2 1468030 SHA256 1321988b437bd3294a07dc5ed85dfa3c35d9413287a49e4503ec47763fa1d3a8 SHA512 6f762ec722eb844d0c0c2923e2c1bee48c6fbf973cf719553a9f40b090e2ba08885cd089818b17c56a662fe5f35eadb4b060554adcd5abab5a1a250356590519 WHIRLPOOL 71686448418a09566c1b5767a598f5ebe943b33cba9664ec7696e70e5d62adc2daa5e2618a6aced0faeac0a621527738cdf2e54553a74dd1c5e08c6850d90e7a +DIST slony1-2.2.4-docs.tar.bz2 1448892 SHA256 0417194a9245e615dedc00ef463e1357df09b110ecab860ba45fef7e80dcf2cf SHA512 4a9ae11aaaa79d710b3454068eb92915fa6b96df5e6b9f532f2f0ddc51f2865d8928b94d2a496374f87435751574062987d14568d30e38e7e28535d1b4e845d6 WHIRLPOOL 096820fa5276b04d305cdfc17abaf7daf28b95caaa75e15c0807712733c343e37b0d30577a826fc061fc659c170e11079f6bee0a2fffff3ba605d3e02a8d59c1 +DIST slony1-2.2.4.tar.bz2 1467776 SHA256 846a878f50de520d151e7f76a66d9b9845e94beb8820727bf84ab522a73e65b5 SHA512 951ecb07ae9f8478affeeb5c968530f597c203b24341b600057107f53adcdc53afce7dd21893700bb8d0ebd26fceb0ebc60917c9f5992b315a2bce47a1d57867 WHIRLPOOL 8a29c24e735f140a915779b81a9f8b5aeaa7c75a4dc122fb8ba322c10aa8be8dfe38ec853f38a503f595b7685759241a169c430cf2a9ef6ddb7ebaa1b3f4448e diff --git a/dev-db/slony1/files/slony1-2.1.1-ldflags.patch b/dev-db/slony1/files/slony1-2.1.1-ldflags.patch new file mode 100644 index 000000000000..35452ad3b852 --- /dev/null +++ b/dev-db/slony1/files/slony1-2.1.1-ldflags.patch @@ -0,0 +1,29 @@ +diff -Naur a/Makefile.global.in b/Makefile.global.in +--- a/Makefile.global.in 2012-01-25 14:13:40.000000000 -0500 ++++ b/Makefile.global.in 2012-02-22 06:14:05.240047000 -0500 +@@ -80,7 +80,7 @@ + subdir=$(slony_subdir) + + override CPPFLAGS := -I${pgincludeserverdir} -I${pgincludedir} $(CPPFLAGS) +-LDFLAGS = -L${pglibdir} -L${pgpkglibdir} -lpq @NLSLIB@ ++override LDFLAGS += -L${pglibdir} -L${pgpkglibdir} -lpq @NLSLIB@ + + ifeq ($(GCC), yes) + CFLAGS += -Wall -Wmissing-prototypes -Wmissing-declarations +diff -Naur a/makefiles/Makefile.linux b/makefiles/Makefile.linux +--- a/makefiles/Makefile.linux 2012-01-25 14:13:40.000000000 -0500 ++++ b/makefiles/Makefile.linux 2012-02-22 06:15:45.652523000 -0500 +@@ -12,9 +12,9 @@ + endif + + %.so: %.o +- $(CC) -shared -o $@ $< ++ $(CC) $(LDFLAGS) -shared -o $@ $< + + %.o: %.c +- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -o $@ $< + +-sqlmansect = 7 +\ No newline at end of file ++sqlmansect = 7 diff --git a/dev-db/slony1/files/slony1-2.1.2-ldflags.patch b/dev-db/slony1/files/slony1-2.1.2-ldflags.patch new file mode 100644 index 000000000000..038b2ee20fb5 --- /dev/null +++ b/dev-db/slony1/files/slony1-2.1.2-ldflags.patch @@ -0,0 +1,17 @@ +diff -Naur a/makefiles/Makefile.linux b/makefiles/Makefile.linux +--- a/makefiles/Makefile.linux 2012-01-25 14:13:40.000000000 -0500 ++++ b/makefiles/Makefile.linux 2012-02-22 06:15:45.652523000 -0500 +@@ -12,9 +12,9 @@ + endif + + %.so: %.o +- $(CC) -shared -o $@ $< ++ $(CC) $(LDFLAGS) -shared -o $@ $< + + %.o: %.c +- $(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $< ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -c -o $@ $< + +-sqlmansect = 7 +\ No newline at end of file ++sqlmansect = 7 diff --git a/dev-db/slony1/files/slony1.conf b/dev-db/slony1/files/slony1.conf new file mode 100644 index 000000000000..219092bd1294 --- /dev/null +++ b/dev-db/slony1/files/slony1.conf @@ -0,0 +1,12 @@ +# /etc/conf.d/slony1: +# $Id$ + +# Configuration file for /etc/init.d/slony1 + +USER=postgres +CLUSTER=your_cluster_name +DBUSER=postgres +DBNAME=your_database_name +DBHOST=localhost +LOGFILE=/var/lib/postgresql/data/slony1.log +LOGLEVEL=1 # 1(minimum)..4(maximum) diff --git a/dev-db/slony1/files/slony1.init b/dev-db/slony1/files/slony1.init new file mode 100755 index 000000000000..1e1443b0ac2f --- /dev/null +++ b/dev-db/slony1/files/slony1.init @@ -0,0 +1,37 @@ +#!/sbin/runscript +# Copyright 1999-2004 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +depend() { + need postgresql +} + +start() { + ebegin "Starting slony1" + /usr/bin/slon -p /var/run/slony1.pid -d $LOGLEVEL $CLUSTER "dbname=$DBNAME user=$DBUSER host=$DBHOST" >> $LOGFILE 2>&1 & + + while : + do + cnt=$(($cnt + 1)) + if [ -f "/var/run/slony1.pid" ]; then + ret=0 + break + fi + + if [ $cnt -eq 30 ]; then + eerror "Please see log file: $LOGFILE" + ret=1 + break + fi + sleep 1 + done + eend $ret +} + +stop() { + ebegin "Stopping slony1" + kill `cat /var/run/slony1.pid` + eend $? +} + diff --git a/dev-db/slony1/metadata.xml b/dev-db/slony1/metadata.xml new file mode 100644 index 000000000000..d06e452b35af --- /dev/null +++ b/dev-db/slony1/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>postgresql</herd> +</pkgmetadata> diff --git a/dev-db/slony1/slony1-2.1.3.ebuild b/dev-db/slony1/slony1-2.1.3.ebuild new file mode 100644 index 000000000000..181060c9b0b4 --- /dev/null +++ b/dev-db/slony1/slony1-2.1.3.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="amd64 ppc x86" + +DEPEND="|| ( + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1.2-ldflags.patch" +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc HISTORY-1.1 INSTALL README SAMPLE TODO UPGRADING doc/howto/*.txt + + doman "${S}"/doc/adminguide/man{1,7}/* + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/slony1/slony1-2.1.4.ebuild b/dev-db/slony1/slony1-2.1.4.ebuild new file mode 100644 index 000000000000..84b47897087a --- /dev/null +++ b/dev-db/slony1/slony1-2.1.4.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-2.1.2-ldflags.patch" +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc HISTORY-1.1 INSTALL README SAMPLE TODO UPGRADING doc/howto/*.txt + + # gone: + #doman "${S}"/doc/adminguide/man{1,7}/* + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/slony1/slony1-2.2.0.ebuild b/dev-db/slony1/slony1-2.2.0.ebuild new file mode 100644 index 000000000000..333e0078b268 --- /dev/null +++ b/dev-db/slony1/slony1-2.2.0.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/slony1/slony1-2.2.1.ebuild b/dev-db/slony1/slony1-2.2.1.ebuild new file mode 100644 index 000000000000..333e0078b268 --- /dev/null +++ b/dev-db/slony1/slony1-2.2.1.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/slony1/slony1-2.2.2.ebuild b/dev-db/slony1/slony1-2.2.2.ebuild new file mode 100644 index 000000000000..333e0078b268 --- /dev/null +++ b/dev-db/slony1/slony1-2.2.2.ebuild @@ -0,0 +1,66 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/slony1/slony1-2.2.3.ebuild b/dev-db/slony1/slony1-2.2.3.ebuild new file mode 100644 index 000000000000..70e81860c49e --- /dev/null +++ b/dev-db/slony1/slony1-2.2.3.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/slony1/slony1-2.2.4.ebuild b/dev-db/slony1/slony1-2.2.4.ebuild new file mode 100644 index 000000000000..70e81860c49e --- /dev/null +++ b/dev-db/slony1/slony1-2.2.4.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="4" + +inherit eutils versionator + +IUSE="doc perl" + +DESCRIPTION="A replication system for the PostgreSQL Database Management System" +HOMEPAGE="http://slony.info/" + +# ${P}-docs.tar.bz2 contains man pages as well as additional documentation +MAJ_PV=$(get_version_component_range 1-2) +SRC_URI="http://main.slony.info/downloads/${MAJ_PV}/source/${P}.tar.bz2 + http://main.slony.info/downloads/${MAJ_PV}/source/${P}-docs.tar.bz2" + +LICENSE="BSD GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +DEPEND="|| ( + dev-db/postgresql:9.4[server] + dev-db/postgresql:9.3[server] + dev-db/postgresql:9.2[server] + dev-db/postgresql:9.1[server] + dev-db/postgresql:9.0[server] + ) + dev-db/postgresql[threads] + perl? ( dev-perl/DBD-Pg ) +" + +pkg_setup() { + local PGSLOT="$(postgresql-config show)" + if [[ ${PGSLOT//.} < 83 ]] ; then + eerror "You must build ${CATEGORY}/${PN} against PostgreSQL 8.3 or higher." + eerror "Set an appropriate slot with postgresql-config." + die "postgresql-config not set to 8.3 or higher." + fi + +# if [[ ${PGSLOT//.} > 90 ]] ; then +# ewarn "You are building ${CATEGORY}/${PN} against a version of PostgreSQL greater than 9.0." +# ewarn "This is neither supported here nor upstream." +# ewarn "Any bugs you encounter should be reported upstream." +# fi +} + +src_configure() { + local myconf + use perl && myconf='--with-perltools' + econf ${myconf} +} + +src_install() { + emake DESTDIR="${D}" install + + dodoc INSTALL README SAMPLE TODO UPGRADING share/slon.conf-sample + + if use doc ; then + cd "${S}"/doc + dohtml -r * + fi + + newinitd "${FILESDIR}"/slony1.init slony1 + newconfd "${FILESDIR}"/slony1.conf slony1 +} diff --git a/dev-db/soci/Manifest b/dev-db/soci/Manifest new file mode 100644 index 000000000000..831b525efbbb --- /dev/null +++ b/dev-db/soci/Manifest @@ -0,0 +1,2 @@ +DIST soci-3.2.2.zip 518502 SHA256 e3ad3ea0ef37eab0ae9e6459d2cdd099b1fa1165b663c349e1200356cf4e9c91 SHA512 36fa977e8827ec546ec85be45d78bb21b2700ee7838d144e6f6ac91cc70242cbe8ce968092146e2b29d52fe1022b9287cff7465c156a49c0ffb1dde6d89964ab WHIRLPOOL e25bc0ec7ca1137db5b703635ea0066b8e93307e721c2e4efc45f0d008abff8c9b944b483dfd9c45a6361e7bd049f70570342ae4ea0e0594f9d0914268d00873 +DIST soci-3.2.3.zip 508929 SHA256 ab0f82873b0c5620e0e8eb2ff89abad6517571fd63bae4bdcac64dd767ac9a05 SHA512 dd9b7eaf535502e3230eada4d4d019963d2c9cf59b69fff5d466b4fc00976fa08f7b0199a0e4564a0395d0d30095b97aa1d613dfbaa329feb077ece3b0efacdf WHIRLPOOL ce4316de7228ba44a7440fe2e90c6252f5d5780b6826bd1b41cce7fe471551bb454d4658c3b07813050d36ec17886c6f583e1d531ee63c671d648bccfc63b1b1 diff --git a/dev-db/soci/metadata.xml b/dev-db/soci/metadata.xml new file mode 100644 index 000000000000..bef37b683d33 --- /dev/null +++ b/dev-db/soci/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jauhien@gentoo.org</email> + <name>Jauhien Piatlicki</name> + </maintainer> + <use> + <flag name="boost">Enable boost support</flag> + <flag name="empty">Build the sample backend called Empty</flag> + </use> + <upstream> + <remote-id type="sourceforge">soci</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/soci/soci-3.2.2.ebuild b/dev-db/soci/soci-3.2.2.ebuild new file mode 100644 index 000000000000..818391b5c1b4 --- /dev/null +++ b/dev-db/soci/soci-3.2.2.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="A db access library for C++ that makes the illusion of embedding SQL queries in the regular C++ code" +HOMEPAGE="http://soci.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.zip" +LICENSE="Boost-1.0" +SLOT="0" +IUSE="boost doc +empty firebird mysql odbc oracle postgres sqlite" + +DEPEND="boost? ( dev-libs/boost ) + firebird? ( dev-db/firebird ) + mysql? ( virtual/mysql ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 ) +" +RDEPEND=${DEPEND} + +src_configure() { + local mycmakeargs="$(cmake-utils_use_with boost ) + $(cmake-utils_use empty SOCI_EMPTY) + $(cmake-utils_use_with firebird FIREBIRD) + $(cmake-utils_use_with mysql MYSQL) + $(cmake-utils_use_with odbc ODBC) + $(cmake-utils_use_with oracle ORACLE) + $(cmake-utils_use_with postgres POSTGRESQL) + $(cmake-utils_use_with sqlite SQLITE3) + -DWITH_DB2=OFF" #use MYCMAKEARGS if you want enable IBM DB2 support + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + dodoc AUTHORS CHANGES + if use doc; then + dohtml -r doc/* + fi +} diff --git a/dev-db/soci/soci-3.2.3.ebuild b/dev-db/soci/soci-3.2.3.ebuild new file mode 100644 index 000000000000..818391b5c1b4 --- /dev/null +++ b/dev-db/soci/soci-3.2.3.ebuild @@ -0,0 +1,47 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils + +KEYWORDS="~amd64 ~x86" + +DESCRIPTION="A db access library for C++ that makes the illusion of embedding SQL queries in the regular C++ code" +HOMEPAGE="http://soci.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.zip" +LICENSE="Boost-1.0" +SLOT="0" +IUSE="boost doc +empty firebird mysql odbc oracle postgres sqlite" + +DEPEND="boost? ( dev-libs/boost ) + firebird? ( dev-db/firebird ) + mysql? ( virtual/mysql ) + odbc? ( dev-db/unixODBC ) + oracle? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql:= ) + sqlite? ( dev-db/sqlite:3 ) +" +RDEPEND=${DEPEND} + +src_configure() { + local mycmakeargs="$(cmake-utils_use_with boost ) + $(cmake-utils_use empty SOCI_EMPTY) + $(cmake-utils_use_with firebird FIREBIRD) + $(cmake-utils_use_with mysql MYSQL) + $(cmake-utils_use_with odbc ODBC) + $(cmake-utils_use_with oracle ORACLE) + $(cmake-utils_use_with postgres POSTGRESQL) + $(cmake-utils_use_with sqlite SQLITE3) + -DWITH_DB2=OFF" #use MYCMAKEARGS if you want enable IBM DB2 support + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + dodoc AUTHORS CHANGES + if use doc; then + dohtml -r doc/* + fi +} diff --git a/dev-db/spatialite-tools/Manifest b/dev-db/spatialite-tools/Manifest new file mode 100644 index 000000000000..979dcc6266b8 --- /dev/null +++ b/dev-db/spatialite-tools/Manifest @@ -0,0 +1 @@ +DIST spatialite-tools-3.1.0.tar.gz 439019 SHA256 7e12a3b23ad5163257b7c8585091ead1046e8d5b56ac3130de42490693b5e160 SHA512 27f725fefcbc75894d6d14e81093deaa95b6a1cce7e15eb8fc3130ed7580f664bbb8ffd7e95f4de94b38cc8548cc82f2ed830fa8bcf3173e460a9b0666e9e0cc WHIRLPOOL 01a432a872c7ddb801edee969c3a6467cddacdb014690e669c75a1238c753f3f2d825a8e2f7370410431adc471ced0bb949291d868befa2d8d4947d08b39609e diff --git a/dev-db/spatialite-tools/metadata.xml b/dev-db/spatialite-tools/metadata.xml new file mode 100644 index 000000000000..3190fbf9c377 --- /dev/null +++ b/dev-db/spatialite-tools/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci-geosciences</herd> +</pkgmetadata> diff --git a/dev-db/spatialite-tools/spatialite-tools-3.1.0.ebuild b/dev-db/spatialite-tools/spatialite-tools-3.1.0.ebuild new file mode 100644 index 000000000000..b74ba99258d9 --- /dev/null +++ b/dev-db/spatialite-tools/spatialite-tools-3.1.0.ebuild @@ -0,0 +1,33 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit multilib + +DESCRIPTION="A complete Spatial DBMS in a nutshell built upon sqlite" +HOMEPAGE="http://www.gaia-gis.it/spatialite" +SRC_URI="http://www.gaia-gis.it/gaia-sins/${PN}-sources/${P}.tar.gz" + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="readline" + +RDEPEND=">=dev-db/spatialite-3.0.1[geos,xls] + dev-libs/expat + >=sci-libs/geos-3.3 + sci-libs/proj + sci-geosciences/readosm + readline? ( + sys-libs/ncurses + sys-libs/readline + ) +" +DEPEND="${RDEPEND}" + +src_configure() { + econf \ + $(use_enable readline) +} diff --git a/dev-db/spatialite/Manifest b/dev-db/spatialite/Manifest new file mode 100644 index 000000000000..a37ec24c4128 --- /dev/null +++ b/dev-db/spatialite/Manifest @@ -0,0 +1,2 @@ +DIST libspatialite-2.4.0.tar.gz 865036 SHA256 a9c2a3d9277a6fed13561cf2c1580fef701cfd55336f34eea3f3d46389f7f2c2 SHA512 3e34b2eeedfb0f3a57f3ef33c564cc3bd9391c6f7cc6d7fa7b8e83f920c3a625cfbb33d15d9f2110c7821d964b7b26bb5c06aebd41c3f7ad2bf943d3dea795cf WHIRLPOOL fed91a8501c34a3e0e0a5920049165c081abd050c41b1ef9cb20a8f68571dc85275133d23f798b0b10d88fd6f8623984ee4e18131309d85e1c7512fa9fd3f9d7 +DIST libspatialite-3.0.1.tar.gz 1849723 SHA256 4983d6584069fd5ff0cfcccccee1015088dab2db177c0dc7050ce8306b68f8e6 SHA512 604e5fcb3ac17eb3c69aff5dbf8c77660aecbddc81ab1faa63b0ce069253e3d1c5b6001bd2f2fde5d2f60de9c3758d0d871b9cbcaf1a6d18ceebc0788c166d94 WHIRLPOOL 48f8c84e828ec5e3504e9e347a1fe13c30e852f2127458e1b892ab422f4f0b2fd6857fd50fef51f72fb0851fe7827fac62fe1342e7deac2d7a511501c41321ab diff --git a/dev-db/spatialite/metadata.xml b/dev-db/spatialite/metadata.xml new file mode 100644 index 000000000000..dd2d30615678 --- /dev/null +++ b/dev-db/spatialite/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>sci-geosciences</herd> +<use> + <flag name='geos'>Add the <pkg>sci-libs/geos</pkg> library for exact topological tests</flag> + <flag name='proj'>Add the <pkg>sci-libs/proj</pkg> library for reprojection features</flag> + <flag name='xls'>Add the <pkg>dev-libs/freexl</pkg> library for xls import support</flag> +</use> +</pkgmetadata> diff --git a/dev-db/spatialite/spatialite-2.4.0_rc4.ebuild b/dev-db/spatialite/spatialite-2.4.0_rc4.ebuild new file mode 100644 index 000000000000..0ad1585f1676 --- /dev/null +++ b/dev-db/spatialite/spatialite-2.4.0_rc4.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +MY_PV=${PV/_rc/-} +MY_P=lib${P/_rc*} + +inherit multilib + +DESCRIPTION="A complete Spatial DBMS in a nutshell built upon sqlite" +HOMEPAGE="http://www.gaia-gis.it/gaia-sins/" +SRC_URI="http://www.gaia-gis.it/${PN}-${MY_PV}/${MY_P}.tar.gz" + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+geos iconv +proj" + +RDEPEND=">=dev-db/sqlite-3.7.5:3[extensions(+)] + geos? ( sci-libs/geos ) + proj? ( sci-libs/proj )" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + econf \ + --disable-static \ + --enable-geocallbacks \ + --enable-epsg \ + $(use_enable geos) \ + $(use_enable iconv) \ + $(use_enable proj) +} + +src_install() { + default + + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/spatialite/spatialite-3.0.1.ebuild b/dev-db/spatialite/spatialite-3.0.1.ebuild new file mode 100644 index 000000000000..ae43cfe7e6e2 --- /dev/null +++ b/dev-db/spatialite/spatialite-3.0.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +MY_PN="lib${PN}" +MY_P="${MY_PN}-${PV}" + +inherit multilib + +DESCRIPTION="A complete Spatial DBMS in a nutshell built upon sqlite" +HOMEPAGE="http://www.gaia-gis.it/gaia-sins/" +SRC_URI="http://www.gaia-gis.it/gaia-sins/${MY_PN}-sources/${MY_P}.tar.gz" + +LICENSE="MPL-1.1" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~ppc64 ~x86" +IUSE="+geos iconv +proj +xls" + +RDEPEND=">=dev-db/sqlite-3.7.5:3[extensions(+)] + geos? ( >=sci-libs/geos-3.3 ) + proj? ( sci-libs/proj ) + xls? ( dev-libs/freexl ) +" +DEPEND="${RDEPEND}" + +S=${WORKDIR}/${MY_P} + +src_configure() { + econf \ + --disable-static \ + --enable-geocallbacks \ + --enable-epsg \ + $(use_enable geos) \ + $(use_enable geos geosadvanced) \ + $(use_enable iconv) \ + $(use_enable proj) \ + $(use_enable xls freexl) +} + +src_install() { + default + + find "${ED}" -name '*.la' -exec rm -f {} + +} diff --git a/dev-db/sqlcipher/Manifest b/dev-db/sqlcipher/Manifest new file mode 100644 index 000000000000..0e21d044dc5b --- /dev/null +++ b/dev-db/sqlcipher/Manifest @@ -0,0 +1 @@ +DIST sqlcipher-3.3.0.tar.gz 10235736 SHA256 18f5df41a9806bc8eece00fde24c85107bd4807a5ae7057f9a6188de5d8fd82a SHA512 9f24fcd25811aabe36f5e27cdfc117a02ad3578a95691e9b3b7f41ee47ee0c176243c4f35a8415a17a3828d4534aae58a1097b75a950937706b10a79f2c92c81 WHIRLPOOL 1f4bdaf9ead7e2834d1efd2612c74eb91df2bbc17dfa4d404a72db4ef837b6b7a8430da522b6ec708f8873482c2de318a3cf65aebfdc53c200cad53a4ded9e6b diff --git a/dev-db/sqlcipher/metadata.xml b/dev-db/sqlcipher/metadata.xml new file mode 100644 index 000000000000..0b9695f30643 --- /dev/null +++ b/dev-db/sqlcipher/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>pinkbyte@gentoo.org</email> + <name>Sergey Popov</name> + </maintainer> + <upstream> + <remote-id type="github">sqlcipher/sqlcipher</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/sqlcipher/sqlcipher-3.3.0.ebuild b/dev-db/sqlcipher/sqlcipher-3.3.0.ebuild new file mode 100644 index 000000000000..5ecac204646e --- /dev/null +++ b/dev-db/sqlcipher/sqlcipher-3.3.0.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +AUTOTOOLS_AUTORECONF=1 +inherit autotools-multilib flag-o-matic + +DESCRIPTION="Full Database Encryption for SQLite" +HOMEPAGE="http://sqlcipher.net/" +SRC_URI="https://github.com/sqlcipher/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="readline static-libs tcl" + +# Tcl is always needed by buildsystem +RDEPEND="dev-libs/openssl:0[${MULTILIB_USEDEP}] + readline? ( sys-libs/readline:0[${MULTILIB_USEDEP}] ) + tcl? ( dev-lang/tcl:=[${MULTILIB_USEDEP}] )" +DEPEND="${RDEPEND} + dev-lang/tcl" + +src_prepare() { + append-cflags -DSQLITE_HAS_CODEC + + autotools-multilib_src_prepare +} + +src_configure() +{ + local myeconfargs=( + --enable-tempstore=yes + $(use_enable readline) + $(use_enable tcl) + ) + autotools-multilib_src_configure +} diff --git a/dev-db/sqldeveloper/Manifest b/dev-db/sqldeveloper/Manifest new file mode 100644 index 000000000000..d39b8120cda4 --- /dev/null +++ b/dev-db/sqldeveloper/Manifest @@ -0,0 +1,3 @@ +DIST sqldeveloper-3.2.20.09.87-no-jre.zip 182052759 SHA256 787b703a3fa2d7969ae486b9f2f23bdafd31242b2af74257943cf826c535c8d4 SHA512 716e2f9584e192b8e72a0e9439ac3fb0aea297087640df7c7c5659170846376d8e44d0fbdc68c96e274b100aad3f26b0710691349bfc0092c86c42830e115efe WHIRLPOOL 1d9eb51cb263c14a89a44167a239f3be34b7ca9bd78eefc28a73c1b24e6f4e2f10a1665b0b4a03c6932f987fae375c95bfc310c485e179c76e9b7135bb9825e3 +DIST sqldeveloper-4.0.2.15.21-no-jre.zip 235443867 SHA256 b23aca1d256002cdc19a0b3136ae13ebf9064feacc45a131be229a88fe9faed7 SHA512 e67b0f3d127adbc6cb77b3eb822834a6c41be7039c54eceb85e8c882704684a02dd036f078408192ad2cbcb963dfb0ba583e99a9f7b7db36b1e9a1f96e555880 WHIRLPOOL 31b32713f116193036dc5dd9b63c9b6c321763e2273227c51d70bd3db93575e4f12150a045f8615fb6086ee1d464af4d112be5824f9bf22b4f5917ae5a15b724 +DIST sqldeveloper-4.1.1.19.59-no-jre.zip 328364824 SHA256 3b0f3f861495f41b6844eeaf3a58117a90dd72d98cfe8d0b4ffafe103ec56bb5 SHA512 1f5a683ba91a41cb7bc40a45215632ff10b2b1075d5b434d5a8349137d467f59192ec78d33e67b141729b7a1f3e5d678f8b934418e362706ac85a8b0fe89b838 WHIRLPOOL fc4e86e18108729a044bbb4b75a25418599ac972ed003ee69cc0982e66eeb6779d3d46306ec3429b9f9d7a0fa01dc6242b66430c02fe333cb9d95f70160e3402 diff --git a/dev-db/sqldeveloper/files/sqldeveloper b/dev-db/sqldeveloper/files/sqldeveloper new file mode 100644 index 000000000000..eba773e10267 --- /dev/null +++ b/dev-db/sqldeveloper/files/sqldeveloper @@ -0,0 +1,9 @@ +#!/bin/bash +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +# skip their stupid [ -f `which java` ] test, which will always fail on Gentoo +export APP_SKIP_J2SE_TEST=1 +export JAVA_HOME=$(java-config -o) + +cd /opt/sqldeveloper/sqldeveloper/bin && bash sqldeveloper $@ diff --git a/dev-db/sqldeveloper/metadata.xml b/dev-db/sqldeveloper/metadata.xml new file mode 100644 index 000000000000..77d2c7c72cd0 --- /dev/null +++ b/dev-db/sqldeveloper/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>proxy-maintainers</herd> +<maintainer> + <email>jan.bednar@gmail.com</email> + <name>Ján Bednár</name> + <description>Maintainer</description> +</maintainer> +</pkgmetadata> diff --git a/dev-db/sqldeveloper/sqldeveloper-3.2.20.09.87.ebuild b/dev-db/sqldeveloper/sqldeveloper-3.2.20.09.87.ebuild new file mode 100644 index 000000000000..feb4a92e38da --- /dev/null +++ b/dev-db/sqldeveloper/sqldeveloper-3.2.20.09.87.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils java-pkg-2 + +DESCRIPTION="Oracle SQL Developer is a graphical tool for database development" +HOMEPAGE="http://www.oracle.com/technology/products/database/sql_developer/" +SRC_URI="${P}-no-jre.zip" +RESTRICT="fetch" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="mssql mysql sybase" + +DEPEND="mssql? ( dev-java/jtds:1.2 ) + mysql? ( dev-java/jdbc-mysql:0 ) + sybase? ( dev-java/jtds:1.2 )" +RDEPEND=">=virtual/jdk-1.6.0 + ${DEPEND}" + +S="${WORKDIR}/${PN}" + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE}" + eerror "and download" + eerror " Oracle SQL Developer for other platforms" + eerror " ${SRC_URI}" + eerror "and move it to ${DISTDIR}" +} + +src_prepare() { + # we don't need these, do we? + find ./ \( -iname "*.exe" -or -iname "*.dll" -or -iname "*.bat" \) -exec rm {} \; + + # they both use jtds, enabling one of them also enables the other one + if use mssql && ! use sybase; then + einfo "You requested MSSQL support, this also enables Sybase support." + fi + if use sybase && ! use mssql; then + einfo "You requested Sybase support, this also enables MSSQL support." + fi + + if use mssql || use sybase; then + echo "AddJavaLibFile $(java-pkg_getjars jtds-1.2)" >> sqldeveloper/bin/sqldeveloper.conf + fi + + if use mysql; then + echo "AddJavaLibFile $(java-pkg_getjars jdbc-mysql)" >> sqldeveloper/bin/sqldeveloper.conf + fi + + # this fixes internal Classpath warning + cd "${T}" + unzip -q "${S}"/jdev/extensions/oracle.jdeveloper.runner.jar META-INF/extension.xml + sed -i 's@../../../oracle_common/modules/oracle.nlsrtl_11.1.0@../../jlib@' META-INF/extension.xml || die + zip -rq "${S}"/jdev/extensions/oracle.jdeveloper.runner.jar META-INF/extension.xml + rm -rf META-INF + + # this fixes another internal Classpath warning + cd "${T}" + unzip -q "${S}"/sqldeveloper/extensions/oracle.datamodeler.jar META-INF/extension.xml + sed -i 's@<classpath>${ide.extension.install.home}/lib/ActiveQueryBuilder.jar</classpath>@<classpath>${ide.extension.install.home}/../../lib/ActiveQueryBuilder.jar</classpath>@' META-INF/extension.xml || die + zip -rq "${S}"/sqldeveloper/extensions/oracle.datamodeler.jar META-INF/extension.xml + rm -rf META-INF +} + +src_install() { + dodir /opt/${PN} + cp -r {dataminer,ide,javavm,jdbc,jdev,jdev.label,jlib,jviews,modules,rdbms,readme.html,sleepycat,${PN},sqlj,timingframework} \ + "${D}"/opt/${PN}/ || die "Install failed" + + dobin "${FILESDIR}"/${PN} || die "Install failed" + + mv icon.png ${PN}-32x32.png || die + doicon ${PN}-32x32.png || die + make_desktop_entry ${PN} "Oracle SQL Developer" ${PN}-32x32 || die +} + +pkg_postinst() { + # this temporary fixes FileNotFoundException with datamodeler + # this is more like a workaround than permanent fix + test -d /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log \ + || mkdir /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log + touch /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log + chmod -R 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log + + # this fixes another datamodeler FileNotFoundException + # also more like a workaround than permanent fix + chmod 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/types/dr_custom_scripts.xml + + echo + einfo "If you want to use the TNS connection type you need to set up the" + einfo "TNS_ADMIN environment variable to point to the directory your" + einfo "tnsnames.ora resides in." + echo +} diff --git a/dev-db/sqldeveloper/sqldeveloper-4.0.2.15.21.ebuild b/dev-db/sqldeveloper/sqldeveloper-4.0.2.15.21.ebuild new file mode 100644 index 000000000000..2965883da6a9 --- /dev/null +++ b/dev-db/sqldeveloper/sqldeveloper-4.0.2.15.21.ebuild @@ -0,0 +1,89 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils java-pkg-2 + +DESCRIPTION="Oracle SQL Developer is a graphical tool for database development" +HOMEPAGE="http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html" +SRC_URI="${P}-no-jre.zip" +RESTRICT="fetch" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="mssql mysql sybase" + +DEPEND="mssql? ( dev-java/jtds:1.2 ) + mysql? ( dev-java/jdbc-mysql:0 ) + sybase? ( dev-java/jtds:1.2 )" +RDEPEND=">=virtual/jdk-1.7.0 + dev-java/java-config:2 + ${DEPEND}" + +S="${WORKDIR}/${PN}" + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE}" + eerror "and download" + eerror " Oracle SQL Developer for other platforms" + eerror " ${SRC_URI}" + eerror "and move it to ${DISTDIR}" +} + +src_prepare() { + # we don't need these, do we? + find ./ \( -iname "*.exe" -or -iname "*.dll" -or -iname "*.bat" \) -exec rm {} + + + # they both use jtds, enabling one of them also enables the other one + if use mssql && ! use sybase; then + einfo "You requested MSSQL support, this also enables Sybase support." + fi + if use sybase && ! use mssql; then + einfo "You requested Sybase support, this also enables MSSQL support." + fi + + if use mssql || use sybase; then + echo "AddJavaLibFile $(java-pkg_getjars jtds-1.2)" >> sqldeveloper/bin/sqldeveloper.conf + fi + + if use mysql; then + echo "AddJavaLibFile $(java-pkg_getjars jdbc-mysql)" >> sqldeveloper/bin/sqldeveloper.conf + fi +} + +src_install() { + dodir /opt/${PN} + # NOTE For future version to get that line (what to copy) go to the unpacked sources dir + # using `bash` and press Meta+_ (i.e. Meta+Shift+-) -- that is a builtin bash feature ;-) + cp -r {configuration,d{ataminer,ropins,vt},e{quinox,xternal},ide,j{avavm,d{bc,ev},lib,views},modules,netbeans,r{dbms,eadme.html},s{leepycat,ql{cli,developer,j},vnkit}} \ + "${D}"/opt/${PN}/ || die "Install failed" + + dobin "${FILESDIR}"/${PN} || die "Install failed" + + mv icon.png ${PN}-32x32.png || die + doicon ${PN}-32x32.png || die + make_desktop_entry ${PN} "Oracle SQL Developer" ${PN}-32x32 || die +} + +pkg_postinst() { + # this temporary fixes FileNotFoundException with datamodeler + # this is more like a workaround than permanent fix + test -d /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log \ + || mkdir /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log + touch /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log + chmod -R 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log + + # this fixes another datamodeler FileNotFoundException + # also more like a workaround than permanent fix + chmod 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/types/dr_custom_scripts.xml + + echo + einfo "If you want to use the TNS connection type you need to set up the" + einfo "TNS_ADMIN environment variable to point to the directory your" + einfo "tnsnames.ora resides in." + echo +} diff --git a/dev-db/sqldeveloper/sqldeveloper-4.1.1.19.59.ebuild b/dev-db/sqldeveloper/sqldeveloper-4.1.1.19.59.ebuild new file mode 100644 index 000000000000..9254ec86529e --- /dev/null +++ b/dev-db/sqldeveloper/sqldeveloper-4.1.1.19.59.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils java-pkg-2 + +DESCRIPTION="Oracle SQL Developer is a graphical tool for database development" +HOMEPAGE="http://www.oracle.com/technetwork/developer-tools/sql-developer/overview/index.html" +SRC_URI="${P}-no-jre.zip" + +RESTRICT="fetch" + +LICENSE="OTN" +SLOT="0" +KEYWORDS="~amd64 ~x86" + +IUSE="mssql mysql sybase" + +DEPEND="mssql? ( dev-java/jtds:1.2 ) + mysql? ( dev-java/jdbc-mysql:0 ) + sybase? ( dev-java/jtds:1.2 )" +RDEPEND=">=virtual/jdk-1.8.0 + dev-java/java-config:2 + ${DEPEND}" + +S="${WORKDIR}/${PN}" + +QA_PREBUILT=" +opt/${PN}/netbeans/platform/modules/lib/amd64/linux/*.so +opt/${PN}/netbeans/platform/modules/lib/i386/linux/*.so +" + +pkg_nofetch() { + eerror "Please go to" + eerror " ${HOMEPAGE}" + eerror "and download" + eerror " Oracle SQL Developer for other platforms" + eerror " ${SRC_URI}" + eerror "and move it to ${DISTDIR}" +} + +src_prepare() { + # we don't need these, do we? + find ./ \( -iname "*.exe" -or -iname "*.dll" -or -iname "*.bat" \) -exec rm {} + + + # they both use jtds, enabling one of them also enables the other one + if use mssql && ! use sybase; then + einfo "You requested MSSQL support, this also enables Sybase support." + fi + if use sybase && ! use mssql; then + einfo "You requested Sybase support, this also enables MSSQL support." + fi + + if use mssql || use sybase; then + echo "AddJavaLibFile $(java-pkg_getjars jtds-1.2)" >> sqldeveloper/bin/sqldeveloper.conf + fi + + if use mysql; then + echo "AddJavaLibFile $(java-pkg_getjars jdbc-mysql)" >> sqldeveloper/bin/sqldeveloper.conf + fi +} + +src_install() { + dodir /opt/${PN} + # NOTE For future version to get that line (what to copy) go to the unpacked sources dir + # using `bash` and press Meta+_ (i.e. Meta+Shift+-) -- that is a builtin bash feature ;-) + cp -r {configuration,d{ataminer,ropins,vt},e{quinox,xternal},ide,j{avavm,d{bc,ev},lib,views},modules,netbeans,ords,rdbms,s{leepycat,ql{developer,j},vnkit}} \ + "${D}"/opt/${PN}/ || die "Install failed" + + dobin "${FILESDIR}"/${PN} || die "Install failed" + + mv icon.png ${PN}-32x32.png || die + doicon ${PN}-32x32.png || die + make_desktop_entry ${PN} "Oracle SQL Developer" ${PN}-32x32 || die +} + +pkg_postinst() { + # this temporary fixes FileNotFoundException with datamodeler + # this is more like a workaround than permanent fix + test -d /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log \ + || mkdir /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log + touch /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log + chmod -R 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/log/datamodeler.log + + # this fixes another datamodeler FileNotFoundException + # also more like a workaround than permanent fix + chmod 1777 /opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/types/dr_custom_scripts.xml + + echo + einfo "If you want to use the TNS connection type you need to set up the" + einfo "TNS_ADMIN environment variable to point to the directory your" + einfo "tnsnames.ora resides in." + echo + einfo "In order to use SQL Developer you need to enshure you are using proper version Java VM (1.8)" + einfo "Use eselect java-vm list to get this info," + einfo "eselect java-vm set user N to assign user-level value" + einfo "eselect java-vm set system N as root to set system-wide default" + echo +} diff --git a/dev-db/sqlite/Manifest b/dev-db/sqlite/Manifest new file mode 100644 index 000000000000..c600d6dc6332 --- /dev/null +++ b/dev-db/sqlite/Manifest @@ -0,0 +1,7 @@ +DIST sqlite-2.8.16.tar.gz 981834 SHA256 d26e8a6fac1ad497a3ade719da4f1d6d60f586fd10f66253f1c3d3db7168984e SHA512 262cacbb9a6e615cd6ce7c2992c4dd5b0cd59de096daa74925e81baef4c0e4b3d9a7e4ebf8f4ba949afac4fe2fbf2c627ead29fa72ff38dffe6446ae46c40d4a WHIRLPOOL 78c4dc05f94d97483c03b1f1eee67f86fd5d9499e82b082ba3951878867d10d18ecbb5cac9086ce509c0cb1cb47b57661709a28d2ee7e61038512d1c11c77bff +DIST sqlite-autoconf-3081001.tar.gz 2049377 SHA256 5f8f2ae6461e637ff63e50fef10b6962764dfc3b81a8c0f80a19794b9d59f7ca SHA512 8e206952b351ef8a9cf523558574cba9630c8c07ef7ae90fb0712d2b99fea91742a26d0af1b01816593ea769fad343101fdbbab9c1626a4d712bb1a18b2b6b30 WHIRLPOOL 83fd822bd9eb6fedea29d968381726be24153375c06ad8c39d4ef34fd3d2e1001c8d5440880d6a880ba24242cd87782afa445ce145cdf7e75843419275136da5 +DIST sqlite-autoconf-3081002.tar.gz 2049387 SHA256 8382e55a4e7d853c93038562ca3dd00307937fccf1c6b65ddd813e503a56d626 SHA512 afdf11d5482a645c37cc0c4c5c2b3f8c56f26c95ee94658c92bfa0ffeb68981f67834215a45a658f733333c68f28231448e87995f9614a56f9f1672cedd13a65 WHIRLPOOL f3c7b1a11d63213a29f9dc6c04c02db9900b25dd0a8c0551bbf6d220493e7cc420d5775d99147d92c781b7f0068889e6dbeb32a10f447009341827908eee4ad8 +DIST sqlite-doc-3081001.zip 5060040 SHA256 0b6c186a2da8b7d7397eb3942e97fd85b88734beb300702ace0dca4a3db729a6 SHA512 76caf476c98d8a0f5da55c4608bfc31235289e3ab2286089195fab86da6b5d98b2d5eb0fe7b81e3aff8f04939c9bcbfded6be22f0eeb21103478bf519e9ff78b WHIRLPOOL 5edd1d06babf19d54e326f6262d45851d43a0907adad66b130c93cf63efbfadcad6dbc98330bd4d2f80d1d528cd9088ada0727475b42005de6bcdbc4914e5d7c +DIST sqlite-doc-3081002.zip 5068441 SHA256 e355ec10989829d485d2df08f076f6c3f598f7fc1d45d307b4fd70d5e609e6c4 SHA512 c222b250de6c8e182da1b534f459600a81b300c87578f9484b7d6f1fbbfaad9e8be70c306d0200b163850f48c974c55ce25782fefd55672ef72f03dc0b5f8d19 WHIRLPOOL 148bbce9bc3ffb1f9101e45936ce060aa49dbc88647effabf5418fa95ccdb91a4971d171d940de3307a2d59144e73250c43f8d8d79927ac36a1e02784f143061 +DIST sqlite-src-3081001.zip 7648823 SHA256 def6e2401c8da91b489de19d1a1734f722b4e629148ab804776d27b49ba49e7b SHA512 7604ac35eddd4aca53c02b0ab7ae7682856aec2eb4e6a9627da041ea19d464bb6080a70d84070a94abf77eb14ae616a0a8c5fe2f2a6c19fc899d1b21535d3e1a WHIRLPOOL c44e4f446d12af1f4df49e171276d853381784e979d3521cafbfdd5b5359c792586d298f3573bbda8a260b9008a4b7fcdc4ce0382fdda18574287018a2cb4f4c +DIST sqlite-src-3081002.zip 7648737 SHA256 fda379bc4590761838d02ac8008433b7c3eae6e120e45d639d24b09d0004b42d SHA512 99661c709ffe8d5776c3ed2c1a64c70f541b68f0c7745e3e769528273966f71eeb29e8911d42ede9420f179b7fcbda63c4d0980a9d7bc05e937d0a6deb7b814f WHIRLPOOL 4e13138a5f92f5c5fe65c8b670097b57ea778244a37a5bcabf75f86f4ac3f0bc17860f3e55833adc9adcc335b6aece396c685421b58ccb0ddca66f37edfda7fc diff --git a/dev-db/sqlite/files/maketcllib.sh b/dev-db/sqlite/files/maketcllib.sh new file mode 100644 index 000000000000..ad87ce1fcafb --- /dev/null +++ b/dev-db/sqlite/files/maketcllib.sh @@ -0,0 +1,40 @@ +#!/bin/bash +# +# This script was adapted from the one used by Hwaci to build it's +# documentation and binaries for shipping to their website. +# +# Any similarity to the original has probably been trampled into +# oblivion modifying everything for Gentoo. +# +echo "Starting TCL Build" + +# Set srcdir to the name of the directory that contains the publish.sh +# script. +# +srcdir=`echo "$0" | sed 's%\(^.*\)/[^/][^/]*$%\1%'` + +# +# Build the tclsqlite.so shared library for import into tclsh or wish +# under Linux +# +make target_source +source /etc/make.conf +cd tsrc +rm shell.c + +OPTS='-DUSE_TCL_STUBS=1 -DNDEBUG=1' +TCLSTUBLIB=${TCL_BUILD_STUB_LIB_PATH} + +export CFLAGS +gcc -fPIC $CFLAGS $OPTS -I. -shared *.c $TCLSTUBLIB -o tclsqlite.so + +strip tclsqlite.so +cp tclsqlite.so .. + +cd .. + +echo "pkg_mkIndex [pwd] tclsqlite.so" >> make_pkgIndex.tcl +tclsh make_pkgIndex.tcl + +echo "Done TCL Build" + diff --git a/dev-db/sqlite/files/sqlite-2.8.15-alignement-fix.patch b/dev-db/sqlite/files/sqlite-2.8.15-alignement-fix.patch new file mode 100644 index 000000000000..7081ffd00323 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-2.8.15-alignement-fix.patch @@ -0,0 +1,12 @@ +diff -uNr sqlite.orig/src/vdbeInt.h sqlite/src/vdbeInt.h +--- sqlite.orig/src/vdbeInt.h 2004-10-16 01:33:02.779442000 +0200 ++++ sqlite/src/vdbeInt.h 2004-10-16 01:35:01.139442000 +0200 +@@ -115,7 +115,7 @@ + int flags; /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */ + double r; /* Real value */ + char *z; /* String value */ +- char zShort[NBFS]; /* Space for short strings */ ++ char zShort[NBFS] __attribute__ ((__aligned__(16))); /* Space for short strings */ + }; + typedef struct Mem Mem; + diff --git a/dev-db/sqlite/files/sqlite-2.8.16-exit.patch b/dev-db/sqlite/files/sqlite-2.8.16-exit.patch new file mode 100644 index 000000000000..aaccb575e0a9 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-2.8.16-exit.patch @@ -0,0 +1,12 @@ +temp.c:4:1: warning: incompatible implicit declaration of built-in function ‘exit’ + +--- Makefile.in ++++ Makefile.in +@@ -269,6 +269,7 @@ + # + config.h: + echo '#include <stdio.h>' >temp.c ++ echo '#include <stdlib.h>' >>temp.c + echo 'int main(){printf(' >>temp.c + echo '"#define SQLITE_PTR_SZ %d",sizeof(char*));' >>temp.c + echo 'exit(0);}' >>temp.c diff --git a/dev-db/sqlite/files/sqlite-2.8.16-multilib.patch b/dev-db/sqlite/files/sqlite-2.8.16-multilib.patch new file mode 100644 index 000000000000..32111877c1b6 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-2.8.16-multilib.patch @@ -0,0 +1,108 @@ +diff -Naurp sqlite-2.8.16.orig/Makefile.in sqlite-2.8.16/Makefile.in +--- sqlite-2.8.16.orig/Makefile.in 2005-02-14 00:22:04.000000000 +0000 ++++ sqlite-2.8.16/Makefile.in 2005-02-17 18:22:50.174537727 +0000 +@@ -187,12 +187,12 @@ last_change: $(SRC) + | awk '{print $$5,$$6}' >last_change + + libsqlite.la: $(LIBOBJ) +- $(LTLINK) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath @exec_prefix@/lib \ ++ $(LTLINK) -o libsqlite.la $(LIBOBJ) ${RELEASE} -rpath @libdir@ \ + -version-info "8:6:8" + + libtclsqlite.la: tclsqlite.lo libsqlite.la + $(LTLINK) -o libtclsqlite.la tclsqlite.lo \ +- libsqlite.la $(LIBTCL) -rpath @exec_prefix@/lib/sqlite \ ++ libsqlite.la $(LIBTCL) -rpath @libdir@/sqlite \ + -version-info "8:6:8" + + sqlite@TARGET_EXEEXT@: $(TOP)/src/shell.c libsqlite.la sqlite.h +@@ -465,14 +465,14 @@ doc: $(DOC) + mv $(DOC) doc + + install: sqlite libsqlite.la sqlite.h +- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib +- $(LTINSTALL) libsqlite.la $(DESTDIR)$(exec_prefix)/lib ++ $(INSTALL) -d $(DESTDIR)@libdir@ ++ $(LTINSTALL) libsqlite.la $(DESTDIR)@libdir@ + $(INSTALL) -d $(DESTDIR)$(exec_prefix)/bin + $(LTINSTALL) sqlite $(DESTDIR)$(exec_prefix)/bin + $(INSTALL) -d $(DESTDIR)$(prefix)/include + $(INSTALL) -m 0644 sqlite.h $(DESTDIR)$(prefix)/include +- $(INSTALL) -d $(DESTDIR)$(exec_prefix)/lib/pkgconfig; +- $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)$(exec_prefix)/lib/pkgconfig; ++ $(INSTALL) -d $(DESTDIR)@libdir@/pkgconfig; ++ $(INSTALL) -m 0644 sqlite.pc $(DESTDIR)@libdir@/pkgconfig; + + clean: + rm -f *.lo *.la *.o sqlite@TARGET_EXEEXT@ libsqlite.la sqlite.h opcodes.* +diff -Naurp sqlite-2.8.16.orig/Makefile.linux-gcc sqlite-2.8.16/Makefile.linux-gcc +--- sqlite-2.8.16.orig/Makefile.linux-gcc 2005-02-14 00:22:04.000000000 +0000 ++++ sqlite-2.8.16/Makefile.linux-gcc 2005-02-17 18:21:47.654969648 +0000 +@@ -14,7 +14,7 @@ + #### The toplevel directory of the source tree. This is the directory + # that contains this "Makefile.in" and the "configure.in" script. + # +-TOP = ../sqlite ++TOP = @@S@@ + + #### C Compiler and options for use in building executables that + # will run on the platform that is doing the build. +@@ -38,8 +38,8 @@ THREADSAFE = -DTHREADSAFE=0 + #### Specify any extra linker options needed to make the library + # thread safe + # +-#THREADLIB = -lpthread +-THREADLIB = ++THREADLIB = -lpthread ++#THREADLIB = + + #### Leave MEMORY_DEBUG undefined for maximum speed. Use MEMORY_DEBUG=1 + # to check for memory leaks. Use MEMORY_DEBUG=2 to print a log of all +@@ -64,7 +64,7 @@ EXE = + # will run on the target platform. This is usually the same + # as BCC, unless you are cross-compiling. + # +-TCC = gcc -O6 ++TCC = @@CC@@ @@CFLAGS@@ + #TCC = gcc -g -O0 -Wall + #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage + #TCC = /opt/mingw/bin/i386-mingw32-gcc -O6 +@@ -72,23 +72,23 @@ TCC = gcc -O6 + + #### Tools used to build a static library. + # +-AR = ar cr ++AR = @@AR@@ cr + #AR = /opt/mingw/bin/i386-mingw32-ar cr +-RANLIB = ranlib ++RANLIB = @@RANLIB@@ + #RANLIB = /opt/mingw/bin/i386-mingw32-ranlib + + #### Extra compiler options needed for programs that use the TCL library. + # +-#TCL_FLAGS = ++#TCL_FLAGS = @@TCL_FLAGS@@ + #TCL_FLAGS = -DSTATIC_BUILD=1 +-TCL_FLAGS = -I/home/drh/tcltk/8.4linux ++#TCL_FLAGS = -I/home/drh/tcltk/8.4linux + #TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1 + #TCL_FLAGS = -I/home/drh/tcltk/8.3hpux + + #### Linker options needed to link against the TCL library. + # +-#LIBTCL = -ltcl -lm -ldl +-LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl ++LIBTCL = -ltcl -lm -ldl ++#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl + #LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt + #LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc + +@@ -100,7 +100,7 @@ READLINE_FLAGS = -DHAVE_READLINE=1 -I/us + #### Linker options needed by programs using readline() must link against. + # + #LIBREADLINE = +-LIBREADLINE = -static -lreadline -ltermcap ++LIBREADLINE = -static -lreadline -lncurses + + #### Should the database engine assume text is coded as UTF-8 or iso8859? + # diff --git a/dev-db/sqlite/files/sqlite-3.8.1-autoconf-dlopen_check.patch b/dev-db/sqlite/files/sqlite-3.8.1-autoconf-dlopen_check.patch new file mode 100644 index 000000000000..bd55a0778bd1 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.8.1-autoconf-dlopen_check.patch @@ -0,0 +1,12 @@ +--- configure.ac ++++ configure.ac +@@ -70,6 +70,9 @@ + [], [enable_dynamic_extensions=yes]) + if test x"$enable_dynamic_extensions" != "xno"; then + AC_SEARCH_LIBS(dlopen, dl) ++ if test "${ac_cv_search_dlopen}" = "no" ; then ++ DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 ++ fi + else + DYNAMIC_EXTENSION_FLAGS=-DSQLITE_OMIT_LOAD_EXTENSION=1 + fi diff --git a/dev-db/sqlite/files/sqlite-3.8.1-src-dlopen_check.patch b/dev-db/sqlite/files/sqlite-3.8.1-src-dlopen_check.patch new file mode 100644 index 000000000000..0c5b48d1db9a --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.8.1-src-dlopen_check.patch @@ -0,0 +1,12 @@ +--- configure.ac ++++ configure.ac +@@ -611,6 +611,9 @@ + if test "${use_loadextension}" = "yes" ; then + OPT_FEATURE_FLAGS="" + AC_SEARCH_LIBS(dlopen, dl) ++ if test "${ac_cv_search_dlopen}" = "no" ; then ++ OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" ++ fi + else + OPT_FEATURE_FLAGS="-DSQLITE_OMIT_LOAD_EXTENSION=1" + fi diff --git a/dev-db/sqlite/files/sqlite-3.8.1-tests-icu-52.patch b/dev-db/sqlite/files/sqlite-3.8.1-tests-icu-52.patch new file mode 100644 index 000000000000..c6cbb33c4918 --- /dev/null +++ b/dev-db/sqlite/files/sqlite-3.8.1-tests-icu-52.patch @@ -0,0 +1,49 @@ +--- test/fts4unicode.test ++++ test/fts4unicode.test +@@ -366,27 +366,26 @@ + do_isspace_test 6.$T.1 $T 32 + do_isspace_test 6.$T.2 $T 160 + do_isspace_test 6.$T.3 $T 5760 +- do_isspace_test 6.$T.4 $T 6158 +- do_isspace_test 6.$T.5 $T 8192 +- do_isspace_test 6.$T.6 $T 8193 +- do_isspace_test 6.$T.7 $T 8194 +- do_isspace_test 6.$T.8 $T 8195 +- do_isspace_test 6.$T.9 $T 8196 +- do_isspace_test 6.$T.10 $T 8197 +- do_isspace_test 6.$T.11 $T 8198 +- do_isspace_test 6.$T.12 $T 8199 +- do_isspace_test 6.$T.13 $T 8200 +- do_isspace_test 6.$T.14 $T 8201 +- do_isspace_test 6.$T.15 $T 8202 +- do_isspace_test 6.$T.16 $T 8239 +- do_isspace_test 6.$T.17 $T 8287 +- do_isspace_test 6.$T.18 $T 12288 ++ do_isspace_test 6.$T.4 $T 8192 ++ do_isspace_test 6.$T.5 $T 8193 ++ do_isspace_test 6.$T.6 $T 8194 ++ do_isspace_test 6.$T.7 $T 8195 ++ do_isspace_test 6.$T.8 $T 8196 ++ do_isspace_test 6.$T.9 $T 8197 ++ do_isspace_test 6.$T.10 $T 8198 ++ do_isspace_test 6.$T.11 $T 8199 ++ do_isspace_test 6.$T.12 $T 8200 ++ do_isspace_test 6.$T.13 $T 8201 ++ do_isspace_test 6.$T.14 $T 8202 ++ do_isspace_test 6.$T.15 $T 8239 ++ do_isspace_test 6.$T.16 $T 8287 ++ do_isspace_test 6.$T.17 $T 12288 + +- do_isspace_test 6.$T.19 $T {32 160 5760 6158} +- do_isspace_test 6.$T.20 $T {8192 8193 8194 8195} +- do_isspace_test 6.$T.21 $T {8196 8197 8198 8199} +- do_isspace_test 6.$T.22 $T {8200 8201 8202 8239} +- do_isspace_test 6.$T.23 $T {8287 12288} ++ do_isspace_test 6.$T.18 $T {32 160 5760} ++ do_isspace_test 6.$T.19 $T {8192 8193 8194 8195} ++ do_isspace_test 6.$T.20 $T {8196 8197 8198 8199} ++ do_isspace_test 6.$T.21 $T {8200 8201 8202 8239} ++ do_isspace_test 6.$T.22 $T {8287 12288} + } + + #------------------------------------------------------------------------- diff --git a/dev-db/sqlite/metadata.xml b/dev-db/sqlite/metadata.xml new file mode 100644 index 000000000000..6a4f9ebb84ed --- /dev/null +++ b/dev-db/sqlite/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>arfrever.fta@gmail.com</email> + <name>Arfrever Frehtes Taifersar Arahesis</name> + </maintainer> + <herd>proxy-maintainers</herd> + <use> + <flag name="secure-delete">Enable overwriting of deleted content with zeros by default (http://sqlite.org/pragma.html#pragma_secure_delete), causing some performance penalty</flag> + <flag name="tools">Install additional tools</flag> + </use> + <upstream> + <remote-id type="cpe">cpe:/a:sqlite:sqlite</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/sqlite/sqlite-2.8.16-r5.ebuild b/dev-db/sqlite/sqlite-2.8.16-r5.ebuild new file mode 100644 index 000000000000..2cb8a32b49a1 --- /dev/null +++ b/dev-db/sqlite/sqlite-2.8.16-r5.ebuild @@ -0,0 +1,127 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils alternatives multilib toolchain-funcs + +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd" + +DESCRIPTION="SQLite: an SQL Database Engine in a C Library" +HOMEPAGE="http://www.sqlite.org/" +SRC_URI="http://www.sqlite.org/${P}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +IUSE="doc nls tcl" + +DEPEND="doc? ( dev-lang/tcl ) + tcl? ( dev-lang/tcl )" + +RDEPEND="tcl? ( dev-lang/tcl )" + +SOURCE="/usr/bin/lemon" +ALTERNATIVES="${SOURCE}-3 ${SOURCE}-0" + +RESTRICT="!tcl? ( test )" + +src_unpack() { + # test + if has test ${FEATURES}; then + if ! has userpriv ${FEATURES}; then + ewarn "The userpriv feature must be enabled to run tests." + eerror "Testsuite will not be run." + fi + if ! use tcl; then + ewarn "You must enable the tcl use flag if you want to run the test" + ewarn "suite." + eerror "Testsuite will not be run." + fi + fi + + unpack ${A} + cd "${S}" + + use hppa && epatch "${FILESDIR}"/${PN}-2.8.15-alignement-fix.patch + + epatch \ + "${FILESDIR}"/${P}-multilib.patch \ + "${FILESDIR}"/${P}-exit.patch + + epunt_cxx + + if use nls ; then + ENCODING=${ENCODING-"UTF8"} + else + ENCODING="ISO8859" + fi + + sed -i -e "s:@@S@@:${S}:g" \ + -e "s:@@CC@@:$(tc-getCC):g" \ + -e "s:@@CFLAGS@@:${CFLAGS}:g" \ + -e "s:@@AR@@:$(tc-getAR):g" \ + -e "s:@@RANLIB@@:$(tc-getRANLIB):g" \ + -e "s:@@ENCODING@@:${ENCODING}:g" \ + "${S}"/Makefile.linux-gcc + + sed -i \ + -e '/^LTLINK/s:$(TCC):& $(LDFLAGS):' \ + -e '/lemon/s:-o:$(LDFLAGS) &:' \ + "${S}"/{main.mk,Makefile.in} +} + +src_compile() { + local myconf="--enable-incore-db --enable-tempdb-in-ram" + + if ! use tcl ; then + myconf="${myconf} --without-tcl" + fi + + econf ${myconf} \ + --disable-static \ + $(use_enable nls utf8) + + emake all || die "emake all failed" + + if use doc ; then + emake doc || die "emake doc failed" + fi + + if use tcl ; then + cp -P "${FILESDIR}"/maketcllib.sh "${S}" + chmod +x ./maketcllib.sh + ./maketcllib.sh + fi +} + +src_test() { + if use tcl ; then + if has userpriv ${FEATURES} ; then + elog "SQLite 2.x is known to have problems on 64 bit architectures." + elog "If you observe segmentation faults please use 3.x instead!" + + cd "${S}" + emake test || die "some test failed" + fi + fi +} + +src_install () { + dodir /usr/{bin,include,$(get_libdir)} + + make DESTDIR="${D}" install || die "make install failed" + + find "${D}" -name '*.la' -exec rm -f {} + + + newbin lemon lemon-${SLOT} + + dodoc README VERSION + doman sqlite.1 + + use doc && dohtml doc/*.html doc/*.txt doc/*.png + + if use tcl ; then + mkdir "${D}"/usr/$(get_libdir)/tclsqlite${PV} + cp "${S}"/tclsqlite.so "${D}"/usr/$(get_libdir)/tclsqlite${PV}/ + cp "${S}"/pkgIndex.tcl "${D}"/usr/$(get_libdir)/tclsqlite${PV}/ + fi +} diff --git a/dev-db/sqlite/sqlite-3.8.10.1.ebuild b/dev-db/sqlite/sqlite-3.8.10.1.ebuild new file mode 100644 index 000000000000..2d690883a5df --- /dev/null +++ b/dev-db/sqlite/sqlite-3.8.10.1.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator + +SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))" +DOC_PV="${SRC_PV}" +# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))" + +DESCRIPTION="A SQL Database Engine in a C Library" +HOMEPAGE="http://sqlite.org/" +SRC_URI="doc? ( http://sqlite.org/2015/${PN}-doc-${DOC_PV}.zip ) + tcl? ( http://sqlite.org/2015/${PN}-src-${SRC_PV}.zip ) + test? ( http://sqlite.org/2015/${PN}-src-${SRC_PV}.zip ) + tools? ( http://sqlite.org/2015/${PN}-src-${SRC_PV}.zip ) + !tcl? ( !test? ( !tools? ( http://sqlite.org/2015/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )" + +LICENSE="public-domain" +SLOT="3" +KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug doc icu +readline secure-delete static-libs tcl test tools" + +RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] ) + readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) + tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20131008-r14 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +DEPEND="${RDEPEND} + doc? ( app-arch/unzip ) + tcl? ( app-arch/unzip ) + test? ( + app-arch/unzip + dev-lang/tcl:0[${MULTILIB_USEDEP}] + ) + tools? ( dev-lang/tcl:0 )" + +amalgamation() { + ! use tcl && ! use test && ! use tools +} + +pkg_setup() { + if amalgamation; then + S="${WORKDIR}/${PN}-autoconf-${SRC_PV}" + else + S="${WORKDIR}/${PN}-src-${SRC_PV}" + fi +} + +src_prepare() { + if amalgamation; then + epatch "${FILESDIR}/${PN}-3.8.1-autoconf-dlopen_check.patch" + + # http://www.sqlite.org/cgi/src/info/85bfa9a67f997084 + sed \ + -e "s/^sqlite3_SOURCES = shell.c sqlite3.h$/sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h/" \ + -e "s/^sqlite3_LDADD = sqlite3.\$(OBJEXT) @READLINE_LIBS@$/sqlite3_LDADD = @READLINE_LIBS@\nsqlite3_CFLAGS = \$(AM_CFLAGS)/" \ + -i Makefile.am + else + epatch "${FILESDIR}/${PN}-3.8.1-src-dlopen_check.patch" + epatch "${FILESDIR}/${PN}-3.8.1-tests-icu-52.patch" + + # Fix shell1-5.0 test. + # http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2015-May/002575.html + sed -e "/if {\$i==0x0D /s/\$i==0x0D /&|| (\$i>=0xE0 \&\& \$i<=0xEF) /" -i test/shell1.test + fi + + eautoreconf + + # At least ppc-aix, x86-interix and *-solaris need newer libtool. + # use prefix && eautoreconf + + if use icu; then + if amalgamation; then + sed -e "s/LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + else + sed -e "s/TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + fi + fi + + multilib_copy_sources +} + +src_configure() { + # `configure` from amalgamation tarball does not add -DSQLITE_DEBUG or -DNDEBUG flag. + if amalgamation; then + if use debug; then + append-cppflags -DSQLITE_DEBUG + else + append-cppflags -DNDEBUG + fi + fi + + # Support detection of misuse of SQLite API. + # http://sqlite.org/compile.html#enable_api_armor + append-cppflags -DSQLITE_ENABLE_API_ARMOR + + # Support column metadata functions. + # http://sqlite.org/c3ref/column_database_name.html + append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA + + # Support dbstat virtual table. + # http://sqlite.org/dbstat.html + append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB + + # Support Full-Text Search versions 3 and 4. + # http://sqlite.org/fts3.html + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 + + # Support R*Trees. + # http://sqlite.org/rtree.html + append-cppflags -DSQLITE_ENABLE_RTREE + + # Support scan status functions. + # http://sqlite.org/c3ref/stmt_scanstatus.html + # http://sqlite.org/c3ref/stmt_scanstatus_reset.html + append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS + + # Support unlock notification. + # http://sqlite.org/unlock_notify.html + append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY + + # Support soundex() function. + # http://sqlite.org/lang_corefunc.html#soundex + append-cppflags -DSQLITE_SOUNDEX + + if use icu; then + # Support ICU extension. + # http://sqlite.org/compile.html#enable_icu + append-cppflags -DSQLITE_ENABLE_ICU + fi + + if use secure-delete; then + # Enable secure_delete pragma by default. + # http://sqlite.org/pragma.html#pragma_secure_delete + append-cppflags -DSQLITE_SECURE_DELETE + fi + + if [[ "${CHOST}" == *-mint* ]]; then + append-cppflags -DSQLITE_OMIT_WAL + fi + + # Use pread(), pread64(), pwrite(), pwrite64() functions for better performance if they are available. + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread_pwrite_test" <<< $'#include <unistd.h>\nint main()\n{\n pread(0, NULL, 0, 0);\n pwrite(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then + append-cppflags -DUSE_PREAD + fi + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then + append-cppflags -DUSE_PREAD64 + elif $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -D_LARGEFILE64_SOURCE -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then + append-cppflags -DUSE_PREAD64 -D_LARGEFILE64_SOURCE + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # `configure` from amalgamation tarball does not support + # --with-readline-inc and --(enable|disable)-tcl options. + econf \ + --enable-$(amalgamation && echo dynamic-extensions || echo load-extension) \ + --enable-threadsafe \ + $(use_enable readline) \ + $(use_enable static-libs static) \ + $(amalgamation || echo --with-readline-inc="-I${EPREFIX}/usr/include/readline") \ + $(amalgamation || use_enable debug) \ + $(amalgamation || if use tcl || use test; then echo --enable-tcl; else echo --disable-tcl; fi) +} + +multilib_src_compile() { + emake TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" + + if use tools && multilib_is_native_abi; then + emake showdb showjournal showstat4 showwal sqldiff + fi +} + +multilib_src_test() { + if [[ "${EUID}" -eq 0 ]]; then + ewarn "Skipping tests due to root permissions" + return + fi + + emake $(use debug && echo fulltest || echo test) +} + +multilib_src_install() { + emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install + + if use tools && multilib_is_native_abi; then + newbin showdb sqlite3-show-db + newbin showjournal sqlite3-show-journal + newbin showstat4 sqlite3-show-stat4 + newbin showwal sqlite3-show-wal + newbin sqldiff sqlite3-diff + fi +} + +multilib_src_install_all() { + prune_libtool_files + + doman sqlite3.1 + + if use doc; then + dohtml -A ico,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/" + fi +} diff --git a/dev-db/sqlite/sqlite-3.8.10.2.ebuild b/dev-db/sqlite/sqlite-3.8.10.2.ebuild new file mode 100644 index 000000000000..30dd78ed9f87 --- /dev/null +++ b/dev-db/sqlite/sqlite-3.8.10.2.ebuild @@ -0,0 +1,210 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit autotools eutils flag-o-matic multilib multilib-minimal toolchain-funcs versionator + +SRC_PV="$(printf "%u%02u%02u%02u" $(get_version_components))" +DOC_PV="${SRC_PV}" +# DOC_PV="$(printf "%u%02u%02u00" $(get_version_components $(get_version_component_range 1-3)))" + +DESCRIPTION="A SQL Database Engine in a C Library" +HOMEPAGE="http://sqlite.org/" +SRC_URI="doc? ( http://sqlite.org/2015/${PN}-doc-${DOC_PV}.zip ) + tcl? ( http://sqlite.org/2015/${PN}-src-${SRC_PV}.zip ) + test? ( http://sqlite.org/2015/${PN}-src-${SRC_PV}.zip ) + tools? ( http://sqlite.org/2015/${PN}-src-${SRC_PV}.zip ) + !tcl? ( !test? ( !tools? ( http://sqlite.org/2015/${PN}-autoconf-${SRC_PV}.tar.gz ) ) )" + +LICENSE="public-domain" +SLOT="3" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="debug doc icu +readline secure-delete static-libs tcl test tools" + +RDEPEND="icu? ( dev-libs/icu:0=[${MULTILIB_USEDEP}] ) + readline? ( sys-libs/readline:0=[${MULTILIB_USEDEP}] ) + tcl? ( dev-lang/tcl:0=[${MULTILIB_USEDEP}] ) + abi_x86_32? ( + !<=app-emulation/emul-linux-x86-baselibs-20131008-r14 + !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] + )" +DEPEND="${RDEPEND} + doc? ( app-arch/unzip ) + tcl? ( app-arch/unzip ) + test? ( + app-arch/unzip + dev-lang/tcl:0[${MULTILIB_USEDEP}] + ) + tools? ( dev-lang/tcl:0 )" + +amalgamation() { + ! use tcl && ! use test && ! use tools +} + +pkg_setup() { + if amalgamation; then + S="${WORKDIR}/${PN}-autoconf-${SRC_PV}" + else + S="${WORKDIR}/${PN}-src-${SRC_PV}" + fi +} + +src_prepare() { + if amalgamation; then + epatch "${FILESDIR}/${PN}-3.8.1-autoconf-dlopen_check.patch" + + # http://www.sqlite.org/cgi/src/info/85bfa9a67f997084 + sed \ + -e "s/^sqlite3_SOURCES = shell.c sqlite3.h$/sqlite3_SOURCES = shell.c sqlite3.c sqlite3.h/" \ + -e "s/^sqlite3_LDADD = sqlite3.\$(OBJEXT) @READLINE_LIBS@$/sqlite3_LDADD = @READLINE_LIBS@\nsqlite3_CFLAGS = \$(AM_CFLAGS)/" \ + -i Makefile.am + else + epatch "${FILESDIR}/${PN}-3.8.1-src-dlopen_check.patch" + epatch "${FILESDIR}/${PN}-3.8.1-tests-icu-52.patch" + + # Fix shell1-5.0 test. + # http://mailinglists.sqlite.org/cgi-bin/mailman/private/sqlite-dev/2015-May/002575.html + sed -e "/if {\$i==0x0D /s/\$i==0x0D /&|| (\$i>=0xE0 \&\& \$i<=0xEF) /" -i test/shell1.test + fi + + eautoreconf + + # At least ppc-aix, x86-interix and *-solaris need newer libtool. + # use prefix && eautoreconf + + if use icu; then + if amalgamation; then + sed -e "s/LIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + else + sed -e "s/TLIBS = @LIBS@/& -licui18n -licuuc/" -i Makefile.in || die "sed failed" + fi + fi + + multilib_copy_sources +} + +src_configure() { + # `configure` from amalgamation tarball does not add -DSQLITE_DEBUG or -DNDEBUG flag. + if amalgamation; then + if use debug; then + append-cppflags -DSQLITE_DEBUG + else + append-cppflags -DNDEBUG + fi + fi + + # Support detection of misuse of SQLite API. + # http://sqlite.org/compile.html#enable_api_armor + append-cppflags -DSQLITE_ENABLE_API_ARMOR + + # Support column metadata functions. + # http://sqlite.org/c3ref/column_database_name.html + append-cppflags -DSQLITE_ENABLE_COLUMN_METADATA + + # Support dbstat virtual table. + # http://sqlite.org/dbstat.html + append-cppflags -DSQLITE_ENABLE_DBSTAT_VTAB + + # Support Full-Text Search versions 3 and 4. + # http://sqlite.org/fts3.html + append-cppflags -DSQLITE_ENABLE_FTS3 -DSQLITE_ENABLE_FTS3_PARENTHESIS -DSQLITE_ENABLE_FTS4 + + # Support R*Trees. + # http://sqlite.org/rtree.html + append-cppflags -DSQLITE_ENABLE_RTREE + + # Support scan status functions. + # http://sqlite.org/c3ref/stmt_scanstatus.html + # http://sqlite.org/c3ref/stmt_scanstatus_reset.html + append-cppflags -DSQLITE_ENABLE_STMT_SCANSTATUS + + # Support unlock notification. + # http://sqlite.org/unlock_notify.html + append-cppflags -DSQLITE_ENABLE_UNLOCK_NOTIFY + + # Support soundex() function. + # http://sqlite.org/lang_corefunc.html#soundex + append-cppflags -DSQLITE_SOUNDEX + + if use icu; then + # Support ICU extension. + # http://sqlite.org/compile.html#enable_icu + append-cppflags -DSQLITE_ENABLE_ICU + fi + + if use secure-delete; then + # Enable secure_delete pragma by default. + # http://sqlite.org/pragma.html#pragma_secure_delete + append-cppflags -DSQLITE_SECURE_DELETE + fi + + if [[ "${CHOST}" == *-mint* ]]; then + append-cppflags -DSQLITE_OMIT_WAL + fi + + # Use pread(), pread64(), pwrite(), pwrite64() functions for better performance if they are available. + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread_pwrite_test" <<< $'#include <unistd.h>\nint main()\n{\n pread(0, NULL, 0, 0);\n pwrite(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then + append-cppflags -DUSE_PREAD + fi + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then + append-cppflags -DUSE_PREAD64 + elif $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} -D_LARGEFILE64_SOURCE -Werror=implicit-function-declaration -x c - -o "${T}/pread64_pwrite64_test" <<< $'#include <unistd.h>\nint main()\n{\n pread64(0, NULL, 0, 0);\n pwrite64(0, NULL, 0, 0);\n return 0;\n}' &> /dev/null; then + append-cppflags -DUSE_PREAD64 -D_LARGEFILE64_SOURCE + fi + + multilib-minimal_src_configure +} + +multilib_src_configure() { + # `configure` from amalgamation tarball does not support + # --with-readline-inc and --(enable|disable)-tcl options. + econf \ + --enable-$(amalgamation && echo dynamic-extensions || echo load-extension) \ + --enable-threadsafe \ + $(use_enable readline) \ + $(use_enable static-libs static) \ + $(amalgamation || echo --with-readline-inc="-I${EPREFIX}/usr/include/readline") \ + $(amalgamation || use_enable debug) \ + $(amalgamation || if use tcl || use test; then echo --enable-tcl; else echo --disable-tcl; fi) +} + +multilib_src_compile() { + emake TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" + + if use tools && multilib_is_native_abi; then + emake showdb showjournal showstat4 showwal sqldiff + fi +} + +multilib_src_test() { + if [[ "${EUID}" -eq 0 ]]; then + ewarn "Skipping tests due to root permissions" + return + fi + + emake $(use debug && echo fulltest || echo test) +} + +multilib_src_install() { + emake DESTDIR="${D}" HAVE_TCL="$(usex tcl 1 "")" TCLLIBDIR="${EPREFIX}/usr/$(get_libdir)/${P}" install + + if use tools && multilib_is_native_abi; then + newbin showdb sqlite3-show-db + newbin showjournal sqlite3-show-journal + newbin showstat4 sqlite3-show-stat4 + newbin showwal sqlite3-show-wal + newbin sqldiff sqlite3-diff + fi +} + +multilib_src_install_all() { + prune_libtool_files + + doman sqlite3.1 + + if use doc; then + dohtml -A ico,odg,pdf,svg -r "${WORKDIR}/${PN}-doc-${DOC_PV}/" + fi +} diff --git a/dev-db/sqlitebrowser/Manifest b/dev-db/sqlitebrowser/Manifest new file mode 100644 index 000000000000..7c2b4ba5b84c --- /dev/null +++ b/dev-db/sqlitebrowser/Manifest @@ -0,0 +1,3 @@ +DIST sqlitebrowser-3.3.1.tar.gz 818842 SHA256 5113d3b4c219585fe017047556363d4934b2b3e3f7c3f0968b87e9eac0156d22 SHA512 3cb44631f39b1c1a90b86502761826830054f440509faaece36052958af361185d41335f763499cec5fc005cc90eb7be403c4ac2a5cec655fe63d989434880bc WHIRLPOOL c4ab107ac97800c14ce788e4742beb528f40c74dc787217fdc9fe5dc1f0d8a67b97cd3fc9e6842b54e321d287fff925f050a20d22fbfe5e7491d4c2140c1f6de +DIST sqlitebrowser-3.5.1.tar.gz 874540 SHA256 d7f3d1e54882ebabab3b2f7764a6bb921d4fe319db84a092147c941ce19feb8d SHA512 815665002932a606c7e1da8738be0d94a0b2bf330042af30d5b4033ce27c548fec1a05b51f2a11a7620d4e123961ba63595b60aec7eac716e5d3747bb90886e2 WHIRLPOOL 1b8984eefe730ef468fc64bff1465de3a5b273e3e1594916f05cbe07bec315126001b42cc05d6a3c153aaaccab39bdafa29d31f83fceba6aa7697df7ff870462 +DIST sqlitebrowser-3.6.0.tar.gz 1453029 SHA256 221a410a3ec8512a766ed8bc4cade1f3b1cde94e41e52743d5a6d2a33acb3a56 SHA512 ae4a0bb9ac8ff01ec965ae264a41fe7749672cd6562f0ce5e5b69007ea403fff5dcc4f90be3ffa4d9b7d1dc293767f2ca7757de55895f56efbe6b7be0e6721df WHIRLPOOL 93e053d8b6cf9e67f0294117995443865e29923c899a0263ce117979f982155e4020a88ba865a4b92d162fc8842f5b95c4b512575d153cb7f9fa9445880e1b5c diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.3.1-unbundle.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.3.1-unbundle.patch new file mode 100644 index 000000000000..263afaf2dea9 --- /dev/null +++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.3.1-unbundle.patch @@ -0,0 +1,46 @@ + CMakeLists.txt | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 68f049e..474e613 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,13 +7,9 @@ if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + endif() + +-set(ANTLR_DIR libs/antlr-2.7.7) + set(QHEXEDIT_DIR libs/qhexedit) +-set(QCUSTOMPLOT_DIR libs/qcustomplot-source) + +-add_subdirectory(${ANTLR_DIR}) + add_subdirectory(${QHEXEDIT_DIR}) +-add_subdirectory(${QCUSTOMPLOT_DIR}) + + if(USE_QT5) + find_package(Qt5Widgets REQUIRED) +@@ -165,9 +161,7 @@ endif(APPLE) + + include_directories( + "${CMAKE_CURRENT_BINARY_DIR}" +- ${ANTLR_DIR} + ${QHEXEDIT_DIR} +- ${QCUSTOMPLOT_DIR} + ${ADDITIONAL_INCLUDE_PATHS} + src) + +@@ -183,12 +177,10 @@ if(USE_QT5) + qt5_use_modules(${PROJECT_NAME} Gui Widgets Network Test PrintSupport) + set(QT_LIBRARIES "") + endif() +-add_dependencies(${PROJECT_NAME} antlr qhexedit qcustomplot) ++add_dependencies(${PROJECT_NAME} qhexedit) + + link_directories( +- "${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}") ++ "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}") + + target_link_libraries(${PROJECT_NAME} + antlr diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.5.1-unbundle.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.5.1-unbundle.patch new file mode 100644 index 000000000000..203ddfbeaa68 --- /dev/null +++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.5.1-unbundle.patch @@ -0,0 +1,70 @@ + CMakeLists.txt | 12 ++---------- + tests/CMakeLists.txt | 5 +---- + 2 files changed, 3 insertions(+), 14 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a76947..a58510b 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -7,13 +7,9 @@ if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + endif() + +-set(ANTLR_DIR libs/antlr-2.7.7) + set(QHEXEDIT_DIR libs/qhexedit) +-set(QCUSTOMPLOT_DIR libs/qcustomplot-source) + +-add_subdirectory(${ANTLR_DIR}) + add_subdirectory(${QHEXEDIT_DIR}) +-add_subdirectory(${QCUSTOMPLOT_DIR}) + + if(USE_QT5) + find_package(Qt5Widgets REQUIRED) +@@ -191,9 +187,7 @@ endif(EXTRAPATH) + + include_directories( + "${CMAKE_CURRENT_BINARY_DIR}" +- ${ANTLR_DIR} + ${QHEXEDIT_DIR} +- ${QCUSTOMPLOT_DIR} + ${ADDITIONAL_INCLUDE_PATHS} + src) + +@@ -210,12 +204,10 @@ if(USE_QT5) + qt5_use_modules(${PROJECT_NAME} Gui Widgets Network Test PrintSupport) + set(QT_LIBRARIES "") + endif() +-add_dependencies(${PROJECT_NAME} antlr qhexedit qcustomplot) ++add_dependencies(${PROJECT_NAME} qhexedit) + + link_directories( +- "${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}") ++ "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}") + + target_link_libraries(${PROJECT_NAME} + antlr +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 75009dc..6fd7f48 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -7,9 +7,6 @@ if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "Release") + endif() + +-set(ANTLR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libs/antlr-2.7.7") +-add_subdirectory("${ANTLR_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/antlr") +- + if(USE_QT5) + find_package(Qt5Widgets REQUIRED) + set(CMAKE_AUTOMOC ON) +@@ -56,7 +53,7 @@ if(NOT USE_QT5) + QT4_WRAP_CPP(SQLB_MOC ${SQLB_MOC_HDR}) + endif() + +-include_directories("${ANTLR_DIR}" ../src) ++include_directories(../src) + + add_executable(${PROJECT_NAME} ${SQLB_MOC} ${SQLB_HDR} ${SQLB_SRC}) + diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.6.0-unbundle-keep-qscintilla.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.6.0-unbundle-keep-qscintilla.patch new file mode 100644 index 000000000000..6d47c2586942 --- /dev/null +++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.6.0-unbundle-keep-qscintilla.patch @@ -0,0 +1,62 @@ +--- sqlitebrowser-3.6.0/CMakeLists.txt ++++ sqlitebrowser-3.6.0/CMakeLists.txt +@@ -21,14 +21,10 @@ + set(CMAKE_PREFIX_PATH "${QT5_PATH};${SQLITE3_PATH}") + endif() + +-set(ANTLR_DIR libs/antlr-2.7.7) + set(QHEXEDIT_DIR libs/qhexedit) +-set(QCUSTOMPLOT_DIR libs/qcustomplot-source) + set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5) + +-add_subdirectory(${ANTLR_DIR}) + add_subdirectory(${QHEXEDIT_DIR}) +-add_subdirectory(${QCUSTOMPLOT_DIR}) + add_subdirectory(${QSCINTILLA_DIR}) + + if(USE_QT5) +@@ -207,9 +201,7 @@ + + include_directories( + "${CMAKE_CURRENT_BINARY_DIR}" +- ${ANTLR_DIR} + ${QHEXEDIT_DIR} +- ${QCUSTOMPLOT_DIR} + ${QSCINTILLA_DIR} + ${ADDITIONAL_INCLUDE_PATHS} + src) +@@ -227,12 +218,9 @@ + qt5_use_modules(${PROJECT_NAME} Gui Widgets Network Test PrintSupport) + set(QT_LIBRARIES "") + endif() +-add_dependencies(${PROJECT_NAME} antlr qhexedit qcustomplot qscintilla2) ++add_dependencies(${PROJECT_NAME} qhexedit qscintilla2) + + link_directories( +- "${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}" + "${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}") + + target_link_libraries(${PROJECT_NAME} +--- sqlitebrowser-3.6.0/tests/CMakeLists.txt ++++ sqlitebrowser-3.6.0/tests/CMakeLists.txt +@@ -7,9 +7,6 @@ + set(CMAKE_BUILD_TYPE "Release") + endif() + +-set(ANTLR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libs/antlr-2.7.7") +-add_subdirectory("${ANTLR_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/antlr") +- + if(USE_QT5) + find_package(Qt5Widgets REQUIRED) + set(CMAKE_AUTOMOC ON) +@@ -65,7 +62,7 @@ + QT4_WRAP_UI(SQLB_FORM_HDR ${SQLB_FORMS}) + endif() + +-include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${ANTLR_DIR}" ../src) ++include_directories("${CMAKE_CURRENT_BINARY_DIR}" ../src) + + add_executable(${PROJECT_NAME} ${SQLB_MOC} ${SQLB_HDR} ${SQLB_SRC} ${SQLB_FORM_HDR}) + diff --git a/dev-db/sqlitebrowser/files/sqlitebrowser-3.6.0-unbundle.patch b/dev-db/sqlitebrowser/files/sqlitebrowser-3.6.0-unbundle.patch new file mode 100644 index 000000000000..d3b31bcbcbe4 --- /dev/null +++ b/dev-db/sqlitebrowser/files/sqlitebrowser-3.6.0-unbundle.patch @@ -0,0 +1,75 @@ +--- sqlitebrowser-3.6.0/CMakeLists.txt ++++ sqlitebrowser-3.6.0/CMakeLists.txt +@@ -21,15 +21,9 @@ + set(CMAKE_PREFIX_PATH "${QT5_PATH};${SQLITE3_PATH}") + endif() + +-set(ANTLR_DIR libs/antlr-2.7.7) + set(QHEXEDIT_DIR libs/qhexedit) +-set(QCUSTOMPLOT_DIR libs/qcustomplot-source) +-set(QSCINTILLA_DIR libs/qscintilla/Qt4Qt5) + +-add_subdirectory(${ANTLR_DIR}) + add_subdirectory(${QHEXEDIT_DIR}) +-add_subdirectory(${QCUSTOMPLOT_DIR}) +-add_subdirectory(${QSCINTILLA_DIR}) + + if(USE_QT5) + find_package(Qt5Widgets REQUIRED) +@@ -31,7 +31,7 @@ + set(CMAKE_AUTOMOC ON) + set(CMAKE_INCLUDE_CURRENT_DIR ON) + else() +- find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork REQUIRED) ++ find_package(Qt4 COMPONENTS QtCore QtGui QtNetwork qscintilla2 REQUIRED) + include("${QT_USE_FILE}") + add_definitions(${QT_DEFINITIONS}) + endif() +@@ -207,10 +201,7 @@ + + include_directories( + "${CMAKE_CURRENT_BINARY_DIR}" +- ${ANTLR_DIR} + ${QHEXEDIT_DIR} +- ${QCUSTOMPLOT_DIR} +- ${QSCINTILLA_DIR} + ${ADDITIONAL_INCLUDE_PATHS} + src) + +@@ -227,13 +218,10 @@ + qt5_use_modules(${PROJECT_NAME} Gui Widgets Network Test PrintSupport) + set(QT_LIBRARIES "") + endif() +-add_dependencies(${PROJECT_NAME} antlr qhexedit qcustomplot qscintilla2) ++add_dependencies(${PROJECT_NAME} qhexedit) + + link_directories( +- "${CMAKE_CURRENT_BINARY_DIR}/${ANTLR_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QCUSTOMPLOT_DIR}" +- "${CMAKE_CURRENT_BINARY_DIR}/${QSCINTILLA_DIR}") ++ "${CMAKE_CURRENT_BINARY_DIR}/${QHEXEDIT_DIR}") + + target_link_libraries(${PROJECT_NAME} + antlr +--- sqlitebrowser-3.6.0/tests/CMakeLists.txt ++++ sqlitebrowser-3.6.0/tests/CMakeLists.txt +@@ -7,9 +7,6 @@ + set(CMAKE_BUILD_TYPE "Release") + endif() + +-set(ANTLR_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../libs/antlr-2.7.7") +-add_subdirectory("${ANTLR_DIR}" "${CMAKE_CURRENT_BINARY_DIR}/antlr") +- + if(USE_QT5) + find_package(Qt5Widgets REQUIRED) + set(CMAKE_AUTOMOC ON) +@@ -65,7 +62,7 @@ + QT4_WRAP_UI(SQLB_FORM_HDR ${SQLB_FORMS}) + endif() + +-include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${ANTLR_DIR}" ../src) ++include_directories("${CMAKE_CURRENT_BINARY_DIR}" ../src) + + add_executable(${PROJECT_NAME} ${SQLB_MOC} ${SQLB_HDR} ${SQLB_SRC} ${SQLB_FORM_HDR}) + diff --git a/dev-db/sqlitebrowser/metadata.xml b/dev-db/sqlitebrowser/metadata.xml new file mode 100644 index 000000000000..d97b43034360 --- /dev/null +++ b/dev-db/sqlitebrowser/metadata.xml @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>xmw@gentoo.org</email> + <name>Michael Weber</name> + </maintainer> + <longdescription lang="en"> +SQLite Database Browser is a freeware, public domain, open source visual tool +used to create, design and edit database files compatible with SQLite. It is +meant to be used for users and developers that want to create databases, edit +and search data using a familiar spreadsheet-like interface, without the need to +learn complicated SQL commands. +</longdescription> + <upstream> + <remote-id type="github">sqlitebrowser/sqlitebrowser</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/sqlitebrowser/sqlitebrowser-3.3.1.ebuild b/dev-db/sqlitebrowser/sqlitebrowser-3.3.1.ebuild new file mode 100644 index 000000000000..bf0890e7c3b5 --- /dev/null +++ b/dev-db/sqlitebrowser/sqlitebrowser-3.3.1.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit eutils cmake-utils + +DESCRIPTION="SQLite Database Browser" +HOMEPAGE="http://sqlitebrowser.org" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3 MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND=" + dev-java/antlr:0[cxx] + dev-libs/qcustomplot[-qt5(-)] + dev-qt/qtcore:4 + dev-qt/qtgui:4" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-unbundle.patch ) + +src_prepare() { + # https://github.com/qingfengxia/qhexedit still bundled + find libs/{antlr-2.7.7,qcustomplot-source} -delete || die + cmake-utils_src_prepare +} + +src_configure() { + # Wait for unmask + local mycmakeargs=( + -DUSE_QT5=OFF + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + doicon images/sqlitebrowser.svg + domenu distri/sqlitebrowser.desktop +} diff --git a/dev-db/sqlitebrowser/sqlitebrowser-3.5.1.ebuild b/dev-db/sqlitebrowser/sqlitebrowser-3.5.1.ebuild new file mode 100644 index 000000000000..e7513c74ffcc --- /dev/null +++ b/dev-db/sqlitebrowser/sqlitebrowser-3.5.1.ebuild @@ -0,0 +1,72 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +CMAKE_MAKEFILE_GENERATOR=ninja + +inherit eutils cmake-utils + +DESCRIPTION="SQLite Database Browser" +HOMEPAGE="http://sqlitebrowser.org" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3 MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="qt4 qt5 test" + +REQUIRED_USE="^^ ( qt4 qt5 )" + +DEPEND=" + dev-db/sqlite:3 + dev-java/antlr:0[cxx] + dev-libs/qcustomplot[qt5=] + qt4? ( + dev-qt/qtcore:4 + dev-qt/qtgui:4 + ) + qt5? ( + dev-qt/linguist:5 + dev-qt/linguist-tools:5 + dev-qt/qtnetwork:5 + dev-qt/qttest:5 + dev-qt/qtwidgets:5 + )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-unbundle.patch ) + +src_prepare() { + # https://github.com/qingfengxia/qhexedit still bundled + find libs/{antlr-2.7.7,qcustomplot-source} -delete || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_use qt5) + ) + cmake-utils_src_configure + if use test; then + BUILD_DIR="${S}"/tests CMAKE_USE_DIR="${S}"/tests cmake-utils_src_configure + fi +} + +src_compile() { + cmake-utils_src_compile + if use test; then + BUILD_DIR="${S}"/tests CMAKE_USE_DIR="${S}"/tests cmake-utils_src_compile + fi +} + +src_test() { + tests/sqlb-unittests || die +} + +src_install() { + cmake-utils_src_install + doicon images/sqlitebrowser.svg + domenu distri/sqlitebrowser.desktop +} diff --git a/dev-db/sqlitebrowser/sqlitebrowser-3.6.0.ebuild b/dev-db/sqlitebrowser/sqlitebrowser-3.6.0.ebuild new file mode 100644 index 000000000000..a1c6a96f456f --- /dev/null +++ b/dev-db/sqlitebrowser/sqlitebrowser-3.6.0.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +CMAKE_MAKEFILE_GENERATOR=ninja + +inherit eutils cmake-utils + +DESCRIPTION="SQLite Database Browser" +HOMEPAGE="http://sqlitebrowser.org" +SRC_URI="https://github.com/${PN}/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="GPL-3 MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="qt4 qt5 test" + +REQUIRED_USE="^^ ( qt4 qt5 )" + +DEPEND=" + dev-db/sqlite:3 + dev-java/antlr:0[cxx] + dev-libs/qcustomplot[qt5=] + x11-libs/qscintilla + qt4? ( + dev-qt/qtcore:4 + dev-qt/qtgui:4 + ) + qt5? ( + dev-qt/linguist:5 + dev-qt/linguist-tools:5 + dev-qt/qtnetwork:5 + dev-qt/qttest:5 + dev-qt/qtwidgets:5 + )" +RDEPEND="${DEPEND}" + +PATCHES=( "${FILESDIR}"/${P}-unbundle-keep-qscintilla.patch ) + +src_prepare() { + # https://github.com/qingfengxia/qhexedit still bundled + # x11-libs/qscintilla[qt4?,qt5?] still bundled + find libs/{antlr-2.7.7,qcustomplot-source} -delete || die + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + $(cmake-utils_use_use qt5) + ) + cmake-utils_src_configure + if use test; then + BUILD_DIR="${S}"/tests CMAKE_USE_DIR="${S}"/tests cmake-utils_src_configure + fi +} + +src_compile() { + cmake-utils_src_compile + if use test; then + BUILD_DIR="${S}"/tests CMAKE_USE_DIR="${S}"/tests cmake-utils_src_compile + fi +} + +src_test() { + tests/sqlb-unittests || die +} + +src_install() { + cmake-utils_src_install + doicon images/sqlitebrowser.svg + domenu distri/sqlitebrowser.desktop +} diff --git a/dev-db/sqliteman/Manifest b/dev-db/sqliteman/Manifest new file mode 100644 index 000000000000..71ae7150f63e --- /dev/null +++ b/dev-db/sqliteman/Manifest @@ -0,0 +1 @@ +DIST sqliteman-1.2.2.tar.gz 1579855 SHA256 2229e627528ec02a9cf7aba3a65bef8999272fc25eb22112dc3f8ee583eb5dfb SHA512 ada8315247723c6cbb9a4c235ce427aed3fcbe6f4edaa3ee2f9c31c1729d71a4bfc874bb7ca561f2a2c9afad092e2f90c7871646eccecb3e71bcd50d1164faf4 WHIRLPOOL 73f6bee7a98e46ef6e76dca086f6cd9379f3f7c8574df70f92d21ac68def0aef548350877eda319d7bedd6b34f5f128db839ef1b2c583a7ad5565a4a78a42d6c diff --git a/dev-db/sqliteman/metadata.xml b/dev-db/sqliteman/metadata.xml new file mode 100644 index 000000000000..1bc81746bcdc --- /dev/null +++ b/dev-db/sqliteman/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>qt</herd> + <upstream> + <remote-id type="sourceforge">sqliteman</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/sqliteman/sqliteman-1.2.2-r1.ebuild b/dev-db/sqliteman/sqliteman-1.2.2-r1.ebuild new file mode 100644 index 000000000000..108154e62942 --- /dev/null +++ b/dev-db/sqliteman/sqliteman-1.2.2-r1.ebuild @@ -0,0 +1,32 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils + +DESCRIPTION="Powerful GUI manager for the Sqlite3 database" +HOMEPAGE="http://sqliteman.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +RDEPEND=" + dev-qt/qtcore:4 + dev-qt/qtgui:4 + dev-qt/qtsql:4[sqlite] + x11-libs/qscintilla" +DEPEND="${RDEPEND}" + +DOCS=( AUTHORS README ) + +src_prepare() { + # remove bundled lib + rm -rf "${S}"/${PN}/qscintilla2 + + cmake-utils_src_prepare +} diff --git a/dev-db/sqliteman/sqliteman-1.2.2.ebuild b/dev-db/sqliteman/sqliteman-1.2.2.ebuild new file mode 100644 index 000000000000..b5908b43c0a7 --- /dev/null +++ b/dev-db/sqliteman/sqliteman-1.2.2.ebuild @@ -0,0 +1,28 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=3 + +inherit eutils cmake-utils + +DESCRIPTION="Powerful GUI manager for the Sqlite3 database" +HOMEPAGE="http://sqliteman.sourceforge.net/" +SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +RDEPEND="dev-qt/qtgui:4 + dev-qt/qtsql:4[sqlite] + x11-libs/qscintilla" +DEPEND="${RDEPEND}" + +DOCS="AUTHORS README" + +src_prepare() { + # remove bundled lib + rm -rf "${S}"/${PN}/qscintilla2 +} diff --git a/dev-db/sqliteodbc/Manifest b/dev-db/sqliteodbc/Manifest new file mode 100644 index 000000000000..a40df23ed620 --- /dev/null +++ b/dev-db/sqliteodbc/Manifest @@ -0,0 +1,2 @@ +DIST sqliteodbc-0.96.tar.gz 670070 SHA256 a5b5a1679e9cbd8cd473079d047c5277b8a57d5875fe35f1e1e576816590bf7f SHA512 447798bbc018890a784abc6b75909fbf9ecd285d6ead3ed437727041ba3ff20ef3ceb1dfe4efb713717b7df2431fd52933e6bcafc2405674cf76518dd5b39435 WHIRLPOOL ded290078b20a32e9d859c0b28297947b9c0df62d66fa64c41d789dea2e2166aed43446a864a3a7ece6cfe7cdc6594dc26558dfda6a45c21bdd869f8fcad81b1 +DIST sqliteodbc-0.99.tar.gz 696992 SHA256 3ae5f5ee80d5e2f051e1436b82fec21ef17ab2ecd5d9f1fa647669f0412573a8 SHA512 adf213acee4ee69c299f39582887fd2adba3856ce6d298d250e3a96744d041c720cefb7fd8acd504c41461751b46b8a729c4fbfa7e56832fb6e4c5a1c537955d WHIRLPOOL 7153a8c2655a7f0f55c604cf86153a286f8c4716c232b77ff5e5f1f601f457a3101d52464e41a61347c1465b2d08297fc29949effd0d0b4fe8212e3b6b73589e diff --git a/dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch b/dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch new file mode 100644 index 000000000000..129ce3e65ff3 --- /dev/null +++ b/dev-db/sqliteodbc/files/sqliteodbc-0.93-respect_LDFLAGS.patch @@ -0,0 +1,30 @@ +--- Makefile.in.old 2012-03-24 12:57:34.533234122 +0100 ++++ Makefile.in 2012-03-24 12:58:06.908198492 +0100 +@@ -37,23 +37,23 @@ + all: @LIB_TARGETS@ + + libsqliteodbc.la: sqliteodbc.lo +- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libsqliteodbc.la \ ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libsqliteodbc.la \ + sqliteodbc.lo -rpath $(drvdir) $(SQLITE_LIB) \ + $(ODBC_LIB) -release $(VER_INFO) + + libsqlite3odbc.la: sqlite3odbc.lo $(SQLITE3_A10N_O) +- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) -o libsqlite3odbc.la \ ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o libsqlite3odbc.la \ + sqlite3odbc.lo $(SQLITE3_A10N_O) -rpath $(drvdir) \ + $(SQLITE3_LIB) $(ODBC_LIB) -release $(VER_INFO) \ + @DL_INITFINI@ + + libsqlite3_mod_blobtoxy.la: blobtoxy.lo +- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) \ + -o libsqlite3_mod_blobtoxy.la \ + blobtoxy.lo -rpath $(drvdir) -release $(VER_INFO) + + libsqlite3_mod_impexp.la: impexp.lo +- $(LIBTOOL) --mode=link $(CC) $(CFLAGS) \ ++ $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) \ + -o libsqlite3_mod_impexp.la \ + impexp.lo -rpath $(drvdir) -release $(VER_INFO) + diff --git a/dev-db/sqliteodbc/metadata.xml b/dev-db/sqliteodbc/metadata.xml new file mode 100644 index 000000000000..59e2b8f78cb5 --- /dev/null +++ b/dev-db/sqliteodbc/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> + <email>maintainer-needed@gentoo.org</email> + <name>Default assignee for orphaned packages</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/sqliteodbc/sqliteodbc-0.96.ebuild b/dev-db/sqliteodbc/sqliteodbc-0.96.ebuild new file mode 100644 index 000000000000..8efe63b9e07a --- /dev/null +++ b/dev-db/sqliteodbc/sqliteodbc-0.96.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="ODBC driver to access local SQLite database files" +HOMEPAGE="http://www.ch-werner.de/sqliteodbc/" +SRC_URI="http://www.ch-werner.de/sqliteodbc/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="amd64 ~arm ppc x86" +IUSE="" + +DEPEND=">=dev-db/sqlite-3.6 + || ( + >=dev-db/unixODBC-2.2 + >=dev-db/libiodbc-3.5 + )" +RDEPEND="${DEPEND}" + +pkg_setup() { + tc-export CC +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.93-respect_LDFLAGS.patch" +} + +src_configure() { + econf --disable-static +} + +src_install() { + dodir "/usr/$(get_libdir)" + einstall + find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" + dodoc ChangeLog README +} diff --git a/dev-db/sqliteodbc/sqliteodbc-0.99.ebuild b/dev-db/sqliteodbc/sqliteodbc-0.99.ebuild new file mode 100644 index 000000000000..2faa573da77f --- /dev/null +++ b/dev-db/sqliteodbc/sqliteodbc-0.99.ebuild @@ -0,0 +1,42 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="ODBC driver to access local SQLite database files" +HOMEPAGE="http://www.ch-werner.de/sqliteodbc/" +SRC_URI="http://www.ch-werner.de/sqliteodbc/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ppc ~x86" +IUSE="" + +DEPEND=">=dev-db/sqlite-3.6 + || ( + >=dev-db/unixODBC-2.2 + >=dev-db/libiodbc-3.5 + )" +RDEPEND="${DEPEND}" + +pkg_setup() { + tc-export CC +} + +src_prepare() { + epatch "${FILESDIR}/${PN}-0.93-respect_LDFLAGS.patch" +} + +src_configure() { + econf --disable-static +} + +src_install() { + dodir "/usr/$(get_libdir)" + emake DESTDIR="${D}" install + find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" + dodoc ChangeLog README +} diff --git a/dev-db/textsearch_ja/Manifest b/dev-db/textsearch_ja/Manifest new file mode 100644 index 000000000000..11d76e9fdd1c --- /dev/null +++ b/dev-db/textsearch_ja/Manifest @@ -0,0 +1 @@ +DIST textsearch_ja-9.0.0.tar.gz 47126 SHA256 f9cd1c48836bb4707b8ca8e88c835f461d43c4ce48c3cee430f072cf258a7a04 SHA512 1a516431709f2e9ec14a32c7edf7a6cafd2bd231853ead42d7a6381a964a66df37414f9e99959a3cc1f3b6dd50cce1f8142b300f255ae8eb498f6e3544e0dcd4 WHIRLPOOL 5c2c7675d25e23c63de589a4d376d27f621582b0f2e0e5f2f47c3e7854c81ecba6dfcc43bd4296dfcca8420092f0831d4e368b6e44676d8fe6a0531d3e5efc76 diff --git a/dev-db/textsearch_ja/metadata.xml b/dev-db/textsearch_ja/metadata.xml new file mode 100644 index 000000000000..2d5852c16c60 --- /dev/null +++ b/dev-db/textsearch_ja/metadata.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>cjk</herd> +</pkgmetadata> diff --git a/dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild b/dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild new file mode 100644 index 000000000000..bb00ad10ca7c --- /dev/null +++ b/dev-db/textsearch_ja/textsearch_ja-9.0.0.ebuild @@ -0,0 +1,26 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +DESCRIPTION="Integrated Full-Text-Search for Japanese language using morphological analyze" +HOMEPAGE="http://textsearch-ja.projects.postgresql.org/index.html" +SRC_URI="http://pgfoundry.org/frs/download.php/2943/textsearch_ja-${PV}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +DEPEND="app-text/mecab + >=dev-db/postgresql-7.4[server]" # pgmecab requires PGXS +RDEPEND="${DEPEND}" + +src_compile() { + emake USE_PGXS=1 +} + +src_install() { + emake DESTDIR="${D}" USE_PGXS=1 install +} diff --git a/dev-db/tinycdb/Manifest b/dev-db/tinycdb/Manifest new file mode 100644 index 000000000000..5df65975a249 --- /dev/null +++ b/dev-db/tinycdb/Manifest @@ -0,0 +1 @@ +DIST tinycdb_0.77.tar.gz 37728 SHA256 82bc3ccf0afed0978472a070ce4506667b8035e65d0dc24388e33858d39b6bc6 SHA512 cfc830578a9be49781a1dbade97b64ec13293853093719aeb9a403c128245f157fd1d2d7e6941966bdea00b472127f10f11672583ba06ccc6e49151b22bf4c9a WHIRLPOOL d9e0b94932a0455660f5fe8bac1fbbe79dc5774c3742a135c2543d5ce698cea077191ea135465930c017ed20601f65d85b86f614b5814cb4d741198ada55660f diff --git a/dev-db/tinycdb/files/tinycdb-0.77-gentoo.diff b/dev-db/tinycdb/files/tinycdb-0.77-gentoo.diff new file mode 100644 index 000000000000..87ab43ff5c82 --- /dev/null +++ b/dev-db/tinycdb/files/tinycdb-0.77-gentoo.diff @@ -0,0 +1,28 @@ +--- tinycdb-0.77.orig/Makefile ++++ tinycdb-0.77/Makefile +@@ -34,7 +34,7 @@ + CDB_USELIB = $(LIB) + NSS_USELIB = $(PICLIB) + LIBMAP = $(LIBBASE).map +-INSTALLPROG = cdb ++INSTALLPROG = cdb-shared + + # The following assumes GNU CC/LD - + # used for building shared libraries only +@@ -59,7 +59,7 @@ + ChangeLog NEWS + DEBIANFILES = debian/control debian/rules debian/copyright debian/changelog + +-all: static ++all: shared + static: staticlib cdb + staticlib: $(LIB) + nss: $(NSS_CDB) +@@ -128,6 +128,7 @@ + + do_install = \ + while [ "$$1" ] ; do \ ++ if [ ! -f $$1 ]; then shift 4; continue; fi; \ + if [ .$$4 = .- ]; then f=$$1; else f=$$4; fi; \ + d=$(DESTDIR)$$3 ; echo installing $$1 to $$d/$$f; \ + [ -d $$d ] || mkdir -p $$d || exit 1 ; \ diff --git a/dev-db/tinycdb/files/tinycdb-0.77-uclibc.diff b/dev-db/tinycdb/files/tinycdb-0.77-uclibc.diff new file mode 100644 index 000000000000..52240931e091 --- /dev/null +++ b/dev-db/tinycdb/files/tinycdb-0.77-uclibc.diff @@ -0,0 +1,15 @@ +--- tinycdb-0.77.orig/cdb.c ++++ tinycdb-0.77/cdb.c +@@ -31,6 +31,12 @@ + # define HAVE_PROGRAM_INVOCATION_SHORT_NAME + #endif + ++#ifdef __UCLIBC__ ++# ifndef __UCLIBC_HAS_PROGRAM_INVOCATION_NAME__ ++# undef HAVE_PROGRAM_INVOCATION_SHORT_NAME ++# endif ++#endif ++ + #ifdef HAVE_PROGRAM_INVOCATION_SHORT_NAME + # define progname program_invocation_short_name + #else diff --git a/dev-db/tinycdb/files/tinycdb-0.77-umask.diff b/dev-db/tinycdb/files/tinycdb-0.77-umask.diff new file mode 100644 index 000000000000..2a53babb2510 --- /dev/null +++ b/dev-db/tinycdb/files/tinycdb-0.77-umask.diff @@ -0,0 +1,11 @@ +--- a/cdb.c ++++ b/cdb.c +@@ -21,6 +21,8 @@ + #include <stdarg.h> + #include <fcntl.h> + #include <errno.h> ++#include <sys/types.h> /* umask() */ ++#include <sys/stat.h> /* umask() */ + #include "cdb.h" + + #ifndef EPROTO diff --git a/dev-db/tinycdb/metadata.xml b/dev-db/tinycdb/metadata.xml new file mode 100644 index 000000000000..d4a08224d284 --- /dev/null +++ b/dev-db/tinycdb/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>hattya@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/tinycdb/tinycdb-0.77-r2.ebuild b/dev-db/tinycdb/tinycdb-0.77-r2.ebuild new file mode 100644 index 000000000000..a1074918b4f2 --- /dev/null +++ b/dev-db/tinycdb/tinycdb-0.77-r2.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils multilib toolchain-funcs + +DESCRIPTION="TinyCDB is a very fast and simple package for creating and reading constant data bases" +HOMEPAGE="http://www.corpit.ru/mjt/tinycdb.html" +SRC_URI="http://www.corpit.ru/mjt/${PN}/${P/-/_}.tar.gz" + +LICENSE="public-domain" +SLOT="0" +KEYWORDS="amd64 hppa ia64 ppc x86" +IUSE="static-libs" +RESTRICT="test" + +RDEPEND="!dev-db/cdb" + +src_prepare() { + epatch "${FILESDIR}"/${P}-gentoo.diff + epatch "${FILESDIR}"/${P}-umask.diff + epatch "${FILESDIR}"/${P}-uclibc.diff + # fix multilib support + sed -i "/^libdir/s:/lib:/$(get_libdir):" Makefile +} + +src_compile() { + local targets="shared" + use static-libs && targets+=" staticlib piclib" + + emake \ + CC="$(tc-getCC)" \ + CFLAGS="${CFLAGS} ${LDFLAGS}" \ + ${targets} +} + +src_install() { + local targets="install install-sharedlib" + use static-libs && targets+=" install-piclib" + + emake \ + prefix="/usr" \ + mandir="/usr/share/man" \ + DESTDIR="${D}" \ + ${targets} + dodoc ChangeLog NEWS +} diff --git a/dev-db/tokumx/Manifest b/dev-db/tokumx/Manifest new file mode 100644 index 000000000000..8f081575d459 --- /dev/null +++ b/dev-db/tokumx/Manifest @@ -0,0 +1,2 @@ +DIST tokumx-git-tag-1.5.0.tar.bz2 13059584 SHA256 381747c47073c8a6f8717a27756bb793ec6d80f4f7d119385f8d7b805a3d827d SHA512 ba19237db7d3dcbd3ac07b8cc4860549830fa065fa4d26cbae685274524cd5b89f671d5f126ec25bee605c99929ce0436bb2ac32d67efdbb8dd6d7526d3f1c24 WHIRLPOOL e5e33e28ce55b1abcff603a40453ab0a9d68f61cd15c68950dd6f87371565bd05057e8e48475f772524684fdb744093867423b249614d4c02908a467f9380c75 +DIST tokumx-git-tag-2.0.1.tar.bz2 13444046 SHA256 f60be4bdabf1249b138b2da02cfc278f6296a8082ada1665be6c8b49c61c0e57 SHA512 91b342c8b0896f5f5e32348118f6a2bc30a4c0e6cd6808e4f510a5982c9d0008e80484a754111553b3249b41a6a5adcbff056ffe62745bc8e958ceab64a6553f WHIRLPOOL 9cc58cfee6ce64fa9d8ed0551ea48f1bc36ca564d5b05c3dfdf29fdc13abcfc6a7ac8be08fa219f7cd188fcc29e884744591ddc006381c6e413cd0bcd892491c diff --git a/dev-db/tokumx/files/1.5.0-Werror.diff b/dev-db/tokumx/files/1.5.0-Werror.diff new file mode 100644 index 000000000000..a865fe074f37 --- /dev/null +++ b/dev-db/tokumx/files/1.5.0-Werror.diff @@ -0,0 +1,45 @@ +diff -uNr work.ORIG/mongo/CMakeLists.txt work/mongo/CMakeLists.txt +--- work.ORIG/mongo/CMakeLists.txt 2014-08-01 11:51:20.832614062 +0100 ++++ work/mongo/CMakeLists.txt 2014-08-01 11:51:36.898614862 +0100 +@@ -71,14 +71,13 @@ + endforeach(flag) + endmacro(set_cxxflags_if_supported) + +-set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe") ++set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe") + set(CMAKE_CXX_FLAGS "-fPIC -fno-strict-aliasing -ggdb") + set_cxxflags_if_supported( + -Wall + -Wsign-compare + -Wno-unknown-pragmas + -Winvalid-pch +- -Werror + -pipe + -Wnon-virtual-dtor + -Woverloaded-virtual +diff -uNr work.ORIG/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake work/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake +--- work.ORIG/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake 2014-08-01 11:51:20.696614056 +0100 ++++ work/mongo/src/third_party/ft-index/cmake_modules/TokuSetupCompiler.cmake 2014-08-01 11:51:36.898614862 +0100 +@@ -174,8 +174,8 @@ + endif () + + ## always want these +-set(CMAKE_C_FLAGS "-Wall -Werror ${CMAKE_C_FLAGS}") +-set(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}") ++set(CMAKE_C_FLAGS "-Wall ${CMAKE_C_FLAGS}") ++set(CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}") + + ## need to set -stdlib=libc++ to get real c++11 support on darwin + if (APPLE) +diff -uNr work.ORIG/mongo/src/third_party/ft-index/examples/Makefile work/mongo/src/third_party/ft-index/examples/Makefile +--- work.ORIG/mongo/src/third_party/ft-index/examples/Makefile 2014-08-01 11:51:20.676614055 +0100 ++++ work/mongo/src/third_party/ft-index/examples/Makefile 2014-08-01 11:51:36.898614862 +0100 +@@ -1,7 +1,7 @@ + SRCS = $(wildcard *.c) + TARGETS = $(patsubst %.c,%,$(SRCS)) $(patsubst %.c,%-bdb,$(SRCS)) + CPPFLAGS = -I../include -D_GNU_SOURCE +-CFLAGS = -g -std=c99 -Wall -Wextra -Werror -Wno-missing-field-initializers ++CFLAGS = -g -std=c99 -Wall -Wextra -Wno-missing-field-initializers + ifeq ($(USE_STATIC_LIBS),1) + LIBTOKUDB = tokufractaltree_static + LIBTOKUPORTABILITY = tokuportability_static diff --git a/dev-db/tokumx/files/tokumx-2.0.1-no-werror.patch b/dev-db/tokumx/files/tokumx-2.0.1-no-werror.patch new file mode 100644 index 000000000000..a67cde50b7f4 --- /dev/null +++ b/dev-db/tokumx/files/tokumx-2.0.1-no-werror.patch @@ -0,0 +1,53 @@ +diff -uNr mongo-tokumx-2.0.1.ORIG/CMakeLists.txt mongo-tokumx-2.0.1/CMakeLists.txt +--- mongo-tokumx-2.0.1.ORIG/CMakeLists.txt 2015-04-14 11:28:47.723631388 +0100 ++++ mongo-tokumx-2.0.1/CMakeLists.txt 2015-04-14 11:29:04.734632235 +0100 +@@ -82,14 +82,13 @@ + endforeach(flag) + endmacro(set_cxxflags_if_supported) + +-set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe") ++set(CMAKE_C_FLAGS "-fPIC -fno-strict-aliasing -ggdb -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -pipe") + set(CMAKE_CXX_FLAGS "-fPIC -fno-strict-aliasing -ggdb") + set_cxxflags_if_supported( + -Wall + -Wsign-compare + -Wno-unknown-pragmas + -Winvalid-pch +- -Werror + -pipe + -Wnon-virtual-dtor + -Woverloaded-virtual +diff -uNr mongo-tokumx-2.0.1.ORIG/SConstruct mongo-tokumx-2.0.1/SConstruct +--- mongo-tokumx-2.0.1.ORIG/SConstruct 2015-04-14 11:28:47.724631388 +0100 ++++ mongo-tokumx-2.0.1/SConstruct 2015-04-14 11:29:20.550633023 +0100 +@@ -710,7 +710,7 @@ + "-Winvalid-pch"] ) + # env.Append( " -Wconversion" ) TODO: this doesn't really work yet + if linux: +- env.Append( CCFLAGS=["-Werror", "-pipe"] ) ++ env.Append( CCFLAGS=["-pipe"] ) + if not has_option('clang'): + env.Append( CCFLAGS=["-fno-builtin-memcmp"] ) # glibc's memcmp is faster than gcc's + +diff -uNr mongo-tokumx-2.0.1.ORIG/src/third_party/v8/CMakeLists.txt mongo-tokumx-2.0.1/src/third_party/v8/CMakeLists.txt +--- mongo-tokumx-2.0.1.ORIG/src/third_party/v8/CMakeLists.txt 2015-04-14 11:28:47.853631395 +0100 ++++ mongo-tokumx-2.0.1/src/third_party/v8/CMakeLists.txt 2015-04-14 11:30:00.934635034 +0100 +@@ -126,7 +126,6 @@ + + set(V8_CXX_FLAGS + -Wall +- -Werror + -W + -Wno-unused-parameter + -Woverloaded-virtual +diff -uNr mongo-tokumx-2.0.1.ORIG/src/third_party/v8/SConscript mongo-tokumx-2.0.1/src/third_party/v8/SConscript +--- mongo-tokumx-2.0.1.ORIG/src/third_party/v8/SConscript 2015-04-14 11:28:47.836631394 +0100 ++++ mongo-tokumx-2.0.1/src/third_party/v8/SConscript 2015-04-14 11:29:49.341634457 +0100 +@@ -47,7 +47,6 @@ + 'gcc': { + 'all': { + 'CCFLAGS': ['-Wall', +- '-Werror', + '-W', + '-Wno-unused-parameter', + '-Woverloaded-virtual', diff --git a/dev-db/tokumx/files/tokumx-disable-bundled-libs.patch b/dev-db/tokumx/files/tokumx-disable-bundled-libs.patch new file mode 100644 index 000000000000..66d8db3980fa --- /dev/null +++ b/dev-db/tokumx/files/tokumx-disable-bundled-libs.patch @@ -0,0 +1,11 @@ +diff -auwrN a/src/third_party/ft-index/CMakeLists.txt b/src/third_party/ft-index/CMakeLists.txt +--- a/src/third_party/ft-index/CMakeLists.txt 2014-08-01 04:37:33.000000000 -0400 ++++ b/src/third_party/ft-index/CMakeLists.txt 2014-08-01 10:38:28.134869689 -0400 +@@ -35,7 +35,6 @@ + include(TokuFeatureDetection) + include(TokuSetupCompiler) + include(TokuSetupCTest) +-include(TokuThirdParty) + + set(TOKU_CMAKE_SCRIPT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/cmake") + include(TokuMergeLibs) diff --git a/dev-db/tokumx/metadata.xml b/dev-db/tokumx/metadata.xml new file mode 100644 index 000000000000..8b594299bb96 --- /dev/null +++ b/dev-db/tokumx/metadata.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>chainsaw@gentoo.org</email> + <name>Tony Vroon</name> + </maintainer> + <maintainer> + <email>ultrabug@gentoo.org</email> + <name>Alexys Jacob</name> + <description>Secondary Maintainer. CC on bugs</description> + </maintainer> + <use> + <flag name="pax_kernel">Apply patch needed for hardened kernels</flag> + </use> +</pkgmetadata> diff --git a/dev-db/tokumx/tokumx-1.5.0-r1.ebuild b/dev-db/tokumx/tokumx-1.5.0-r1.ebuild new file mode 100644 index 000000000000..87c68b87a40a --- /dev/null +++ b/dev-db/tokumx/tokumx-1.5.0-r1.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +CMAKE_BUILD_TYPE=Release +PYTHON_COMPAT=( python2_7 ) + +inherit python-r1 cmake-utils + +MY_P=${PN}-git-tag-${PV} + +DESCRIPTION="An open source, high-performance distribution of MongoDB" +HOMEPAGE="http://www.tokutek.com/products/tokumx-for-mongodb/" +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=" + dev-libs/jemalloc + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + net-libs/libpcap" +DEPEND="${RDEPEND} + sys-libs/ncurses + sys-libs/readline" + +S="${WORKDIR}/mongo" +BUILD_DIR="${WORKDIR}/mongo/build" +QA_PRESTRIPPED="/usr/lib64/libHotBackup.so" + +src_prepare() { + epatch "${FILESDIR}/${PV}-Werror.diff" + epatch "${FILESDIR}/${PN}-disable-bundled-libs.patch" + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -D TOKU_DEBUG_PARANOID=OFF + -D USE_VALGRIND=OFF + -D USE_BDB=OFF + -D BUILD_TESTING=OFF + -D TOKUMX_DISTNAME=${PV} + -D LIBJEMALLOC="jemalloc" + -D TOKUMX_STRIP_BINARIES=0 + -D USE_SYSTEM_PCRE=1 + -D USE_SYSTEM_BOOST=1 + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + + # Remove unnecessary files + rm -r "${D}usr/buildscripts" "${D}usr/scripts" "${D}usr/src" || die + + # Correctly install this python script + python_foreach_impl python_doscript scripts/tokumxstat.py + + # Clean up documentation installed to /usr + pushd "${D}usr/" || die + rm GNU-AGPL-3.0 LICENSE.txt NEWS README README.md README-TOKUDB README-TOKUKV SConstruct THIRD-PARTY-NOTICES || die + popd || die + dodoc README.md distsrc/NEWS distsrc/README distsrc/THIRD-PARTY-NOTICES + newdoc src/third_party/ft-index/README-TOKUDB README-TOKUKV +} diff --git a/dev-db/tokumx/tokumx-1.5.0.ebuild b/dev-db/tokumx/tokumx-1.5.0.ebuild new file mode 100644 index 000000000000..e24d5bbf611f --- /dev/null +++ b/dev-db/tokumx/tokumx-1.5.0.ebuild @@ -0,0 +1,48 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +CMAKE_BUILD_TYPE=Release + +inherit cmake-utils + +MY_P=${PN}-git-tag-${PV} + +DESCRIPTION="An open source, high-performance distribution of MongoDB" +HOMEPAGE="http://www.tokutek.com/products/tokumx-for-mongodb/" +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +RDEPEND=" + !dev-libs/jemalloc + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + net-libs/libpcap" +DEPEND="${RDEPEND} + sys-libs/ncurses + sys-libs/readline" + +S="${WORKDIR}/mongo" +BUILD_DIR="${WORKDIR}/mongo/build" +QA_PRESTRIPPED="/usr/lib64/libHotBackup.so" + +src_prepare() { + epatch "${FILESDIR}/${PV}-Werror.diff" + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -D TOKU_DEBUG_PARANOID=OFF + -D USE_VALGRIND=OFF + -D USE_BDB=OFF + -D BUILD_TESTING=OFF + -D TOKUMX_DISTNAME=${PV} + ) + cmake-utils_src_configure +} diff --git a/dev-db/tokumx/tokumx-2.0.1.ebuild b/dev-db/tokumx/tokumx-2.0.1.ebuild new file mode 100644 index 000000000000..2b76bc418f9b --- /dev/null +++ b/dev-db/tokumx/tokumx-2.0.1.ebuild @@ -0,0 +1,73 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +CMAKE_BUILD_TYPE=Release +PYTHON_COMPAT=( python2_7 ) + +inherit python-r1 cmake-utils pax-utils + +MY_P=${PN}-git-tag-${PV} + +DESCRIPTION="An open source, high-performance distribution of MongoDB" +HOMEPAGE="http://www.tokutek.com/products/tokumx-for-mongodb/" +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2" + +LICENSE="AGPL-3 Apache-2.0" +SLOT="0" +KEYWORDS="~amd64" +IUSE="pax_kernel" + +RDEPEND=" + dev-libs/jemalloc + >=dev-libs/boost-1.50[threads(+)] + >=dev-libs/libpcre-8.30[cxx] + net-libs/libpcap" +DEPEND="${RDEPEND} + sys-libs/ncurses + sys-libs/readline + pax_kernel? ( sys-apps/paxctl sys-apps/elfix ) +" + +S="${WORKDIR}/mongo" +BUILD_DIR="${WORKDIR}/mongo/build" +QA_PRESTRIPPED="/usr/lib64/libHotBackup.so" + +src_prepare() { + epatch "${FILESDIR}/${P}-no-werror.patch" + cmake-utils_src_prepare +} + +src_configure() { + local mycmakeargs=( + -D TOKU_DEBUG_PARANOID=OFF + -D USE_VALGRIND=OFF + -D USE_BDB=OFF + -D BUILD_TESTING=OFF + -D TOKUMX_DISTNAME=${PV} + -D LIBJEMALLOC="jemalloc" + -D TOKUMX_STRIP_BINARIES=0 + -D USE_SYSTEM_PCRE=1 + -D USE_SYSTEM_BOOST=1 + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + pax-mark -m "${D}"/usr/bin/mongo + + # Remove unnecessary files + rm -r "${D}usr/buildscripts" "${D}usr/scripts" "${D}usr/src" "${D}usr/include/db.h" || die + + # Correctly install this python script + python_foreach_impl python_doscript scripts/tokumxstat.py + + # Clean up documentation installed to /usr + pushd "${D}usr/" || die + rm GNU-AGPL-3.0 LICENSE.txt NEWS README README.md README-TOKUDB README-TOKUKV SConstruct THIRD-PARTY-NOTICES || die + popd || die + dodoc README.md distsrc/NEWS distsrc/README distsrc/THIRD-PARTY-NOTICES + newdoc src/third_party/ft-index/README-TOKUDB README-TOKUKV +} diff --git a/dev-db/tokyocabinet/Manifest b/dev-db/tokyocabinet/Manifest new file mode 100644 index 000000000000..4836769781c0 --- /dev/null +++ b/dev-db/tokyocabinet/Manifest @@ -0,0 +1 @@ +DIST tokyocabinet-1.4.48.tar.gz 1000485 SHA256 a003f47c39a91e22d76bc4fe68b9b3de0f38851b160bbb1ca07a4f6441de1f90 SHA512 b9995c838e713c13f781ab41062caefeb5c613f696dab08039f992f6860413d60a513114b83468cafdf7fc5b5e51ab880226972465d532f873f2a55f615e1440 WHIRLPOOL 90d47ac8858e5f4c198418c48118c0142e5bd04156088075eb0450cbc1aa7c70dde3206624c52710c46bb1a307675d536ba0d15e5ac8f4680aaf56691dd8a58e diff --git a/dev-db/tokyocabinet/files/1.4.45.patch b/dev-db/tokyocabinet/files/1.4.45.patch new file mode 100644 index 000000000000..64d7b4a4f9fb --- /dev/null +++ b/dev-db/tokyocabinet/files/1.4.45.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.in b/Makefile.in +index 973bf81..e44f0a8 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -125,7 +125,6 @@ install : + cd man && cp -Rf $(MAN3FILES) $(DESTDIR)$(MAN3DIR) + mkdir -p $(DESTDIR)$(PCDIR) + cp -Rf $(PCFILES) $(DESTDIR)$(PCDIR) +- [ "$$UID" = 0 ] && ldconfig || true + @printf '\n' + @printf '#================================================================\n' + @printf '# Thanks for using Tokyo Cabinet.\n'
\ No newline at end of file diff --git a/dev-db/tokyocabinet/files/1.4.46.patch b/dev-db/tokyocabinet/files/1.4.46.patch new file mode 100644 index 000000000000..4814e95fb72d --- /dev/null +++ b/dev-db/tokyocabinet/files/1.4.46.patch @@ -0,0 +1,12 @@ +diff --git a/Makefile.in b/Makefile.in +index 8846c38..01caa50 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -125,7 +125,6 @@ install : + cd man && cp -Rf $(MAN3FILES) $(DESTDIR)$(MAN3DIR) + mkdir -p $(DESTDIR)$(PCDIR) + cp -Rf $(PCFILES) $(DESTDIR)$(PCDIR) +- -[ "$$UID" = 0 ] && PATH=/sbin:/usr/sbin:$(PATH) ldconfig 2>/dev/null || true + @printf '\n' + @printf '#================================================================\n' + @printf '# Thanks for using Tokyo Cabinet.\n' diff --git a/dev-db/tokyocabinet/files/fix_rpath.patch b/dev-db/tokyocabinet/files/fix_rpath.patch new file mode 100644 index 000000000000..e1cba0a0370f --- /dev/null +++ b/dev-db/tokyocabinet/files/fix_rpath.patch @@ -0,0 +1,56 @@ +diff -ur Makefile.in Makefile.in +--- Makefile.in 2009-08-04 09:37:52.000000000 +0200 ++++ Makefile.in 2009-09-30 23:45:28.000000000 +0200 +@@ -54,8 +54,8 @@ + LDFLAGS = @MYLDFLAGS@ + CMDLDFLAGS = @MYCMDLDFLAGS@ + LIBS = @LIBS@ +-LDENV = LD_RUN_PATH=/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@:. +-RUNENV = @MYLDLIBPATHENV@=.:/lib:/usr/lib:$(LIBDIR):$(HOME)/lib:/usr/local/lib:@MYRUNPATH@ ++LDENV = ++RUNENV = @MYLDLIBPATHENV@=.:$(LIBDIR) + POSTCMD = @MYPOSTCMD@ + + +diff -ur configure.in configure.in +--- configure.in 2009-08-31 11:36:58.000000000 +0200 ++++ configure.in 2009-09-30 23:45:28.000000000 +0200 +@@ -31,25 +31,15 @@ + MYPCFILES="tokyocabinet.pc" + + # Building flags +-MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char -O2" ++MYCFLAGS="-std=c99 -Wall -fPIC -fsigned-char" +-MYCPPFLAGS="-I. -I\$(INCLUDEDIR) -I$HOME/include -I/usr/local/include" ++MYCPPFLAGS="-I. -I\$(INCLUDEDIR)" + MYCPPFLAGS="$MYCPPFLAGS -DNDEBUG -D_GNU_SOURCE=1 -D_REENTRANT -D__EXTENSIONS__" +-MYLDFLAGS="-L. -L\$(LIBDIR) -L$HOME/lib -L/usr/local/lib" ++MYLDFLAGS="-L. -L\$(LIBDIR)" + MYCMDLDFLAGS="" + MYRUNPATH="\$(LIBDIR)" + MYLDLIBPATHENV="LD_LIBRARY_PATH" + MYPOSTCMD="true" + +-# Building paths +-PATH="$PATH:$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin" +-PATH="$PATH:/opt/SUNWspro/bin:/usr/ccs/bin:/usr/xpg4/bin:/usr/xpg6/bin:/usr/ucb" +-CPATH="$HOME/include:/usr/local/include:$CPATH" +-LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LIBRARY_PATH" +-LD_LIBRARY_PATH="$HOME/lib:/usr/local/lib:$LD_LIBRARY_PATH" +-PKG_CONFIG_PATH="$HOME/lib/pkgconfig:/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH" +-export PATH CPATH LIBRARY_PATH LD_LIBRARY_PATH PKG_CONFIG_PATH +- +- + + #================================================================ + # Options +diff -ur tokyocabinet.pc.in tokyocabinet.pc.in +--- tokyocabinet.pc.in 2008-02-18 08:25:18.000000000 +0100 ++++ tokyocabinet.pc.in 2009-09-30 23:45:28.000000000 +0200 +@@ -10,5 +10,5 @@ + Name: Tokyo Cabinet + Description: a modern implementation of DBM + Version: @PACKAGE_VERSION@ +-Libs: -L${libdir} -ltokyocabinet @LIBS@ ++Libs: -L${libdir} -ltokyocabinet + Cflags: -I${includedir} diff --git a/dev-db/tokyocabinet/files/remove_docinst.patch b/dev-db/tokyocabinet/files/remove_docinst.patch new file mode 100644 index 000000000000..d513f54b753c --- /dev/null +++ b/dev-db/tokyocabinet/files/remove_docinst.patch @@ -0,0 +1,13 @@ +diff --git a/Makefile.in b/Makefile.in +index 8846c38..29ac11e 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -117,8 +117,6 @@ install : + cp -Rf $(COMMANDFILES) $(DESTDIR)$(BINDIR) + mkdir -p $(DESTDIR)$(LIBEXECDIR) + cp -Rf $(CGIFILES) $(DESTDIR)$(LIBEXECDIR) +- mkdir -p $(DESTDIR)$(DATADIR) +- cp -Rf $(DOCUMENTFILES) $(DESTDIR)$(DATADIR) + mkdir -p $(DESTDIR)$(MAN1DIR) + cd man && cp -Rf $(MAN1FILES) $(DESTDIR)$(MAN1DIR) + mkdir -p $(DESTDIR)$(MAN3DIR) diff --git a/dev-db/tokyocabinet/metadata.xml b/dev-db/tokyocabinet/metadata.xml new file mode 100644 index 000000000000..24cbb90cf0c4 --- /dev/null +++ b/dev-db/tokyocabinet/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> + <email>patrick@gentoo.org</email> + <name>Patrick Lauer</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/tokyocabinet/tokyocabinet-1.4.48.ebuild b/dev-db/tokyocabinet/tokyocabinet-1.4.48.ebuild new file mode 100644 index 000000000000..bbc9531bd217 --- /dev/null +++ b/dev-db/tokyocabinet/tokyocabinet-1.4.48.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="2" + +inherit eutils autotools + +DESCRIPTION="A library of routines for managing a database" +HOMEPAGE="http://fallabs.com/tokyocabinet/" +SRC_URI="${HOMEPAGE}${P}.tar.gz" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 hppa ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris" +IUSE="debug doc examples" + +DEPEND="sys-libs/zlib + app-arch/bzip2" +RDEPEND="${DEPEND}" + +src_prepare() { + epatch "${FILESDIR}/fix_rpath.patch" + sed -i \ + -e "/ldconfig/d" \ + -e "/DATADIR/d" Makefile.in || die + # cflags fix - remove -O2 at end of line and -fomit-frame-pointer + sed -i -e 's/-O3"$/"/' configure.in || die + sed -i -e 's/-fomit-frame-pointer//' configure.in || die + # flag only works on x86 derivatives, remove everywhere else + if ! use x86 && ! use amd64; then sed -i -e 's/ -minline-all-stringops//' configure.in; fi + eautoreconf +} + +src_configure() { + # we use the "fastest" target without the -O3 + econf $(use_enable debug) --enable-off64 --enable-fastest +} + +src_install() { + emake DESTDIR="${D}" install || die "Install failed" + + if use examples; then + insinto /usr/share/${PF}/example + doins example/* || die "Install failed" + fi + + if use doc; then + insinto /usr/share/doc/${PF} + doins -r doc/* || die "Install failed" + fi +} + +src_test() { + emake -j1 check || die "Tests failed" +} diff --git a/dev-db/tora/Manifest b/dev-db/tora/Manifest new file mode 100644 index 000000000000..a8c359e466b1 --- /dev/null +++ b/dev-db/tora/Manifest @@ -0,0 +1 @@ +DIST tora-3.0.0_pre20140929.tar.xz 9038680 SHA256 67fb6273c930b4ba4cbc185fd3e2a68b8c7029098b14f729ffbdfa09ed91af2b SHA512 42bc76d8bbed8a5cfee447ea6dec9966a31ef740d3ab58078ecdfc12f725cc94568fbb96d044668ae5fd83def5ab35823df6dee77b630e7903edfd1521b87b73 WHIRLPOOL 7fcf7fbe06d1fa4d31a88674f011c634ec9ef12003a074c8185a981650fff8aef85725007f51a3e463d95f332fde724392fd748d4fdbc464663a2da3b8ec8693 diff --git a/dev-db/tora/metadata.xml b/dev-db/tora/metadata.xml new file mode 100644 index 000000000000..9155cc041873 --- /dev/null +++ b/dev-db/tora/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>proxy-maintainers</herd> + <maintainer> + <email>ikonta@yandex.ru</email> + <name>Sergey Starikoff</name> + </maintainer> + <maintainer> + <email>haubi@gentoo.org</email> + <name>Michael Haubenwallner</name> + </maintainer> + <longdescription> + TOra is a Toolkit for Oracle which aims to help the DBA or developer of + database application. Features PL/SQL debugger, SQL worksheet with syntax + highlighting, DB browser and a comprehensive set of DBA tools. Also works + with mySQL and postgreSQL. +</longdescription> + <upstream> + <remote-id type="sourceforge">tora</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/tora/tora-3.0.0_pre20140929-r1.ebuild b/dev-db/tora/tora-3.0.0_pre20140929-r1.ebuild new file mode 100644 index 000000000000..d7a74799d1f2 --- /dev/null +++ b/dev-db/tora/tora-3.0.0_pre20140929-r1.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils eutils + +if [[ ${PV} == 9999 ]]; then + ESVN_REPO_URI="https://tora.svn.sourceforge.net/svnroot/tora/trunk/tora" + inherit subversion + SRC_URI="" +else + SRC_URI="http://dev.gentoo.org/~pinkbyte/distfiles/snapshots/${P}.tar.xz" +fi + +DESCRIPTION="TOra - Toolkit For Oracle" +HOMEPAGE="http://torasql.com/" +IUSE="debug mysql postgres" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="~amd64 ~x86" + +RDEPEND=" + dev-libs/ferrisloki + x11-libs/qscintilla + dev-qt/qtgui:4 + dev-qt/qtsql:4[mysql?,postgres?] + dev-qt/qtxmlpatterns:4 + =dev-db/oracle-instantclient-basic-11* + postgres? ( dev-db/postgresql ) +" + +DEPEND=" + virtual/pkgconfig + ${RDEPEND} +" + +pkg_setup() { + if [ -z "$ORACLE_HOME" ] ; then + eerror "ORACLE_HOME variable is not set." + eerror + eerror "You must install Oracle >= 8i client for Linux in" + eerror "order to compile TOra with Oracle support." + eerror + eerror "You can download the Oracle software from" + eerror "http://otn.oracle.com/software/content.html" + die + fi +} + +src_prepare() { + sed -i \ + -e "/COPYING/ d" \ + CMakeLists.txt || die "Removal of COPYING file failed" + # bug 547520 + grep -rlZ '$$ORIGIN' . | xargs -0 sed -i 's|:$$ORIGIN[^:"]*||' || \ + die 'Removal of $$ORIGIN failed' +} + +src_configure() { + local mycmakeargs=() + mycmakeargs=(-DENABLE_ORACLE=ON) + mycmakeargs+=( + -DWANT_RPM=OFF + -DWANT_BUNDLE=OFF + -DWANT_BUNDLE_STANDALONE=OFF + -DWANT_INTERNAL_QSCINTILLA=OFF + -DWANT_INTERNAL_LOKI=OFF + -DLOKI_LIBRARY="$(pkg-config --variable=libdir ferrisloki)/libferrisloki.so" + -DLOKI_INCLUDE_DIR="$(pkg-config --variable=includedir ferrisloki)/FerrisLoki" + $(cmake-utils_use_enable postgres PGSQL) + $(cmake-utils_use_want debug) + # path variables + -DTORA_DOC_DIR=share/doc/${PF} + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + # + doicon src/icons/${PN}.xpm || die + domenu src/${PN}.desktop || die +} diff --git a/dev-db/tora/tora-9999.ebuild b/dev-db/tora/tora-9999.ebuild new file mode 100644 index 000000000000..80e45b5a8159 --- /dev/null +++ b/dev-db/tora/tora-9999.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit cmake-utils eutils + +if [[ ${PV} == 9999 ]]; then + ESVN_REPO_URI="https://tora.svn.sourceforge.net/svnroot/tora/trunk/tora" + inherit subversion + SRC_URI="" +else + SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" +fi + +DESCRIPTION="TOra - Toolkit For Oracle" +HOMEPAGE="http://torasql.com/" +IUSE="debug mysql oracle oci8-instant-client postgres" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="" + +DEPEND=" + virtual/pkgconfig + dev-libs/ferrisloki + x11-libs/qscintilla + dev-qt/qtgui:4 + dev-qt/qtsql:4[mysql?,postgres?] + dev-qt/qtxmlpatterns:4 + oci8-instant-client? ( dev-db/oracle-instantclient-basic ) + postgres? ( dev-db/postgresql ) +" +RDEPEND="${DEPEND}" + +pkg_setup() { + if ( use oracle || use oci8-instant-client ) && [ -z "$ORACLE_HOME" ] ; then + eerror "ORACLE_HOME variable is not set." + eerror + eerror "You must install Oracle >= 8i client for Linux in" + eerror "order to compile TOra with Oracle support." + eerror + eerror "Otherwise specify -oracle in your USE variable." + eerror + eerror "You can download the Oracle software from" + eerror "http://otn.oracle.com/software/content.html" + die + fi +} + +src_prepare() { + sed -i \ + -e "/COPYING/ d" \ + CMakeLists.txt || die "Removal of COPYING file failed" + # 'svn info' needs .svn subdirectory + [[ ${PV} != 9999 ]] || cp -a "${ESVN_WC_PATH}"/.svn .svn || die + # bug 547520 + grep -rlZ '$$ORIGIN' . | xargs -0 sed -i 's|:$$ORIGIN[^:"]*||' || \ + die 'Removal of $$ORIGIN failed' +} + +src_configure() { + local mycmakeargs=() + if use oracle || use oci8-instant-client ; then + mycmakeargs=(-DENABLE_ORACLE=ON) + else + mycmakeargs=(-DENABLE_ORACLE=OFF) + fi + mycmakeargs+=( + -DWANT_RPM=OFF + -DWANT_BUNDLE=OFF + -DWANT_BUNDLE_STANDALONE=OFF + -DWANT_INTERNAL_QSCINTILLA=OFF + -DWANT_INTERNAL_LOKI=OFF + -DLOKI_LIBRARY="$(pkg-config --variable=libdir ferrisloki)/libferrisloki.so" + -DLOKI_INCLUDE_DIR="$(pkg-config --variable=includedir ferrisloki)/FerrisLoki" + $(cmake-utils_use_enable postgres PGSQL) + $(cmake-utils_use_want debug) + # path variables + -DTORA_DOC_DIR=share/doc/${PF} + ) + cmake-utils_src_configure +} + +src_install() { + cmake-utils_src_install + doicon src/icons/${PN}.xpm + domenu src/${PN}.desktop +} diff --git a/dev-db/unixODBC/Manifest b/dev-db/unixODBC/Manifest new file mode 100644 index 000000000000..96eb2c38dbee --- /dev/null +++ b/dev-db/unixODBC/Manifest @@ -0,0 +1,2 @@ +DIST unixODBC-2.3.1.tar.gz 1813380 SHA256 1f5be3edecff9e31072ef738ea1d8019594c4f0c2e3ab427e6eef153491db6a2 SHA512 682a4c58febb923491aba4cad8d07228330e5dccb7b8969e0a9d99f92cd90757bd931441f3391c8562ade89f3cfc82416bad8c63d6c0e60b55d0101829e8b872 WHIRLPOOL c3bae729f8af2d4a2680768f00e91044ea32fedc4e677230db3c6a321e8e41964b57b3f850aef6d8213c611f3d0b62822d3c68b8f1b9a11877403891d310e32a +DIST unixODBC-2.3.2.tar.gz 1849173 SHA256 9c3459742f25df5aa3c10a61429bde51a6d4f11552c03095f1d33d7eb02b5c9a SHA512 31d705bf3dcaff6707d5680235b34e4d265a084b1de9e1b2ed3bbee1e1dfefdb4437fe3e1736b84e446d1927ec7622296d9e9b129052cb35f4b63b0bd79ccd13 WHIRLPOOL 05b8fe927a148a0b7ec7abecbac6f5370e904c669b5b0cc58840f7c2302e1df62901a1a627221057be6d4b8b90772854fe3db6e5fda2a5df02970073416ef5f0 diff --git a/dev-db/unixODBC/files/unixODBC-2.3.0-sqldriverconnect.patch b/dev-db/unixODBC/files/unixODBC-2.3.0-sqldriverconnect.patch new file mode 100644 index 000000000000..abcce61106d6 --- /dev/null +++ b/dev-db/unixODBC/files/unixODBC-2.3.0-sqldriverconnect.patch @@ -0,0 +1,27 @@ +http://bugs.gentoo.org/show_bug.cgi?id=358611 +--- unixODBC-2.3.0.orig/DriverManager/SQLDriverConnect.c 2011-04-02 21:56:19.889301819 +0400 ++++ unixODBC-2.3.0/DriverManager/SQLDriverConnect.c 2011-04-02 21:58:37.129102095 +0400 +@@ -639,7 +639,7 @@ + { + DMHDBC connection = (DMHDBC)hdbc; + struct con_struct con_struct; +- char *driver, *dsn = NULL, *filedsn, *tsavefile, savefile[ 128 ]; ++ char *driver, *dsn = NULL, *filedsn, *tsavefile, savefile[ INI_MAX_PROPERTY_VALUE + 1 ]; + char lib_name[ INI_MAX_PROPERTY_VALUE + 1 ]; + char driver_name[ INI_MAX_PROPERTY_VALUE + 1 ]; + SQLRETURN ret_from_connect; +@@ -944,7 +944,13 @@ + tsavefile = __get_attribute_value( &con_struct, "SAVEFILE" ); + if ( tsavefile ) + { +- strcpy( savefile, tsavefile ); ++ if ( strlen( tsavefile ) > INI_MAX_PROPERTY_VALUE ) { ++ memcpy( savefile, tsavefile, INI_MAX_PROPERTY_VALUE ); ++ savefile[ INI_MAX_PROPERTY_VALUE ] = '\0'; ++ } ++ else { ++ strcpy( savefile, tsavefile ); ++ } + } + else + { diff --git a/dev-db/unixODBC/metadata.xml b/dev-db/unixODBC/metadata.xml new file mode 100644 index 000000000000..b77626c0cda6 --- /dev/null +++ b/dev-db/unixODBC/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>neurogeek@gentoo.org</email> + <name>Jesus Rivero</name> + </maintainer> + <use> + <flag name="minimal">Disable bundled drivers and extra libraries (most users don't need these)</flag> + <flag name="odbcmanual">Administrator, Internal Structure, Programmer and User documentation</flag> + </use> +</pkgmetadata> diff --git a/dev-db/unixODBC/unixODBC-2.3.1-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.1-r1.ebuild new file mode 100644 index 000000000000..644d2b396b2f --- /dev/null +++ b/dev-db/unixODBC/unixODBC-2.3.1-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit libtool + +DESCRIPTION="A complete ODBC driver manager" +HOMEPAGE="http://www.unixodbc.org/" +SRC_URI="http://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+minimal odbcmanual static-libs unicode" + +RDEPEND=">=sys-devel/libtool-2.2.6b + >=sys-libs/readline-6.1 + >=sys-libs/ncurses-5.7-r7 + virtual/libiconv" +DEPEND="${RDEPEND} + sys-devel/flex" + +DOCS="AUTHORS ChangeLog NEWS README" + +src_prepare() { + elibtoolize +} + +src_configure() { + # --enable-driver-conf is --enable-driverc as per configure.in + econf \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + --enable-iconv \ + $(use_enable static-libs static) \ + $(use_enable !minimal drivers) \ + $(use_enable !minimal driverc) \ + $(use_with unicode iconv-char-enc UTF8) \ + $(use_with unicode iconv-ucode-enc UTF16LE) +} + +src_install() { + default + + use prefix && dodoc README* + use odbcmanual && dohtml -a css,gif,html,sql,vsd -r doc/* + + find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + +} diff --git a/dev-db/unixODBC/unixODBC-2.3.1.ebuild b/dev-db/unixODBC/unixODBC-2.3.1.ebuild new file mode 100644 index 000000000000..ad3b416777be --- /dev/null +++ b/dev-db/unixODBC/unixODBC-2.3.1.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +inherit libtool + +DESCRIPTION="A complete ODBC driver manager" +HOMEPAGE="http://www.unixodbc.org/" +SRC_URI="http://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+minimal odbcmanual static-libs" + +RDEPEND=">=sys-devel/libtool-2.2.6b + >=sys-libs/readline-6.1 + >=sys-libs/ncurses-5.7-r7 + virtual/libiconv" +DEPEND="${RDEPEND} + sys-devel/flex" + +DOCS="AUTHORS ChangeLog NEWS README" + +src_prepare() { + elibtoolize +} + +src_configure() { + # --enable-driver-conf is --enable-driverc as per configure.in + econf \ + --sysconfdir="${EPREFIX}"/etc/${PN} \ + $(use_enable static-libs static) \ + $(use_enable !minimal drivers) \ + $(use_enable !minimal driverc) +} + +src_install() { + default + + use prefix && dodoc README* + use odbcmanual && dohtml -a css,gif,html,sql,vsd -r doc/* + + find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + +} diff --git a/dev-db/unixODBC/unixODBC-2.3.2-r1.ebuild b/dev-db/unixODBC/unixODBC-2.3.2-r1.ebuild new file mode 100644 index 000000000000..c309b952e41d --- /dev/null +++ b/dev-db/unixODBC/unixODBC-2.3.2-r1.ebuild @@ -0,0 +1,52 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit libtool autotools-multilib eutils + +DESCRIPTION="A complete ODBC driver manager" +HOMEPAGE="http://www.unixodbc.org/" +SRC_URI="http://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+minimal odbcmanual static-libs unicode" + +RDEPEND="|| ( + dev-libs/libltdl:0[${MULTILIB_USEDEP}] + >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}] + ) + >=sys-libs/readline-6.2_p5-r1[${MULTILIB_USEDEP}] + >=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}] + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + sys-devel/flex" + +DOCS="AUTHORS ChangeLog NEWS README" +MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h ) + +src_configure() { + # --enable-driver-conf is --enable-driverc as per configure.in + myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + --enable-iconv + $(use_enable static-libs static) + $(use_enable !minimal drivers) + $(use_enable !minimal driverc) + $(use_with unicode iconv-char-enc UTF8) + $(use_with unicode iconv-ucode-enc UTF16LE) + ) + autotools-multilib_src_configure +} + +multilib_src_install_all() { + einstalldocs + + use prefix && dodoc README* + use odbcmanual && dohtml -a css,gif,html,sql,vsd -r doc/* + + find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + +} diff --git a/dev-db/unixODBC/unixODBC-2.3.2-r2.ebuild b/dev-db/unixODBC/unixODBC-2.3.2-r2.ebuild new file mode 100644 index 000000000000..a4c5d4af6530 --- /dev/null +++ b/dev-db/unixODBC/unixODBC-2.3.2-r2.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit libtool autotools-multilib eutils + +DESCRIPTION="A complete ODBC driver manager" +HOMEPAGE="http://www.unixodbc.org/" +SRC_URI="http://ftp.unixodbc.org/pub/${PN}/${P}.tar.gz" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="+minimal odbcmanual static-libs unicode" + +RDEPEND="|| ( + dev-libs/libltdl:0[${MULTILIB_USEDEP}] + >=sys-devel/libtool-2.4.2-r1[${MULTILIB_USEDEP}] + ) + >=sys-libs/readline-6.2_p5-r1[${MULTILIB_USEDEP}] + >=sys-libs/ncurses-5.9-r3[${MULTILIB_USEDEP}] + >=virtual/libiconv-0-r1[${MULTILIB_USEDEP}] + abi_x86_32? ( !app-emulation/emul-linux-x86-db[-abi_x86_32(-)] )" +DEPEND="${RDEPEND} + sys-devel/flex" + +DOCS="AUTHORS ChangeLog NEWS README" +MULTILIB_CHOST_TOOLS=( /usr/bin/odbc_config ) +MULTILIB_WRAPPED_HEADERS=( /usr/include/unixodbc_conf.h ) + +src_configure() { + # --enable-driver-conf is --enable-driverc as per configure.in + myeconfargs=( + --sysconfdir="${EPREFIX}"/etc/${PN} + --enable-iconv + $(use_enable static-libs static) + $(use_enable !minimal drivers) + $(use_enable !minimal driverc) + $(use_with unicode iconv-char-enc UTF8) + $(use_with unicode iconv-ucode-enc UTF16LE) + ) + autotools-multilib_src_configure +} + +multilib_src_install_all() { + einstalldocs + + use prefix && dodoc README* + use odbcmanual && dohtml -a css,gif,html,sql,vsd -r doc/* + + find "${ED}" -name '*.la' -exec sed -i -e "/^dependency_libs/s:=.*:='':" {} + +} diff --git a/dev-db/vbisam/Manifest b/dev-db/vbisam/Manifest new file mode 100644 index 000000000000..52ded53faf5e --- /dev/null +++ b/dev-db/vbisam/Manifest @@ -0,0 +1 @@ +DIST vbisam-2.0.tar.bz2 342184 SHA256 391d422cf11b8ff3d27569d2166e4e800febd77d8d3450438fc76a7f0e587308 SHA512 f329b9e35a8d912776342414cd02bb144c359ae316b5851b6fc49e0e13cbf4870ce2a445207fcdd8c1141ea7e0d5dff74f92f19e9b42597c16625a399c75c00c WHIRLPOOL cc8b6f5bc08cba3db663ba7acb1fe96be6d2f32533d4723af47b9e5bda6829acabfeab67f996b692c467bdd8890cbed11c20715c849a74cc0c485109ccbf56db diff --git a/dev-db/vbisam/metadata.xml b/dev-db/vbisam/metadata.xml new file mode 100644 index 000000000000..2b77202cf274 --- /dev/null +++ b/dev-db/vbisam/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">tiny-cobol</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/vbisam/vbisam-2.0.ebuild b/dev-db/vbisam/vbisam-2.0.ebuild new file mode 100644 index 000000000000..22459a67c7be --- /dev/null +++ b/dev-db/vbisam/vbisam-2.0.ebuild @@ -0,0 +1,21 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +KEYWORDS="ppc x86" + +DESCRIPTION="replacement for IBM's C-ISAM" +HOMEPAGE="http://sourceforge.net/projects/vbisam" +SRC_URI="mirror://sourceforge/tiny-cobol/isam/${P}.tar.bz2" +LICENSE="GPL-2 LGPL-2" +SLOT="0" +IUSE="" + +DEPEND="" +RDEPEND="${DEPEND}" + +src_install() +{ + emake install DESTDIR="${D}" || die "emake install failed." + dodoc ChangeLog README NEWS AUTHORS +} diff --git a/dev-db/virtuoso-odbc/Manifest b/dev-db/virtuoso-odbc/Manifest new file mode 100644 index 000000000000..6c2df6283cf3 --- /dev/null +++ b/dev-db/virtuoso-odbc/Manifest @@ -0,0 +1,4 @@ +DIST VOS-genpatches-6.1.6.tar.bz2 1224 SHA256 005d960017363d7f0c9807da6f706ec991e48d2c479f92798ee7df9003b7848a SHA512 f99429da6fd4c92252d183b6d1b8caae4910ac93d775c120d67c12925a0eb6ef2ce13a77b27944a2203047965431682a392a2731fc1690cb3f223a65823471c5 WHIRLPOOL 985ad05b55c7ebd1859e1233cb0546247b2ceca0f85b0ffc9212cc8393fbdd4c94af05b521beae08f3c11a838f64bc5b802c5f46dade8568de651929595cdf21 +DIST VOS-genpatches-6.1.8.tar.bz2 1224 SHA256 005d960017363d7f0c9807da6f706ec991e48d2c479f92798ee7df9003b7848a SHA512 f99429da6fd4c92252d183b6d1b8caae4910ac93d775c120d67c12925a0eb6ef2ce13a77b27944a2203047965431682a392a2731fc1690cb3f223a65823471c5 WHIRLPOOL 985ad05b55c7ebd1859e1233cb0546247b2ceca0f85b0ffc9212cc8393fbdd4c94af05b521beae08f3c11a838f64bc5b802c5f46dade8568de651929595cdf21 +DIST virtuoso-opensource-6.1.6.tar.gz 113255048 SHA256 c6bfa6817b3dad5f87577b68f4cf554d1bfbff48178a734084ac3dcbcea5a037 SHA512 d423e872bce8737f60a348c89e24f20de5581e7b943856df534b4c86015e50969cbe46fe0c73eb0f1a29a1a45f2d7cebca98564ab38044f1f731f661635ded55 WHIRLPOOL e44df5c484a92d3197c06fb4a3e338bbabfb49e0b087126799bfe0415cd6335dd61fa664f6b50cb4300d554b1519d70b51a1b27a3837faee2dc9df18459b68b1 +DIST virtuoso-opensource-6.1.8.tar.gz 117756529 SHA256 08d05c6165117de0370e81aa89ddab618e645b5110be301f72e6ffea7044ca50 SHA512 34812406eaa087fa200548c678de748a552a4189f6818df335d80e7680f0376c949cf1d0a2c4caddeafd0d79fac52d21b57b2150297368a7268fc3b83bc0af6b WHIRLPOOL 10bba34ee9a66fa46e3e60defbed7767df23e1bf826d8684c2cf2f7da87c05feb9798fdef85958d3ac81fb66208bed33dbd147d826ccc7b7d3b896133bc332c6 diff --git a/dev-db/virtuoso-odbc/files/virtuoso-odbc-6.1.6-am_config_header.patch b/dev-db/virtuoso-odbc/files/virtuoso-odbc-6.1.6-am_config_header.patch new file mode 100644 index 000000000000..5f84b49bc07f --- /dev/null +++ b/dev-db/virtuoso-odbc/files/virtuoso-odbc-6.1.6-am_config_header.patch @@ -0,0 +1,12 @@ ++++ a/configure.in +--- b/configure.in +@@ -36,7 +36,7 @@ + AC_INIT([Virtuoso Open Source Edition], + AC_CONFIG_SRCDIR([libsrc/Dk.h]) + AC_CONFIG_AUX_DIR([binsrc/config]) + AC_CONFIG_MACRO_DIR([binsrc/config]) +-AM_CONFIG_HEADER([libsrc/Dk/config.h]) ++AC_CONFIG_HEADER([libsrc/Dk/config.h]) + + dnl + dnl You may need to change the next macro for older versions of automake: diff --git a/dev-db/virtuoso-odbc/metadata.xml b/dev-db/virtuoso-odbc/metadata.xml new file mode 100644 index 000000000000..fbcadb28bdb6 --- /dev/null +++ b/dev-db/virtuoso-odbc/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>kde</herd> + <maintainer> + <email>reavertm@gentoo.org</email> + <name>Maciej Mrozowski</name> + </maintainer> + <maintainer> + <email>creffett@gentoo.org</email> + <name>Chris Reffett</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/virtuoso-odbc/virtuoso-odbc-6.1.6.ebuild b/dev-db/virtuoso-odbc/virtuoso-odbc-6.1.6.ebuild new file mode 100644 index 000000000000..ca9f35740f28 --- /dev/null +++ b/dev-db/virtuoso-odbc/virtuoso-odbc-6.1.6.ebuild @@ -0,0 +1,43 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit virtuoso + +DESCRIPTION="ODBC driver for OpenLink Virtuoso Open-Source Edition" + +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + >=dev-libs/openssl-0.9.7i:0 +" +DEPEND="${RDEPEND}" + +PATCHES=( "${FILESDIR}/${PN}-6.1.6-am_config_header.patch" ) + +VOS_EXTRACT=" + libsrc/Dk + libsrc/Thread + libsrc/odbcsdk + libsrc/util + binsrc/driver +" + +src_configure() { + myconf+=" + --disable-static + --without-iodbc + " + + virtuoso_src_configure +} + +src_install() { + default_src_install + + # Remove libtool files + find "${ED}" -name '*.la' -delete +} diff --git a/dev-db/virtuoso-odbc/virtuoso-odbc-6.1.8.ebuild b/dev-db/virtuoso-odbc/virtuoso-odbc-6.1.8.ebuild new file mode 100644 index 000000000000..9f9c825f5190 --- /dev/null +++ b/dev-db/virtuoso-odbc/virtuoso-odbc-6.1.8.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit virtuoso + +DESCRIPTION="ODBC driver for OpenLink Virtuoso Open-Source Edition" + +KEYWORDS="~amd64 ~arm ~ppc ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="" + +RDEPEND=" + >=dev-libs/openssl-0.9.7i:0 +" +DEPEND="${RDEPEND}" + +VOS_EXTRACT=" + libsrc/Dk + libsrc/Thread + libsrc/odbcsdk + libsrc/util + binsrc/driver +" + +src_configure() { + myconf+=" + --disable-static + --without-iodbc + " + + virtuoso_src_configure +} + +src_install() { + default_src_install + + # Remove libtool files + find "${ED}" -name '*.la' -delete +} diff --git a/dev-db/virtuoso-server/Manifest b/dev-db/virtuoso-server/Manifest new file mode 100644 index 000000000000..6c2df6283cf3 --- /dev/null +++ b/dev-db/virtuoso-server/Manifest @@ -0,0 +1,4 @@ +DIST VOS-genpatches-6.1.6.tar.bz2 1224 SHA256 005d960017363d7f0c9807da6f706ec991e48d2c479f92798ee7df9003b7848a SHA512 f99429da6fd4c92252d183b6d1b8caae4910ac93d775c120d67c12925a0eb6ef2ce13a77b27944a2203047965431682a392a2731fc1690cb3f223a65823471c5 WHIRLPOOL 985ad05b55c7ebd1859e1233cb0546247b2ceca0f85b0ffc9212cc8393fbdd4c94af05b521beae08f3c11a838f64bc5b802c5f46dade8568de651929595cdf21 +DIST VOS-genpatches-6.1.8.tar.bz2 1224 SHA256 005d960017363d7f0c9807da6f706ec991e48d2c479f92798ee7df9003b7848a SHA512 f99429da6fd4c92252d183b6d1b8caae4910ac93d775c120d67c12925a0eb6ef2ce13a77b27944a2203047965431682a392a2731fc1690cb3f223a65823471c5 WHIRLPOOL 985ad05b55c7ebd1859e1233cb0546247b2ceca0f85b0ffc9212cc8393fbdd4c94af05b521beae08f3c11a838f64bc5b802c5f46dade8568de651929595cdf21 +DIST virtuoso-opensource-6.1.6.tar.gz 113255048 SHA256 c6bfa6817b3dad5f87577b68f4cf554d1bfbff48178a734084ac3dcbcea5a037 SHA512 d423e872bce8737f60a348c89e24f20de5581e7b943856df534b4c86015e50969cbe46fe0c73eb0f1a29a1a45f2d7cebca98564ab38044f1f731f661635ded55 WHIRLPOOL e44df5c484a92d3197c06fb4a3e338bbabfb49e0b087126799bfe0415cd6335dd61fa664f6b50cb4300d554b1519d70b51a1b27a3837faee2dc9df18459b68b1 +DIST virtuoso-opensource-6.1.8.tar.gz 117756529 SHA256 08d05c6165117de0370e81aa89ddab618e645b5110be301f72e6ffea7044ca50 SHA512 34812406eaa087fa200548c678de748a552a4189f6818df335d80e7680f0376c949cf1d0a2c4caddeafd0d79fac52d21b57b2150297368a7268fc3b83bc0af6b WHIRLPOOL 10bba34ee9a66fa46e3e60defbed7767df23e1bf826d8684c2cf2f7da87c05feb9798fdef85958d3ac81fb66208bed33dbd147d826ccc7b7d3b896133bc332c6 diff --git a/dev-db/virtuoso-server/files/virtuoso-server-6.1.4-unbundle-minizip.patch b/dev-db/virtuoso-server/files/virtuoso-server-6.1.4-unbundle-minizip.patch new file mode 100644 index 000000000000..143c35905b21 --- /dev/null +++ b/dev-db/virtuoso-server/files/virtuoso-server-6.1.4-unbundle-minizip.patch @@ -0,0 +1,36 @@ +diff -urN virtuoso-opensource-6.1.4.orig/configure.in virtuoso-opensource-6.1.4/configure.in +--- virtuoso-opensource-6.1.4.orig/configure.in 2011-11-20 03:38:18.000000000 +0400 ++++ virtuoso-opensource-6.1.4/configure.in 2011-11-20 03:42:44.000000000 +0400 +@@ -1550,14 +1550,15 @@ + then + AC_CHECK_HEADER(zlib.h) + AC_CHECK_LIB(z, main, [with_zlib=yes], [with_zlib=internal]) ++ AC_CHECK_LIB(minizip, main, [with_zlib=yes], [with_zlib=internal]) + fi + if test "x$with_zlib" = "xinternal" + then + ZLIB_INC='-I$(top_srcdir)/libsrc/zlib' + ZLIB_LIB='$(top_builddir)/libsrc/zlib/libz.la' + else +- ZLIB_INC="" +- ZLIB_LIB="-lz" ++ ZLIB_INC=`pkg-config --cflags zlib minizip` ++ ZLIB_LIB=`pkg-config --libs zlib minizip` + fi + AC_SUBST(ZLIB_INC) + AC_SUBST(ZLIB_LIB) +diff -urN virtuoso-opensource-6.1.4.orig/libsrc/Wi/bif_file.c virtuoso-opensource-6.1.4/libsrc/Wi/bif_file.c +--- virtuoso-opensource-6.1.4.orig/libsrc/Wi/bif_file.c 2011-10-26 17:54:19.000000000 +0400 ++++ virtuoso-opensource-6.1.4/libsrc/Wi/bif_file.c 2011-11-20 03:44:36.000000000 +0400 +@@ -6167,10 +6167,7 @@ + #define fopen64 fopen + #endif + +-#include "zlib/contrib/minizip/unzip.h" +-#include "zlib/contrib/minizip/ioapi.h" +-#include "zlib/contrib/minizip/ioapi.c" +-#include "zlib/contrib/minizip/unzip.c" ++#include "unzip.h" + + static caddr_t + bif_unzip_file (caddr_t * qst, caddr_t * err_ret, state_slot_t ** args) diff --git a/dev-db/virtuoso-server/files/virtuoso-server-6.1.6-am_config_header.patch b/dev-db/virtuoso-server/files/virtuoso-server-6.1.6-am_config_header.patch new file mode 100644 index 000000000000..5f84b49bc07f --- /dev/null +++ b/dev-db/virtuoso-server/files/virtuoso-server-6.1.6-am_config_header.patch @@ -0,0 +1,12 @@ ++++ a/configure.in +--- b/configure.in +@@ -36,7 +36,7 @@ + AC_INIT([Virtuoso Open Source Edition], + AC_CONFIG_SRCDIR([libsrc/Dk.h]) + AC_CONFIG_AUX_DIR([binsrc/config]) + AC_CONFIG_MACRO_DIR([binsrc/config]) +-AM_CONFIG_HEADER([libsrc/Dk/config.h]) ++AC_CONFIG_HEADER([libsrc/Dk/config.h]) + + dnl + dnl You may need to change the next macro for older versions of automake: diff --git a/dev-db/virtuoso-server/metadata.xml b/dev-db/virtuoso-server/metadata.xml new file mode 100644 index 000000000000..13eb31da2e3f --- /dev/null +++ b/dev-db/virtuoso-server/metadata.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>kde</herd> + <maintainer> + <email>reavertm@gentoo.org</email> + <name>Maciej Mrozowski</name> + </maintainer> + <maintainer> + <email>creffett@gentoo.org</email> + <name>Chris Reffett</name> + </maintainer> + <longdescription> +OpenLink Virtuoso Open-Source Edition is a new generation of hybrid data server +product called a "Universal Server". It implements a wide range of industry +standard APIs and protocols, covering a broad range of functionality realms +that include: Object-Relational Data Managemtent, Virtualization of +Heterogeneous Data Sources (SQL, XML, RDF), Document Web Server (WebDAV/HTTP), +Data Web Server (RDF Linked Data Deployment), Web Services Platform, Discussion +Server, and many more. + </longdescription> +</pkgmetadata> diff --git a/dev-db/virtuoso-server/virtuoso-server-6.1.6.ebuild b/dev-db/virtuoso-server/virtuoso-server-6.1.6.ebuild new file mode 100644 index 000000000000..c2cbd02ace5c --- /dev/null +++ b/dev-db/virtuoso-server/virtuoso-server-6.1.6.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit virtuoso + +DESCRIPTION="Server binaries for Virtuoso, high-performance object-relational SQL database" + +KEYWORDS="amd64 ~arm ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="kerberos ldap readline" + +# Bug 305077 +RESTRICT="test" + +# zeroconf support looks like broken - disabling - last checked around 5.0.12 +# mono support fetches mono source and compiles it manually - disabling for now +# mono? ( dev-lang/mono ) +COMMON_DEPEND=" + dev-libs/libxml2:2 + >=dev-libs/openssl-0.9.7i:0 + >=sys-libs/zlib-1.2.5.1-r2:0[minizip] + kerberos? ( app-crypt/mit-krb5 ) + ldap? ( net-nds/openldap ) + readline? ( sys-libs/readline:0 ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/gperf-2.7.2 + sys-apps/gawk + >=sys-devel/bison-2.3 + >=sys-devel/flex-2.5.33 + virtual/pkgconfig +" +RDEPEND="${COMMON_DEPEND} + ~dev-db/virtuoso-odbc-${PV}:${SLOT} +" + +VOS_EXTRACT=" + libsrc/Dk + libsrc/Thread + libsrc/Tidy + libsrc/Wi + libsrc/Xml.new + libsrc/langfunc + libsrc/odbcsdk + libsrc/plugin + libsrc/util + binsrc/virtuoso + binsrc/tests +" + +DOCS=( AUTHORS ChangeLog CREDITS INSTALL NEWS README ) + +PATCHES=( + "${FILESDIR}/${PN}-6.1.4-unbundle-minizip.patch" + "${FILESDIR}/${PN}-6.1.6-am_config_header.patch" +) + +src_prepare() { + sed -e '/^lib_LTLIBRARIES\s*=.*/s/lib_/noinst_/' -i binsrc/virtuoso/Makefile.am \ + || die "failed to disable installation of static lib" + + virtuoso_src_prepare +} + +src_configure() { + myconf+=" + $(use_enable kerberos krb) + $(use_enable ldap openldap) + $(use_with readline) + --disable-static + --disable-hslookup + --disable-rendezvous + --without-iodbc + --program-transform-name="s/isql/isql-v/" + " + + virtuoso_src_configure +} + +src_install() { + default_src_install + + keepdir /var/lib/virtuoso/db +} diff --git a/dev-db/virtuoso-server/virtuoso-server-6.1.8.ebuild b/dev-db/virtuoso-server/virtuoso-server-6.1.8.ebuild new file mode 100644 index 000000000000..f62c9003fcb8 --- /dev/null +++ b/dev-db/virtuoso-server/virtuoso-server-6.1.8.ebuild @@ -0,0 +1,85 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit virtuoso + +DESCRIPTION="Server binaries for Virtuoso, high-performance object-relational SQL database" + +KEYWORDS="~amd64 ~arm ~ppc ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" +IUSE="kerberos ldap readline" + +# Bug 305077 +RESTRICT="test" + +# zeroconf support looks like broken - disabling - last checked around 5.0.12 +# mono support fetches mono source and compiles it manually - disabling for now +# mono? ( dev-lang/mono ) +COMMON_DEPEND=" + dev-libs/libxml2:2 + >=dev-libs/openssl-0.9.7i:0 + >=sys-libs/zlib-1.2.5.1-r2:0[minizip] + kerberos? ( app-crypt/mit-krb5 ) + ldap? ( net-nds/openldap ) + readline? ( sys-libs/readline:0 ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/gperf-2.7.2 + sys-apps/gawk + >=sys-devel/bison-2.3 + >=sys-devel/flex-2.5.33 + virtual/pkgconfig +" +RDEPEND="${COMMON_DEPEND} + ~dev-db/virtuoso-odbc-${PV}:${SLOT} +" + +VOS_EXTRACT=" + libsrc/Dk + libsrc/Thread + libsrc/Tidy + libsrc/Wi + libsrc/Xml.new + libsrc/langfunc + libsrc/odbcsdk + libsrc/plugin + libsrc/util + binsrc/virtuoso + binsrc/tests +" + +DOCS=( AUTHORS ChangeLog CREDITS INSTALL NEWS README ) + +PATCHES=( + "${FILESDIR}/${PN}-6.1.4-unbundle-minizip.patch" +) + +src_prepare() { + sed -e '/^lib_LTLIBRARIES\s*=.*/s/lib_/noinst_/' -i binsrc/virtuoso/Makefile.am \ + || die "failed to disable installation of static lib" + + virtuoso_src_prepare +} + +src_configure() { + myconf+=" + $(use_enable kerberos krb) + $(use_enable ldap openldap) + $(use_with readline) + --disable-static + --disable-hslookup + --disable-rendezvous + --without-iodbc + --program-transform-name="s/isql/isql-v/" + " + + virtuoso_src_configure +} + +src_install() { + default_src_install + + keepdir /var/lib/virtuoso/db +} diff --git a/dev-db/vsqlite++/Manifest b/dev-db/vsqlite++/Manifest new file mode 100644 index 000000000000..db7a5164dcbc --- /dev/null +++ b/dev-db/vsqlite++/Manifest @@ -0,0 +1,2 @@ +DIST vsqlite++-0.3.12.tar.gz 23720 SHA256 655d53abe7b21b024111565cf9da8ccaa90540e5ff36d7d227c2eaa22305e925 SHA512 5e134de01a3f2c8adab40ae4f598b5c3b095b7503bf1bcc1aae012d3b087ff68b7cd1fc4dbea74b8cfeac82e9a18428efccea3c1e5a229c2aec05f8228c28344 WHIRLPOOL 66c1252ecc2d05ad2a3690141efe4dace892a839b8b649cbf7b96e55de30bc5d384bd22394d94ca112b0f26380baf6b5db0a6c94d469b9cc5777986e9ae61842 +DIST vsqlite++-0.3.13.tar.gz 28195 SHA256 73dea3c0b4b7769254da17182efbf9fc16893c50ed0d544abfdde127b69467d5 SHA512 70fcd16348e3b2a0854b1d496c68fda7e354068aefbd6a5ad21d7a42afebd2bd746f604240475acfeebe00898ab156f9dfd687346fdf5c77d775262db3a5666e WHIRLPOOL 02d79a14dabbc7a2191f40370d94071c95c4dcb72f4eb6ba68b38872296a92473ddfd06a702bb6862fa2a5eac9ac921dd93e3312615bc587b319cf7a64ee5427 diff --git a/dev-db/vsqlite++/metadata.xml b/dev-db/vsqlite++/metadata.xml new file mode 100644 index 000000000000..39b2fc42c4fe --- /dev/null +++ b/dev-db/vsqlite++/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>graaff@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="github">vinzenz/vsqlite--</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/vsqlite++/vsqlite++-0.3.12.ebuild b/dev-db/vsqlite++/vsqlite++-0.3.12.ebuild new file mode 100644 index 000000000000..0c1d4099c041 --- /dev/null +++ b/dev-db/vsqlite++/vsqlite++-0.3.12.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +AUTOTOOLS_IN_SOURCE_BUILD=1 +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="VSQLite++ - A welldesigned and portable SQLite3 Wrapper for C++" +HOMEPAGE="http://evilissimo.fedorapeople.org/releases/vsqlite--/" +SRC_URI="https://github.com/vinzenz/vsqlite--/archive/${PV}.tar.gz -> ${P}.tar.gz" +IUSE="static-libs" + +LICENSE="BSD" + +SLOT="0" + +KEYWORDS="amd64 ppc x86" + +DEPEND=">=dev-libs/boost-1.33.1" + +RDEPEND="${DEPEND} + dev-db/sqlite:3" + +DOCS=(AUTHORS COPYING ChangeLog INSTALL NEWS README TODO VERSION) + +# package name is vsqlite++, but github / homepage name is vsqlite-- +S="${WORKDIR}/vsqlite---${PV}" + +src_prepare() { + ## remove O3 in AM_CXXFLAGS + sed -i -e 's/-O3//' Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + econf $(use_enable static-libs static) +} diff --git a/dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild b/dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild new file mode 100644 index 000000000000..3d4d05d1ef32 --- /dev/null +++ b/dev-db/vsqlite++/vsqlite++-0.3.13-r1.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +AUTOTOOLS_IN_SOURCE_BUILD=1 +AUTOTOOLS_AUTORECONF=1 + +inherit autotools-utils + +DESCRIPTION="VSQLite++ - A welldesigned and portable SQLite3 Wrapper for C++" +HOMEPAGE="http://evilissimo.fedorapeople.org/releases/vsqlite--/" +SRC_URI="https://github.com/vinzenz/vsqlite--/archive/${PV}.tar.gz -> ${P}.tar.gz" +IUSE="static-libs" + +LICENSE="BSD" + +SLOT="0" + +KEYWORDS="amd64 ~ppc x86" + +DEPEND=">=dev-libs/boost-1.33.1" + +RDEPEND="${DEPEND} + dev-db/sqlite:3" + +DOCS=(AUTHORS COPYING ChangeLog INSTALL NEWS README.md TODO VERSION) + +# package name is vsqlite++, but github / homepage name is vsqlite-- +S="${WORKDIR}/vsqlite---${PV}" + +src_prepare() { + ## remove O3 in AM_CXXFLAGS + sed -i -e 's/-O3//' Makefile.am || die + autotools-utils_src_prepare +} + +src_configure() { + econf $(use_enable static-libs static) +} diff --git a/dev-db/wxsqlite3/Manifest b/dev-db/wxsqlite3/Manifest new file mode 100644 index 000000000000..c971129d0f62 --- /dev/null +++ b/dev-db/wxsqlite3/Manifest @@ -0,0 +1 @@ +DIST wxsqlite3-3.0.6.1.tar.gz 2707120 SHA256 c1d828782c72b86733ddfc8c1591040db8cb3c814871816374a7989727290996 SHA512 b7f496f7a9f8bbb9aa32049689efba9cc32dae868f56f26837c2dcb4546c88a488955c6d71776b4f9996090680d92e23834d6757ccd77e9507a55dc7e60e2f04 WHIRLPOOL b459c75929f209a17ca0cc757afe2ed2e4404c9654bd8db6c8fb61571746b6ce20c1623d4c8698569c9a35fd11ed77635e2a408c31701324fa09b84585660412 diff --git a/dev-db/wxsqlite3/files/wxsqlite3-3.0.6.1.pc.in b/dev-db/wxsqlite3/files/wxsqlite3-3.0.6.1.pc.in new file mode 100644 index 000000000000..fe30b1f5d467 --- /dev/null +++ b/dev-db/wxsqlite3/files/wxsqlite3-3.0.6.1.pc.in @@ -0,0 +1,14 @@ +# Package Information for pkg-config + +prefix=/usr +wxver=@WXVERSION@ +includedir=${prefix}/include/wx-${wxver}/ +libdir=${prefix}/@LIBDIR@ + +Name: wxsqlite3-@WXVERSION@ +Description: SQLite3 C++ wrapper for use in programs based on the wxWidgets +Version: @VERSION@ +#Requires: sqlite3 +Libs: -L${libdir} -lwxcode_gtk2u@WXDEBUG@_wxsqlite3-@WXVERSION@ +Libs.private: -lpthread +Cflags: -I${includedir} diff --git a/dev-db/wxsqlite3/metadata.xml b/dev-db/wxsqlite3/metadata.xml new file mode 100644 index 000000000000..d41322c5106e --- /dev/null +++ b/dev-db/wxsqlite3/metadata.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <herd>wxwidgets</herd> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">wxcode</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/wxsqlite3/wxsqlite3-3.0.6.1-r1.ebuild b/dev-db/wxsqlite3/wxsqlite3-3.0.6.1-r1.ebuild new file mode 100644 index 000000000000..90afd06d64a8 --- /dev/null +++ b/dev-db/wxsqlite3/wxsqlite3-3.0.6.1-r1.ebuild @@ -0,0 +1,60 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +WX_GTK_VER="2.8" + +inherit eutils multilib wxwidgets + +DESCRIPTION="C++ wrapper around the public domain SQLite 3.x database" +HOMEPAGE="http://wxcode.sourceforge.net/components/wxsqlite3/" +SRC_URI="mirror://sourceforge/wxcode/${P}.tar.gz" + +LICENSE="wxWinLL-3" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug" + +DEPEND=" + x11-libs/wxGTK:2.8[X,debug=] + dev-db/sqlite:3" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${P%.1}" + +src_prepare() { + local wxdebug + + rm -rf sqlite3 || die + cp configure28 configure || die + use debug && wxdebug="d" + sed \ + -e "s:@WXDEBUG@:${wxdebug}:g" \ + -e "s:@WXVERSION@:${WX_GTK_VER}:g" \ + -e "s:@LIBDIR@:$(get_libdir):g" \ + -e "s:@VERSION@:${PV}:g" \ + "${FILESDIR}"/${P}.pc.in > ${PN}.pc || die +} + +src_configure() { + econf \ + --enable-shared \ + --enable-unicode \ + --with-wx-config="${WX_CONFIG}" \ + --with-wxshared \ + --with-sqlite3-prefix="${PREFIX}/usr" +} + +src_install() { + default + + insinto /usr/$(get_libdir)/pkgconfig + doins ${PN}.pc + + dodoc Readme.txt + dohtml -r docs/html/* + docinto samples + dodoc -r samples/* +} diff --git a/dev-db/xbase/Manifest b/dev-db/xbase/Manifest new file mode 100644 index 000000000000..5504e8308bf8 --- /dev/null +++ b/dev-db/xbase/Manifest @@ -0,0 +1 @@ +DIST xbase64-3.1.2.tar.gz 425650 SHA256 5920c453e358ef4af8408c1998805af4537d288436dd7f3c31b5561bfe3c489c SHA512 bd9e27e250ad1035aa7c692cba668b2e9cf678c398f2ee9fdb9a08374a77f3920c059edd8c72fbd172e488d6169b256526acb47b7685e3dbbecd6cbca859ce87 WHIRLPOOL 0fc8b4ff99d1c8bd044f9d62cd662cd6131f3a875ce6f0775c449c4a78fa5ec858a4f24558a1a2409ef159ae357768d67bc1ac165db7e19f0335d5a67777c82d diff --git a/dev-db/xbase/files/xbase-2.0.0-ppc.patch b/dev-db/xbase/files/xbase-2.0.0-ppc.patch new file mode 100644 index 000000000000..3b743a9fd0ae --- /dev/null +++ b/dev-db/xbase/files/xbase-2.0.0-ppc.patch @@ -0,0 +1,20 @@ +--- xbase-2.0.0/ltconfig.foo 2007-05-04 18:14:42.000000000 -0400 ++++ xbase-2.0.0/ltconfig 2007-05-04 18:15:39.000000000 -0400 +@@ -1664,16 +1664,7 @@ linux-gnu*) + shlibpath_var=LD_LIBRARY_PATH + check_shared_deplibs_method='file_magic ELF 32-bit LSB shared object' + sys_lib_search_path="/lib /usr/lib /usr/local/lib `echo $LD_LIBRARY_PATH | sed -e 's/:/ /g'`" +- +- if test -f /lib/ld.so.1; then +- dynamic_linker='GNU ld.so' +- else +- # Only the GNU ld.so supports shared libraries on MkLinux. +- case "$host_cpu" in +- powerpc*) dynamic_linker=no ;; +- *) dynamic_linker='Linux ld.so' ;; +- esac +- fi ++ dynamic_linker='GNU ld.so' + ;; + + netbsd* | openbsd*) diff --git a/dev-db/xbase/files/xbase-3.1.2-fixconfig.patch b/dev-db/xbase/files/xbase-3.1.2-fixconfig.patch new file mode 100644 index 000000000000..2bfe92f8239a --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-fixconfig.patch @@ -0,0 +1,12 @@ +diff -up xbase64-3.1.2/xbase64-config.in.BAD xbase64-3.1.2/xbase64-config.in +--- xbase64-3.1.2/xbase64-config.in.BAD 2009-08-19 22:58:42.081087534 -0400 ++++ xbase64-3.1.2/xbase64-config.in 2009-08-19 22:58:45.604090002 -0400 +@@ -5,7 +5,7 @@ exec_prefix=@exec_prefix@ + exec_prefix_set=no + CC="@CC@" + CXX="@CXX@" +-LD="@SHARED_LD@" ++LD="@LD@" + + usage="\ + Usage: xbase-config [--prefix[=DIR]] [--exec-prefix[=DIR]] [--version] [--libs] [--cflags] [--cc] [--cxx] [--ld]" diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc-version.patch b/dev-db/xbase/files/xbase-3.1.2-gcc-version.patch new file mode 100644 index 000000000000..3f0d209eec47 --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-gcc-version.patch @@ -0,0 +1,16 @@ + configure.in | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure.in b/configure.in +index 3110c70..5850231 100755 +--- a/configure.in ++++ b/configure.in +@@ -74,7 +74,7 @@ AC_SUBST(RHREL) + + # get G++ version + if test "$GXX" = "yes"; then +- GXXVER=`${CXX} -v 2>&1 | grep version | cut -d " " -f 3 -` ++ GXXVER=`${CXX} -v 2>&1 | grep " version " | cut -d " " -f 3 -` + GXXVER="gcc${GXXVER}" + else + GXXVER="" diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc44.patch b/dev-db/xbase/files/xbase-3.1.2-gcc44.patch new file mode 100644 index 000000000000..d23c9f23d08f --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-gcc44.patch @@ -0,0 +1,24 @@ +diff -up xbase64-3.1.2/xbase64/xbase64.cpp.gcc44 xbase64-3.1.2/xbase64/xbase64.cpp +--- xbase64-3.1.2/xbase64/xbase64.cpp.gcc44 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbase64.cpp 2009-08-19 23:08:14.724079392 -0400 +@@ -66,6 +66,8 @@ + #include <dos.h> + #endif + ++#include <cerrno> ++ + + /*! \file xbase64.cpp + */ +diff -up xbase64-3.1.2/xbase64/xblock.cpp.gcc44 xbase64-3.1.2/xbase64/xblock.cpp +--- xbase64-3.1.2/xbase64/xblock.cpp.gcc44 2009-08-19 23:08:59.408186578 -0400 ++++ xbase64-3.1.2/xbase64/xblock.cpp 2009-08-19 23:09:11.416184844 -0400 +@@ -65,6 +65,8 @@ + //#include <stdio.h> + //#include <stdlib.h> + ++#include <cerrno> ++ + /*! \file xblock.cpp + */ + #ifdef XB_LOCKING_ON diff --git a/dev-db/xbase/files/xbase-3.1.2-gcc47.patch b/dev-db/xbase/files/xbase-3.1.2-gcc47.patch new file mode 100644 index 000000000000..7774251ed68d --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-gcc47.patch @@ -0,0 +1,21 @@ +diff -up xbase64-3.1.2/bin/dumprecs.cpp.gcc47 xbase64-3.1.2/bin/dumprecs.cpp +--- xbase64-3.1.2/bin/dumprecs.cpp.gcc47 2012-01-05 15:36:00.377536998 -0500 ++++ xbase64-3.1.2/bin/dumprecs.cpp 2012-01-05 15:36:15.198399295 -0500 +@@ -70,7 +70,7 @@ int main(int ac,char** av) + return 1; + } + +- for(int i=1; i<ac; ++i){ ++ for(int i=1; i<ac; ++i){{ + char* filename = av[i]; + + xbDbf MyFile( &x ); +@@ -91,7 +91,7 @@ int main(int ac,char** av) + x.DisplayError( rc ); + } + MyFile.CloseDatabase(); /* close database */ +- } ++ }} + return 0; + } + diff --git a/dev-db/xbase/files/xbase-3.1.2-lesserg.patch b/dev-db/xbase/files/xbase-3.1.2-lesserg.patch new file mode 100644 index 000000000000..b6eb71e0b618 --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-lesserg.patch @@ -0,0 +1,294 @@ +diff -up xbase64-3.1.2/xbase64/xbase64.cpp.lesserg xbase64-3.1.2/xbase64/xbase64.cpp +--- xbase64-3.1.2/xbase64/xbase64.cpp.lesserg 2012-01-05 15:31:01.695312436 -0500 ++++ xbase64-3.1.2/xbase64/xbase64.cpp 2012-01-05 15:31:01.717312232 -0500 +@@ -38,7 +38,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbase64.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbase64.h.lesserg xbase64-3.1.2/xbase64/xbase64.h +--- xbase64-3.1.2/xbase64/xbase64.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbase64.h 2012-01-05 15:31:01.718312223 -0500 +@@ -42,7 +42,7 @@ + #ifndef __XB_XBASE_H__ + #define __XB_XBASE_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +@@ -60,7 +60,7 @@ + // ripped from wxWindows + + // _declspec works in BC++ 5 and later, as well as VC++ +-#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNU LesserC__) ++#if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__GNU_LesserC__) + # ifdef XBMAKINGDLL + # define XBDLLEXPORT __declspec( dllexport ) + # define XBDLLEXPORT_DATA(type) __declspec( dllexport ) type +diff -up xbase64-3.1.2/xbase64/xbcdx.h.lesserg xbase64-3.1.2/xbase64/xbcdx.h +--- xbase64-3.1.2/xbase64/xbcdx.h.lesserg 2012-01-05 15:32:17.398608985 -0500 ++++ xbase64-3.1.2/xbase64/xbcdx.h 2012-01-05 15:32:43.051370614 -0500 +@@ -50,7 +50,7 @@ struct CdxInnerNode: public CdxNode + {
+ char keys[500];
+ }
+-#ifdef __GNU LesserC__
++#ifdef __GNU_LesserC__
+ __attribute__((packed))
+ #endif
+ ;
+@@ -67,7 +67,7 @@ struct CdxLeafNode: public CdxNode + char byteCount;
+ char keys[488];
+ }
+-#ifdef __GNU LesserC__
++#ifdef __GNU_LesserC__
+ __attribute__((packed))
+ #endif
+ ;
+diff -up xbase64-3.1.2/xbase64/xbdate.cpp.lesserg xbase64-3.1.2/xbase64/xbdate.cpp +--- xbase64-3.1.2/xbase64/xbdate.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbdate.cpp 2012-01-05 15:31:01.719312213 -0500 +@@ -40,7 +40,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbdate.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbdate.h.lesserg xbase64-3.1.2/xbase64/xbdate.h +--- xbase64-3.1.2/xbase64/xbdate.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbdate.h 2012-01-05 15:31:01.721312195 -0500 +@@ -45,7 +45,7 @@ + #ifndef __XB_XBDATE_H__ + #define __XB_XBDATE_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +diff -up xbase64-3.1.2/xbase64/xbdbf.cpp.lesserg xbase64-3.1.2/xbase64/xbdbf.cpp +--- xbase64-3.1.2/xbase64/xbdbf.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbdbf.cpp 2012-01-05 15:31:01.722312185 -0500 +@@ -39,7 +39,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbdbf.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbdbf.h.lesserg xbase64-3.1.2/xbase64/xbdbf.h +--- xbase64-3.1.2/xbase64/xbdbf.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbdbf.h 2012-01-05 15:31:01.723312175 -0500 +@@ -41,7 +41,7 @@ + #ifndef __XB_DBF_H__ + #define __XB_DBF_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +diff -up xbase64-3.1.2/xbase64/xbexp.cpp.lesserg xbase64-3.1.2/xbase64/xbexp.cpp +--- xbase64-3.1.2/xbase64/xbexp.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbexp.cpp 2012-01-05 15:31:01.725312157 -0500 +@@ -38,7 +38,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbexp.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbexp.h.lesserg xbase64-3.1.2/xbase64/xbexp.h +--- xbase64-3.1.2/xbase64/xbexp.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbexp.h 2012-01-05 15:31:01.726312148 -0500 +@@ -42,7 +42,7 @@ + #ifndef __XB_EXP_H__ + #define __XB_EXP_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +diff -up xbase64-3.1.2/xbase64/xbfile.cpp.lesserg xbase64-3.1.2/xbase64/xbfile.cpp +--- xbase64-3.1.2/xbase64/xbfile.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbfile.cpp 2012-01-05 15:31:01.727312139 -0500 +@@ -39,7 +39,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbfile.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbfile.h.lesserg xbase64-3.1.2/xbase64/xbfile.h +--- xbase64-3.1.2/xbase64/xbfile.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbfile.h 2012-01-05 15:31:01.728312130 -0500 +@@ -45,7 +45,7 @@ + #ifndef __XB_FILE_H__
+ #define __XB_FILE_H__
+ +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +diff -up xbase64-3.1.2/xbase64/xbfilter.cpp.lesserg xbase64-3.1.2/xbase64/xbfilter.cpp +--- xbase64-3.1.2/xbase64/xbfilter.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbfilter.cpp 2012-01-05 15:31:01.729312120 -0500 +@@ -38,7 +38,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbfilter.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbfilter.h.lesserg xbase64-3.1.2/xbase64/xbfilter.h +--- xbase64-3.1.2/xbase64/xbfilter.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbfilter.h 2012-01-05 15:31:01.731312101 -0500 +@@ -44,7 +44,7 @@ + #ifndef __XB_FILTER_H__ + #define __XB_FILTER_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +diff -up xbase64-3.1.2/xbase64/xbindex.cpp.lesserg xbase64-3.1.2/xbase64/xbindex.cpp +--- xbase64-3.1.2/xbase64/xbindex.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbindex.cpp 2012-01-05 15:31:01.732312092 -0500 +@@ -37,7 +37,7 @@ + USA + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbindex.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbindex.h.lesserg xbase64-3.1.2/xbase64/xbindex.h +--- xbase64-3.1.2/xbase64/xbindex.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbindex.h 2012-01-05 15:31:01.733312083 -0500 +@@ -43,7 +43,7 @@ + #ifndef __XB_INDEX_H__
+ #define __XB_INDEX_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xblock.cpp.lesserg xbase64-3.1.2/xbase64/xblock.cpp +--- xbase64-3.1.2/xbase64/xblock.cpp.lesserg 2012-01-05 15:31:01.696312427 -0500 ++++ xbase64-3.1.2/xbase64/xblock.cpp 2012-01-05 15:31:01.734312074 -0500 +@@ -42,7 +42,7 @@ + USA + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xblock.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xblock.h.lesserg xbase64-3.1.2/xbase64/xblock.h +--- xbase64-3.1.2/xbase64/xblock.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xblock.h 2012-01-05 15:31:01.735312065 -0500 +@@ -44,7 +44,7 @@ + #ifndef __XB_XBLOCK_H__ + #define __XB_XBLOCK_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + +diff -up xbase64-3.1.2/xbase64/xbndx.cpp.lesserg xbase64-3.1.2/xbase64/xbndx.cpp +--- xbase64-3.1.2/xbase64/xbndx.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbndx.cpp 2012-01-05 15:31:01.737312045 -0500 +@@ -36,7 +36,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbndx.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbndx.h.lesserg xbase64-3.1.2/xbase64/xbndx.h +--- xbase64-3.1.2/xbase64/xbndx.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbndx.h 2012-01-05 15:31:01.738312036 -0500 +@@ -41,7 +41,7 @@ + #ifndef __XB_NDX_H__
+ #define __XB_NDX_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbntx.cpp.lesserg xbase64-3.1.2/xbase64/xbntx.cpp +--- xbase64-3.1.2/xbase64/xbntx.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbntx.cpp 2012-01-05 15:31:01.740312018 -0500 +@@ -40,7 +40,7 @@ + USA + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbntx.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbntx.h.lesserg xbase64-3.1.2/xbase64/xbntx.h +--- xbase64-3.1.2/xbase64/xbntx.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbntx.h 2012-01-05 15:31:01.741312009 -0500 +@@ -42,7 +42,7 @@ + #ifndef __XB_NTX_H__
+ #define __XB_NTX_H__
+
+-#ifdef __GNU LesserG__
++#ifdef __GNU_LesserG__
+ #pragma interface
+ #endif
+
+diff -up xbase64-3.1.2/xbase64/xbstring.cpp.lesserg xbase64-3.1.2/xbase64/xbstring.cpp +--- xbase64-3.1.2/xbase64/xbstring.cpp.lesserg 2006-07-17 12:54:42.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbstring.cpp 2012-01-05 15:31:01.742312000 -0500 +@@ -38,7 +38,7 @@ + + */ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma implementation "xbstring.h" + #endif + +diff -up xbase64-3.1.2/xbase64/xbstring.h.lesserg xbase64-3.1.2/xbase64/xbstring.h +--- xbase64-3.1.2/xbase64/xbstring.h.lesserg 2006-07-17 12:54:50.000000000 -0400 ++++ xbase64-3.1.2/xbase64/xbstring.h 2012-01-05 15:31:01.743311990 -0500 +@@ -41,7 +41,7 @@ + #ifndef __XBSTRING_H__ + #define __XBSTRING_H__ + +-#ifdef __GNU LesserG__ ++#ifdef __GNU_LesserG__ + #pragma interface + #endif + diff --git a/dev-db/xbase/files/xbase-3.1.2-outofsource.patch b/dev-db/xbase/files/xbase-3.1.2-outofsource.patch new file mode 100644 index 000000000000..87094a8b429a --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-outofsource.patch @@ -0,0 +1,52 @@ + bin/Makefile.am | 2 +- + examples/Makefile.am | 2 +- + libtest/Makefile.am | 2 +- + xbase64/Makefile.am | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/bin/Makefile.am b/bin/Makefile.am +index 43c8333..ca49ca1 100755 +--- a/bin/Makefile.am ++++ b/bin/Makefile.am +@@ -1,5 +1,5 @@ + +-INCLUDES= -I$(topdir) ++INCLUDES= -I$(top_srcdir) + LDADD = -L$(topdir)/xbase64 -lxbase64 + + INSTALL_PROGRAM = @INSTALL@ +diff --git a/examples/Makefile.am b/examples/Makefile.am +index 248b1ec..85adbf3 100755 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -1,5 +1,5 @@ + +-INCLUDES= -I$(topdir) $(all_includes) ++INCLUDES= -I$(top_srcdir) $(all_includes) + LDADD = -L$(topdir)/xbase64 -lxbase64 + + # for shadow passwords override the value +diff --git a/libtest/Makefile.am b/libtest/Makefile.am +index 9e84830..1b73af1 100755 +--- a/libtest/Makefile.am ++++ b/libtest/Makefile.am +@@ -1,5 +1,5 @@ + +-INCLUDES= -I$(topdir) ++INCLUDES= -I$(top_srcdir) + LDADD = -L$(topdir)/xbase64 -lxbase64 + + INSTALL_PROGRAM = @INSTALL@ +diff --git a/xbase64/Makefile.am b/xbase64/Makefile.am +index b0dff24..857aa82 100755 +--- a/xbase64/Makefile.am ++++ b/xbase64/Makefile.am +@@ -25,7 +25,7 @@ + # + # + +-INCLUDES = -I$(topdir) ++INCLUDES = -I$(top_srcdir) + + lib_LTLIBRARIES = libxbase64.la + diff --git a/dev-db/xbase/files/xbase-3.1.2-xbnode.patch b/dev-db/xbase/files/xbase-3.1.2-xbnode.patch new file mode 100644 index 000000000000..98488453cc84 --- /dev/null +++ b/dev-db/xbase/files/xbase-3.1.2-xbnode.patch @@ -0,0 +1,9 @@ +diff -up xbase64-3.1.2/xbase64/xbnode.cpp.BAD xbase64-3.1.2/xbase64/xbnode.cpp +--- xbase64-3.1.2/xbase64/xbnode.cpp.BAD 2009-08-19 23:10:38.444059289 -0400 ++++ xbase64-3.1.2/xbase64/xbnode.cpp 2009-08-19 23:10:47.348202984 -0400 +@@ -1,4 +1,4 @@ +-#include "xbNode.h"
++#include "xbnode.h"
+
+ void xbNodeLink::AddNode(xbNodeLink* node)
+ {
diff --git a/dev-db/xbase/metadata.xml b/dev-db/xbase/metadata.xml new file mode 100644 index 000000000000..e27df148eb1a --- /dev/null +++ b/dev-db/xbase/metadata.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> + <upstream> + <remote-id type="sourceforge">xdb</remote-id> + </upstream> +</pkgmetadata> diff --git a/dev-db/xbase/xbase-3.1.2.ebuild b/dev-db/xbase/xbase-3.1.2.ebuild new file mode 100644 index 000000000000..2e4e44069934 --- /dev/null +++ b/dev-db/xbase/xbase-3.1.2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 +AUTOTOOLS_AUTORECONF=no +inherit autotools-utils + +DESCRIPTION="xbase (i.e. dBase, FoxPro, etc.) compatible C++ class library" +HOMEPAGE="http://linux.techass.com/projects/xdb/" +SRC_URI="mirror://sourceforge/xdb/${PN}64-${PV}.tar.gz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ~arm hppa ppc ppc64 x86 ~x86-fbsd" +IUSE="doc static-libs" + +S="${WORKDIR}"/${PN}64-${PV} + +PATCHES=( + "${FILESDIR}"/${P}-fixconfig.patch + "${FILESDIR}"/${P}-gcc44.patch + "${FILESDIR}"/${PN}-2.0.0-ppc.patch + "${FILESDIR}"/${P}-xbnode.patch + "${FILESDIR}"/${P}-lesserg.patch + "${FILESDIR}"/${P}-outofsource.patch + "${FILESDIR}"/${P}-gcc47.patch + "${FILESDIR}"/${P}-gcc-version.patch +) + +src_install() { + autotools-utils_src_install + # media-tv/linuxtv-dvb-apps collision, bug #208596 + mv "${ED}/usr/bin/zap" "${ED}/usr/bin/${PN}-zap" || die + + if use doc; then + dohtml html/* + insinto /usr/share/doc/${PF}/examples + doins examples/* + fi +} diff --git a/dev-db/xbsql/Manifest b/dev-db/xbsql/Manifest new file mode 100644 index 000000000000..ca5e10a0fc9d --- /dev/null +++ b/dev-db/xbsql/Manifest @@ -0,0 +1 @@ +DIST xbsql-0.11.tgz 307392 SHA256 c91836a4c3f138b6e211d4427dce840cd6b30853f0dffaa3bc36d05f8751606a SHA512 caf8a6d8191f7de860008e5ac2628e388097b05999887ec52b91684f6577dd3152dfa164b71a37d84ef70f43ab868dd02b30bc76c88208d4daa85d8e111ea3a4 WHIRLPOOL 0aecbb9725a2bccac9941eebb160d4dc15f8373e22641ed7a6b75c27955cf61b1ec62f59c3c496a3faa3f1ff7887a2658c08149da6cf1cc59214489ed3510919 diff --git a/dev-db/xbsql/files/xbsql-0.11-autotools.patch b/dev-db/xbsql/files/xbsql-0.11-autotools.patch new file mode 100644 index 000000000000..b1e72562b397 --- /dev/null +++ b/dev-db/xbsql/files/xbsql-0.11-autotools.patch @@ -0,0 +1,18 @@ + xbsql/Makefile.am | 7 +------ + 1 files changed, 1 insertions(+), 6 deletions(-) + +diff --git a/xbsql/Makefile.am b/xbsql/Makefile.am +index c281358..5a09198 100644 +--- a/xbsql/Makefile.am ++++ b/xbsql/Makefile.am +@@ -1,9 +1,4 @@ +-DEBUG = -g +-CC = g++ +-CFLAGS = -UNO_READLINE -I/usr/local/include $(DEBUG) +-CXXFLAGS = -UNO_READLINE -I/usr/local/include $(DEBUG) +-LDFLAGS = $(DEBUG) +-INCLUDE = -I/usr/local/include ++CC = $(CXX) + + lib_LTLIBRARIES = libxbsql.la + bin_PROGRAMS = xql diff --git a/dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch b/dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch new file mode 100644 index 000000000000..1615fb4d4389 --- /dev/null +++ b/dev-db/xbsql/files/xbsql-0.11-bfr-overflow.patch @@ -0,0 +1,79 @@ + xbsql/xb_fieldset.cpp | 6 +++--- + xbsql/xbsql.cpp | 20 ++++++++++---------- + 2 files changed, 13 insertions(+), 13 deletions(-) + +diff --git a/xbsql/xb_fieldset.cpp b/xbsql/xb_fieldset.cpp +index ea9e726..f922ed3 100644 +--- a/xbsql/xb_fieldset.cpp ++++ b/xbsql/xb_fieldset.cpp +@@ -58,10 +58,10 @@ XBSQL::Index + if ((fldno < 0) || (fldno >= fieldSet.getNumFields())) + return XBSQL::IndexNone ; + +- char buff[255] ; +- strncpy (buff, tabname, sizeof(buff)) ; ++ char buff[256] ; ++ strncpy (buff, tabname, sizeof(buff) - 1) ; + strncat (buff, "_", sizeof(buff)) ; +- strncat (buff, getFieldName(fldno), sizeof(buff)) ; ++ strncat (buff, getFieldName(fldno), sizeof(buff) - strlen(tabname) - 1) ; + + const char *path = xbase->getPath (buff, "ndx") ; + int fd = open (path, O_RDONLY) ; +diff --git a/xbsql/xbsql.cpp b/xbsql/xbsql.cpp +index 9d07f88..96304c4 100644 +--- a/xbsql/xbsql.cpp ++++ b/xbsql/xbsql.cpp +@@ -376,9 +376,9 @@ bool XBaseSQL::createTable + char name [256] ; + xbNdx ndxFile (&dbfFile) ; + +- strncpy (name, table, sizeof(name)) ; ++ strncpy (name, table, sizeof(name) - 1) ; + strncat (name, "_", sizeof(name)) ; +- strncat (name, schema[idx].FieldName, sizeof(name)) ; ++ strncat (name, schema[idx].FieldName, sizeof(name) - strlen(table) - 1) ; + + path = getPath (name, "ndx") ; + idxflag = index[idx] == XBSQL::IndexUnique ? +@@ -467,9 +467,9 @@ XBSQLTable *XBaseSQL::openTable + { + char name[256] ; + +- strncpy (name, table, sizeof(name)) ; ++ strncpy (name, table, sizeof(name) - 1) ; + strncat (name, "_", sizeof(name)) ; +- strncat (name, fSet.getFieldName (idx), sizeof(name)) ; ++ strncat (name, fSet.getFieldName (idx), sizeof(name) - strlen(table) - 1) ; + + path = getPath (name, "ndx") ; + #ifndef _WIN32 +@@ -873,12 +873,12 @@ bool XBaseSQL::renameTable + char _newName[256] ; + const char *fname = fSet.getFieldName (idx) ; + +- strncpy (_oldName, oldName, sizeof(_oldName)) ; ++ strncpy (_oldName, oldName, sizeof(_oldName) - 1) ; + strncat (_oldName, "_", sizeof(_oldName)) ; +- strncat (_oldName, fname, sizeof(_oldName)) ; +- strncpy (_newName, newName, sizeof(_newName)) ; ++ strncat (_oldName, fname, sizeof(_oldName) - strlen(oldName) - 1) ; ++ strncpy (_newName, newName, sizeof(_newName) - 1) ; + strncat (_newName, "_", sizeof(_newName)) ; +- strncat (_newName, fname, sizeof(_newName)) ; ++ strncat (_newName, fname, sizeof(_newName) - strlen(newName) - 1) ; + + oldAnon = getPath (_oldName, "ndx") ; + newAnon = getPath (_newName, "ndx") ; +@@ -956,9 +956,9 @@ bool XBaseSQL::dropTable + char _idxName[256] ; + const char *fname = fSet.getFieldName (idx) ; + +- strncpy (_idxName, table, sizeof(_idxName)) ; ++ strncpy (_idxName, table, sizeof(_idxName) - 1) ; + strncat (_idxName, "_", sizeof(_idxName)) ; +- strncat (_idxName, fname, sizeof(_idxName)) ; ++ strncat (_idxName, fname, sizeof(_idxName) - strlen(table) - 1) ; + + tabAnon = getPath (_idxName, "ndx") ; + diff --git a/dev-db/xbsql/files/xbsql-0.11-ncurses64.patch b/dev-db/xbsql/files/xbsql-0.11-ncurses64.patch new file mode 100644 index 000000000000..4c04d2736b0b --- /dev/null +++ b/dev-db/xbsql/files/xbsql-0.11-ncurses64.patch @@ -0,0 +1,19 @@ +--- xbsql-0.11/configure.BAD 2005-08-18 10:34:49.000000000 -0500 ++++ xbsql-0.11/configure 2005-08-18 10:36:22.000000000 -0500 +@@ -6977,10 +6977,15 @@ + if test -f /usr/lib/libncurses.so + then + curses=ncurses +- ++ elif test -f /usr/lib64/libncurses.so ++ then ++ curses=ncurses + elif test -f /usr/lib/libcurses.so + then + curses=curses ++ elif test -f /usr/lib64/libcurses.so ++ then ++ curses=curses + else + { { echo "$as_me:6985: error: No (n)curses installation" >&5 + echo "$as_me: error: No (n)curses installation" >&2;} diff --git a/dev-db/xbsql/files/xbsql-0.11-xbase64.patch b/dev-db/xbsql/files/xbsql-0.11-xbase64.patch new file mode 100644 index 000000000000..6d51cbaf06fc --- /dev/null +++ b/dev-db/xbsql/files/xbsql-0.11-xbase64.patch @@ -0,0 +1,66 @@ +diff -up xbsql-0.11/xbsql/Makefile.am.BAD xbsql-0.11/xbsql/Makefile.am +--- xbsql-0.11/xbsql/Makefile.am.BAD 2009-08-19 23:32:27.481185284 -0400 ++++ xbsql-0.11/xbsql/Makefile.am 2009-08-19 23:32:47.157206308 -0400 +@@ -17,10 +17,10 @@ libxbsql_la_SOURCES = xb_value.cpp xb_el + xb_assignlist.cpp xb_create.cpp \ + xbsql.tab.c xb_datetime.cpp + +-libxbsql_la_LDFLAGS = -lxbase $(DEBUG) ++libxbsql_la_LIBADD = -lxbase64 + + xql_SOURCES = xql.cpp +-xql_LDADD = -lxbase -lreadline -l$(CURSES) ./libxbsql.la ++xql_LDADD = -lxbase64 -lreadline -l$(CURSES) ./libxbsql.la + + # + # +diff -up xbsql-0.11/xbsql/Makefile.in.BAD xbsql-0.11/xbsql/Makefile.in +--- xbsql-0.11/xbsql/Makefile.in.BAD 2009-08-19 23:32:54.384058775 -0400 ++++ xbsql-0.11/xbsql/Makefile.in 2009-08-19 23:33:03.928059382 -0400 +@@ -108,10 +108,10 @@ libxbsql_la_SOURCES = xb_value.cpp xb_el + xbsql.tab.c xb_datetime.cpp + + +-libxbsql_la_LDFLAGS = -lxbase $(DEBUG) ++libxbsql_la_LIBADD = -lxbase64 + + xql_SOURCES = xql.cpp +-xql_LDADD = -lxbase -lreadline -l$(CURSES) ./libxbsql.la ++xql_LDADD = -lxbase64 -lreadline -l$(CURSES) ./libxbsql.la + + + #install-data-hook: +diff -up xbsql-0.11/xbsql/xbsql.cpp.BAD xbsql-0.11/xbsql/xbsql.cpp +--- xbsql-0.11/xbsql/xbsql.cpp.BAD 2009-08-19 23:34:23.880063863 -0400 ++++ xbsql-0.11/xbsql/xbsql.cpp 2009-08-19 23:34:47.393184432 -0400 +@@ -207,7 +207,7 @@ void XBaseSQL::setError + break ; + + default : +- e = xbStrError (rc) ; ++ e = GetErrorMessage (rc) ; + break ; + } + +@@ -230,7 +230,7 @@ void XBaseSQL::setError + char t[1024] ; + va_list aptr ; + +- strcpy (t, xbStrError (rc)) ; ++ strcpy (t, GetErrorMessage (rc)) ; + strcat (t, ": ") ; + int l = strlen(t) ; + +diff -up xbsql-0.11/xbsql/xbsql.h.BAD xbsql-0.11/xbsql/xbsql.h +--- xbsql-0.11/xbsql/xbsql.h.BAD 2009-08-19 23:35:45.087088919 -0400 ++++ xbsql-0.11/xbsql/xbsql.h 2009-08-19 23:34:06.949184421 -0400 +@@ -43,8 +43,7 @@ XBSQL_API int strncasecmp (const char *s + + #endif + +-#include <xbase/xbase.h> +-#include <xbase/xbexcept.h> ++#include <xbase64/xbase64.h> + + class XBaseSQL ; + class XBSQLTable ; diff --git a/dev-db/xbsql/metadata.xml b/dev-db/xbsql/metadata.xml new file mode 100644 index 000000000000..91f4e72fb544 --- /dev/null +++ b/dev-db/xbsql/metadata.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>maintainer-needed@gentoo.org</email> + </maintainer> +</pkgmetadata> diff --git a/dev-db/xbsql/xbsql-0.11-r2.ebuild b/dev-db/xbsql/xbsql-0.11-r2.ebuild new file mode 100644 index 000000000000..5e32efb849d5 --- /dev/null +++ b/dev-db/xbsql/xbsql-0.11-r2.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +AUTOTOOLS_AUTORECONF=yes + +inherit autotools-utils + +DESCRIPTION="An SQL Wrapper for the XBase library" +HOMEPAGE="http://www.rekallrevealed.org/" +SRC_URI="http://www.rekallrevealed.org/packages/${P}.tgz" + +SLOT="0" +LICENSE="GPL-2" +KEYWORDS="amd64 ppc x86" +IUSE="doc static-libs" + +RDEPEND=" + >=dev-db/xbase-3.1.2 + sys-libs/readline" +DEPEND="${RDEPEND} + sys-devel/automake + sys-devel/libtool" + +PATCHES=( + "${FILESDIR}"/${P}-ncurses64.patch + "${FILESDIR}"/${P}-xbase64.patch + "${FILESDIR}"/${P}-autotools.patch + "${FILESDIR}"/${P}-bfr-overflow.patch +) + +DOCS=( AUTHORS Announce ChangeLog INSTALL README TODO ) + +AUTOTOOLS_IN_SOURCE_BUILD=1 + +src_install() { + autotools-utils_src_install + use doc && dohtml doc/* +} diff --git a/dev-db/xtrabackup-bin/Manifest b/dev-db/xtrabackup-bin/Manifest new file mode 100644 index 000000000000..8a16ff0a9e76 --- /dev/null +++ b/dev-db/xtrabackup-bin/Manifest @@ -0,0 +1,6 @@ +DIST percona-xtrabackup-2.1.9-x86_32.tar.gz 48553967 SHA256 5cff7d0b8ca81a15f4084cf733c3e4ffb1856fbf9306628a493dfc4fa13ca62b SHA512 1095fd84cb8361d8afecf713572ccb7fa792a204474951951bb6e5f526ce3b62ce835020f1ca40cd20290fe4db5b0039bfdcc97d2970f7422fd31293cee0ebd6 WHIRLPOOL 13919d1d7d7b0c80168446d24450b6d41764b09fbed136b0cd1d9493a0392150dddae72cca01262403cbfe0c848efd579acbf509c40715abee2289ea2d00ebc7 +DIST percona-xtrabackup-2.1.9-x86_64.tar.gz 49557534 SHA256 a4821d324bcd6e40db9f8288d8f681efb1ce53e9fd4797e8a862a599d7b6c570 SHA512 93b13414d67d23af1cacbd58033001cec4e7e097d231cd8e665814cfea5e9414e25a98d29738ef0dde72218c7aeb4cd0cb112bcc68f6a70fcc247dc91a80f486 WHIRLPOOL ea9d696da8c4aa30fa73f052f4004b7451ae310c2654ecf5767f82a87d403c9727a7a9260a2ad3cb7d003916366fa041d9a0d69cd669fe98f7d7f867c313a2fb +DIST percona-xtrabackup-2.2.3-4982-Linux-i686.tar.gz 23872530 SHA256 435586fe3078dc363e0628ee5354ce0837ca282ee4f4a51b9e8417729392e027 SHA512 ee8f1bb18e80e7fe053c73279acc94fbc03856f9593a6daeca398f24a6dc5e4f1af3e30d37101f6bfaef9c45a42ee59dd311739aea5605e5704b5c207eaad67e WHIRLPOOL 2562ac17f851c92ff9a5303b2823bd21aa5148162282a0904945239cdd8bc1b1428d3e3882da8726cccec429db2c4c033536b8d323177c74750c63dd4911e17f +DIST percona-xtrabackup-2.2.3-4982-Linux-x86_64.tar.gz 24266588 SHA256 00c7efb4c2b8a14bd635eae9ae2b8310db11bab7cc34c051bae85d7f7af9919b SHA512 9a2f52ff2b167523714970d71279a9f929e126dcb7257f238e4c41a546e14c9088c4d1839e30714500e5c781d8b41ccf43750d253422a1e4d8b16ec8efbf08fb WHIRLPOOL 9e3e3d57920dd1d895c15d4cb2cece69f276ec07cc57fb09c89bd0d511ba9958bb55397adad15f0026e4535322034eb8bf38983f86342e2a56e33794d652eba2 +DIST percona-xtrabackup-2.2.5-5027-Linux-i686.tar.gz 24942813 SHA256 b904bb8d7bc48b48aaadf1af8a21df9987198f36c23c576e2a2090c9e06eb55a SHA512 16ca7739e43b65f22ac5ab9cc9e0e701d4b0ecbe179ebac70719902000a36cb37de87446b9a2830813fe2714ffdfa7bccb938961951c01804d8e2ec98f6d7c10 WHIRLPOOL 3d565e29ddaf9f21d3c0e85d49f2ba8379ab1c07961561853abdc197bbf3c4c7aa067e9e0da3d5de96569b41834282e2954a02e4d8169ed0030606c3f4169e6c +DIST percona-xtrabackup-2.2.5-5027-Linux-x86_64.tar.gz 25313698 SHA256 90b5ca03e872581e95aa3e24972212940417d3c64879b28bc37a848f89bba7e9 SHA512 54576cecd24797730ab0b262558424e2716135de88ccc80dfb7716adfcf404fdb2ac2ceec99b436eb1e31392fffdf5eba122e15070cc0f10906aaf5617bada85 WHIRLPOOL 655143c2a75db8a38b9f97a657c3c199bf1054552a5b638ff8c27d3ad76b1d67b1504628077577664711010c8085b3185a754507c0f330e5603e94ebccbf25d2 diff --git a/dev-db/xtrabackup-bin/files/xtrabackup-bin-2.1.7-no-versioncheck.patch b/dev-db/xtrabackup-bin/files/xtrabackup-bin-2.1.7-no-versioncheck.patch new file mode 100644 index 000000000000..5460e439fdf3 --- /dev/null +++ b/dev-db/xtrabackup-bin/files/xtrabackup-bin-2.1.7-no-versioncheck.patch @@ -0,0 +1,13 @@ +diff --git a/bin/innobackupex b/bin/innobackupex +index 1df8d91..9729b6c 100755 +--- a/bin/innobackupex ++++ b/bin/innobackupex +@@ -142,7 +142,7 @@ my $option_rebuild_threads = 0; + + my $option_debug_sleep_before_unlock = ''; + +-my $option_version_check = '1'; ++my $option_version_check = '0'; + + my $option_force_non_empty_dirs = ''; + diff --git a/dev-db/xtrabackup-bin/metadata.xml b/dev-db/xtrabackup-bin/metadata.xml new file mode 100644 index 000000000000..b71a8a2e034d --- /dev/null +++ b/dev-db/xtrabackup-bin/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> + <email>idl0r@gentoo.org</email> + <name>Christian Ruppert</name> + </maintainer> +</pkgmetadata> diff --git a/dev-db/xtrabackup-bin/xtrabackup-bin-2.1.9.ebuild b/dev-db/xtrabackup-bin/xtrabackup-bin-2.1.9.ebuild new file mode 100644 index 000000000000..555e2aa3cdf0 --- /dev/null +++ b/dev-db/xtrabackup-bin/xtrabackup-bin-2.1.9.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN="percona-${PN/-bin}" +MY_PVR="${PV}-744" +MY_P="${MY_PN}-${PV}" +MY_PF="${MY_PN}-${MY_PVR}" + +inherit eutils + +DESCRIPTION="MySQL hot backup software that performs non-blocking backups for +InnoDB and XtraDB databases" +HOMEPAGE="http://www.percona.com/software/percona-xtrabackup" +SRC_URI=" + amd64? ( + http://www.percona.com/downloads/XtraBackup/XtraBackup-${PV}/binary/Linux/x86_64/${MY_PF}-Linux-x86_64.tar.gz -> ${MY_P}-x86_64.tar.gz + ) + x86? ( + http://www.percona.com/downloads/XtraBackup/XtraBackup-${PV}/binary/Linux/i686/${MY_PF}-Linux-i686.tar.gz -> ${MY_P}-x86_32.tar.gz + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="dev-libs/libaio + || ( dev-libs/libgcrypt:0/11 dev-libs/libgcrypt:11/11 ) + dev-libs/libgpg-error + dev-perl/DBD-mysql" + +if use amd64; then + S="${WORKDIR}/${MY_P}-Linux-x86_64" +elif use x86; then + S="${WORKDIR}/${MY_P}-Linux-i686" +fi + +src_prepare() { + # bug 501904 - CVE-2014-2029 + epatch "${FILESDIR}/${PN}-2.1.7-no-versioncheck.patch" +} + +src_install() { + for bin in innobackupex xbcrypt xbstream xtrabackup xtrabackup_55 xtrabackup_56; do + dobin bin/${bin} + done + dosym /usr/bin/innobackupex /usr/bin/innobackupex-1.5.1 +} + +pkg_postinst() { + einfo "xtrabackup 2.1.x is for MySQL/MariaDB 5.5 and 5.6 only" +} diff --git a/dev-db/xtrabackup-bin/xtrabackup-bin-2.2.3.ebuild b/dev-db/xtrabackup-bin/xtrabackup-bin-2.2.3.ebuild new file mode 100644 index 000000000000..60dae13b5e9a --- /dev/null +++ b/dev-db/xtrabackup-bin/xtrabackup-bin-2.2.3.ebuild @@ -0,0 +1,55 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN="percona-${PN/-bin}" +MY_PVR="${PV}-4982" +MY_P="${MY_PN}-${PV}" +MY_PF="${MY_PN}-${MY_PVR}" + +inherit eutils + +DESCRIPTION="MySQL hot backup software that performs non-blocking backups for +InnoDB and XtraDB databases" +HOMEPAGE="http://www.percona.com/software/percona-xtrabackup" +SRC_URI=" + amd64? ( + http://www.percona.com/downloads/XtraBackup/XtraBackup-${PV}/binary/tarball/${MY_PF}-Linux-x86_64.tar.gz + ) + x86? ( + http://www.percona.com/downloads/XtraBackup/XtraBackup-${PV}/binary/tarball/${MY_PF}-Linux-i686.tar.gz + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="" + +DEPEND="" +RDEPEND="dev-libs/libaio + || ( dev-libs/libgcrypt:0/11 dev-libs/libgcrypt:11/11 ) + dev-libs/libgpg-error + dev-perl/DBD-mysql" + +if use amd64; then + S="${WORKDIR}/${MY_P}-Linux-x86_64" +elif use x86; then + S="${WORKDIR}/${MY_P}-Linux-i686" +fi + +src_prepare() { + # bug 501904 - CVE-2014-2029 + epatch "${FILESDIR}/${PN}-2.1.7-no-versioncheck.patch" +} + +src_install() { + for bin in innobackupex xbcrypt xbstream xtrabackup; do + dobin bin/${bin} + done +} + +pkg_postinst() { + einfo "xtrabackup 2.2.x is for MySQL/MariaDB 5.6 only" +} diff --git a/dev-db/xtrabackup-bin/xtrabackup-bin-2.2.5.ebuild b/dev-db/xtrabackup-bin/xtrabackup-bin-2.2.5.ebuild new file mode 100644 index 000000000000..90b932955691 --- /dev/null +++ b/dev-db/xtrabackup-bin/xtrabackup-bin-2.2.5.ebuild @@ -0,0 +1,56 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +MY_PN="percona-${PN/-bin}" +MY_PVR="${PV}-5027" +MY_P="${MY_PN}-${PV}" +MY_PF="${MY_PN}-${MY_PVR}" + +inherit eutils + +DESCRIPTION="MySQL hot backup software that performs non-blocking backups for +InnoDB and XtraDB databases" +HOMEPAGE="http://www.percona.com/software/percona-xtrabackup" +SRC_URI=" + amd64? ( + http://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_PF}-Linux-x86_64.tar.gz + ) + x86? ( + http://www.percona.com/downloads/XtraBackup/Percona-XtraBackup-${PV}/binary/tarball/${MY_PF}-Linux-i686.tar.gz + )" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="" + +DEPEND="" +RDEPEND="dev-libs/libaio + || ( dev-libs/libgcrypt:0/11 dev-libs/libgcrypt:11/11 ) + dev-libs/libgpg-error + dev-perl/DBD-mysql + sys-libs/zlib" + +if use amd64; then + S="${WORKDIR}/${MY_P}-Linux-x86_64" +elif use x86; then + S="${WORKDIR}/${MY_P}-Linux-i686" +fi + +src_prepare() { + # bug 501904 - CVE-2014-2029 + epatch "${FILESDIR}/${PN}-2.1.7-no-versioncheck.patch" +} + +src_install() { + for bin in innobackupex xbcrypt xbstream xtrabackup; do + dobin bin/${bin} + done +} + +pkg_postinst() { + einfo "xtrabackup 2.2.x is for MySQL/MariaDB 5.6 only" +} |