From owner-svn-ports-head@freebsd.org Sun Apr 8 12:33:02 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C1B3FA09D5; Sun, 8 Apr 2018 12:33:02 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2870B68046; Sun, 8 Apr 2018 12:33:02 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 0B0DD7E72; Sun, 8 Apr 2018 12:33:02 +0000 (UTC) (envelope-from adridg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w38CX1HT077190; Sun, 8 Apr 2018 12:33:01 GMT (envelope-from adridg@FreeBSD.org) Received: (from adridg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w38CX1B0077189; Sun, 8 Apr 2018 12:33:01 GMT (envelope-from adridg@FreeBSD.org) Message-Id: <201804081233.w38CX1B0077189@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adridg set sender to adridg@FreeBSD.org using -f From: Adriaan de Groot Date: Sun, 8 Apr 2018 12:33:01 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r466798 - head/databases/soci/files X-SVN-Group: ports-head X-SVN-Commit-Author: adridg X-SVN-Commit-Paths: head/databases/soci/files X-SVN-Commit-Revision: 466798 X-SVN-Commit-Repository: ports 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.25 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: Sun, 08 Apr 2018 12:33:02 -0000 Author: adridg Date: Sun Apr 8 12:33:01 2018 New Revision: 466798 URL: https://svnweb.freebsd.org/changeset/ports/466798 Log: Pre-emptively fix databases/soci for CMake 3.11. With CMake 3.11, configure fails with this error: CMake Error: The following variables are used in this project, but they are set to NOTFOUND. Please set them or make sure they are set and tested correctly in the CMake files: MYSQL_EMBEDDED_LIBRARIES linked by target "cmTC_ec547" in directory /wrkdirs/usr/ports/databases/soci/work/soci-3.2.2/CMakeFiles/CMakeTmp CMake Error at /usr/local/share/cmake/Modules/CheckIncludeFile.cmake:60 (try_compile): Failed to configure test project build system. Call Stack (most recent call first): /usr/local/share/cmake/Modules/FindThreads.cmake:121 (CHECK_INCLUDE_FILE) core/CMakeLists.txt:17 (include) The underlying issue is that the test for MySQL embedded leaks the library into CMAKE_REQUIRED_LIBRARIES, which are then picked up in other feature tests. If the library wasn't found (which is normal, it's not a dependency in the port) then those later tests fail. CMake 3.11 is somehow stricter about this than CMake 3.10. No PORTREVISION bump because it's a pre-emptive build fix and nothing changes on the port. Approved by: tcberner (mentor, implicit) Added: head/databases/soci/files/patch-cmake_modules_FindMySQL.cmake (contents, props changed) Added: head/databases/soci/files/patch-cmake_modules_FindMySQL.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/databases/soci/files/patch-cmake_modules_FindMySQL.cmake Sun Apr 8 12:33:01 2018 (r466798) @@ -0,0 +1,14 @@ +Prevent CMAKE_REQUIRED_LIBRARIES from leaking out of this module. +If the embedded libs are not found, we don't want to have the +not-found libraries required by other modules. + +--- cmake/modules/FindMySQL.cmake.orig 2013-08-21 22:40:11 UTC ++++ cmake/modules/FindMySQL.cmake +@@ -119,6 +119,7 @@ endif(MYSQL_EMBEDDED_LIBRARIES) + set( CMAKE_REQUIRED_INCLUDES ${MYSQL_INCLUDE_DIR} ) + set( CMAKE_REQUIRED_LIBRARIES ${MYSQL_EMBEDDED_LIBRARIES} ) + check_cxx_source_compiles( "#include \nint main() { int i = MYSQL_OPT_USE_EMBEDDED_CONNECTION; }" HAVE_MYSQL_OPT_EMBEDDED_CONNECTION ) ++unset( CMAKE_REQUIRED_LIBRARIES ) + + if(MYSQL_INCLUDE_DIR AND MYSQL_LIBRARIES) + set(MYSQL_FOUND TRUE)