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:
parent
c027152742
commit
03f5014574
18 changed files with 234 additions and 0 deletions
32
pkgtools/xpkgwedge/Makefile
Normal file
32
pkgtools/xpkgwedge/Makefile
Normal 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"
|
10
pkgtools/xpkgwedge/files/Imakefile
Normal file
10
pkgtools/xpkgwedge/files/Imakefile
Normal 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
pkgtools/xpkgwedge/files/md5
Normal file
1
pkgtools/xpkgwedge/files/md5
Normal file
|
@ -0,0 +1 @@
|
|||
|
33
pkgtools/xpkgwedge/files/xpkgwedge.def
Normal file
33
pkgtools/xpkgwedge/files/xpkgwedge.def
Normal 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
|
1
pkgtools/xpkgwedge/pkg/COMMENT
Normal file
1
pkgtools/xpkgwedge/pkg/COMMENT
Normal file
|
@ -0,0 +1 @@
|
|||
Allows X11 pkgs to be built for installation outside of /usr/X11R6
|
16
pkgtools/xpkgwedge/pkg/DEINSTALL
Executable file
16
pkgtools/xpkgwedge/pkg/DEINSTALL
Executable 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
pkgtools/xpkgwedge/pkg/DESCR
Normal file
3
pkgtools/xpkgwedge/pkg/DESCR
Normal 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
pkgtools/xpkgwedge/pkg/MESSAGE
Normal file
18
pkgtools/xpkgwedge/pkg/MESSAGE
Normal 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
pkgtools/xpkgwedge/pkg/PLIST
Normal file
3
pkgtools/xpkgwedge/pkg/PLIST
Normal 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
32
x11/xpkgwedge/Makefile
Normal 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"
|
10
x11/xpkgwedge/files/Imakefile
Normal file
10
x11/xpkgwedge/files/Imakefile
Normal 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
1
x11/xpkgwedge/files/md5
Normal file
|
@ -0,0 +1 @@
|
|||
|
33
x11/xpkgwedge/files/xpkgwedge.def
Normal file
33
x11/xpkgwedge/files/xpkgwedge.def
Normal 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
|
1
x11/xpkgwedge/pkg/COMMENT
Normal file
1
x11/xpkgwedge/pkg/COMMENT
Normal file
|
@ -0,0 +1 @@
|
|||
Allows X11 pkgs to be built for installation outside of /usr/X11R6
|
16
x11/xpkgwedge/pkg/DEINSTALL
Executable file
16
x11/xpkgwedge/pkg/DEINSTALL
Executable 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
3
x11/xpkgwedge/pkg/DESCR
Normal 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
18
x11/xpkgwedge/pkg/MESSAGE
Normal 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
3
x11/xpkgwedge/pkg/PLIST
Normal 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
|
Loading…
Reference in a new issue