diff options
| author | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
|---|---|---|
| committer | Palica <palica+gitlab@liguros.net> | 2020-06-23 22:35:08 +0200 |
| commit | ecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch) | |
| tree | b89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-ruby/pg | |
| parent | 1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff) | |
| download | baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz baldeagleos-repo-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip | |
Updating liguros repo
Diffstat (limited to 'dev-ruby/pg')
| -rw-r--r-- | dev-ruby/pg/Manifest | 2 | ||||
| -rw-r--r-- | dev-ruby/pg/files/postgresql10-tests.patch | 49 | ||||
| -rw-r--r-- | dev-ruby/pg/metadata.xml | 12 | ||||
| -rw-r--r-- | dev-ruby/pg/pg-0.21.0.ebuild | 57 | ||||
| -rw-r--r-- | dev-ruby/pg/pg-1.2.2.ebuild | 54 |
5 files changed, 174 insertions, 0 deletions
diff --git a/dev-ruby/pg/Manifest b/dev-ruby/pg/Manifest new file mode 100644 index 000000000000..57efe85aa02e --- /dev/null +++ b/dev-ruby/pg/Manifest @@ -0,0 +1,2 @@ +DIST pg-0.21.0.gem 214016 BLAKE2B 9e27646cd85bc97dedfb980f4851b19a1ef2aad17f6a5c60726c1683642af5c4cf87d518b300fb4c894e1580f808f8af6158b57f1ac25971c1fc55818abee6f4 SHA512 590a8c34487d2cf030082cfff87b2cc83b636df06a931e394acfb098ecb5728e793d777f125b036ee9953bbd21ec5facf91c932930acccb507d3394f2fc4cc5b +DIST pg-1.2.2.gem 196608 BLAKE2B 068be98d190cb4074cc89bdb5b376322f323950909f7a6fddc8669a3ff0f85eef9f512bd2ec7121707e9ea077b2b428f698e84f2118c76e34f5def75ca303fca SHA512 5c7cc90afb75a66e80cfc34c4875cf22b005aa0a27e78db6f71d1829f870c6409b73326a9925f79c0d642e93ea51d1f84c7383323fea44b7488e83deb7754951 diff --git a/dev-ruby/pg/files/postgresql10-tests.patch b/dev-ruby/pg/files/postgresql10-tests.patch new file mode 100644 index 000000000000..f9b7c1579a91 --- /dev/null +++ b/dev-ruby/pg/files/postgresql10-tests.patch @@ -0,0 +1,49 @@ +# HG changeset patch +# User Lars Kanis <kanis@comcard.de> +# Date 1508756565 -7200 +# Node ID fe63160e8a9803e257231d879fab2841ba44c37a +# Parent d6d5533dfca85b618232fe3e9e56e59dbee99de6 +Adjust tests for PostgreSQL-10 + +diff --git a/spec/helpers.rb b/spec/helpers.rb +--- a/spec/helpers.rb ++++ b/spec/helpers.rb +@@ -251,7 +251,7 @@ + + def check_for_lingering_connections( conn ) + conn.exec( "SELECT * FROM pg_stat_activity" ) do |res| +- conns = res.find_all {|row| row['pid'].to_i != conn.backend_pid } ++ conns = res.find_all {|row| row['pid'].to_i != conn.backend_pid && ["client backend", nil].include?(row["backend_type"]) } + unless conns.empty? + puts "Lingering connections remain:" + conns.each do |row| +diff --git a/spec/pg/connection_spec.rb b/spec/pg/connection_spec.rb +--- a/spec/pg/connection_spec.rb ++++ b/spec/pg/connection_spec.rb +@@ -232,7 +232,7 @@ + described_class.connect(@conninfo).finish + sleep 0.5 + res = @conn.exec(%[SELECT COUNT(*) AS n FROM pg_stat_activity +- WHERE usename IS NOT NULL]) ++ WHERE usename IS NOT NULL AND application_name != '']) + # there's still the global @conn, but should be no more + expect( res[0]['n'] ).to eq( '1' ) + end +@@ -1537,9 +1537,14 @@ + end + + it "shouldn't type map params unless requested" do +- expect{ +- @conn.exec_params( "SELECT $1", [5] ) +- }.to raise_error(PG::IndeterminateDatatype) ++ if @conn.server_version < 100000 ++ expect{ ++ @conn.exec_params( "SELECT $1", [5] ) ++ }.to raise_error(PG::IndeterminateDatatype) ++ else ++ # PostgreSQL-10 maps to TEXT type (OID 25) ++ expect( @conn.exec_params( "SELECT $1", [5] ).ftype(0)).to eq(25) ++ end + end + + it "should raise an error on invalid encoder to put_copy_data" do diff --git a/dev-ruby/pg/metadata.xml b/dev-ruby/pg/metadata.xml new file mode 100644 index 000000000000..c4da31be74e0 --- /dev/null +++ b/dev-ruby/pg/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 type="project"> + <email>ruby@gentoo.org</email> + <name>Gentoo Ruby Project</name> + </maintainer> + <upstream> + <remote-id type="bitbucket">ged/ruby-pg</remote-id> + </upstream> + <origin>gentoo-staging</origin> +</pkgmetadata> diff --git a/dev-ruby/pg/pg-0.21.0.ebuild b/dev-ruby/pg/pg-0.21.0.ebuild new file mode 100644 index 000000000000..c16d6e8292b0 --- /dev/null +++ b/dev-ruby/pg/pg-0.21.0.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2018 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 +USE_RUBY="ruby22 ruby23 ruby24 ruby25" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_RECIPE_DOC="rdoc" +RUBY_FAKEGEM_EXTRADOC="ChangeLog Contributors.rdoc README.rdoc History.rdoc" + +inherit multilib ruby-fakegem + +DESCRIPTION="Ruby extension library providing an API to PostgreSQL" +HOMEPAGE="https://bitbucket.org/ged/ruby-pg/" + +LICENSE="|| ( GPL-2 Ruby )" +SLOT="0" +KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND+=" dev-db/postgresql:*" +DEPEND+=" dev-db/postgresql + test? ( >=dev-db/postgresql-9.4[server,threads] )" + +PATCHES=( "${FILESDIR}/postgresql10-tests.patch" ) + +all_ruby_prepare() { + # hack the Rakefile to make it sure that it doesn't load + # rake-compiler (so that we don't have to depend on it and it + # actually works when building with USE=doc). + sed -i \ + -e '/Rakefile.cross/s:^:#:' \ + -e '/ExtensionTask/,/^end$/ s:^:#:' \ + Rakefile || die +} + +each_ruby_configure() { + ${RUBY} -C ext extconf.rb || die "extconf.rb failed" +} + +each_ruby_compile() { + emake V=1 -C ext CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" + cp ext/*$(get_libname) lib || die +} + +each_ruby_test() { + if [[ "${EUID}" -ne "0" ]]; then + # Make the rspec call explicit, this way we don't have to depend + # on rake-compiler (nor rubygems) _and_ we don't have to rebuild + # the whole extension from scratch. + RSPEC_VERSION=3 ruby-ng_rspec + else + ewarn "The userpriv feature must be enabled to run tests." + eerror "Testsuite will not be run." + fi +} diff --git a/dev-ruby/pg/pg-1.2.2.ebuild b/dev-ruby/pg/pg-1.2.2.ebuild new file mode 100644 index 000000000000..5d247396a6eb --- /dev/null +++ b/dev-ruby/pg/pg-1.2.2.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +USE_RUBY="ruby24 ruby25 ruby26 ruby27" + +RUBY_FAKEGEM_RECIPE_TEST="rspec3" + +RUBY_FAKEGEM_EXTRADOC="ChangeLog Contributors.rdoc README.rdoc History.rdoc" + +inherit multilib ruby-fakegem + +DESCRIPTION="Ruby extension library providing an API to PostgreSQL" +HOMEPAGE="https://bitbucket.org/ged/ruby-pg/" + +LICENSE="|| ( GPL-2 Ruby )" +SLOT="1" +KEYWORDS="amd64 ~arm ~arm64 ~hppa ppc ppc64 ~sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +IUSE="" + +RDEPEND+=" dev-db/postgresql:*" +DEPEND+=" dev-db/postgresql + test? ( >=dev-db/postgresql-9.4[server(+),threads] )" + +all_ruby_prepare() { + # hack the Rakefile to make it sure that it doesn't load + # rake-compiler (so that we don't have to depend on it and it + # actually works when building with USE=doc). + sed -i \ + -e '/Rakefile.cross/s:^:#:' \ + -e '/ExtensionTask/,/^end$/ s:^:#:' \ + Rakefile || die +} + +each_ruby_configure() { + ${RUBY} -C ext extconf.rb || die "extconf.rb failed" +} + +each_ruby_compile() { + emake V=1 -C ext CFLAGS="${CFLAGS} -fPIC" archflag="${LDFLAGS}" + cp ext/*$(get_libname) lib || die +} + +each_ruby_test() { + if [[ "${EUID}" -ne "0" ]]; then + # Make the rspec call explicit, this way we don't have to depend + # on rake-compiler (nor rubygems) _and_ we don't have to rebuild + # the whole extension from scratch. + RSPEC_VERSION=3 ruby-ng_rspec + else + ewarn "The userpriv feature must be enabled to run tests." + eerror "Testsuite will not be run." + fi +} |
