0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# CDDL HEADER START
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
83a28ca274521e15086fc39febde507bcc4e145eMark Andrews# See the License for the specific language governing permissions
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# and limitations under the License.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# When distributing Covered Code, include this CDDL HEADER in each
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# If applicable, add the following below this CDDL HEADER, with the
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# fields enclosed by brackets "[]" replaced with your own identifying
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER END
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# While the tree currently builds with Studio, we need to make sure it also
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# builds with gcc when submitting patches upstream, and having both sets of
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# options in the CFLAGS below makes it easy to switch when needed.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# COMPILER=gcc
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PROJECT_URL= https://www.jwz.org/xscreensaver/
938440694b33cd752e9e4b71a526368b4811c177Tinderbox User sha256:6fff7ec4be743e5c042647ea9687dd0cdf48d1dd5e8e15098e5018bbd02e5e27
19c7b1a0293498a3e36692c59646ed6e15ffc8d0Tinderbox UserCOMPONENT_ARCHIVE_URL= https://www.jwz.org/xscreensaver/$(COMPONENT_ARCHIVE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Needs older version of libpng, no longer available in evaluation builds.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Enable additional warnings, since we've modified this code a lot
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Additional optimization flags, to make the hacks show off the hardware
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# better and because for just a screensaver display we can get away with
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# using optimizations that may change strict correctness of floating point ops.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCFLAGS.studio += -fsimple=2 -nofstore -xlibmil -xprefetch
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Fix 64-bit linking; compiler is used for the linking.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Regenerate configure after patches modify configure.in; the automake -af
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# forces the update of the standard automake files that autoreconf will not
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# update because Makefile.am does not exist. This is needed to ensure we have
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# a recent version of config.guess, etc. used for configure; the | true is
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews# because automake will exit with an error because Makefile.am does not exist,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# but it will update the required files.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PREP_ACTION += (cd $(@D); autoreconf -fiv; automake -af | true)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Need to pick up the GNU version of xgettext.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Libraries & programs to depend on
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += PTHREAD_CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# X extensions to support
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --with-xinput-ext # required for accessibility
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Support locking the screen by normal users and by root
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# and allow user switching from the lock screen with gdmflexiserver
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Use only PAM, not direct /etc/shadow or kerberos access
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Paths to install to
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinAPP_DEFAULTS_DIR = $(CONFIGURE_PREFIX)/share/X11/app-defaults
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinXSS_LIBDIR = $(CONFIGURE_PREFIX)/lib/xscreensaver
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --libexecdir=$(XSS_LIBDIR)/bin
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --with-hackdir=$(XSS_LIBDIR)/hacks
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --with-configdir=$(XSS_LIBDIR)/config/control-center-2.0
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --with-x-app-defaults=$(APP_DEFAULTS_DIR)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Data sources for images & text in hacks
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS += --with-image-directory=$(USRSHAREDIR)/backgrounds
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Do not install setuid hacks
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# The potfiles.in updates don't work unless source is cloned to build dir
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_PRE_CONFIGURE_ACTION += ($(CLONEY) $(SOURCE_DIR) $(@D));
30eec077db2bdcb6f2a0dc388a3cdde2ede75ec1Mark Andrews# Update potfiles.in to pick up our added sources like lock-Gtk.c
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# The "-o Makefile" & touch stamp-it is needed to avoid infinite looping.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Recognizing DESTDIR as most autotools packages do would be too easy,
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# so xscreensaver makes us override install_prefix instead for the same effect.
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCOMPONENT_INSTALL_ARGS += install_prefix=$(PROTO_DIR)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Remove hacks we've chosen not to ship at all for various reasons
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREMOVED_HACKS="extrusion flyingtoasters ljlatest sonar webcollage"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein $(PROTO_DIR)$(XSS_LIBDIR)/config/control-center-2.0/$${h}.xml ;\
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinrm -f $(PROTO_DIR)$(XSS_LIBDIR)/hacks/webcollage-helper );
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Adjust '#!/usr/bin/perl'