summaryrefslogtreecommitdiff
path: root/x11/windowmaker/Makefile
blob: 95d641f6c006dcfce4b13239304c516e3eb7e27c (plain)
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
# $NetBSD: Makefile,v 1.28 1999/05/02 17:59:21 rh Exp $

DISTNAME=		WindowMaker-0.53.0
PKGNAME=		windowmaker-0.53.0
CATEGORIES=		x11
MASTER_SITES=		ftp://ftp.windowmaker.org/pub/beta/srcs/ \
			ftp://shadowmere.student.utwente.nl/pub/WindowMaker/ \
			ftp://ftp.univie.ac.at/systems/linux/linuxberg/files/x11/xwin/ \
			ftp://ftp.ics.es.osaka-u.ac.jp/pub/mirrors/WindowMaker/beta/srcs/

MAINTAINER=		jlam@netbsd.org
HOMEPAGE=		http://www.windowmaker.org/

DEPENDS+=		libproplist-0.8.3:../../devel/libproplist
DEPENDS+=		giflib-3.0:../../graphics/giflib
DEPENDS+=		jpeg-6b:../../graphics/jpeg
DEPENDS+=		png-1.0.3:../../graphics/png
DEPENDS+=		tiff-3.4:../../graphics/tiff
DEPENDS+=		xpm-3.4k:../../graphics/xpm

USE_LIBTOOL=		yes
USE_X11BASE=		yes
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--with-nlsdir=${PREFIX}/share/locale \
			--with-incs-from="-I${LOCALBASE}/include \
				-I${LOCALBASE}/include/giflib"
LDFLAGS+=		-L${LOCALBASE}/lib	# for libintl.a
CONFIGURE_ENV+=		INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
			INSTALL_DATA="${INSTALL_DATA}" \
			INSTALL_SCRIPT="${INSTALL_SCRIPT}"

# WINDOWMAKER_OPTIONS is a space-separated list of compile-time options
# to support.  Currently supported options:
#
#	kde		enable support for kde/kwm window manager hints
#	gnome		enable support for GNOME window manager hints
#	openlook	enable support for OPEN LOOK(tm) window manager hints
#	lite		remove Window Maker redundancies with KDE and GNOME
#
WINDOWMAKER_OPTIONS?=	gnome kde

PLIST_SRC=		${WRKDIR}/.PLIST_SRC_WM

.include "../../mk/bsd.prefs.mk"

.for OPTION in ${WINDOWMAKER_OPTIONS}
CONFIGURE_ARGS+=	--enable-${OPTION}
.endfor

# LINGUAS is a space-separated list of locales.  If it is defined, then
# i18n-support is compiled into Window Maker and the locales specified
# are installed.
#
.if defined(LINGUAS)
DEPENDS+=		gettext-0.10.35:../../devel/gettext
CONFIGURE_ARGS+=	--enable-modelock
CONFIGURE_ENV+=		LINGUAS="${LINGUAS}"

# Enable multi-byte character support for languages that need it.
# Currently, those are: ja, ko
#
.for lang in ja ko
.if (${LINGUAS:M${lang}} != "")
ENABLE_WM_KANJI=	yes
.endif
.endfor
.if defined(ENABLE_WM_KANJI)
CONFIGURE_ARGS+=	--enable-kanji
.endif # ENABLE_WM_KANJI
.endif # LINGUAS

post-extract:
	${RM} -f ${WRKSRC}/WindowMaker/Defaults/WMState \
		 ${WRKSRC}/WindowMaker/Defaults/WMWindowAttributes \
		 ${WRKSRC}/WindowMaker/Defaults/WindowMaker

pre-configure:
.if !defined(LINGUAS)
	@${ECHO} "To compile with i18n support, set the variable LINGUAS"
	@${ECHO} "to the list of locales to install."
.else
	@${ECHO} "Compiling support for locales: ${LINGUAS}"
.endif

post-install:
	${INSTALL_DATA_DIR} ${PREFIX}/share/WindowMaker/SoundSets
	${INSTALL_DATA_DIR} ${PREFIX}/share/WindowMaker/Sounds
	${TOUCH} ${PREFIX}/share/WindowMaker/SoundSets/.keep_me
	${TOUCH} ${PREFIX}/share/WindowMaker/Sounds/.keep_me
	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/WindowMaker
	${INSTALL_DATA} \
		${WRKSRC}/README \
		${WRKSRC}/README.GNOME \
		${WRKSRC}/README.KDE \
		${PREFIX}/share/doc/WindowMaker
	@${CAT} ${PKGDIR}/PLIST.nolinguas >${PLIST_SRC}
.if defined(LINGUAS)
	@(for lang in ${LINGUAS}; do \
	    if [ -f ${WRKSRC}/po/$${lang}.mo ]; then \
		${ECHO} share/locale/$${lang}/LC_MESSAGES/WindowMaker.mo; \
	    fi; \
	    if [ -f ${WRKSRC}/WPrefs.app/po/$${lang}.mo ]; then \
		${ECHO} share/locale/$${lang}/LC_MESSAGES/WPrefs.mo; \
	    fi; \
	    ${ECHO} @dirrm share/locale/$${lang}/LC_MESSAGES; \
	    ${ECHO} @dirrm share/locale/$${lang}; \
	done) >>${PLIST_SRC}
.endif

.include "../../mk/bsd.pkg.mk"