aboutsummaryrefslogtreecommitdiff
path: root/cad/leocad/Makefile
blob: 26334311bc83123f82686d3175ed68354a30cf74 (plain) (blame)
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
# New ports collection makefile for:	leocad
# Date created:				27 Jan 2002
# Whom:					David Yeske <dyeske@gmail.com>
#
# $FreeBSD$
#

PORTNAME=	leocad
PORTVERSION=	0.73
PORTREVISION=	8
CATEGORIES=	cad
MASTER_SITES=	${MASTER_SITE_LOCAL}
MASTER_SITE_SUBDIR=	arved
DISTFILES=	leocad-${PORTVERSION:S/.p/pre/}.tgz leocad-pieces-20030330.zip
EXTRACT_ONLY=	leocad-${PORTVERSION:S/.p/pre/}.tgz

MAINTAINER=	ports@FreeBSD.org
COMMENT=	A CAD program that uses bricks similar to those found in many toys

EXTRACT_DEPENDS=unzip:${PORTSDIR}/archivers/unzip
LIB_DEPENDS=	jpeg.11:${PORTSDIR}/graphics/jpeg \
		png.5:${PORTSDIR}/graphics/png

USE_GL=		glut
USE_XORG=	x11
USE_GMAKE=	yes
USE_GNOME=	gtk12
MAKE_JOBS_UNSAFE=	yes

post-extract:
	@${UNZIP_CMD} -q -o ${DISTDIR}/leocad-pieces-20030330.zip -d ${WRKDIR}/pieces

post-patch:
	@${REINPLACE_CMD} -e \
		's|%%LOCALBASE%%|${LOCALBASE}|g; \
		s|%%PTHREAD_CFLAGS%%|${PTHREAD_CFLAGS}|; \
		s|%%PTHREAD_LIBS%%|${PTHREAD_LIBS}|' \
		${WRKSRC}/config.mk
	@cd ${WRKSRC}/linux/&&${REINPLACE_CMD} -e 's|[(]int[)]data|(intptr_t)data|'\
		dialogs.cpp dlgpiece.cpp main.cpp toolbar.cpp
	@${REINPLACE_CMD} -Ee 's|[(]int[)](.*Group)|(intptr_t)\1|'\
		${WRKSRC}/common/project.cpp

do-install:
	${INSTALL_PROGRAM} ${WRKSRC}/bin/leocad ${PREFIX}/bin
	${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKDIR}/pieces/* ${DATADIR}

.include <bsd.port.mk>