ports/textproc/uim/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

118 lines
3.1 KiB
Makefile

# Created by: MANTANI Nobutaka <nobutaka@FreeBSD.org>
# $FreeBSD$
PORTNAME= uim
PORTVERSION= 1.8.8
PORTREVISION?= 0
CATEGORIES?= textproc
MASTER_SITES= https://github.com/uim/uim/releases/download/${PORTVERSION}/
.if !defined(UIM_SLAVE) && defined(WITHOUT_X11)
PKGNAMESUFFIX= -nox11
.endif
MAINTAINER= nobutaka@FreeBSD.org
COMMENT?= Input method library
LICENSE= BSD3CLAUSE GPLv2+ GPLv3+ LGPL21+ PD
LICENSE_COMB= multi
LICENSE_FILE= ${WRKSRC}/COPYING
USES+= gettext gmake iconv libedit libtool pathfix pkgconfig perl5 sqlite tar:bzip2
USE_LDCONFIG= yes
USE_GNOME+= glib20 intltool
USE_PERL5= build
GNU_CONFIGURE= yes
OPTIONS_DEFINE= DOCS X11
OPTIONS_DEFAULT= X11
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MX11}
USE_XORG+= x11 xext
LIB_DEPENDS+= libXft.so:x11-fonts/libXft
CONFIGURE_ARGS+= --with-x --with-xft
.endif
.if !defined(UIM_SLAVE)
.if ${PORT_OPTIONS:MX11}
USE_GNOME+= cairo gdkpixbuf2 gtk20
LIB_DEPENDS+= libfreetype.so:print/freetype2 \
libfontconfig.so:x11-fonts/fontconfig
CONFIGURE_ARGS+= --with-gtk2
.endif
CONFIGURE_ARGS+= --enable-emacs --with-sj3 --with-canna --with-prime
.endif
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CFLAGS+= -I${LOCALBASE}/include
.if !defined(UIM_SLAVE)
DOCSDIR_JA= ${PREFIX}/share/doc/ja/uim
DOCSDIR_SIGSCHEME= ${PREFIX}/share/doc/uim/sigscheme
PLIST_SUB+= DOCSDIR_JA="${DOCSDIR_JA:S,^${PREFIX}/,,}" \
DOCSDIR_SIGSCHEME="${DOCSDIR_SIGSCHEME:S,^${PREFIX}/,,}"
.endif
.if empty(PORT_OPTIONS:MX11)
PLIST_SUB+= X11="@comment "
.else
PLIST_SUB+= X11=""
.endif
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64" || ${ARCH} == "sparc64"
CONFIGURE_ARGS+= --enable-storage=fatty
.endif
.for _x in x xft gtk2 qt anthy canna m17nlib prime scim dict
.if ${CONFIGURE_ARGS:M--with-${_x}} == ""
CONFIGURE_ARGS+=--without-${_x}
.endif
.endfor
.for _x in gnome-applet kde-applet emacs pref
.if ${CONFIGURE_ARGS:M--enable-${_x}} == ""
CONFIGURE_ARGS+=--disable-${_x}
.endif
.endfor
post-patch:
${REINPLACE_CMD} -e 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKSRC}/scm/skk-custom.scm
do-build:
.if !defined(UIM_SLAVE)
.for d in replace sigscheme uim scm xim po fep emacs pixmaps tables
cd ${WRKSRC}/${d} && ${MAKE_CMD}
.endfor
.if ${PORT_OPTIONS:MX11}
cd ${WRKSRC}/gtk2/candwin && ${MAKE_CMD}
.endif
.endif
do-install:
.if !defined(UIM_SLAVE)
cd ${WRKSRC} && ${MAKE_CMD} DESTDIR=${STAGEDIR} install-data-am
.for d in sigscheme uim scm xim po fep emacs pixmaps tables
cd ${WRKSRC}/${d} && ${MAKE_CMD} DESTDIR=${STAGEDIR} install
.endfor
.if ${PORT_OPTIONS:MX11}
cd ${WRKSRC}/gtk2/candwin && ${MAKE_CMD} DESTDIR=${STAGEDIR} install
.endif
.endif
.if !defined(UIM_SLAVE)
post-install:
${MKDIR} ${STAGEDIR}${DATADIR}/helperdata
${MKDIR} ${STAGEDIR}${DOCSDIR}
${MKDIR} ${STAGEDIR}${DOCSDIR_JA}
${INSTALL_DATA} ${WRKSRC}/doc/KEY ${STAGEDIR}${DOCSDIR}/KEY
${INSTALL_DATA} ${WRKSRC}/fep/README ${STAGEDIR}${DOCSDIR}/README.fep
${INSTALL_DATA} ${WRKSRC}/fep/README ${STAGEDIR}${DOCSDIR}/README.key
${INSTALL_DATA} ${WRKSRC}/fep/README.ja ${STAGEDIR}${DOCSDIR_JA}/README.fep
${INSTALL_DATA} ${WRKSRC}/xim/README ${STAGEDIR}${DOCSDIR}/README.xim
.endif
.include <bsd.port.post.mk>