aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVVD <vvd@unislabs.com>2021-07-05 06:00:01 +0000
committerMatthias Fechner <mfechner@FreeBSD.org>2021-07-05 06:01:52 +0000
commit4bbd995b742469b4d3c5a37f761dfaa6c32f3d76 (patch)
treed1422f1bdac5111732f8039b332bba18393fe72f
parent9620aca55054d7f4e7fc85cd2f0e01ea984c237a (diff)
downloadports-4bbd995b742469b4d3c5a37f761dfaa6c32f3d76.tar.gz
ports-4bbd995b742469b4d3c5a37f761dfaa6c32f3d76.zip
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>
-rw-r--r--databases/rubygem-pg_query/Makefile6
-rw-r--r--databases/rubygem-pg_query/files/patch-ext_pg__query_extconf.rb9
2 files changed, 7 insertions, 8 deletions
diff --git a/databases/rubygem-pg_query/Makefile b/databases/rubygem-pg_query/Makefile
index af2526f2ddb8..601be2a32351 100644
--- a/databases/rubygem-pg_query/Makefile
+++ b/databases/rubygem-pg_query/Makefile
@@ -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
diff --git a/databases/rubygem-pg_query/files/patch-ext_pg__query_extconf.rb b/databases/rubygem-pg_query/files/patch-ext_pg__query_extconf.rb
index f9ed045ae1ac..888855f4e6bb 100644
--- a/databases/rubygem-pg_query/files/patch-ext_pg__query_extconf.rb
+++ b/databases/rubygem-pg_query/files/patch-ext_pg__query_extconf.rb
@@ -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'