pkgsrc/x11/qt5-qtbase/Makefile.common
adam 81fc0d5ad9 qt5: updated to 5.15.3
5.15.3:
Bug fix, LTS, release.

qt5-qtwebengine patches courtesy of @markd.
2022-04-18 11:18:15 +00:00

89 lines
2.9 KiB
Text

# $NetBSD: Makefile.common,v 1.49 2022/04/18 11:18:15 adam Exp $
# used by x11/qt5-mysql/Makefile
# used by x11/qt5-odbc/Makefile
# used by x11/qt5-psql/Makefile
# used by x11/qt5-qtbase/Makefile
# used by x11/qt5-qtcharts/Makefile
# used by x11/qt5-qtconnectivity/Makefile
# used by x11/qt5-qtdeclarative/Makefile
# used by x11/qt5-qtdoc/Makefile
# used by x11/qt5-qtgraphicaleffects/Makefile
# used by x11/qt5-qtimageformats/Makefile
# used by x11/qt5-qtlocation/Makefile
# used by x11/qt5-qtmacextras/Makefile
# used by x11/qt5-qtmultimedia/Makefile
# used by x11/qt5-qtnetworkauth/Makefile
# used by x11/qt5-qtquickcontrols/Makefile
# used by x11/qt5-qtquickcontrols2/Makefile
# used by x11/qt5-qtscript/Makefile
# used by x11/qt5-qtscxml/Makefile
# used by x11/qt5-qtsensors/Makefile
# used by x11/qt5-qtserialport/Makefile
# used by x11/qt5-qtspeech/Makefile
# used by x11/qt5-qtsvg/Makefile
# used by x11/qt5-qttools/Makefile
# used by x11/qt5-qttranslations/Makefile
# used by x11/qt5-qtvirtualkeyboard/Makefile
# used by x11/qt5-qtwayland/Makefile
# used by x11/qt5-qtwebchannel/Makefile
# used by x11/qt5-qtwebengine/Makefile
# used by x11/qt5-qtwebsockets/Makefile
# used by x11/qt5-qtx11extras/Makefile
# used by x11/qt5-qtxmlpatterns/Makefile
WRKSRC= ${WRKDIR}/${DISTNAME:S/-opensource//}
# https://doc.qt.io/qt-5/supported-platforms.html
GCC_REQD+= 5
.include "../../x11/qt5/Makefile.common"
.include "../../mk/dlopen.buildlink3.mk"
BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q}
USE_LANGUAGES= c gnu++11
USE_TOOLS+= gmake perl:build pkg-config
# Avoid failures to due 'register' usage in X11 headers.
CFLAGS+= -Wno-register
# wcstof(3) etc. is used in C++ code.
CFLAGS.NetBSD+= -D_NETBSD_SOURCE
# include/openssl/e_os2.h:283:25: error: '_Noreturn' does not name a type
CXXFLAGS.SunOS+= -D_Noreturn=""
# for GL_GLEXT_LEGACY with GL/gl.h error, GL_ARB_shader_objects is not defined.
BUILDLINK_TRANSFORM+= rm:-Wundef
# SunOS ld doesn't support -rpath-link
BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${PREFIX}/qt5/lib
BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,-rpath-link,${WRKSRC}/lib
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
PLIST_VARS+= notdarwin
.if ${OPSYS} != "Darwin"
PLIST.notdarwin= yes
.endif
# avoid creating a .qt directory in the users home directory
SCRIPTS_ENV+= HOME=${WRKDIR}
.if "${PKGPATH}" != "x11/qt5-qtbase" && "${PKGPATH}" != "x11/qt5-odbc" && \
"${PKGPATH}" != "x11/qt5-mysql" && "${PKGPATH}" != "x11/qt5-psql" && \
"${PKGPATH}" != "x11/qt5-qtwayland"
do-configure:
cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${QTPREFIX}/bin/qmake -o Makefile ${QMAKE_ARGS}
.endif
.if ${OPSYS} == "Darwin"
.PHONY: fix-darwin-install-name
post-install: fix-darwin-install-name
fix-darwin-install-name:
${FIND} ${DESTDIR}${PREFIX} -name "*.dylib" -type f -print | \
while read lib; do \
libname=`basename $${lib}`; \
libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \
install_name_tool -id $${libdir}/$${libname} $${lib}; \
done
.endif