--- gstreamer-0.8.7/tools/Makefile.am.lib64	2004-07-07 13:32:30.000000000 -0400
+++ gstreamer-0.8.7/tools/Makefile.am	2004-11-09 13:41:42.386079033 -0500
@@ -2,99 +2,117 @@
 if GST_DISABLE_REGISTRY
 GST_REGISTRY_SRC = 
 GST_REGISTRY_SRC_V = 
+GST_REGISTRY_WRAPPER_SRC = 
+GST_REGISTRY_WRAPPER_SRC_V =
 else
-GST_REGISTRY_SRC = gst-register
-GST_REGISTRY_SRC_V = gst-register-@GST_MAJORMINOR@
+GST_REGISTRY_SRC = gst-register-@host_cpu@
+GST_REGISTRY_SRC_V = gst-register-@host_cpu@-@GST_MAJORMINOR@
+GST_REGISTRY_WRAPPER_SRC = gst-register
+GST_REGISTRY_WRAPPER_SRC_V = gst-register-@GST_MAJORMINOR@
 endif
 
+
 if GST_DISABLE_LOADSAVE
 GST_LOADSAVE_SRC = 
 GST_LOADSAVE_SRC_V = 
 else
-GST_LOADSAVE_SRC = gst-complete gst-compprep gst-xmllaunch
+GST_LOADSAVE_SRC = gst-complete-@host_cpu@ gst-compprep-@host_cpu@ gst-xmllaunch-@host_cpu@
 GST_LOADSAVE_SRC_V = \
-	gst-complete-@GST_MAJORMINOR@ \
-	gst-compprep-@GST_MAJORMINOR@ \
-	gst-xmllaunch-@GST_MAJORMINOR@
+	gst-complete-@host_cpu@-@GST_MAJORMINOR@ \
+	gst-compprep-@host_cpu@-@GST_MAJORMINOR@ \
+	gst-xmllaunch-@host_cpu@-@GST_MAJORMINOR@
 endif
 
 GST_OTHER_SRC = \
-	gst-feedback \
-	gst-inspect \
-	gst-launch \
-	gst-md5sum \
-	gst-typefind \
-	gst-xmlinspect
+	gst-feedback-@host_cpu@ \
+	gst-inspect-@host_cpu@ \
+	gst-launch-@host_cpu@ \
+	gst-md5sum-@host_cpu@ \
+	gst-typefind-@host_cpu@ \
+	gst-xmlinspect-@host_cpu@
 GST_OTHER_SRC_V = \
-	gst-inspect-@GST_MAJORMINOR@ \
-	gst-launch-@GST_MAJORMINOR@ \
-	gst-md5sum-@GST_MAJORMINOR@ \
-	gst-typefind-@GST_MAJORMINOR@ \
-	gst-xmlinspect-@GST_MAJORMINOR@
+	gst-inspect-@host_cpu@-@GST_MAJORMINOR@ \
+	gst-launch-@host_cpu@-@GST_MAJORMINOR@ \
+	gst-md5sum-@host_cpu@-@GST_MAJORMINOR@ \
+	gst-typefind-@host_cpu@-@GST_MAJORMINOR@ \
+	gst-xmlinspect-@host_cpu@-@GST_MAJORMINOR@
 
 ### so all of the programs we want to build
 bin_PROGRAMS = \
-	$(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V) \
 	$(GST_LOADSAVE_SRC) $(GST_LOADSAVE_SRC_V) \
 	$(GST_OTHER_SRC) $(GST_OTHER_SRC_V)
-bin_SCRIPTS = gst-feedback-@GST_MAJORMINOR@
+bin_SCRIPTS = gst-feedback-@host_cpu@-@GST_MAJORMINOR@ \
+	$(GST_REGISTRY_WRAPPER_SRC) $(GST_REGISTRY_WRAPPER_SRC_V)
+
+libexec_PROGRAMS = \
+	$(GST_REGISTRY_SRC) $(GST_REGISTRY_SRC_V)
 
 # make sure each versioned tool has the right source file and flags
 if !GST_DISABLE_REGISTRY
-gst_register_@GST_MAJORMINOR@_SOURCES = gst-register.c
-gst_register_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_register_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+edit = sed -e 's,@libexecdir\@,$(libexecdir),g' -e 's,@GST_MAJORMINOR\@,@GST_MAJORMINOR@,g'
+
+gst-register-@GST_MAJORMINOR@: Makefile $(srcdir)/gst-register.in
+	rm -f gst-register-@GST_MAJORMINOR@ gst-register-@GST_MAJORMINOR@.tmp
+	$(edit) $(srcdir)/gst-register.in >gst-register-@GST_MAJORMINOR@.tmp
+	mv gst-register-@GST_MAJORMINOR@.tmp gst-register-@GST_MAJORMINOR@
+gst-register: Makefile $(srcdir)/gst-register.in
+	rm -f gst-register gst-register.tmp
+	$(edit) $(srcdir)/gst-register.in >gst-register.tmp
+	mv gst-register.tmp gst-register
+gst_register_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-register.c
+gst_register_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_register_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
 endif
 if !GST_DISABLE_LOADSAVE
-gst_complete_@GST_MAJORMINOR@_SOURCES = gst-complete.c
-gst_complete_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_complete_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-gst_compprep_@GST_MAJORMINOR@_SOURCES = gst-compprep.c
-gst_compprep_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_compprep_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-gst_xmllaunch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
-gst_xmllaunch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_xmllaunch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-endif
-gst_inspect_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
-gst_inspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_inspect_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-gst_launch_@GST_MAJORMINOR@_SOURCES = gst-launch.c
-gst_launch_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_launch_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-gst_md5sum_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
-gst_md5sum_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_md5sum_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-gst_typefind_@GST_MAJORMINOR@_SOURCES = gst-typefind.c
-gst_typefind_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_typefind_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
-gst_xmlinspect_@GST_MAJORMINOR@_SOURCES = gst-xmlinspect.c
-gst_xmlinspect_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
-gst_xmlinspect_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_complete_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-complete.c
+gst_complete_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_complete_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_compprep_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-compprep.c
+gst_compprep_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_compprep_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_xmllaunch_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-launch.c
+gst_xmllaunch_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_xmllaunch_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+endif
+gst_inspect_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-inspect.c
+gst_inspect_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_inspect_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_launch_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-launch.c
+gst_launch_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_launch_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_md5sum_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-md5sum.c
+gst_md5sum_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_md5sum_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_typefind_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-typefind.c
+gst_typefind_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_typefind_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
+gst_xmlinspect_@host_cpu@_@GST_MAJORMINOR@_SOURCES = gst-xmlinspect.c
+gst_xmlinspect_@host_cpu@_@GST_MAJORMINOR@_CFLAGS = $(GST_OBJ_CFLAGS)
+gst_xmlinspect_@host_cpu@_@GST_MAJORMINOR@_LDFLAGS = $(GST_OBJ_LIBS)
 
-gst-feedback-@GST_MAJORMINOR@: gst-feedback-m.m
+gst-feedback-@host_cpu@-@GST_MAJORMINOR@: gst-feedback-m.m
 	cp $(srcdir)/gst-feedback-m.m $@
 	chmod +x $@
 
 # make sure each unversioned tool comes from gst-run.c
 if !GST_DISABLE_REGISTRY
-gst_register_SOURCES = gst-run.c
+gst_register_@host_cpu@_SOURCES = gst-run.c
 endif
 if !GST_DISABLE_LOADSAVE
-gst_complete_SOURCES = gst-run.c
-gst_compprep_SOURCES = gst-run.c
-gst_xmllaunch_SOURCES = gst-run.c
-endif
-gst_feedback_SOURCES = gst-run.c
-gst_inspect_SOURCES = gst-run.c
-gst_launch_SOURCES = gst-run.c
-gst_md5sum_SOURCES = gst-run.c
-gst_typefind_SOURCES = gst-run.c
-gst_xmlinspect_SOURCES = gst-run.c
+gst_complete_@host_cpu@_SOURCES = gst-run.c
+gst_compprep_@host_cpu@_SOURCES = gst-run.c
+gst_xmllaunch_@host_cpu@_SOURCES = gst-run.c
+endif
+gst_feedback_@host_cpu@_SOURCES = gst-run.c
+gst_inspect_@host_cpu@_SOURCES = gst-run.c
+gst_launch_@host_cpu@_SOURCES = gst-run.c
+gst_md5sum_@host_cpu@_SOURCES = gst-run.c
+gst_typefind_@host_cpu@_SOURCES = gst-run.c
+gst_xmlinspect_@host_cpu@_SOURCES = gst-run.c
 
-gst_inspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
+gst_inspect_@host_cpu@_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
 
-gst_xmlinspect_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
+gst_xmlinspect_@host_cpu@_@GST_MAJORMINOR@_LDADD = ../libs/gst/control/libgstcontrol-@GST_MAJORMINOR@.la
 
 # CFLAGS and libs for nonversioned frontend binaries
 AM_CFLAGS = $(GLIB_ONLY_CFLAGS) $(POPT_CFLAGS)
--- /dev/null	2004-11-09 06:34:11.685116568 -0500
+++ gstreamer-0.8.7/tools/gst-register.in	2004-11-09 13:41:42.387078866 -0500
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+for x in @libexecdir@/gst-register*@GST_MAJORMINOR@; do
+  $x
+done
--- gstreamer-0.8.7/docs/gst/gstreamer-sections.txt.lib64	2004-09-26 12:40:01.000000000 -0400
+++ gstreamer-0.8.7/docs/gst/gstreamer-sections.txt	2004-11-09 13:41:42.395077531 -0500
@@ -1326,10 +1326,14 @@
 GstRegistry
 GLOBAL_REGISTRY_DIR
 GLOBAL_REGISTRY_FILE
+GLOBAL_ARCH_REGISTRY_FILE
 GLOBAL_REGISTRY_FILE_TMP
+GLOBAL_ARCH_REGISTRY_FILE_TMP
 LOCAL_REGISTRY_DIR
 LOCAL_REGISTRY_FILE
+LOCAL_ARCH_REGISTRY_FILE
 LOCAL_REGISTRY_FILE_TMP
+LOCAL_ARCH_REGISTRY_FILE_TMP
 REGISTRY_DIR_PERMS
 REGISTRY_TMPFILE_PERMS
 REGISTRY_FILE_PERMS
--- gstreamer-0.8.7/gst/Makefile.am.lib64	2004-05-09 10:59:59.000000000 -0400
+++ gstreamer-0.8.7/gst/Makefile.am	2004-11-09 13:41:42.388078699 -0500
@@ -140,6 +140,7 @@
                                                                                 
 libgstreamer_@GST_MAJORMINOR@_la_CFLAGS =	\
 	-D_GNU_SOURCE				\
+	-DHOSTCPU=\"$(host_cpu)\"		\
 	$(GST_LIB_CFLAGS) 			\
 	-DG_LOG_DOMAIN=g_log_domain_gstreamer 	\
 	-DGST_MAJORMINOR=\""$(GST_MAJORMINOR)"\" 
--- gstreamer-0.8.7/gst/gstregistry.h.lib64	2004-04-29 06:02:15.000000000 -0400
+++ gstreamer-0.8.7/gst/gstregistry.h	2004-11-09 13:41:42.390078366 -0500
@@ -29,10 +29,14 @@
 #define GLOBAL_REGISTRY_DIR      GST_CACHE_DIR
 #define GLOBAL_REGISTRY_FILE     GLOBAL_REGISTRY_DIR"/registry.xml"
 #define GLOBAL_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.registry.xml.tmp"
+#define GLOBAL_ARCH_REGISTRY_FILE     GLOBAL_REGISTRY_DIR"/registry-" HOSTCPU ".xml"
+#define GLOBAL_ARCH_REGISTRY_FILE_TMP GLOBAL_REGISTRY_DIR"/.registry-" HOSTCPU ".xml.tmp"
 
 #define LOCAL_REGISTRY_DIR       ".gstreamer-"GST_MAJORMINOR
 #define LOCAL_REGISTRY_FILE      LOCAL_REGISTRY_DIR"/registry.xml"
 #define LOCAL_REGISTRY_FILE_TMP  LOCAL_REGISTRY_DIR"/.registry.xml.tmp"
+#define LOCAL_ARCH_REGISTRY_FILE      LOCAL_REGISTRY_DIR"/registry-" HOSTCPU ".xml"
+#define LOCAL_ARCH_REGISTRY_FILE_TMP  LOCAL_REGISTRY_DIR"/.registry-" HOSTCPU ".xml.tmp"
 
 /* compatibility for pre-POSIX defines */
 #ifdef S_IRUSR
--- gstreamer-0.8.7/gst/gst.c.lib64	2004-09-09 06:46:53.000000000 -0400
+++ gstreamer-0.8.7/gst/gst.c	2004-11-09 14:47:38.560569667 -0500
@@ -492,7 +492,7 @@
     const gchar *homedir;
 
     _global_registry =
-        gst_xml_registry_new ("global_registry", GLOBAL_REGISTRY_FILE);
+      gst_xml_registry_new ("global_registry", GLOBAL_ARCH_REGISTRY_FILE);
 
 #ifdef PLUGINS_USE_BUILDDIR
     /* location libgstelements.so */
@@ -512,7 +512,7 @@
       user_reg = g_strdup (g_getenv ("GST_REGISTRY"));
     } else {
       homedir = g_get_home_dir ();
-      user_reg = g_strjoin ("/", homedir, LOCAL_REGISTRY_FILE, NULL);
+      user_reg = g_build_filename (homedir, LOCAL_ARCH_REGISTRY_FILE, NULL);
     }
     _user_registry = gst_xml_registry_new ("user_registry", user_reg);
 
