databases/rubygem-pg_query: Fix unknown type name 'PgQueryProtobuf'

Make sure to use internal pg_query lib.
Patch is already included upstream in version 2.1.0:
https://github.com/pganalyze/pg_query/pull/216/files

This should fix the build outside of poudriere.

PR:		256741
Reported by:	VVD <vvd@unislabs.com>
This commit is contained in:
VVD 2021-07-05 08:00:01 +02:00 committed by Matthias Fechner
parent 9620aca550
commit 4bbd995b74
2 changed files with 7 additions and 8 deletions

View file

@ -2,7 +2,7 @@
PORTNAME= pg_query
PORTVERSION= 2.0.3
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= databases rubygems
MASTER_SITES= RG
@ -12,9 +12,7 @@ COMMENT= Parses SQL queries using a copy of the PostgreSQL server query parser
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
MY_DEPENDS= ${LOCALBASE}/lib/libpg_query.a:databases/libpg_query
BUILD_DEPENDS= ${MY_DEPENDS} \
rubygem-pathname>0:devel/rubygem-pathname
BUILD_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

View file

@ -1,17 +1,18 @@
--- ext/pg_query/extconf.rb.orig 2021-05-19 21:51:31 UTC
--- ext/pg_query/extconf.rb.orig 2021-07-05 05:53:16 UTC
+++ ext/pg_query/extconf.rb
@@ -7,13 +7,6 @@ require 'pathname'
@@ -7,13 +7,8 @@ require 'pathname'
$objs = Dir.glob(File.join(__dir__, '*.c')).map { |f| Pathname.new(f).sub_ext('.o').to_s }
-$CFLAGS << " -I#{File.join(__dir__, 'include')} -O3 -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -g"
-
+$CFLAGS << " -O3 -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -DHAVE_STRCHRNUL -g"
-SYMFILE = File.join(__dir__, 'pg_query_ruby.sym')
-if RUBY_PLATFORM =~ /darwin/
- $DLDFLAGS << " -Wl,-exported_symbols_list #{SYMFILE}" unless defined?(::Rubinius)
-else
- $DLDFLAGS << " -Wl,--retain-symbols-file=#{SYMFILE}"
-end
+$CFLAGS << " -I#{File.join(__dir__, 'include')} -O3 -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -DHAVE_STRCHRNUL -g"
+$INCFLAGS = "-I#{File.join(__dir__, 'include')} " + $INCFLAGS
create_makefile 'pg_query/pg_query'