From owner-svn-ports-head@FreeBSD.ORG Mon Jan 20 12:27:39 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBF67863; Mon, 20 Jan 2014 12:27:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BBE181A75; Mon, 20 Jan 2014 12:27:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0KCRcYc053739; Mon, 20 Jan 2014 12:27:38 GMT (envelope-from rakuco@svn.freebsd.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0KCRct8053738; Mon, 20 Jan 2014 12:27:38 GMT (envelope-from rakuco@svn.freebsd.org) Message-Id: <201401201227.s0KCRct8053738@svn.freebsd.org> From: Raphael Kubo da Costa Date: Mon, 20 Jan 2014 12:27:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r340384 - head/graphics/kamera-kde4/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jan 2014 12:27:39 -0000 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 +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) +