[comp.sources.x] v02i015: HP Widget Set, Patch1

mikew@wyse.wyse.com (Mike Wexler) (11/18/88)

Submitted-by: Mark Moraes <moraes%csri.toronto.edu@RELAY.CS.NET>
Posting-number: Volume 2, Issue 15
Archive-name: xhp/patch1

[This is an unofficial patch.  Also if you don't keep your X includes
in /usr/include/X11, you will need to make some additional changes to
the makefiles.]

These are a few small changes to the Makefiles/Imakefile for the R2
Xt Intrinsics and Xw (HP widgets) distributed on the R3 contrib tape.
With these, the two libraries compile and can be used by applications
that are careful about including these includes before the standard R3
includes.

The real fix is to port the HP widgets to R3 - I'm sure HP is doing that.
(and after porting two widgets to R3, I'm fairly sure it'll take them a 
while to get an R3 set out). Till that happens, hopefull these will
suffice.

Please post them - the patches to xpic for R3 (which I'll be sending
you later tonight, hopefully) will require these fixes.

Thanks,
	Mark.

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# If this archive is complete, you will see the following message at the end:
#		"End of shell archive."
#
# Contents:
#   CHANGES update.sh
#
# Wrapped by moraes@csri.toronto.edu on Thu Nov 17 02:47:31 1988
#
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f CHANGES -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"CHANGES\"
else
echo shar: Extracting \"CHANGES\" \(1052 characters\)
sed "s/^X//" >CHANGES <<'END_OF_CHANGES'
XThis patch makes the few changes needed to get the HP widgets compiled
Xon a Sun. (There's nothing Sun specific in them - just that I've only
Xtested them on a Sun.) Note that the Makefile diffs take out the HP
Xdependent CFLAGS/LDFLAGS, so if you're on an HP workstation, you
Xprobably don't want those specific changes.
X
XFix the script to set TOPDIR to wherever the top directory of the core
XX11R3 distribution is.
X
XWhat it does:  
X	moves the file Imakefile.or from Xt tto Imakefile in
X	the same directory - for some reason, HP doesn't seem to use
X	Imakefiles. (I wish they would use them - makes life easier when
X	installing)
X
XThe changes are:
X	minor changes to the makefiles
X
X	a fix to the -I options in the Imakefile for Xt and the Makefile
X	for Xw to get them to use the Xhp/Xt includes in preference to the
X	ones that you have presumably installed in /usr/include.
X
XWhen the patch is done,	it makes the Makefile and does a make depend in Xt.
X
XYou can then make it, which creates libXt.a and libXw.a in the lib
Xsubdirectory, and makes all the tests.
END_OF_CHANGES
if test 1052 -ne `wc -c <CHANGES`; then
    echo shar: \"CHANGES\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f update.sh -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"update.sh\"
else
echo shar: Extracting \"update.sh\" \(4506 characters\)
sed "s/^X//" >update.sh <<'END_OF_update.sh'
X#! /bin/sh -x
X# Edit this to change this to the top directory where your X11R3 source is
X# something like /usr/src/local/X.V11R3
XTOPDIR=please/change/this/to/the/real/X/top/level/directory
Xif test ! \( -d $TOPDIR -a -d $TOPDIR/util -a -d $TOPDIR/util/scripts \) ; then
X	echo 'Please fix TOPDIR and run this script again'
X	exit 1
Xelif test ! -x $TOPDIR/util/scripts/ximake.sh ; then
X	echo Something wrong - $TOPDIR/util/scripts/ximake.sh isn\'t executable
X	exit 1
Xfi
Xif test ! \( -d Xw -a -d Xt -a -d MButton \) ; then
X	echo 'Please run this script in the Xhp directory'
X	exit 1
Xfi
X# This is needed to provide the R2 Xt and Xw, and any
X# applications using these, with the correct R2 Intrinsics include files
Xln -s Xt X11
X# I really wish HP would follow the Imakefile convention - it
X# simplifies life a lot for anyone installing this stuff)
X(cd Xt; mv Makefile Makefile.hp; mv Imakefile.or Imakefile)
Xpatch -p1 << \WhAt_A_mArOoN
XOnly in Xhp: X11
Xdiff -c -r /h/xwindows/moraes/contrib/widgets/Xhp/Makefile Xhp/Makefile
X*** /h/xwindows/moraes/contrib/widgets/Xhp/Makefile	Fri Sep 16 12:56:46 1988
X--- Xhp/Makefile	Mon Nov 14 21:38:35 1988
X***************
X*** 5,10 ****
X--- 5,11 ----
X  
X  Xtlib:
X  	cd Xt; make
X+ 	mv Xt/libXt.a lib
X  
X  Xwlib:
X  	cd Xw; make
X***************
X*** 14,16 ****
X--- 15,24 ----
X  
X  MButtonMake:
X  	cd MButton; make
X+ 
X+ clean:
X+ 	cd Xt; make clean
X+ 	cd Xw; make clobber
X+ 	cd test; make clean
X+ 	cd MButton;rm -f *.o multiTest
X+ 
Xdiff -c -r /h/xwindows/moraes/contrib/widgets/Xhp/MButton/Makefile Xhp/MButton/Makefile
X*** /h/xwindows/moraes/contrib/widgets/Xhp/MButton/Makefile	Fri Sep 16 13:07:01 1988
X--- Xhp/MButton/Makefile	Sat Nov 12 06:06:32 1988
X***************
X*** 2,9 ****
X  OBJECTS = multiTest.o MButton.o
X  LIBS =  ../lib/libXw.a ../lib/libXt.a -lX11
X  # DEC and Sun
X! #CFLAGS = -I../ -I./
X! CFLAGS = -I../ -I./ -Wc,-Nd2000 -Wc,-Ns2000
X  
X  Test: $(OBJECTS)
X  	cc $(CFLAGS) -o multiTest $(OBJECTS) $(LIBS)
X--- 2,9 ----
X  OBJECTS = multiTest.o MButton.o
X  LIBS =  ../lib/libXw.a ../lib/libXt.a -lX11
X  # DEC and Sun
X! CFLAGS = -I../ -I./
X! #CFLAGS = -I../ -I./ -Wc,-Nd2000 -Wc,-Ns2000
X  
X  Test: $(OBJECTS)
X  	cc $(CFLAGS) -o multiTest $(OBJECTS) $(LIBS)
Xdiff -c -r /h/xwindows/moraes/contrib/widgets/Xhp/Xw/Makefile Xhp/Xw/Makefile
X*** /h/xwindows/moraes/contrib/widgets/Xhp/Xw/Makefile	Fri Sep 16 12:59:21 1988
X--- Xhp/Xw/Makefile	Mon Nov 14 22:21:48 1988
X***************
X*** 17,25 ****
X  
X  INCRT = ../
X  LIBNAME = ../lib/libXw.a
X! CFLAGS = -O -DSYSV -Wc,-Nd4000 -Wc,-Ns4000 -I../
X  # DEC and Sun
X! #CFLAGS = -O -I../
X  
X  FILES =\
X  	Arrow.o\
X--- 17,25 ----
X  
X  INCRT = ../
X  LIBNAME = ../lib/libXw.a
X! #CFLAGS = -O -DSYSV -Wc,-Nd4000 -Wc,-Ns4000 -I../
X  # DEC and Sun
X! CFLAGS = -O -I$(INCRT)
X  
X  FILES =\
X  	Arrow.o\
X***************
X*** 74,80 ****
X  	$(AS) -o $*.o $<
X  
X  .c.o:
X! 	$(CC) $(INCRT) -c $(CFLAGS) $<
X  
X  clean:
X  	-rm -f *.o
X--- 74,80 ----
X  	$(AS) -o $*.o $<
X  
X  .c.o:
X! 	$(CC) -c $(CFLAGS) $<
X  
X  clean:
X  	-rm -f *.o
Xdiff -c -r /h/xwindows/moraes/contrib/widgets/Xhp/test/Makefile Xhp/test/Makefile
X*** /h/xwindows/moraes/contrib/widgets/Xhp/test/Makefile	Fri Sep 16 13:06:43 1988
X--- Xhp/test/Makefile	Sat Nov 12 06:05:51 1988
X***************
X*** 2,10 ****
X  
X  OBJECTS = 
X  LIBS =  ../lib/libXw.a ../lib/libXt.a -lX11
X! CFLAGS = -O -I./ -I../ -Wc,-Nd4000 -Wc,-Ns4000 +Nt100000
X  # DEC and Sun
X! #CFLAGS = -O -I./ -I../
X  
X  .c:
X  	$(CC) $(CFLAGS) -o $@ $< $(LIBS)
X--- 2,10 ----
X  
X  OBJECTS = 
X  LIBS =  ../lib/libXw.a ../lib/libXt.a -lX11
X! #CFLAGS = -O -I./ -I../ -Wc,-Nd4000 -Wc,-Ns4000 +Nt100000
X  # DEC and Sun
X! CFLAGS = -O -I./ -I../
X  
X  .c:
X  	$(CC) $(CFLAGS) -o $@ $< $(LIBS)
X*** /h/xwindows/moraes/contrib/widgets/Xhp/Xt/Imakefile.or	Fri Sep 16 13:06:20 1988
X--- Xhp/Xt/Imakefile	Mon Nov 14 21:40:18 1988
X***************
X*** 1,7 ****
X      STD_DEFINES = LibraryDefines
X      APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
X      CDEBUGFLAGS = LibraryCDebugFlags
X!        INCLUDES = -I. -I$(XLIBSRC) -I$(TOP) -I$(TOP)/X11
X     INSTALLFLAGS = $(INSTINCFLAGS)
X         LINTLIBS = $(LINTXLIB)
X  
X--- 1,7 ----
X      STD_DEFINES = LibraryDefines
X      APP_DEFINES = -DXAPPLOADDIR=\"$(XAPPLOADDIR)$(PATHSEP)\"
X      CDEBUGFLAGS = LibraryCDebugFlags
X!        INCLUDES = -I.. -I. -I$(XLIBSRC)
X     INSTALLFLAGS = $(INSTINCFLAGS)
X         LINTLIBS = $(LINTXLIB)
XWhAt_A_mArOoN
X(cd Xt; 	
X	case $TOPDIR in
X		/*);;
X		*)TOPDIR=../$TOPDIR;;
X	esac
X	$TOPDIR/util/scripts/ximake.sh $TOPDIR; make depend)
Xecho 'Go ahead and make the stuff'
X
END_OF_update.sh
if test 4506 -ne `wc -c <update.sh`; then
    echo shar: \"update.sh\" unpacked with wrong size!
fi
chmod +x update.sh
# end of overwriting check
fi
echo shar: End of shell archive.
exit 0
-- 
Mike Wexler(wyse!mikew)    Phone: (408)433-1000 x1330
Moderator of comp.sources.x