summaryrefslogtreecommitdiff
path: root/pkgtools/xpkgwedge/files
diff options
context:
space:
mode:
authortv <tv@pkgsrc.org>1998-06-26 16:39:23 +0000
committertv <tv@pkgsrc.org>1998-06-26 16:39:23 +0000
commit03f5014574ff3d135b3852f24b4cbd373b28b7e0 (patch)
tree3acce4bd302483f0976530c4ad692d323880e773 /pkgtools/xpkgwedge/files
parentc027152742b3a541743b59afded69b1450572952 (diff)
downloadpkgsrc-03f5014574ff3d135b3852f24b4cbd373b28b7e0.tar.gz
Add xpkgwedge, an experimental patch that enables the build of X11 pkgs
(even imake ones) that will install in /usr/pkg instead of /usr/X11R6. This is NOT (yet?) the standard X11 pkg build procedure, but it does provide a "way out" for users that do not want to pollute their /usr/X11R6 tree with pkgs.
Diffstat (limited to 'pkgtools/xpkgwedge/files')
-rw-r--r--pkgtools/xpkgwedge/files/Imakefile10
-rw-r--r--pkgtools/xpkgwedge/files/md51
-rw-r--r--pkgtools/xpkgwedge/files/xpkgwedge.def33
3 files changed, 44 insertions, 0 deletions
diff --git a/pkgtools/xpkgwedge/files/Imakefile b/pkgtools/xpkgwedge/files/Imakefile
new file mode 100644
index 00000000000..b9d01d0360b
--- /dev/null
+++ b/pkgtools/xpkgwedge/files/Imakefile
@@ -0,0 +1,10 @@
+# in case this hack is already installed
+X11_ROOT ?= ProjectRoot
+PREFIX = ${X11_ROOT}
+
+install::
+ ${BSD_INSTALL_DATA} xpkgwedge.def ${CONFIGDIR}
+ @echo updating ${CONFIGDIR}/host.def
+ @echo '#include <xpkgwedge.def>' >${CONFIGDIR}/host.def.new
+ @grep -v xpkgwedge ${CONFIGDIR}/host.def >>${CONFIGDIR}/host.def.new || true
+ @mv -f ${CONFIGDIR}/host.def.new ${CONFIGDIR}/host.def
diff --git a/pkgtools/xpkgwedge/files/md5 b/pkgtools/xpkgwedge/files/md5
new file mode 100644
index 00000000000..8b137891791
--- /dev/null
+++ b/pkgtools/xpkgwedge/files/md5
@@ -0,0 +1 @@
+
diff --git a/pkgtools/xpkgwedge/files/xpkgwedge.def b/pkgtools/xpkgwedge/files/xpkgwedge.def
new file mode 100644
index 00000000000..879fcdb3e93
--- /dev/null
+++ b/pkgtools/xpkgwedge/files/xpkgwedge.def
@@ -0,0 +1,33 @@
+/* $NetBSD: xpkgwedge.def,v 1.1 1998/06/26 16:39:25 tv Exp $ */
+
+#ifdef AfterVendorCF
+
+/*
+ * The following defines inject a "PREFIX=" make-time option that lets the
+ * user twiddle the ProjectRoot setting with a single switch. This makes
+ * the command "make PREFIX=/path/to/install all install" work as expected.
+ *
+ * Note that ?= is a special Pmake construct and probably will not work on
+ * other makes.
+ */
+
+#ifndef ProjectRoot
+/*
+ * Assume the worst: this should not happen in practice, as this setup
+ * does not work with the classical /usr/{include,lib}/X11 layout.
+ */
+#define ProjectRoot /usr/X11
+#endif
+
+PREFIX ?= ProjectRoot
+X11_ROOT = ProjectRoot
+#undef ProjectRoot
+#define ProjectRoot $(PREFIX)
+
+/*
+ * This emits dual -I and -L options to cc automatically, one for the actual
+ * X11 root, and one for the user-set prefix.
+ */
+#define X11ProjectRoot $(X11_ROOT)
+
+#endif