Makefile revision 1438
235N/A###############################################################################
235N/A#
822N/A# TigerVNC (Xvnc server & vncviewer) Makefile
822N/A# Based on Fedora's tigervnc.spec revision 1.20 from
822N/A# http://cvs.fedoraproject.org/viewvc/rpms/tigervnc/devel/tigervnc.spec
235N/A#
1438N/A# Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
235N/A#
235N/A# Permission is hereby granted, free of charge, to any person obtaining a
919N/A# copy of this software and associated documentation files (the "Software"),
919N/A# to deal in the Software without restriction, including without limitation
919N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
919N/A# and/or sell copies of the Software, and to permit persons to whom the
919N/A# Software is furnished to do so, subject to the following conditions:
919N/A#
919N/A# The above copyright notice and this permission notice (including the next
919N/A# paragraph) shall be included in all copies or substantial portions of the
919N/A# Software.
919N/A#
919N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
919N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
919N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
919N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
919N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
919N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
919N/A# DEALINGS IN THE SOFTWARE.
235N/A#
235N/A
235N/A# Package name used in tarballs
822N/AMODULE_NAME=tigervnc
235N/A
970N/A# Package metadata
970N/AUPSTREAM = TigerVNC
970N/AUPSTREAM_URL = http://www.tigervnc.com/
970N/AUPSTREAM_SET = yes
970N/A
970N/AMODULE_LICENSE = GPLv2
970N/AMODULE_LICENSE_SET = yes
1003N/AMODULE_LICENSE_PREPEND = $(GPL_CHOICE_FILE)
1339N/AMODULE_LICENSE_DESC = portions of the TigerVNC software
1360N/AORACLE_TPNO = 9801
970N/A
235N/A# Version number (used in path names)
1252N/AMODULE_VERSION=1.1.0
235N/A
911N/A# Checksums for upstream tarball
1252N/ATARBALL_MD5 = 1a5598b4a2ac530fb51411438959e11e
1252N/ATARBALL_SHA1 = a678745c231a37eea92c7c7c259f7495061a9a0d
911N/A
235N/A# Source tarball
493N/ASOURCE_TARBALL_NAME=$(MODULE_NAME)-$(MODULE_VERSION).tar.gz
493N/ASOURCE_TARBALL_NAME_SET=yes
235N/A
235N/A# Xorg server source tarball to use sources from
235N/AXORG_TARBALL=$(TARBALLDIR)/xorg-server-$(XORGSERVER_VERS).tar.bz2
1422N/AXORG_SOURCE_DIR = $(SOURCE_DIR)/unix/xserver
1422N/AXORG_BUILD_DIR = $(BUILD_DIR)/unix/xserver
235N/A
1124N/A# Java VNCviewer applet for connecting from a web browser
1422N/AJAVA_SOURCE_DIR = $(SOURCE_DIR)/java/src/com/tigervnc
1422N/AJAVA_BUILD_DIR = $(BUILD_DIR)/java/src/com/tigervnc
1124N/A
235N/A# Download site for source
1252N/ASOURCE_URL=$(SF_DOWNLOADS_URL)/tigervnc/tigervnc/1.1.0/$(SOURCE_TARBALL_NAME)
235N/ASOURCE_URL_SET=yes
235N/A
235N/A# Patches to apply to source after unpacking, in order
1351N/ASOURCE_PATCHES += $(SOURCE_DIR)/unix/xserver114.patch,'-p0 -d unix'
1276N/ASOURCE_PATCHES += tigervnc11-xorg111.patch,-p1
1276N/ASOURCE_PATCHES += tigervnc11-xorg112.patch,'-p0 -d unix'
1351N/ASOURCE_PATCHES += tigervnc11-xorg114.patch,'-p0 -d unix'
1276N/ASOURCE_PATCHES += xorg-1.12.1.patch,-p1
1276N/ASOURCE_PATCHES += no-nasm.patch,-p1
1276N/ASOURCE_PATCHES += applet-html.patch
1276N/ASOURCE_PATCHES += icon.patch,-p1
1438N/ASOURCE_PATCHES += jdk-version.patch,-p1
1276N/ASOURCE_PATCHES += solaris-libraries.patch,-p1
1276N/ASOURCE_PATCHES += vnc-nobuildtime.patch,-p1
1276N/ASOURCE_PATCHES += vnc-nohttpd.patch,-p1
1276N/ASOURCE_PATCHES += solaris-port.patch,-p1
1276N/ASOURCE_PATCHES += solaris-audit.patch,-p1
1379N/ASOURCE_PATCHES += 17950657.patch,-p1
235N/A
1124N/A# Need to regenerate autoconf/automake files after patching
1124N/AAUTORECONF=yes
1124N/A
1422N/A# TigerVNC 1.1 doesn't fully support out-of-tree builds, so clone the source
1422N/ACLONE_SRC = yes
1422N/A
1389N/A# Disable parfait build with 1.3 - 17759056
1389N/AUSE_PARFAIT=no
1389N/A
970N/A# ARC cases that covered this module
970N/A# PSARC/2007/545 Xvnc
970N/AMODULE_ARC_CASES = PSARC/2007/545
970N/A# LSARC/2007/625 vncviewer
970N/AMODULE_ARC_CASES += LSARC/2007/625
970N/A# PSARC/2009/592 TigerVNC 1.0
970N/AMODULE_ARC_CASES += PSARC/2009/592
947N/A
235N/A# Man pages to apply Sun footer to & attributes to list
247N/ASUNTOUCHED_MANPAGES= \
947N/A unix/xserver/hw/vnc/Xvnc.man unix/vncviewer/vncviewer.man \
235N/A unix/vncconfig/vncconfig.man unix/vncpasswd/vncpasswd.man \
247N/A unix/vncserver.man unix/x0vncserver/x0vncserver.man
947N/AMODULE_STABILITY = Volatile
947N/A
970N/A# Additional pkg(5) package name used for vncviewer package
970N/AVNCVIEWER_PKGNAME=desktop/remote-desktop/$(MODULE_NAME)
947N/A
947N/A# Override specific attributes for specific man pages
947N/AMODULE_SUNTOUCH_MAN_FLAGS= \
947N/A $(SUNTOUCH_MAN_FLAGS_$(@F:%.man.$(FIXED_MAN_SUFFIX)=%))
947N/ASUNTOUCH_MAN_FLAGS_vncviewer = -o '{Availability, $(VNCVIEWER_PKGNAME)}' \
947N/A -o '{Interface Stability, Path: Committed, Options: Volatile}'
235N/A
241N/A# Compiler to use
493N/AMODULE_COMPILER=suncc
493N/AMODULE_COMPILER_SET=yes
235N/A
1270N/A# Make command to use
1270N/AMODULE_MAKE=$(GNUMAKE)
1270N/AMODULE_MAKE_SET=yes
1270N/A
493N/A# Xvnc has to configure, build, and install in different directories due to
493N/A# the mixed codebases and unusual directory layout
1124N/A$(NO_RECURSE)MODULE_ADD_SOURCE_TARGETS = Xvnc_source_init
963N/A$(NO_RECURSE)MODULE_SOURCE_DEPS = Xvnc_source_init
1124N/A$(NO_RECURSE)ADDITIONAL_SOURCE_DIR = sun-src
1124N/AMODULE_ADD_CONFIGURE_TARGETS = $(XORG_BUILD_DIR)/Makefile
1097N/ABUILD_TARGETS=Xvnc_build set-elf-comments java_build
493N/ABUILD_TARGETS_SET=yes
1097N/AINSTALL_TARGETS=Xvnc_install_server Xvnc_install_programs \
1097N/A java_install Xvnc_install_data install_fix_paths
493N/AINSTALL_TARGETS_SET=yes
235N/A
1124N/A# Environment variable options to GNU autoconf configure script
1124N/A# Have to remove CFLAGS entries from default LDFLAGS to avoid conflicts
1124N/A# with the C++ compiler we use instead
1124N/AMODULE_CONFIG_ENV = \
1124N/A LDFLAGS="$(DEFAULT_CONFIG_LDFLAGS) $(MODTYPE_LDFLAGS) $(MODULE_LDFLAGS)"
1124N/A
1124N/A# Command line options to GNU autoconf configure script for vnc clients
1124N/AMODULE_CONFIG_OPTS = --with-installed-zlib --with-system-jpeg --without-simd
1124N/AMODULE_CONFIG_OPTS += --libdir='$${exec_prefix}/lib/vnc'
1124N/A
970N/A# Compatibility links from /usr/X11/bin to /usr/bin
970N/AMODULE_X11_BINCOMPAT_LINKS = Xvnc
970N/A
1097N/A# Binaries that were linked to isaexec on x86 to choose 32-bit or 64-bit,
1097N/A# now just symlinks from amd64 to parent directory
1097N/ALINKED_TO_ISAEXEC = Xvnc
1030N/A
822N/Ainclude ../Makefile.inc
235N/A
235N/A# Merge in additional sources from Xorg tarball & sun-src directory
822N/A# This step has to be done before default_source, so that patches applied
822N/A# in that step work correctly.
1422N/A$(NO_RECURSE)XORG_SOURCE_INIT_TARGET = $(XORG_SOURCE_DIR)/$(SOURCE_INIT_TARGET_FILE)
1422N/A$(NO_RECURSE)XORG_PATCHED_TARGET = $(XORG_SOURCE_DIR)/$(PATCHED_TARGET_FILE)
935N/AXvnc_source_init: $(XORG_PATCHED_TARGET)
935N/A
935N/A$(XORG_TARBALL):
935N/A (cd ../xorg && $(MAKE) $(MAKEFLAGS) download)
935N/A
1088N/A$(XORG_SOURCE_INIT_TARGET): $(XORG_TARBALL)
235N/A mkdir -p $(SOURCE_DIR)/unix
935N/A $(MAKE) $(MAKEFLAGS) init_source \
963N/A NO_RECURSE="$(POUND_SIGN)" \
963N/A BUILD_TYPE="$(BUILD_TYPE)" \
935N/A SOURCE_TARBALL="$(XORG_TARBALL)" \
963N/A SOURCE_DEPS="$(XORG_TARBALL)" \
1422N/A SOURCE_DIR="$(XORG_SOURCE_DIR)" \
1422N/A BUILD_DIR="$(XORG_BUILD_DIR)"
1422N/A (cd $(XORG_SOURCE_DIR) && $(LNDIR) ../../../../xorg/sun-src)
963N/A touch $(XORG_SOURCE_INIT_TARGET)
235N/A
935N/A$(XORG_PATCHED_TARGET): $(XORG_SOURCE_INIT_TARGET)
935N/A $(MAKE) $(MAKEFLAGS) patched_source \
963N/A NO_RECURSE="$(POUND_SIGN)" \
963N/A BUILD_TYPE="$(BUILD_TYPE)" \
935N/A SOURCE_PATCHES="$(XORG_SOURCE_PATCHES:%=../xorg/%)" \
1422N/A SOURCE_DIR="$(XORG_SOURCE_DIR)" \
1422N/A BUILD_DIR="$(XORG_BUILD_DIR)" \
963N/A XORG_BUILD_DIR="$(XORG_BUILD_DIR)"
1422N/A (cd $(SOURCE_DIR) && $(LNDIR) ../sun-src)
963N/A touch $(XORG_PATCHED_TARGET)
235N/A
493N/A# Command line options to GNU autoconf configure script for Xvnc
1252N/AXVNC_CONFIG_OPTS = $(DEFAULT_CONFIG_OPTS) $(XSERVER_CONFIG_OPTS)
1252N/A# Disable all the things we don't need in the Xvnc build since we
1252N/A# get them in the normal Xorg build instead
1252N/AXVNC_CONFIG_OPTS += --disable-builddocs --disable-xfree86-utils
1252N/AXVNC_CONFIG_OPTS += --disable-xorg --disable-xnest --disable-xvfb --disable-dmx
1252N/AXVNC_CONFIG_OPTS += --disable-xwin --disable-xephyr --disable-kdrive
1252N/A# Disable building Xorg hardware device support that Xvnc can't use
1252N/AXVNC_CONFIG_OPTS += --without-int10 --disable-config-hal --disable-dga
1252N/A# The X server unit tests currently depend on the Xorg ddx being built
1252N/AXVNC_CONFIG_OPTS += --disable-unit-tests
822N/A
1296N/A# Workaround libtool dropping -R paths
1296N/AMODULE_LDFLAGS += -Wl,-R,$(X11_SERVERLIBS_DIR)$(ARCHLIBSUBDIR)
1296N/A
493N/AMODULE_CPPFLAGS = \
822N/A -D_XOPEN_SOURCE=500 -D__EXTENSIONS__ \
241N/A -D__extension__=\"\" \
235N/A -I$(PWD)/$(SOURCE_DIR)/common \
1351N/A -I$(PWD)/$(SOURCE_DIR)/unix/vncconfig \
1351N/A -I$(PWD)/$(SOURCE_DIR)/unix/xserver/miext/damage \
235N/A
493N/ACFLAGS_gcc += -fPIC
235N/A
606N/A# Needed by unix/xorg-x11-server-source/hw/vnc/Makefile.am to find libpixman
606N/A# headers in proto area after solaris-port.patch is applied
606N/AMODULE_MAKEFLAGS = PROTODIR=$(PROTODIR)
606N/A
235N/A# Run configure script for Xvnc
1422N/A$(XORG_BUILD_DIR)/Makefile: $(SOURCE_TARGETS) $(BUILD_DIR)
235N/A (cd $(XORG_BUILD_DIR) && \
599N/A $(AUTORECONF_ENV) autoreconf --install --force && \
1124N/A $(CONFIG_ENV) $(CONFIG_SHELL) ./configure $(XVNC_CONFIG_OPTS) )
235N/A
822N/AXvnc_build: $(CONFIGURE_TARGETS)
1147N/A $(PERL) -i -p -e 's{/usr/bin/env perl}{$(PERL)}' \
1147N/A $(SOURCE_DIR)/unix/vncserver
1422N/A $(DEFAULT_BUILD_COMMAND:@DIR@=$(BUILD_DIR))
1422N/A $(DEFAULT_BUILD_COMMAND:@DIR@=$(XORG_BUILD_DIR))
235N/A
1030N/AXvnc_install_server: $(BUILD_TARGETS)
235N/A (cd $(XORG_BUILD_DIR)/hw/vnc \
606N/A && $(BUILD_ENV) $(MAKE) $(MAKEFLAGS) $(DEFAULT_INSTALL_MAKEFLAGS) \
606N/A CPPROG="cp -p" install)
1097N/A rm -f $(PROTODIR)/$(X11_SERVERMODS_DIR)/extensions/libvnc.so
822N/A
822N/AXvnc_install_programs: $(BUILD_TARGETS)
1030N/A mkdir -p $(PROTODIR)/usr/bin/$(ARCHBINSUBDIR)
1422N/A $(INSTALL_SCRIPT) -m 0755 $(BUILD_DIR)/unix/vncserver \
1422N/A $(BUILD_DIR)/unix/vncpasswd/vncpasswd \
1422N/A $(BUILD_DIR)/unix/vncconfig/vncconfig \
1422N/A $(BUILD_DIR)/unix/vncviewer/vncviewer \
1422N/A $(BUILD_DIR)/unix/x0vncserver/x0vncserver \
1019N/A $(PROTODIR)/usr/bin/$(ARCHBINSUBDIR)
1030N/A
1030N/AXvnc_install_data: $(SOURCE_TARGETS)
1030N/A mkdir -p $(PROTODIR)/usr/share/man/man1 \
1030N/A $(PROTODIR)$(SMF_MANIFEST_DIR)/application/x11
963N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncserver.man \
235N/A $(PROTODIR)/usr/share/man/man1/vncserver.1
963N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncconfig/vncconfig.man \
235N/A $(PROTODIR)/usr/share/man/man1/vncconfig.1
963N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncpasswd/vncpasswd.man \
235N/A $(PROTODIR)/usr/share/man/man1/vncpasswd.1
963N/A $(INSTALL_SCRIPT) -m 0444 $(SOURCE_DIR)/unix/vncviewer/vncviewer.man \
247N/A $(PROTODIR)/usr/share/man/man1/vncviewer.1
963N/A $(INSTALL_SCRIPT) -m 0444 \
963N/A $(SOURCE_DIR)/unix/x0vncserver/x0vncserver.man \
822N/A $(PROTODIR)/usr/share/man/man1/x0vncserver.1
963N/A $(INSTALL_SCRIPT) -m 0444 xvnc-inetd.xml \
980N/A $(PROTODIR)$(SMF_MANIFEST_DIR)/application/x11/
822N/A
822N/A# Java VNCviewer applet for connecting from a web browser
822N/AJAVA_INSTALL_DIR = $(PROTODIR)/usr/share/vnc/classes
1422N/AJAVA_JAR_FILE = $(JAVA_BUILD_DIR)/vncviewer/VncViewer.jar
822N/A
822N/Ajava_build: $(JAVA_JAR_FILE)
822N/A
1422N/A$(JAVA_JAR_FILE): $(SOURCE_TARGETS) $(BUILD_DIR)
1422N/A $(DEFAULT_BUILD_COMMAND:@DIR@=$(JAVA_BUILD_DIR)/decoder)
1422N/A $(DEFAULT_BUILD_COMMAND:@DIR@=$(JAVA_BUILD_DIR)/vncviewer)
822N/A
822N/Ajava_install: $(JAVA_JAR_FILE)
822N/A -rm -rf $(JAVA_INSTALL_DIR)
822N/A mkdir -p $(JAVA_INSTALL_DIR)
1422N/A $(DEFAULT_INSTALL_COMMAND:@DIR@=$(JAVA_BUILD_DIR)/vncviewer) \
1422N/A install INSTALL_DIR=$(JAVA_INSTALL_DIR)
1422N/A $(INSTALL_SCRIPT) -m 0444 $(JAVA_SOURCE_DIR)/vncviewer/README \
1422N/A $(JAVA_SOURCE_DIR)/vncviewer/LICENCE.TXT \
822N/A $(JAVA_INSTALL_DIR)
963N/A chmod a+x $(JAVA_INSTALL_DIR)/VncViewer.jar
1124N/A rm -f $(JAVA_INSTALL_DIR)/*.class
970N/A
970N/A# Metadata for vncviewer package
970N/AVNCVIEWER_PKG_METADATA_DIR = $(PROTOMETA)/desktop-remote-desktop-tigervnc
970N/AVNCVIEWER_PKG_ATTRDATA_FILE = $(VNCVIEWER_PKG_METADATA_DIR)/$(ATTRDATA_FILE_NAME)
970N/AVNCVIEWER_PKG_LICENSE_FILE = $(VNCVIEWER_PKG_METADATA_DIR)/$(LICENSE_FILE_NAME)
970N/AVNCVIEWER_METADATA_TARGETS = \
970N/A $(VNCVIEWER_PKG_METADATA_DIR) \
970N/A $(VNCVIEWER_PKG_ATTRDATA_FILE) \
970N/A $(VNCVIEWER_PKG_LICENSE_FILE)
970N/A
970N/Ainstall_metadata: $(VNCVIEWER_METADATA_TARGETS)
970N/A
970N/A$(VNCVIEWER_PKG_METADATA_DIR):
970N/A mkdir -p $@
970N/A
970N/A$(VNCVIEWER_PKG_ATTRDATA_FILE) $(VNCVIEWER_PKG_LICENSE_FILE): $(VNCVIEWER_PKG_METADATA_DIR)