Makefile revision 2899
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER START
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# The contents of this file are subject to the terms of the
141132c272ebc41da4c55d69c49810fafadbbc11Mark Andrews# Common Development and Distribution License (the "License").
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# You may not use this file except in compliance with the License.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# or http://www.opensolaris.org/os/licensing.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# See the License for the specific language governing permissions
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# CDDL HEADER END
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews#
2dafa707cc9af9cca66d68c1d2c3af0c768c2900Mark Andrews# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews#
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtoninclude ../../make-rules/shared-macros.mk
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_NAME= gnupg
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_VERSION= 2.0.22
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_PROJECT_URL= http://www.gnupg.org/
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_ARCHIVE_HASH= \
c40265eba0c99708887d68e67901924065ba2514Brian Wellington sha256:437d0ab259854359fc48aa8795af80cff4975e559c111c92c03d0bc91408e251
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCOMPONENT_ARCHIVE_URL= ftp://ftp.gnupg.org/gcrypt/gnupg/$(COMPONENT_ARCHIVE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUGDB= utility/gnupg
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTPNO= 17706
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
141132c272ebc41da4c55d69c49810fafadbbc11Mark Andrewsinclude ../../make-rules/prep.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude ../../make-rules/configure.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude ../../make-rules/ips.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Enable C99 mode + -Xc for its additional warnings.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstudio_C99MODE = -Xc $(studio_C99_ENABLE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews# -xinline=%auto -- we like inlining where appropriate
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCFLAGS += -xinline=%auto
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# -xbuiltin=%none -- builtins have been known to be buggy
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCFLAGS += -xbuiltin=%none
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCFLAGS += $(CPP_LARGEFILES)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCFLAGS += $(XPG6MODE)
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCFLAGS += $(CPP_POSIX)
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCFLAGS += $(CPP_C99_EXTENDED_MATH)
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonCFLAGS += $(studio_PIC)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# If we pass -lc, -mt won't link with -lthread
c40265eba0c99708887d68e67901924065ba2514Brian Wellington# (which is what it does by default, and we don't
bca7f81db58d4803fb6d8d352132445cf61eb1acMark Andrews# want that, because we use POSIX threads).
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonLDFLAGS += -lc -z defs
a26ad011f382d12058478704cb5e90e6f4366d01Andreas GustafssonLD_OPTIONS += -z defs
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
c5223c9cb7c22620d5ee6611228673e95b48a270Mark AndrewsCONFIGURE_ENV += INSTALL="$(INSTALL)"
2047977ce2dfcfe3a0fa2d638c3242841310fad3Mark Andrews
c5223c9cb7c22620d5ee6611228673e95b48a270Mark AndrewsCONFIGURE_OPTIONS += --localstatedir=/var
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark AndrewsCONFIGURE_OPTIONS += --libexecdir=$(USRBINDIR)
4d9f3f00d93fcb8743b1105e8cf82e862be220d1Mark AndrewsCONFIGURE_OPTIONS += --datadir=$(CONFIGURE_PREFIX)/share
d0aebc5a55b6145297d94f8aee939852357c59fcMark AndrewsCONFIGURE_OPTIONS += --sysconfdir=/etc
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark AndrewsCONFIGURE_OPTIONS += --enable-nls
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --enable-largefile
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --disable-selinux-support
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-pinentry-pgm=$(CONFIGURE_PREFIX)/lib/pinentry
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-gpg-error-prefix=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-libassuan-prefix=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-ksba-prefix=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-pth-prefix=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-libcurl=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-libintl-prefix=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-zlib=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-bzip2=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_OPTIONS += --with-readline=$(CONFIGURE_PREFIX)
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
dc6da18ccbb808d21f123cc6bda399b44ad11445Mark AndrewsCONFIGURE_SBINDIR.64 = $(CONFIGURE_PREFIX)/sbin
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsLIBKSBA_MANIFEST = manifest-$(MACH)-libksba.depend
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsLIBASSUAN_MANIFEST = manifest-$(MACH)-libassuan.depend
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsGPGME_MANIFEST = manifest-$(MACH)-gpgme.depend
a903095bf4512dae561c7f6fc7854a51bebf334aMark AndrewsPINENTRY_MANIFEST = manifest-$(MACH)-pinentry.depend
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# Work around pkgdepend bug which doesn't resolve dependencies from
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews# the local workspace repo. Fortunately we only have to do this once.
43efd9fa56b03e3e285fb58859efc9348c7f4a9fMark AndrewsDEPENDED += $(WS_TOP)/components/libksba/build/$(LIBKSBA_MANIFEST)
43efd9fa56b03e3e285fb58859efc9348c7f4a9fMark AndrewsDEPENDED += $(WS_TOP)/components/libassuan/build/$(LIBASSUAN_MANIFEST)
d0aebc5a55b6145297d94f8aee939852357c59fcMark AndrewsDEPENDED += $(WS_TOP)/components/gpgme/build/$(GPGME_MANIFEST)
508f61f8d699c46f962b682f388e54b446a7194dMark AndrewsDEPENDED += $(WS_TOP)/components/pinentry/build/$(PINENTRY_MANIFEST)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonPKG_PROTO_DIRS += $(WS_TOP)/components/libksba
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonPKG_PROTO_DIRS += $(WS_TOP)/components/libassuan
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonPKG_PROTO_DIRS += $(WS_TOP)/components/gpgme
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonPKG_PROTO_DIRS += $(WS_TOP)/components/pinentry
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonMAN8LIST = addgnupghome applygnupgdefaults
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinASLR_MODE = $(ASLR_ENABLE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinbuild: $(BUILD_64)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtoninstall: $(INSTALL_64)
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews ( cd $(PROTOUSRSHARELOCALEDIR) ; \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(CP) -R 'en@boldquot' en )
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews ( cd $(PROTOUSRSHAREMANDIR) ; \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews if test -d man8 ; then \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(MV) man8 man1m ; fi )
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews ( cd $(PROTOUSRSHAREMANDIR)/man1m ; \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews list1='$(MAN8LIST)' ; for f in $$list1; do \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews if test -f $$f.8 ; then \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews $(MV) $$f.8 $$f.1m ; fi ; \
a903095bf4512dae561c7f6fc7854a51bebf334aMark Andrews done )
728a9bec1fe3a56fedfd672e7f34d2d82631d1d7Mark Andrews
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtontest: $(TEST_64)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian WellingtonBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
c40265eba0c99708887d68e67901924065ba2514Brian Wellington
c40265eba0c99708887d68e67901924065ba2514Brian Wellingtoninclude ../../make-rules/depend.mk
c40265eba0c99708887d68e67901924065ba2514Brian Wellington