Revision: 4265
          http://tigervnc.svn.sourceforge.net/tigervnc/?rev=4265&view=rev
Author:   dcommander
Date:     2011-02-09 03:10:44 +0000 (Wed, 09 Feb 2011)

Log Message:
-----------
Modify Mac packaging to accommodate VeNCrypt-enabled builds or other 
customizations;  Change build documentation accordingly

Modified Paths:
--------------
    trunk/Makefile.am
    trunk/configure.ac
    trunk/release/BUILDING.txt

Added Paths:
-----------
    trunk/release/makemacpkg.in

Removed Paths:
-------------
    trunk/release/makemacpkg

Modified: trunk/Makefile.am
===================================================================
--- trunk/Makefile.am   2011-02-08 23:43:55 UTC (rev 4264)
+++ trunk/Makefile.am   2011-02-09 03:10:44 UTC (rev 4265)
@@ -11,13 +11,12 @@
 if X86_64
 
 udmg: all
-       sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} \
-               ${srcdir} universal
+       sh makemacpkg universal ${BUILDDIR32}
 
 endif
 
 dmg: all
-       sh $(srcdir)/release/makemacpkg ${PACKAGE_NAME} ${VERSION} ${BUILD} 
${srcdir}
+       sh makemacpkg
 
 EXTRA_DIST = CMakeLists.txt cmakescripts/getdate.bat LICENCE.TXT \
        doc java media release config.h.cmake.in

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac  2011-02-08 23:43:55 UTC (rev 4264)
+++ trunk/configure.ac  2011-02-09 03:10:44 UTC (rev 4265)
@@ -223,6 +223,8 @@
 
 AC_SUBST(BUILD)
 
+AC_CONFIG_FILES([makemacpkg:release/makemacpkg.in])
+
 AC_OUTPUT([
 Makefile
 common/Makefile

Modified: trunk/release/BUILDING.txt
===================================================================
--- trunk/release/BUILDING.txt  2011-02-08 23:43:55 UTC (rev 4264)
+++ trunk/release/BUILDING.txt  2011-02-09 03:10:44 UTC (rev 4265)
@@ -37,7 +37,10 @@
    * zlib v1.2 or later
    * OpenSSL v0.9.7 or later
 
+-- If building VeNCrypt support:
+   * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
 
+
 ==================
 Out-of-Tree Builds
 ==================
@@ -58,8 +61,8 @@
 
 The following procedure will build the TigerVNC viewer on Linux and Unix
 systems.  On 64-bit systems, this may build a 32-bit version of TigerVNC,
-depending on the default compiler configuration for your system.  See below for
-specific build instructions for 64-bit systems.
+depending on the default autotools configuration for your system.  See below
+for specific build instructions for 64-bit systems.
 
   cd {source_directory}
   autoreconf -fiv
@@ -110,9 +113,9 @@
 build configuration or module dependencies.
 
 
-==================================
-Build Recipes for Specific Systems
-==================================
+==================
+Unix Build Recipes
+==================
 
 
 32-bit Build on 64-bit Linux
@@ -178,29 +181,41 @@
 to the configure command line.  The OS X 10.4 SDK must be installed.
 
 
-Building VeNCrypt support on OS X
----------------------------------
+Building VeNCrypt support
+-------------------------
 
-VeNCrypt requires GnuTLS, which is not available on OS X systems by default.
-However, it can be obtained from MacPorts (http://www.macports.org/).  The
-easiest way to build TigerVNC using this version of GnuTLS is simply to
-modify the CPATH and LIBRARY_PATH environment variables to include /opt/local,
-i.e.:
+Building VeNCrypt (the TigerVNC security and authentication extensions)
+requires GnuTLS, which is not pre-installed on all platforms.  In general, if
+you are building on a Unix-ish platform that has the GnuTLS libraries and
+include files installed in the standard system locations, then the TigerVNC
+build system should detect the system version of GnuTLS automatically and link
+against it.  However, this produces a version of TigerVNC that depends on the
+GnuTLS dynamic libraries, and thus the binaries are not portable.
 
-export CPATH=/opt/local/include
-export LIBRARY_PATH=/opt/local/lib
+To build a fully portable, cross-compatible version of TigerVNC with VeNCrypt
+support, it is necessary to link against the GnuTLS static library (as well
+as the static libraries of its dependencies.)  If you are lucky enough, your
+O/S distribution may include pre-packaged versions of both the static and
+dynamic libraries for GnuTLS and its dependencies.  Otherwise, it will probably
+be necessary to build GnuTLS, libgcrypt, libtasn1, and libgpg-error from
+source.
 
-and then build TigerVNC as you would normally.  However, this produces run-time
-dependencies on the .dylib files in /opt/local/lib.  To statically link with
-GnuTLS, add the following monstrosity to the configure command line:
+You can manipulate the GNUTLS_CFLAGS and GNUTLS_LDFLAGS configure variables to
+accommodate a custom build of GnuTLS that is installed in a non-system
+directory.  For instance, adding
 
-  GNUTLS_CFLAGS=-I/opt/local/include \
-    GNUTLS_LDFLAGS='/opt/local/lib/libgnutls.a /opt/local/lib/libgcrypt.a \
-    /opt/local/lib/libgpg-error.a /opt/local/lib/libz.a \
-    /opt/local/lib/libtasn1.a /opt/local/lib/libiconv.a \
-    /opt/local/lib/libintl.a -framework CoreFoundation'
+  GNUTLS_CFLAGS=-I/opt/gnutls/include \
+    GNUTLS_LDFLAGS='/opt/gnutls/lib/libgnutls.a /opt/gnutls/lib/libgcrypt.a \
+    /opt/gnutls/lib/libgpg-error.a /opt/gnutls/lib/libtasn1.a' \
+    --with-included-zlib
 
+to the configure or build-xorg command line will cause TigerVNC to be
+statically linked against a custom installation of GnuTLS that resides under
+/opt/gnutls.  GnuTLS depends on zlib, so specifying --with-included-zlib will
+satisfy that depency using TigerVNC's in-source version of zlib, which
+eliminates another dynamic library dependency.
 
+
 *******************************************************************************
 **     Building on Windows (Visual C++ or MinGW)
 *******************************************************************************
@@ -251,7 +266,10 @@
    C:\Program Files\Inno Setup 5) to the system or user PATH environment
    variable prior to building TigerVNC.
 
+-- If building VeNCrypt support:
+   * GnuTLS and its dependencies (libgcrypt, libtasn1, libgpg-error)
 
+
 ==================
 Out-of-Tree Builds
 ==================
@@ -337,9 +355,9 @@
 c:\Program Files\TigerVNC.
 
 
-=============
-Build Recipes
-=============
+=====================
+Windows Build Recipes
+=====================
 
 
 64-bit MinGW Build on Cygwin
@@ -420,14 +438,17 @@
   Create Macintosh package/disk image.  This requires the PackageMaker
   application, which must be installed in /Developer/Applications/Utilities.
 
-make udmg
+make udmg [BUILDDIR32={32-bit build directory}]
 
-  On 64-bit OS X (10.5 "Leopard") and later, this creates a version of the
-  Macintosh package/disk image which contains universal i386/x86-64 binaries.
-  The 32-bit fork of these binaries is backward compatible with OS X 10.4 and
-  later (OS X 10.4 compatibility SDK required.)  If building on OS X 10.6
-  ("Snow Leopard") or later, the 64-bit fork can be made backward compatible
-  with 10.5 by using the instructions in the "Build Recipes" section.
+  On 64-bit OS X systems, this creates a version of the Macintosh package and
+  disk image which contains universal i386/x86-64 binaries.  You should first
+  configure a 32-bit out-of-tree build of TigerVNC, then configure a 64-bit
+  out-of-tree build, then run 'make udmg' from the 64-bit build directory.  The
+  build system will look for the 32-bit build under {source_directory}/osxx86
+  by default, but you can override this by setting the BUILDDIR32 variable on
+  the make command line as shown above.  Either the 64-bit or 32-bit build can
+  be configured to be backward-compatible by using the instructions in the
+  "Unix Build Recipes" section.
 
 
 Windows

Deleted: trunk/release/makemacpkg
===================================================================
--- trunk/release/makemacpkg    2011-02-08 23:43:55 UTC (rev 4264)
+++ trunk/release/makemacpkg    2011-02-09 03:10:44 UTC (rev 4265)
@@ -1,98 +0,0 @@
-#!/bin/sh
-
-set -u
-set -e
-trap onexit INT
-trap onexit TERM
-trap onexit EXIT
-
-TMPDIR=
-
-onexit()
-{
-       if [ ! "$TMPDIR" = "" ]; then
-               sudo rm -rf $TMPDIR
-       fi
-}
-
-usage()
-{
-       echo "$0 <package name> <version> <build> <source dir.> [universal]"
-       exit 1
-}
-
-UNIVERSAL=0
-
-if [ $# -lt 4 ]; then usage $0; fi
-PACKAGE_NAME=$1
-VERSION=$2
-BUILD=$3
-SRCDIR=$4
-if [ $# -gt 4 ]; then
-       if [ "$5" = "universal" ]; then UNIVERSAL=1; fi
-fi
-PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
-
-if [ -f $PACKAGE_NAME.dmg ]; then
-       rm -f $PACKAGE_NAME.dmg
-fi
-
-umask 022
-TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
-PKGROOT=$TMPDIR/pkg/Package_Root
-mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin
-mkdir -p $PKGROOT/opt/$PACKAGE_NAME/man/man1
-
-install -m 755 unix/vncviewer/vncviewer $PKGROOT/opt/$PACKAGE_NAME/bin/
-
-if [ $UNIVERSAL = 1 ]; then
-       if [ ! -d $SRCDIR/osxx86 ]; then
-               mkdir -p $SRCDIR/osxx86
-       fi
-       pushd $SRCDIR/osxx86
-       sh $SRCDIR/configure \
-               CC=gcc-4.0 CXX=g++-4.0 \
-               CFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4 -O3 -m32' \
-               CXXFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4 -O3 -m32' \
-               LDFLAGS='-isysroot /Developer/SDKs/MacOSX10.4u.sdk 
-mmacosx-version-min=10.4 -m32'
-       make
-       popd
-       lipo -create -arch i386 $SRCDIR/osxx86/unix/vncviewer/vncviewer -arch 
x86_64 \
-               $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer \
-               -output $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer
-fi
-
-mkdir -p $PKGROOT/Library/Documentation/$PACKAGE_NAME
-chmod 1775 $PKGROOT/Library
-chmod 775 $PKGROOT/Library/Documentation 
-mkdir -p $TMPDIR/pkg/Resources 
-
-(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
-       | sed s/{__APPNAME}/$PACKAGE_NAME/g \
-       > $TMPDIR/pkg/Description.plist) 
-(cat $SRCDIR/release/Info.plist.tmpl | sed s/{__VERSION}/$VERSION/g    \
-       | sed s/{__BUILD}/$BUILD/g > $TMPDIR/pkg/Info.plist) 
-(cat $SRCDIR/release/uninstall.sh.tmpl \
-       | sed s/{__APPNAME}/$PACKAGE_NAME/g \
-       > $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall) 
-chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
-
-install -m 644 $SRCDIR/unix/vncviewer/vncviewer.man 
$PKGROOT/opt/$PACKAGE_NAME/man/man1/vncviewer.1
-install -m 644 $SRCDIR/LICENCE.txt 
$PKGROOT/Library/Documentation/$PACKAGE_NAME/
-
-sudo chown -R root:admin $PKGROOT 
-cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf 
$SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/ 
-
-mkdir $TMPDIR/dmg
-$PACKAGEMAKER -build -v -p $TMPDIR/dmg/$PACKAGE_NAME.pkg \
-       -f $PKGROOT -r $TMPDIR/pkg/Resources \
-       -i $TMPDIR/pkg/Info.plist -d $TMPDIR/pkg/Description.plist 
-install -m 644 $SRCDIR/release/uninstall.applescript $TMPDIR 
-sudo osacompile -t APPL -o "$TMPDIR/dmg/Uninstall.app" 
$TMPDIR/uninstall.applescript 
-sudo chown -R $USER "$TMPDIR/dmg/Uninstall.app" 
-hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
-       -srcfolder "$TMPDIR/dmg" \
-       $TMPDIR/$PACKAGE_NAME.dmg 
-cp $TMPDIR/$PACKAGE_NAME.dmg . 
-
-exit

Copied: trunk/release/makemacpkg.in (from rev 4257, trunk/release/makemacpkg)
===================================================================
--- trunk/release/makemacpkg.in                         (rev 0)
+++ trunk/release/makemacpkg.in 2011-02-09 03:10:44 UTC (rev 4265)
@@ -0,0 +1,101 @@
+#!/bin/sh
+
+set -u
+set -e
+trap onexit INT
+trap onexit TERM
+trap onexit EXIT
+
+TMPDIR=
+
+onexit()
+{
+       if [ ! "$TMPDIR" = "" ]; then
+               sudo rm -rf $TMPDIR
+       fi
+}
+
+usage()
+{
+       echo "$0 [universal [32-bit build dir]]"
+       exit 1
+}
+
+UNIVERSAL=0
+
+PACKAGE_NAME=@PACKAGE_NAME@
+VERSION=@VERSION@
+BUILD=@BUILD@
+SRCDIR=@srcdir@
+BUILDDIR32=@srcdir@/osxx86
+if [ $# -gt 0 ]; then
+       if [ "$1" = "universal" ]; then
+               UNIVERSAL=1
+               if [ $# -gt 1 ]; then BUILDDIR32=$2; fi
+       fi
+fi
+PACKAGEMAKER=/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker
+
+if [ -f $PACKAGE_NAME.dmg ]; then
+       rm -f $PACKAGE_NAME.dmg
+fi
+
+umask 022
+TMPDIR=`mktemp -d /tmp/$PACKAGE_NAME-build.XXXXXX`
+PKGROOT=$TMPDIR/pkg/Package_Root
+mkdir -p $PKGROOT/opt/$PACKAGE_NAME/bin
+mkdir -p $PKGROOT/opt/$PACKAGE_NAME/man/man1
+
+install -m 755 unix/vncviewer/vncviewer $PKGROOT/opt/$PACKAGE_NAME/bin/
+
+if [ $UNIVERSAL = 1 ]; then
+       if [ ! -d $BUILDDIR32 ]; then
+               echo ERROR: 32-bit build directory $BUILDDIR32 does not exist
+               exit 1
+       fi
+       if [ ! -f $BUILDDIR32/Makefile ]; then
+               echo ERROR: 32-bit build directory $BUILDDIR32 is not configured
+               exit 1
+       fi
+       pushd $BUILDDIR32
+       make
+       popd
+       lipo -create -arch i386 $BUILDDIR32/unix/vncviewer/vncviewer -arch 
x86_64 \
+               $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer \
+               -output $PKGROOT/opt/$PACKAGE_NAME/bin/vncviewer
+fi
+
+mkdir -p $PKGROOT/Library/Documentation/$PACKAGE_NAME
+chmod 1775 $PKGROOT/Library
+chmod 775 $PKGROOT/Library/Documentation 
+mkdir -p $TMPDIR/pkg/Resources 
+
+(cat $SRCDIR/release/Description.plist.tmpl | sed s/{__VERSION}/$VERSION/g \
+       | sed s/{__APPNAME}/$PACKAGE_NAME/g \
+       > $TMPDIR/pkg/Description.plist) 
+(cat $SRCDIR/release/Info.plist.tmpl | sed s/{__VERSION}/$VERSION/g    \
+       | sed s/{__BUILD}/$BUILD/g > $TMPDIR/pkg/Info.plist) 
+(cat $SRCDIR/release/uninstall.sh.tmpl \
+       | sed s/{__APPNAME}/$PACKAGE_NAME/g \
+       > $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall) 
+chmod 755 $PKGROOT/opt/$PACKAGE_NAME/bin/uninstall
+
+install -m 644 $SRCDIR/unix/vncviewer/vncviewer.man 
$PKGROOT/opt/$PACKAGE_NAME/man/man1/vncviewer.1
+install -m 644 $SRCDIR/LICENCE.txt 
$PKGROOT/Library/Documentation/$PACKAGE_NAME/
+
+sudo chown -R root:admin $PKGROOT 
+cp $SRCDIR/release/License.rtf $SRCDIR/release/Welcome.rtf 
$SRCDIR/release/ReadMe.rtf $TMPDIR/pkg/Resources/ 
+
+mkdir $TMPDIR/dmg
+$PACKAGEMAKER -build -v -p $TMPDIR/dmg/$PACKAGE_NAME.pkg \
+       -f $PKGROOT -r $TMPDIR/pkg/Resources \
+       -i $TMPDIR/pkg/Info.plist -d $TMPDIR/pkg/Description.plist 
+install -m 644 $SRCDIR/release/uninstall.applescript $TMPDIR 
+sudo osacompile -t APPL -o "$TMPDIR/dmg/Uninstall.app" 
$TMPDIR/uninstall.applescript 
+sudo chown -R $USER "$TMPDIR/dmg/Uninstall.app" 
+hdiutil create -fs HFS+ -volname $PACKAGE_NAME-$VERSION \
+       -srcfolder "$TMPDIR/dmg" \
+       $TMPDIR/$PACKAGE_NAME.dmg 
+cp $TMPDIR/$PACKAGE_NAME.dmg . 
+
+exit


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Tigervnc-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tigervnc-commits

Reply via email to