[kde-freebsd] [PATCH] devel/cmake: support custom PREFIX/LOCALBASE

Dmitry Marakasov amdmi3 at amdmi3.ru
Wed Aug 26 02:04:22 CEST 2009


>Submitter-Id:	current-users
>Originator:	Dmitry Marakasov
>Organization:	
>Confidential:	no 
>Synopsis:	[PATCH] devel/cmake: support custom PREFIX/LOCALBASE
>Severity:	non-critical
>Priority:	low
>Category:	ports 
>Class:		change-request
>Release:	FreeBSD 8.0-BETA2 i386
>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 at 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 ---



More information about the kde-freebsd mailing list