From 6a99fbad5bb8cc5103e4f45e7245f09f9bdc7932 Mon Sep 17 00:00:00 2001 From: schwarz Date: Mon, 10 Apr 2006 13:38:36 +0000 Subject: Modified xmkmf support for Darwin and IRIX: - on Darwin, pkgsrc no longer tries to set user or group when installing as unprivileged user, i.e. with UNPRIVILEGED set to yes. - on IRIX (5 and 6) the system's xmkmf config files are no longer modified. Instead copies (that take priority with pkgsrc's xmkmf) are used for that purpose. --- pkgtools/xpkgwedge/Makefile | 37 +++++++++++++++- pkgtools/xpkgwedge/PLIST | 5 ++- pkgtools/xpkgwedge/files/darwin.cf.patch | 13 ++++++ pkgtools/xpkgwedge/files/irix5.patch | 75 ++++++++++++++++++++++++++++++++ pkgtools/xpkgwedge/files/irix6.patch | 40 +++++++++++++++++ 5 files changed, 168 insertions(+), 2 deletions(-) create mode 100644 pkgtools/xpkgwedge/files/darwin.cf.patch create mode 100644 pkgtools/xpkgwedge/files/irix5.patch create mode 100644 pkgtools/xpkgwedge/files/irix6.patch (limited to 'pkgtools/xpkgwedge') diff --git a/pkgtools/xpkgwedge/Makefile b/pkgtools/xpkgwedge/Makefile index d6580ede00d..524d9ebe8b0 100644 --- a/pkgtools/xpkgwedge/Makefile +++ b/pkgtools/xpkgwedge/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.65 2006/03/14 01:14:32 jlam Exp $ +# $NetBSD: Makefile,v 1.66 2006/04/10 13:38:36 schwarz Exp $ DISTNAME= xpkgwedge-1.15 CATEGORIES= pkgtools devel x11 @@ -42,6 +42,26 @@ FILES_SUBST+= FONT_PROGS=${FONT_PROGS:Q} FILES_SUBST+= MAKE=${IMAKE_MAKE:Q} USE_TOOLS+= ${IMAKE_TOOLS} +.if ${OPSYS} == "Darwin" +PLIST_SUBST+= IS_DARWIN= +USE_TOOLS+= patch +.else +PLIST_SUBST+= IS_DARWIN="@comment " +.endif + +.if ${OPSYS} == "IRIX" +PLIST_SUBST+= IS_IRIX= +USE_TOOLS+= patch +. if !empty(OS_VERSION:M6*) +PLIST_SUBST+= IS_IRIX6= +. else +PLIST_SUBST+= IS_IRIX6="@comment " +. endif +.else +PLIST_SUBST+= IS_IRIX="@comment " +PLIST_SUBST+= IS_IRIX6="@comment " +.endif + .include "../../mk/x11.buildlink3.mk" SUBST_CLASSES+= paths @@ -74,5 +94,20 @@ do-install: ${INSTALL_DATA_DIR} ${PREFIX}/lib/X11/config ${INSTALL_DATA} ${WRKSRC}/xpkgwedge.def ${PREFIX}/lib/X11/config ${INSTALL_SCRIPT} ${WRKSRC}/pkgxmkmf ${PREFIX}/bin/pkgxmkmf + @case ${OPSYS} in \ + Darwin) \ + ${INSTALL_DATA} ${X11BASE}/lib/X11/config/darwin.cf ${PREFIX}/lib/X11/config; \ + cd ${PREFIX}/lib/X11/config && patch ${PATCH_STRIP} < ${FILESDIR}/darwin.cf.patch; \ + ;; \ + IRIX) \ + ${INSTALL_DATA} ${X11BASE}/lib/X11/config/sgi.cf ${PREFIX}/lib/X11/config; \ + if [ ${OS_VERSION} -ge 6 ]; then \ + ${INSTALL_DATA} ${X11BASE}/lib/X11/config/X11.rules ${PREFIX}/lib/X11/config; \ + cd ${PREFIX}/lib/X11/config && patch ${PATCH_STRIP} < ${FILESDIR}/irix6.patch; \ + else \ + cd ${PREFIX}/lib/X11/config && patch ${PATCH_STRIP} < ${FILESDIR}/irix5.patch; \ + fi; \ + ;; \ + esac .include "../../mk/bsd.pkg.mk" diff --git a/pkgtools/xpkgwedge/PLIST b/pkgtools/xpkgwedge/PLIST index afec216fda7..d2f7792d66a 100644 --- a/pkgtools/xpkgwedge/PLIST +++ b/pkgtools/xpkgwedge/PLIST @@ -1,3 +1,6 @@ -@comment $NetBSD: PLIST,v 1.4 2003/11/23 06:46:54 jlam Exp $ +@comment $NetBSD: PLIST,v 1.5 2006/04/10 13:38:36 schwarz Exp $ bin/pkgxmkmf lib/X11/config/xpkgwedge.def +${IS_DARWIN}lib/X11/config/darwin.cf +${IS_IRIX}lib/X11/config/sgi.cf +${IS_IRIX6}lib/X11/config/X11.rules diff --git a/pkgtools/xpkgwedge/files/darwin.cf.patch b/pkgtools/xpkgwedge/files/darwin.cf.patch new file mode 100644 index 00000000000..6938429edd7 --- /dev/null +++ b/pkgtools/xpkgwedge/files/darwin.cf.patch @@ -0,0 +1,13 @@ +$NetBSD: darwin.cf.patch,v 1.1 2006/04/10 13:38:36 schwarz Exp $ + +--- darwin.cf.orig 2005-12-04 20:52:30.000000000 +0100 ++++ darwin.cf 2005-12-04 20:51:38.000000000 +0100 +@@ -289,6 +289,8 @@ + # undef ServerExtraDefines + # define ServerExtraDefines XFree86ServerDefines -UX_BYTE_ORDER -DROOTLESS -DDDXTIME + ++#ifndef InstallFlags + #define InstallFlags -c -o root -g wheel ++#endif + + #endif /* XAppleServer */ diff --git a/pkgtools/xpkgwedge/files/irix5.patch b/pkgtools/xpkgwedge/files/irix5.patch new file mode 100644 index 00000000000..1067de364d7 --- /dev/null +++ b/pkgtools/xpkgwedge/files/irix5.patch @@ -0,0 +1,75 @@ +$NetBSD: irix5.patch,v 1.1 2006/04/10 13:38:36 schwarz Exp $ + +--- sgi.cf.orig 2005-12-05 16:32:49.000000000 +0100 ++++ sgi.cf 2005-12-05 16:31:59.000000000 +0100 +@@ -188,7 +188,7 @@ + * Actually, it doesn't matter what MakeCmd is, since we don't use it. + * We assume that $(MAKE) gets set for us by make. + */ +-#define MakeCmd $(TOOLROOT)/bin/make ++/*#define MakeCmd $(TOOLROOT)/bin/make */ + #define TroffCmd psroff -t + + #define StandardIncludes -nostdinc -I$(ROOT)/usr/include +@@ -252,23 +252,25 @@ + #define ManSuffix 1 + #define LibManSuffix 3 + +-#undef ManDir +-#undef LibmanDir ++#ifndef ManDir + #define ManDir $(CATMAN1DIR)$(MANPACKAGE) ++#endif ++#ifndef LibmanDir + #define LibmanDir $(CATMAN3DIR)$(MANPACKAGE) ++#endif + #define NroffManDir $(MAN1DIR)$(MANPACKAGE) + #define NroffLibmanDir $(MAN3DIR)$(MANPACKAGE) + + #ifdef UseInstalled +- MANUSR = /usr/share/local ++ MANUSR = ManUsr + #else + MANUSR = /usr/share + #endif + +- CATMAN1DIR = $(MANUSR)/catman/u_man/cat1 +- CATMAN3DIR = $(MANUSR)/catman/p_man/cat3 +- MAN1DIR = $(MANUSR)/man/u_man/man1 +- MAN3DIR = $(MANUSR)/man/p_man/man3 ++ CATMAN1DIR = $(MANUSR)/tman/cat1 ++ CATMAN3DIR = $(MANUSR)/tman/cat3 ++ MAN1DIR = $(MANUSR)/man/man1 ++ MAN3DIR = $(MANUSR)/man/man3 + + /* + * MANPACKAGE is the directory inside of cat? or man? that man pages should +@@ -281,22 +283,22 @@ + * InstallManPageLong - misc changes for sgi. + */ + #define InstallManPageLong(file,destdir,dest) @@\ +-file.nr.z : file.man @@\ ++file.nr.gz : file.man @@\ + @if [ -f file.man ]; then \ @@\ +- $(RM) file.nr file.nr.z && \ @@\ ++ $(RM) file.nr file.nr.gz && \ @@\ + tbl file.man | eqn | nroff -man - > file.nr && \ @@\ +- pack -f file.nr; \ @@\ ++ $(GZIP_CMD) file.nr; \ @@\ + fi @@\ + @@\ +-install.man:: file.nr.z @@\ ++install.man:: file.nr.gz @@\ + MakeDir($(DESTDIR)destdir); \ @@\ + if [ -f file.man ]; then \ @@\ + $(INSTALL) -c $(INSTMANFLAGS) \ @@\ +- file.nr.z $(DESTDIR)destdir/dest.z; \ @@\ ++ file.nr.gz $(DESTDIR)destdir/dest.1.gz; \ @@\ + fi @@\ + @@\ + clean:: @@\ +- $(RM) file.nr file.nr.z ++ $(RM) file.nr file.nr.gz + + /* + * InstallManPageAliases - generate rules to install manual page aliases. diff --git a/pkgtools/xpkgwedge/files/irix6.patch b/pkgtools/xpkgwedge/files/irix6.patch new file mode 100644 index 00000000000..7713d41764f --- /dev/null +++ b/pkgtools/xpkgwedge/files/irix6.patch @@ -0,0 +1,40 @@ +$NetBSD: irix6.patch,v 1.1 2006/04/10 13:38:36 schwarz Exp $ + +--- X11.rules.orig Thu Jun 12 09:12:20 2003 ++++ X11.rules Sun Jun 8 10:31:35 2003 +@@ -79,7 +79,7 @@ + #if UseInstalledX11 + #if defined(X11ProjectRoot) + # define X11BuildLibPath $(XPROJECTROOT)/lib +-else ++#else + # define X11BuildLibPath $(USRLIBDIR) + #endif + #elif ImportX11 +--- sgi.cf.orig Thu Jun 12 09:12:20 2003 ++++ sgi.cf Sun Jun 8 12:55:50 2003 +@@ -241,7 +241,9 @@ + * Actually, it doesn't matter what MakeCmd is, since we don't use it. + * We assume that $(MAKE) gets set for us by make. + */ ++#ifndef MakeCmd + #define MakeCmd $(TOOLROOTSAFE) $(TOOLROOT)/sbin/make ++#endif + #define TroffCmd psroff -t + + #define StandardIncludes -nostdinc -I$(ROOT)/usr/include +@@ -320,10 +322,14 @@ + #define NroffFilemanDir $(MAN4DIR)$(MANPACKAGE) + #define NroffMiscmanDir $(MAN5DIR)$(MANPACKAGE) + ++#ifndef ManUsr + #ifdef UseInstalled + MANUSR = /usr/share/local + #else + MANUSR = /usr/share ++#endif ++#else ++ MANUSR = ManUsr + #endif + + CATMAN1DIR = $(MANUSR)/catman/u_man/cat1 -- cgit v1.2.3