diff options
author | rakuco <rakuco@FreeBSD.org> | 2014-01-20 20:27:38 +0800 |
---|---|---|
committer | rakuco <rakuco@FreeBSD.org> | 2014-01-20 20:27:38 +0800 |
commit | 3349f318acfbbcec7802bd798e5a1fe0b4619150 (patch) | |
tree | 6ee423889eb518a7c0714f3a7211380ac5915e8a /graphics/kamera-kde4 | |
parent | 360b392724744f236ed88a31ade6c1969ca1d05a (diff) | |
download | freebsd-ports-gnome-3349f318acfbbcec7802bd798e5a1fe0b4619150.tar.gz freebsd-ports-gnome-3349f318acfbbcec7802bd798e5a1fe0b4619150.tar.zst freebsd-ports-gnome-3349f318acfbbcec7802bd798e5a1fe0b4619150.zip |
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.
Diffstat (limited to 'graphics/kamera-kde4')
-rw-r--r-- | graphics/kamera-kde4/files/patch-git_1b10fdf | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/graphics/kamera-kde4/files/patch-git_1b10fdf b/graphics/kamera-kde4/files/patch-git_1b10fdf new file mode 100644 index 000000000000..a2b81bb61334 --- /dev/null +++ b/graphics/kamera-kde4/files/patch-git_1b10fdf @@ -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) + |