| @@ -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 | |
3 | DISTNAME= openssl-1.1.1i | | 3 | DISTNAME= openssl-1.1.1i |
4 | CATEGORIES= security | | 4 | CATEGORIES= security |
5 | MASTER_SITES= https://www.openssl.org/source/ | | 5 | MASTER_SITES= https://www.openssl.org/source/ |
6 | | | 6 | |
7 | MAINTAINER= pkgsrc-users@NetBSD.org | | 7 | MAINTAINER= pkgsrc-users@NetBSD.org |
8 | HOMEPAGE= https://www.openssl.org/ | | 8 | HOMEPAGE= https://www.openssl.org/ |
9 | COMMENT= Secure Socket Layer and cryptographic library | | 9 | COMMENT= Secure Socket Layer and cryptographic library |
10 | LICENSE= openssl | | 10 | LICENSE= openssl |
11 | | | 11 | |
12 | USE_GCC_RUNTIME= yes | | 12 | USE_GCC_RUNTIME= yes |
13 | | | 13 | |
14 | USE_TOOLS+= fgrep gmake makedepend perl | | 14 | USE_TOOLS+= fgrep gmake makedepend perl |
15 | BUILD_TARGET= depend all | | 15 | BUILD_TARGET= depend all |
16 | TEST_TARGET= tests | | 16 | TEST_TARGET= tests |
17 | | | 17 | |
18 | HAS_CONFIGURE= yes | | 18 | HAS_CONFIGURE= yes |
19 | CONFIGURE_SCRIPT= ./config | | 19 | CONFIGURE_SCRIPT= ./config |
20 | CONFIGURE_ARGS+= --prefix=${PREFIX} | | 20 | CONFIGURE_ARGS+= --prefix=${PREFIX} |
21 | CONFIGURE_ARGS+= --libdir=${PREFIX}/lib | | 21 | CONFIGURE_ARGS+= --libdir=${PREFIX}/lib |
22 | CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR} | | 22 | CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR} |
23 | CONFIGURE_ARGS+= shared | | 23 | CONFIGURE_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 |
29 | CONFIGURE_ARGS+= no-async | | 29 | CONFIGURE_ARGS+= no-async |
30 | .endif | | 30 | .endif |
31 | | | 31 | |
32 | .include "options.mk" | | 32 | .include "options.mk" |
33 | | | 33 | |
34 | CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS} | | 34 | CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS} |
35 | CONFIGURE_ENV+= PERL=${PERL5:Q} | | 35 | CONFIGURE_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. |
39 | OPENSSL_HOST.SunOS-i386= solaris-x86-gcc | | 39 | OPENSSL_HOST.SunOS-i386= solaris-x86-gcc |
40 | OPENSSL_HOST.SunOS-x86_64= solaris64-x86_64-gcc | | 40 | OPENSSL_HOST.SunOS-x86_64= solaris64-x86_64-gcc |
41 | OPENSSL_HOST.Darwin-aarch64= darwin64-arm64-cc | | 41 | OPENSSL_HOST.Darwin-aarch64= darwin64-arm64-cc |
42 | | | 42 | |
43 | LDFLAGS.SunOS+= -lrt | | 43 | LDFLAGS.SunOS+= -lrt |
| | | 44 | CPPFLAGS.OpenBSD+= -D__STDC_NO_ATOMICS__ |
44 | | | 45 | |
45 | .if defined(OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}) | | 46 | .if defined(OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}) |
46 | CONFIG_SHELL= ${PERL5} | | 47 | CONFIG_SHELL= ${PERL5} |
47 | CONFIGURE_SCRIPT= ./Configure | | 48 | CONFIGURE_SCRIPT= ./Configure |
48 | CONFIGURE_ARGS+= ${OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}} | | 49 | CONFIGURE_ARGS+= ${OPENSSL_HOST.${OPSYS}-${MACHINE_ARCH}} |
49 | .endif | | 50 | .endif |
50 | | | 51 | |
51 | PKGCONFIG_OVERRIDE+= libcrypto.pc libssl.pc openssl.pc | | 52 | PKGCONFIG_OVERRIDE+= libcrypto.pc libssl.pc openssl.pc |
52 | PKGCONFIG_OVERRIDE_STAGE= post-build | | 53 | PKGCONFIG_OVERRIDE_STAGE= post-build |
53 | | | 54 | |
54 | PKG_SYSCONFSUBDIR= openssl | | 55 | PKG_SYSCONFSUBDIR= openssl |
55 | CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \ | | 56 | CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \ |
56 | ${PKG_SYSCONFDIR}/openssl.cnf | | 57 | ${PKG_SYSCONFDIR}/openssl.cnf |
57 | OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private | | 58 | OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private |
58 | | | 59 | |
59 | INSTALLATION_DIRS+= share/examples/openssl | | 60 | INSTALLATION_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 | # |
67 | OPSYSVARS+= SOEXT | | 68 | OPSYSVARS+= SOEXT |
68 | SOEXT.Darwin= dylib | | 69 | SOEXT.Darwin= dylib |
69 | SOEXT.*= so | | 70 | SOEXT.*= so |
70 | PLIST_SUBST+= SOEXT=${SOEXT} | | 71 | PLIST_SUBST+= SOEXT=${SOEXT} |
71 | | | 72 | |
72 | PRINT_PLIST_AWK+= /^lib\/engines/ { gsub(/\.${SOEXT}$$/, ".$${SOEXT}"); } | | 73 | PRINT_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. |
78 | do-configure: | | 79 | do-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 | # |
87 | post-install: | | 88 | post-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" |