aboutsummaryrefslogtreecommitdiffstats
path: root/community/ruby-pg_query/unbundle-deps.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/ruby-pg_query/unbundle-deps.patch')
-rw-r--r--community/ruby-pg_query/unbundle-deps.patch21
1 files changed, 11 insertions, 10 deletions
diff --git a/community/ruby-pg_query/unbundle-deps.patch b/community/ruby-pg_query/unbundle-deps.patch
index 0de08048601..1f21456ca20 100644
--- a/community/ruby-pg_query/unbundle-deps.patch
+++ b/community/ruby-pg_query/unbundle-deps.patch
@@ -2,20 +2,21 @@ Link against system-provided libpg_query and xxhash, and respect our CFLAGS.
--- a/ext/pg_query/extconf.rb
+++ b/ext/pg_query/extconf.rb
-@@ -5,9 +5,11 @@
- require 'open-uri'
- require 'pathname'
+@@ -8,10 +8,12 @@
+ $objs = Dir.glob(File.join(__dir__, '*.c')).map { |f| Pathname.new(f).sub_ext('.o').to_s }
--$objs = Dir.glob(File.join(__dir__, '*.c')).map { |f| Pathname.new(f).sub_ext('.o').to_s }
-+$CFLAGS << " #{ENV["CFLAGS"]}"
-+$CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
-+$CFLAGS << " -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable"
+ if RUBY_PLATFORM !~ /cygwin|mswin|mingw|bccwin|wince|emx/
+- $CFLAGS << " -fvisibility=hidden -O3 -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -Wno-clobbered -Wno-sign-compare -Wno-discarded-qualifiers -Wno-unknown-warning-option -g"
++ $CFLAGS << " #{ENV["CFLAGS"]} -I/usr/include/postgresql/16/server"
++ $CFLAGS << " -O3" unless $CFLAGS[/-O\d/]
++ $CFLAGS << " -fvisibility=hidden -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -Wno-clobbered -Wno-sign-compare -Wno-discarded-qualifiers -Wno-unknown-warning-option -g"
+ end
--$CFLAGS << " -I#{File.join(__dir__, 'include')} -O3 -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -g"
+-$INCFLAGS = "-I#{File.join(__dir__, 'include')} " + "-I#{File.join(__dir__, 'include', 'postgres')} " + $INCFLAGS
+$LDFLAGS << " -lpg_query -lxxhash"
- SYMFILE = File.join(__dir__, 'pg_query_ruby.sym')
- if RUBY_PLATFORM =~ /darwin/
+ if RUBY_PLATFORM =~ /cygwin|mswin|mingw|bccwin|wince|emx/
+ $INCFLAGS = "-I#{File.join(__dir__, 'include', 'postgres', 'port', 'win32')} " + $INCFLAGS
--- a/ext/pg_query/pg_query_ruby.c
+++ b/ext/pg_query/pg_query_ruby.c
@@ -1,5 +1,5 @@