# $NetBSD: Makefile.common,v 1.37 2020/01/22 14:06:08 ryoon 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-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-qtwebkit/Makefile # used by x11/qt5-qtwebsockets/Makefile # used by x11/qt5-qtx11extras/Makefile # used by x11/qt5-qtxmlpatterns/Makefile .include "../../x11/qt5/Makefile.common" .include "options.mk" .include "../../mk/dlopen.buildlink3.mk" BUILDLINK_TRANSFORM+= opt:-ldl:${BUILDLINK_LDADD.dl:Q} USE_LANGUAGES= c c++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 # 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+= unix .if ${OPSYS} != "Darwin" PLIST.unix= 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 .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