pkgsrc/x11/xview-config/patches/patch-ad
dmcmahill 51b94997c0 Fix on powerpc. Patches provided by Andrew Cagney <cagney@tpgi.com.au>
in PR pkg/12803 and integrated by me.  It also now compiles on alpha but
segfaults there so change the broken message accordingly.
2001-05-02 21:46:07 +00:00

84 lines
3.4 KiB
Text

$NetBSD: patch-ad,v 1.6 2001/05/02 21:46:08 dmcmahill Exp $
--- ./XView.rules.orig Tue Jun 29 01:13:20 1993
+++ ./XView.rules Tue May 1 22:40:32 2001
@@ -142,4 +142,21 @@
*/
#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) @@\
@@ -157,4 +174,5 @@
$(RM) lib/**/libname.so.rev sodir/?*.o strings*
+#endif
#endif /* SubdirBuildNormalSharedLibraryTarget */
@@ -246,6 +264,7 @@
.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:: @@\
@@ -257,22 +276,24 @@
/*
- * 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:: @@\
@@ -367,7 +388,7 @@
#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 */