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