NetBSD Problem Report #56362
From stix@stix.id.au Sun Aug 15 09:14:46 2021
Return-Path: <stix@stix.id.au>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
by mollari.NetBSD.org (Postfix) with ESMTPS id D45F91A921F
for <gnats-bugs@gnats.NetBSD.org>; Sun, 15 Aug 2021 09:14:46 +0000 (UTC)
Message-Id: <20210815091425.6A6B219E75@stix.id.au>
Date: Sun, 15 Aug 2021 19:14:25 +1000 (AEST)
From: stix@stix.id.au
Reply-To: stix@stix.id.au
To: gnats-bugs@NetBSD.org
Subject: math/cgal embeds $WRKDIR in installed cmake files
X-Send-Pr-Version: 3.95
>Number: 56362
>Category: pkg
>Synopsis: math/cgal embeds $WRKDIR in installed cmake files
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Aug 15 09:15:01 +0000 2021
>Closed-Date: Sun Aug 15 14:35:26 +0000 2021
>Last-Modified: Sun Aug 15 14:40:00 +0000 2021
>Originator: Paul Ripke
>Release: NetBSD 9.2
>Organization:
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.
>Environment:
System: NetBSD slave 9.2 NetBSD 9.2 (SLAVE) #9: Sat May 15 17:19:33 AEST 2021 stix@slave:/home/netbsd/netbsd-9/obj.amd64/home/netbsd/netbsd-9/src/sys/arch/amd64/compile/SLAVE amd64
Architecture: x86_64
Machine: amd64
>Description:
math/cgal from pkgsrc embeds $WRKDIR in installed cmake files:
hactar:ksh$ grep pkgwrk /usr/pkg/lib/cmake/CGAL/*.cmake
/usr/pkg/lib/cmake/CGAL/CGALConfig.cmake: set( GMP_INCLUDE_DIR "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include" )
/usr/pkg/lib/cmake/CGAL/CGALConfig.cmake: set( GMP_LIBRARIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/lib/libgmp.so" )
/usr/pkg/lib/cmake/CGAL/CGALConfig.cmake: set( MPFR_INCLUDE_DIR "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include" )
/usr/pkg/lib/cmake/CGAL/CGALConfig.cmake: set( MPFR_LIBRARIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/lib/libmpfr.so" )
/usr/pkg/lib/cmake/CGAL/CGALExports.cmake: INTERFACE_INCLUDE_DIRECTORIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;${_IMPORT_PREFIX}/include"
/usr/pkg/lib/cmake/CGAL/CGALExports.cmake: INTERFACE_LINK_LIBRARIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/lib/libmpfr.so;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/lib/libgmp.so"
/usr/pkg/lib/cmake/CGAL/CGALExports.cmake: INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include"
/usr/pkg/lib/cmake/CGAL/CGAL_CoreExports.cmake: INTERFACE_INCLUDE_DIRECTORIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include"
/usr/pkg/lib/cmake/CGAL/CGAL_CoreExports.cmake: INTERFACE_LINK_LIBRARIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/lib/libmpfr.so;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/lib/libgmp.so;CGAL::CGAL;Boost::thread"
/usr/pkg/lib/cmake/CGAL/CGAL_CoreExports.cmake: INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include;/usr/tmp/pkgwrk/math/cgal/work/.buildlink/include"
>How-To-Repeat:
Install math/cgal from pkgsrc, both HEAD and pkgsrc-2021Q2 tested.
>Fix:
I haven't figured out a nice fix for this; the internal substitution
is non-obvious to me.
>Release-Note:
>Audit-Trail:
From: Paul Ripke <stix@stix.id.au>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/56362: math/cgal embeds $WRKDIR in installed cmake files
Date: Sun, 15 Aug 2021 22:52:54 +1000
The following ugly patch works for me.
diff --git a/math/cgal/Makefile b/math/cgal/Makefile
index 34abc59866f..1b11968a979 100644
--- a/math/cgal/Makefile
+++ b/math/cgal/Makefile
@@ -24,6 +24,12 @@ REPLACE_SH+= scripts/cgal_create_cmake_script
pre-install:
find ${WRKSRC} -name \*.orig -exec rm {} \;
+SUBST_CLASSES+= cmakewrkdir
+SUBST_STAGE.cmakewrkdir= post-install
+SUBST_MESSAGE.cmakewrkdir= Removing $$WRKDIR from cmake files
+SUBST_FILES.cmakewrkdir= ${DESTDIR}${PREFIX}/lib/cmake/CGAL/*.cmake
+SUBST_SED.cmakewrkdir= -e 's%${WRKDIR}/.buildlink%${PREFIX}%g'
+
.include "../../devel/boost-headers/buildlink3.mk"
.include "../../devel/boost-libs/buildlink3.mk"
.include "../../math/mpfr/buildlink3.mk"
--
Paul Ripke
"Great minds discuss ideas, average minds discuss events, small minds
discuss people."
-- Disputed: Often attributed to Eleanor Roosevelt. 1948.
State-Changed-From-To: open->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 15 Aug 2021 14:35:26 +0000
State-Changed-Why:
Committed, thanks!
From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/56362 CVS commit: pkgsrc/math/cgal
Date: Sun, 15 Aug 2021 14:35:08 +0000
Module Name: pkgsrc
Committed By: wiz
Date: Sun Aug 15 14:35:08 UTC 2021
Modified Files:
pkgsrc/math/cgal: Makefile
Log Message:
cgal: remove WRKDIR references from installed files
From Paul Ripke in PR 56362.
Bump PKGREVISION.
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 pkgsrc/math/cgal/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.