Skip to content

Commit 8f3089f

Browse files
committed
openssl3: add package for version 3 of openssl
1 parent b45491b commit 8f3089f

File tree

8 files changed

+6810
-0
lines changed

8 files changed

+6810
-0
lines changed

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2741,6 +2741,7 @@ SUBDIR+= openshot-qt
27412741
SUBDIR+= opensips
27422742
SUBDIR+= opensmtpd
27432743
SUBDIR+= openssl110
2744+
SUBDIR+= openssl3
27442745
SUBDIR+= opensubdiv
27452746
SUBDIR+= opensurge
27462747
SUBDIR+= opentomb

openssl3/DESCR

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
The OpenSSL Project is a collaborative effort to develop a
2+
robust, commercial-grade, full-featured, and Open Source
3+
toolkit implementing the Secure Sockets Layer (SSL v2/v3)
4+
and Transport Layer Security (TLS v1) protocols as well as
5+
a full-strength general purpose cryptography library. The
6+
project is managed by a worldwide community of volunteers
7+
that use the Internet to communicate, plan, and develop the
8+
OpenSSL toolkit and its related documentation.
9+
10+
This package contains major version 3 of OpenSSL.

openssl3/Makefile

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

0 commit comments

Comments
 (0)