ports/audio/supercollider/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

66 lines
2.1 KiB
Makefile

# $FreeBSD$
PORTNAME= supercollider
DISTVERSION= 3.9.3
PORTREVISION= 5
CATEGORIES= audio
MASTER_SITES= https://github.com/supercollider/supercollider/releases/download/Version-${PORTVERSION}/
DISTNAME= SuperCollider-${PORTVERSION}-Source-linux
MAINTAINER= brittlehaus@gmail.com
COMMENT= Programming language for real time audio synthesis
LICENSE= GPLv3
LICENSE_FILE= ${WRKSRC}/COPYING
BUILD_DEPENDS= ${LOCALBASE}/include/boost/intrusive/unordered_set.hpp:devel/boost-libs
LIB_DEPENDS= libavahi-client.so:net/avahi-app \
libavahi-common.so:net/avahi-app \
libjack.so:audio/jack \
libsndfile.so:audio/libsndfile \
libfftw3f.so:math/fftw3-float
USES= cmake compiler:c++11-lang iconv localbase pkgconfig \
qt:5 readline shared-mime-info tar:bzip2
USE_QT= buildtools_build concurrent core declarative gui linguisttools location \
network opengl printsupport qmake_build sensors \
sql webkit widgets
USE_XORG= x11
USE_LDCONFIG= yes
WRKSRC= ${WRKDIR}/SuperCollider-Source
CMAKE_ARGS= -DCMAKE_PREFIX_PATH=${LOCALBASE}/lib/qt5 \
-DLIBUSB_1_INCLUDE_DIR=/usr/include \
-DLIBUSB_1_LIBRARY=/usr/lib/libusb.so \
-DLIBSCSYNTH=ON
DESKTOP_ENTRIES="SuperCollider IDE" "" "${LOCALBASE}/share/pixmaps/sc_ide.svg" \
"scide" "" false
OPTIONS_DEFINE= HELP SUPERNOVA
OPTIONS_DEFAULT= HELP SUPERNOVA
OPTIONS_SUB= yes
HELP_DESC= Install on-line help text
SUPERNOVA_DESC= Build with supernova as optional audio synthesis server
HELP_CMAKE_BOOL= INSTALL_HELP
SUPERNOVA_CMAKE_BOOL= SUPERNOVA
.include <bsd.port.pre.mk>
.if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
CMAKE_ARGS+= -DSSE:BOOL=FALSE -DSSE2:BOOL=FALSE
.endif
post-patch:
@${REINPLACE_CMD} -e 's|MATCHES "Linux" AND|MATCHES "FreeBSD" AND|' \
${WRKSRC}/CMakeLists.txt
@${REINPLACE_CMD} -e 's|if(DL)|if(TRUE)|; s|target_link_libraries(libsupernova $${DL})|#|' \
${WRKSRC}/server/supernova/CMakeLists.txt
@${REINPLACE_CMD} -e 's|CMAKE_SYSTEM_NAME MATCHES "Linux"|CMAKE_SYSTEM_NAME MATCHES "FreeBSD"|' \
${WRKSRC}/server/plugins/CMakeLists.txt
@${REINPLACE_CMD} -e 's|__linux__|__FreeBSD__|' ${WRKSRC}/server/supernova/server/main.cpp
.include <bsd.port.post.mk>