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