mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-29 05:38:00 +00:00
New port required for gitlab-ce 13.8.
This commit is contained in:
parent
fead9decc5
commit
9fd82b49be
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=562564
@ -947,6 +947,7 @@
|
||||
SUBDIR += rubygem-pg0
|
||||
SUBDIR += rubygem-pg018
|
||||
SUBDIR += rubygem-pg_array_parser
|
||||
SUBDIR += rubygem-pg_query
|
||||
SUBDIR += rubygem-pghero
|
||||
SUBDIR += rubygem-pghero-rails5
|
||||
SUBDIR += rubygem-pghero-rails50
|
||||
|
23
databases/rubygem-pg_query/Makefile
Normal file
23
databases/rubygem-pg_query/Makefile
Normal file
@ -0,0 +1,23 @@
|
||||
# Created by: Matthias Fechner <mfechner@FreeBSD.org>
|
||||
# $FreeBSD$
|
||||
|
||||
PORTNAME= pg_query
|
||||
PORTVERSION= 1.3.0
|
||||
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 <bsd.port.mk>
|
3
databases/rubygem-pg_query/distinfo
Normal file
3
databases/rubygem-pg_query/distinfo
Normal file
@ -0,0 +1,3 @@
|
||||
TIMESTAMP = 1611263359
|
||||
SHA256 (rubygem/pg_query-1.3.0.gem) = 0e1be8d88a8c0521b81f84d43efb8349ef1330861d4a353015b535018a1f34c5
|
||||
SIZE (rubygem/pg_query-1.3.0.gem) = 36864
|
@ -0,0 +1,55 @@
|
||||
--- ext/pg_query/extconf.rb.orig 2021-01-21 21:10:31 UTC
|
||||
+++ ext/pg_query/extconf.rb
|
||||
@@ -4,52 +4,9 @@ require 'digest'
|
||||
require 'mkmf'
|
||||
require 'open-uri'
|
||||
|
||||
-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')
|
||||
|
||||
-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"
|
||||
-
|
||||
-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'
|
7
databases/rubygem-pg_query/pkg-descr
Normal file
7
databases/rubygem-pg_query/pkg-descr
Normal file
@ -0,0 +1,7 @@
|
||||
This Ruby extension uses the actual PostgreSQL server source
|
||||
to parse SQL queries and return the internal PostgreSQL parsetree.
|
||||
|
||||
In addition the extension allows you to normalize queries (replacing constant
|
||||
values with ?) and parse these normalized queries into a parsetree again.
|
||||
|
||||
WWW: https://github.com/lfittl/pg_query
|
Loading…
Reference in New Issue
Block a user