Contents of /smage/trunk/core/openssl-compat/openssl-compat-1.0.2n-r2.smage2
Parent Directory
|
Revision Log
Revision 11610 -
(show annotations)
(download)
Wed Dec 27 11:03:01 2017 UTC (6 years, 5 months ago) by niro
File size: 3271 byte(s)
Wed Dec 27 11:03:01 2017 UTC (6 years, 5 months ago) by niro
File size: 3271 byte(s)
-enable deprecated sslv3 for nssl
1 | # $Id$ |
2 | |
3 | PNAME="openssl-compat" |
4 | PVER="1.0.2n" |
5 | PBUILD="r2" |
6 | |
7 | PCAT="dev-libs" |
8 | |
9 | DESCRIPTION="Provides libraries for SSL v2/3 and TLS v1." |
10 | HOMEPAGE="http://www.openssl.org/" |
11 | |
12 | DEPEND=">= virtual/glibc" |
13 | |
14 | SDEPEND=">= dev-lang/perl-5 |
15 | >= virtual/sed |
16 | >= x11-misc/makedepend-1" |
17 | |
18 | SRCFILE="openssl-${PVER}.tar.gz" |
19 | SRCDIR="${BUILDDIR}/openssl-${PVER}" |
20 | |
21 | ALX_PKG_KEEP="usr/$(mlibdir)/openssl-1.0/libcrypto.so |
22 | usr/$(mlibdir)/libcrypto.so.* |
23 | usr/$(mlibdir)/openssl-1.0/libssl.so |
24 | usr/$(mlibdir)/libssl.so.* |
25 | usr/bin/openssl-1.0" |
26 | sminclude multilib mbuild mtools alx-split |
27 | msetfeature "!check" |
28 | |
29 | SRC_URI=( |
30 | http://www.openssl.org/source/${SRCFILE} |
31 | mirror://openssl/${SRCFILE} |
32 | mirror://openssl/openssl-1.0-versioned-symbols.patch |
33 | ) |
34 | |
35 | UP2DATE="updatecmd http://ftp.openssl.org/source/ | grep '${PNAME}-[0-9]' | highesttarball gz" |
36 | |
37 | # pkgs to rebuild: openssh, openvpn, proftpd, dovecot, subversion, neon, nxssh |
38 | |
39 | src_prepare() |
40 | { |
41 | munpack ${SRCFILE} || die |
42 | |
43 | # prevent conflicts with openssl-1.1 |
44 | mpatch openssl-1.0-versioned-symbols.patch || die |
45 | } |
46 | |
47 | src_compile() |
48 | { |
49 | local abi |
50 | local libdir |
51 | local myopts |
52 | local myoptflags |
53 | |
54 | for abi in ${MULTILIB_ABIS} |
55 | do |
56 | cd ${SRCDIR}-${abi} |
57 | |
58 | case ${abi} in |
59 | m32) libdir="lib" ;; |
60 | m64) libdir="lib64" ;; |
61 | esac |
62 | |
63 | myopts="linux-${ARCH}" |
64 | [[ ${ARCH} = i*86 ]] && myopts="linux-elf" |
65 | if [[ ${ARCH} = x86_64 ]] && [[ ${abi} = m32 ]] |
66 | then |
67 | myopts="linux-elf" |
68 | fi |
69 | |
70 | # disable ssl3 |
71 | # disabled, nssl requires this -fixme! |
72 | #myoptflags+=" no-ssl3-method" |
73 | # enable 64 bit ec_nistp |
74 | if [[ ${ARCH} = x86_64 ]] && [[ ${abi} = m64 ]] |
75 | then |
76 | myoptflags+=" enable-ec_nistp_64_gcc_128" |
77 | fi |
78 | |
79 | echo "Compiler: ${myopts}" |
80 | |
81 | abi-${abi} ./Configure \ |
82 | --openssldir=/etc/ssl \ |
83 | --prefix=/usr \ |
84 | --libdir=${libdir}/openssl-1.0 \ |
85 | shared ${myoptflags} threads zlib ${myopts} || die |
86 | |
87 | make depend || die |
88 | done |
89 | |
90 | mmake -j1 || die |
91 | } |
92 | |
93 | alx_generic_src_install() |
94 | { |
95 | cd ${SRCDIR} |
96 | |
97 | # needed directories |
98 | minstalldir /etc/ssl || die |
99 | |
100 | mmake -j1 INSTALL_PREFIX=${BINDIR} install_sw || die |
101 | |
102 | # fix permissions |
103 | mchmod 0755 /usr/$(mlibdir)/openssl-1.0/pkgconfig || die |
104 | |
105 | # do not conflict with openssl |
106 | minstalldir /usr/include/openssl-1.0 || die |
107 | mmove ${BINDIR}/usr/include/openssl /usr/include/openssl-1.0/ || die |
108 | mmove ${BINDIR}/usr/$(mlibdir)/openssl-1.0/libcrypto.so.1.0.0 /usr/$(mlibdir)/ || die |
109 | mmove ${BINDIR}/usr/$(mlibdir)/openssl-1.0/libssl.so.1.0.0 /usr/$(mlibdir)/ || die |
110 | mlink ../libssl.so.1.0.0 /usr/$(mlibdir)/openssl-1.0/libssl.so || die |
111 | mlink ../libcrypto.so.1.0.0 /usr/$(mlibdir)/openssl-1.0/libcrypto.so || die |
112 | sed -i 's:/include$:/include/openssl-1.0:' ${BINDIR}/usr/$(mlibdir)/openssl-1.0/pkgconfig/*.pc || die |
113 | if [[ $(mlibdir) != lib ]] |
114 | then |
115 | mmove ${BINDIR}/usr/lib/openssl-1.0/libcrypto.so.1.0.0 /usr/lib/ || die |
116 | mmove ${BINDIR}/usr/lib/openssl-1.0/libssl.so.1.0.0 /usr/lib/ || die |
117 | mlink ../libssl.so.1.0.0 /usr/lib/openssl-1.0/libssl.so || die |
118 | mlink ../libcrypto.so.1.0.0 /usr/lib/openssl-1.0/libcrypto.so || die |
119 | sed -i 's:/include$:/include/openssl-1.0:' ${BINDIR}/usr/lib/openssl-1.0/pkgconfig/*.pc || die |
120 | fi |
121 | mmove ${BINDIR}/usr/bin/openssl /usr/bin/openssl-1.0 || die |
122 | mdelete -r /etc || die |
123 | mdelete /usr/bin/c_rehash || die |
124 | |
125 | # install docs |
126 | minstalldocs CHANGES* FAQ LICENSE NEWS README doc/*.txt || die |
127 | } |