nixpkgs-suyu/pkgs/desktops/kde-4.8/kdesdk/find-svn.patch
Yury G. Kudryashov 3aa99d803e Remove PATHS from find-svn.patch
svn path=/nixpkgs/trunk/; revision=31605
2012-01-17 16:27:57 +00:00

57 lines
2 KiB
Diff

diff --git a/cmake/modules/FindSVN.cmake b/cmake/modules/FindSVN.cmake
index 59bcb96..2eac05d 100644
--- a/cmake/modules/FindSVN.cmake
+++ b/cmake/modules/FindSVN.cmake
@@ -17,6 +17,9 @@ FIND_PROGRAM(SVNCONFIG_EXECUTABLE NAMES svn-config PATHS
FIND_PROGRAM(APRCONFIG_EXECUTABLE NAMES apr-1-config apr-config PATHS
/usr/local/apr/bin
)
+find_program(APUCONFIG_EXECUTABLE NAMES apu-1-config apu-config PATHS
+ /usr/local/apr/bin
+)
if(SVNCONFIG_EXECUTABLE)
@@ -56,15 +59,8 @@ else(SVNCONFIG_EXECUTABLE)
set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
else(APRCONFIG_EXECUTABLE)
FIND_PATH(_INCLUDES apr_pools.h
- ${SVN_INCLUDES}/apr-0/
- ${SVN_INCLUDES}/apr-1/
- ${SVN_INCLUDES}/apr-1.0/
- /usr/include/apr-0/
- /usr/include/apr-1/
- /usr/include/apr-1.0/
- /usr/local/include/apr-0/
- /usr/local/include/apr-1/
- /usr/local/include/apr-1.0/
+ HINTS ${SVN_INCLUDES}
+ SUFFIXES apr-0 apr-1 apr-1.0
)
if(_INCLUDES)
set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
@@ -72,6 +69,24 @@ else(SVNCONFIG_EXECUTABLE)
set(SVN_FOUND FALSE) # no apr == can't compile!
endif(_INCLUDES)
endif(APRCONFIG_EXECUTABLE)
+
+ # Use apu-config if it exists
+ if(APUCONFIG_EXECUTABLE)
+ EXEC_PROGRAM(${APUCONFIG_EXECUTABLE} ARGS --includes RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _INCLUDES)
+ string(REPLACE "-I" "" _INCLUDES ${_INCLUDES})
+ string(REPLACE " " ";" _INCLUDES ${_INCLUDES})
+ set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
+ else(APUCONFIG_EXECUTABLE)
+ FIND_PATH(_INCLUDES apu.h
+ HINTS ${SVN_INCLUDES}
+ SUFFIXES apr-0 apr-1 apr-1.0
+ )
+ if(_INCLUDES)
+ set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
+ else(_INCLUDES)
+ set(SVN_FOUND FALSE) # no apr == can't compile!
+ endif(_INCLUDES)
+ endif(APUCONFIG_EXECUTABLE)
FIND_LIBRARY(SVN_LIBRARIES NAMES svn_client-1)
if(SVN_LIBRARIES)
FIND_LIBRARY(_LIBRARIES NAMES svn_subr-1)