summaryrefslogtreecommitdiffstats
path: root/source.local/extra/source/tigervnc/tigervnc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source.local/extra/source/tigervnc/tigervnc.SlackBuild')
-rwxr-xr-xsource.local/extra/source/tigervnc/tigervnc.SlackBuild134
1 files changed, 85 insertions, 49 deletions
diff --git a/source.local/extra/source/tigervnc/tigervnc.SlackBuild b/source.local/extra/source/tigervnc/tigervnc.SlackBuild
index f195c3b..883d3ed 100755
--- a/source.local/extra/source/tigervnc/tigervnc.SlackBuild
+++ b/source.local/extra/source/tigervnc/tigervnc.SlackBuild
@@ -1,6 +1,6 @@
-#!/bin/bash
-# $Id: tigervnc.SlackBuild,v 1.6 2012/03/19 11:36:02 root Exp root $
-# Copyright 2010, 2011, 2012 Eric Hameleers, Eindhoven. NL
+#!/bin/sh
+# $Id: tigervnc.SlackBuild,v 1.9 2013/04/27 21:28:15 eha Exp eha $
+# Copyright 2010, 2011, 2012, 2013 Eric Hameleers, Eindhoven. NL
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software for
@@ -25,7 +25,7 @@
PKGNAM=tigervnc
VERSION=${VERSION:-1.1.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
NUMJOBS=${NUMJOBS:" -j4 "}
TAG=${TAG:-alien}
@@ -35,9 +35,10 @@ 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' ')}
+MAXPATCHVER="$(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)"
@@ -45,41 +46,41 @@ BUILDER="Built by Alien BOB on $(date -u)"
DOCS="LICENCE.TXT doc/TODO doc/*.txt doc/*.odt"
DOCS_XORG="COPYING ChangeLog"
-# Automatically determine the architecture we're building on:
-MARCH=$( uname -m )
-if [ -z "$ARCH" ]; then
- case "$MARCH" in
- i?86) export ARCH=i486 ;;
- armv7hl) export ARCH=$MARCH ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$MARCH ;;
- esac
-fi
-
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
- SLKLDFLAGS=""
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
- SLKLDFLAGS=""
- LIBDIRSUFFIX=""
-elif [ "$ARCH" = "x86_64" ]; then
- SLKCFLAGS="-O2 -fPIC"
- SLKLDFLAGS="-L/usr/lib64"
- LIBDIRSUFFIX="64"
-elif [ "$ARCH" = "armv7hl" ]; then
- SLKCFLAGS="-O2 -march=armv7-a -mfpu=vfpv3-d16"
- SLKLDFLAGS=""
- LIBDIRSUFFIX=""
+if [ -e $CWD/machine.conf ]; then
+ . $CWD/machine.conf ]
+elif [ -e /etc/slackbuild/machine.conf ]; then
+ . /etc/slackbuild/machine.conf ]
else
- SLKCFLAGS="-O2"
- SLKLDFLAGS=""
- LIBDIRSUFFIX=""
+ # Automatically determine the architecture we're building on:
+ MARCH=$( uname -m )
+ if [ -z "$ARCH" ]; then
+ case "$MARCH" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$MARCH ;;
+ esac
+ fi
+ # Set CFLAGS/CXXFLAGS and LIBDIRSUFFIX:
+ if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "s390" ]; then
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+ elif [ "$ARCH" = "arm" ]; then
+ SLKCFLAGS="-O2 -march=armv5te"
+ LIBDIRSUFFIX=""
+ else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ fi
fi
-case "ARCH" in
+case "$ARCH" in
arm*) TARGET=$ARCH-slackware-linux-gnueabi ;;
*) TARGET=$ARCH-slackware-linux ;;
esac
@@ -101,12 +102,42 @@ mv unix/xserver/hw/vnc ../xorg-server-${XORG}/hw/
rm -rf unix/xserver/hw
mv ../xorg-server-${XORG}/* unix/xserver/
-# Patch the xorg-server source to include building vnc driver:
+# We have patches for X.Org later than 1.10 which tigervnc does not have:
+for PATCHVER in 111 112 113 ; do
+ if [ -e $CWD/tigervnc$(echo $VERSION | cut -f1,2 -d. --output-delimiter=)-xorg${PATCHVER}.patch ]; then
+ cp $CWD/tigervnc$(echo $VERSION | cut -f1,2 -d. --output-delimiter=)-xorg${PATCHVER}.patch unix/xserver${PATCHVER}.patch
+ fi
+done
+
+if [ $MAXPATCHVER -gt 110 ]; then
+ if [ $MAXPATCHVER -lt 113 ]; then
+ # The sed magic in the hw/vnc Makefile needs some love:
+ # ... taken care of in the xserver113 patch if we ever move to X.Org 1.13.
+ cat $CWD/tigervnc$(echo $VERSION | cut -f1,2 -d. --output-delimiter=)-xorg_headers.patch | patch -p1 --verbose || exit 1
+ else
+ # We need to rewrite the xserver110.patch for X.Org 1.13 and newer:
+ cp $CWD/tigervnc$(echo $VERSION | cut -f1,2 -d. --output-delimiter=)-xorg110.patch unix/xserver110.patch
+ fi
+fi
+
+# Patch the xorg-server source to include building the vnc driver
cd unix/xserver
- cat ../xserver19.patch | patch -p1 --verbose \
- 2>&1 | tee $TMP/patch-$PKGNAM.log
+ if [ $MAXPATCHVER -le 110 ]; then
+ # apply one of the tigervnc-provided patches:
+ cat ../xserver${MAXPATCHVER}.patch | patch -p1 --verbose || exit 1
+ else
+ # these external patches are incremental and must be applied in order:
+ for PATCHVER in 110 111 112 113 ; do
+ if [ $PATCHVER -le $MAXPATCHVER -a -e ../xserver${PATCHVER}.patch ]; then
+ cat ../xserver${PATCHVER}.patch | patch -p1 --verbose || exit 1
+ fi
+ done
+ fi
cd -
+# We use Java7:
+cat $CWD/tigervnc11-java7.patch | patch -p1 --verbose || exit 1
+
# Explicitly put the java applet into a directory named 'tigervnc':
sed -i -e 's#/vnc/class#/tigervnc/class#'g $(grep -rl vnc/class .)
@@ -118,7 +149,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-export LDFLAGS="$SLKLDFLAGS"
+export LDFLAGS="$SLKLDFLAGS -lpthread"
export CXXFLAGS="$SLKCFLAGS"
export CFLAGS="$SLKCFLAGS"
@@ -137,10 +168,11 @@ autoreconf -vif
--build=$TARGET
make $NUMJOBS || make || exit 1
-make DESTDIR=$PKG install
+make DESTDIR=$PKG install || exit 1
cd unix/xserver
echo -e "\n*** Building xserver ***\n"
+ export CXXFLAGS="$SLKCFLAGS -fpermissive"
autoreconf -vif
# Default font paths to be used by the X server
@@ -152,13 +184,15 @@ cd unix/xserver
--sysconfdir=/etc \
--localstatedir=/var \
--mandir=/usr/man \
+ --disable-dri \
--disable-static \
--disable-xorg --disable-xnest --disable-xvfb --disable-dmx \
--disable-xwin --disable-xephyr --disable-kdrive \
- --disable-xinerama --disable-composite \
+ --disable-xinerama \
+ --enable-composite \
--enable-install-libxf86config \
--enable-xcsecurity \
- --enable-glx-tls \
+ --enable-glx-tls --enable-dri2 \
--with-pic \
--with-int10=x86emu \
--with-default-font-path="${DEF_FONTPATH}" \
@@ -169,6 +203,9 @@ cd unix/xserver
--disable-config-dbus \
--disable-config-hal \
--disable-config-udev \
+ --disable-devel-docs \
+ --disable-unit-tests \
+ --without-dtrace \
--with-os-name="$OSNAME" \
--with-os-vendor="$OSVENDOR" \
--with-builderstring="$BUILDER" \
@@ -179,7 +216,7 @@ cd unix/xserver
cd -
if [ "$DO_APPLET" = "YES" ]; then
- # Compile the java applet (needs the jdk... jre is not enough):
+ # Compile the java applet (needs the sdk... jre is not enough):
cd java/src/com/tigervnc/vncviewer
make || exit 1
cd -
@@ -189,7 +226,7 @@ fi
make -C media
if [ "$DO_APPLET" = "YES" ]; then
- # Install the java applet:
+ # 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/
@@ -199,9 +236,8 @@ if [ "$DO_APPLET" = "YES" ]; then
fi
# Install menu entry:
-mkdir -p $PKG/usr/share/applications
+mkdir -p $PKG/usr/share/{applications,icons/hicolor/{16x16,24x24,32x32,48x48}/apps}
for PSIZE in 16 24 32 48; do
- mkdir -p $PKG/usr/share/icons/hicolor/${PSIZE}x${PSIZE}/apps
install -m644 media/icons/tigervnc_${PSIZE}.png \
$PKG/usr/share/icons/hicolor/${PSIZE}x${PSIZE}/apps/tigervnc.png
done
@@ -247,7 +283,7 @@ EOT
# Add documentation:
mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PKGNAM-$VERSION || true
for FIL in $(echo $DOCS_XORG); do cp -a unix/xserver/$FIL $PKG/usr/doc/$PKGNAM-$VERSION/${FIL}.xorg ; done
chown -R root:root $PKG/usr/doc/$PKGNAM-$VERSION
find $PKG/usr/doc -type f -exec chmod 644 {} \;