mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-21 08:42:23 +00:00
databases/rubygem-pg_query: Update to 2.0.3.
Required for gitlab-ce 13.12. Changelog: https://github.com/pganalyze/pg_query/blob/main/CHANGELOG.md
This commit is contained in:
parent
5154c2bd52
commit
287ad8044e
@ -1,7 +1,7 @@
|
||||
# Created by: Matthias Fechner <mfechner@FreeBSD.org>
|
||||
|
||||
PORTNAME= pg_query
|
||||
PORTVERSION= 1.3.0
|
||||
PORTVERSION= 2.0.3
|
||||
PORTREVISION= 0
|
||||
CATEGORIES= databases rubygems
|
||||
MASTER_SITES= RG
|
||||
@ -13,8 +13,10 @@ LICENSE= BSD3CLAUSE
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
MY_DEPENDS= ${LOCALBASE}/lib/libpg_query.a:databases/libpg_query
|
||||
BUILD_DEPENDS= ${MY_DEPENDS}
|
||||
RUN_DEPENDS= ${MY_DEPENDS}
|
||||
BUILD_DEPENDS= ${MY_DEPENDS} \
|
||||
rubygem-pathname>0:devel/rubygem-pathname
|
||||
RUN_DEPENDS= ${MY_DEPENDS} \
|
||||
rubygem-google-protobuf315>=3.15.5<3.16:devel/rubygem-google-protobuf315
|
||||
|
||||
USES= gem
|
||||
USE_RUBY= yes
|
||||
|
@ -1,3 +1,3 @@
|
||||
TIMESTAMP = 1611263359
|
||||
SHA256 (rubygem/pg_query-1.3.0.gem) = 0e1be8d88a8c0521b81f84d43efb8349ef1330861d4a353015b535018a1f34c5
|
||||
SIZE (rubygem/pg_query-1.3.0.gem) = 36864
|
||||
TIMESTAMP = 1621458021
|
||||
SHA256 (rubygem/pg_query-2.0.3.gem) = 4f6566d174b477b25736f89d6e5455668df44962a4582c68fcc2dffbe63031d6
|
||||
SIZE (rubygem/pg_query-2.0.3.gem) = 2148352
|
||||
|
@ -1,49 +1,10 @@
|
||||
--- ext/pg_query/extconf.rb.orig 2021-01-21 21:10:31 UTC
|
||||
--- ext/pg_query/extconf.rb.orig 2021-05-19 21:51:31 UTC
|
||||
+++ ext/pg_query/extconf.rb
|
||||
@@ -4,52 +4,9 @@ require 'digest'
|
||||
require 'mkmf'
|
||||
require 'open-uri'
|
||||
@@ -7,13 +7,6 @@ require 'pathname'
|
||||
|
||||
-LIB_PG_QUERY_TAG = '10-1.0.4'.freeze
|
||||
-LIB_PG_QUERY_SHA256SUM = '88cc90296e5fcaaebd0b360c46698b7c5badddf86f120e249ef682a820d41338'.freeze
|
||||
-
|
||||
workdir = Dir.pwd
|
||||
-libdir = File.join(workdir, 'libpg_query-' + LIB_PG_QUERY_TAG)
|
||||
gemdir = File.join(__dir__, '../..')
|
||||
-libfile = libdir + '/libpg_query.a'
|
||||
-filename = File.join(workdir, 'libpg_query-' + LIB_PG_QUERY_TAG + '.tar.gz')
|
||||
$objs = Dir.glob(File.join(__dir__, '*.c')).map { |f| Pathname.new(f).sub_ext('.o').to_s }
|
||||
|
||||
-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 != LIB_PG_QUERY_SHA256SUM
|
||||
- raise "SHA256 of #{filename} does not match: got #{checksum}, expected #{expected_sha256}"
|
||||
- end
|
||||
-end
|
||||
-
|
||||
-unless Dir.exist?(libdir)
|
||||
- system("tar -xzf #{filename}") || raise('ERROR')
|
||||
-end
|
||||
-
|
||||
-unless Dir.exist?(libfile)
|
||||
- # Build libpg_query (and parts of PostgreSQL)
|
||||
- system(format("cd %s; %s build", libdir, ENV['MAKE'] || (RUBY_PLATFORM =~ /bsd/ ? 'gmake' : 'make')))
|
||||
-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"
|
||||
-$CFLAGS << " -I#{File.join(__dir__, 'include')} -O3 -Wall -fno-strict-aliasing -fwrapv -fstack-protector -Wno-unused-function -Wno-unused-variable -g"
|
||||
-
|
||||
-SYMFILE = File.join(__dir__, 'pg_query_ruby.sym')
|
||||
-if RUBY_PLATFORM =~ /darwin/
|
||||
@ -51,5 +12,6 @@
|
||||
-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"
|
||||
|
||||
create_makefile 'pg_query/pg_query'
|
||||
|
Loading…
Reference in New Issue
Block a user