4901N/A#
4901N/A# CDDL HEADER START
4901N/A#
4901N/A# The contents of this file are subject to the terms of the
4901N/A# Common Development and Distribution License (the "License").
4901N/A# You may not use this file except in compliance with the License.
4901N/A#
4901N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
4901N/A# or http://www.opensolaris.org/os/licensing.
4901N/A# See the License for the specific language governing permissions
4901N/A# and limitations under the License.
4901N/A#
4901N/A# When distributing Covered Code, include this CDDL HEADER in each
4901N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
4901N/A# If applicable, add the following below this CDDL HEADER, with the
4901N/A# fields enclosed by brackets "[]" replaced with your own identifying
4901N/A# information: Portions Copyright [yyyy] [name of copyright owner]
4901N/A#
4901N/A# CDDL HEADER END
4901N/A#
4901N/A
4901N/A#
5453N/A# Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
4901N/A#
5680N/ABUILD_BITS= 64_and_32
4901N/Ainclude ../../make-rules/shared-macros.mk
4901N/A
4901N/ACOMPONENT_NAME= gnutls
5928N/ACOMPONENT_VERSION= 3.4.9
4901N/ACOMPONENT_PROJECT_URL= ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4
4901N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz
4901N/ACOMPONENT_ARCHIVE_HASH= \
5928N/A sha256:48594fadba33d450f796ec69526cf2bce6ff9bc3dc90fbd7bf38dc3601f57c3f
4901N/ACOMPONENT_ARCHIVE_URL= ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/$(COMPONENT_ARCHIVE)
4901N/ACOMPONENT_BUGDB= library/gnutls
4901N/A
5928N/ATPNO= 28117
4901N/A
4901N/ACOMPONENT_BUILD_TARGETS = all info
4901N/A
4901N/A# The GnuTLS API and ABI have incompatible changes between versions 2.8.6
4901N/A# and 3.4.1; but the basic symlink name 'libgnutls.so' and pkg-config file
4901N/A# name 'gnutls.pc' are unchanged. As a result, it's not possible to have
4901N/A# both versions installed at the same time in the default paths in a way
4901N/A# that makes it possible to build programs that are only compatible with
4901N/A# one version of the API. As a result, GnuTLS version 3 delivered to a folder
4901N/A# called gnutls-3 temporarily. The plan is to integrate 3.4.1 and move all
4901N/A# programs to 3.4.1; after all usage of 2.8.6 excised, move 3.4.1 to the
4901N/A# default location.
5453N/A
5453N/A# We need to build an extra static version of this library for
5453N/A# GRUB/Wanboot support.
5453N/A
5453N/Aifeq ($(MACH),i386)
5453N/A
5453N/AWANBOOT_CONFIGURE = $(BUILD_DIR)/wanboot-amd64/.configured
5453N/AWANBOOT_BUILD = $(BUILD_DIR)/wanboot-amd64/.built
5453N/AWANBOOT_INSTALL = $(BUILD_DIR)/wanboot-amd64/.installed
5453N/A
5453N/ACONFIGURE_32_and_64 += $(WANBOOT_CONFIGURE)
5453N/ABUILD_32_and_64 += $(WANBOOT_BUILD)
5453N/AINSTALL_32_and_64 += $(WANBOOT_INSTALL)
5453N/A
5453N/Aendif
5453N/A
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
5680N/A
5680N/ACFLAGS += -I$(USRINCDIR)/gmp
5680N/ACFLAGS += -I$(USRINCDIR)/idn
5680N/A
5680N/A# Force libtool to pass this flag through using -Wc.
5680N/A# https://www.gnu.org/software/libtool/manual/html_node/Stripped-link-flags.html
5680N/ACXXFLAGS.studio += -Wc,$(studio_NORUNPATH)
5680N/A
5680N/AMCS = mcs
5680N/ASTRIP = strip
5680N/A
5453N/A# Set the wanboot CFLAGS as needed for the wanboot compilation
5453N/A
5453N/ACFLAGS.wanboot += -D_BOOT
5453N/ACFLAGS.wanboot += -g
5453N/ACFLAGS.wanboot += -falign-jumps=1
5453N/ACFLAGS.wanboot += -falign-loops=1
5453N/ACFLAGS.wanboot += -falign-functions
5453N/ACFLAGS.wanboot += -mno-mmx
5453N/ACFLAGS.wanboot += -mno-sse
5453N/ACFLAGS.wanboot += -mno-sse2
5453N/ACFLAGS.wanboot += -mno-sse3
5453N/ACFLAGS.wanboot += -mno-ssse3
5453N/ACFLAGS.wanboot += -mno-sse4.1
5453N/ACFLAGS.wanboot += -mno-sse4.2
5453N/ACFLAGS.wanboot += -mno-sse4
5453N/ACFLAGS.wanboot += -mno-avx
5453N/ACFLAGS.wanboot += -mno-avx2
5453N/ACFLAGS.wanboot += -mno-aes
5453N/ACFLAGS.wanboot += -mno-pclmul
5453N/ACFLAGS.wanboot += -mno-fsgsbase
5453N/ACFLAGS.wanboot += -mno-rdrnd
5453N/ACFLAGS.wanboot += -mno-f16c
5453N/ACFLAGS.wanboot += -mno-fma
5453N/ACFLAGS.wanboot += -mno-sse4a
5453N/ACFLAGS.wanboot += -mno-fma4
5453N/ACFLAGS.wanboot += -mno-xop
5453N/ACFLAGS.wanboot += -mno-lwp
5453N/ACFLAGS.wanboot += -mno-3dnow
5453N/ACFLAGS.wanboot += -fno-dwarf2-cfi-asm
5453N/ACFLAGS.wanboot += -fno-asynchronous-unwind-tables
5453N/ACFLAGS.wanboot += -fno-common
5453N/ACFLAGS.wanboot += -mcmodel=large
5453N/ACFLAGS.wanboot += -mno-red-zone
5453N/ACFLAGS.wanboot += -fno-stack-protector
5453N/ACFLAGS.wanboot += -mno-stack-arg-probe
5453N/A
5453N/A# Set the wanboot configure options as needed for wanboot
5453N/A
5453N/ACONFIGURE_OPTIONS.wanboot += --enable-largefile
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-doc
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-tools
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-cxx
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-hardware-acceleration
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-padlock
5453N/ACONFIGURE_OPTIONS.wanboot += --with-nettle-mini
5453N/ACONFIGURE_OPTIONS.wanboot += --with-included-libtasn1
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-dtls-srtp-support
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-alpn-support
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-heartbeat_support
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-srp-authentication
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-psk-authentication
5453N/ACONFIGURE_OPTIONS.wanboot += --enable-anon-authentication
5453N/ACONFIGURE_OPTIONS.wanboot += --enable-dhe
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-openpgp-authentication
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-cryptodev
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-ocsp
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-session-tickets
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-openssl-compatibility
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-tests
5453N/ACONFIGURE_OPTIONS.wanboot += --without-html-dir
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-gtk-doc
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-gtk-doc-html
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-gtk-doc-pdf
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-nls
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-rpath
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libiconv-prefix
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libintl-prefix
5453N/ACONFIGURE_OPTIONS.wanboot += --without-librt-prefix
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libpthread-prefix
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libnsl-prefix
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-ld-version-script
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-valgrind-tests
5453N/ACONFIGURE_OPTIONS.wanboot += --enable-static
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-shared
5453N/ACONFIGURE_OPTIONS.wanboot += --without-pic
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-self-checks
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-fips140-mode
5453N/ACONFIGURE_OPTIONS.wanboot += --without-idn
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-non-suiteb-curves
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-libdane
5453N/ACONFIGURE_OPTIONS.wanboot += --without-unbound-root-key-file
5453N/ACONFIGURE_OPTIONS.wanboot += --without-system-priority-file
5453N/ACONFIGURE_OPTIONS.wanboot += --without-tpm
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-local-libopts
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-libopts-install
5453N/ACONFIGURE_OPTIONS.wanboot += --without-regex_header
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libregex
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libregex_cflags
5453N/ACONFIGURE_OPTIONS.wanboot += --without-libregex_libs
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-optional-args
5453N/ACONFIGURE_OPTIONS.wanboot += --without-zlib
5453N/ACONFIGURE_OPTIONS.wanboot += --without-default-trust-store-dir
5453N/ACONFIGURE_OPTIONS.wanboot += --without-default-trust-store-file
5453N/ACONFIGURE_OPTIONS.wanboot += --without-default-crl-file
5453N/ACONFIGURE_OPTIONS.wanboot += --without-default-blacklist-file
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-guile
5453N/ACONFIGURE_OPTIONS.wanboot += --without-guile-site-dir
5453N/ACONFIGURE_OPTIONS.wanboot += --disable-crywrap
5453N/A
5453N/A# For wanboot tell configure that we don't have lots of the
5453N/A# standard unix environment. This will cache these values, and set
5453N/A# them to no.
5453N/A
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func___fsetlocking=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func___register_atfork=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func__fseeki64=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func__ftelli64=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func__ftime=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_alarm=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_argpusage=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_canonicalize_file_name=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_chmod=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_clock_gettime=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_clock_settime=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_daemon=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_dup2=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_epoll_create=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_fchmod=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_flockfile=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_fork=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_fstat=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_ftello=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_funlockfile=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getdelim=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_gethostbyname=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getline=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getpagesize=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getpass=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getpid=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getpwuid_r=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getrusage=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_getservbyname=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_iconv=no
5453N/ACONFIGURE_OPTIONS.wanboot += am_cv_func_iconv=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_inet_ntop=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_inet_pton=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_kqueue=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_localtime=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_localtime_r=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_mbrtowc=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_memmem=no
5453N/ACONFIGURE_OPTIONS.wanboot += gl_cv_func_memmem_works_always=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_mmap=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_mprotect=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_munmap=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_nanosleep=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_pthread_atfork=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_pthread_mutex_lock=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_putenv=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_regcomp=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_scandir=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_scm_gc_malloc_pointerless=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_select=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_setdtablesize=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_setenv=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_shutdown=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_socket=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_strerror_r=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_strpbrk=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_strsignal=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_strtok_r=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_strverscmp=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_tcgetattr=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_tcsetattr=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_tsearch=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_uname=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_unsetenv=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_vasprintf=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_vfork=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_wcslen=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_wcsnlen=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_func_wctomb=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_libiconv=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_libnsl=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_libpthread=no
5453N/ACONFIGURE_OPTIONS.wanboot += ac_cv_librt=no
5453N/A
5680N/ACONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
4901N/ACONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
5680N/ACONFIGURE_OPTIONS += --mandir=$(USRSHAREDIR)/$(COMPONENT_NAME)-3/man
5680N/ACONFIGURE_OPTIONS += --includedir=$(USRINCDIR)/$(COMPONENT_NAME)-3/
5680N/ACONFIGURE_OPTIONS.32 += --libdir=$(USRLIBDIR)/$(COMPONENT_NAME)-3/
5680N/ACONFIGURE_OPTIONS.64 += --libdir=$(USRLIBDIR64)/$(COMPONENT_NAME)-3/
5680N/ACONFIGURE_OPTIONS.32 += --libexecdir=$(USRLIBDIR)/pkgconfig/$(COMPONENT_NAME)-3/
5680N/ACONFIGURE_OPTIONS.64 += --libexecdir=$(USRLIBDIR64)/pkgconfig/$(COMPONENT_NAME)-3/
5680N/ACONFIGURE_OPTIONS += --localedir=$(USRSHARELOCALEDIR)/$(COMPONENT_NAME)-3/
5680N/ACONFIGURE_OPTIONS += --localstatedir=$(VARDIR)
5928N/ACONFIGURE_OPTIONS += --disable-guile
4901N/ACONFIGURE_OPTIONS += --with-included-libtasn1
4901N/ACONFIGURE_OPTIONS += --without-p11-kit
4901N/ACONFIGURE_OPTIONS += --disable-ecdhe
4901N/ACONFIGURE_OPTIONS += --disable-openssl-compatibility
4901N/ACONFIGURE_OPTIONS += --disable-tests
4901N/A
4901N/Ainclude ../../make-rules/shared-targets.mk
4901N/A
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: BITS=64
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: COMPILER=gcc
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: CFLAGS += $(CFLAGS.wanboot)
5453N/A$(BUILD_DIR)/wanboot-amd64/.configured: \
5453N/A CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.wanboot)
5453N/A
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5680N/A $(MKDIR) $(PROTOUSRLIBDIR)/grub/wanboot;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5680N/A $(MV) $(PROTOUSRLIBDIR64)/$(COMPONENT_NAME)-3/libgnutls.a \
5680N/A $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5680N/A $(STRIP) -x $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5680N/A $(MCS) -d $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
5453N/A$(BUILD_DIR)/wanboot-amd64/.installed: \
5453N/A COMPONENT_POST_INSTALL_ACTION += \
5680N/A $(AR) ts $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
4901N/A
4901N/ACOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
4901N/A
4901N/ACOMPONENT_TEST_TRANSFORMS += \
4901N/A '-n -e "/SKIP/p" ' \
4901N/A '-e "/PASS/p" ' \
4901N/A '-e "/FAIL/p" ' \
4901N/A '-e "/TOTAL/p" ' \
4901N/A '-e "/ERROR/p" '
4901N/A
4901N/AREQUIRED_PACKAGES += library/gmp
4901N/AREQUIRED_PACKAGES += library/libidn
4901N/AREQUIRED_PACKAGES += library/security/nettle
4901N/AREQUIRED_PACKAGES += library/security/trousers
4901N/AREQUIRED_PACKAGES += library/zlib
4901N/AREQUIRED_PACKAGES += system/library/c++-runtime