components/gnutls-3/Makefile
changeset 5682 94c0ca64c022
parent 5455 7d4ee55b5053
child 5930 d23d52b0c303
equal deleted inserted replaced
5681:b8fe51f35344 5682:94c0ca64c022
    20 #
    20 #
    21 
    21 
    22 #
    22 #
    23 # Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
    23 # Copyright (c) 2010, 2016, Oracle and/or its affiliates. All rights reserved.
    24 #
    24 #
    25 
    25 BUILD_BITS= 64_and_32
    26 include ../../make-rules/shared-macros.mk
    26 include ../../make-rules/shared-macros.mk
    27 
    27 
    28 COMPONENT_NAME=		gnutls
    28 COMPONENT_NAME=		gnutls
    29 COMPONENT_VERSION=	3.4.6
    29 COMPONENT_VERSION=	3.4.6
    30 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    31 COMPONENT_PROJECT_URL=  ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4
    30 COMPONENT_PROJECT_URL=  ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4
    32 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
    31 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.xz
    33 COMPONENT_ARCHIVE_HASH= \
    32 COMPONENT_ARCHIVE_HASH= \
    34     sha256:feb559ed7fffa24d5aa40527054fae5cb7f7b66e9f2bebc2383a781dfa4d20ec
    33     sha256:feb559ed7fffa24d5aa40527054fae5cb7f7b66e9f2bebc2383a781dfa4d20ec
    35 COMPONENT_ARCHIVE_URL=  ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/$(COMPONENT_ARCHIVE)
    34 COMPONENT_ARCHIVE_URL=  ftp://ftp.gnutls.org/gcrypt/gnutls/v3.4/$(COMPONENT_ARCHIVE)
    36 COMPONENT_BUGDB=	library/gnutls
    35 COMPONENT_BUGDB=	library/gnutls
    37 
    36 
    38 TPNO=			25396
    37 TPNO=			25396
    39 
    38 
    40 COMPONENT_BUILD_TARGETS = all info
    39 COMPONENT_BUILD_TARGETS = all info
    41 
       
    42 include $(WS_MAKE_RULES)/prep.mk
       
    43 include $(WS_MAKE_RULES)/configure.mk
       
    44 include $(WS_MAKE_RULES)/ips.mk
       
    45 
    40 
    46 # The GnuTLS API and ABI have incompatible changes between versions 2.8.6
    41 # The GnuTLS API and ABI have incompatible changes between versions 2.8.6
    47 # and 3.4.1; but the basic symlink name 'libgnutls.so' and pkg-config file
    42 # and 3.4.1; but the basic symlink name 'libgnutls.so' and pkg-config file
    48 # name 'gnutls.pc' are unchanged.  As a result, it's not possible to have
    43 # name 'gnutls.pc' are unchanged.  As a result, it's not possible to have
    49 # both versions installed at the same time in the default paths in a way
    44 # both versions installed at the same time in the default paths in a way
    51 # one version of the API.  As a result, GnuTLS version 3 delivered to a folder
    46 # one version of the API.  As a result, GnuTLS version 3 delivered to a folder
    52 # called gnutls-3 temporarily.  The plan is to integrate 3.4.1 and move all
    47 # called gnutls-3 temporarily.  The plan is to integrate 3.4.1 and move all
    53 # programs to 3.4.1; after all usage of 2.8.6  excised, move 3.4.1 to the
    48 # programs to 3.4.1; after all usage of 2.8.6  excised, move 3.4.1 to the
    54 # default location.
    49 # default location.
    55 
    50 
    56 MCS = mcs
       
    57 STRIP = strip
       
    58 
       
    59 # We need to build an extra static version of this library for
    51 # We need to build an extra static version of this library for
    60 # GRUB/Wanboot support.
    52 # GRUB/Wanboot support.
    61 
    53 
    62 ifeq ($(MACH),i386)
    54 ifeq ($(MACH),i386)
    63 
    55 
    68 CONFIGURE_32_and_64 += $(WANBOOT_CONFIGURE)
    60 CONFIGURE_32_and_64 += $(WANBOOT_CONFIGURE)
    69 BUILD_32_and_64 += $(WANBOOT_BUILD)
    61 BUILD_32_and_64 += $(WANBOOT_BUILD)
    70 INSTALL_32_and_64 += $(WANBOOT_INSTALL)
    62 INSTALL_32_and_64 += $(WANBOOT_INSTALL)
    71 
    63 
    72 endif
    64 endif
       
    65 
       
    66 include $(WS_MAKE_RULES)/common.mk
       
    67 
       
    68 CFLAGS += -I$(USRINCDIR)/gmp
       
    69 CFLAGS += -I$(USRINCDIR)/idn
       
    70 
       
    71 # Force libtool to pass this flag through using -Wc.
       
    72 # https://www.gnu.org/software/libtool/manual/html_node/Stripped-link-flags.html
       
    73 CXXFLAGS.studio += -Wc,$(studio_NORUNPATH)
       
    74 
       
    75 MCS = mcs
       
    76 STRIP = strip
    73 
    77 
    74 # Set the wanboot CFLAGS as needed for the wanboot compilation
    78 # Set the wanboot CFLAGS as needed for the wanboot compilation
    75 
    79 
    76 CFLAGS.wanboot += -D_BOOT
    80 CFLAGS.wanboot += -D_BOOT
    77 CFLAGS.wanboot += -g
    81 CFLAGS.wanboot += -g
   246 CONFIGURE_OPTIONS.wanboot += ac_cv_libiconv=no
   250 CONFIGURE_OPTIONS.wanboot += ac_cv_libiconv=no
   247 CONFIGURE_OPTIONS.wanboot += ac_cv_libnsl=no
   251 CONFIGURE_OPTIONS.wanboot += ac_cv_libnsl=no
   248 CONFIGURE_OPTIONS.wanboot += ac_cv_libpthread=no
   252 CONFIGURE_OPTIONS.wanboot += ac_cv_libpthread=no
   249 CONFIGURE_OPTIONS.wanboot += ac_cv_librt=no
   253 CONFIGURE_OPTIONS.wanboot += ac_cv_librt=no
   250 
   254 
   251 CONFIGURE_OPTIONS += --sysconfdir=/etc 
   255 CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
   252 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
   256 CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
   253 CONFIGURE_OPTIONS += --mandir=/usr/share/$(COMPONENT_NAME)-3/man
   257 CONFIGURE_OPTIONS += --mandir=$(USRSHAREDIR)/$(COMPONENT_NAME)-3/man
   254 CONFIGURE_OPTIONS += --includedir=/usr/include/$(COMPONENT_NAME)-3/
   258 CONFIGURE_OPTIONS += --includedir=$(USRINCDIR)/$(COMPONENT_NAME)-3/
   255 CONFIGURE_OPTIONS.32 += --libdir=/usr/lib/$(COMPONENT_NAME)-3/
   259 CONFIGURE_OPTIONS.32 += --libdir=$(USRLIBDIR)/$(COMPONENT_NAME)-3/
   256 CONFIGURE_OPTIONS.64 += --libdir=/usr/lib/$(MACH64)/$(COMPONENT_NAME)-3/
   260 CONFIGURE_OPTIONS.64 += --libdir=$(USRLIBDIR64)/$(COMPONENT_NAME)-3/
   257 CONFIGURE_OPTIONS.32 += --libexecdir=/usr/lib/pkgconfig/$(COMPONENT_NAME)-3/
   261 CONFIGURE_OPTIONS.32 += --libexecdir=$(USRLIBDIR)/pkgconfig/$(COMPONENT_NAME)-3/
   258 CONFIGURE_OPTIONS.64 += --libexecdir=/usr/lib/$(MACH64)/pkgconfig/$(COMPONENT_NAME)-3/
   262 CONFIGURE_OPTIONS.64 += --libexecdir=$(USRLIBDIR64)/pkgconfig/$(COMPONENT_NAME)-3/
   259 CONFIGURE_OPTIONS += --localedir=/usr/share/locale/$(COMPONENT_NAME)-3/
   263 CONFIGURE_OPTIONS += --localedir=$(USRSHARELOCALEDIR)/$(COMPONENT_NAME)-3/
   260 CONFIGURE_OPTIONS += --localstatedir=/var 
   264 CONFIGURE_OPTIONS += --localstatedir=$(VARDIR)
   261 CONFIGURE_OPTIONS += --enable-guile=no
   265 CONFIGURE_OPTIONS += --enable-guile=no
   262 CONFIGURE_OPTIONS += --with-included-libtasn1
   266 CONFIGURE_OPTIONS += --with-included-libtasn1
   263 CONFIGURE_OPTIONS += --without-p11-kit
   267 CONFIGURE_OPTIONS += --without-p11-kit
   264 CONFIGURE_OPTIONS += --disable-ecdhe
   268 CONFIGURE_OPTIONS += --disable-ecdhe
   265 CONFIGURE_OPTIONS += --disable-openssl-compatibility
   269 CONFIGURE_OPTIONS += --disable-openssl-compatibility
   266 CONFIGURE_OPTIONS += --disable-tests
   270 CONFIGURE_OPTIONS += --disable-tests
   267 CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -I/usr/include/gmp -I/usr/include/idn $(CC_BITS)"
       
   268 CONFIGURE_OPTIONS += CXX="$(CXX) -norunpath $(CC_BITS)"
       
   269 
       
   270 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS) $(CC_BITS)" 
       
   271 
   271 
   272 ASLR_MODE = $(ASLR_ENABLE)
   272 ASLR_MODE = $(ASLR_ENABLE)
   273 
   273 
   274 include ../../make-rules/shared-targets.mk
   274 include ../../make-rules/shared-targets.mk
   275 
       
   276 configure:      $(CONFIGURE_32_and_64)
       
   277 
   275 
   278 $(BUILD_DIR)/wanboot-amd64/.configured: BITS=64
   276 $(BUILD_DIR)/wanboot-amd64/.configured: BITS=64
   279 $(BUILD_DIR)/wanboot-amd64/.configured: COMPILER=gcc
   277 $(BUILD_DIR)/wanboot-amd64/.configured: COMPILER=gcc
   280 $(BUILD_DIR)/wanboot-amd64/.configured: CFLAGS += $(CFLAGS.wanboot)
   278 $(BUILD_DIR)/wanboot-amd64/.configured: CFLAGS += $(CFLAGS.wanboot)
   281 $(BUILD_DIR)/wanboot-amd64/.configured: \
   279 $(BUILD_DIR)/wanboot-amd64/.configured: \
   282 	CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.wanboot)
   280 	CONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.wanboot)
   283 
   281 
   284 build:          $(BUILD_32_and_64)
   282 $(BUILD_DIR)/wanboot-amd64/.installed: \
   285 
   283 	COMPONENT_POST_INSTALL_ACTION += \
   286 install:        $(INSTALL_32_and_64)
   284 	$(MKDIR) $(PROTOUSRLIBDIR)/grub/wanboot;
   287 
   285 $(BUILD_DIR)/wanboot-amd64/.installed: \
   288 $(BUILD_DIR)/wanboot-amd64/.installed: \
   286 	COMPONENT_POST_INSTALL_ACTION += \
   289 	COMPONENT_POST_INSTALL_ACTION += \
   287 	$(MV) $(PROTOUSRLIBDIR64)/$(COMPONENT_NAME)-3/libgnutls.a \
   290 	$(MKDIR) $(PROTO_DIR)/usr/lib/grub/wanboot;
   288 	$(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
   291 $(BUILD_DIR)/wanboot-amd64/.installed: \
   289 $(BUILD_DIR)/wanboot-amd64/.installed: \
   292 	COMPONENT_POST_INSTALL_ACTION += \
   290 	COMPONENT_POST_INSTALL_ACTION += \
   293 	$(MV) $(PROTO_DIR)/usr/lib/amd64/$(COMPONENT_NAME)-3/libgnutls.a \
   291 	$(STRIP) -x  $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
   294 	$(PROTO_DIR)/usr/lib/grub/wanboot/libgnutls.a;
   292 $(BUILD_DIR)/wanboot-amd64/.installed: \
   295 $(BUILD_DIR)/wanboot-amd64/.installed: \
   293 	COMPONENT_POST_INSTALL_ACTION += \
   296 	COMPONENT_POST_INSTALL_ACTION += \
   294 	$(MCS) -d $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
   297 	$(STRIP) -x  $(PROTO_DIR)/usr/lib/grub/wanboot/libgnutls.a;
   295 $(BUILD_DIR)/wanboot-amd64/.installed: \
   298 $(BUILD_DIR)/wanboot-amd64/.installed: \
   296 	COMPONENT_POST_INSTALL_ACTION += \
   299 	COMPONENT_POST_INSTALL_ACTION += \
   297 	$(AR) ts $(PROTOUSRLIBDIR)/grub/wanboot/libgnutls.a;
   300 	$(MCS) -d $(PROTO_DIR)/usr/lib/grub/wanboot/libgnutls.a;
       
   301 $(BUILD_DIR)/wanboot-amd64/.installed: \
       
   302 	COMPONENT_POST_INSTALL_ACTION += \
       
   303 	$(AR) ts $(PROTO_DIR)/usr/lib/grub/wanboot/libgnutls.a;
       
   304 
   298 
   305 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
   299 COMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
   306 
   300 
   307 COMPONENT_TEST_TRANSFORMS += \
   301 COMPONENT_TEST_TRANSFORMS += \
   308 	'-n -e "/SKIP/p" ' \
   302 	'-n -e "/SKIP/p" ' \
   309 	'-e "/PASS/p" ' \
   303 	'-e "/PASS/p" ' \
   310 	'-e "/FAIL/p" ' \
   304 	'-e "/FAIL/p" ' \
   311 	'-e "/TOTAL/p" ' \
   305 	'-e "/TOTAL/p" ' \
   312 	'-e "/ERROR/p" '
   306 	'-e "/ERROR/p" '
   313 
   307 
   314 test:		$(TEST_32_and_64)
       
   315 
       
   316 system-test:    $(SYSTEM_TESTS_NOT_IMPLEMENTED)
       
   317 
       
   318 REQUIRED_PACKAGES += library/gmp
   308 REQUIRED_PACKAGES += library/gmp
   319 REQUIRED_PACKAGES += library/libidn
   309 REQUIRED_PACKAGES += library/libidn
   320 REQUIRED_PACKAGES += library/libtasn1
   310 REQUIRED_PACKAGES += library/libtasn1
   321 REQUIRED_PACKAGES += library/security/nettle
   311 REQUIRED_PACKAGES += library/security/nettle
   322 REQUIRED_PACKAGES += library/security/trousers
   312 REQUIRED_PACKAGES += library/security/trousers
   323 REQUIRED_PACKAGES += library/zlib
   313 REQUIRED_PACKAGES += library/zlib
   324 REQUIRED_PACKAGES += system/library
       
   325 REQUIRED_PACKAGES += system/library/c++-runtime
   314 REQUIRED_PACKAGES += system/library/c++-runtime