Date: Mon, 11 Jul 2016 21:02:50 +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: r418407 - in head/print/lyx: . files Message-ID: <201607112102.u6BL2o01076301@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rakuco Date: Mon Jul 11 21:02:50 2016 New Revision: 418407 URL: https://svnweb.freebsd.org/changeset/ports/418407 Log: Add patch to fix the build on FreeBSD 10.1. LyX 2.2.0 had some code changes and is using std::bind() when C++11 support is available. The libc++ version on 10.0 and 10.1 does not work as expected, so force boost::bind() on those systems to avoid the following error: frontends/qt4/liblyxqt4.a(GuiWorkArea.o): In function `_ZN5boost6detail8function26void_function_obj_invoker0INSt3__16__bindIMN3lyx8frontend11GuiWorkAreaEFvvEJPS7_EEEvE6invokeERNS1_15function_bufferE': GuiWorkArea.cpp:(.text._ZN5boost6detail8function26void_function_obj_invoker0INSt3__16__bindIMN3lyx8frontend11GuiWorkAreaEFvvEJPS7_EEEvE6invokeERNS1_15function_bufferE[_ZN5boost6detail8function26void_function_obj_invoker0INSt3__16__bindIMN3lyx8frontend11GuiWorkAreaEFvvEJPS7_EEEvE6invokeERNS1_15function_bufferE]+0xa): undefined reference to `_ZNSt3__18__invokeIRMN3lyx8frontend11GuiWorkAreaEFvvERPS3_JEvEEDTcldsdeclsr3std3__1E7forwardIT0_Efp0_Efp_spclsr3std3__1E7forwardIT1_Efp1_EEEOT_OS9_DpOSA_' /usr/bin/ld: lyx: hidden symbol `_ZNSt3__18__invokeIRMN3lyx8frontend11GuiWorkAreaEFvvERPS3_JEvEEDTcldsdeclsr3std3__1E7forwardIT0_Efp0_Efp_spclsr3std3__1E7forwardIT1_Efp1_EEEOT_OS9_DpOSA_' isn't defined /usr/bin/ld: final link failed: Nonrepresentable section on output Added: head/print/lyx/files/extrapatch-src_frontends_qt4_GuiWorkArea.cpp (contents, props changed) Modified: head/print/lyx/Makefile Modified: head/print/lyx/Makefile ============================================================================== --- head/print/lyx/Makefile Mon Jul 11 20:45:40 2016 (r418406) +++ head/print/lyx/Makefile Mon Jul 11 21:02:50 2016 (r418407) @@ -48,4 +48,10 @@ HUNSPELL_LIB_DEPENDS= libhunspell-1.3.so NLS_CONFIGURE_OFF= --disable-nls NLS_USES= gettext -.include <bsd.port.mk> +.include <bsd.port.pre.mk> + +.if ${OPSYS} == FreeBSD && (${OSVERSION} >= 1000000 && ${OSVERSION} < 1002000) +EXTRA_PATCHES= ${FILESDIR}/extrapatch-src_frontends_qt4_GuiWorkArea.cpp +.endif + +.include <bsd.port.post.mk> Added: head/print/lyx/files/extrapatch-src_frontends_qt4_GuiWorkArea.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/print/lyx/files/extrapatch-src_frontends_qt4_GuiWorkArea.cpp Mon Jul 11 21:02:50 2016 (r418407) @@ -0,0 +1,28 @@ +This patch is necessary for FreeBSD 10.0 and 10.1, whose libc++ does not work +with boost and std::bind() and leads to the following failure: + +frontends/qt4/liblyxqt4.a(GuiWorkArea.o): In function `_ZN5boost6detail8function26void_function_obj_invoker0INSt3__16__bindIMN3lyx8frontend11GuiWorkAreaEFvvEJPS7_EEEvE6invokeERNS1_15function_bufferE': +GuiWorkArea.cpp:(.text._ZN5boost6detail8function26void_function_obj_invoker0INSt3__16__bindIMN3lyx8frontend11GuiWorkAreaEFvvEJPS7_EEEvE6invokeERNS1_15function_bufferE[_ZN5boost6detail8function26void_function_obj_invoker0INSt3__16__bindIMN3lyx8frontend11GuiWorkAreaEFvvEJPS7_EEEvE6invokeERNS1_15function_bufferE]+0xa): undefined reference to `_ZNSt3__18__invokeIRMN3lyx8frontend11GuiWorkAreaEFvvERPS3_JEvEEDTcldsdeclsr3std3__1E7forwardIT0_Efp0_Efp_spclsr3std3__1E7forwardIT1_Efp1_EEEOT_OS9_DpOSA_' +/usr/bin/ld: lyx: hidden symbol `_ZNSt3__18__invokeIRMN3lyx8frontend11GuiWorkAreaEFvvERPS3_JEvEEDTcldsdeclsr3std3__1E7forwardIT0_Efp0_Efp_spclsr3std3__1E7forwardIT1_Efp1_EEEOT_OS9_DpOSA_' isn't defined +/usr/bin/ld: final link failed: Nonrepresentable section on output + +--- src/frontends/qt4/GuiWorkArea.cpp.orig 2016-05-23 23:47:31 UTC ++++ src/frontends/qt4/GuiWorkArea.cpp +@@ -55,6 +55,8 @@ + #include "frontends/FontMetrics.h" + #include "frontends/WorkAreaManager.h" + ++#include <boost/bind.hpp> ++ + #include <QContextMenuEvent> + #if (QT_VERSION < 0x050000) + #include <QInputContext> +@@ -320,7 +322,7 @@ void GuiWorkArea::init() + d->setCursorShape(Qt::IBeamCursor); + + d->synthetic_mouse_event_.timeout.timeout.connect( +- bind(&GuiWorkArea::generateSyntheticMouseEvent, ++ boost::bind(&GuiWorkArea::generateSyntheticMouseEvent, + this)); + + // Initialize the vertical Scroll Bar
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201607112102.u6BL2o01076301>