aboutsummaryrefslogtreecommitdiff
path: root/x11-wm/windowmaker/Makefile
blob: 0844f421cf18b0f99ce797a6e96224294b2878d3 (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
124
# Created by: Brian Handy <handy@physics.montana.edu>
# $FreeBSD$

PORTNAME?=	windowmaker
PORTVERSION=	0.95.3
PORTREVISION?=	0
CATEGORIES=	x11-wm windowmaker
MASTER_SITES=	http://windowmaker.org/pub/%SUBDIR%/
MASTER_SITE_SUBDIR=	source/release
DISTNAME=	WindowMaker-${PORTVERSION}

MAINTAINER=	ports@FreeBSD.org
COMMENT?=	GNUstep-compliant NeXTstep window manager clone

LIB_DEPENDS=	gif:${PORTSDIR}/graphics/giflib \
		png15:${PORTSDIR}/graphics/png \
		jbig:${PORTSDIR}/graphics/jbigkit \
		tiff:${PORTSDIR}/graphics/tiff

.if !defined(LWR_SLAVE)
RUN_DEPENDS=	${LOCALBASE}/share/WindowMaker/Themes/LeetWM.themed/style:${PORTSDIR}/graphics/wmicons
USE_PERL5=	yes
OPTIONS_DEFINE=	NLS XRANDR
.endif

MAKE_JOBS_SAFE=	yes

USE_AUTOTOOLS=	libtool
USE_GNOME=	gnomehack
USE_XORG=	xft xinerama xmu xpm
USE_PKGCONFIG=	yes
GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CONFIGURE_ARGS=	--with-pixmapdir=${PREFIX}/include/X11/pixmaps \
		--with-nlsdir=${PREFIX}/share/locale \
		--with-libs-from="-L${LOCALBASE}/lib" \
		--with-incs-from="-I${LOCALBASE}/include" \
		--with-gnustepdir="${PREFIX}/GNUstep" \
		--enable-modelock \
		--enable-xinerama --enable-usermenu \
		--with-x
USE_LDCONFIG=	yes

.include <bsd.port.pre.mk>

.if !defined(LWR_SLAVE)

.if ${ARCH} == amd64 && ${OSVERSION} < 800000
CONFIGURE_ENV+=	ac_cv_c_inline_asm=no
.endif

.if ${OSVERSION} < 800000
BROKEN=		does not compile on FreeBSD 7.X
.endif

.if ${PORT_OPTIONS:MNLS}
USE_GETTEXT=   yes
LINGUAS=	be bg bs ca cs da de el es et fi fr gl hr hu hy it ja ko ms nl no pl pt ro ru sk sv tr zh_CN zh_TW
CONFIGURE_ENV+=	LINGUAS="${LINGUAS}"
PLIST_SUB=     NLS=""
.else
CONFIGURE_ARGS+=       --disable-locale
PLIST_SUB=     NLS="@comment "
.endif

.if ${PORT_OPTIONS:MXRANDR}
USE_XORG+=	xrandr
CONFIGURE_ARGS+=	--enable-xrandr
.endif

CONFLICTS=	libwraster-0.*

MANLANG=	"" cs sk ru
MAN1_EN=	geticonset.1x getstyle.1x seticons.1x setstyle.1x wdwrite.1x \
		wmaker.1x wmsetbg.1x wxcopy.1x wxpaste.1x get-wings-flags.1 \
		get-wraster-flags.1 get-wutil-flags.1 wdread.1 WindowMaker.1x \
		wmagnify.1x wmgenmenu.1 wmmenugen.1 WPrefs.1x

MAN8_EN=	upgrade-windowmaker-defaults.8

MAN1_CS=	geticonset.1x setstyle.1x wxpaste.1x getstyle.1x wdwrite.1x \
		wmsetbg.1x seticons.1x wmaker.1x wxcopy.1x

MAN1_SK=	geticonset.1x setstyle.1x wxpaste.1x getstyle.1x wdwrite.1x \
		wmsetbg.1x seticons.1x wmaker.1x wxcopy.1x

MAN1_RU=	geticonset.1x setstyle.1x wxpaste.1x getstyle.1x wdwrite.1x \
		wmsetbg.1x seticons.1x wmaker.1x wxcopy.1x

PORTDOCS=	AUTHORS BUGFORM BUGS ChangeLog FAQ FAQ.I18N INSTALL \
		INSTALL-WMAKER NEWS README README.definable-cursor TODO

post-patch:
.for f in WINGs/wapplication.c WPrefs.app/Menu.c WPrefs.app/Paths.c \
    WindowMaker/*menu*
	@${REINPLACE_CMD} -e "s#/usr/local#${PREFIX}#g" ${WRKSRC}/${f}
.endfor
	@${REINPLACE_CMD} -e '/\/usr\/X11R6\/include\/X11\/pixmaps/d' \
	    -e '/\/usr\/share\/pixmaps/d' \
	    -e "s#\"/usr/local/share/pixmaps\",#\"${PREFIX}/share/pixmaps\"#" \
	    -e "s#/usr/share/icons#${PREFIX}/share/icons#" \
	    ${WRKSRC}/WindowMaker/Defaults/WindowMaker.in
	@${REINPLACE_CMD} -e "s#/usr/include/X11#${PREFIX}/share#" \
	    ${WRKSRC}/WPrefs.app/Paths.c
	@${REINPLACE_CMD} -e "s#WPrefs#${PREFIX}/GNUstep/Applications/WPrefs.app/WPrefs#" \
	    ${WRKSRC}/util/wmgenmenu.c
	@${REINPLACE_CMD} -e "764s#wPreferences.flags.restarting == 0#!wPreferences.flags.restarting#" \
	    ${WRKSRC}/src/startup.c

post-install:
	@${MKDIR} ${PREFIX}/GNUstep/Applications/WPrefs.app/xpm
	@${MKDIR} ${PREFIX}/share/WindowMaker/Sounds
.if !defined(NOPORTDOCS)
	@${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif

update-LINGUAS: extract
	cd ${WRKSRC}/po && \
		${ECHO_CMD} *.po | ${SED} 's|\.po||g' > ${FILESDIR}/LINGUAS
.endif	# .if !defined(LWR_SLAVE)

.include <bsd.port.post.mk>