From owner-svn-ports-all@freebsd.org Mon Jan 29 11:45:44 2018 Return-Path: Delivered-To: svn-ports-all@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 37186EB7CDC; Mon, 29 Jan 2018 11:45:44 +0000 (UTC) (envelope-from rakuco@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 DEBC76E108; Mon, 29 Jan 2018 11:45:43 +0000 (UTC) (envelope-from rakuco@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 D993527A77; Mon, 29 Jan 2018 11:45:43 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w0TBjhtb092947; Mon, 29 Jan 2018 11:45:43 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w0TBjhTn092946; Mon, 29 Jan 2018 11:45:43 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201801291145.w0TBjhTn092946@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Mon, 29 Jan 2018 11:45:43 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r460286 - head/graphics/nomacs/files X-SVN-Group: ports-head X-SVN-Commit-Author: rakuco X-SVN-Commit-Paths: head/graphics/nomacs/files X-SVN-Commit-Revision: 460286 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Jan 2018 11:45:44 -0000 Author: rakuco Date: Mon Jan 29 11:45:43 2018 New Revision: 460286 URL: https://svnweb.freebsd.org/changeset/ports/460286 Log: Add a patch to drop CMake calls to QT5_WRAP_CPP(). cmake/Utils.cmake already sets CMAKE_AUTOMOC to on. Calling QT5_WRAP_CPP() used to be just redundant, as QUAZIP_MOC_SRC and LIBQPSD_MOC_SRC were never actually added as source dependencies in MacBuildTarget.cmake and UnixBuildTarget.cmake. In other words, CMake's own automoc infrastructure was actually being used and the moc invocations from QT5_WRAP_CPP() were not being made at all. Starting with Qt 5.9.4, calling QT5_WRAP_CPP() disables the AUTOMOC property on the macro's input files, which means neither CMake's automoc infrastructure not QT5_WRAP_CPP()'s code were being used and we ended up with several 'undefined reference to vtable' errors when linking. Sent upstream: https://github.com/nomacs/nomacs/pull/187 PR: 225436 Added: head/graphics/nomacs/files/patch-cmake_Unix.cmake (contents, props changed) Added: head/graphics/nomacs/files/patch-cmake_Unix.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/graphics/nomacs/files/patch-cmake_Unix.cmake Mon Jan 29 11:45:43 2018 (r460286) @@ -0,0 +1,47 @@ +Sent upstream: https://github.com/nomacs/nomacs/pull/187 + +From 6617595f409f13f035895f6494a4d8e14047334e Mon Sep 17 00:00:00 2001 +From: Raphael Kubo da Costa +Date: Mon, 29 Jan 2018 12:01:50 +0100 +Subject: [PATCH] cmake: Stop calling QT5_WRAP_CPP() when building quazip and + libqpsd. + +cmake/Utils.cmake already sets CMAKE_AUTOMOC to on. + +Calling QT5_WRAP_CPP() used to be just redundant, as QUAZIP_MOC_SRC and +LIBQPSD_MOC_SRC were never actually added as source dependencies in +MacBuildTarget.cmake and UnixBuildTarget.cmake. In other words, CMake's own +automoc infrastructure was actually being used and the moc invocations from +QT5_WRAP_CPP() were not being made at all. + +Starting with Qt 5.9.4, calling QT5_WRAP_CPP() disables the AUTOMOC property +on the macro's input files, which means neither CMake's automoc +infrastructure not QT5_WRAP_CPP()'s code were being used and we ended up +with several 'undefined reference to vtable' errors when linking. +--- cmake/Unix.cmake.orig 2017-03-24 14:47:13 UTC ++++ cmake/Unix.cmake +@@ -97,7 +97,6 @@ unset(QUAZIP_LIBRARIES CACHE) + + unset(QUAZIP_HEADERS CACHE) + unset(QUAZIP_SOURCES CACHE) +-unset(QUAZIP_MOCS CACHE) + unset(QT_ROOT CACHE) + + if(ENABLE_QUAZIP) +@@ -116,9 +115,7 @@ if(ENABLE_QUAZIP) + + file(GLOB QUAZIP_SOURCES "3rdparty/quazip-0.7/quazip/*.c" "3rdparty/quazip-0.7/quazip/*.cpp") + file(GLOB QUAZIP_HEADERS "3rdparty/quazip-0.7/quazip/*.h") +- file(GLOB QUAZIP_MOCS "3rdparty/quazip-0.7/quazip/*.h") + +- QT5_WRAP_CPP(QUAZIP_MOC_SRC ${QUAZIP_MOCS}) + add_definitions(-DWITH_QUAZIP) + endif(USE_SYSTEM_QUAZIP) + endif(ENABLE_QUAZIP) +@@ -132,6 +129,4 @@ IF(USE_SYSTEM_LIBQPSD) + ELSE() + file(GLOB LIBQPSD_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libqpsd/*.cpp") + file(GLOB LIBQPSD_HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libqpsd/*.h") +- file(GLOB LIBQPSD_MOCS "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/libqpsd/*.h") +- QT5_WRAP_CPP(LIBQPSD_MOC_SRC ${LIBQPSD_MOCS}) + ENDIF(USE_SYSTEM_LIBQPSD)