Makefile revision 5680
5398N/A#
5398N/A# CDDL HEADER START
5398N/A#
5398N/A# The contents of this file are subject to the terms of the
5398N/A# Common Development and Distribution License (the "License").
5398N/A# You may not use this file except in compliance with the License.
5398N/A#
5398N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5398N/A# or http://www.opensolaris.org/os/licensing.
5398N/A# See the License for the specific language governing permissions
5398N/A# and limitations under the License.
5398N/A#
5398N/A# When distributing Covered Code, include this CDDL HEADER in each
5398N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5398N/A# If applicable, add the following below this CDDL HEADER, with the
5398N/A# fields enclosed by brackets "[]" replaced with your own identifying
5398N/A# information: Portions Copyright [yyyy] [name of copyright owner]
5398N/A#
5398N/A# CDDL HEADER END
5398N/A#
5398N/A
5398N/A#
5398N/A# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
5398N/A#
5680N/ABUILD_BITS=64
5680N/A# While the tree currently builds with Studio, we need to make sure it also
5680N/A# builds with gcc when submitting patches upstream, and having both sets of
5680N/A# options in the CFLAGS below makes it easy to switch when needed.
5680N/A# COMPILER=gcc
5398N/Ainclude ../../../make-rules/shared-macros.mk
5398N/A
5398N/ACOMPONENT_NAME= xscreensaver
5559N/ACOMPONENT_VERSION= 5.34
5398N/ACOMPONENT_PROJECT_URL= https://www.jwz.org/xscreensaver/
5398N/ACOMPONENT_ARCHIVE_HASH= \
5559N/A sha256:6fff7ec4be743e5c042647ea9687dd0cdf48d1dd5e8e15098e5018bbd02e5e27
5559N/ACOMPONENT_ARCHIVE_URL= https://www.jwz.org/xscreensaver/$(COMPONENT_ARCHIVE)
5398N/ACOMPONENT_BUGDB= gnome/screensaver
5398N/A
5559N/ATPNO= 26341
5398N/A
5680N/ATEST_TARGET = $(NO_TESTS)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
5398N/A
5398N/A# Enable additional warnings, since we've modified this code a lot
5398N/ACFLAGS.studio += -v
5398N/ACFLAGS.gcc += -Wall
5398N/A
5398N/A# Additional optimization flags, to make the hacks show off the hardware
5398N/A# better and because for just a screensaver display we can get away with
5398N/A# using optimizations that may change strict correctness of floating point ops.
5398N/ACFLAGS.studio += -fsimple=2 -nofstore -xlibmil -xprefetch
5398N/ACFLAGS.gcc += -funsafe-math-optimizations
5398N/A
5680N/A# Fix 64-bit linking; compiler is used for the linking.
5680N/ALDFLAGS += $(CC_BITS)
5680N/A
5680N/A# Regenerate configure after patches modify configure.in; the automake -af
5680N/A# forces the update of the standard automake files that autoreconf will not
5680N/A# update because Makefile.am does not exist. This is needed to ensure we have
5680N/A# a recent version of config.guess, etc. used for configure; the | true is
5680N/A# because automake will exit with an error because Makefile.am does not exist,
5680N/A# but it will update the required files.
5680N/ACOMPONENT_PREP_ACTION += (cd $(@D); autoreconf -fiv; automake -af | true)
5398N/A
5398N/A# Need to pick up the GNU version of xgettext.
5680N/APATH=$(GNUBIN):$(USRBINDIR)
5398N/A
5398N/A# Libraries & programs to depend on
5398N/ACONFIGURE_OPTIONS += --with-gl=$(USRDIR)
5398N/ACONFIGURE_OPTIONS += --with-gtk=$(USRDIR)
5398N/ACONFIGURE_OPTIONS += --with-jpeg=$(USRDIR)
5398N/ACONFIGURE_OPTIONS += --without-motif
5398N/ACONFIGURE_OPTIONS += --with-pixbuf=$(USRDIR)
5398N/ACONFIGURE_OPTIONS += --with-xft=$(USRDIR)
5398N/ACONFIGURE_OPTIONS += PTHREAD_CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
5398N/ACONFIGURE_OPTIONS += PTHREAD_LIBS="-lc"
5636N/ACONFIGURE_OPTIONS += PERL=$(PERL.5.12)
5636N/ACONFIGURE_OPTIONS += INTLTOOL_PERL=$(PERL.5.12)
5398N/A
5398N/A# X extensions to support
5398N/ACONFIGURE_OPTIONS += --with-dpms-ext
5398N/ACONFIGURE_OPTIONS += --with-randr-ext
5398N/ACONFIGURE_OPTIONS += --with-xinerama-ext
5398N/ACONFIGURE_OPTIONS += --with-xinput-ext # required for accessibility
5398N/A
5398N/A# Support locking the screen by normal users and by root
5398N/ACONFIGURE_OPTIONS += --enable-locking
5398N/ACONFIGURE_OPTIONS += --enable-root-passwd
5398N/A# and allow user switching from the lock screen with gdmflexiserver
5398N/ACONFIGURE_OPTIONS += --with-login-manager
5398N/A
5398N/A# Use only PAM, not direct /etc/shadow or kerberos access
5398N/ACONFIGURE_OPTIONS += --with-pam=$(USRDIR)
5398N/ACONFIGURE_OPTIONS += --without-shadow
5398N/ACONFIGURE_OPTIONS += --without-kerberos
5398N/A
5398N/A# Paths to install to
5398N/AAPP_DEFAULTS_DIR = $(CONFIGURE_PREFIX)/share/X11/app-defaults
5398N/AXSS_LIBDIR = $(CONFIGURE_PREFIX)/lib/xscreensaver
5398N/ACONFIGURE_OPTIONS += --libexecdir=$(XSS_LIBDIR)/bin
5398N/ACONFIGURE_OPTIONS += --with-hackdir=$(XSS_LIBDIR)/hacks
5398N/ACONFIGURE_OPTIONS += --with-configdir=$(XSS_LIBDIR)/config/control-center-2.0
5398N/ACONFIGURE_OPTIONS += --with-x-app-defaults=$(APP_DEFAULTS_DIR)
5398N/A
5398N/A# Data sources for images & text in hacks
5398N/ACONFIGURE_OPTIONS += --with-image-directory=$(USRSHAREDIR)/pixmaps/backgrounds
5398N/ACONFIGURE_OPTIONS += --with-text-file=/etc/motd
5398N/A
5398N/A# Do not install setuid hacks
5398N/ACONFIGURE_OPTIONS += --without-setuid-hacks
5398N/A
5398N/A# The potfiles.in updates don't work unless source is cloned to build dir
5398N/ACOMPONENT_PRE_CONFIGURE_ACTION += ($(CLONEY) $(SOURCE_DIR) $(@D));
5398N/A
5398N/A# Update potfiles.in to pick up our added sources like lock-Gtk.c
5398N/A# The "-o Makefile" & touch stamp-it is needed to avoid infinite looping.
5398N/ACOMPONENT_POST_CONFIGURE_ACTION += ( \
5398N/A cd $(@D)/po ; \
5398N/A $(MAKE) -o Makefile generate_potfiles_in ; \
5398N/A $(MAKE) -o Makefile POTFILES ; \
5398N/A $(MAKE) -o Makefile xscreensaver.pot ; \
5398N/A touch stamp-it )
5398N/A
5398N/A# Recognizing DESTDIR as most autotools packages do would be too easy,
5398N/A# so xscreensaver makes us override install_prefix instead for the same effect.
5398N/ACOMPONENT_INSTALL_ARGS += install_prefix=$(PROTO_DIR)
5398N/A
5398N/A# Remove hacks we've chosen not to ship at all for various reasons
5398N/AREMOVED_HACKS="extrusion flyingtoasters ljlatest sonar webcollage"
5398N/ACOMPONENT_POST_INSTALL_ACTION += ( \
5398N/Afor h in $(REMOVED_HACKS) ; do \
5398N/A rm -f $(PROTO_DIR)$(XSS_LIBDIR)/hacks/$${h} \
5398N/A $(PROTO_DIR)$(CONFIGURE_MANDIR)/man6/$${h}.6 \
5398N/A $(PROTO_DIR)$(XSS_LIBDIR)/config/control-center-2.0/$${h}.xml ;\
5398N/Adone ; \
5398N/Arm -f $(PROTO_DIR)$(XSS_LIBDIR)/hacks/webcollage-helper );
5398N/A
5398N/A
5398N/AREQUIRED_PACKAGES += gnome/accessibility/gnome-a11y-libs
5398N/AREQUIRED_PACKAGES += gnome/config/gconf
5398N/AREQUIRED_PACKAGES += image/library/libjpeg
5398N/AREQUIRED_PACKAGES += library/desktop/atk
5398N/AREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
5398N/AREQUIRED_PACKAGES += library/desktop/gtk2
5398N/AREQUIRED_PACKAGES += library/desktop/libglade
5398N/AREQUIRED_PACKAGES += library/desktop/pango
5398N/AREQUIRED_PACKAGES += library/glib2
5398N/AREQUIRED_PACKAGES += library/gnome/gnome-component
5398N/AREQUIRED_PACKAGES += library/libxml2
5398N/AREQUIRED_PACKAGES += library/perl-5/xml-parser
5636N/AREQUIRED_PACKAGES += runtime/perl-512
5398N/AREQUIRED_PACKAGES += system/library/math
5398N/AREQUIRED_PACKAGES += x11/library/libx11
5398N/AREQUIRED_PACKAGES += x11/library/libxext
5398N/AREQUIRED_PACKAGES += x11/library/libxft
5398N/AREQUIRED_PACKAGES += x11/library/libxi
5398N/AREQUIRED_PACKAGES += x11/library/libxinerama
5398N/AREQUIRED_PACKAGES += x11/library/libxmu
5398N/AREQUIRED_PACKAGES += x11/library/libxrandr
5398N/AREQUIRED_PACKAGES += x11/library/libxxf86misc
5398N/AREQUIRED_PACKAGES += x11/library/libxxf86vm
5398N/AREQUIRED_PACKAGES += x11/library/mesa
5398N/AREQUIRED_PACKAGES += x11/library/toolkit/libxt