Makefile revision 5636
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# CDDL HEADER START
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# The contents of this file are subject to the terms of the
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Common Development and Distribution License (the "License").
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# You may not use this file except in compliance with the License.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# or http://www.opensolaris.org/os/licensing.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# See the License for the specific language governing permissions
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# and limitations under the License.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# When distributing Covered Code, include this CDDL HEADER in each
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# If applicable, add the following below this CDDL HEADER, with the
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# fields enclosed by brackets "[]" replaced with your own identifying
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# information: Portions Copyright [yyyy] [name of copyright owner]
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# CDDL HEADER END
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer#
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerinclude ../../../make-rules/shared-macros.mk
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_NAME= xscreensaver
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_VERSION= 5.34
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_PROJECT_URL= https://www.jwz.org/xscreensaver/
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_ARCHIVE_HASH= \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer sha256:6fff7ec4be743e5c042647ea9687dd0cdf48d1dd5e8e15098e5018bbd02e5e27
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_ARCHIVE_URL= https://www.jwz.org/xscreensaver/$(COMPONENT_ARCHIVE)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_BUGDB= gnome/screensaver
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerTPNO= 26341
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerinclude $(WS_MAKE_RULES)/prep.mk
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerinclude $(WS_MAKE_RULES)/configure-64.mk
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerinclude $(WS_MAKE_RULES)/ips.mk
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# While the tree currently builds with Studio, we need to make sure it also
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# builds with gcc when submitting patches upstream, and having both sets of
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# options in the CFLAGS below makes it easy to switch when needed.
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# COMPILER=gcc
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCC += $(CC_BITS)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Enable additional warnings, since we've modified this code a lot
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCFLAGS.studio += -v
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCFLAGS.gcc += -Wall
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
744e50acbaaf22481b25b921b2bc199c8dd4a35cStephen Brooks# Additional optimization flags, to make the hacks show off the hardware
744e50acbaaf22481b25b921b2bc199c8dd4a35cStephen Brooks# better and because for just a screensaver display we can get away with
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# using optimizations that may change strict correctness of floating point ops.
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCFLAGS.studio += -fsimple=2 -nofstore -xlibmil -xprefetch
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCFLAGS.gcc += -funsafe-math-optimizations
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks# Regenerate configure after patches modify configure.in
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCOMPONENT_PREP_ACTION += ( cd $(@D); autoreconf -fiv);
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen Brooks# Need to pick up the GNU version of xgettext.
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerPATH=$(GNUBIN):/usr/bin
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Libraries & programs to depend on
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-gl=$(USRDIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-gtk=$(USRDIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-jpeg=$(USRDIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --without-motif
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-pixbuf=$(USRDIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-xft=$(USRDIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += PTHREAD_CFLAGS="-D_POSIX_PTHREAD_SEMANTICS"
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += PTHREAD_LIBS="-lc"
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += PERL=$(PERL.5.12)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += INTLTOOL_PERL=$(PERL.5.12)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# X extensions to support
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-dpms-ext
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-randr-ext
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --with-xinerama-ext
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --with-xinput-ext # required for accessibility
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks# Support locking the screen by normal users and by root
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --enable-locking
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --enable-root-passwd
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks# and allow user switching from the lock screen with gdmflexiserver
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-login-manager
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Use only PAM, not direct /etc/shadow or kerberos access
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-pam=$(USRDIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --without-shadow
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --without-kerberos
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen Brooks# Paths to install to
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen BrooksAPP_DEFAULTS_DIR = $(CONFIGURE_PREFIX)/share/X11/app-defaults
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen BrooksXSS_LIBDIR = $(CONFIGURE_PREFIX)/lib/xscreensaver
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --bindir=$(CONFIGURE_BINDIR.32)
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --libexecdir=$(XSS_LIBDIR)/bin
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-hackdir=$(XSS_LIBDIR)/hacks
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCONFIGURE_OPTIONS += --with-configdir=$(XSS_LIBDIR)/config/control-center-2.0
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --with-x-app-defaults=$(APP_DEFAULTS_DIR)
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks# Data sources for images & text in hacks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --with-image-directory=$(USRSHAREDIR)/pixmaps/backgrounds
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCONFIGURE_OPTIONS += --with-text-file=/etc/motd
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks# Do not install setuid hacks
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen BrooksCONFIGURE_OPTIONS += --without-setuid-hacks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks# The potfiles.in updates don't work unless source is cloned to build dir
7656b92221e26376547b0dc52b67e7a414ea9775Stephen BrooksCOMPONENT_PRE_CONFIGURE_ACTION += ($(CLONEY) $(SOURCE_DIR) $(@D));
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Update potfiles.in to pick up our added sources like lock-Gtk.c
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# The "-o Makefile" & touch stamp-it is needed to avoid infinite looping.
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_POST_CONFIGURE_ACTION += ( \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer cd $(@D)/po ; \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer $(MAKE) -o Makefile generate_potfiles_in ; \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer $(MAKE) -o Makefile POTFILES ; \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer $(MAKE) -o Makefile xscreensaver.pot ; \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer touch stamp-it )
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Recognizing DESTDIR as most autotools packages do would be too easy,
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# so xscreensaver makes us override install_prefix instead for the same effect.
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_INSTALL_ARGS += install_prefix=$(PROTO_DIR)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer# Remove hacks we've chosen not to ship at all for various reasons
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREMOVED_HACKS="extrusion flyingtoasters ljlatest sonar webcollage"
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerCOMPONENT_POST_INSTALL_ACTION += ( \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerfor h in $(REMOVED_HACKS) ; do \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer rm -f $(PROTO_DIR)$(XSS_LIBDIR)/hacks/$${h} \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer $(PROTO_DIR)$(CONFIGURE_MANDIR)/man6/$${h}.6 \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer $(PROTO_DIR)$(XSS_LIBDIR)/config/control-center-2.0/$${h}.xml ;\
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerdone ; \
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerrm -f $(PROTO_DIR)$(XSS_LIBDIR)/hacks/webcollage-helper );
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen BrooksASLR_MODE = $(ASLR_ENABLE)
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooks
7656b92221e26376547b0dc52b67e7a414ea9775Stephen Brooksconfigure: $(CONFIGURE_64)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerbuild: $(BUILD_64)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremerinstall: $(INSTALL_64)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremertest: $(NO_TESTS)
7a0878494fd11b7a861d0b3e2034534c10b5fb46Stephen Brookssystem-test: $(NO_TESTS)
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += gnome/accessibility/gnome-a11y-libs
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += gnome/config/gconf
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += image/library/libjpeg
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/desktop/atk
744e50acbaaf22481b25b921b2bc199c8dd4a35cStephen BrooksREQUIRED_PACKAGES += library/desktop/gdk-pixbuf
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/desktop/gtk2
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/desktop/libglade
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/desktop/pango
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/glib2
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/gnome/gnome-component
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/libxml2
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += library/perl-5/xml-parser
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += runtime/perl-512
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += system/library
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += system/library/math
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libx11
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxext
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxft
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxi
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxinerama
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxmu
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxrandr
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxxf86misc
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/libxxf86vm
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/mesa
e4f5a11d4a234623168c1558fcdf4341e11769e1James KremerREQUIRED_PACKAGES += x11/library/toolkit/libxt
e4f5a11d4a234623168c1558fcdf4341e11769e1James Kremer