aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/sketch/Makefile
blob: f5420d469d06c74b5fb203def438730cacd4e18b (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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Created by: Joerg Wunsch <joerg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   sketch
PORTVERSION=    0.3.7
CATEGORIES= graphics
MASTER_SITES=   http://www.frontiernet.net/~eugene.ressler/
EXTRACT_SUFX=   .tgz

MAINTAINER= joerg@FreeBSD.org
COMMENT=    3D Scene Description Translator

LICENSE=    GPLv3

MAKEFILE=   makefile
ALL_TARGET=
USE_GMAKE=  yes
USE_PERL5_BUILD=yes
USE_DOS2UNIX=   yes

PLIST_FILES=    bin/sketch

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MDOCS}
PORTDOCS=   *
DOCSRCDIR1= ${WRKSRC}
DOC_FILES1= readme updates.htm

DOCSRCDIR2= ${WRKSRC}/Doc/sketch
DOCSDIR2=   ${DOCSDIR}/Doc/sketch
DOC_FILES2= *

DOCSRCDIR3= ${WRKSRC}/Doc
DOCSDIR3=   ${DOCSDIR}/Doc
DOC_FILES3= *.eps *.pdf *.png *.sk *.txt *.tex *.texi
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
PORTEXAMPLES=   *.sk
.endif

post-patch:
    @${REINPLACE_CMD} -e 's/^CC =.*//' \
        -e 's/$$(CC)/$$(CC) $$(CFLAGS)/g' \
        -e 's/^YACC =.*/YACC = yacc/' ${WRKSRC}/${MAKEFILE}

do-install:
    ${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${PREFIX}/bin/

.if ${PORT_OPTIONS:MDOCS}
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${DOC_FILES1:S|^|${DOCSRCDIR1}/|} ${DOCSDIR}
    @${MKDIR} ${DOCSDIR2}
    ${INSTALL_DATA} ${DOC_FILES2:S|^|${DOCSRCDIR2}/|} ${DOCSDIR2}
    @${MKDIR} ${DOCSDIR3}
    ${INSTALL_DATA} ${DOC_FILES3:S|^|${DOCSRCDIR3}/|} ${DOCSDIR3}
.endif

.if ${PORT_OPTIONS:MEXAMPLES}
    @${MKDIR} ${EXAMPLESDIR}
    cd ${WRKSRC}/Data && ${INSTALL_DATA} ${PORTEXAMPLES} ${EXAMPLESDIR}
.endif

.include <bsd.port.mk>