pkgsrc/cad/qcad/Makefile
nia 09316f11c6 qcad: Fix building with unrecognized (newer) Qt versions.
It's using the same script bindings for every Qt version past 5.5.0,
so the version check isn't actually necessary at this point. Just pretend
to be 5.5.0 and install those bindings.

While here, install icons and avoid installing .gitignore files.

Bump PKGREVISION.
2019-09-19 21:59:36 +00:00

79 lines
3 KiB
Makefile

# $NetBSD: Makefile,v 1.77 2019/09/19 21:59:36 nia Exp $
#
DISTNAME= qcad-3.23.0.0
PKGREVISION= 3
CATEGORIES= cad
MASTER_SITES= ${MASTER_SITE_GITHUB:=qcad/}
EXTRACT_USING= bsdtar
GITHUB_TAG= v${PKGVERSION_NOREV}
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://www.qcad.org/
COMMENT= 2D CAD system
LICENSE= gnu-gpl-v3
DEPENDS+= bash-[0-9]*:../../shells/bash
USE_TOOLS+= chmod find make pax
USE_LANGUAGES= c c++
USE_LIBTOOL= yes
SUBST_CLASSES+= paths
SUBST_STAGE.paths= pre-configure
SUBST_MESSAGE.paths= Attending to hard-coded paths.
SUBST_FILES.paths+= shared.pri src/core/RS.cpp src/core/RSettings.cpp
SUBST_FILES.paths+= scripts/Help/ShowReadme/ShowReadme.js
SUBST_FILES.paths+= scripts/Widgets/LibraryBrowser/LibraryBrowser.js
SUBST_VARS.paths= PREFIX
AUTO_MKDIRS= yes
#
# The QCad build system normally links direct to a release dir but this
# causes a lot of problems with libtool dependencies. We patch it so that
# the libs are linked from the source dirs and add an install target to
# allow pkgsrc to use DESTDIR
#
do-configure:
cd ${WRKSRC} && ${MKDIR} release
cd ${WRKSRC} && ${QTDIR}/bin/qmake -r -after DESTDIR=
do-install:
cd ${WRKSRC} && make INSTALL_ROOT=${DESTDIR} install
${INSTALL_DATA} ${WRKSRC}/qcad.desktop \
${DESTDIR}${PREFIX}/share/applications
${INSTALL_DATA} ${WRKSRC}/support/logo/logo_512.svg \
${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/qcad_icon.svg
${INSTALL_DATA} ${WRKSRC}/support/logo/logo_512.svg \
${DESTDIR}${PREFIX}/share/icons/hicolor/512x512/apps/qcad_icon.svg
${INSTALL_DATA} ${WRKSRC}/support/logo/logo_512.png \
${DESTDIR}${PREFIX}/share/icons/hicolor/512x512/apps/qcad_icon.png
${INSTALL_DATA} ${WRKSRC}/scripts/qcad_icon.png \
${DESTDIR}${PREFIX}/share/icons/hicolor/256x256/apps/qcad_icon.png
${INSTALL_DATA} ${WRKSRC}/support/doc/api/qcad_icon.png \
${DESTDIR}${PREFIX}/share/icons/hicolor/64x64/apps/qcad_icon.png
${INSTALL_LIB} ${WRKSRC}/src/3rdparty/qt-labs-qtscriptgenerator-*/qtbindings/qtscript_*/libqtscript_*.so* \
${DESTDIR}${PREFIX}/lib/qcad/plugins/script
${INSTALL_MAN} ${WRKSRC}/qcad.1 \
${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
${FIND} ${WRKSRC}/scripts -name \*.orig -delete
${FIND} ${WRKSRC} -name \*.gitignore -delete
cd ${WRKSRC} && ${PAX} -rwpm \
fonts linetypes patterns plugins platforminputcontexts platforms \
xcbglintegrations scripts themes ts \
${DESTDIR}${PREFIX}/lib/${PKGBASE}
cd ${WRKSRC} && ${PAX} -rwpm \
readme.txt examples libraries \
${DESTDIR}${PREFIX}/share/${PKGBASE}
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
.include "../../devel/libexecinfo/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../x11/qt5-qtbase/buildlink3.mk"
.include "../../x11/qt5-qtscript/buildlink3.mk"
.include "../../x11/qt5-qtsvg/buildlink3.mk"
.include "../../x11/qt5-qttools/buildlink3.mk"
.include "../../x11/qt5-qtxmlpatterns/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"