summaryrefslogtreecommitdiff
path: root/x11/xview-config
diff options
context:
space:
mode:
authordholland <dholland@pkgsrc.org>2011-08-11 05:50:37 +0000
committerdholland <dholland@pkgsrc.org>2011-08-11 05:50:37 +0000
commit4a77902a930d88d9a17f50edb5939f329985492f (patch)
treed8e82d1af9af6158f65095aab231ff0560b00696 /x11/xview-config
parent6dc54e4f15898ff2fbee39b888465f196c0f69ed (diff)
downloadpkgsrc-4a77902a930d88d9a17f50edb5939f329985492f.tar.gz
Reorganize the patches here by topic.
Diffstat (limited to 'x11/xview-config')
-rw-r--r--x11/xview-config/distinfo17
-rw-r--r--x11/xview-config/patches/patch-aa17
-rw-r--r--x11/xview-config/patches/patch-aa-buildsystem-whitespace57
-rw-r--r--x11/xview-config/patches/patch-ab65
-rw-r--r--x11/xview-config/patches/patch-ab-buildsystem-bugfixes45
-rw-r--r--x11/xview-config/patches/patch-ac-buildsystem-includedir (renamed from x11/xview-config/patches/patch-ac)47
-rw-r--r--x11/xview-config/patches/patch-ad179
-rw-r--r--x11/xview-config/patches/patch-ad-buildsystem-modernize121
-rw-r--r--x11/xview-config/patches/patch-ae74
-rw-r--r--x11/xview-config/patches/patch-ae-buildsystem-failstop105
-rw-r--r--x11/xview-config/patches/patch-af41
-rw-r--r--x11/xview-config/patches/patch-af-buildsystem-destdirsupport91
-rw-r--r--x11/xview-config/patches/patch-ag16
-rw-r--r--x11/xview-config/patches/patch-ay-misc22
-rw-r--r--x11/xview-config/patches/patch-az-pkgsrc-config70
15 files changed, 542 insertions, 425 deletions
diff --git a/x11/xview-config/distinfo b/x11/xview-config/distinfo
index a6195a2e403..9b067710bbb 100644
--- a/x11/xview-config/distinfo
+++ b/x11/xview-config/distinfo
@@ -1,12 +1,13 @@
-$NetBSD: distinfo,v 1.9 2011/08/11 02:40:52 dholland Exp $
+$NetBSD: distinfo,v 1.10 2011/08/11 05:50:37 dholland Exp $
SHA1 (xview3.2p1-X11R6.tar.gz) = 1cd04231b893c3e6c70b56791d527b498e21a27a
RMD160 (xview3.2p1-X11R6.tar.gz) = 2f21b14cb088aec887683bbc6d4ed9a3bc3fe2bb
Size (xview3.2p1-X11R6.tar.gz) = 3436814 bytes
-SHA1 (patch-aa) = a6ec694a489cb6d2da58d73e089974249a30d543
-SHA1 (patch-ab) = cafcf2582ee1267be7e00f403ffe2f6bc3da4280
-SHA1 (patch-ac) = 7f664dd96b3b66d7483f07da476a411bfec49acf
-SHA1 (patch-ad) = d648af539f4261e0bc25b6a3b69dc3b76213c2ed
-SHA1 (patch-ae) = f20b16be4ce57e241ce01b0999fb1ae6d3fbc98a
-SHA1 (patch-af) = 2290db121bd833eaeec6f3c3ee98bd6cbfd9e060
-SHA1 (patch-ag) = 9234826d08daf274da0203e8515c9396e379f016
+SHA1 (patch-aa-buildsystem-whitespace) = 5e36ff70a280196de0d1a2e7bfb3ba72d1df9460
+SHA1 (patch-ab-buildsystem-bugfixes) = dc86fe8e95d2cf4cfdd2a3ea1244240c6cf44c02
+SHA1 (patch-ac-buildsystem-includedir) = 99f258b06cd6bd9a393ebe02400bd5af18393130
+SHA1 (patch-ad-buildsystem-modernize) = 57a1abc9df6ec6797a4b78902ddfdf32ba5b8982
+SHA1 (patch-ae-buildsystem-failstop) = af001a61d76bb244ccc93251266e7a4d941c5d25
+SHA1 (patch-af-buildsystem-destdirsupport) = 75b41aab6700490e7eed2241616212826866a5a8
+SHA1 (patch-ay-misc) = 90097cdba97abd83c856b0e481b1b4b864f96ca4
+SHA1 (patch-az-pkgsrc-config) = 831fa625a6daef2930cbaeafe516cadcb32accf0
diff --git a/x11/xview-config/patches/patch-aa b/x11/xview-config/patches/patch-aa
deleted file mode 100644
index 22d01feb481..00000000000
--- a/x11/xview-config/patches/patch-aa
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-aa,v 1.7 2009/12/10 20:34:44 abs Exp $
-
---- Imakefile.orig 1993-06-29 05:13:19.000000000 +0000
-+++ Imakefile
-@@ -8,10 +8,10 @@
- /**/# config directory
- /**/# @(#)Imakefile 1.9 28 Jun 1993 SMI
-
--XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl library.tmpl
-+XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl XView.prog
- CFFILES = $(XVFILES) $(HEADERS)
-
--InstallMultipleDestFlags(install,$(CFFILES),$(CONFIGDIR),$(INSTDATFLAGS))
-+InstallMultipleDestFlags(install,$(CFFILES),$(PREFIX)/lib/X11/config,$(INSTDATFLAGS))
-
- depend::
-
diff --git a/x11/xview-config/patches/patch-aa-buildsystem-whitespace b/x11/xview-config/patches/patch-aa-buildsystem-whitespace
new file mode 100644
index 00000000000..a80c120b0dc
--- /dev/null
+++ b/x11/xview-config/patches/patch-aa-buildsystem-whitespace
@@ -0,0 +1,57 @@
+$NetBSD: patch-aa-buildsystem-whitespace,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Use whitespace correctly in makefiles.
+
+--- XView.rules Thu Aug 11 00:25:10 2011 -0400
++++ XView.rules Thu Aug 11 01:01:32 2011 -0400
+@@ -366,9 +366,9 @@
+ #ifndef InstallSharedLibraryNoBuild
+ #define InstallSharedLibraryNoBuild(libname,rev,dest) @@\
+ install:: @@\
+- $(RM) /dest/lib/**/libname.so @@\
++ $(RM) /dest/lib/**/libname.so @@\
+ $(INSTALL) -c $(INSTSHAREDLIBFLAGS) lib/**/libname.so.rev dest @@\
+- (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so)
++ (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so)
+
+ #endif /* InstallSharedLibraryNoBuild */
+
+--- XView.tmpl Thu Aug 11 00:25:10 2011 -0400
++++ XView.tmpl Thu Aug 11 01:01:32 2011 -0400
+@@ -356,10 +356,10 @@
+
+ #if SystemV4
+ SYSV_CLIENT_LIB = -lintl -ldl
+- XVCLIENTSYSDEFINES = -DSVR4 -DSYSV
++ XVCLIENTSYSDEFINES = -DSVR4 -DSYSV
+ #else
+ SYSV_CLIENT_LIB =
+- XVCLIENTSYSDEFINES = -DSUNOS41
++ XVCLIENTSYSDEFINES = -DSUNOS41
+ #endif
+
+ /*
+@@ -371,16 +371,16 @@
+ */
+
+ #if XvI18nLevel == 4
+- XVCLIENTI18NDEFINES = -DOW_I18N_L4 -DOW_I18N_L3 -DOW_I18N -DFULL_R5
+- XVCLIENTMISCLIB = -lw
+- XVCLIENTINCLUDES = -I$(OPENWINHOME)/include
++ XVCLIENTI18NDEFINES = -DOW_I18N_L4 -DOW_I18N_L3 -DOW_I18N -DFULL_R5
++ XVCLIENTMISCLIB = -lw
++ XVCLIENTINCLUDES = -I$(OPENWINHOME)/include
+ #else
+- XVCLIENTI18NDEFINES = -DOW_I18N_L3
+- XVCLIENTMISCLIB =
+- XVCLIENTINCLUDES =
++ XVCLIENTI18NDEFINES = -DOW_I18N_L3
++ XVCLIENTMISCLIB =
++ XVCLIENTINCLUDES =
+ #endif
+
+- XVCLIENTDEFINES = $(XVCLIENTSYSDEFINES) $(XVCLIENTI18NDEFINES)
++ XVCLIENTDEFINES = $(XVCLIENTSYSDEFINES) $(XVCLIENTI18NDEFINES)
+
+ /*
+ * Define libraries for XView clients
diff --git a/x11/xview-config/patches/patch-ab b/x11/xview-config/patches/patch-ab
deleted file mode 100644
index a0dda45fda3..00000000000
--- a/x11/xview-config/patches/patch-ab
+++ /dev/null
@@ -1,65 +0,0 @@
-$NetBSD: patch-ab,v 1.9 2011/08/11 02:40:52 dholland Exp $
-
---- XView.cf.orig 1994-06-27 02:09:19.000000000 +0000
-+++ XView.cf
-@@ -101,7 +101,7 @@
- * the appropriate value.
- */
- #ifndef XVDestDir
--#define XVDestDir /usr/X11/xview
-+#define XVDestDir ProjectRoot
- #endif
- /*
- * Command to add object modules to the library.
-@@ -139,7 +139,7 @@
- * installed in $(DESTDIR)/lib/X11/config (aka $(CONFIGDIR)).
- */
- #ifndef OnlyNeedsNewXViewConfigInstalled
--#define OnlyNeedsNewXViewConfigInstalled NO
-+#define OnlyNeedsNewXViewConfigInstalled YES
- #endif
- /*
- * If you would like the XView man pages to be installed in
-@@ -195,7 +195,7 @@
- # if PreR4Server
- # define LibXViewDefines -DPRE_R4_ICCCM
- # else
--# define LibXViewDefines -DFULL_R5 -I$(OPENWINHOME)/include -DSUNOS41 -DX11R6
-+# define LibXViewDefines -DNO_CAST_VATOAV -DFULL_R5 -I$(OPENWINHOME)/include -DSUNOS41 -DX11R6
- # endif
- #endif
- /*
-@@ -232,5 +232,5 @@
- */
- #ifndef DebugLibXView
--#define DebugLibXView NO
-+#define DebugLibXView NO
- #endif
- /*
-@@ -259,7 +259,7 @@
- * following variable to YES.
- */
- #ifndef InstallAllImages
--#define InstallAllImages NO
-+#define InstallAllImages YES
- #endif
- /*
- * If you do not already have the textsw extras menu installed in
-@@ -305,7 +305,7 @@
- * malloc() and read() will be used instead.
- */
- #ifndef OsHasMmap
--#define OsHasMmap YES
-+#define OsHasMmap NO
- #endif
- /*
- * The implementation of internationalization support in XView depends
-@@ -360,7 +360,7 @@
- * be defined as -PIC
- */
- #ifndef PositionIndependentCodeFlag
--#define PositionIndependentCodeFlag -PIC
-+#define PositionIndependentCodeFlag -fPIC
- #endif
-
- /*
diff --git a/x11/xview-config/patches/patch-ab-buildsystem-bugfixes b/x11/xview-config/patches/patch-ab-buildsystem-bugfixes
new file mode 100644
index 00000000000..75016e4fb70
--- /dev/null
+++ b/x11/xview-config/patches/patch-ab-buildsystem-bugfixes
@@ -0,0 +1,45 @@
+$NetBSD: patch-ab-buildsystem-bugfixes,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Fix a couple outright bugs in the build system as shipped.
+
+ - Install XView.prog, which exists and is needed, and not library.tmpl,
+ which does not exist and is not referenced otherwise.
+
+ - Install in ProjectRoot, not in a fixed location of /usr/X11/xview.
+
+ - Use $(PIC) and $(SHAREDCODEDEF) when compiling for debug shared
+ libraries as well as non-debug shared libraries.
+
+--- Imakefile Thu Aug 11 01:01:32 2011 -0400
++++ Imakefile Thu Aug 11 01:05:35 2011 -0400
+@@ -8,7 +8,7 @@
+ /**/# config directory
+ /**/# @(#)Imakefile 1.9 28 Jun 1993 SMI
+
+-XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl library.tmpl
++XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl XView.prog
+ CFFILES = $(XVFILES) $(HEADERS)
+
+ InstallMultipleDestFlags(install,$(CFFILES),$(CONFIGDIR),$(INSTDATFLAGS))
+--- XView.cf Thu Aug 11 01:01:32 2011 -0400
++++ XView.cf Thu Aug 11 01:05:35 2011 -0400
+@@ -101,7 +101,7 @@
+ * the appropriate value.
+ */
+ #ifndef XVDestDir
+-#define XVDestDir /usr/X11/xview
++#define XVDestDir ProjectRoot
+ #endif
+ /*
+ * Command to add object modules to the library.
+--- XView.rules Thu Aug 11 01:01:32 2011 -0400
++++ XView.rules Thu Aug 11 01:05:35 2011 -0400
+@@ -273,7 +273,7 @@
+ $(RM) $@ shared/$@ debugger/$@ @@\
+ $(CC) -g -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ $(CP) $*.o debugger/$*.o @@\
+- $(CC) -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
++ $(CC) -c $(PIC) $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ @@\
+ clean:: @@\
+ $(RM) strings* @@\
diff --git a/x11/xview-config/patches/patch-ac b/x11/xview-config/patches/patch-ac-buildsystem-includedir
index 7d0b5e3aa41..74f0e5c5722 100644
--- a/x11/xview-config/patches/patch-ac
+++ b/x11/xview-config/patches/patch-ac-buildsystem-includedir
@@ -1,7 +1,10 @@
-$NetBSD: patch-ac,v 1.6 2009/12/10 20:34:44 abs Exp $
-
---- XView.obj.orig 1993-06-29 05:13:20.000000000 +0000
-+++ XView.obj
+$NetBSD: patch-ac-buildsystem-includedir,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Fix handling of the include directory name so it works with current C
+preprocessors.
+
+--- XView.obj Thu Aug 11 00:52:36 2011 -0400
++++ XView.obj Thu Aug 11 00:53:26 2011 -0400
@@ -15,7 +15,7 @@
STD_DEFINES = StandardDefines LibXViewDefines
#endif
@@ -11,7 +14,7 @@ $NetBSD: patch-ac,v 1.6 2009/12/10 20:34:44 abs Exp $
OBJS = $(TEXT_OBJS) $(DATA_OBJS) $(SPECIAL_OBJS)
#if !NotLibXView
ALLFILES = $(SRCS) $(HEADERS)
-@@ -85,17 +85,17 @@ NormalLintTarget($(SRCS))
+@@ -85,14 +85,14 @@
#if SubdirHasPublicHeaders
# if NotLibXView
@@ -19,8 +22,7 @@ $NetBSD: patch-ac,v 1.6 2009/12/10 20:34:44 abs Exp $
+BuildIncludes($(HDRSPUBLIC),$(PUB_INCDIR),.)
install::
-- $(MKDIRHIER) $(PUB_HEADER_DEST)
-+ $(MKDIRHIER) $(DESTDIR)$(PUB_HEADER_DEST)
+ $(MKDIRHIER) $(PUB_HEADER_DEST)
InstallMultiple($(HDRSPUBLIC),$(PUB_HEADER_DEST))
# else
@@ -28,12 +30,8 @@ $NetBSD: patch-ac,v 1.6 2009/12/10 20:34:44 abs Exp $
+BuildIncludes($(HDRSPUBLIC),$(XVPUB_INCDIR),.)
install::
-- $(MKDIRHIER) $(XVPUB_HEADER_DEST)
-+ $(MKDIRHIER) $(DESTDIR)$(XVPUB_HEADER_DEST)
-
- InstallMultiple($(HDRSPUBLIC),$(XVPUB_HEADER_DEST))
- # endif
-@@ -103,19 +103,19 @@ InstallMultiple($(HDRSPUBLIC),$(XVPUB_HE
+ $(MKDIRHIER) $(XVPUB_HEADER_DEST)
+@@ -103,9 +103,9 @@
#if SubdirHasPrivateHeaders
# if NotLibXView
@@ -45,15 +43,14 @@ $NetBSD: patch-ac,v 1.6 2009/12/10 20:34:44 abs Exp $
# endif
# if InstallPrivateHeaders
# if NotLibXView
- install::
-- $(MKDIRHIER) $(PRI_HEADER_DEST)
-+ $(MKDIRHIER) $(DESTDIR)$(PRI_HEADER_DEST)
-
- InstallMultiple($(HDRSPRIVATE),$(PRI_HEADER_DEST))
- # else
- install::
-- $(MKDIRHIER) $(XVPRI_HEADER_DEST)
-+ $(MKDIRHIER) $(DESTDIR)$(XVPRI_HEADER_DEST)
-
- InstallMultiple($(HDRSPRIVATE),$(XVPRI_HEADER_DEST))
- # endif
+--- XView.tmpl Thu Aug 11 00:52:36 2011 -0400
++++ XView.tmpl Thu Aug 11 00:53:26 2011 -0400
+@@ -224,7 +224,7 @@
+ * afterwards.
+ */
+ #ifndef XVIncludeDirName
+-#define XVIncludeDirName /include
++#define XVIncludeDirName include
+ #endif
+ INCDIR = XVIncludeDirName
+ /*
diff --git a/x11/xview-config/patches/patch-ad b/x11/xview-config/patches/patch-ad
deleted file mode 100644
index d10fe5509b8..00000000000
--- a/x11/xview-config/patches/patch-ad
+++ /dev/null
@@ -1,179 +0,0 @@
-$NetBSD: patch-ad,v 1.9 2009/12/10 20:34:44 abs Exp $
-
-Patch the make rules to exit on error instead of charging ahead.
-Upstream: not sent upstream as upstream is long dead.
-
-
---- XView.rules.orig 1993-06-29 05:13:20.000000000 +0000
-+++ XView.rules
-@@ -69,7 +69,7 @@ name:: @@\
- for i in dirs ;\ @@\
- do \ @@\
- (cd $$i ; echo "making name in $$i"; \ @@\
-- $(MAKE) PassCDebugFlags $(MFLAGS) name); \ @@\
-+ $(MAKE) PassCDebugFlags $(MFLAGS) name) || exit $$?; \ @@\
- done
-
- #endif /* MakeAnythingSubdirs */
-@@ -110,7 +110,7 @@ AllTarget(lib/**/libname.so.rev) @@\
- lib/**/libname.so.rev:: solist @@\
- -@if [ ! -d dir ]; then mkdir dir; else exit 0; fi @@\
- @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
-- for i in solist; do (set -x; $(CP) sub/$$i dir; $(CP) sub/$$i .); done
-+ for i in solist; do (set -x; $(CP) sub/$$i dir; $(CP) sub/$$i .) || exit $$?; done
-
- #endif /* SubdirNormalSharedLibraryTarget */
-
-@@ -128,7 +128,7 @@ lib/**/libname.sa.rev:: salist @@\
- -@if [ ! -d dir ]; then mkdir dir; else exit 0; fi @@\
- @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
- for i in salist; do \ @@\
-- (set -x; $(CP) sub/$$i dir; $(CP) shared/$$i $(SHARED_DIR)); done
-+ (set -x; $(CP) sub/$$i dir; $(CP) shared/$$i $(SHARED_DIR)) || exit $$?; done
-
- #endif /* SubdirNormalSharedLibraryDataTarget */
-
-@@ -141,6 +141,7 @@ lib/**/libname.sa.rev:: salist @@\
- * included in both the .so and the .sa parts of the library.
- */
- #ifndef SubdirBuildNormalSharedLibraryTarget
-+#if UseElfFormat == YES
- #define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
- AllTarget(lib/**/libname.so.rev) @@\
- @@\
-@@ -148,7 +149,7 @@ lib/**/libname.so.rev:: solist @@\
- $(RM) $@~ sodir/lib/**/libname.so.xs.o @@\
- @if [ -f xstrings ]; then \ @@\
- $(RM) strings; $(CP) xstrings strings; fi @@\
-- (cd sodir; $(LD) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) @@\
-+ (cd sodir; $(CC) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) || exit $$? @@\
- -@if [ -f strings~ ]; then $(RM) strings~; else exit 0; fi @@\
- $(RM) $@ @@\
- $(MV) $@~ $@ @@\
-@@ -156,6 +157,23 @@ lib/**/libname.so.rev:: solist @@\
- clean:: @@\
- $(RM) lib/**/libname.so.rev sodir/?*.o strings*
-
-+#else
-+#define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
-+AllTarget(lib/**/libname.so.rev) @@\
-+ @@\
-+lib/**/libname.so.rev:: solist @@\
-+ $(RM) $@~ sodir/lib/**/libname.so.xs.o @@\
-+ @if [ -f xstrings ]; then \ @@\
-+ $(RM) strings; $(CP) xstrings strings; fi @@\
-+ (cd sodir; $(LD) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) || exit $$? @@\
-+ -@if [ -f strings~ ]; then $(RM) strings~; else exit 0; fi @@\
-+ $(RM) $@ @@\
-+ $(MV) $@~ $@ @@\
-+ @@\
-+clean:: @@\
-+ $(RM) lib/**/libname.so.rev sodir/?*.o strings*
-+
-+#endif
- #endif /* SubdirBuildNormalSharedLibraryTarget */
-
- /*
-@@ -199,7 +217,7 @@ AllTarget(lib/**/libname.sa.rev) @@\
- @@\
- lib/**/libname.sa.rev:: @@\
- $(RM) $@~ @@\
-- (cd sadir; $(AR) ../$@~ ?*.o) @@\
-+ (cd sadir; $(AR) ../$@~ ?*.o) || exit $$? @@\
- $(RM) $@ @@\
- $(MV) $@~ $@ @@\
- $(RANLIB) $@ @@\
-@@ -217,7 +235,7 @@ AllTarget(lib/**/libname.sa.rev) @@\
- @@\
- lib/**/libname.sa.rev:: @@\
- $(RM) $@~ @@\
-- (cd sadir; $(AR) ../$@~ ?*.o) @@\
-+ (cd sadir; $(AR) ../$@~ ?*.o) || exit $$? @@\
- $(RM) $@ @@\
- $(MV) $@~ $@ @@\
- @@\
-@@ -245,8 +263,9 @@ all:: @@\
- @@\
- .c.o: @@\
- $(RM) $@ shared/$@ @@\
-- $(CC) $(PIC) $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(STRCONST) -c $*.c \ @@\
-- -o shared/$*.o @@\
-+ $(CC) -c $(PIC) $(SHAREDCODEDEF) \ @@\
-+ $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
-+ $(CP) $*.o shared/$*.o @@\
- @@\
- clean:: @@\
- $(RM) strings* @@\
-@@ -256,24 +275,26 @@ clean:: @@\
- #endif /* SubdirSharedLibraryObjectRule */
-
- /*
-- * SubdirSharedAndDebuggedLibraryObjectRule - generate make rules to build shared,
-- * debuggable, and "normal" object files.
-+ * SubdirSharedAndDebuggedLibraryObjectRule - generate make rules to
-+ * build shared, debuggable, and "normal" object files.
- */
- #ifndef SubdirSharedAndDebuggedLibraryObjectRule
--#define SubdirSharedAndDebuggedLibraryObjectRule() @@\
-+#define SubdirSharedAndDebuggedLibraryObjectRule() @@\
- all:: @@\
- -@if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
- -@if [ ! -f $(XSTR_STRINGS_FILE) ]; then \ @@\
- touch $(XSTR_STRINGS_FILE); else exit 0; fi @@\
-- -@if [ -f strings ]; then $(RM) strings; else exit 0; fi @@\
-- $(LN) $(XSTR_STRINGS_FILE) strings @@\
-+ -@if [ ! -f strings ]; then \ @@\
-+ $(LN) $(XSTR_STRINGS_FILE) strings; else exit 0; fi @@\
- -@if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @@\
- @@\
- .c.o: @@\
- $(RM) $@ shared/$@ debugger/$@ @@\
-- $(CC) -g -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
-+ $(CC) -c -g $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
- $(CP) $*.o debugger/$*.o @@\
-- $(CC) -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
-+ $(CC) -c $(PIC) $(SHAREDCODEDEF) \ @@\
-+ $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
-+ $(CP) $*.o shared/$*.o @@\
- @@\
- clean:: @@\
- $(RM) strings* @@\
-@@ -366,9 +387,9 @@ install:: @@\
- #ifndef InstallSharedLibraryNoBuild
- #define InstallSharedLibraryNoBuild(libname,rev,dest) @@\
- install:: @@\
-- $(RM) /dest/lib/**/libname.so @@\
-+ $(RM) /dest/lib/**/libname.so @@\
- $(INSTALL) -c $(INSTSHAREDLIBFLAGS) lib/**/libname.so.rev dest @@\
-- (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so)
-+ (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so) || exit $$?
-
- #endif /* InstallSharedLibraryNoBuild */
-
-@@ -450,7 +471,7 @@ step:: filename @@\
- -@if [ ! -f dir/linkname ]; then \ @@\
- echo "linking dir/linkname to filename..." \ @@\
- echo " cd" dir; cd dir ; $(RM) linkname ; \ @@\
-- (set -x; $(LN) filename linkname); \ @@\
-+ (set -x; $(LN) filename linkname) || exit $$?; \ @@\
- else \ @@\
- echo "dir/linkname exists, no link made." ; \ @@\
- fi
-@@ -462,7 +483,7 @@ step:: filename @@\
- #ifndef StartNamedTarget
- #define StartNamedTarget(step,dir,flags) @@\
- step:: @@\
-- (cd dir ; $(MAKE) $(MFLAGS) flags step );
-+ (cd dir ; $(MAKE) $(MFLAGS) flags step ) || exit $$?;
- #endif /* StartNamedTarget */
-
- /*
-@@ -477,7 +498,7 @@ install:: @@\
- echo "installing $$i"; \ @@\
- $(RM) dest/$$i dest/.$$i; \ @@\
- $(INSTALL) -c $(INSTDATFLAGS) $$i dest ; \ @@\
-- ( cd dest; $(MV) $$i .$$i; $(LN) .$$i $$i ); \ @@\
-+ ( cd dest; $(MV) $$i .$$i; $(LN) .$$i $$i ) || exit $$?; \ @@\
- done
- #endif /* InstallSupportList */
-
diff --git a/x11/xview-config/patches/patch-ad-buildsystem-modernize b/x11/xview-config/patches/patch-ad-buildsystem-modernize
new file mode 100644
index 00000000000..528ef28e76c
--- /dev/null
+++ b/x11/xview-config/patches/patch-ad-buildsystem-modernize
@@ -0,0 +1,121 @@
+$NetBSD: patch-ad-buildsystem-modernize,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Assorted minor modernizations to the build system.
+
+ - Install all icons and other images by default. By modern standards
+ they're small.
+
+ - Make the default compiler flag for PIC -fPIC, which will work without
+ further fuss in the largest number of environments.
+
+ - Support ELF as well as legacy a.out linking, using $(CC) instead of
+ $(LD) to link in order to get the proper startup files for a library.
+
+ - Write suffix rules that work properly with current make dialects.
+
+ - Some adjoining cosmetic fixups.
+
+--- XView.cf Thu Aug 11 01:06:50 2011 -0400
++++ XView.cf Thu Aug 11 01:19:01 2011 -0400
+@@ -259,7 +259,7 @@
+ * following variable to YES.
+ */
+ #ifndef InstallAllImages
+-#define InstallAllImages NO
++#define InstallAllImages YES
+ #endif
+ /*
+ * If you do not already have the textsw extras menu installed in
+@@ -358,9 +358,11 @@
+ * PositionIndependentCodeFlag should be defined as -K PIC
+ * If you are running 4.x, then PositionIndependentCodeFlag should
+ * be defined as -PIC
++ * For gcc and most gcc-like modern compilers this should be -fPIC,
++ * so that'll be the default.
+ */
+ #ifndef PositionIndependentCodeFlag
+-#define PositionIndependentCodeFlag -PIC
++#define PositionIndependentCodeFlag -fPIC
+ #endif
+
+ /*
+--- XView.rules Thu Aug 11 01:06:50 2011 -0400
++++ XView.rules Thu Aug 11 01:19:01 2011 -0400
+@@ -141,6 +141,23 @@
+ * included in both the .so and the .sa parts of the library.
+ */
+ #ifndef SubdirBuildNormalSharedLibraryTarget
++#if UseElfFormat == YES
++#define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
++AllTarget(lib/**/libname.so.rev) @@\
++ @@\
++lib/**/libname.so.rev:: solist @@\
++ $(RM) $@~ sodir/lib/**/libname.so.xs.o @@\
++ @if [ -f xstrings ]; then \ @@\
++ $(RM) strings; $(CP) xstrings strings; fi @@\
++ (cd sodir; $(CC) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) @@\
++ -@if [ -f strings~ ]; then $(RM) strings~; else exit 0; fi @@\
++ $(RM) $@ @@\
++ $(MV) $@~ $@ @@\
++ @@\
++clean:: @@\
++ $(RM) lib/**/libname.so.rev sodir/?*.o strings*
++
++#else
+ #define SubdirBuildNormalSharedLibraryTarget(libname,rev,solist,sodir) @@\
+ AllTarget(lib/**/libname.so.rev) @@\
+ @@\
+@@ -156,6 +173,7 @@
+ clean:: @@\
+ $(RM) lib/**/libname.so.rev sodir/?*.o strings*
+
++#endif
+ #endif /* SubdirBuildNormalSharedLibraryTarget */
+
+ /*
+@@ -245,8 +263,9 @@
+ @@\
+ .c.o: @@\
+ $(RM) $@ shared/$@ @@\
+- $(CC) $(PIC) $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(STRCONST) -c $*.c \ @@\
+- -o shared/$*.o @@\
++ $(CC) -c $(PIC) $(SHAREDCODEDEF) \ @@\
++ $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
++ $(CP) $*.o shared/$*.o @@\
+ @@\
+ clean:: @@\
+ $(RM) strings* @@\
+@@ -256,24 +275,26 @@
+ #endif /* SubdirSharedLibraryObjectRule */
+
+ /*
+- * SubdirSharedAndDebuggedLibraryObjectRule - generate make rules to build shared,
+- * debuggable, and "normal" object files.
++ * SubdirSharedAndDebuggedLibraryObjectRule - generate make rules to
++ * build shared, debuggable, and "normal" object files.
+ */
+ #ifndef SubdirSharedAndDebuggedLibraryObjectRule
+-#define SubdirSharedAndDebuggedLibraryObjectRule() @@\
++#define SubdirSharedAndDebuggedLibraryObjectRule() @@\
+ all:: @@\
+ -@if [ ! -d shared ]; then mkdir shared; else exit 0; fi @@\
+ -@if [ ! -f $(XSTR_STRINGS_FILE) ]; then \ @@\
+ touch $(XSTR_STRINGS_FILE); else exit 0; fi @@\
+- -@if [ -f strings ]; then $(RM) strings; else exit 0; fi @@\
+- $(LN) $(XSTR_STRINGS_FILE) strings @@\
++ -@if [ ! -f strings ]; then \ @@\
++ $(LN) $(XSTR_STRINGS_FILE) strings; else exit 0; fi @@\
+ -@if [ ! -d debugger ]; then mkdir debugger; else exit 0; fi @@\
+ @@\
+ .c.o: @@\
+ $(RM) $@ shared/$@ debugger/$@ @@\
+- $(CC) -g -c $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
++ $(CC) -c -g $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
+ $(CP) $*.o debugger/$*.o @@\
+- $(CC) -c $(PIC) $(SHAREDCODEDEF) $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
++ $(CC) -c $(PIC) $(SHAREDCODEDEF) \ @@\
++ $(SHLIBDEF) $(CFLAGS) $(STRCONST) $*.c @@\
++ $(CP) $*.o shared/$*.o @@\
+ @@\
+ clean:: @@\
+ $(RM) strings* @@\
diff --git a/x11/xview-config/patches/patch-ae b/x11/xview-config/patches/patch-ae
deleted file mode 100644
index f9e21c5564c..00000000000
--- a/x11/xview-config/patches/patch-ae
+++ /dev/null
@@ -1,74 +0,0 @@
-$NetBSD: patch-ae,v 1.7 2009/12/10 20:34:44 abs Exp $
-
---- XView.tmpl.orig 1994-06-27 02:10:00.000000000 +0000
-+++ XView.tmpl
-@@ -96,7 +96,7 @@
- * Work around small conflict with Project.tmpl file
- */
- #if UseInstalled
-- MKDIRHIER = BourneShell BinDir/mkdirhier
-+ MKDIRHIER = mkdirhier
- #endif
-
- #if OsHasLocale
-@@ -192,14 +192,6 @@
- AS = as
- */
- /*
-- * use the same trick X11R5 does for defining rules for installed libs
-- */
--#ifdef UseInstalled
--#define _Use(a,b) a
--#else
--#define _Use(a,b) b
--#endif
--/*
- * Temporary directory used during build process before the include
- * files are installed. This is just a place where symbolic links are
- * placed to point back to the actual files in the build hierarchy to
-@@ -224,7 +216,7 @@
- * afterwards.
- */
- #ifndef XVIncludeDirName
--#define XVIncludeDirName /include
-+#define XVIncludeDirName include
- #endif
- INCDIR = XVIncludeDirName
- /*
-@@ -356,10 +348,10 @@
-
- #if SystemV4
- SYSV_CLIENT_LIB = -lintl -ldl
-- XVCLIENTSYSDEFINES = -DSVR4 -DSYSV
-+ XVCLIENTSYSDEFINES = -DSVR4 -DSYSV
- #else
- SYSV_CLIENT_LIB =
-- XVCLIENTSYSDEFINES = -DSUNOS41
-+ XVCLIENTSYSDEFINES = -DSUNOS41
- #endif
-
- /*
-@@ -371,16 +363,16 @@
- */
-
- #if XvI18nLevel == 4
-- XVCLIENTI18NDEFINES = -DOW_I18N_L4 -DOW_I18N_L3 -DOW_I18N -DFULL_R5
-- XVCLIENTMISCLIB = -lw
-- XVCLIENTINCLUDES = -I$(OPENWINHOME)/include
-+ XVCLIENTI18NDEFINES = -DOW_I18N_L4 -DOW_I18N_L3 -DOW_I18N -DFULL_R5
-+ XVCLIENTMISCLIB = -lw
-+ XVCLIENTINCLUDES = -I$(OPENWINHOME)/include
- #else
-- XVCLIENTI18NDEFINES = -DOW_I18N_L3
-- XVCLIENTMISCLIB =
-- XVCLIENTINCLUDES =
-+ XVCLIENTI18NDEFINES = -DOW_I18N_L3
-+ XVCLIENTMISCLIB =
-+ XVCLIENTINCLUDES =
- #endif
-
-- XVCLIENTDEFINES = $(XVCLIENTSYSDEFINES) $(XVCLIENTI18NDEFINES)
-+ XVCLIENTDEFINES = $(XVCLIENTSYSDEFINES) $(XVCLIENTI18NDEFINES)
-
- /*
- * Define libraries for XView clients
diff --git a/x11/xview-config/patches/patch-ae-buildsystem-failstop b/x11/xview-config/patches/patch-ae-buildsystem-failstop
new file mode 100644
index 00000000000..0e5cdb8c5e2
--- /dev/null
+++ b/x11/xview-config/patches/patch-ae-buildsystem-failstop
@@ -0,0 +1,105 @@
+$NetBSD: patch-ae-buildsystem-failstop,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Make the build stop on error.
+
+--- XView.rules Thu Aug 11 01:15:45 2011 -0400
++++ XView.rules Thu Aug 11 01:16:12 2011 -0400
+@@ -69,7 +69,7 @@
+ for i in dirs ;\ @@\
+ do \ @@\
+ (cd $$i ; echo "making name in $$i"; \ @@\
+- $(MAKE) PassCDebugFlags $(MFLAGS) name); \ @@\
++ $(MAKE) PassCDebugFlags $(MFLAGS) name) || exit $$?; \ @@\
+ done
+
+ #endif /* MakeAnythingSubdirs */
+@@ -110,7 +110,7 @@
+ lib/**/libname.so.rev:: solist @@\
+ -@if [ ! -d dir ]; then mkdir dir; else exit 0; fi @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+- for i in solist; do (set -x; $(CP) sub/$$i dir; $(CP) sub/$$i .); done
++ for i in solist; do (set -x; $(CP) sub/$$i dir; $(CP) sub/$$i .) || exit $$?; done
+
+ #endif /* SubdirNormalSharedLibraryTarget */
+
+@@ -128,7 +128,7 @@
+ -@if [ ! -d dir ]; then mkdir dir; else exit 0; fi @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in salist; do \ @@\
+- (set -x; $(CP) sub/$$i dir; $(CP) shared/$$i $(SHARED_DIR)); done
++ (set -x; $(CP) sub/$$i dir; $(CP) shared/$$i $(SHARED_DIR)) || exit $$?; done
+
+ #endif /* SubdirNormalSharedLibraryDataTarget */
+
+@@ -149,7 +149,7 @@
+ $(RM) $@~ sodir/lib/**/libname.so.xs.o @@\
+ @if [ -f xstrings ]; then \ @@\
+ $(RM) strings; $(CP) xstrings strings; fi @@\
+- (cd sodir; $(CC) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) @@\
++ (cd sodir; $(CC) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) || exit $$? @@\
+ -@if [ -f strings~ ]; then $(RM) strings~; else exit 0; fi @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+@@ -165,7 +165,7 @@
+ $(RM) $@~ sodir/lib/**/libname.so.xs.o @@\
+ @if [ -f xstrings ]; then \ @@\
+ $(RM) strings; $(CP) xstrings strings; fi @@\
+- (cd sodir; $(LD) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) @@\
++ (cd sodir; $(LD) -o ../$@~ $(SHLIBLDFLAGS) ?*.o) || exit $$? @@\
+ -@if [ -f strings~ ]; then $(RM) strings~; else exit 0; fi @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+@@ -217,7 +217,7 @@
+ @@\
+ lib/**/libname.sa.rev:: @@\
+ $(RM) $@~ @@\
+- (cd sadir; $(AR) ../$@~ ?*.o) @@\
++ (cd sadir; $(AR) ../$@~ ?*.o) || exit $$? @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RANLIB) $@ @@\
+@@ -235,7 +235,7 @@
+ @@\
+ lib/**/libname.sa.rev:: @@\
+ $(RM) $@~ @@\
+- (cd sadir; $(AR) ../$@~ ?*.o) @@\
++ (cd sadir; $(AR) ../$@~ ?*.o) || exit $$? @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+@@ -389,7 +389,7 @@
+ install:: @@\
+ $(RM) /dest/lib/**/libname.so @@\
+ $(INSTALL) -c $(INSTSHAREDLIBFLAGS) lib/**/libname.so.rev dest @@\
+- (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so)
++ (cd dest; $(LN) lib/**/libname.so.rev lib/**/libname.so) || exit $$?
+
+ #endif /* InstallSharedLibraryNoBuild */
+
+@@ -471,7 +471,7 @@
+ -@if [ ! -f dir/linkname ]; then \ @@\
+ echo "linking dir/linkname to filename..." \ @@\
+ echo " cd" dir; cd dir ; $(RM) linkname ; \ @@\
+- (set -x; $(LN) filename linkname); \ @@\
++ (set -x; $(LN) filename linkname) || exit $$?; \ @@\
+ else \ @@\
+ echo "dir/linkname exists, no link made." ; \ @@\
+ fi
+@@ -483,7 +483,7 @@
+ #ifndef StartNamedTarget
+ #define StartNamedTarget(step,dir,flags) @@\
+ step:: @@\
+- (cd dir ; $(MAKE) $(MFLAGS) flags step );
++ (cd dir ; $(MAKE) $(MFLAGS) flags step ) || exit $$?;
+ #endif /* StartNamedTarget */
+
+ /*
+@@ -498,7 +498,7 @@
+ echo "installing $$i"; \ @@\
+ $(RM) dest/$$i dest/.$$i; \ @@\
+ $(INSTALL) -c $(INSTDATFLAGS) $$i dest ; \ @@\
+- ( cd dest; $(MV) $$i .$$i; $(LN) .$$i $$i ); \ @@\
++ ( cd dest; $(MV) $$i .$$i; $(LN) .$$i $$i ) || exit $$?; \ @@\
+ done
+ #endif /* InstallSupportList */
+
diff --git a/x11/xview-config/patches/patch-af b/x11/xview-config/patches/patch-af
deleted file mode 100644
index 92f9162a623..00000000000
--- a/x11/xview-config/patches/patch-af
+++ /dev/null
@@ -1,41 +0,0 @@
-$NetBSD: patch-af,v 1.1 2009/12/10 20:34:44 abs Exp $
-
---- XView.lib.orig 1993-06-29 05:13:20.000000000 +0000
-+++ XView.lib
-@@ -6,14 +6,14 @@
- #include BandAidCompiler
- #endif
- install::
-- $(MKDIRHIER) $(LIBRARY_DEST)
-+ $(MKDIRHIER) $(DESTDIR)$(LIBRARY_DEST)
-
- #if DebugLibXView
--InstallLibraryNoBuild(${LIBTARGET}_d,$(LIBRARY_DEST))
-+InstallLibraryNoBuild(${LIBTARGET}_d,$(DESTDIR)$(LIBRARY_DEST))
- #endif
-
- #if ProfileLibXView
--InstallLibraryNoBuild(${LIBTARGET}_p,$(LIBRARY_DEST))
-+InstallLibraryNoBuild(${LIBTARGET}_p,$(DESTDIR)$(LIBRARY_DEST))
- #endif
-
- #if SharedLibXView
-@@ -24,14 +24,14 @@ SubdirBuildNormalSharedLibraryTarget(${L
- # endif
- # if !NoDataObjs
- SubdirBuildNormalSharedLibraryDataTarget(${LIBTARGET},${SOREV},$(UNSHARED_DIR))
--InstallSharedLibraryDataNoBuild(${LIBTARGET},${SOREV},$(LIBRARY_DEST))
-+InstallSharedLibraryDataNoBuild(${LIBTARGET},${SOREV},$(DESTDIR)$(LIBRARY_DEST))
- # endif
--InstallSharedLibraryNoBuild(${LIBTARGET},${SOREV},$(LIBRARY_DEST))
-+InstallSharedLibraryNoBuild(${LIBTARGET},${SOREV},$(DESTDIR)$(LIBRARY_DEST))
- #endif
-
--InstallLibraryNoBuild(${LIBTARGET}, $(LIBRARY_DEST))
-+InstallLibraryNoBuild(${LIBTARGET}, $(DESTDIR)$(LIBRARY_DEST))
- SubdirLintLibraryBuild(${LIBTARGET},lint)
--InstallLintLibrary(${LIBTARGET},$(LINT_LIBRARY_DEST))
-+InstallLintLibrary(${LIBTARGET},$(DESTDIR)$(LINT_LIBRARY_DEST))
-
- #ifndef IncludePopulateSCCS
- #define IncludePopulateSCCS YES
diff --git a/x11/xview-config/patches/patch-af-buildsystem-destdirsupport b/x11/xview-config/patches/patch-af-buildsystem-destdirsupport
new file mode 100644
index 00000000000..1b206a82099
--- /dev/null
+++ b/x11/xview-config/patches/patch-af-buildsystem-destdirsupport
@@ -0,0 +1,91 @@
+$NetBSD: patch-af-buildsystem-destdirsupport,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Add DESTDIR support.
+
+--- XView.lib Thu Aug 11 00:53:28 2011 -0400
++++ XView.lib Thu Aug 11 00:54:45 2011 -0400
+@@ -6,14 +6,14 @@
+ #include BandAidCompiler
+ #endif
+ install::
+- $(MKDIRHIER) $(LIBRARY_DEST)
++ $(MKDIRHIER) $(DESTDIR)$(LIBRARY_DEST)
+
+ #if DebugLibXView
+-InstallLibraryNoBuild(${LIBTARGET}_d,$(LIBRARY_DEST))
++InstallLibraryNoBuild(${LIBTARGET}_d,$(DESTDIR)$(LIBRARY_DEST))
+ #endif
+
+ #if ProfileLibXView
+-InstallLibraryNoBuild(${LIBTARGET}_p,$(LIBRARY_DEST))
++InstallLibraryNoBuild(${LIBTARGET}_p,$(DESTDIR)$(LIBRARY_DEST))
+ #endif
+
+ #if SharedLibXView
+@@ -24,14 +24,14 @@
+ # endif
+ # if !NoDataObjs
+ SubdirBuildNormalSharedLibraryDataTarget(${LIBTARGET},${SOREV},$(UNSHARED_DIR))
+-InstallSharedLibraryDataNoBuild(${LIBTARGET},${SOREV},$(LIBRARY_DEST))
++InstallSharedLibraryDataNoBuild(${LIBTARGET},${SOREV},$(DESTDIR)$(LIBRARY_DEST))
+ # endif
+-InstallSharedLibraryNoBuild(${LIBTARGET},${SOREV},$(LIBRARY_DEST))
++InstallSharedLibraryNoBuild(${LIBTARGET},${SOREV},$(DESTDIR)$(LIBRARY_DEST))
+ #endif
+
+-InstallLibraryNoBuild(${LIBTARGET}, $(LIBRARY_DEST))
++InstallLibraryNoBuild(${LIBTARGET}, $(DESTDIR)$(LIBRARY_DEST))
+ SubdirLintLibraryBuild(${LIBTARGET},lint)
+-InstallLintLibrary(${LIBTARGET},$(LINT_LIBRARY_DEST))
++InstallLintLibrary(${LIBTARGET},$(DESTDIR)$(LINT_LIBRARY_DEST))
+
+ #ifndef IncludePopulateSCCS
+ #define IncludePopulateSCCS YES
+--- XView.obj Thu Aug 11 00:53:28 2011 -0400
++++ XView.obj Thu Aug 11 00:54:45 2011 -0400
+@@ -88,14 +88,14 @@
+ BuildIncludes($(HDRSPUBLIC),$(PUB_INCDIR),.)
+
+ install::
+- $(MKDIRHIER) $(PUB_HEADER_DEST)
++ $(MKDIRHIER) $(DESTDIR)$(PUB_HEADER_DEST)
+
+ InstallMultiple($(HDRSPUBLIC),$(PUB_HEADER_DEST))
+ # else
+ BuildIncludes($(HDRSPUBLIC),$(XVPUB_INCDIR),.)
+
+ install::
+- $(MKDIRHIER) $(XVPUB_HEADER_DEST)
++ $(MKDIRHIER) $(DESTDIR)$(XVPUB_HEADER_DEST)
+
+ InstallMultiple($(HDRSPUBLIC),$(XVPUB_HEADER_DEST))
+ # endif
+@@ -110,12 +110,12 @@
+ # if InstallPrivateHeaders
+ # if NotLibXView
+ install::
+- $(MKDIRHIER) $(PRI_HEADER_DEST)
++ $(MKDIRHIER) $(DESTDIR)$(PRI_HEADER_DEST)
+
+ InstallMultiple($(HDRSPRIVATE),$(PRI_HEADER_DEST))
+ # else
+ install::
+- $(MKDIRHIER) $(XVPRI_HEADER_DEST)
++ $(MKDIRHIER) $(DESTDIR)$(XVPRI_HEADER_DEST)
+
+ InstallMultiple($(HDRSPRIVATE),$(XVPRI_HEADER_DEST))
+ # endif
+--- XView.prog Thu Aug 11 00:53:28 2011 -0400
++++ XView.prog Thu Aug 11 00:54:45 2011 -0400
+@@ -4,9 +4,9 @@
+
+ #if HasInfoFiles
+ install::
+- $(MKDIRHIER) $(HELP_DEST)
++ $(MKDIRHIER) $(DESTDIR)$(HELP_DEST)
+
+-InstallNonExecList($(INFOFILES),$(HELP_DEST))
++InstallNonExecList($(INFOFILES),$(DESTDIR)$(HELP_DEST))
+ #endif
+
+ #if InstallSrcs
diff --git a/x11/xview-config/patches/patch-ag b/x11/xview-config/patches/patch-ag
deleted file mode 100644
index bd73aca778b..00000000000
--- a/x11/xview-config/patches/patch-ag
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ag,v 1.1 2009/12/10 20:34:44 abs Exp $
-
---- XView.prog.orig 1993-06-29 05:13:20.000000000 +0000
-+++ XView.prog
-@@ -4,9 +4,9 @@ PopulateSCCSTree(h,$(ALLFILES))
-
- #if HasInfoFiles
- install::
-- $(MKDIRHIER) $(HELP_DEST)
-+ $(MKDIRHIER) $(DESTDIR)$(HELP_DEST)
-
--InstallNonExecList($(INFOFILES),$(HELP_DEST))
-+InstallNonExecList($(INFOFILES),$(DESTDIR)$(HELP_DEST))
- #endif
-
- #if InstallSrcs
diff --git a/x11/xview-config/patches/patch-ay-misc b/x11/xview-config/patches/patch-ay-misc
new file mode 100644
index 00000000000..dfaa0340293
--- /dev/null
+++ b/x11/xview-config/patches/patch-ay-misc
@@ -0,0 +1,22 @@
+$NetBSD: patch-ay-misc,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+_Use is already defined by the standard makefile templates, so don't
+redefine it.
+
+--- XView.tmpl Thu Aug 11 01:19:03 2011 -0400
++++ XView.tmpl Thu Aug 11 01:19:06 2011 -0400
+@@ -192,14 +192,6 @@
+ AS = as
+ */
+ /*
+- * use the same trick X11R5 does for defining rules for installed libs
+- */
+-#ifdef UseInstalled
+-#define _Use(a,b) a
+-#else
+-#define _Use(a,b) b
+-#endif
+-/*
+ * Temporary directory used during build process before the include
+ * files are installed. This is just a place where symbolic links are
+ * placed to point back to the actual files in the build hierarchy to
diff --git a/x11/xview-config/patches/patch-az-pkgsrc-config b/x11/xview-config/patches/patch-az-pkgsrc-config
new file mode 100644
index 00000000000..0da246eefcd
--- /dev/null
+++ b/x11/xview-config/patches/patch-az-pkgsrc-config
@@ -0,0 +1,70 @@
+$NetBSD: patch-az-pkgsrc-config,v 1.1 2011/08/11 05:50:37 dholland Exp $
+
+Configure for pkgsrc.
+
+ - Install the imake files explicitly under $(PREFIX). While the given
+ path is the same as $(CONFIGDIR) for pkgsrc X, for native X using
+ $(CONFIGDIR) would drop the XView imake files in /usr/X11R[67] and
+ we don't want that.
+
+ - Set OnlyNeedsNewXViewConfigInstalled, which doesn't mean what it
+ sounds like it means and will get cleaned up at some future point.
+
+ - Add -DNO_CAST_VATOAV to avoid undefined behavior handling va_list.
+
+ - Turn off OsHasMmap. Not sure why (been this way since the initial
+ pkgsrc import), but I'll leave it for now.
+
+ - Use the pkgsrc mkdirhier.
+
+--- Imakefile Thu Aug 11 00:54:45 2011 -0400
++++ Imakefile Thu Aug 11 00:59:56 2011 -0400
+@@ -11,7 +11,7 @@
+ XVFILES = XView.cf XView.lib XView.obj XView.rules XView.tmpl XView.prog
+ CFFILES = $(XVFILES) $(HEADERS)
+
+-InstallMultipleDestFlags(install,$(CFFILES),$(CONFIGDIR),$(INSTDATFLAGS))
++InstallMultipleDestFlags(install,$(CFFILES),$(PREFIX)/lib/X11/config,$(INSTDATFLAGS))
+
+ depend::
+
+--- XView.cf Thu Aug 11 00:54:45 2011 -0400
++++ XView.cf Thu Aug 11 00:59:56 2011 -0400
+@@ -139,7 +139,7 @@
+ * installed in $(DESTDIR)/lib/X11/config (aka $(CONFIGDIR)).
+ */
+ #ifndef OnlyNeedsNewXViewConfigInstalled
+-#define OnlyNeedsNewXViewConfigInstalled NO
++#define OnlyNeedsNewXViewConfigInstalled YES
+ #endif
+ /*
+ * If you would like the XView man pages to be installed in
+@@ -195,7 +195,7 @@
+ # if PreR4Server
+ # define LibXViewDefines -DPRE_R4_ICCCM
+ # else
+-# define LibXViewDefines -DFULL_R5 -I$(OPENWINHOME)/include -DSUNOS41 -DX11R6
++# define LibXViewDefines -DNO_CAST_VATOAV -DFULL_R5 -I$(OPENWINHOME)/include -DSUNOS41 -DX11R6
+ # endif
+ #endif
+ /*
+@@ -305,7 +305,7 @@
+ * malloc() and read() will be used instead.
+ */
+ #ifndef OsHasMmap
+-#define OsHasMmap YES
++#define OsHasMmap NO
+ #endif
+ /*
+ * The implementation of internationalization support in XView depends
+--- XView.tmpl Thu Aug 11 00:54:45 2011 -0400
++++ XView.tmpl Thu Aug 11 00:59:56 2011 -0400
+@@ -96,7 +96,7 @@
+ * Work around small conflict with Project.tmpl file
+ */
+ #if UseInstalled
+- MKDIRHIER = BourneShell BinDir/mkdirhier
++ MKDIRHIER = mkdirhier
+ #endif
+
+ #if OsHasLocale