git: 44edb6fa1d91 - main - databases/rubygem-pg_query: fix build on FreeBSD 13.3

From: Matthias Fechner <mfechner_at_FreeBSD.org>
Date: Thu, 07 Mar 2024 15:01:27 UTC
The branch main has been updated by mfechner:

URL: https://cgit.FreeBSD.org/ports/commit/?id=44edb6fa1d91f02907c0cfae7c962c17b3da0143

commit 44edb6fa1d91f02907c0cfae7c962c17b3da0143
Author:     Matthias Fechner <mfechner@FreeBSD.org>
AuthorDate: 2024-03-07 07:26:45 +0000
Commit:     Matthias Fechner <mfechner@FreeBSD.org>
CommitDate: 2024-03-07 14:48:20 +0000

    databases/rubygem-pg_query: fix build on FreeBSD 13.3
    
    I reported this fix also upstream:
    https://github.com/pganalyze/pg_query/pull/313
    
    PR:             277535
---
 databases/rubygem-pg_query/Makefile                                 | 6 ++++--
 .../rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym  | 5 -----
 .../files/patch-ext_pg__query_pg__query__ruby__freebsd.sym          | 5 +++++
 3 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/databases/rubygem-pg_query/Makefile b/databases/rubygem-pg_query/Makefile
index e9dcd7cb4135..3d68bdd5ac62 100644
--- a/databases/rubygem-pg_query/Makefile
+++ b/databases/rubygem-pg_query/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	pg_query
 PORTVERSION=	5.1.0
+PORTREVISION=	1
 CATEGORIES=	databases rubygems
 MASTER_SITES=	RG
 
@@ -10,11 +11,12 @@ WWW=		https://github.com/lfittl/pg_query
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-BROKEN_FreeBSD_15=	fails to link: ld: error: version script assignment of 'global' to symbol '_Init_pg_query' failed: symbol not defined
-
 BUILD_DEPENDS=	rubygem-pathname>0:devel/rubygem-pathname
 RUN_DEPENDS=	rubygem-google-protobuf>=3.22.3:devel/rubygem-google-protobuf
 
 USES=		gem
 
+post-patch:
+#	${RM} ${WRKSRC}/ext/pg_query/pg_query_ruby_freebsd.sym
+
 .include <bsd.port.mk>
diff --git a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym
deleted file mode 100644
index 8145d31d5de3..000000000000
--- a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby.sym
+++ /dev/null
@@ -1,5 +0,0 @@
---- ext/pg_query/pg_query_ruby.sym.orig	2023-11-19 20:29:16 UTC
-+++ ext/pg_query/pg_query_ruby.sym
-@@ -1 +1 @@
--_Init_pg_query
-+Init_pg_query
diff --git a/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby__freebsd.sym b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby__freebsd.sym
new file mode 100644
index 000000000000..5f2ef87b78ee
--- /dev/null
+++ b/databases/rubygem-pg_query/files/patch-ext_pg__query_pg__query__ruby__freebsd.sym
@@ -0,0 +1,5 @@
+--- ext/pg_query/pg_query_ruby_freebsd.sym.orig	2024-03-07 07:21:50 UTC
++++ ext/pg_query/pg_query_ruby_freebsd.sym
+@@ -1,2 +1 @@
+-_Init_pg_query
+ Init_pg_query