diff options
author | Eric Hameleers <alien@slackware.com> | 2012-07-28 15:14:58 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2012-07-28 15:14:58 +0000 |
commit | 989e86e50342dc6e56fa09c1e85de3d6d11f7803 (patch) | |
tree | 83b7888df489dce5360aec8f7268996d71a89efe /tigervnc | |
parent | 1739d10a37f8729278ffc0fd15cc80dad32ebbaa (diff) | |
download | asb-989e86e50342dc6e56fa09c1e85de3d6d11f7803.tar.gz asb-989e86e50342dc6e56fa09c1e85de3d6d11f7803.tar.xz |
Revert from 1.2 to 1.1. The previous version checked in built a working tigervnc-1.2 but this branch is not yet mature enough - the fltk re-write of the vncviewer lacks several functions which I need.
Diffstat (limited to 'tigervnc')
-rwxr-xr-x | tigervnc/build/tigervnc.SlackBuild | 139 |
1 files changed, 76 insertions, 63 deletions
diff --git a/tigervnc/build/tigervnc.SlackBuild b/tigervnc/build/tigervnc.SlackBuild index 75d5a100..07d83d42 100755 --- a/tigervnc/build/tigervnc.SlackBuild +++ b/tigervnc/build/tigervnc.SlackBuild @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # $Id$ # Copyright 2010, 2011, 2012 Eric Hameleers, Eindhoven. NL # All rights reserved. @@ -29,7 +29,6 @@ # Descr: VNC server and client # URL: http://tigervnc.org/ # Needs: jdk (only during building the java applet) -# libjpeg-turbo (only during compilation of the vncviewer) # Changelog: # r4126-1: 31/Aug/2010 by Eric Hameleers <alien@slackware.com> # * Initial build. @@ -39,8 +38,11 @@ # * Update to 1.1.beta1 # 1.1.0-1: 14/nov/2011 by Eric Hameleers <alien@slackware.com> # * Update to 1.1.0 -# 1.2.0-1: 23/jun/2012 by Eric Hameleers <alien@slackware.com> -# * Update. +# 1.1.0-2: 28/jul/2012 by Eric Hameleers <alien@slackware.com> +# * Build 1.1.0 again, using a revised script which can be used +# on Slackware 14 as well. Also, enable compositing in the +# server. Abandon the tigervnc-1.2 branch for now, because +# the fltk based viewer rewrite is not yet fully functional. # # Run 'sh tigervnc.SlackBuild' to build a Slackware package. # The package (.txz) and .txt file as well as build logs are created in /tmp . @@ -48,27 +50,26 @@ # # ----------------------------------------------------------------------------- +# Set initial variables: + PRGNAM=tigervnc -VERSION=${VERSION:-1.2.0} -BUILD=${BUILD:-1} +VERSION=${VERSION:-1.1.0} +BUILD=${BUILD:-2} NUMJOBS=${NUMJOBS:" -j4 "} TAG=${TAG:-alien} -# Do we build the java applet (needs jdk)? -DO_APPLET=${DO_APPLET:-"YES"} - # TigerVNC needs to use source of the X.Org server whose version matches # that of your installed X.Org package: XORG=${XORG:-$(X -version 2>&1 | grep "^X.Org X Server " | cut -f4 -d' ')} PATCHVER="$(echo $XORG | cut -f1,2 -d. | tr -d '.')" # OS Stamp into the binaries: -OSNAME="Slackware 13.37" +OSNAME="$(head -1 /etc/slackware-version)" OSVENDOR="Slackware Linux Project" BUILDER="Built by Alien BOB on $(date -u)" # This covers most filenames you'd want as documentation. Change if needed. -DOCS="BUILDING.txt LICENCE.TXT README.txt doc/TODO doc/*.txt doc/*.odt" +DOCS="LICENCE.TXT doc/TODO doc/*.txt doc/*.odt" DOCS_XORG="COPYING ChangeLog" # Where do we look for sources? @@ -153,8 +154,8 @@ case "$ARCH" in esac case "ARCH" in - arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; - *) TARGET=$ARCH-slackware-linux ;; + arm*) TARGET=$ARCH-slackware-linux-gnueabi ;; + *) TARGET=$ARCH-slackware-linux ;; esac # Exit the script on errors: @@ -222,38 +223,11 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do tar -xvf ${SOURCE[$i]} done cd ${PRGNAM}-${VERSION} -chmod -R u+w,go+r-w,a+X-s . -chown -R root:root . -echo Building ... -export LDFLAGS="$SLKLDFLAGS" -export CXXFLAGS="$SLKCFLAGS" -export CFLAGS="$SLKCFLAGS" - -[ "$DO_APPLET" = "YES" ] && CMAKE_JAVA="ON" || CMAKE_JAVA="OFF" -# Explicitly put the java applet into a directory named 'tigervnc': -sed -i -e 's#/vnc/class#/tigervnc/class#'g $(grep -rl vnc/class .) -sed -i -e 's#DESTINATION vnc/class#DESTINATION share/tigervnc/class#'g $(grep -rl vnc/class .) - -echo -e "\n*** Building tigervnc ***\n" -mkdir -p build -cd build - cmake \ - -G "Unix Makefiles" \ - -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DMAN_INSTALL_DIR=/usr/man \ - -DSYSCONF_INSTALL_DIR=/etc \ - -DLIB_SUFFIX=${LIBDIRSUFFIX} \ - -DENABLE_PAM:BOOL=OFF \ - -DBUILD_JAVA:BOOL=${CMAKE_JAVA} \ - -DJPEG_INCLUDE_DIR=/usr/include/libjpeg-turbo \ - -DJPEG_LIBRARY=/usr/lib${LIBDIRSUFFIX}/libjpeg-turbo/libjpeg.a \ - .. - make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log - make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log -cd - +# Move the xorg-server sources into the TigerVNC tree: +mv unix/xserver/hw/vnc ../xorg-server-${XORG}/hw/ +rm -rf unix/xserver/hw +mv ../xorg-server-${XORG}/* unix/xserver/ # Do we have a patch for X.Org which tigervnc does not have? if [ ! -f unix/xserver${PATCHVER}.patch -a -f $SRCDIR/xserver${PATCHVER}.patch ] @@ -261,15 +235,42 @@ then cp $SRCDIR/xserver${PATCHVER}.patch unix/ fi -# Prepare the Xvnc sources (we are building out-of-tree, in ./build directory): -mkdir -p build/unix -cp -R unix/xserver unix/xserver${PATCHVER}.patch build/unix/ -cp -R ../xorg-server-${XORG}/* build/unix/xserver/ - -cd build/unix/xserver/ - # Patch the xorg-server source to include building vnc driver: +# Patch the xorg-server source to include building vnc driver: +cd unix/xserver cat ../xserver${PATCHVER}.patch | patch -p1 --verbose \ 2>&1 | tee $OUTPUT/patch-$PRGNAM.log +cd - + +# Explicitly put the java applet into a directory named 'tigervnc': +sed -i -e 's#/vnc/class#/tigervnc/class#'g $(grep -rl vnc/class .) + +chown -R root:root . +chmod -R u+w,go+r-w,a+X-s . + +echo Building ... +export LDFLAGS="$SLKLDFLAGS" +export CXXFLAGS="$SLKCFLAGS" +export CFLAGS="$SLKCFLAGS" + +echo -e "\n*** Building tigervnc ***\n" +autoreconf -vif 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log +./configure \ + --prefix=/usr \ + --libdir=/usr/lib${LIBDIRSUFFIX} \ + --mandir=/usr/man \ + --docdir=/usr/doc/$PRGNAM-$VERSION \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --disable-static \ + --program-prefix= \ + --program-suffix= \ + --build=$TARGET \ + 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log + +make $NUMJOBS 2>&1 | tee $OUTPUT/make-${PRGNAM}.log +make DESTDIR=$PKG install 2>&1 | tee $OUTPUT/install-${PRGNAM}.log + +cd unix/xserver echo -e "\n*** Building xserver ***\n" autoreconf -vif 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log @@ -283,10 +284,10 @@ cd build/unix/xserver/ --localstatedir=/var \ --mandir=/usr/man \ --disable-static \ - --disable-config-dbus --disable-config-hal --disable-config-udev \ --disable-xorg --disable-xnest --disable-xvfb --disable-dmx \ - --disable-xwin --disable-xephyr --disable-kdrive --disable-xinerama \ - --disable-composite --disable-dri --disable-dri2 \ + --disable-xwin --disable-xephyr --disable-kdrive \ + --disable-xinerama \ + --enable-composite \ --enable-install-libxf86config \ --enable-xcsecurity \ --enable-glx-tls \ @@ -294,23 +295,38 @@ cd build/unix/xserver/ --with-int10=x86emu \ --with-default-font-path="${DEF_FONTPATH}" \ --with-module-dir=/usr/lib${LIBDIRSUFFIX}/xorg/modules \ + --with-dri-driver-path=/usr/lib${LIBDIRSUFFIX}/xorg/modules/dri \ --with-xkb-path=/etc/X11/xkb \ --with-xkb-output=/var/lib/xkb \ + --disable-config-dbus \ + --disable-config-hal \ + --disable-config-udev \ --with-os-name="$OSNAME" \ --with-os-vendor="$OSVENDOR" \ --with-builderstring="$BUILDER" \ - --build=$TARGET \ + --build=$ARCH-slackware-linux \ 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log - make TIGERVNC_SRCDIR="$TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}" $NUMJOBS \ - 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log - make TIGERVNC_SRCDIR="$TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION}" -C hw/vnc \ - DESTDIR=$PKG install 2>&1 | tee -a $OUTPUT/install-${PRGNAM}.log + make $NUMJOBS 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log + make -C hw/vnc DESTDIR=$PKG install 2>&1 | tee -a $OUTPUT/install-${PRGNAM}.log +cd - + +# Compile the java applet (needs the sdk... jre is not enough): +cd java/src/com/tigervnc/vncviewer + make 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log cd - # Create .png icons from the .svg file: make -C media 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log +# Install the java applet: +cd java/src/com/tigervnc/vncviewer + mkdir -p $PKG/usr/share/tigervnc/classes + install -m0755 VncViewer.jar $PKG/usr/share/tigervnc/classes/ + install -m0644 index.vnc $PKG/usr/share/tigervnc/classes/ + install -m0644 *.class $PKG/usr/share/tigervnc/classes/ +cd - + # Install menu entry: mkdir -p $PKG/usr/share/{applications,icons/hicolor/{16x16,24x24,32x32,48x48}/apps} for PSIZE in 16 24 32 48; do @@ -358,12 +374,9 @@ fi EOT # Add documentation: -# First, remove files which were misplaced: -rm -f $PKG/usr/doc/* -cd $TMP/tmp-$PRGNAM/${PRGNAM}-${VERSION} mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true -for FIL in $(echo $DOCS_XORG); do cp -a build/unix/xserver/$FIL $PKG/usr/doc/$PRGNAM-$VERSION/${FIL}.xorg ; done || true +for FIL in $(echo $DOCS_XORG); do cp -a unix/xserver/$FIL $PKG/usr/doc/$PRGNAM-$VERSION/${FIL}.xorg ; done || true cat $SRCDIR/$(basename $0) > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild chown -R root:root $PKG/usr/doc/$PRGNAM-$VERSION find $PKG/usr/doc -type f -exec chmod 644 {} \; |