misc/kdeadmin4: Detect libcrypt rather than scan for crypt.h This patch camed from kde 4.7 and fixes the DragonFly build.diff -r1.38 -r1.39 pkgsrc/misc/kdeadmin3/distinfo
(marino)
@@ -1,7 +1,8 @@ | @@ -1,7 +1,8 @@ | |||
1 | $NetBSD: distinfo,v 1.38 2011/01/20 12:05:56 markd Exp $ | 1 | $NetBSD: distinfo,v 1.39 2011/12/06 19:12:04 marino Exp $ | |
2 | 2 | |||
3 | SHA1 (kdeadmin-3.5.10.tar.bz2) = 952e9ba9bbd6b92e3a5a4a34fe3a78d7d41bc719 | 3 | SHA1 (kdeadmin-3.5.10.tar.bz2) = 952e9ba9bbd6b92e3a5a4a34fe3a78d7d41bc719 | |
4 | RMD160 (kdeadmin-3.5.10.tar.bz2) = f271d929752c8927546261184ee905094e8ae3c9 | 4 | RMD160 (kdeadmin-3.5.10.tar.bz2) = f271d929752c8927546261184ee905094e8ae3c9 | |
5 | Size (kdeadmin-3.5.10.tar.bz2) = 2124067 bytes | 5 | Size (kdeadmin-3.5.10.tar.bz2) = 2124067 bytes | |
6 | SHA1 (patch-kuser_CMakeLists.txt) = f8bea7481739cd2e762d62193025aa8b9faa593f | |||
6 | SHA1 (patch-aa) = fdb705f78c783b4210804c8214998ea83e09f9ac | 7 | SHA1 (patch-aa) = fdb705f78c783b4210804c8214998ea83e09f9ac | |
7 | SHA1 (patch-ab) = 9584b66e06f30580091da2d55f2593750663e553 | 8 | SHA1 (patch-ab) = 9584b66e06f30580091da2d55f2593750663e553 |
$NetBSD: patch-kuser_CMakeLists.txt,v 1.1 2011/12/06 19:12:04 marino Exp $
--- kuser/CMakeLists.txt.orig 2008-12-04 08:35:50.000000000 +0000
+++ kuser/CMakeLists.txt
@@ -3,6 +3,7 @@ project(kuser)
find_package(KdepimLibs REQUIRED)
include(CheckFunctionExists)
+include(CheckLibraryExists)
include(TestBigEndian)
@@ -26,6 +27,7 @@ check_include_files(crypt.h HAVE_CRYPT_H
check_include_files(sys/stat.h HAVE_SYS_STAT_H)
check_include_files(unistd.h HAVE_UNISTD_H)
check_include_files(paths.h HAVE_PATHS_H)
+check_library_exists(crypt crypt "" HAVE_CRYPT_LIBRARY)
set(CMAKE_REQUIRED_INCLUDES pwd.h)
check_function_exists(fgetpwent HAVE_FGETPWENT)
@@ -72,9 +74,9 @@ kde4_add_ui_files(kuser_SRCS ku_filesset
kde4_add_executable(kuser ${kuser_SRCS})
target_link_libraries(kuser ${KDE4_KIO_LIBS} ${KDE4_KLDAP_LIBS} kntlm)
-if(HAVE_CRYPT_H)
+if(HAVE_CRYPT_LIBRARY)
target_link_libraries(kuser crypt)
-endif(HAVE_CRYPT_H)
+endif(HAVE_CRYPT_LIBRARY)
install(TARGETS kuser ${INSTALL_TARGETS_DEFAULT_ARGS})