1995-04-12 22:26:23 +02:00
|
|
|
# New ports collection makefile for: XFree86
|
|
|
|
# Date created: 5 January 1995
|
|
|
|
# Whom: jmz
|
|
|
|
#
|
1999-08-31 04:51:23 +02:00
|
|
|
# $FreeBSD$
|
1995-04-12 22:26:23 +02:00
|
|
|
#
|
|
|
|
|
2000-04-13 21:19:05 +02:00
|
|
|
PORTNAME= XFree86
|
2002-01-22 15:19:57 +01:00
|
|
|
PORTVERSION= 4.1.0
|
2002-03-06 00:37:02 +01:00
|
|
|
PORTREVISION= 13
|
2002-01-22 15:19:57 +01:00
|
|
|
PORTEPOCH= 1
|
1996-11-09 03:08:56 +01:00
|
|
|
CATEGORIES= x11
|
2000-09-21 10:36:28 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_XFREE}
|
2002-01-22 15:19:57 +01:00
|
|
|
MASTER_SITE_SUBDIR= 4.1.0
|
|
|
|
DISTFILES= X410src-1.tgz X410src-2.tgz
|
|
|
|
EXTRACT_ONLY= X410src-1.tgz X410src-2.tgz
|
1999-08-31 08:53:31 +02:00
|
|
|
MAINTAINER= jmz@FreeBSD.org
|
1995-01-05 04:51:15 +01:00
|
|
|
|
2001-11-07 06:34:30 +01:00
|
|
|
LATEST_LINK= XFree86-4
|
|
|
|
|
2000-04-16 05:30:37 +02:00
|
|
|
WRKSRC= ${WRKDIR}/${DIST_SUBDIR}
|
1999-11-12 23:09:06 +01:00
|
|
|
.if (${MACHINE} != "alpha")
|
1999-12-24 17:42:18 +01:00
|
|
|
#NO_PACKAGE= package available from XFree86
|
1999-11-12 23:09:06 +01:00
|
|
|
.endif
|
1996-11-09 03:08:56 +01:00
|
|
|
ALL_TARGET= World
|
|
|
|
INSTALL_TARGET= install install.man
|
|
|
|
DIST_SUBDIR= xc
|
1998-05-05 23:47:31 +02:00
|
|
|
PATCH_DIST_ARGS=-p0 -E -d ${WRKDIR} --quiet
|
2002-01-22 15:19:57 +01:00
|
|
|
SCRIPTS_ENV= OSVERSION=${OSVERSION}
|
2000-12-12 17:36:32 +01:00
|
|
|
MTREE_FILE= /etc/mtree/BSD.x11-4.dist
|
2001-06-04 04:26:41 +02:00
|
|
|
MAKE_ARGS= WORLDOPTS=
|
2000-03-11 01:20:34 +01:00
|
|
|
.ifdef DISTRIB
|
|
|
|
DESTDIR= ${WRKDIR}/distrib
|
|
|
|
MAKE_ENV+= DESTDIR=${DESTDIR}
|
|
|
|
NO_PKG_REGISTER=yes
|
|
|
|
SCRIPTS_ENV+= NO_INPUT=yes
|
|
|
|
.endif
|
1998-08-05 11:31:52 +02:00
|
|
|
# can't use USE_X_PREFIX here -- it will cause a circular dependency
|
|
|
|
PREFIX= ${X11BASE}
|
2000-03-11 01:20:34 +01:00
|
|
|
.if defined(DISTRIB) || defined(PACKAGE_BUILDING)
|
2000-03-13 09:09:33 +01:00
|
|
|
#IS_INTERACTIVE is boolean -- "no" is the same as defining it "yes"!
|
|
|
|
#IS_INTERACTIVE= no
|
2000-03-11 01:20:34 +01:00
|
|
|
.else
|
|
|
|
IS_INTERACTIVE= yes # configure script asks questions
|
|
|
|
.endif
|
2000-12-25 05:02:55 +01:00
|
|
|
MTREE_FILE= /etc/mtree/BSD.x11-4.dist
|
1998-10-27 05:12:44 +01:00
|
|
|
.if (${MACHINE} == "pc98")
|
|
|
|
SCRIPTS_ENV+= MACHINE=pc98
|
2002-01-22 15:19:57 +01:00
|
|
|
PLIST= ${PKGDIR}/pkg-plist.pc98
|
1998-10-27 05:12:44 +01:00
|
|
|
.endif
|
1999-07-27 16:27:34 +02:00
|
|
|
.if (${MACHINE} == "alpha")
|
|
|
|
SCRIPTS_ENV+= MACHINE=alpha
|
2002-01-22 15:19:57 +01:00
|
|
|
PLIST= ${PKGDIR}/pkg-plist.alpha
|
1999-07-27 16:27:34 +02:00
|
|
|
.endif
|
1995-01-05 04:51:15 +01:00
|
|
|
|
2001-03-13 04:58:51 +01:00
|
|
|
pre-configure:
|
2002-01-29 13:14:18 +01:00
|
|
|
@if ${ECHO_CMD} "$(CFLAGS)" |${GREP} -q O[3456789]; then \
|
2001-02-08 17:38:51 +01:00
|
|
|
${ECHO} "XFree86-4 with thread support does not build with optimization"; \
|
|
|
|
${ECHO} "flags different from O or -O2"; \
|
|
|
|
${FALSE}; fi
|
|
|
|
|
1998-03-19 15:57:20 +01:00
|
|
|
.if defined(XDM_DES) && (${USA_RESIDENT} != YES && ${USA_RESIDENT} != NO)
|
|
|
|
pre-fetch:
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} You must set variable USA_RESIDENT to YES or NO.
|
1999-08-23 06:23:59 +02:00
|
|
|
@${FALSE}
|
1998-03-19 15:57:20 +01:00
|
|
|
.elif defined(USA_RESIDENT)
|
|
|
|
.if ${USA_RESIDENT} == NO
|
|
|
|
pre-fetch:
|
2001-10-25 22:37:00 +02:00
|
|
|
.ifndef WITH_MATROX_GXX_DRIVER
|
|
|
|
@${ECHO} Define WITH_MATROX_GXX_DRIVER if you want to enable Matrox driver for
|
|
|
|
@${ECHO} G200, G400, G450 and G550 graphic adapters
|
|
|
|
.endif
|
1998-03-19 15:57:20 +01:00
|
|
|
MASTER_SITES+= ftp://psych.psy.uq.oz.au/pub/X11R5/ \
|
|
|
|
ftp://ftp.internat.freebsd.org/pub/FreeBSD/X11-Crypto/ \
|
|
|
|
ftp://ftp3.za.freebsd.org/pub/FreeBSD/X11-Crypto/
|
|
|
|
DISTFILES+= Wraphelp.c
|
|
|
|
IGNOREFILES= Wraphelp.c
|
2001-03-13 17:02:00 +01:00
|
|
|
.else # ${USA_RESIDENT} == YES
|
1998-03-19 15:57:20 +01:00
|
|
|
pre-fetch:
|
|
|
|
@${ECHO}
|
|
|
|
@${ECHO} Assuming that you have fetched a USA-Legal Wraphelp.c.
|
2001-10-25 22:37:00 +02:00
|
|
|
.ifndef WITH_MATROX_GXX_DRIVER
|
|
|
|
@${ECHO} Define WITH_MATROX_GXX_DRIVER if you want to enable Matrox driver for
|
|
|
|
@${ECHO} G200, G400, G450 and G550 graphic adapters
|
|
|
|
.endif
|
2001-03-13 17:02:00 +01:00
|
|
|
.endif # ${USA_RESIDENT}
|
1998-03-19 15:57:20 +01:00
|
|
|
.endif
|
|
|
|
|
2001-06-02 03:59:16 +02:00
|
|
|
.include "Makefile.man"
|
1998-11-14 10:43:39 +01:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2000-11-09 06:42:27 +01:00
|
|
|
.if ${OSVERSION} < 410000
|
|
|
|
BROKEN= "can't be compiled on this system (missing headers)"
|
|
|
|
.endif
|
|
|
|
|
2001-10-25 22:37:00 +02:00
|
|
|
.if defined(WITH_MATROX_GXX_DRIVER)
|
|
|
|
MGA_DRIVER_VERSION= 133_143
|
|
|
|
MGA_DRIVER_DIR= 1.4.3
|
|
|
|
MASTER_SITES+= ftp://ftp.matrox.com/pub/mga/archive/linux/2001/beta_${MGA_DRIVER_VERSION}/
|
|
|
|
DISTFILES+= mga-${MGA_DRIVER_VERSION}-source.tgz
|
|
|
|
|
|
|
|
PLIST_SUB+= MATROX_GXX=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= MATROX_GXX="@comment "
|
|
|
|
.endif # WITH_MATROX_GXX_DRIVER
|
|
|
|
|
2001-03-13 17:02:00 +01:00
|
|
|
|
2000-10-25 20:03:54 +02:00
|
|
|
.if ${OSVERSION} > 500012
|
|
|
|
post-patch:
|
|
|
|
@if [ ! -e ${WRKSRC}/include/Xarch.h.orig ]; then\
|
|
|
|
mv ${WRKSRC}/include/Xarch.h ${WRKSRC}/include/Xarch.h.orig;\
|
|
|
|
${SED} -e 52d -e 54d < ${WRKSRC}/include/Xarch.h.orig > \
|
|
|
|
${WRKSRC}/include/Xarch.h; fi
|
2001-03-13 17:02:00 +01:00
|
|
|
.endif # ${OSVERSION} > 500012
|
2001-10-25 22:37:00 +02:00
|
|
|
.if defined(WITH_MATROX_GXX_DRIVER)
|
|
|
|
.if !target(post-patch)
|
|
|
|
post-patch:
|
|
|
|
.endif # !target(post-patch)
|
|
|
|
@${MV} ${WRKSRC}/programs/Xserver/hw/xfree86/drivers/mga \
|
|
|
|
${WRKSRC}/programs/Xserver/hw/xfree86/drivers/mga.old
|
|
|
|
@${TAR} -xzf ${DISTDIR}/${DIST_SUBDIR}/mga-${MGA_DRIVER_VERSION}-source.tgz \
|
|
|
|
-C ${WRKDIR}
|
|
|
|
@${MV} ${WRKDIR}/mgasource/mga-${MGA_DRIVER_DIR}/mga \
|
|
|
|
${WRKSRC}/programs/Xserver/hw/xfree86/drivers
|
|
|
|
@${CP} ${WRKSRC}/config/cf/xf86site.def ${WRKSRC}/config/cf/host.def
|
2002-01-29 13:14:18 +01:00
|
|
|
@${ECHO_CMD} "#define HaveMatroxHal YES" >> ${WRKSRC}/config/cf/host.def
|
2001-10-25 22:37:00 +02:00
|
|
|
@${PERL} -pi.orig -ne 's!(#define PCI_CHIP_MGAG400\s+0x0525)!\1\n#define PCI_CHIP_MGAG550 0x2527\n!; \
|
|
|
|
s!({PCI_CHIP_MGAG400,\s+"MGA G400 AGP",0},)!\1\n{PCI_CHIP_MGAG550, "MGA G550 AGP", 0},\n!' \
|
|
|
|
${WRKSRC}/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
|
|
|
.endif # WITH_MATROX_GXX_DRIVER
|
2000-10-25 20:03:54 +02:00
|
|
|
|
1997-08-23 18:35:32 +02:00
|
|
|
pre-install:
|
2000-03-11 01:20:34 +01:00
|
|
|
${MKDIR} ${PREFIX}
|
1998-11-14 10:43:39 +01:00
|
|
|
|
1995-06-24 13:42:32 +02:00
|
|
|
post-install:
|
2000-03-11 01:20:34 +01:00
|
|
|
.ifndef DISTRIB
|
1998-09-21 02:04:36 +02:00
|
|
|
${SETENV} OBJFORMAT=${PORTOBJFORMAT} ${LDCONFIG} -m ${PREFIX}/lib
|
2000-03-11 01:20:34 +01:00
|
|
|
.endif
|
2000-10-29 01:11:09 +02:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
2000-03-11 01:20:34 +01:00
|
|
|
|
|
|
|
.ifdef DISTRIB
|
|
|
|
distrib: all install
|
|
|
|
@cd ../XFree86-contrib && \
|
|
|
|
${MAKE} NO_PKG_REGISTER=yes WRKDIR=${WRKDIR}/contrib-work \
|
|
|
|
PREFIX=${X11BASE} PREFIX=${DESTDIR}/${PREFIX} all install
|
|
|
|
@${MKDIR} ${WRKDIR}/bindist
|
|
|
|
@${CP} ${WRKSRC}/programs/Xserver/hw/xfree86/etc/bindist/FreeBSD-ELF/* \
|
|
|
|
${WRKDIR}/bindist
|
|
|
|
@${SED} -e 's:TAR="gnu-tar":TAR="${TAR}":g' \
|
|
|
|
-e 's/EXTRACTLOPTS="-t -v"/TARLOPTS="-t -v -z"/g' \
|
|
|
|
-e 's/\(#\)\( echo $$i >> $$LISTFILE\)/\2/g' \
|
|
|
|
-e 's/\(#\)\( echo "------------" >> $$LISTFILE\)/\2/g' \
|
|
|
|
-e 's/\(#\)\( $$TAR $$TARLOPTS -f $$i >> $$LISTFILE\)/\2/g' \
|
|
|
|
-e 's/\(#\)\( echo "" >> $$LISTFILE\)/\2/g' \
|
|
|
|
-e 's/\( $$EXTRACT $$EXTRACTLOPTS $$i >> $$LISTFILE\)/#\1/g' \
|
|
|
|
< ${WRKSRC}/programs/Xserver/hw/xfree86/etc/bindist/build-bindist \
|
|
|
|
> ${WRKDIR}/build-bindist
|
|
|
|
@${CHMOD} 0555 ${WRKDIR}/build-bindist
|
|
|
|
@${WRKDIR}/build-bindist X ${WRKDIR}/distrib ${WRKDIR}/bindist
|
|
|
|
.else
|
|
|
|
distrib:
|
|
|
|
@${ECHO_MSG} '>> The DISTRIB variable must be set when building ' \
|
|
|
|
'"distrib".'
|
|
|
|
@exit 1
|
|
|
|
.endif
|
1995-06-24 13:42:32 +02:00
|
|
|
|
1998-11-14 10:43:39 +01:00
|
|
|
.include <bsd.port.post.mk>
|