Index: head/databases/rubygem-gitlab-pg_query/Makefile =================================================================== --- head/databases/rubygem-gitlab-pg_query/Makefile (revision 559812) +++ head/databases/rubygem-gitlab-pg_query/Makefile (revision 559813) @@ -1,23 +1,23 @@ # Created by: Matthias Fechner # $FreeBSD$ PORTNAME= gitlab-pg_query -PORTVERSION= 1.3.0 -PORTREVISION= 1 +PORTVERSION= 1.3.1 +PORTREVISION= 0 CATEGORIES= databases rubygems MASTER_SITES= RG MAINTAINER= mfechner@FreeBSD.org 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} RUN_DEPENDS= ${MY_DEPENDS} USES= gem USE_RUBY= yes .include Index: head/databases/rubygem-gitlab-pg_query/distinfo =================================================================== --- head/databases/rubygem-gitlab-pg_query/distinfo (revision 559812) +++ head/databases/rubygem-gitlab-pg_query/distinfo (revision 559813) @@ -1,3 +1,3 @@ -TIMESTAMP = 1605910010 -SHA256 (rubygem/gitlab-pg_query-1.3.0.gem) = 98c66602fdf054dc57dff8b91925e57fa7b43015c9c699dc6f6d6de31fd27f77 -SIZE (rubygem/gitlab-pg_query-1.3.0.gem) = 35328 +TIMESTAMP = 1609489189 +SHA256 (rubygem/gitlab-pg_query-1.3.1.gem) = ef28bf4639a749db9efb8d9f5358bd1ff43e1039a2371c88b95b51e6658ecbe7 +SIZE (rubygem/gitlab-pg_query-1.3.1.gem) = 35328 Index: 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 (revision 559812) +++ head/databases/rubygem-gitlab-pg_query/files/patch-ext_pg__query_extconf.rb (revision 559813) @@ -1,49 +1,56 @@ ---- ext/pg_query/extconf.rb.orig 2020-11-21 10:30:23 UTC +--- ext/pg_query/extconf.rb.orig 2021-01-01 08:22:43 UTC +++ ext/pg_query/extconf.rb -@@ -3,44 +3,12 @@ +@@ -4,53 +4,9 @@ require 'digest' require 'mkmf' require 'open-uri' --LIB_PG_QUERY_TAG = 'gitlab-10-1.0.3'.freeze +-LIB_PG_QUERY_TAG = '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' --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| +-expected_sha256 = '1332761f31c198cb9825e6ccccda0b6a0e57daeb824870e8524df77f1592d149' +-filename = "#{workdir}/libpg_query.tar.gz" +- +-unless File.exist?(filename) +- File.open(filename, 'wb') do |target_file| +- URI.open('https://codeload.github.com/lfittl/libpg_query/tar.gz/' + LIB_PG_QUERY_TAG, 'rb') do |read_file| - target_file.write(read_file.read) - end - end +- +- checksum = Digest::SHA256.hexdigest(File.read(filename)) +- +- if checksum != expected_sha256 +- raise "SHA256 of #{filename} does not match: got #{checksum}, expected #{expected_sha256}" +- 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') +- system("tar -xzf #{filename}") || 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 - -# 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 create_makefile 'pg_query/pg_query'