Makefile revision 1351
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames###############################################################################
5ad238c42b1e159ee8f164515e0c4ee6c727c2fdtrawick# TigerVNC (Xvnc server & vncviewer) Makefile
5ad238c42b1e159ee8f164515e0c4ee6c727c2fdtrawick# Based on Fedora's tigervnc.spec revision 1.20 from
5ad238c42b1e159ee8f164515e0c4ee6c727c2fdtrawick# http://cvs.fedoraproject.org/viewvc/rpms/tigervnc/devel/tigervnc.spec
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# Permission is hereby granted, free of charge, to any person obtaining a
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# copy of this software and associated documentation files (the "Software"),
ba00c3b7c20f00ce631b89ae3b1cd3bae8d1b165rbb# to deal in the Software without restriction, including without limitation
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# the rights to use, copy, modify, merge, publish, distribute, sublicense,
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# and/or sell copies of the Software, and to permit persons to whom the
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# Software is furnished to do so, subject to the following conditions:
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# The above copyright notice and this permission notice (including the next
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# paragraph) shall be included in all copies or substantial portions of the
6e954603b02f2b7d4ad80af17d9b3cc6f0bacf69rbb# Software.
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
fa449f5bc87c5d87c4c60e778c9c882e7254de7ejwoolley# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1c0b7c3bdace07946457fa7ba04b7f97b6599792rbb# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley# DEALINGS IN THE SOFTWARE.
227d23a7db41dd89f52391c9356dbb1adcd675e0jwoolley# Package name used in tarballs
1c0b7c3bdace07946457fa7ba04b7f97b6599792rbb# Package metadata
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbb# Version number (used in path names)
e6cc28a5eb3371ba0c38e941855e71ff0054f50erbb# Checksums for upstream tarball
cf233fb4b439415a2bf7bab7e622afd994e0bebftrawickTARBALL_SHA1 = a678745c231a37eea92c7c7c259f7495061a9a0d
cf233fb4b439415a2bf7bab7e622afd994e0bebftrawick# Source tarball
ae64f3e7385f21ca9d4f30cc7f8702a9ac1034b6trawickSOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames# Xorg server source tarball to use sources from
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesXORG_SOURCE_DIR=$(BUILD_DIR)/xorg-server-$(XORGSERVER_VERS)
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames# Java VNCviewer applet for connecting from a web browser
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregamesJAVA_SOURCE_DIR = $(SOURCE_DIR)/java/src/com/tigervnc/vncviewer
2a20a2f8432a15b530e0a6b0998c32f40aef82a8gregames# Download site for source
8d49090fd56a8ce06c7f7135f19e5ff8e24b5ff3gregamesSOURCE_URL=$(SF_DOWNLOADS_URL)/tigervnc/tigervnc/1.1.0/$(SOURCE_TARBALL_NAME)
270609308f247c5e934b400b5f1691c2cca16c61jerenkrantz# Patches to apply to source after unpacking, in order
270609308f247c5e934b400b5f1691c2cca16c61jerenkrantzSOURCE_PATCHES += $(SOURCE_DIR)/unix/xserver114.patch,'-p0 -d unix'
8458877c9ba0af86acd590eea531476adde3d02dmartinSOURCE_PATCHES += tigervnc11-xorg112.patch,'-p0 -d unix'
8458877c9ba0af86acd590eea531476adde3d02dmartinSOURCE_PATCHES += tigervnc11-xorg114.patch,'-p0 -d unix'
c4fbc4018fd2b6716673a38ee27eeb36cba41c5djwoolley# Need to regenerate autoconf/automake files after patching
f4e4643c309e5b5da60e13f9a25984d54b307caawrowe# ARC cases that covered this module
f4e4643c309e5b5da60e13f9a25984d54b307caawrowe# PSARC/2007/545 Xvnc
2548497d480c4f3e9b3fe14711bd510aa2157434gregames# LSARC/2007/625 vncviewer
2548497d480c4f3e9b3fe14711bd510aa2157434gregames# PSARC/2009/592 TigerVNC 1.0
da6e93dca0222159650783802e23172e3160605egregames# Man pages to apply Sun footer to & attributes to list
da6e93dca0222159650783802e23172e3160605egregames unix/xserver/hw/vnc/Xvnc.man unix/vncviewer/vncviewer.man \
c927e13f298c42251296d33cc1fa3eb8232b843daaron unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
c927e13f298c42251296d33cc1fa3eb8232b843daaron# Additional pkg(5) package name used for vncviewer package
9126ed10455a2a98a3a51c68ed1b356e1873e8e6aaronVNCVIEWER_PKGNAME=desktop/remote-desktop/$(MODULE_NAME)
9126ed10455a2a98a3a51c68ed1b356e1873e8e6aaron# Override specific attributes for specific man pages
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawick $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawickSUNTOUCH_MAN_FLAGS_vncviewer = -o '{Availability, $(VNCVIEWER_PKGNAME)}' \
fa3ca21e09bac0dbc2045e9f53963ba46cfed5b1trawick -o '{Interface Stability, Path: Committed, Options: Volatile}'
18acb2c0df442ead1d075a1a2207cbb197725b14coar# Compiler to use
617f972690d850a52cd4e9ef2f32d356e0fae715aaron# Make command to use
617f972690d850a52cd4e9ef2f32d356e0fae715aaron# Xvnc has to configure, build, and install in different directories due to
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolley# the mixed codebases and unusual directory layout
9278d5393ef084f4fc6d7ec8641af5959442c157jwoolley$(NO_RECURSE)MODULE_ADD_SOURCE_TARGETS = Xvnc_source_init
022cff78006f698453640e0a0e97cc5f8c9de59drbbMODULE_ADD_CONFIGURE_TARGETS = $(XORG_BUILD_DIR)/Makefile
526a776292f420ffeea0d081c61971ed381fad20stoddardINSTALL_TARGETS=Xvnc_install_server Xvnc_install_programs \
526a776292f420ffeea0d081c61971ed381fad20stoddard# Environment variable options to GNU autoconf configure script
526a776292f420ffeea0d081c61971ed381fad20stoddard# Have to remove CFLAGS entries from default LDFLAGS to avoid conflicts
526a776292f420ffeea0d081c61971ed381fad20stoddard# with the C++ compiler we use instead
526a776292f420ffeea0d081c61971ed381fad20stoddard LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_LDFLAGS)"
526a776292f420ffeea0d081c61971ed381fad20stoddard# Command line options to GNU autoconf configure script for vnc clients
452d2fd15cebd2da9331d5d765558a60b488c1a9rbbMODULE_CONFIG_OPTS = --with-installed-zlib --with-system-jpeg --without-simd
62ddc9851530478919d169ba9c34b80f60cf7718trawickMODULE_CONFIG_OPTS += --libdir='$${exec_prefix}/lib/vnc'
904d7bf799c6216beb34519463596b4fce630308wrowe# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
904d7bf799c6216beb34519463596b4fce630308wrowe# now just symlinks from amd64 to parent directory
904d7bf799c6216beb34519463596b4fce630308wrowe# Merge in additional sources from Xorg tarball & sun-src directory
904d7bf799c6216beb34519463596b4fce630308wrowe# This step has to be done before default_source, so that patches applied
904d7bf799c6216beb34519463596b4fce630308wrowe# in that step work correctly.
17a4c6968b2fa692ff4dde12fe305230ee6b0421aaron$(NO_RECURSE)XORG_SOURCE_INIT_TARGET = $(XORG_BUILD_DIR)/$(SOURCE_INIT_TARGET_FILE)
17a4c6968b2fa692ff4dde12fe305230ee6b0421aaron$(NO_RECURSE)XORG_PATCHED_TARGET = $(XORG_BUILD_DIR)/$(PATCHED_TARGET_FILE)
b900452c9c36031434d318880f023c0fb9143325rbb (cd $(XORG_BUILD_DIR) && $(LNDIR) ../../../../../xorg/sun-src)
8b91dcac0e1ef7796c72d16b0962267313cac486jerenkrantz# Command line options to GNU autoconf configure script for Xvnc
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS)
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# Disable all the things we don't need in the Xvnc build since we
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# get them in the normal Xorg build instead
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweXVNC_CONFIG_OPTS += --disable-builddocs --disable-xfree86-utils
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweXVNC_CONFIG_OPTS += --disable-xorg --disable-xnest --disable-xvfb --disable-dmx
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweXVNC_CONFIG_OPTS += --disable-xwin --disable-xephyr --disable-kdrive
6ce942b017db75b559a42bdc2d7b8ea9e869a956wrowe# Disable building Xorg hardware device support that Xvnc can't use
6ce942b017db75b559a42bdc2d7b8ea9e869a956wroweXVNC_CONFIG_OPTS += --without-int10 --disable-config-hal --disable-dga
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb# The X server unit tests currently depend on the Xorg ddx being built
7dfed2b71c9c4223996cbd7c5c0c85c7c8fef2a4rbb# Workaround libtool dropping -R paths
574f6ff9ee80ef4f772649c5c8319b764a8abe42jerenkrantzMODULE_LDFLAGS += -Wl,-R,$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
22a25f3393393b781e214f4abef17950bcb8bbe3jerenkrantz -I$(PWD)/$(SOURCE_DIR)/unix/xserver/miext/damage \
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# Needed by unix/xorg-x11-server-source/hw/vnc/Makefile.am to find libpixman
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# headers in proto area after solaris-port.patch is applied
a310497ca9c5112d759871e1b7d9f6a40fb78bcfwrowe# Run configure script for Xvnc
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb $(CONFIG_ENV) $(CONFIG_SHELL) ./configure $(XVNC_CONFIG_OPTS) )
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
e36ef0d081aa59867688bcbb3da65952ec16fae3rbb $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
52df98b165194a0ad68885f49f81fdaf56ece568wrowe && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
2c294c31addd5c957bafe6e78c4a30d423ad6e80rbb rm -f $(PROTODIR)/$(X11_SERVERMODS_DIR)/extensions/libvnc.so
7e44dd5082cd865068285e8f915bb5f045e0bb80lars $(INSTALL_SCRIPT) -m 0755 $(SOURCE_DIR)/unix/vncserver \
e379fc6d7f79163700290d92ce75deb4f3005301jerenkrantz $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncserver.man \
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantz $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncconfig/vncconfig.man \
978faa9e29e0f0c42e66c07240e562325a4717b0jerenkrantz $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncpasswd/vncpasswd.man \
976501adbc040220270f7d1d77c4b8373033be69wrowe $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncviewer/vncviewer.man \
10a00688adcf1df367b1243810beedaabe6b1abeminfrin# Java VNCviewer applet for connecting from a web browser
9d41fafe32b324c197f25224207fc6ce34f085bfrbb $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
9d41fafe32b324c197f25224207fc6ce34f085bfrbb $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS))
8c83461e53ca7d204e1d634f0c78199d60320d7bjerenkrantz $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_BUILD_MAKEFLAGS) \
8c83461e53ca7d204e1d634f0c78199d60320d7bjerenkrantz $(INSTALL_SCRIPT) -m 0444 $(JAVA_SOURCE_DIR)/README \
798c7c11dc2fe3b08e591e9c76fc1a84857f2cd4jerenkrantz# Metadata for vncviewer package
798c7c11dc2fe3b08e591e9c76fc1a84857f2cd4jerenkrantzVNCVIEWER_PKG_METADATA_DIR = $(PROTOMETA)/desktop-remote-desktop-tigervnc
798c7c11dc2fe3b08e591e9c76fc1a84857f2cd4jerenkrantzVNCVIEWER_PKG_ATTRDATA_FILE = $(VNCVIEWER_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
798c7c11dc2fe3b08e591e9c76fc1a84857f2cd4jerenkrantzVNCVIEWER_PKG_LICENSE_FILE = $(VNCVIEWER_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)