pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/47792: [PATCH] (devel/cmake) Fix wrong install PATH as /usr/local



>Number:         47792
>Category:       pkg
>Synopsis:       [PATCH] (devel/cmake) Fix wrong install PATH as /usr/local
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 02 16:05:00 +0000 2013
>Originator:     Makoto Fujiwara
>Release:        NetBSD 6.1_RC2
>Organization:
KINU Corporation
>Environment:
        
        
System: NetBSD mini-6.i.ki.nu 6.1_RC2 NetBSD 6.1_RC2 (GENERIC) macppc
Architecture: powerpc
Machine: macppc
>Description:
cmake-2.8.10nb4 has hardcoded string of /usr/local.
>How-To-Repeat:
(1) Have NetBSD/6.1_RC2 or similar installed with X11
(2) set X11_TYPE=native in /etc/mk.conf or so (* i)
(3) devel/cmake-cmake-2.8.10nb4 installed
(4) pkgsrc-wip checked out, for example,
    (cd /usr/pkgsrc; \
    cvs -d 
:pserver:anoncvs%pkgsrc-wip.cvs.sourceforge.net@localhost:/cvsroot/pkgsrc-wip \
    co wip)
(5) cd /usr/pkgsrc/wip/trustedQSL;
    make package
    
You will get following problem ( Look at /usr/local PATH):
+-------------------------------------------------
| -- Installing: /usr/pkgsrc/wip/trustedQSL/work/.destdir/usr/local/bin/tqsl
| CMake Error at apps/cmake_install.cmake:40 (FILE):
|   file RPATH_CHANGE could not write new RPATH:
| 
|     /usr/local/lib:/usr/pkg/lib
| 
|   to the file:
| 
|     /usr/pkgsrc/wip/trustedQSL/work/.destdir/usr/local/bin/tqsl
| 
|   The current RPATH is:
| 
|     /usr/pkg/lib:/usr/X11R7/lib:/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/src
| 
|   which does not contain:
| 
|     /usr/pkg/lib:/usr/pkgsrc/wip/trustedQSL/work/tqsl-114/src
| 
|   as was expected.
| Call Stack (most recent call first):
|   cmake_install.cmake:33 (INCLUDE)
| 
| gmake: *** [install] Error 1
| *** Error code 2
| Stop.
+-------------------------------------------------
(* i) set X11_TYPE=modular will have the same problem.
      This is just an example.
(* ii) wip/trustedQSL may be a example. There may be
    another problem if cmake employed.
>Fix:
        
Index: devel/cmake/Makefile
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/devel/cmake/Makefile,v
retrieving revision 1.70
diff -u -r1.70 Makefile
--- devel/cmake/Makefile        4 Mar 2013 10:01:13 -0000       1.70
+++ devel/cmake/Makefile        2 May 2013 15:09:06 -0000
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.70 2013/03/04 10:01:13 roy Exp $
 
 DISTNAME=      cmake-${CMAKE_API}.10
-PKGREVISION=   4
+PKGREVISION=   5
 CATEGORIES=    devel
 MASTER_SITES=  http://www.cmake.org/files/v${CMAKE_API}/
 
@@ -45,6 +45,7 @@
 SUBST_MESSAGE.cmake=   Fixing LOCALBASE and X11 paths.
 SUBST_FILES.cmake+=    Modules/FindX11.cmake
 SUBST_FILES.cmake+=    Modules/Platform/UnixPaths.cmake
+SUBST_FILES.cmake+=    Modules/CMakeGenericSystem.cmake
 SUBST_VARS.cmake=      LOCALBASE X11BASE
 
 SUBST_CLASSES+=                flags
Index: devel/cmake/distinfo
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/devel/cmake/distinfo,v
retrieving revision 1.43
diff -u -r1.43 distinfo
--- devel/cmake/distinfo        16 Feb 2013 11:40:37 -0000      1.43
+++ devel/cmake/distinfo        2 May 2013 15:09:06 -0000
@@ -3,6 +3,7 @@
 SHA1 (cmake-2.8.10.tar.gz) = 6384f2295d01f04d017e2701447378598b4c7223
 RMD160 (cmake-2.8.10.tar.gz) = 9af9e3f26f0f3d827ef566f99050fe6a2721dd25
 Size (cmake-2.8.10.tar.gz) = 5766728 bytes
+SHA1 (patch-Modules_CMakeGenericSystem.cmake) = 
c7eee31d22ba87b0a869def972b9c273f0ccb601
 SHA1 (patch-Modules_FindPNG.cmake) = 55de08bb7882bc98c78dcad0d1aa7016b4b03564
 SHA1 (patch-Modules_FindX11.cmake) = e5c9f5fd382effb85ae75fe603de00e5e58d788a
 SHA1 (patch-Modules_Platform_SunOS.cmake) = 
7a53ae3c902dd69ee22ef9fe0ae2a022d5284f16
Index: devel/cmake/patches/patch-Modules_CMakeGenericSystem.cmake
===================================================================
RCS file: devel/cmake/patches/patch-Modules_CMakeGenericSystem.cmake
diff -N devel/cmake/patches/patch-Modules_CMakeGenericSystem.cmake
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ devel/cmake/patches/patch-Modules_CMakeGenericSystem.cmake  2 May 2013 
15:09:06 -0000
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Correct Install Prefix, see SUBST in Makefile
+
+--- Modules/CMakeGenericSystem.cmake.orig      2012-11-01 00:32:05.000000000 
+0900
++++ Modules/CMakeGenericSystem.cmake   2013-05-01 23:45:47.000000000 +0900
+@@ -166,7 +166,7 @@ endif()
+ 
+ # Choose a default install prefix for this platform.
+ if(CMAKE_HOST_UNIX)
+-  set(CMAKE_INSTALL_PREFIX "/usr/local"
++  set(CMAKE_INSTALL_PREFIX "@LOCALBASE@"
+     CACHE PATH "Install path prefix, prepended onto install directories.")
+ else()
+   GetDefaultWindowsPrefixBase(CMAKE_GENERIC_PROGRAM_FILES)

>Unformatted:
 (devel/cmake) Fix wrong install PATH as /usr/local
        
        


Home | Main Index | Thread Index | Old Index