Mon Jan 25 20:26:43 2021 UTC ()
Fix build on OpenBSD by defining __STDC_NO_ATOMICS__.


(schmonz)
diff -r1.266 -r1.267 pkgsrc/security/openssl/Makefile

cvs diff -r1.266 -r1.267 pkgsrc/security/openssl/Makefile (switch to unified diff)

--- pkgsrc/security/openssl/Makefile 2020/12/08 18:54:17 1.266
+++ pkgsrc/security/openssl/Makefile 2021/01/25 20:26:43 1.267
@@ -1,97 +1,98 @@ @@ -1,97 +1,98 @@
1# $NetBSD: Makefile,v 1.266 2020/12/08 18:54:17 wiz Exp $ 1# $NetBSD: Makefile,v 1.267 2021/01/25 20:26:43 schmonz Exp $
2 2
3DISTNAME= openssl-1.1.1i 3DISTNAME= openssl-1.1.1i
4CATEGORIES= security 4CATEGORIES= security
5MASTER_SITES= https://www.openssl.org/source/ 5MASTER_SITES= https://www.openssl.org/source/
6 6
7MAINTAINER= pkgsrc-users@NetBSD.org 7MAINTAINER= pkgsrc-users@NetBSD.org
8HOMEPAGE= https://www.openssl.org/ 8HOMEPAGE= https://www.openssl.org/
9COMMENT= Secure Socket Layer and cryptographic library 9COMMENT= Secure Socket Layer and cryptographic library
10LICENSE= openssl 10LICENSE= openssl
11 11
12USE_GCC_RUNTIME= yes 12USE_GCC_RUNTIME= yes
13 13
14USE_TOOLS+= fgrep gmake makedepend perl 14USE_TOOLS+= fgrep gmake makedepend perl
15BUILD_TARGET= depend all 15BUILD_TARGET= depend all
16TEST_TARGET= tests 16TEST_TARGET= tests
17 17
18HAS_CONFIGURE= yes 18HAS_CONFIGURE= yes
19CONFIGURE_SCRIPT= ./config 19CONFIGURE_SCRIPT= ./config
20CONFIGURE_ARGS+= --prefix=${PREFIX} 20CONFIGURE_ARGS+= --prefix=${PREFIX}
21CONFIGURE_ARGS+= --libdir=${PREFIX}/lib 21CONFIGURE_ARGS+= --libdir=${PREFIX}/lib
22CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR} 22CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR}
23CONFIGURE_ARGS+= shared 23CONFIGURE_ARGS+= shared
24 24
25.include "../../mk/bsd.prefs.mk" 25.include "../../mk/bsd.prefs.mk"
26 26
27.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc) 27.if !empty(MACHINE_PLATFORM:MDarwin-[0-8].*-powerpc)
28# No {get,make,set}context support before Darwin 9 28# No {get,make,set}context support before Darwin 9
29CONFIGURE_ARGS+= no-async 29CONFIGURE_ARGS+= no-async
30.endif 30.endif
31 31
32.include "options.mk" 32.include "options.mk"
33 33
34CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS} 34CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS}
35CONFIGURE_ENV+= PERL=${PERL5:Q} 35CONFIGURE_ENV+= PERL=${PERL5:Q}
36 36
37# If the config script cannot guess the host system correctly then we need to 37# If the config script cannot guess the host system correctly then we need to
38# specify it manually and call the Configure script directly. 38# specify it manually and call the Configure script directly.
39OPENSSL_HOST.SunOS-i386= solaris-x86-gcc 39OPENSSL_HOST.SunOS-i386= solaris-x86-gcc
40OPENSSL_HOST.SunOS-x86_64= solaris64-x86_64-gcc 40OPENSSL_HOST.SunOS-x86_64= solaris64-x86_64-gcc
41OPENSSL_HOST.Darwin-aarch64= darwin64-arm64-cc 41OPENSSL_HOST.Darwin-aarch64= darwin64-arm64-cc
42 42
43LDFLAGS.SunOS+= -lrt 43LDFLAGS.SunOS+= -lrt
 44CPPFLAGS.OpenBSD+= -D__STDC_NO_ATOMICS__
44 45
45.if defined(OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}) 46.if defined(OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH})
46CONFIG_SHELL= ${PERL5} 47CONFIG_SHELL= ${PERL5}
47CONFIGURE_SCRIPT= ./Configure 48CONFIGURE_SCRIPT= ./Configure
48CONFIGURE_ARGS+= ${OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}} 49CONFIGURE_ARGS+= ${OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}}
49.endif 50.endif
50 51
51PKGCONFIG_OVERRIDE+= libcrypto.pc libssl.pc openssl.pc 52PKGCONFIG_OVERRIDE+= libcrypto.pc libssl.pc openssl.pc
52PKGCONFIG_OVERRIDE_STAGE= post-build 53PKGCONFIG_OVERRIDE_STAGE= post-build
53 54
54PKG_SYSCONFSUBDIR= openssl 55PKG_SYSCONFSUBDIR= openssl
55CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \ 56CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \
56 ${PKG_SYSCONFDIR}/openssl.cnf 57 ${PKG_SYSCONFDIR}/openssl.cnf
57OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private 58OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private
58 59
59INSTALLATION_DIRS+= share/examples/openssl 60INSTALLATION_DIRS+= share/examples/openssl
60 61
61# 62#
62# Note that this package cannot be updated solely from Darwin, it relies on 63# Note that this package cannot be updated solely from Darwin, it relies on
63# shlib-dylib.awk to convert the normal .so entries to dylib, which doesn't 64# shlib-dylib.awk to convert the normal .so entries to dylib, which doesn't
64# work the other way around. The lib/engines-1.1 plugins also need special 65# work the other way around. The lib/engines-1.1 plugins also need special
65# handling. 66# handling.
66# 67#
67OPSYSVARS+= SOEXT 68OPSYSVARS+= SOEXT
68SOEXT.Darwin= dylib 69SOEXT.Darwin= dylib
69SOEXT.*= so 70SOEXT.*= so
70PLIST_SUBST+= SOEXT=${SOEXT} 71PLIST_SUBST+= SOEXT=${SOEXT}
71 72
72PRINT_PLIST_AWK+= /^lib\/engines/ { gsub(/\.${SOEXT}$$/, ".$${SOEXT}"); } 73PRINT_PLIST_AWK+= /^lib\/engines/ { gsub(/\.${SOEXT}$$/, ".$${SOEXT}"); }
73 74
74# Remove CC from the environment, to fix GCC version handling on HP-UX, 75# Remove CC from the environment, to fix GCC version handling on HP-UX,
75# SunOS and Linux/sparc. 76# SunOS and Linux/sparc.
76# 77#
77# See https://github.com/openssl/openssl/issues/11060. 78# See https://github.com/openssl/openssl/issues/11060.
78do-configure: 79do-configure:
79 ${RUN} cd ${WRKSRC} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV:NCC=*} \ 80 ${RUN} cd ${WRKSRC} && ${SETENV} ${_CONFIGURE_SCRIPT_ENV:NCC=*} \
80 ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS} 81 ${CONFIG_SHELL} ${CONFIGURE_SCRIPT} ${CONFIGURE_ARGS}
81 82
82# 83#
83# Get rid of ridiculous namespace collisions like passwd.1 and just leave the 84# Get rid of ridiculous namespace collisions like passwd.1 and just leave the
84# openssl-*.1 style variants. On a more practical note this avoids creating 85# openssl-*.1 style variants. On a more practical note this avoids creating
85# a conflict with moreutils (ts.1). 86# a conflict with moreutils (ts.1).
86# 87#
87post-install: 88post-install:
88 cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; \ 89 cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1; \
89 for f in openssl-*; do \ 90 for f in openssl-*; do \
90 ${RM} -f $${f}; \ 91 ${RM} -f $${f}; \
91 ${MV} `${ECHO} $${f} | ${SED} -e 's/openssl-//'` $${f}; \ 92 ${MV} `${ECHO} $${f} | ${SED} -e 's/openssl-//'` $${f}; \
92 done; \ 93 done; \
93 ${RM} -f openssl-c_rehash.1; \ 94 ${RM} -f openssl-c_rehash.1; \
94 ${LN} -s openssl-rehash.1 c_rehash.1 95 ${LN} -s openssl-rehash.1 c_rehash.1
95 96
96.include "../../mk/dlopen.buildlink3.mk" 97.include "../../mk/dlopen.buildlink3.mk"
97.include "../../mk/bsd.pkg.mk" 98.include "../../mk/bsd.pkg.mk"