Compiling scrotwm 0.9.5 on Gentoo Linux


NOTES:


> wget http://sgenomics.org/~jtang/t/scrotwm-srpm-package.tar.gz
--2009-06-23 06:05:28--  http://sgenomics.org/~jtang/t/scrotwm-srpm-package.tar.gz
Resolving sgenomics.org... 85.17.19.1
Connecting to sgenomics.org|85.17.19.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 237418 (232K) [application/x-gzip]
Saving to: `scrotwm-srpm-package.tar.gz'

     0K .......... .......... .......... .......... .......... 21%  126K 1s
    50K .......... .......... .......... .......... .......... 43%  478K 1s
   100K .......... .......... .......... .......... .......... 64%  533K 0s
   150K .......... .......... .......... .......... .......... 86% 1.13M 0s
   200K .......... .......... .......... .                    100%  514K=0.7s

2009-06-23 06:05:29 (331 KB/s) - `scrotwm-srpm-package.tar.gz' saved [237418/237418]

> tar -xzvf scrotwm-srpm-package.tar.gz
scrotwm/
scrotwm/lorder.sh
scrotwm/scrotwm.spec
scrotwm/terminus-font-4.20-5.el5.src.rpm
scrotwm/scrotwm-0.9-2.el5.src.rpm

> echo $PATH
/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin

> sudo cp scrotwm/lorder.sh /usr/local/bin/lorder

> wget http://www.peereboom.us/scrotwm/snapshot/scrotwm-0.9.5.tgz
--2009-06-23 06:04:23--  http://www.peereboom.us/scrotwm/snapshot/scrotwm-0.9.5.tgz
Resolving www.peereboom.us... 67.78.34.36
Connecting to www.peereboom.us|67.78.34.36|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 36134 (35K) [application/x-tar]
Saving to: `scrotwm-0.9.5.tgz'

     0K .......... .......... .......... .....                100%  114K=0.3s

2009-06-23 06:04:25 (114 KB/s) - `scrotwm-0.9.5.tgz' saved [36134/36134]

> tar -xzvf scrotwm-0.9.5.tgz
scrotwm-0.9.5
scrotwm-0.9.5/linux
scrotwm-0.9.5/linux/linux.c
scrotwm-0.9.5/linux/util.h
scrotwm-0.9.5/linux/Makefile
scrotwm-0.9.5/linux/swm-linux.diff
scrotwm-0.9.5/lib
scrotwm-0.9.5/lib/Makefile
scrotwm-0.9.5/lib/shlib_version
scrotwm-0.9.5/lib/swm_hack.c
scrotwm-0.9.5/baraction.sh
scrotwm-0.9.5/Makefile
scrotwm-0.9.5/scrotwm.conf
scrotwm-0.9.5/scrotwm.c
scrotwm-0.9.5/scrotwm.1
scrotwm-0.9.5/screenshot.sh
scrotwm-0.9.5/initscreen.sh

> cd scrotwm-0.9.5

> ls
baraction.sh*  initscreen.sh*  lib/  linux/  Makefile  screenshot.sh*  scrotwm.1  scrotwm.c  scrotwm.conf

> cd linux

> make --version
GNU Make 3.81

> gcc --version
gcc (Gentoo 4.3.2-r3 p1.6, pie-10.1.5) 4.3.2

> ln --version
ln (GNU coreutils) 7.2

> make
ln -sf ../scrotwm.c ../lib/swm_hack.c .
make: *** No rule to make target `scrotwm.o', needed by `scrotwm'.  Stop.

> make
ln -sf ../scrotwm.c ../lib/swm_hack.c .
gcc -Wall -ggdb -D_GNU_SOURCE -I.   -c -o scrotwm.o scrotwm.c
scrotwm.c: In function ‘send_to_ws’:
scrotwm.c:1903: warning: pointer targets in passing argument 1 of ‘snprintf’ differ in signedness
scrotwm.c: In function ‘manage_window’:
scrotwm.c:2776: warning: pointer targets in passing argument 1 of ‘strtonum’ differ in signedness
scrotwm.c:2798: warning: pointer targets in passing argument 1 of ‘snprintf’ differ in signedness
scrotwm.c: In function ‘workaround’:
scrotwm.c:3456: warning: pointer targets in passing argument 7 of ‘XChangeProperty’ differ in signedness
gcc -Wall -ggdb -D_GNU_SOURCE -I.   -c -o linux.o linux.c
gcc  -o scrotwm scrotwm.o linux.o -lX11 -lXrandr
gcc -Wall -ggdb -D_GNU_SOURCE -I. -c -fpic -DPIC swm_hack.c -o swm_hack.so
swm_hack.c: In function ‘set_property’:
swm_hack.c:92: warning: pointer targets in passing argument 7 of ‘XChangeProperty’ differ in signedness
gcc -shared -fpic -o libswmhack.so.0.0 `lorder swm_hack.so|tsort`

> ls
libswmhack.so.0.0*  linux.c  linux.o  Makefile scrotwm*  scrotwm.c@  scrotwm.o  swm_hack.c@  swm_hack.so  swm-linux.diff  util.h

> echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/X11R6/lib:/usr/lib:/lib

> sudo cp libswmhack.so.0.0 /usr/local/lib

> sudo ln -s /usr/local/lib/libswmhack.so.0.0 /usr/X11R6/lib/swmhack.so

> cp scrotwm.conf /home/foo/.scrotwm.conf

> echo $MANPATH
/usr/local/man:/usr/share/man

> sudo cp scrotwm.1 /usr/local/man/man1

> sudo cp scrotwm /usr/local/bin