aboutsummaryrefslogtreecommitdiffstats
path: root/x11-toolkits/gai/Makefile
blob: 0623378e8ef50f8f3105b96c5d73647e5307a45a (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
# ex:ts=8
# Ports collection makefile for:    gai
# Date created:         Feb 16, 2004
# Whom:             ijliao
#
# $FreeBSD$
#

PORTNAME=   gai
PORTVERSION=    0.5.8
CATEGORIES= x11-toolkits gnome
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= lx@redundancy.redundancy.org
COMMENT=    General Applet Interface Library

LIB_DEPENDS=    gtkglext-x11-1.0.2:${PORTSDIR}/x11-toolkits/gtkglext

USE_REINPLACE=  yes
USE_BZIP2=  yes
USE_GL=     yes
USE_SDL=    sdl
USE_GNOME=  gnomehack gnomepanel
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  SDLCONF=${SDL_CONFIG}

PLIST_FILES=    include/gai/gai.h lib/libgai.so.${PORTVERSION} \
        lib/libgai.so.0 lib/libgai.so libdata/pkgconfig/gai.pc
PLIST_DIRS= include/gai
INSTALLS_SHLIB= yes

.include <bsd.port.pre.mk>

.if ${ARCH} == "amd64" || ${ARCH} == "ia64"
CFLAGS+=    -fPIC
.endif

post-patch:
    @${REINPLACE_CMD} -e "s|sdl-config --|${SDL_CONFIG} --|g" ${WRKSRC}/configure
    @${REINPLACE_CMD} -e "s|lib/pkgconfig|libdata/pkgconfig|g" \
        -e "s|-O2|${CFLAGS}|g" ${WRKSRC}/gai/Makefile.in

.if !defined(NOPORTDOCS)
post-install:
    @${MKDIR} ${DOCSDIR}
    @${CP} -R ${WRKSRC}/docs/ ${DOCSDIR}
    @${FIND} ${DOCSDIR} -type f | \
        ${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
    @${FIND} ${DOCSDIR} -type d | ${SORT} -r | \
        ${SED} "s,^${PREFIX}/,@dirrm ," >> ${TMPPLIST}
    @${MKDIR} ${EXAMPLESDIR}
.for dir in docking examples templates
    ${CP} -R ${WRKSRC}/${dir} ${EXAMPLESDIR}
.endfor
    @${FIND} ${EXAMPLESDIR} -type f | \
        ${SED} "s,^${PREFIX}/,," >> ${TMPPLIST}
    @${FIND} ${EXAMPLESDIR} -type d | ${SORT} -r | \
        ${SED} "s,^${PREFIX}/,@dirrm ," >> ${TMPPLIST}
.endif

.include <bsd.port.post.mk>