summaryrefslogtreecommitdiff
path: root/x11/xorg-server/Makefile
blob: 8c3b3943db8a0f80ffd2dfe88c81da01ac5cc0a7 (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
# $NetBSD: Makefile,v 1.49 2006/12/15 20:33:06 joerg Exp $

DISTNAME=	${DISTFILES}
PKGNAME=	xorg-server-${XORG_VER}
PKGREVISION=	13
CATEGORIES=	x11
MASTER_SITES=	${MASTER_SITE_XORG}
DISTFILES=	X11R${XORG_VER}-src1.tar.gz \
		X11R${XORG_VER}-src2.tar.gz \
		X11R${XORG_VER}-src3.tar.gz

MAINTAINER=	joerg@NetBSD.org
HOMEPAGE=	http://www.x.org/
COMMENT=	X.org X server and related programs

PKG_DESTDIR_SUPPORT=	user-destdir

BUILD_DEPENDS=		xorg-imake-[0-9]*:../../x11/xorg-imake

DISTINFO_FILE=		${.CURDIR}/../../x11/xorg-libs/distinfo
PATCHDIR=		${.CURDIR}/../../x11/xorg-libs/patches

XBUILD_DIRS=		lib/font lib/lbxutil lib/Xdmcp lib/Xau \
			programs/Xserver
XINCLUDE_DIRS=		lib/xkbfile lib/xtrans
XINSTALL_DIRS=		lib/font/FreeType \
			lib/font/Type1 \
			lib/font/bitmap programs/Xserver
XINSTALL_MAN_DIRS=	programs/Xserver

PLIST_SRC=		${WRKDIR}/.PLIST_SRC
XORG_PLIST_ENTRY=	${OPSYS}

SPECIAL_PERMS=		${X11ROOT_PREFIX}/bin/Xorg ${SETUID_ROOT_PERMS}

REPLACE_PERL+=		exports/lib/modules/getconfig*
REPLACE_PERL+=		programs/Xserver/hw/xfree86/getconfig/getconfig.pl
REPLACE_PERL+=		programs/Xserver/hw/xfree86/getconfig/getconfig.sh
USE_TOOLS+=		perl:run

SUBST_CLASSES+=		parser
SUBST_STAGE.parser=	pre-install
SUBST_FILES.parser=	programs/Xserver/hw/xfree86/parser/Makefile
SUBST_SED.parser=	-e '/$$(INSTALL).*lib$$(LIBNAME).a/ d'
SUBST_SED.parser+=	-e '/$$(RANLIB).*lib$$(LIBNAME).a/ d'
SUBST_SED.parser+=	-e 's|$$(INSTALL) $$(INSTALLFLAGS) $$(INSTINCFLAGS)|echo|'
SUBST_MESSAGE.parser=	Fixing parser Makefile.

SUBST_CLASSES+=		stubs
SUBST_STAGE.stubs=	pre-install
SUBST_FILES.stubs=	lib/font/stubs/Makefile
SUBST_SED.stubs=	-e '/$$(INSTALL).*libfntstubs.a/ d'
SUBST_SED.stubs+=	-e '/$$(RANLIB).*libfntstubs.a/ d'
SUBST_MESSAGE.stubs=	Fixing stubs Makefile.

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

.if ${OPSYS} == "Darwin"
BUILDLINK_PASSTHRU_DIRS+=	/System
.else
.include "options.mk"
.endif

.if ${MACHINE_ARCH} == "i386" || \
    (${OPSYS} == "NetBSD" && \
    (${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "powerpc"))
PLIST_SUBST+=	SCANPCI=
.else
PLIST_SUBST+=	SCANPCI='@comment '
.endif

.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "alpha" || \
    ${MACHINE_ARCH} == "ia64" || ${MACHINE_ARCH} == "x86_64"
PLIST_SUBST+=	IOPORT=
.else
PLIST_SUBST+=	IOPORT='@comment '
.endif

post-install:
	@${SED} ${XORG_PLIST_SED} ${PKGDIR}/PLIST > ${PLIST_SRC}
.if ${OPSYS} == "Darwin"
	${CHMOD} a+r ${DESTDIR}${X11ROOT}/bin/XDarwin
.else
	${CHMOD} a+r ${DESTDIR}${X11ROOT}/bin/Xorg
.endif

.include "../../fonts/fontconfig/buildlink3.mk"
.include "../../graphics/freetype2/buildlink3.mk"
.include "../../meta-pkgs/xorg/Makefile.common"
.include "../../x11/libXrender/buildlink3.mk"
.include "../../mk/x11.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"