summaryrefslogtreecommitdiffstats
path: root/tigervnc/build
diff options
context:
space:
mode:
author Eric Hameleers <alien@slackware.com>2012-06-23 19:37:20 +0000
committer Eric Hameleers <alien@slackware.com>2012-06-23 19:37:20 +0000
commit1325d22f4514d2efe85e814e0be6953154e73cdf (patch)
tree7bfe5aa0cf34b1a9013b24ceb28a23b65b93c690 /tigervnc/build
parent42c96b357c1a0acd0715c5436bc2804ce211cc67 (diff)
downloadasb-1325d22f4514d2efe85e814e0be6953154e73cdf.tar.gz
asb-1325d22f4514d2efe85e814e0be6953154e73cdf.tar.xz
Update to 1.2.0
Diffstat (limited to 'tigervnc/build')
-rwxr-xr-xtigervnc/build/tigervnc.SlackBuild115
1 files changed, 54 insertions, 61 deletions
diff --git a/tigervnc/build/tigervnc.SlackBuild b/tigervnc/build/tigervnc.SlackBuild
index fab5f675..75d5a100 100755
--- a/tigervnc/build/tigervnc.SlackBuild
+++ b/tigervnc/build/tigervnc.SlackBuild
@@ -29,6 +29,7 @@
# 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.
@@ -59,6 +60,7 @@ 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"
@@ -66,7 +68,7 @@ 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="LICENCE.TXT doc/TODO doc/*.txt doc/*.odt"
+DOCS="BUILDING.txt LICENCE.TXT README.txt doc/TODO doc/*.txt doc/*.odt"
DOCS_XORG="COPYING ChangeLog"
# Where do we look for sources?
@@ -220,48 +222,54 @@ for (( i = 0; i < ${#SOURCE[*]}; i++ )) ; do
tar -xvf ${SOURCE[$i]}
done
cd ${PRGNAM}-${VERSION}
-
-# 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/
-
-# Patch the xorg-server source to include building vnc driver:
-cd unix/xserver
- cat ../xserver19.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 .
+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"
-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
+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 -
+
+# 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 ]
+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:
+ cat ../xserver${PATCHVER}.patch | patch -p1 --verbose \
+ 2>&1 | tee $OUTPUT/patch-$PRGNAM.log
echo -e "\n*** Building xserver ***\n"
autoreconf -vif 2>&1 | tee $OUTPUT/configure-${PRGNAM}.log
@@ -275,9 +283,10 @@ cd 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-xwin --disable-xephyr --disable-kdrive --disable-xinerama \
+ --disable-composite --disable-dri --disable-dri2 \
--enable-install-libxf86config \
--enable-xcsecurity \
--enable-glx-tls \
@@ -285,42 +294,23 @@ cd 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 \
2>&1 | tee $OUTPUT/configure-${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
+ 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
cd -
-if [ "$DO_APPLET" = "YES" ]; then
- # 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 -
-fi
-
# Create .png icons from the .svg file:
make -C media 2>&1 | tee -a $OUTPUT/make-${PRGNAM}.log
-if [ "$DO_APPLET" = "YES" ]; then
- # 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 -
-fi
-
# Install menu entry:
mkdir -p $PKG/usr/share/{applications,icons/hicolor/{16x16,24x24,32x32,48x48}/apps}
for PSIZE in 16 24 32 48; do
@@ -368,9 +358,12 @@ 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 unix/xserver/$FIL $PKG/usr/doc/$PRGNAM-$VERSION/${FIL}.xorg ; done || true
+for FIL in $(echo $DOCS_XORG); do cp -a build/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 {} \;