Re: git: 0983bbffe275 - main - devel/rubygem-oj: Fix build

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Fri, 27 Jan 2023 10:17:13 UTC
From: Muhammad Moinur Rahman <bofh@FreeBSD.org>
Subject: git: 0983bbffe275 - main - devel/rubygem-oj: Fix build
Date: Wed, 18 Jan 2023 15:34:34 GMT

> The branch main has been updated by bofh:
> 
> URL: https://cgit.FreeBSD.org/ports/commit/?id=0983bbffe275d18b7b7c576817f3eb57e2504bfe
> 
> commit 0983bbffe275d18b7b7c576817f3eb57e2504bfe
> Author:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
> AuthorDate: 2023-01-18 15:28:49 +0000
> Commit:     Muhammad Moinur Rahman <bofh@FreeBSD.org>
> CommitDate: 2023-01-18 15:32:49 +0000
> 
>     devel/rubygem-oj: Fix build
>     
>     Currently the header files are not included although there is a
>     post-install step. However there is a missing line where we need to
>     create the directories.
>     
>     This fixes the builds of gitlab-ce.

Unfortunately build still fails after this commit.
"${INSTALL_DATA} -d" creates directory with 0644 and it result in
failing to copy header files with 'permission denied'. Attached patch
fixes it. It uses "${INSTALL} -d" instead. So directory is created
with 0755 and now header files are copied successfully.

From 3a01bac7a4793cc191bc605fbb81b0380ab26959 Mon Sep 17 00:00:00 2001
From: Yasuhiro Kimura <yasu@FreeBSD.org>
Date: Fri, 27 Jan 2023 18:41:22 +0900
Subject: [PATCH] devel/rubygem-oj: Create directoy with proper mode

"${INSTALL_DATA} -d" creates directory with 0644 and it result in
failing to copy header files with 'permission denied'. So use
"${INSTALL} -d" instead.It creates directory with 0755 and header
files are copied successfully.

Fixes:		0983bbffe275
---
 devel/rubygem-oj/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/devel/rubygem-oj/Makefile b/devel/rubygem-oj/Makefile
index 374e6a43edc7..367164535c29 100644
--- a/devel/rubygem-oj/Makefile
+++ b/devel/rubygem-oj/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	oj
 PORTVERSION=	3.13.23
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	devel rubygems
 MASTER_SITES=	RG
 
@@ -16,7 +16,7 @@ USES=		gem
 # TODO: find a better way to do this
 # Copy all header file, as it is required by rubygem-oj-introspect
 post-install:
-	${INSTALL_DATA} -d ${STAGEDIR}${PREFIX}/${GEMS_DIR}/${PORTNAME}-${PORTVERSION}/ext/oj
+	${INSTALL} -d ${STAGEDIR}${PREFIX}/${GEMS_DIR}/${PORTNAME}-${PORTVERSION}/ext/oj
 	cd ${WRKSRC}/ext/oj && ${FIND} * -name "*.h" -type f -exec ${INSTALL_DATA} {} "${STAGEDIR}${PREFIX}/${GEMS_DIR}/${PORTNAME}-${PORTVERSION}/ext/oj/{}" \;
 
 .include <bsd.port.mk>
-- 
2.39.1

---
Yasuhiro Kimura