aboutsummaryrefslogtreecommitdiffstats
path: root/cad/gerbv/Makefile
blob: ffcd22877d5f045cbaa1896e617700c0670dc14e (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
# Created by: ijliao
# $FreeBSD$

PORTNAME=   gerbv
PORTVERSION=    2.6.0
PORTREVISION=   1
CATEGORIES= cad
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}

MAINTAINER= ports@FreeBSD.org
COMMENT=    A Free Gerber Viewer

LICENSE=    GPLv2
LICENSE_FILE=   ${WRKSRC}/COPYING

USES=        pathfix pkgconfig
USE_GNOME=  desktopfileutils gtk20
USE_AUTOTOOLS=  libtool
USE_LDCONFIG=   yes
INSTALLS_ICONS= yes

CPPFLAGS+=  -I${LOCALBASE}/include
LDFLAGS+=   -L${LOCALBASE}/lib

PLIST_SUB=  VERSION="${PORTVERSION}"

MAN1=       gerbv.1

NO_STAGE=   yes
post-patch:
    @${REINPLACE_CMD} -e '/^SUBDIRS =/s|desktop||g' ${WRKSRC}/Makefile.in

post-install:
    ${INSTALL_DATA} ${WRKSRC}/desktop/gerbv.desktop \
        ${PREFIX}/share/applications
    @${MKDIR} ${PREFIX}/share/icons/hicolor/scalable/apps
    ${INSTALL_DATA} ${WRKSRC}/desktop/gerbv.svg \
        ${PREFIX}/share/icons/hicolor/scalable/apps
.for i in 16 22 24 32 48
    @${MKDIR} ${PREFIX}/share/icons/hicolor/${i}x${i}/apps
    ${INSTALL_DATA} ${WRKSRC}/desktop/gerbv-${i}.png \
        ${PREFIX}/share/icons/hicolor/${i}x${i}/apps/gerbv.png
.endfor
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/*.fig ${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${DOCSDIR}
    @${MKDIR} ${DOCSDIR}/PNG-print
    ${INSTALL_DATA} ${WRKSRC}/doc/PNG-print/*.jpg ${DOCSDIR}/PNG-print
    ${INSTALL_DATA} ${WRKSRC}/doc/PNG-print/*.txt ${DOCSDIR}/PNG-print
    @${MKDIR} ${DOCSDIR}/eagle
    ${INSTALL_DATA} ${WRKSRC}/doc/eagle/*.pl ${DOCSDIR}/eagle
    ${INSTALL_DATA} ${WRKSRC}/doc/eagle/*.txt ${DOCSDIR}/eagle
.endif
.if !defined(NOPORTEXAMPLES)
    @${MKDIR} ${EXAMPLESDIR}
    cd ${WRKSRC}/example && ${FIND} . ! -name "*Makefile*" | \
        ${CPIO} -pdm -L -R ${SHAREOWN}:${SHAREGRP} ${EXAMPLESDIR}
.endif
    -@update-desktop-database

.include <bsd.port.mk>