[wmii] wmii-2.5 patches for Solaris 9

From: Stefan Tibus <sjti_AT_gmx.net>
Date: Mon, 2 Jan 2006 11:08:37 +0100

Hello all,

here are the patches to compile wmii-2.5 on Solaris 9 with
the Sun Studio 10 compiler suite. Note that I'm not an
experienced user of that compiler, so the options are probably
not optimal. Some notes:

"-xtarget=ultra" is an architecture specific optimization option
and does not apply in general. Together with "-fast" the resulting
binary is faster than using gcc.

Static linkage is achieved using "-dn", dynamic linkage with "-dy"
which is the default. Some libraries are available as dynamic
libraries only, so some tools cannot be linked statically.

9base required linkage against "libxnet" and wmii "libsocket" often.

9base makefiles worked with gnu make only, wmii is fine with Sun's
make.

"#include <X11/Xlib.h>" is required before "#include <X11/Xutil.h>"

I hope some of these may be incorporated in future versions.

Regards,
Stefan

P.S. Happy new year to everybody!

===== 9base-1.patch =====
--- 9base-1/config.mk Tue Dec 27 16:43:18 2005
+++ 9base-1.my/config.mk Mon Jan 2 09:45:20 2006
@@ -6,8 +6,10 @@
 
 # flags
 VERSION = 1
-CFLAGS = -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -Os -c -I. -DPREFIX="\"${PREFIX}\""
-LDFLAGS = -static
+#CFLAGS = -Wall -Wno-missing-braces -Wno-parentheses -Wno-switch -Os -c -I. -DPREFIX="\"${PREFIX}\""
+CFLAGS = -fast -xtarget=ultra -D__sun__ -c -I. -DPREFIX="\"${PREFIX}\""
+#LDFLAGS = -static
+LDFLAGS = -dn
 
 # compiler
 AR = ar rc
--- 9base-1/Makefile Tue Dec 27 16:43:18 2005
+++ 9base-1.my/Makefile Mon Jan 2 09:50:05 2006
@@ -12,18 +12,18 @@
        @echo "LDFLAGS = ${LDFLAGS}"
        @echo "CC = ${CC}"
        @chmod 755 yacc/9yacc
- @for i in ${SUBDIRS}; do cd $$i; make || exit; cd ..; done;
+ @for i in ${SUBDIRS}; do cd $$i; ${MAKE} || exit; cd ..; done;
 
 clean:
- @for i in ${SUBDIRS}; do cd $$i; make clean || exit; cd ..; done
+ @for i in ${SUBDIRS}; do cd $$i; ${MAKE} clean || exit; cd ..; done
        @echo cleaned 9base
 
 install: all
- @for i in ${SUBDIRS}; do cd $$i; make install || exit; cd ..; done
+ @for i in ${SUBDIRS}; do cd $$i; ${MAKE} install || exit; cd ..; done
        @echo installed 9base to ${DESTDIR}${PREFIX}
 
 uninstall:
- @for i in ${SUBDIRS}; do cd $$i; make uninstall || exit; cd ..; done
+ @for i in ${SUBDIRS}; do cd $$i; ${MAKE} uninstall || exit; cd ..; done
        @echo uninstalled 9base
 
 dist: clean
--- 9base-1/bc/Makefile Tue Dec 27 16:43:18 2005
+++ 9base-1.my/bc/Makefile Mon Jan 2 09:56:15 2006
@@ -7,3 +7,5 @@
 MANFILES = bc.1
 
 include ../yacc.mk
+
+LDFLAGS += -dy -lxnet
--- 9base-1/rc/Makefile Tue Dec 27 16:43:18 2005
+++ 9base-1.my/rc/Makefile Mon Jan 2 10:00:21 2006
@@ -10,6 +10,8 @@
 
 include ../config.mk
 
+LDFLAGS += -dy -lxnet
+
 all:
        @if [ ! -f y.tab.c ]; then \
        make -f Makefile depend;\
--- 9base-1/rc/exec.c Tue Dec 27 16:43:18 2005
+++ 9base-1.my/rc/exec.c Mon Jan 2 09:58:37 2006
@@ -3,6 +3,9 @@
 #if defined(PLAN9PORT) && defined(__sun__)
 # define BSD_COMP /* sigh. for TIOCNOTTY */
 #endif
+#ifdef __sun__
+#include <sys/termios.h>
+#endif
 #include <sys/ioctl.h>
 #include "rc.h"
 #include "getflags.h"
--- 9base-1/sleep/Makefile Tue Dec 27 16:43:18 2005
+++ 9base-1.my/sleep/Makefile Mon Jan 2 10:01:12 2006
@@ -4,3 +4,5 @@
 TARG = sleep
 
 include ../std.mk
+
+LDFLAGS += -dy -lrt
--- 9base-1/test/Makefile Tue Dec 27 16:43:18 2005
+++ 9base-1.my/test/Makefile Mon Jan 2 10:02:08 2006
@@ -4,3 +4,5 @@
 TARG = test
 
 include ../std.mk
+
+LDFLAGS += -dy
==========
===== wmii-2.5.patch =====
--- wmii-2.5/config.mk Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/config.mk Mon Jan 2 10:10:58 2006
@@ -17,7 +17,8 @@
 VERSION = 2.5
 
 # flags
-CFLAGS = -g -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
+#CFLAGS = -g -Wall ${INCLUDES} -DVERSION=\"${VERSION}\"
+CFLAGS = -fast -xtarget=ultra ${INCLUDES} -DVERSION=\"${VERSION}\"
 LDFLAGS = ${LIBS}
 
 # compiler
--- wmii-2.5/cmd/Makefile Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/Makefile Mon Jan 2 10:18:14 2006
@@ -37,24 +37,24 @@
 
 wmiibar: ${OBJ_bar}
        @echo LD $@
- @${CC} -o $@ ${OBJ_bar} ${LDFLAGS}
+ @${CC} -o $@ ${OBJ_bar} ${LDFLAGS} -lsocket
 
 wmiimenu: ${OBJ_menu}
        @echo LD $@
- @${CC} -o $@ ${OBJ_menu} ${LDFLAGS}
+ @${CC} -o $@ ${OBJ_menu} ${LDFLAGS} -lsocket
 
 wmiir: ${OBJ_r}
        @echo LD $@
- @${CC} -o $@ ${OBJ_r} -g -static -L${PREFIX}/lib -L/usr/lib -lc \
- -L../libixp -lixp -L../libcext -lcext
+ @${CC} -o $@ ${OBJ_r} -L${PREFIX}/lib -L/usr/lib -lc \
+ -L../libixp -lixp -L../libcext -lcext -lsocket
 
 wmiifs: ${OBJ_fs}
        @echo LD $@
- @${CC} -o $@ ${OBJ_fs} ${LDFLAGS}
+ @${CC} -o $@ ${OBJ_fs} ${LDFLAGS} -lsocket
 
 wmiikeys: ${OBJ_keys}
        @echo LD $@
- @${CC} -o $@ ${OBJ_keys} ${LDFLAGS}
+ @${CC} -o $@ ${OBJ_keys} ${LDFLAGS} -lsocket
 
 wmiiplumb: ${OBJ_plumb}
        @echo LD $@
--- wmii-2.5/cmd/wmiibar.c Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/wmiibar.c Mon Jan 2 10:13:16 2006
@@ -9,6 +9,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <X11/cursorfont.h>
 #include <X11/Xproto.h>
--- wmii-2.5/cmd/wmiimenu.c Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/wmiimenu.c Mon Jan 2 10:14:44 2006
@@ -10,6 +10,7 @@
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <time.h>
+#include <X11/Xlib.h>
 #include <X11/Xatom.h>
 #include <X11/cursorfont.h>
 #include <X11/Xproto.h>
--- wmii-2.5/cmd/wmiikeys.c Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/wmiikeys.c Mon Jan 2 10:17:43 2006
@@ -8,6 +8,7 @@
 #include <string.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
+#include <X11/Xlib.h>
 #include <X11/keysym.h>
 #include <X11/Xatom.h>
 #include <X11/cursorfont.h>
--- wmii-2.5/cmd/wmiiwarp.c Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/wmiiwarp.c Mon Jan 2 10:18:39 2006
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <string.h>
 
+#include <X11/Xlib.h>
 #include <X11/Xutil.h>
 #include <X11/Xatom.h>
 
--- wmii-2.5/cmd/wm/wmiiwm.h Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/wm/wmiiwm.h Mon Jan 2 10:19:28 2006
@@ -4,6 +4,7 @@
  */
 
 #include <stdio.h>
+#include <X11/Xlib.h>
 #include <X11/Xutil.h>
 
 #include "cext.h"
--- wmii-2.5/cmd/wm/Makefile.wm Wed Dec 28 13:35:20 2005
+++ wmii-2.5.my/cmd/wm/Makefile.wm Mon Jan 2 10:21:55 2006
@@ -6,7 +6,7 @@
 CFLAGS += -I../../liblitz -I../../libixp -I../../libwmii \
             -I../../libcext
 LDFLAGS += -L../../liblitz -llitz -L../../libixp -lixp \
- -L../../libwmii -lwmii -L../../libcext -lcext
+ -L../../libwmii -lwmii -L../../libcext -lcext -lsocket
 
 SRC = client.c core.c event.c mouse.c frame.c page.c layout.c\
            wmiiwm.c
==========
Received on Mon Jan 02 2006 - 11:09:14 UTC

This archive was generated by hypermail 2.2.0 : Sun Jul 13 2008 - 15:59:41 UTC