summaryrefslogtreecommitdiff
path: root/cad/librecad/Makefile
blob: 017f1dd56cb66edd7e46aed6226ad15118337a5c (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
# $NetBSD: Makefile,v 1.3 2012/02/29 16:32:20 hans Exp $
#

DISTNAME=	LibreCAD-LibreCAD-v1.0.0-0-g22839a7
PKGNAME=	librecad-1.0.0
PKGREVISION=	2
CATEGORIES=	cad
MASTER_SITES=	-https://github.com/LibreCAD/LibreCAD/zipball/v1.0.0
EXTRACT_SUFX=	.zip

MAINTAINER=	ryoon@NetBSD.org
HOMEPAGE=	http://librecad.org/
COMMENT=	Free Open Source personal CAD application
LICENSE=	gnu-gpl-v2

PKG_DESTDIR_SUPPORT=	user-destdir

# Force using "curl" for fetching the distribution file. It is only available
# over HTTPS and "curl" is the only fetch program which always supports HTTPS.
FETCH_USING=	curl

WRKSRC=		${WRKDIR}/LibreCAD-LibreCAD-2d7f866
USE_LANGUAGES=	c c++
USE_TOOLS+=	pax

REPLACE_SH=	scripts/postprocess-unix.sh

SUBST_CLASSES+=		qtdir
SUBST_STAGE.qtdir=	pre-configure
SUBST_MESSAGE.qtdir=	Set qt4/bin
SUBST_FILES.qtdir+=	scripts/postprocess-unix.sh
SUBST_VARS.qtdir+=	QTDIR

SUBST_CLASSES+=		prefix
SUBST_STAGE.prefix=	pre-configure
SUBST_MESSAGE.prefix=	Fix hardcoded path
SUBST_FILES.prefix+=	src/lib/engine/rs_system.cpp
SUBST_SED.prefix+=	-e 's,/usr/share/,${PREFIX}/share/,g'

LIBRECADDIR=		share/librecad

INSTALLATION_DIRS+=	bin ${LIBRECADDIR}

do-configure:
	 cd ${WRKSRC} && QTDIR=${QTDIR} ${QTDIR}/bin/qmake librecad.pro

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/unix/librecad \
		${DESTDIR}${PREFIX}/bin
	cd ${WRKSRC}/unix/resources && \
		pax -rw -pmp fonts library patterns qm \
		${DESTDIR}${PREFIX}/${LIBRECADDIR}

.include "../../devel/boost-libs/buildlink3.mk"
.include "../../x11/qt4-libs/buildlink3.mk"
BUILDLINK_DEPMETHOD.qt4-tools=	full
.include "../../x11/qt4-tools/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"