summaryrefslogtreecommitdiffstats
path: root/x11-wm/icewm/Makefile
blob: 675eccaca13d8693982b6c901c12713c72ab1b38 (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# New ports collection makefile for:    icewm
# Date created:     10 August 1997
# Whom:         Yukihiro Nakai <Nakai@Mlab.t.u-tokyo.ac.jp>
#
# $FreeBSD$
#

PORTNAME=   icewm
PORTVERSION=    1.2.27
PORTREVISION=   1
CATEGORIES= x11-wm
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Window Manager designed for speed, usability and consistency

USE_X_PREFIX=   yes
WANT_GNOME= yes
USE_GNOME=  gnometarget
USE_GMAKE=  yes
GNU_CONFIGURE=  yes
CONFIGURE_ENV=  CPPFLAGS="-I${LOCALBASE}/include -I${X11BASE}/include" \
        LDFLAGS="-L${LOCALBASE}/lib -L${X11BASE}/lib"
CONFIGURE_ARGS= --enable-shaped-decorations \
        --enable-guievents \
        --with-cfgdir=${DATADIR} \
        --with-libdir=${DATADIR} \
        --with-kdedatadir=${LOCALBASE}/share \
        --with-docdir=${PREFIX}/share/doc \
        --with-mkfontdir=${NONEXISTENT}

OPTIONS=    GNOMEDESKTOP    "Enable GNOME desktop support"      off \
        IMLIB       "Build with Imlib support"      on \
        ESOUND      "Enable EsounD daemon support"      off \
        XFT     "Enable Xft support for fonts"      on \
        XINERAMA    "Enable Xinerama support"       on \
        X86_ASM     "Use optimized x86 assembly code"   on \
        BEASTIE     "Use Beastie'fied startup button"   off \
        NLS     "Enable National Language Support"  on

.include <bsd.port.pre.mk>

.if ${HAVE_GNOME:Mgnomedesktop}!="" || defined(WITH_GNOMEDESKTOP)
USE_GNOME+= gnomedesktop
CONFIGURE_ARGS+=    --enable-menus-gnome2
INSTALL_TARGET=     install install-gnome
PLIST_SUB+= GNOMEDESKTOP=""
PKGNAMESUFFIX=  -gnome
.else
PLIST_SUB+= GNOMEDESKTOP="@comment "
.endif

.if ${HAVE_GNOME:Mimlib}!="" || defined(WITH_IMLIB)
USE_GNOME+= imlib
CONFIGURE_ARGS+=    --with-imlib
.else
USE_XPM=    yes
CONFIGURE_ARGS+=    --without-imlib
.endif

.if ${HAVE_GNOME:Mesound}!="" || defined(WITH_ESOUND)
USE_GNOME+= esound
CONFIGURE_ARGS+=    --with-icesound=esound
.else
CONFIGURE_ARGS+=    --with-icesound=oss
.endif

.if ${X_WINDOW_SYSTEM:L} == xfree86-3 || defined(WITHOUT_XFT)
CONFIGURE_ARGS+=    --enable-corefonts --disable-xfreetype
.else
LIB_DEPENDS+=   Xft.2:${PORTSDIR}/x11-fonts/libXft
CONFIGURE_ARGS+=    --enable-gradients
.endif

.if ${X_WINDOW_SYSTEM:L} == xfree86-3 || defined(WITHOUT_XINERAMA)
CONFIGURE_ARGS+=    --disable-xinerama
.endif

.if ${ARCH} != "i386" || defined(WITHOUT_X86_ASM)
CONFIGURE_ARGS+=    --disable-x86-asm
.endif

.if defined(WITH_BEASTIE)
STARTUP_PIXMAP=     bsd-daemon.xpm
.else
STARTUP_PIXMAP=     icewm-logo.xpm
.endif

.if defined(WITHOUT_NLS)
CONFIGURE_ARGS+=    --disable-nls --disable-i18n
PLIST_SUB+= NLS="@comment "
.else
USE_GETTEXT=    yes
PLIST_SUB+= NLS=""
.endif

post-extract:
    @cd ${WRKSRC}/lib/taskbar && ${MV} icewm.xpm icewm-logo.xpm
    @${CP} -f ${FILESDIR}/bsd-daemon.xpm ${WRKSRC}/lib/taskbar

post-patch:
.for file in configure
    @${REINPLACE_CMD} -e '/test/s|==|=|g' ${WRKSRC}/${file}
.endfor
.for file in src/gnome2.cc
    @${REINPLACE_CMD} -e \
        's|/usr/share/control|${LOCALBASE}/share/gnome/control|g ; \
         s|/usr/share/app|${LOCALBASE}/share/gnome/app|g ; \
         s|/usr/share/gnome|${LOCALBASE}/share/gnome|g' ${WRKSRC}/${file}
.endfor

post-install:
    @${LN} -sf ${STARTUP_PIXMAP} ${DATADIR}/taskbar/icewm.xpm
.if !defined(NOPORTDOCS)
    @${MKDIR} ${DOCSDIR}
.for file in CHANGES INSTALL README TODO
    ${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}
.endfor
    ${INSTALL_DATA} ${WRKSRC}/doc/*.html ${DOCSDIR}
.endif

.include <bsd.port.post.mk>