IGNOREPATH=/var:/etc:/home:/dev:/boot:/root:/tmp:/usr/local:/bin:/sbin:/mnt:/usr/src STRIPLIB=y STRIPBIN=y VERSION=4.3.0 PROGNAME="XFree86 $VERSION" DESC="\ xfree86 (XFree86 base package) \n\ \n\ This is the base package for XFree86, and provides the required \n\ binaries, shared libraries, and support files (except fonts) to run \n\ X11R6 on Linux." BUILD=1 MAINTAINER="Mark Post " SOURCE=http://www.xfree86.org PKGNAME=xfree86-$VERSION-s390-$BUILD TAG=OPT compile() { GLIDE=YES tar -yxvf $CWD/X430src-1.tar.bz2 tar -yxvf $CWD/X430src-2.tar.bz2 tar -yxvf $CWD/X430src-3.tar.bz2 tar -yxvf $CWD/X430src-4.tar.bz2 tar -yxvf $CWD/X430src-5.tar.bz2 tar -yxvf $CWD/X430src-6.tar.bz2 tar -yxvf $CWD/X430src-7.tar.bz2 cd xc/ chown -R root.root . zcat $CWD/xf86site.def.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E zcat $CWD/site.def.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E zcat $CWD/Xlib.h.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E zcat $CWD/xclock.glibc.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E zcat $CWD/linux.cf.zlib.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E # Video hang bug: zcat $CWD/libXi.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E # Font server overflows. zcat $CWD/fs.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E zcat $CWD/../../../patches/source/xfree86/fontfile.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E # Savage driver update: ( cd $TMP/xc/programs/Xserver/hw/xfree86/drivers rm -rf savage unzip $CWD/savage/savage-1.1.27t.zip ) # Related savage patches: # This one is needed to fix the Imakefile as XFree86 4.3.0 moved the vbe # source directory zcat $CWD/savage/XFree86-4.2.99.902-savage-Imakefile-vbe-fixup.patch.gz | patch -p1 --verbose # These 2 (282,283) are ports of XFree86 differences between 1.1.26t and 1.1.26 # in XFree86 4.3.0 forward ported to 1.1.27t which we're using zcat $CWD/savage/XFree86-4.2.99.902-savage-1.1.26cvs-1.1.27t-fixups.patch.gz | patch -p1 --verbose zcat $CWD/savage/XFree86-4.2.99.902-savage-1.1.26cvs-1.1.27t-accel-fixup.patch.gz | patch -p1 --verbose # This one backs out a change which XFree86 CVS broke the driver with on # Dec 16, 2002. This change has been reverted in stock 4.3.0 sources already. zcat $CWD/savage/XFree86-4.2.99.902-savage-revert-vbe-change-from-X-cvs.patch.gz | patch -p1 --verbose # Set various compile defaults in host.def: cat << EOF > config/cf/host.def #define FSUseSyslog YES #define HasPam NO #define UseUtempter YES #define HasTk YES #define TkLibDir /usr/lib #define TkIncDir /usr/include #define TkLibName tk8.4 #define XF86SetupUsesStaticTk NO #define HasTcl YES #define TclLibDir /usr/lib #define TclIncDir /usr/include #define TclLibName tcl8.4 #define XF86SetupUsesStaticTcl NO #define HasZlib YES #define SharedLibGlu YES /* It's best to build freetype2 ourselves first... */ /* We use the XFree86 provided version though, which is closely matched to */ /* their other sources. Trust me on that. */ #define HasFreetype2 YES /* We also use our own expat (mostly because the XFree86 uses the wrong version number) */ #define HasExpat YES /* We will allow XFree86 to "take over" fontconfig and Xft2, since those are */ /* official XFree86 projects. */ /* #define HasFontconfig YES */ /* #define HasGlide3 YES */ /* #define Glide3IncDir /usr/include/glide3 */ EOF if [ "$GLIDE" = "YES" ]; then # This edits xf86site.def to add HasGlide3. You'll need to install the a DRI capable # version of Glide for your video card class (voodoo3/banshee, or voodoo4/5), then the # tdfx DRI module will be built for that card. zcat $CWD/glide.diff.gz | patch -p1 --backup --verbose --suffix=.orig -E fi ( cd extras/freetype2 CFLAGS=-O2 make setup CFG="--prefix=/usr \ --build=s390-slackware-linux \ --host=s390-slackware-linux \ --target=s390-slackware-linux" make make install ldconfig ) make World -i CDEBUGFLAGS=-O2 } install() { cd $TMP/xc make -i install DESTDIR=/package-xfree86 make -i install.man DESTDIR=/package-xfree86 ( cd /package-xfree86/usr/X11R6/lib/X11/fonts/misc LD_LIBRARY_PATH=$TMP/xc/exports/lib:/usr/local/lib \ /package-xfree86/usr/X11R6/bin/mkfontscale -b -s -l \ -e /package-xfree86/usr/X11R6/lib/X11/fonts/encodings \ -e /package-xfree86/usr/X11R6/lib/X11/fonts/encodings/large . ) # Just to be on the safe side, we should provide Compose files where # they are missing, as it's been known to cause a crash. for dir in /package-xfree86/usr/X11R6/lib/X11/locale/* ; do if [ -d $dir ]; then if [ -r $dir/XI18N_OBJS -o -r $dir/XLC_LOCALE ]; then if [ ! -r $dir/Compose ]; then NAME=`basename $dir` CAPN=`echo $NAME | tr [a-z] [A-Z]` cat << EOF > $dir/Compose # # $CAPN Compose Sequence # # Sequence Definition # # \$XFree86: xc/nls/Compose/$NAME,v 1.2 `date` volkerdi Exp $ # # This file currently has no entries. It appears that a compose file (even # just an empty one) is required for the appropriate keysyms to work for # this encoding. # # Means # Special Character # End of Sequence Definition EOF fi fi fi done mkdir -p /package-xfree86/usr/X11R6/lib/X11/fonts/misc cp -a $CWD/linux8x16.pcf.gz /package-xfree86/usr/X11R6/lib/X11/fonts/misc/linux8x16.pcf.gz cp -a $CWD/linux8x8.pcf.gz /package-xfree86/usr/X11R6/lib/X11/fonts/misc/linux8x8.pcf.gz # Don't need this rm -f /package-xfree86/usr/X11R6/lib/X11/config/host.def rm -f /package-xfree86/usr/X11R6/lib/libz.a # mv /package-xfree86/usr/X11R6/lib/libfreetype.* /package-xfree86/usr/lib/ # rm -f /package-xfree86/usr/X11R6/bin/freetype-config # rm -f /package-xfree86/usr/include/GL cp -a $CWD/xinit/README.Xmodmap /package-xfree86/etc/X11/xinit/README.Xmodmap cp -p $CWD/xinit/.Xmodmap /package-xfree86//etc/X11/xinit/ mv /package-xfree86/etc/X11/xinit/xinitrc /package-xfree86/etc/X11/xinit/xinitrc.twm mkdir -p /package-xfree86/var/log/setup cp -a $CWD/setup.05.fontconfig /package-xfree86/var/log/setup/setup.05.fontconfig chmod 755 /package-xfree86/var/log/setup/setup.05.fontconfig cp -a /package-xfree86/etc/X11/xdm/Xsession /package-xfree86/etc/X11/xdm/Xsession.orig cp -a /package-xfree86/etc/X11/xdm/Xsetup_0 /package-xfree86/etc/X11/xdm/Xsetup_0.orig cp -p $CWD/xdm/Xsession /package-xfree86/etc/X11/xdm/Xsession cp -p $CWD/xdm/Xsetup_0 /package-xfree86/etc/X11/xdm/Xsetup_0 cp -p $CWD/xdm/Xsession.orig /package-xfree86/etc/X11/xdm/Xsession.orig cp -p $CWD/xdm/Xsetup_0.orig /package-xfree86/etc/X11/xdm/Xsetup_0.orig # Treat some of these as config files: mv /package-xfree86/etc/X11/xdm/Xsession /package-xfree86/etc/X11/xdm/Xsession.new mv /package-xfree86/etc/X11/xdm/xdm-config /package-xfree86/etc/X11/xdm/xdm-config.new mv /package-xfree86/etc/X11/xdm/Xservers /package-xfree86/etc/X11/xdm/Xservers.new # Replace freetype2: ( cd $CWD DESTDIR=/package-xfree86 ./freetype2.s390.build ) # Replace fontconfig: ( cd $CWD DESTDIR=/package-xfree86 ./fontconfig.s390.build ) # Pat says: This shouldn't be needed (apps should pick up -I/usr/include/freetype2 from # `freetype-config --cflags` while compiling), but it's so often reported as a bug that # I'll give in to the point. Now that Freetype1 is pretty much gone having this link # shouldn't hurt anything. Try not to rely on it, though. ( mkdir -p /package-xfree86/usr/include cd /package-xfree86/usr/include rm -rf freetype ; ln -sf freetype2/freetype . mkdir -p /package-xfree86/usr/X11R6/lib/X11/doc cp -a $TMP/xc/extras/freetype2/docs /package-xfree86/usr/X11R6/lib/X11/doc/freetype ) ( cd /package-xfree86/usr/X11R6/man/ for dir in 1 3 5 7; do ( cd man$dir rm -rf *.gz ls | xargs gzip -9 # needed in the man3 directory because there are too many files! ) done ) # These files aren't copied over by the make install for Linux/390. I suspect # they are only needed by xf86cfg or xf86config, but why not include them. cp -a programs/Xserver/hw/xfree86/xf86cfg/*.xbm \ /package-xfree86/usr/X11R6/include/X11/bitmaps/ mkdir -p /package-xfree86/usr/X11R6/include/X11/pixmaps/ cp -a programs/Xserver/hw/xfree86/xf86cfg/*.xpm \ /package-xfree86/usr/X11R6/include/X11/pixmaps/ ( cd programs/Xserver/hw/xfree86/etc/ cp Xinstall.sh /package-xfree86/usr/X11R6/lib/X11/etc/ cp xmodmap.std /package-xfree86/usr/X11R6/lib/X11/etc/ cp sun.tcap /package-xfree86/usr/X11R6/lib/X11/etc/sun.termcap cp sun.tinfo /package-xfree86/usr/X11R6/lib/X11/etc/sun.terminfo ) # Fix up the Xft config scripts to remove the $TMP/freetype part from the # "freetypecflags" value. ( cd /package-xfree86/usr/X11R6/lib/pkgconfig/ echo sed -e "s%$TMP/freetype%%" xft.pc > xft.pc.new sed -e "s%$TMP/freetype%%" xft.pc > xft.pc.new cat xft.pc.new > xft.pc rm xft.pc.new ) ( cd /package-xfree86/usr/X11R6/bin/ echo sed -e "s%$TMP/freetype%%" xft-config > xft-config.new sed -e "s%$TMP/freetype%%" xft-config > xft-config.new cat xft-config.new > xft-config rm xft-config.new ) # pkgconfig doesn't know where to put this stuff: ( cd /package-xfree86/usr/X11R6/lib mv pkgconfig/* /package-xfree86/usr/lib/pkgconfig/ rm -rf pkgconfig ln -sf /usr/lib/pkgconfig . ) # crud removal: rm -rf /package-xfree86/usr/X11R6/share # We don't ship fonts.cache-1 files, we create them later. find /package-xfree86/usr -type f -name fonts.cache-1 -exec rm {} \; } attributes() { chown -R root.bin $PKG/package-xfree86/usr/bin/ \ $PKG/package-xfree86/usr/X11R6/bin/ chmod 644 $PKG/package-xfree86/etc/fonts/* chmod 755 $PKG/package-xfree86/etc/X11/xinit/xinitrc.twm chmod 444 $PKG/package-xfree86/usr/X11R6/lib/X11/etc/* chmod 4711 $PKG/package-xfree86/usr/X11R6/bin/XFree86 # chmod 4711 $PKG/package-xfree86/usr/X11R6/bin/xterm chmod 444 $PKG/package-xfree86/usr/X11R6/include/X11/bitmaps/*.x[bp]m \ $PKG/package-xfree86/usr/X11R6/include/X11/pixmaps/*.xpm find $PKG/package-xfree86/usr/X11R6/man -type f -exec chmod 444 {} \; } special() { cd $PKG mv package-xfree86/* ./ rmdir package-xfree86 # copy the package tree cp -a $PKG $TMP/xm # # remove things that shouldn't be in the main package # rm -rf $PKG/usr/include rm -rf $PKG/usr/lib/pkgconfig rm -rf $PKG/usr/share/ # xf86doc, xf86html, xf86ps, xf86jdoc rm -rf $PKG/usr/X11R6/lib/X11/doc # xf86prog rm -rf $PKG/usr/X11R6/lib/*.a rm -rf $PKG/usr/X11R6/lib/X11/config rm -rf $PKG/usr/X11R6/man/man3 ( cd $PKG/usr/X11R6/include/ rm -rf *.h DPS GL freetype* cd X11/ rm -rf *.h extensions fonts ICE SM Xcursor Xmu Xaw PEX5 Xft PM ) # xfnts, xfnts100, xfntscal, xfntscyr, xfntslt2 rm -rf $PKG/usr/X11R6/lib/X11/fonts/* rm -rf $PKG/usr/X11R6/include/fontconfig/ # xnest, xprt, xvfb rm -rf $PKG/usr/X11R6/bin/Xnest rm -rf $PKG/usr/X11R6/bin/Xprt rm -rf $PKG/usr/X11R6/bin/Xvfb cd $CTL cat $CWD/slack-desc/slack-desc.xfree86 > slack-desc cat $CWD/config.sh >> doinst.sh cat << EOF >> doinst.sh config etc/X11/xdm/xdm-config.new config etc/X11/xdm/Xservers.new config etc/X11/xdm/Xsession.new EOF # break up the doinst sed -f $CWD/sed.script doinst.sh > doinst.sh.new mv doinst.sh.new doinst.sh sed -e 's%package-xfree86/%%g' doinst.sh > doinst.sh.new cat doinst.sh.new > doinst.sh rm doinst.sh.new } subpacks() { repack xf86doc repack xf86html repack xf86devel repack xfnts repack xfnts100 repack xfntscal repack xfntscyr repack xnest repack xprt repack xvfb }