From ddfbb919a789829cf213cd0eb4a511cbe868e9a5 Mon Sep 17 00:00:00 2001 From: Boris Pek Date: Sun, 14 Oct 2012 02:13:10 +0300 Subject: [PATCH 1/2] Fix build in Debian GNU/kFreeBSD. --- src/system.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/system.h b/src/system.h index 12e5b3c..4e40094 100644 --- a/src/system.h +++ b/src/system.h @@ -124,7 +124,7 @@ #include #endif -#if defined(BSD_LIKE) || defined(__sun__) +#if ( defined(BSD_LIKE) && !defined(__FreeBSD_kernel__) ) || defined(__sun__) #undef HAVE_STRNDUP #undef HAVE_MEMMEM #endif From e6cb7a7e10cc54a1b730c796c0876a347832649b Mon Sep 17 00:00:00 2001 From: Jan Vidar Krey Date: Sun, 14 Oct 2012 22:24:33 +0000 Subject: [PATCH 2/2] Revert "Add possibility to specify UHUB_REVISION manually." This reverts commit dcfcf3110d0058a3aedfb90185622496103b8625. --- CMakeLists.txt | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e14d09..2e8c11d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,20 +121,13 @@ if(UNIX) endif() endif() -if (NOT UHUB_REVISION AND GIT_FOUND) - execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%h OUTPUT_VARIABLE UHUB_REVISION_TEMP) - if (UHUB_REVISION_TEMP) - set (UHUB_REVISION "git-${UHUB_REVISION_TEMP}") - endif() +if(GIT_FOUND AND IS_DIRECTORY ".git") + execute_process(COMMAND ${GIT_EXECUTABLE} show -s --pretty=format:%h OUTPUT_VARIABLE UHUB_REVISION) + set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-git-${UHUB_REVISION}") +else() + set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-release") endif() -if (NOT UHUB_REVISION) - set (UHUB_REVISION "release") -endif() - -set (UHUB_GIT_VERSION "${UHUB_VERSION_MAJOR}.${UHUB_VERSION_MINOR}.${UHUB_VERSION_PATCH}-${UHUB_REVISION}") -message (STATUS "Current uHub version: ${UHUB_GIT_VERSION}") - if(OPENSSL_FOUND) add_definitions(-DSSL_SUPPORT=1) include_directories(${OPENSSL_INCLUDE_DIR})