Andreas Wacknitz
2024-04-04 8590298b09ebad29af56370cd23105cd0931b389
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright (c) 2013, Colin Ellis. All rights reserved.
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2019, Michal Nowak
# Copyright (c) 2021, Nona Hansel
# Copyright (c) 2021, 2024 Andreas Wacknitz
#
 
USE_DEFAULT_TEST_TRANSFORMS= yes
include ../../../make-rules/shared-macros.mk
 
COMPONENT_NAME=         gnupg
COMPONENT_VERSION=      2.4.5
COMPONENT_SUMMARY=      GNU Privacy Guard
COMPONENT_DESCRIPTION=    A complete and free implementation of the OpenPGP Standard as defined by RFC4880
COMPONENT_SRC=          $(COMPONENT_NAME)-$(COMPONENT_VERSION)
COMPONENT_PROJECT_URL=  https://gnupg.org/
COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.bz2
COMPONENT_ARCHIVE_HASH= sha256:f68f7d75d06cb1635c336d34d844af97436c3f64ea14bcb7c869782f96f44277
COMPONENT_ARCHIVE_URL=  $(COMPONENT_PROJECT_URL)/ftp/gcrypt/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
COMPONENT_FMRI=         crypto/gnupg
COMPONENT_CLASSIFICATION=Applications/System Utilities
COMPONENT_LICENSE=      GPLv3, GPLv2, LGPLv3, LGPLv2.1, Creative Commons 1.0, others
 
include $(WS_MAKE_RULES)/common.mk
 
PATH= $(PATH.gnu)
 
CFLAGS += $(CPP_LARGEFILES)
CFLAGS += -I/usr/include/openldap
 
# If we pass -lc, -mt won't link with -lthread
# (which is what it does by default, and we don't
# want that, because we use POSIX threads).
LDFLAGS += -lc -z defs -lsocket -lnsl
LD_OPTIONS += -z defs
 
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
CONFIGURE_ENV += INSTALL="$(INSTALL)"
CONFIGURE_ENV += LDAPLIBS="-lldap-2.6 -llber-2.6"
 
CONFIGURE_OPTIONS += --localstatedir=$(VARDIR)
CONFIGURE_OPTIONS += --libexecdir=$(USRBINDIR)
CONFIGURE_OPTIONS += --datadir=$(CONFIGURE_PREFIX)/share
CONFIGURE_OPTIONS += --sysconfdir=$(ETCDIR)
CONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
CONFIGURE_OPTIONS += --enable-nls
CONFIGURE_OPTIONS += --enable-largefile
CONFIGURE_OPTIONS += --disable-selinux-support
CONFIGURE_OPTIONS += --disable-libdns
CONFIGURE_OPTIONS += --with-pinentry-pgm=$(CONFIGURE_PREFIX)/lib/pinentry
CONFIGURE_OPTIONS += --with-gpg-error-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-libassuan-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-ksba-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-libintl-prefix=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-zlib=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-bzip2=$(CONFIGURE_PREFIX)
CONFIGURE_OPTIONS += --with-readline=$(CONFIGURE_PREFIX)
 
MAN8LIST= addgnupghome applygnupgdefaults
 
install:    $(INSTALL_64)
    ( cd $(PROTOUSRSHARELOCALEDIR) ; \
        $(CP) -R 'en@boldquot' en )
 
# Alas we have some failing tests after changes in shared-macros.mk:
# build, install and test in clean environment (c86a36b0fd6dda8c75b28642c319842ace789385)
COMPONENT_TEST_TRANSFORMS += "-e '/Failed tests/p'"
COMPONENT_TEST_TRANSFORMS += "-e '/tests run/p'"
COMPONENT_TEST_TRANSFORMS += "-e '/test passed/p'"
COMPONENT_TEST_TRANSFORMS += "-e '/tests passed/p'"
COMPONENT_TEST_TRANSFORMS += "-e '/====/p'"
 
# Missing dependencies for pinentry
REQUIRED_PACKAGES += library/desktop/gtk2
REQUIRED_PACKAGES += library/glib2
REQUIRED_PACKAGES += library/libsecret
 
# Auto-generated dependencies
REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += database/sqlite-3
REQUIRED_PACKAGES += library/gnutls-3
REQUIRED_PACKAGES += library/libusb-1
REQUIRED_PACKAGES += library/npth
REQUIRED_PACKAGES += library/openldap
REQUIRED_PACKAGES += library/readline
REQUIRED_PACKAGES += library/security/libassuan
REQUIRED_PACKAGES += library/security/libgpg-error
REQUIRED_PACKAGES += library/security/libksba
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += security/pinentry
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/security/libgcrypt