aboutsummaryrefslogtreecommitdiffstats
path: root/x11-themes/gtk-bluecurve-theme/Makefile
blob: 2f8949a45a0c22a7677989299c6b2f2f67475076 (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
# New ports collection makefile for:    bluecurve-unified
# Date created:         3 October 2002
# Whom:                 Eugeney Ryzhyk
#
# $FreeBSD$
#

PORTNAME=   gtk-bluecurve-theme

COMMENT=    The Bluecurve GTK+ themes

MASTERDIR=  ${.CURDIR}/../bluecurve-themes

USE_GNOME+= gtk20
GTK2_CFLAGS=    `${LOCALBASE}/bin/pkg-config --cflags gtk+-2.0`
GTK2_LIBS=  `${LOCALBASE}/bin/pkg-config --libs gtk+-2.0`
GTK2_SOURCES=   bluecurve_rc_style.c bluecurve_style.c bluecurve_theme_main.c
GTK2_ENGINEDIR= lib/gtk-2.0/${GTK2_VERSION}/engines

PLIST=      ${WRKDIR}/pkg-plist
EXTRA_STYLES=   BerriesAndCream Gnome Grape Lime Slate Strawberry Tangerine

post-patch:
.for s in ${EXTRA_STYLES}
    @${REINPLACE_CMD} -e 's|/usr|${LOCALBASE}|' \
        ${WRKSRC}/art/gtk/Bluecurve-${s}/gtk-2.0/gtkrc
.endfor

do-build:
    cd ${WRKSRC}/art/gtk/Bluecurve && \
    ${CC} ${CFLAGS} -Wl,-export-dynamic -shared -fPIC \
        ${GTK2_CFLAGS} ${GTK2_LIBS} -o libbluecurve.so \
            ${GTK2_SOURCES}

pre-install:
    @${RM} -f ${PLIST}
    @${ECHO_CMD} "${GTK2_ENGINEDIR}/libbluecurve.so" >> ${PLIST}
    @${ECHO_CMD} "share/themes/Bluecurve/gtk-2.0/gtkrc" >> ${PLIST}
    @${ECHO_CMD} "@dirrm share/themes/Bluecurve/gtk-2.0" >> ${PLIST}
.for s in ${EXTRA_STYLES}
    @${ECHO_CMD} "share/themes/Bluecurve-${s}/gtk-2.0/gtkrc" >> ${PLIST}
    @${ECHO_CMD} "@dirrm share/themes/Bluecurve-${s}/gtk-2.0" >> ${PLIST}
.endfor
    @${ECHO_CMD} "@dirrmtry share/themes/Bluecurve" >> ${PLIST}
.for s in ${EXTRA_STYLES}
    @${ECHO_CMD} "@dirrm share/themes/Bluecurve-${s}" >> ${PLIST}
.endfor

do-install:
    ${MKDIR} ${PREFIX}/${GTK2_ENGINEDIR}
    ${INSTALL_PROGRAM} ${WRKSRC}/art/gtk/Bluecurve/libbluecurve.so ${PREFIX}/${GTK2_ENGINEDIR}
    ${MKDIR} ${PREFIX}/share/themes/Bluecurve/gtk-2.0
    ${INSTALL_DATA} ${WRKSRC}/art/gtk/Bluecurve/gtk-2.0/gtkrc ${PREFIX}/share/themes/Bluecurve/gtk-2.0
.for s in ${EXTRA_STYLES}
    ${MKDIR} ${PREFIX}/share/themes/Bluecurve-${s}/gtk-2.0
    ${INSTALL_DATA} ${WRKSRC}/art/gtk/Bluecurve-${s}/gtk-2.0/gtkrc ${PREFIX}/share/themes/Bluecurve-${s}/gtk-2.0
.endfor

.include "${MASTERDIR}/Makefile"