blob: bbdb36246bbc9be59ad196fbc4450f73077caaa0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# $NetBSD: Makefile.common,v 1.24 2022/11/30 20:57:36 nros Exp $
# used by audio/qt6-qtspeech/Makefile
# used by databases/qt6-odbc/Makefile
# used by databases/qt6-psql/Makefile
# used by devel/qt6-qttools/Makefile
# used by graphics/qt6-qt3d/Makefile
# used by graphics/qt6-qtcharts/Makefile
# used by graphics/qt6-qtdatavis3d/Makefile
# used by graphics/qt6-qtimageformats/Makefile
# used by graphics/qt6-qtlottie/Makefile
# used by graphics/qt6-qtquick3d/Makefile
# used by graphics/qt6-qtquicktimeline/Makefile
# used by graphics/qt6-qtshadertools/Makefile
# used by graphics/qt6-qtsvg/Makefile
# used by lang/qt6-qtdeclarative/Makefile
# used by lang/qt6-qtlanguageserver/Makefile
# used by lang/qt6-qtscxml/Makefile
# used by multimedia/qt6-qtmultimedia/Makefile
# used by net/qt6-qtremoteobjects/Makefile
# used by net/qt6-qtwebsockets/Makefile
# used by security/qt6-qtnetworkauth/Makefile
# used by www/qt6-qthttpserver/Makefile
# used by www/qt6-qtwebchannel/Makefile
# used by x11/qt6-qtbase/Makefile
.include "../../meta-pkgs/qt6/Makefile.common"
.include "../../mk/dlopen.buildlink3.mk"
BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q}
USE_LANGUAGES= c c++
USE_TOOLS+= cmake gmake perl:build pkg-config
# https://doc.qt.io/qt-6/supported-platforms.html
GCC_REQD+= 9
# Avoid failures to due 'register' usage in X11 headers.
CXXFLAGS+= -Wno-register
# wcstof(3) etc. is used in C++ code.
CFLAGS.NetBSD+= -D_NETBSD_SOURCE
# ld: undefined symbol qt_version_tag
CFLAGS.SunOS+= -DQT_NO_VERSION_TAGGING
# 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
MAKE_ENV+= QTPREFIX=${QTPREFIX:Q}
PLIST_VARS+= notdarwin
.if ${OPSYS} != "Darwin"
PLIST.notdarwin= yes
.endif
# pkgsrc does not set rpath during build
# but qdbuscpp2xml and qdbuscpp2xml are
# executed during build,
# some libs also link to libs in lib so
# this is needed by some ld:s to not
# cause linking errors.
MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/lib
# avoid creating a .qt directory in the users home directory
SCRIPTS_ENV+= HOME=${WRKDIR}
.if "${PKGPATH}" != "x11/qt6-qtbase"
CONFIGURE_ARGS+= -cmake-use-default-generator
. if ${OPSYS} != "Darwin"
CONFIGURE_ARGS+= -- -DCMAKE_SKIP_RPATH:BOOL=TRUE
. endif
QTCONFDIR?= .
do-configure:
cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${QTPREFIX}/bin/qt-configure-module ${QTCONFDIR} ${CONFIGURE_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" -print | \
while read lib; do \
libname=`basename $${lib}`; \
libdir=`dirname $${lib} | sed -e 's,${DESTDIR},,'`; \
install_name_tool -id $${libdir}/$${libname} $${lib}; \
done
.endif
PKGCONFIG_OVERRIDE_STAGE= post-build
.PHONY: pkgconfig-link
post-install: pkgconfig-link
pkgconfig-link:
${RUN} if ${TEST} -d ${DESTDIR}${QTPREFIX}/lib/pkgconfig; then \
${ECHO} -- Linking pkg-config files to pkgconfig dir in prefix; \
${INSTALL_DATA_DIR} ${DESTDIR}${PREFIX}/lib/pkgconfig; \
${FIND} ${DESTDIR}${QTPREFIX}/lib/pkgconfig -name "*.pc" -print | \
while read pcpath; do \
pcfile=`basename $${pcpath}`; \
cd ${DESTDIR}${PREFIX}/lib/pkgconfig && \
${LN} -f -s ${QTPREFIX}/lib/pkgconfig/$${pcfile} $${pcfile}; \
done \
fi
|