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.
This commit is contained in:
tv 1998-06-26 16:39:23 +00:00
parent c027152742
commit 03f5014574
18 changed files with 234 additions and 0 deletions

View file

@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.1 1998/06/26 16:39:23 tv Exp $
#
DISTNAME= xpkgwedge-0.1
CATEGORIES= devel x11
DISTFILES= # none
MAINTAINER= tv@netbsd.org
RESTRICTED= optional # NOT for distro as a "binary" pkg
IS_INTERACTIVE= yes # should not be built when batch
NO_BUILD= yes
NO_WRKSUBDIR= yes
USE_IMAKE= yes
pre-extract:
@if [ x${LOCALBASE} = x${X11BASE} ]; then \
${ECHO} '$$LOCALBASE == $$X11BASE; this patch cannot be applied.'; \
${ECHO} 'During install, xpkgwedge requires $$X11BASE to point to the real X distribution.'; \
${ECHO} 'If you are setting this variable in mk.conf, remove the setting temporarily'; \
${ECHO} 'and then install xpkgwedge.'; \
${FALSE}; \
fi
pre-configure:
@${CP} ${FILESDIR}/Imakefile ${FILESDIR}/xpkgwedge.def ${WRKSRC}
post-install:
@${SED} -e s,@@PREFIX@@,${LOCALBASE}, ${PKGDIR}/MESSAGE
.include "../../mk/bsd.pkg.mk"

View file

@ -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

View file

@ -0,0 +1 @@

View file

@ -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

View file

@ -0,0 +1 @@
Allows X11 pkgs to be built for installation outside of /usr/X11R6

View file

@ -0,0 +1,16 @@
#! /bin/sh
case "$2" in
DEINSTALL) cat <<EOF
===============================================================
Note that you now need to remove the line which assigns X11BASE
(such as X11BASE=\${LOCALBASE}) from your /etc/mk.conf! If you
do not remove that change, X11 pkgs will no longer build.
===============================================================
EOF
;;
esac

View file

@ -0,0 +1,3 @@
Xpkgwedge, not a "real" program in the traditional sense, is a hack that
allows NetBSD users to compile X11 pkgs from pkgsrc and install them in
/usr/pkg - even if they use Imake.

View file

@ -0,0 +1,18 @@
==============================================================================
NOTES:
- Add the following line in /etc/mk.conf to enable building of X pkgs into
the regular pkg binary tree:
X11BASE=${LOCALBASE}
- You MUST set the environment variable XAPPLRESDIR in /etc/profile and
/etc/csh.login by hand in order to make pkgs built with xpkgwedge run
properly. The setting should point to:
@@PREFIX@@/lib/X11/app-defaults
If any users set XAPPLRESDIR in their own environment, these settings
will not work - such users should instead append their own directories to
XAPPLRESDIR after a : character (similar to PATH).
==============================================================================

View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 1998/06/26 16:39:28 tv Exp $
lib/X11/config/xpkgwedge.def
@unexec echo "updating %D/lib/X11/config/host.def"; cp %D/lib/X11/config/host.def %D/lib/X11/config/host.def.bak; (grep -v xpkgwedge %D/lib/X11/config/host.def.bak || true) >%D/lib/X11/config/host.def

32
x11/xpkgwedge/Makefile Normal file
View file

@ -0,0 +1,32 @@
# $NetBSD: Makefile,v 1.1 1998/06/26 16:39:23 tv Exp $
#
DISTNAME= xpkgwedge-0.1
CATEGORIES= devel x11
DISTFILES= # none
MAINTAINER= tv@netbsd.org
RESTRICTED= optional # NOT for distro as a "binary" pkg
IS_INTERACTIVE= yes # should not be built when batch
NO_BUILD= yes
NO_WRKSUBDIR= yes
USE_IMAKE= yes
pre-extract:
@if [ x${LOCALBASE} = x${X11BASE} ]; then \
${ECHO} '$$LOCALBASE == $$X11BASE; this patch cannot be applied.'; \
${ECHO} 'During install, xpkgwedge requires $$X11BASE to point to the real X distribution.'; \
${ECHO} 'If you are setting this variable in mk.conf, remove the setting temporarily'; \
${ECHO} 'and then install xpkgwedge.'; \
${FALSE}; \
fi
pre-configure:
@${CP} ${FILESDIR}/Imakefile ${FILESDIR}/xpkgwedge.def ${WRKSRC}
post-install:
@${SED} -e s,@@PREFIX@@,${LOCALBASE}, ${PKGDIR}/MESSAGE
.include "../../mk/bsd.pkg.mk"

View file

@ -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

1
x11/xpkgwedge/files/md5 Normal file
View file

@ -0,0 +1 @@

View file

@ -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

View file

@ -0,0 +1 @@
Allows X11 pkgs to be built for installation outside of /usr/X11R6

16
x11/xpkgwedge/pkg/DEINSTALL Executable file
View file

@ -0,0 +1,16 @@
#! /bin/sh
case "$2" in
DEINSTALL) cat <<EOF
===============================================================
Note that you now need to remove the line which assigns X11BASE
(such as X11BASE=\${LOCALBASE}) from your /etc/mk.conf! If you
do not remove that change, X11 pkgs will no longer build.
===============================================================
EOF
;;
esac

3
x11/xpkgwedge/pkg/DESCR Normal file
View file

@ -0,0 +1,3 @@
Xpkgwedge, not a "real" program in the traditional sense, is a hack that
allows NetBSD users to compile X11 pkgs from pkgsrc and install them in
/usr/pkg - even if they use Imake.

18
x11/xpkgwedge/pkg/MESSAGE Normal file
View file

@ -0,0 +1,18 @@
==============================================================================
NOTES:
- Add the following line in /etc/mk.conf to enable building of X pkgs into
the regular pkg binary tree:
X11BASE=${LOCALBASE}
- You MUST set the environment variable XAPPLRESDIR in /etc/profile and
/etc/csh.login by hand in order to make pkgs built with xpkgwedge run
properly. The setting should point to:
@@PREFIX@@/lib/X11/app-defaults
If any users set XAPPLRESDIR in their own environment, these settings
will not work - such users should instead append their own directories to
XAPPLRESDIR after a : character (similar to PATH).
==============================================================================

3
x11/xpkgwedge/pkg/PLIST Normal file
View file

@ -0,0 +1,3 @@
@comment $NetBSD: PLIST,v 1.1 1998/06/26 16:39:28 tv Exp $
lib/X11/config/xpkgwedge.def
@unexec echo "updating %D/lib/X11/config/host.def"; cp %D/lib/X11/config/host.def %D/lib/X11/config/host.def.bak; (grep -v xpkgwedge %D/lib/X11/config/host.def.bak || true) >%D/lib/X11/config/host.def