openbsd-ports/infrastructure/patches/patch-xfree-4.0

134 lines
3.2 KiB
Bash

#! /bin/sh
# $OpenBSD: patch-xfree-4.0,v 1.3 2000/12/15 08:05:45 angelos Exp $
#
X11BASE=${X11BASE:-/usr/X11R6}
if [ -f ${X11BASE}/lib/X11/config/ports.cf ]; then
echo "The XFree installation under ${X11BASE} has already been patched."
exit 0
fi
echo "This will patch an existing XFree 4.0 binary installation"
echo "so that OpenBSD ports install in /usr/local."
read answer?"Patch the XFree installation under ${X11BASE} ? "
case "$answer" in
[yY]*)
if cat $0 | patch -p0 -N -s -d ${X11BASE} ; then
echo "Installation patched succesfully"
else
echo "Problem with patching"
fi;;
*)
echo "Installation NOT patched";;
esac
exit 0
--- bin/xmkmf.orig Tue Jul 4 15:33:38 2000
+++ bin/xmkmf Sun Jul 9 20:37:54 2000
@@ -11,13 +11,24 @@
topdir=
curdir=.
do_all=
+imake_defines=
-case "$1" in
--a)
- do_all="yes"
- shift
- ;;
-esac
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -D*)
+ imake_defines="$imake_defines $1"
+ shift
+ ;;
+ -a)
+ do_all="yes"
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
case $# in
0) ;;
@@ -41,10 +52,10 @@
args="-I$topdir/config/cf -DTOPDIR=$topdir -DCURDIR=$curdir"
fi
-echo imake $args
+echo imake $imake_defines $args
case "$do_all" in
yes)
- imake $args &&
+ imake $imake_defines $args &&
echo "make Makefiles" &&
make Makefiles &&
echo "make includes" &&
@@ -53,6 +64,6 @@
make depend
;;
*)
- imake $args
+ imake $imake_defines $args
;;
esac
--- lib/X11/config/X11.rules.orig Mon Jul 10 16:04:55 2000
+++ lib/X11/config/X11.rules Mon Jul 10 14:27:54 2000
@@ -67,14 +67,16 @@
#endif
#define LdPostLibs LdPostLib XLdPostLibs
-#if ImportX11
-# define TopXInclude -I$(TOP)/imports/x11/include
-#elif !UseInstalledX11
-# define TopXInclude -I$(TOP)/exports/include
-#elif defined(X11ProjectRoot)
-# define TopXInclude -I$(XPROJECTROOT)/include
-#else
-# define TopXInclude /**/
+#ifndef TopXInclude
+# if ImportX11
+# define TopXInclude -I$(TOP)/imports/x11/include
+# elif !UseInstalledX11
+# define TopXInclude -I$(TOP)/exports/include
+# elif defined(X11ProjectRoot)
+# define TopXInclude -I$(XPROJECTROOT)/include
+# else
+# define TopXInclude /**/
+# endif
#endif
#define TopIncludes TopInclude $(TOP_X_INCLUDES)
--- lib/X11/config/OpenBSD.cf.orig Mon Jul 10 16:05:09 2000
+++ lib/X11/config/OpenBSD.cf Mon Jul 10 14:28:10 2000
@@ -1,6 +1,10 @@
XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.37 2000/06/24 17:43:44 dawes Exp $
XCOMM
+#ifdef Ports
+#include <ports.cf>
+#endif
+
#ifndef OSName
#define OSName DefaultOSName OSBinaryType
#endif
--- /dev/null Mon Jul 10 14:28:37 2000
+++ lib/X11/config/ports.cf Sun Jul 9 20:36:43 2000
@@ -0,0 +1,11 @@
+#define BinDir /usr/local/bin
+#define UsrLibDir /usr/local/lib
+#define ManDirectoryRoot /usr/local/man
+#define LdPreLib -L/usr/X11R6/lib -L/usr/local/lib
+#define XpmLibDir /usr/X11R6/lib
+#define XpmIncDir /usr/X11R6/include
+#define ConfigDir /usr/X11R6/lib/X11/config
+#define IncRoot /usr/local/include
+#define TopXInclude -I/usr/X11R6/include
+#define ImakeCmd imake -DPorts
+#define DocDir /usr/local/share/doc