1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-08 12:01:56 +00:00
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

125 lines
3.9 KiB
Makefile

# Created by: chuckr@FreeBSD.org
# $FreeBSD$
PORTNAME= octave
PORTVERSION= ${OCTAVE_VERSION}
PORTREVISION= 9
CATEGORIES= math java
MASTER_SITES= GNU
MAINTAINER= stephen@FreeBSD.org
COMMENT= High-level interactive language for numerical computations
LICENSE= GPLv3
BUILD_DEPENDS= gnuplot:math/gnuplot \
${LOCALBASE}/bin/gperf:devel/gperf \
gsed:textproc/gsed \
${LOCALBASE}/bin/makeinfo:print/texinfo
RUN_DEPENDS= gnuplot:math/gnuplot \
gsed:textproc/gsed \
${LOCALBASE}/bin/makeinfo:print/texinfo
LIB_DEPENDS= libGraphicsMagick.so:graphics/GraphicsMagick \
libarpack.so:math/arpack-ng \
libcurl.so:ftp/curl \
libfftw3.so:math/fftw3 \
libfftw3f.so:math/fftw3-float \
libfltk.so:x11-toolkits/fltk \
libftgl.so:graphics/ftgl \
libhdf5.so:science/hdf5 \
libpcre.so:devel/pcre \
libqhull.so.5:math/qhull5 \
libqrupdate.so:math/qrupdate \
libumfpack.so:math/suitesparse \
libglpk.so:math/glpk \
libgl2ps.so:print/gl2ps \
libqscintilla2_qt5.so:devel/qscintilla2-qt5 \
libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libdrm.so:graphics/libdrm \
libOSMesa.so:graphics/libosmesa \
libsundials_arkode.so:math/sundials
USES= charsetfix fortran gmake libtool perl5 pkgconfig qt:5 readline \
tar:xz compiler:c++14-lang \
desktop-file-utils gl iconv
USE_LDCONFIG= ${PREFIX}/lib/${PORTNAME}/${PORTVERSION}
USE_PERL5= build
GNU_CONFIGURE= yes
USE_JAVA= yes
JAVA_VERSION= 1.7+
USE_QT= core gui help network opengl \
qmake_build buildtools_build linguist_build \
printsupport sql widgets
USE_XORG= x11 xext xfixes xft \
xcursor xinerama xrender
USE_GL= gl glu
OCTAVE_VERSION= ${PORTVERSION}
GNU_HOST= ${ARCH}-portbld-freebsd${OSREL}
PLIST_SUB= OCTAVE_VERSION=${OCTAVE_VERSION} GNU_HOST=${GNU_HOST}
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ENV= GPERF="${LOCALBASE}/bin/gperf" \
JAVA_HOME=${JAVA_HOME} \
MAKEINFO=${LOCALBASE}/bin/makeinfo \
MKINFO=${LOCALBASE}/bin/makeinfo \
MOC_QTVER=${LOCALBASE}/bin/moc \
UIC_QTVER=${LOCALBASE}/bin/uic \
RCC_QTVER=${LOCALBASE}/bin/rcc \
ac_cv_type_max_align_t=yes \
ac_cv_path_SED=${LOCALBASE}/bin/gsed
CONFIGURE_ARGS= --host=${GNU_HOST} \
--with-blas="-L${LOCALBASE}/lib ${BLASLIB}" \
--with-lapack="${LAPACKLIB}" \
--enable-shared \
--disable-jit \
--disable-openmp \
--with-qt=5 \
--with-osmesa
INFO= octave liboctave
OPTIONS_DEFINE= DOCS
DOCS_CONFIGURE_ENABLE= docs
OPTIONS_RADIO= BLAS
OPTIONS_RADIO_BLAS= OPENBLAS NETLIB ATLAS
OPTIONS_DEFAULT= OPENBLAS
DOCS_USE= TEX=dvipsk:build,formats:build
OPENBLAS_USES= blaslapack:openblas
NETLIB_USES= blaslapack:netlib
ATLAS_USES= blaslapack:atlas
post-patch:
${REINPLACE_CMD} 's+"makeinfo"+"${LOCALBASE}/bin/makeinfo"+' ${WRKSRC}/libinterp/corefcn/help.cc
${REINPLACE_CMD} 's+lapack lapack_rs6k+${LAPACKLIB:C/-l//}+' ${WRKSRC}/configure
${REINPLACE_CMD} 's+-lumfpack+-lumfpack -lsuitesparseconfig -lamd -lcholmod -lcolamd ${LAPACKLIB}+' ${WRKSRC}/configure
${REINPLACE_CMD} 's+-lcholmod+-lumfpack -lsuitesparseconfig -lamd -lcholmod -lcolamd ${LAPACKLIB}+' ${WRKSRC}/configure
${REINPLACE_CMD} 's/"-qt$$qt_version"/"-qt=qt$$qt_version"/' ${WRKSRC}/configure
post-install:
(cd ${STAGEDIR}${DATADIR} && ${LN} -s ${PORTVERSION}/imagelib .)
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/octave/${PORTVERSION}/liboctave.so.6.0.0
post-install-DOCS-on:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for file in liboctave/liboctave.ps \
refcard/refcard-a4.ps refcard/refcard-legal.ps \
refcard/refcard-letter.ps interpreter/octave.ps
${INSTALL_DATA} ${WRKSRC}/doc/${file} ${STAGEDIR}${DOCSDIR}
.endfor
@${MKDIR} ${STAGEDIR}${PREFIX}/${INFO_PATH}
.for file in interpreter/octave.info liboctave/liboctave.info
${INSTALL_DATA} ${WRKSRC}/doc/${file} ${STAGEDIR}${PREFIX}/${INFO_PATH}
.endfor
check regression-test: build
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE_CMD} ${MAKE_ARGS} check)
.include "Makefile.version"
.include <bsd.port.mk>