Skip to content

Commit

Permalink
databases/rubygem-pg_query: fix possible segfault
Browse files Browse the repository at this point in the history
  • Loading branch information
mfechner committed Jul 3, 2021
1 parent 4030a14 commit f599e3d
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
7 changes: 5 additions & 2 deletions databases/rubygem-pg_query/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= pg_query
PORTVERSION= 2.0.3
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= databases rubygems
MASTER_SITES= RG

Expand All @@ -15,8 +15,11 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
MY_DEPENDS= ${LOCALBASE}/lib/libpg_query.a:databases/libpg_query
BUILD_DEPENDS= ${MY_DEPENDS} \
rubygem-pathname>0:devel/rubygem-pathname
# rubygem-google-protobuf 3.17.1 is required to fix a segfault
# see PR: https://github.com/pganalyze/pg_query/pull/212
# and https://github.com/pganalyze/pg_query/pull/213
RUN_DEPENDS= ${MY_DEPENDS} \
rubygem-google-protobuf315>=3.15.5<3.16:devel/rubygem-google-protobuf315
rubygem-google-protobuf>=3.17.1:devel/rubygem-google-protobuf

USES= gem
USE_RUBY= yes
Expand Down
26 changes: 26 additions & 0 deletions databases/rubygem-pg_query/files/patch-pg__query.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--- pg_query.gemspec.orig 2021-06-20 06:58:25 UTC
+++ pg_query.gemspec
@@ -29,20 +29,20 @@ Gem::Specification.new do |s|
s.add_development_dependency(%q<rspec>.freeze, ["~> 3.0"])
s.add_development_dependency(%q<rubocop>.freeze, ["= 0.49.1"])
s.add_development_dependency(%q<rubocop-rspec>.freeze, ["= 1.15.1"])
- s.add_runtime_dependency(%q<google-protobuf>.freeze, ["~> 3.15.5"])
+ s.add_runtime_dependency(%q<google-protobuf>.freeze, [">= 3.17.1"])
else
s.add_dependency(%q<rake-compiler>.freeze, ["~> 0"])
s.add_dependency(%q<rspec>.freeze, ["~> 3.0"])
s.add_dependency(%q<rubocop>.freeze, ["= 0.49.1"])
s.add_dependency(%q<rubocop-rspec>.freeze, ["= 1.15.1"])
- s.add_dependency(%q<google-protobuf>.freeze, ["~> 3.15.5"])
+ s.add_dependency(%q<google-protobuf>.freeze, [">= 3.17.1"])
end
else
s.add_dependency(%q<rake-compiler>.freeze, ["~> 0"])
s.add_dependency(%q<rspec>.freeze, ["~> 3.0"])
s.add_dependency(%q<rubocop>.freeze, ["= 0.49.1"])
s.add_dependency(%q<rubocop-rspec>.freeze, ["= 1.15.1"])
- s.add_dependency(%q<google-protobuf>.freeze, ["~> 3.15.5"])
+ s.add_dependency(%q<google-protobuf>.freeze, [">= 3.17.1"])
end
end

0 comments on commit f599e3d

Please sign in to comment.