File:  [cvs.NetBSD.org] / pkgsrc / x11 / qt5-qtbase / Makefile.common
Revision 1.55: download - view: text, annotated - select for diffs
Mon Sep 2 20:52:58 2024 UTC (5 months, 1 week ago) by adam
Branches: MAIN
CVS tags: pkgsrc-2024Q4-base, pkgsrc-2024Q4, pkgsrc-2024Q3-base, pkgsrc-2024Q3, HEAD
qt5: updated to 5.15.15

5.15.15:
Bug fixes.

# $NetBSD: Makefile.common,v 1.55 2024/09/02 20:52:58 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 c++
USE_CXX_FEATURES?=	c++17
FORCE_CXX_STD?=		gnu++17
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

# Remove unknown ld(1) options
BUILDLINK_TRANSFORM.Darwin+=	rm:-Wl,-O1
BUILDLINK_TRANSFORM.Darwin+=	rm:-Wl,--no-undefined

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

CVSweb <webmaster@jp.NetBSD.org>