Date: Mon, 20 Jan 2014 12:27:38 +0000 (UTC) From: Raphael Kubo da Costa <rakuco@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r340384 - head/graphics/kamera-kde4/files Message-ID: <201401201227.s0KCRct8053738@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rakuco Date: Mon Jan 20 12:27:38 2014 New Revision: 340384 URL: http://svnweb.freebsd.org/changeset/ports/340384 QAT: https://qat.redports.org/buildarchive/r340384/ Log: Fix the build after libgphoto was updated to 2.5.3 in r340071. Add an upstream patch to fix the way the detection of the gphoto version was being done in the build system. Added: head/graphics/kamera-kde4/files/ head/graphics/kamera-kde4/files/patch-git_1b10fdf (contents, props changed) Added: head/graphics/kamera-kde4/files/patch-git_1b10fdf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/kamera-kde4/files/patch-git_1b10fdf Mon Jan 20 12:27:38 2014 (r340384) @@ -0,0 +1,61 @@ +commit 1b10fdfc22646ea08683a881648989ef16d61dd1 +Author: Raphael Kubo da Costa <rakuco@FreeBSD.org> +Date: Mon Jan 20 14:16:47 2014 +0200 + + cmake: Correctly check for gp_port_info_get_name. + + CHECK_LIBRARY_EXISTS() is the wrong function to call here; we've already + looked for gphoto's librares in FindGphoto2.cmake. Instead, we are + interested in knowing whether the symbol gp_port_info_get_name is present in + the libraries, since this indicates we have gphoto >= 2.5.0. + + Additionally, we must also set CMAKE_REQUIRED_{INCLUDES,LIBRARIES} to take + into account the gphoto header and library paths we have found, otherwise + we're just relying on them being in the compiler/linker's default paths. + + While here, also set HAVE_GPHOTO2_5 directly instead of setting GPHOTO2_5 + and then using its value to set the former. + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ebae998..08d3b0e 100644 +--- CMakeLists.txt ++++ CMakeLists.txt +@@ -1,25 +1,28 @@ + project(kamera) + + find_package(KDE4 REQUIRED) ++include(CMakePushCheckState) ++include(CheckSymbolExists) + include(KDE4Defaults) + include(MacroLibrary) + include(MacroOptionalAddSubdirectory) +- + + find_package(Gphoto2) + macro_log_feature(GPHOTO2_FOUND "gphoto2" "Required to build kamera" "http://heanet.dl.sourceforge.net/sourceforge/gphoto" TRUE "" "") + +-check_library_exists(gphoto2_port gp_port_info_get_name "" GPHOTO2_5) +-if(GPHOTO2_5) +- message(STATUS "Found libgphoto 2.5") +-else(GPHOTO2_5) +- message(STATUS "libgphoto 2.5 not found, assuming libgphoto2 2.4") +-endif(GPHOTO2_5) +-set(HAVE_GPHOTO2_5 ${GPHOTO2_5}) +- +-include(ConfigureChecks.cmake) ++cmake_push_check_state() ++set(CMAKE_REQUIRED_INCLUDES "${GPHOTO2_INCLUDE_DIR}") ++set(CMAKE_REQUIRED_LIBRARIES "${GPHOTO2_LIBRARIES}") ++check_symbol_exists(gp_port_info_get_name "gphoto2.h" HAVE_GPHOTO2_5) ++cmake_pop_check_state() + ++if(HAVE_GPHOTO2_5) ++ message(STATUS "Detected libgphoto 2.5.0 or newer") ++else() ++ message(STATUS "Detected libgphoto2 2.4 or older") ++endif() + ++include(ConfigureChecks.cmake) + + configure_file(config-kamera.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-kamera.h) +
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401201227.s0KCRct8053738>