aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/giflib/Makefile
blob: 70abb2e43aea169fe0dbdbedebf2ee2b5342597e (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
# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD$

PORTNAME=   giflib
PORTVERSION=    4.2.3
CATEGORIES= graphics
MASTER_SITES=   SF/${PORTNAME}/${PORTNAME}-4.x
PKGNAMESUFFIX=  ${NOX11SUFFIX}${PKGNAMESUFFIX2}

MAINTAINER= dinoex@FreeBSD.org
COMMENT=    Tools and library routines for working with GIF images

CONFLICTS=  libungif-[0-9]*
PORTSCOUT=  limit:^4\.

USE_BZIP2=  yes
USE_AUTOTOOLS=  libtool
GNU_CONFIGURE=  yes
USE_LDCONFIG=   yes

OPTIONS_DEFINE= DOCBOOK X11
DOCBOOK_DESC=   Generate API documentation (requires DOCS)

.include <bsd.port.pre.mk>

.if ${PORT_OPTIONS:MDOCBOOK} && ${PORT_OPTIONS:MDOCS}
BUILD_DEPENDS+= xmlto:${PORTSDIR}/textproc/xmlto \
        ${LOCALBASE}/share/xml/docbook/4.1.2:${PORTSDIR}/textproc/docbook-sk
PLIST_SUB+= WITH_DOCBOOK=''
.else
PLIST_SUB+= WITH_DOCBOOK='@comment '
.endif

.if ${PORT_OPTIONS:MX11}
USE_XORG=   sm x11
PLIST_SUB+= X11=''
CPPFLAGS+=  -I${LOCALBASE}/include
.else
PLIST_SUB+= X11='@comment '
CONFIGURE_ARGS+=    --with-x=no
NOX11SUFFIX=    -nox11
.endif

post-patch:
    ${CP} ${FILESDIR}/quantize.c ${WRKSRC}/lib/
.if ! ${PORT_OPTIONS:MDOCBOOK} || ! ${PORT_OPTIONS:MDOCS}
    ${REINPLACE_CMD} -e 's|SUBDIRS = lib util doc pic|SUBDIRS = lib util pic|' \
        ${WRKSRC}/Makefile.in
.endif

.if ${PORT_OPTIONS:MDOCBOOK} && ${PORT_OPTIONS:MDOCS}
post-install:
    @${MKDIR} ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${STAGEDIR}${DOCSDIR}
    ${INSTALL_DATA} ${WRKSRC}/doc/*.txt ${STAGEDIR}${DOCSDIR}
.endif

.include <bsd.port.post.mk>