1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 13:10:33 +00:00
nixpkgs/pkgs/desktops/kde-4.7/sdk/find-svn.patch
Eelco Dolstra 22ab3fe1ab * Start of KDE 4.7. Only kdelibs builds currently.
svn path=/nixpkgs/branches/kde-4.7/; revision=27645
2011-07-07 20:48:51 +00:00

60 lines
2.1 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,9 @@ 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}
+ PATHS /usr /usr/local
+ SUFFIXES apr-0 apr-1 apr-1.0
)
if(_INCLUDES)
set(SVN_INCLUDES ${SVN_INCLUDES} ${_INCLUDES})
@@ -72,6 +69,25 @@ 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}
+ PATHS /usr /usr/local
+ 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)