aboutsummaryrefslogtreecommitdiffstats
path: root/cad/ldraw/Makefile
blob: a946f2631300e0664a58795e27c4b74bdf9f855c (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
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
# $FreeBSD$

PORTNAME=   ldraw
PORTVERSION=    201501
PORTEPOCH=  1
CATEGORIES= cad
MASTER_SITES=   http://www.ldraw.org/library/updates/
DISTNAME=   complete
DIST_SUBDIR=    ldraw/${PORTVERSION}

MAINTAINER= koalative@gmail.com
COMMENT=    LDraw parts library

LICENSE=    CDDL CC-BY-NC-SA-2.0
LICENSE_COMB=   dual
LICENSE_FILE_CC-BY-NC-SA-2.0=   ${WRKSRC}/CAlicense.txt

WRKSRC=     ${WRKDIR}/${PORTNAME}

USES=       dos2unix gmake zip:infozip
DOS2UNIX_GLOB=  *.h makefile mklist.c *.txt *.dat

PORTDATA=   *
PORTDOCS=   Readme.txt
OPTIONS_DEFINE= DOCS

SUB_FILES=  pkg-message

BUILD_WRKSRC=   ${WRKSRC}/mklist
MAKEFILE=   makefile

post-extract-script:
    @(cd ${WRKSRC} && ${UNZIP_CMD} -qo -d \
        ${WRKSRC}/mklist ${WRKSRC}/mklist1_6.zip)
    @(cd ${WRKSRC}/mklist/include && ${MV} * ..)

post-patch:
    @${REINPLACE_CMD} -e 's|CC=gcc|CC?=gcc|' \
        -e 's|CFLAGS=|CFLAGS?=|' \
        ${WRKSRC}/mklist/makefile
    @${REINPLACE_CMD} -e 's|PARTS|parts|' \
        ${WRKSRC}/mklist/mklist.c

do-install:
.for f in models p parts LDCfgalt.ldr LDConfig.ldr LDConfig_TLG.ldr
    @(cd ${WRKSRC} ; ${COPYTREE_SHARE} ${f} ${STAGEDIR}${DATADIR})
.endfor

    ${INSTALL_PROGRAM} ${WRKSRC}/mklist/mklist ${STAGEDIR}${DATADIR}
    @(cd ${STAGEDIR}${DATADIR} && ./mklist -d)

do-install-DOCS-on:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>