MFH: r499101 r499116 r502628

Fix build when using GCC. Needed by GCC architectures.

Tested for no breakage on amd64 with Clang.

PR:	235921
Reviewed by:	tcberner
Approved by:	tcberner (mentor)

devel/qt5: Follow-up to r499101

- Move the GCC related path fix into freebsd-g++/qmake.conf
  Otherwise the inclusion of the GCC path would break clang
  based systems when gcc-${GCC_DEFAULT} was installed.

- This might break GCC architectures again, and if so, that
  will be fixed in a follow up commit.

PR:		235921

qt5: fix build on gcc architectures

- the sed call was only replacing one of the %%LOCALBASE%% by ${LOCALBASE},
  due to the missing 'g' flag to the sed call.

- with this change the gcc architectures should be able to build Qt5 again.

PR:		237745
Submitted by:	Mark Millard <marklmi26-fbsd@yahoo.com>, jwb
Reported by:	pkubaj

Approved by:	ports-secteam (joneum via irc)
This commit is contained in:
Tobias C. Berner 2019-05-25 20:53:13 +00:00
parent 3060f89211
commit aabf55262c
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2019Q2/; revision=502634
3 changed files with 24 additions and 6 deletions

View File

@ -172,7 +172,8 @@ _EXTRA_PATCHES_QT5= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_fe
${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_common_bsd_bsd.conf
. if ${ARCH:Mmips*} || ${ARCH:Mpowerpc*} || ${ARCH} == sparc64
_EXTRA_PATCHES_QT5+= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_g++-base.conf \
${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf
${PORTSDIR}/devel/${_QT_RELNAME}/files/extra-patch-mkspecs_common_gcc-base.conf \
${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-mkspecs_freebsd-g++_qmake.conf
USE_GCC= yes
. endif
EXTRA_PATCHES?= ${PORTSDIR}/devel/${_QT_RELNAME}/files/extrapatch-configure \
@ -249,9 +250,14 @@ _QT5_BASE= core dbus gui network sql widgets
.if ${_QT_VER:M5}
post-patch: gcc-post-patch
gcc-post-patch:
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|' ${WRKSRC}/mkspecs/common/gcc-base.conf
${REINPLACE_CMD} 's|%%GCC_DEFAULT%%|${GCC_DEFAULT}|' ${WRKSRC}/mkspecs/common/gcc-base.conf \
${WRKSRC}/mkspecs/common/g++-base.conf
${REINPLACE_CMD} 's|%%LOCALBASE%%|${LOCALBASE}|g' \
${WRKSRC}/mkspecs/common/gcc-base.conf \
${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
${REINPLACE_CMD} 's|%%GCC_DEFAULT%%|${GCC_DEFAULT}|g' \
${WRKSRC}/mkspecs/common/gcc-base.conf \
${WRKSRC}/mkspecs/common/g++-base.conf \
${WRKSRC}/mkspecs/common/bsd/bsd.conf \
${WRKSRC}/mkspecs/freebsd-g++/qmake.conf
.endif
pre-configure: qtbase-pre-configure
@ -321,8 +327,8 @@ qt5-pre-configure:
# occurrences of ${WRKSRC}/lib from .pc and .prl files when installing them.
# See QTBUG-40825 and ports bugs 194088, 195105 and 198720.
${ECHO_CMD} 'QMAKE_LIBDIR_FLAGS = -L${CONFIGURE_WRKSRC}/lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache
${ECHO_CMD} 'QMAKE_DEFAULT_LIBDIRS = ${LOCALBASE}/lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache
${ECHO_CMD} 'QMAKE_DEFAULT_INCDIRS = ${LOCALBASE}/include' >> ${CONFIGURE_WRKSRC}/.qmake.cache
${ECHO_CMD} 'QMAKE_DEFAULT_LIBDIRS += ${LOCALBASE}/lib /usr/lib /lib' >> ${CONFIGURE_WRKSRC}/.qmake.cache
${ECHO_CMD} 'QMAKE_DEFAULT_INCDIRS += ${LOCALBASE}/include /usr/include' >> ${CONFIGURE_WRKSRC}/.qmake.cache
post-install: qt-post-install
qt-post-install:

View File

@ -2,6 +2,7 @@
PORTNAME= qmake
DISTVERSION= ${QT5_VERSION}
PORTREVISION= 1
CATEGORIES= devel
PKGNAMEPREFIX= qt5-

View File

@ -0,0 +1,11 @@
--- mkspecs/freebsd-g++/qmake.conf.orig 2019-04-16 18:13:12 UTC
+++ mkspecs/freebsd-g++/qmake.conf
@@ -11,6 +11,8 @@ include(../common/bsd/bsd.conf)
QMAKE_INCDIR_POST = /usr/local/include
QMAKE_LIBDIR_POST = /usr/local/lib
+EXTRA_INCLUDEPATH += %%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include %%LOCALBASE%%/lib/gcc%%GCC_DEFAULT%%/include/c++
+
include(../common/gcc-base-unix.conf)
include(../common/g++-unix.conf)
load(qt_config)