Skip site navigation (1)Skip section navigation (2)
Date:      Sat,  9 Mar 2002 19:34:05 +0100 (CET)
From:      Dimitry Andric <dim@xs4all.nl>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/35704: XFree86-4 Font server port fails on Wraphelp.c
Message-ID:  <20020309183405.AB31A5637@tensor.xs4all.nl>

next in thread | raw e-mail | index | archive | help

>Number:         35704
>Category:       ports
>Synopsis:       XFree86-4 Font server port fails on Wraphelp.c
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Mar 09 10:40:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Dimitry Andric <dim@xs4all.nl>
>Release:        FreeBSD 4.5-STABLE i386
>Organization:
n/a
>Environment:
System: FreeBSD tensor.xs4all.nl 4.5-STABLE FreeBSD 4.5-STABLE #0: Wed Feb 27 20:37:38 CET 2002 root@tensor.xs4all.nl:/usr/obj/usr/src/sys/TENSOR i386
>Description:
Compiling the XFree86-4-FontServer port (version 4.1.0) fails with a
complaint about Wraphelp.c missing. It isn't copied to the work
directory during the configure stage of the port.
>How-To-Repeat:
cd /usr/ports/x11-servers/XFree86-4-FontServer && make
This fails with the error:
make: don't know how to make ../../lib/Xdmcp/Wraphelp.c. Stop
*** Error code 2
>Fix:
I copied the HasXdmAuth and Wraphelp.c stuff from the other server
ports. I'm not sure why this port is building all the server code,
though, since the resulting package only contains an xfs binary and a
man page. But here is a patch anyway.

diff -ud Makefile.orig Makefile
--- Makefile.orig	Sat Sep  1 21:31:58 2001
+++ Makefile	Sat Mar  9 14:02:14 2002
@@ -21,10 +21,27 @@
 DIST_SUBDIR=		xc
 WRKSRC=			${WRKDIR}/xc
 PATCHDIR=		${.CURDIR}/../../x11/XFree86-4-libraries/files
+SCRIPTS_ENV=		HasXdmAuth=${HasXdmAuth}
 MAKE_ENV=		MAN_INSTALL_TARGET=FreeBSDPortsInstall.man
 ALL_TARGET=		FreeBSDPortsBuild
 INSTALL_TARGET=		FreeBSDPortsInstall installXserver.man
 MAN1=			Xserver.1 xfs.1
+
+HasXdmAuth?=		DEFAULT
+
+.if ${HasXdmAuth} == DEFAULT || ${HasXdmAuth} == YES
+.if defined(USA_RESIDENT) && ${USA_RESIDENT} == YES
+pre-everything::
+	@${ECHO_MSG} "Assuming that you have fetched a USA-Legal Wraphelp.c."
+.else
+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/
+EXTRACT_ONLY=	X410src-1.tgz
+DISTFILES+=	Wraphelp.c
+IGNOREFILES=	Wraphelp.c
+.endif	# USA_RESIDENT
+.endif	# HasXdmAuth
 
 do-configure:
 	cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure
diff -ud distinfo.orig distinfo
--- distinfo.orig	Wed Jun 13 21:16:13 2001
+++ distinfo	Sat Mar  9 13:50:17 2002
@@ -1 +1,2 @@
 MD5 (xc/X410src-1.tgz) = 2d4709f7106a1d65c175be445a3d3c32
+MD5 (xc/Wraphelp.c) = IGNORE
diff -ud scripts/configure.orig scripts/configure
--- scripts/configure.orig	Mon Jan  7 15:55:09 2002
+++ scripts/configure	Sat Mar  9 13:57:16 2002
@@ -58,7 +58,36 @@
     echo "#define InstallFSConfig $InstallFSConfig" >> $LOCALDEF
     echo "#define FreeBSDBuildXfs YES" >> $LOCALDEF
 
-    cp -f $ORIGDEF $DESTDEF
+    # Check Wraphelp.c
+    if [ $HasXdmAuth = DEFAULT ]; then
+	HasXdmAuth=$(awk '/^#define.*HasXdmAuth/ {print $3}' $ORIGDEF|tail -1)
+    fi
+
+    cpwh=NO
+    if [ $HasXdmAuth = YES ]; then
+	WH=$WRKDIR/xc/lib/Xdmcp/Wraphelp.c
+	if [ -f $WH ] ; then
+	    cpwh=SOURCE
+	elif [ -f $DISTDIR/xc/Wraphelp.c ] ; then
+	    cpwh=$DISTDIR/xc/Wraphelp.c
+	else
+	    echo "==> You must fetch USA-legal Wraphelp.c manually"
+	    echo "==> and put it to ${DISTDIR}/xc/."
+	    exit 1
+	fi
+	if [ X$cpwh != XNO -a X$cpwh != XSOURCE ]; then
+	    tr -d '\r' < $cpwh > $WH
+	fi
+    fi
+
+    # Copy ORIGDEF to DESTDEF
+    rm -f $DESTDEF
+    grep -v '#define.*HasXdmAuth' $ORIGDEF >> $DESTDEF
+    if [ $cpwh = NO ] ; then
+	echo "#define HasXdmAuth NO" >> $DESTDEF
+    else
+	echo "#define HasXdmAuth YES" >> $DESTDEF
+    fi
 
     # copy generated config to host.def
     cp -f $LOCALDEF $HOSTDEF
>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020309183405.AB31A5637>