/
Portfile
72 lines (60 loc) · 2.3 KB
/
Portfile
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
# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortSystem 1.0
PortGroup openssl 1.0
name openssl
epoch 2
version [openssl::default_branch]
revision 4
categories devel security
platforms darwin
license MIT
maintainers nomaintainer
description Shim port installing symbolic links in primary prefix pointing to \
the [openssl::depends_portname] installation.
long_description {*}${description}
conflicts libressl libressl-devel
distfiles
use_configure no
build {}
openssl::set_openssl_dependency
# https://trac.macports.org/ticket/63616
compiler.cxx_standard
proc resolve_sym_link {fname} {
set rc [catch {file readlink ${fname}} result]
if { ${rc} eq 0 } {
return ${result}
} else {
return ${fname}
}
}
destroot {
# Install symlinks from isolated libexec install area to primary ${prefix}
ln -s [openssl::include_dir]/openssl ${destroot}${prefix}/include/
xinstall -d ${destroot}${prefix}/etc/openssl/
foreach f [glob -tails -directory [openssl::install_area]/etc/openssl/ *] {
# explicitly veto cert.pem as this is provided by curl-ca-bundle, and
# in fact the file in opensslX is just a sym-link to it...
if { ${f} ne "cert.pem" } {
ln -s [openssl::install_area]/etc/openssl/${f} ${destroot}${prefix}/etc/openssl/
}
}
ln -s [openssl::install_area]/share/doc/openssl ${destroot}${prefix}/share/doc/
foreach man [glob -tails -directory [openssl::install_area]/share/man/ *] {
foreach m [glob -nocomplain [openssl::install_area]/share/man/${man}/*] {
ln -s ${m} ${destroot}${prefix}/share/man/${man}/
}
}
foreach b [glob [openssl::bin_dir]/*] {
ln -s ${b} ${destroot}/${prefix}/bin/
}
fs-traverse f [openssl::lib_dir] {
set lf [string map "[openssl::install_area] ${prefix}" $f]
if { [file isdirectory ${f}] } {
xinstall -d ${destroot}${lf}
} elseif { [file isfile ${f}] } {
ln -s [resolve_sym_link ${f}] ${destroot}${lf}
}
}
}
universal_variant yes
livecheck.type none