aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/pngwriter/Makefile
blob: c52d7bad99e6b10979a79fbffff7ec480f882292 (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
# ex:ts=8
# Ports collection makefile for:    pngwriter
# Date created:         Nov 7, 2003
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   pngwriter
PORTVERSION=    0.5.4
CATEGORIES= graphics devel
MASTER_SITES=   SF

MAINTAINER= ports@FreeBSD.org
COMMENT=    A C++ library for creating PNG images

LIB_DEPENDS=    png.5:${PORTSDIR}/graphics/png \
        freetype.9:${PORTSDIR}/print/freetype2

BUILD_WRKSRC=   ${WRKDIR}/${DISTNAME}/src

USE_GNOME=  pkgconfig
CXXFLAGS+=  `pkg-config --cflags freetype2 libpng12` -I${LOCALBASE}/include

PORTDOCS=   *
PORTEXAMPLES=   *
PLIST_FILES=    include/pngwriter.h \
        lib/libpngwriter.a \
        %%DATADIR%%/fonts/FreeMonoBold.ttf \
        %%DATADIR%%/fonts/FreeSansBold.ttf
PLIST_DIRS= %%DATADIR%%/fonts \
        %%DATADIR%%

post-extract:
    @${FIND} ${WRKSRC} -name "\.*" -delete

do-build:
    cd ${BUILD_WRKSRC} \
        && ${CXX} ${CXXFLAGS} -c pngwriter.cc -o pngwriter.o \
        && ${AR} rv libpngwriter.a pngwriter.o

do-install:
    ${INSTALL_DATA} ${WRKSRC}/src/pngwriter.h ${PREFIX}/include
    ${INSTALL_DATA} ${WRKSRC}/src/libpngwriter.a ${PREFIX}/lib
    @${MKDIR} ${DATADIR}/fonts
    @(cd ${WRKSRC}/fonts && ${COPYTREE_SHARE} . ${DATADIR}/fonts)
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
    @(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} . ${DOCSDIR})
    @${MKDIR} ${EXAMPLESDIR}
    @(cd ${WRKSRC}/examples && ${COPYTREE_SHARE} . ${EXAMPLESDIR})
.endif

.include <bsd.port.mk>