freebsd-ports/biology/ugene/Makefile
Tijl Coosemans 1bf487d3e7 Fix Qt5 symbol version scripts to put the catch-all clause first. When
a symbol matches multiple clauses the last one takes precedence.  If the
catch-all is last it captures everything.  In the case of Qt5 libraries
this caused all symbols to have a Qt_5 label while some should have
Qt_5_PRIVATE_API.  This only affects lld because GNU ld always gives the
catch-all lowest priority.

Older versions of Qt5Webengine exported some memory allocation symbols from
the bundled Chromium.  Version 5.9 stopped exporting these [1] but the
symbols were kept as weak wrappers for the standard allocation functions to
maintain binary compatibility. [2][3]  The problem is that the call to the
standard function in these weak wrappers is only resolved to the standard
function if there's a call to this standard function in other parts of
Qt5Webengine, because only then is there a non-weak symbol that takes
precedence over the weak one.  If there's no such non-weak symbol the call
in the weak wrapper resolves to the weak wrapper itself creating an infinite
call loop that overflows the stack and causes a crash.  Some of the
allocation functions are variants of C++ new and delete and it probably
depends on the compiler whether these variants are used in other parts of
Qt5Webengine.

Remove the weak wrappers (make them Linux specific).  This isn't binary
compatible but we are already breaking that with the changes to the symbol
versions.

[1] 5c2cbfccf9
[2] 2ed5054e3a
[3] 009f5ebb4b

Bump all ports that depend on Qt5.

PR:		234070
Exp-run by:	antoine
Approved by:	kde (adridg)
2019-01-16 11:13:44 +00:00

72 lines
2.1 KiB
Makefile

# Created by: Hannes Hauswedell <h2+fbsdports@fsfe.org>
# $FreeBSD$
PORTNAME= ugene
DISTVERSION= 1.31.0
PORTREVISION= 1
CATEGORIES= biology science
MASTER_SITES= http://ugene.unipro.ru/downloads/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX} QueryDesigner_UserManual.pdf \
UniproUGENE_UserManual.pdf WorkflowDesigner_UserManual.pdf
DIST_SUBDIR= ${PORTNAME}
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
MAINTAINER= h2+fbsdports@fsfe.org
COMMENT= Free, open-source, cross-platform bioinformatics toolkit
LICENSE= GPLv2+
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
RUN_DEPENDS= bash:shells/bash
BROKEN_aarch64= Fails to build: invokes x86 asm
USES= desktop-file-utils qmake qt:5 shared-mime-info
USE_GL= gl glu
USE_QT= buildtools_build linguisttools_build \
core gui network opengl printsupport script scripttools \
sql svg testlib webkit widgets xml \
imageformats_run
USE_XORG= x11 xtst
QMAKE_ARGS= INSTALL_PREFIX="${PREFIX}" UGENE_INSTALL_DATA="${DATADIR}" \
INSTALL_MANDIR="${MAN1PREFIX}/man" LRELEASE="${LRELEASE}" \
LUPDATE="${LUPDATE}"
ALL_TARGET= release
DOCSDIR= ${DATADIR}/manuals
OPTIONS_DEFINE= DOCS OPENCL
DOCS_DESC= Install official UGENE documentation (PDF)
OPENCL_QMAKE_ON= UGENE_OPENCL_DETECTED=1
.include <bsd.port.pre.mk>
.if ${ARCH} == amd64
# XXX: need to manually tell the build we are on x64
QMAKE_ARGS+= CONFIG+=x64
.endif
.if ${MACHINE_CPU:Msse2}
QMAKE_ARGS+= UGENE_SSE2_DETECTED=1
.endif
post-extract:
@${MKDIR} ${WRKSRC}/data/manuals
${CP} -p ${_DISTDIR}/*.pdf ${WRKSRC}/data/manuals
post-patch:
# yes, bash is required, stuff will not execute with sh
@${REINPLACE_CMD} -e 's|/bin/bash|/usr/bin/env bash|' \
${WRKSRC}/src/gen_bin_script.cmd \
${WRKSRC}/installer/_common_data/ugene
@${REINPLACE_CMD} -e 's|-bit version|& for ${OPSYS}/${ARCH}|' \
${WRKSRC}/src/ugeneui/src/main_window/AboutDialogController.cpp
@${REINPLACE_CMD} 's, -lbreakpad,,' \
${WRKSRC}/src/corelibs/U2Private/U2Private.pri \
${WRKSRC}/src/plugins_checker/plugins_checker.pri \
${WRKSRC}/src/ugenecl/ugenecl.pri \
${WRKSRC}/src/ugeneui/ugeneui.pri
.include <bsd.port.post.mk>