svn commit: r556494 - in head/databases/rubygem-gitlab-pg_query: . files
Matthias Fechner
mfechner at FreeBSD.org
Sat Nov 28 14:57:24 UTC 2020
Author: mfechner
Date: Sat Nov 28 14:57:23 2020
New Revision: 556494
URL: https://svnweb.freebsd.org/changeset/ports/556494
Log:
Fixed runtime problems of the lib.
Modified:
head/databases/rubygem-gitlab-pg_query/Makefile
head/databases/rubygem-gitlab-pg_query/files/patch-ext_pg__query_extconf.rb
Modified: head/databases/rubygem-gitlab-pg_query/Makefile
==============================================================================
--- head/databases/rubygem-gitlab-pg_query/Makefile Sat Nov 28 14:55:56 2020 (r556493)
+++ head/databases/rubygem-gitlab-pg_query/Makefile Sat Nov 28 14:57:23 2020 (r556494)
@@ -3,6 +3,7 @@
PORTNAME= gitlab-pg_query
PORTVERSION= 1.3.0
+PORTREVISION= 1
CATEGORIES= databases rubygems
MASTER_SITES= RG
@@ -12,13 +13,11 @@ COMMENT= Parses SQL queries using a copy of the Postgr
LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
-BUILD_DEPENDS= ${LOCALBASE}/lib/libpg_query.a:databases/libpg_query
+MY_DEPENDS= ${LOCALBASE}/lib/libpg_query.a:databases/libpg_query
+BUILD_DEPENDS= ${MY_DEPENDS}
+RUN_DEPENDS= ${MY_DEPENDS}
USES= gem
USE_RUBY= yes
-
-#CONFIGURE_ARGS= --with-pgsql-include-dir=`${PG_CONFIG} --includedir` \
-# --with-pgsql-lib-dir=`${PG_CONFIG} --libdir`
-#PG_CONFIG= ${LOCALBASE}/bin/pg_config
.include <bsd.port.mk>
Modified: head/databases/rubygem-gitlab-pg_query/files/patch-ext_pg__query_extconf.rb
==============================================================================
--- head/databases/rubygem-gitlab-pg_query/files/patch-ext_pg__query_extconf.rb Sat Nov 28 14:55:56 2020 (r556493)
+++ head/databases/rubygem-gitlab-pg_query/files/patch-ext_pg__query_extconf.rb Sat Nov 28 14:57:23 2020 (r556494)
@@ -1,8 +1,15 @@
---- ext/pg_query/extconf.rb.orig 2020-11-20 23:41:38 UTC
+--- ext/pg_query/extconf.rb.orig 2020-11-21 10:30:23 UTC
+++ ext/pg_query/extconf.rb
-@@ -10,22 +10,22 @@ libdir = File.join(workdir, 'libpg_query-' + LIB_PG_QU
+@@ -3,44 +3,12 @@
+ require 'mkmf'
+ require 'open-uri'
+
+-LIB_PG_QUERY_TAG = 'gitlab-10-1.0.3'.freeze
+-
+ workdir = Dir.pwd
+-libdir = File.join(workdir, 'libpg_query-' + LIB_PG_QUERY_TAG)
gemdir = File.join(__dir__, '../..')
- libfile = libdir + '/libpg_query.a'
+-libfile = libdir + '/libpg_query.a'
-unless File.exist?("#{workdir}/libpg_query.tar.gz")
- File.open("#{workdir}/libpg_query.tar.gz", 'wb') do |target_file|
@@ -11,29 +18,32 @@
- end
- end
-end
-+#unless File.exist?("#{workdir}/libpg_query.tar.gz")
-+# File.open("#{workdir}/libpg_query.tar.gz", 'wb') do |target_file|
-+# open("https://gitlab.com/gitlab-org/libpg_query/-/archive/#{LIB_PG_QUERY_TAG}/libpg_query-#{LIB_PG_QUERY_TAG}.tar.gz", 'rb') do |read_file|
-+# target_file.write(read_file.read)
-+# end
-+# end
-+#end
++abort "pgquery is missing" unless find_header('pg_query.h')
++abort "pgquery is missing" unless find_library('pg_query', 'pg_query_init')
-unless Dir.exist?(libdir)
- system("tar -xzf #{workdir}/libpg_query.tar.gz") || raise('ERROR')
-end
-+#unless Dir.exist?(libdir)
-+# system("tar -xzf #{workdir}/libpg_query.tar.gz") || raise('ERROR')
-+#end
-
+-
-unless Dir.exist?(libfile)
- # Build libpg_query (and parts of PostgreSQL)
- system("cd #{libdir}; #{ENV['MAKE'] || (RUBY_PLATFORM =~ /bsd/ ? 'gmake' : 'make')} build")
-end
-+#unless Dir.exist?(libfile)
-+# # Build libpg_query (and parts of PostgreSQL)
-+# system("cd #{libdir}; #{ENV['MAKE'] || (RUBY_PLATFORM =~ /bsd/ ? 'gmake' : 'make')} build")
-+#end
+-
+-# Copy test files (this intentionally overwrites existing files!)
+-system("cp #{libdir}/testdata/* #{gemdir}/spec/files/")
+-
+ $objs = ['pg_query_ruby.o']
+-
+-$LOCAL_LIBS << '-lpg_query'
+-$LIBPATH << libdir
+-$CFLAGS << " -I #{libdir} -O3 -Wall -fno-strict-aliasing -fwrapv -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
- # Copy test files (this intentionally overwrites existing files!)
- system("cp #{libdir}/testdata/* #{gemdir}/spec/files/")
+ create_makefile 'pg_query/pg_query'
More information about the svn-ports-head
mailing list