Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Aug 2009 04:04:22 +0400 (MSD)
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        kde@FreeBSD.org
Subject:   ports/138187: [PATCH] devel/cmake: support custom PREFIX/LOCALBASE
Message-ID:  <20090826000422.71E53108842@hades.panopticon>
Resent-Message-ID: <200908260010.n7Q0A1Q1030337@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         138187
>Category:       ports
>Synopsis:       [PATCH] devel/cmake: support custom PREFIX/LOCALBASE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 26 00:10:00 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Marakasov
>Release:        FreeBSD 8.0-BETA2 i386
>Organization:
>Environment:
System: FreeBSD hades.panopticon 8.0-BETA2 FreeBSD 8.0-BETA2 #0: Thu Jul 30 19:51:12 MSD 2009
>Description:
While the port replaces /usr/X11R6 to ${LOCALBASE} in cmake modules, it doesn't replace /usr/local, so with custom PREFIX/LOCALBASE some cmake-using ports will fail, as they won't be able to find required libs headers. For instance, that happens with spring which uses FindSDL.cmake.


Port maintainer (kde@FreeBSD.org) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- cmake-2.6.4_1.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/amdmi3/projects/freebsd/FreeBSD.cvs/ports/devel/cmake/Makefile,v
retrieving revision 1.32
diff -u -u -r1.32 Makefile
--- Makefile	4 Aug 2009 19:33:08 -0000	1.32
+++ Makefile	26 Aug 2009 00:01:03 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	cmake
 PORTVERSION=	2.6.4
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	http://www.cmake.org/files/v${PORTVERSION:C/\.[[:digit:]]+$//}/
 
@@ -37,8 +38,10 @@
 		ctest.1
 
 post-patch:
-	@${GREP} -rl '/usr/X11R6' ${WRKSRC}/Modules ${WRKSRC}/Tests | \
-		${XARGS} ${REINPLACE_CMD} -e 's,/usr/X11R6,${LOCALBASE},g'
+	@(${FIND} ${WRKSRC}/Modules -name "*.cmake" -print0; \
+		${FIND} ${WRKSRC}/Tests -name "CMakeLists.txt" -print0 ) | \
+		${XARGS} -0 -n 100 ${REINPLACE_CMD} -e 's,/usr/local,${LOCALBASE},g; \
+			s,/usr/X11R6,${LOCALBASE},g'
 	@${REINPLACE_CMD} -e 's,/opt/kde4,${LOCALBASE}/kde4,g' \
 		${WRKSRC}/Modules/FindKDE4.cmake
 
--- cmake-2.6.4_1.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090826000422.71E53108842>