summaryrefslogtreecommitdiff
path: root/x11/xservers/Makefile
blob: ce528bae1f47e9c1d347c4071822ed1821fb9314 (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
# $NetBSD: Makefile,v 1.3 2001/04/30 15:03:32 tron Exp $#

DISTNAME=	xservers-3.3.6.0
CATEGORIES=	x11
MASTER_SITES=	#empty

MAINTAINER=	tron@netbsd.org
HOMEPAGE=	http://www.xfree86.org/
COMMENT=	Old X11 servers for use under XFree86 4.x

ONLY_FOR_PLATFORM=	NetBSD-*-i386

ALL_TARGET=	World
NO_CHECKSUM=	YES
PLIST_SRC=	${WRKDIR}/PLIST
USE_X11BASE=	YES

.if !defined(X11_RELEASE) && !defined(CHECK_X11)
X11_RELEASE!=	${MAKE} CHECK_X11=YES print-x11-release
MAKEFLAGS+=	X11_RELEASE="${X11_RELEASE}"
.if (${X11_RELEASE} == "6.3")
IGNORE=		"The X11 servers are included in your X11 distribution."
.endif
.endif

X11_LINKS=	bin/xkbcomp lib/X11/xkb
X11_SUBDIR=	R6.3
X11_SRCS=	Imakefile Makefile config include lib nls \
		programs/Imakefile programs/Xserver

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

do-fetch:
.if defined(BSDXSRCDIR)
.if !exists(${BSDXSRCDIR}/xc/config/cf/NetBSD.cf)
	@${ECHO_MSG} "Cannot find NetBSD's X11 sources in ${BSDXSRCDIR}."
	@${FALSE}
.endif
.else
	@${ECHO_MSG} "Please set BSDXSRCDIR in /etc/mk.conf, pointing it"
	@${ECHO_MSG} "to a directory that contains NetBSD's X11 sources."
	@${FALSE}
.endif

do-extract:
	${MKDIR} ${WRKSRC}
	${GTAR} --exclude '*/CVS' -c -C ${BSDXSRCDIR}/xc -f - ${X11_SRCS} | \
	${GTAR} xCf ${WRKSRC} -

do-configure:
	${SED} -e 's#@PROJECTROOT@#${PREFIX}/${X11_SUBDIR}#' \
	  ${FILESDIR}/host.def >${WRKSRC}/config/cf/host.def

post-install:
	cd ${PREFIX} && \
	for LINK in ${X11_LINKS}; do \
	  ${LN} -fs ${PREFIX}/$$LINK ${PREFIX}/${X11_SUBDIR}/$$LINK; \
	done && \
	${FIND} ${X11_SUBDIR} \! -type d | sort >${PLIST_SRC} && \
	${FIND} ${X11_SUBDIR} -type d | sort -r | \
	${AWK} '{print("@dirrm "$$1)}' >>${PLIST_SRC}

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

print-x11-release:
	@${GREP} '^#define SharedXextRev' ${X11BASE}/lib/X11/config/X11.tmpl \
	| ${AWK} '{print($$3)}'