| @@ -1,142 +1,143 @@ | | | @@ -1,142 +1,143 @@ |
1 | # $NetBSD: Makefile,v 1.180 2013/10/03 11:15:48 joerg Exp $ | | 1 | # $NetBSD: Makefile,v 1.181 2013/10/05 07:01:06 jperkin Exp $ |
2 | | | 2 | |
3 | DISTNAME= openssl-1.0.1e | | 3 | DISTNAME= openssl-1.0.1e |
4 | MASTER_SITES= http://ftp.openssl.org/source/ | | 4 | MASTER_SITES= http://ftp.openssl.org/source/ |
5 | PKGREVISION= 2 | | 5 | PKGREVISION= 2 |
6 | SVR4_PKGNAME= ossl | | 6 | SVR4_PKGNAME= ossl |
7 | CATEGORIES= security | | 7 | CATEGORIES= security |
8 | | | 8 | |
9 | MAINTAINER= pkgsrc-users@NetBSD.org | | 9 | MAINTAINER= pkgsrc-users@NetBSD.org |
10 | HOMEPAGE= http://www.openssl.org/ | | 10 | HOMEPAGE= http://www.openssl.org/ |
11 | COMMENT= Secure Socket Layer and cryptographic library | | 11 | COMMENT= Secure Socket Layer and cryptographic library |
12 | | | 12 | |
13 | CONFLICTS= SSLeay-[0-9]* ssleay-[0-9]* | | 13 | CONFLICTS= SSLeay-[0-9]* ssleay-[0-9]* |
14 | | | 14 | |
15 | CRYPTO= yes | | 15 | CRYPTO= yes |
16 | | | 16 | |
17 | PKG_INSTALLATION_TYPES= overwrite pkgviews | | 17 | PKG_INSTALLATION_TYPES= overwrite pkgviews |
18 | | | 18 | |
19 | BUILD_DEPENDS+= p5-Perl4-CoreLibs-[0-9]*:../../devel/p5-Perl4-CoreLibs | | 19 | BUILD_DEPENDS+= p5-Perl4-CoreLibs-[0-9]*:../../devel/p5-Perl4-CoreLibs |
20 | | | 20 | |
21 | .include "../../mk/bsd.prefs.mk" | | 21 | .include "../../mk/bsd.prefs.mk" |
22 | .include "../../mk/compiler.mk" | | 22 | .include "../../mk/compiler.mk" |
23 | | | 23 | |
24 | EXTRACT_USING= gtar | | 24 | EXTRACT_USING= gtar |
25 | USE_TOOLS+= fgrep gmake perl | | 25 | USE_TOOLS+= fgrep gmake perl |
26 | TEST_TARGET= tests | | 26 | TEST_TARGET= tests |
27 | MAKE_JOBS_SAFE= no | | 27 | MAKE_JOBS_SAFE= no |
28 | | | 28 | |
29 | HAS_CONFIGURE= yes | | 29 | HAS_CONFIGURE= yes |
30 | CONFIGURE_SCRIPT= ./config | | 30 | CONFIGURE_SCRIPT= ./config |
31 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} | | 31 | CONFIGURE_ARGS+= --prefix=${PREFIX:Q} |
32 | CONFIGURE_ARGS+= --install_prefix=${DESTDIR} | | 32 | CONFIGURE_ARGS+= --install_prefix=${DESTDIR} |
33 | CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR:Q} | | 33 | CONFIGURE_ARGS+= --openssldir=${PKG_SYSCONFDIR:Q} |
34 | CONFIGURE_ARGS+= shared no-fips | | 34 | CONFIGURE_ARGS+= shared no-fips |
35 | | | 35 | |
36 | .if ${OPSYS} == "SunOS" | | 36 | .if ${OPSYS} == "SunOS" |
37 | . if ${MACHINE_ARCH} == "sparc" | | 37 | . if ${MACHINE_ARCH} == "sparc" |
38 | OPENSSL_MACHINE_ARCH= ${SPARC_TARGET_ARCH} | | 38 | OPENSSL_MACHINE_ARCH= ${SPARC_TARGET_ARCH} |
39 | . elif ${MACHINE_ARCH} == "i386" | | 39 | . elif ${MACHINE_ARCH} == "i386" |
40 | OPENSSL_MACHINE_ARCH= x86 | | 40 | OPENSSL_MACHINE_ARCH= x86 |
41 | . elif ${MACHINE_ARCH} == "x86_64" | | 41 | . elif ${MACHINE_ARCH} == "x86_64" |
42 | OPENSSL_MACHINE_ARCH= ${MACHINE_ARCH} | | 42 | OPENSSL_MACHINE_ARCH= ${MACHINE_ARCH} |
43 | . endif | | 43 | . endif |
44 | # only override the configure target if we know the platform, falling | | 44 | # only override the configure target if we know the platform, falling |
45 | # back to ./config's autodetection if not. | | 45 | # back to ./config's autodetection if not. |
46 | . if defined(OPENSSL_MACHINE_ARCH) && !empty(OPENSSL_MACHINE_ARCH) | | 46 | . if defined(OPENSSL_MACHINE_ARCH) && !empty(OPENSSL_MACHINE_ARCH) |
47 | CONFIGURE_SCRIPT= ./Configure | | 47 | CONFIGURE_SCRIPT= ./Configure |
48 | . if !empty(CC_VERSION:Mgcc*) | | 48 | . if !empty(CC_VERSION:Mgcc*) |
49 | CONFIGURE_ARGS+= solaris${${ABI}==64:?64:}-${OPENSSL_MACHINE_ARCH}-gcc | | 49 | CONFIGURE_ARGS+= solaris${${ABI}==64:?64:}-${OPENSSL_MACHINE_ARCH}-gcc |
50 | . else | | 50 | . else |
51 | CONFIGURE_ARGS+= solaris${${ABI}==64:?64:}-${OPENSSL_MACHINE_ARCH}-cc | | 51 | CONFIGURE_ARGS+= solaris${${ABI}==64:?64:}-${OPENSSL_MACHINE_ARCH}-cc |
52 | . endif | | 52 | . endif |
53 | . endif | | 53 | . endif |
54 | .elif ${OPSYS} == "IRIX" | | 54 | .elif ${OPSYS} == "IRIX" |
55 | CONFIGURE_ARGS+= no-asm | | 55 | CONFIGURE_ARGS+= no-asm |
56 | . if ${ABI} == "64" | | 56 | . if ${ABI} == "64" |
57 | CONFIGURE_SCRIPT= ./Configure | | 57 | CONFIGURE_SCRIPT= ./Configure |
58 | . if !empty(CC_VERSION:Mgcc*) | | 58 | . if !empty(CC_VERSION:Mgcc*) |
59 | CONFIGURE_ARGS+= irix64-mips4-gcc | | 59 | CONFIGURE_ARGS+= irix64-mips4-gcc |
60 | . else | | 60 | . else |
61 | CONFIGURE_ARGS+= irix64-mips4-cc | | 61 | CONFIGURE_ARGS+= irix64-mips4-cc |
62 | . endif | | 62 | . endif |
63 | . endif | | 63 | . endif |
64 | .elif ${OPSYS} == "OSF1" | | 64 | .elif ${OPSYS} == "OSF1" |
65 | USE_PLIST_SHLIB= no | | 65 | USE_PLIST_SHLIB= no |
66 | CONFIGURE_SCRIPT= ./Configure | | 66 | CONFIGURE_SCRIPT= ./Configure |
67 | . if !empty(CC_VERSION:Mgcc*) | | 67 | . if !empty(CC_VERSION:Mgcc*) |
68 | CONFIGURE_ARGS+= tru64-alpha-gcc | | 68 | CONFIGURE_ARGS+= tru64-alpha-gcc |
69 | . else | | 69 | . else |
70 | CONFIGURE_ARGS+= tru64-alpha-cc | | 70 | CONFIGURE_ARGS+= tru64-alpha-cc |
71 | . endif | | 71 | . endif |
72 | .elif ${OPSYS} == "Darwin" | | 72 | .elif ${OPSYS} == "Darwin" |
73 | CONFIGURE_SCRIPT= ./Configure | | 73 | CONFIGURE_SCRIPT= ./Configure |
74 | . if defined(ABI) && ${ABI} == "64" | | 74 | . if defined(ABI) && ${ABI} == "64" |
75 | CONFIGURE_ARGS+= darwin64-${MACHINE_ARCH}-cc | | 75 | CONFIGURE_ARGS+= darwin64-${MACHINE_ARCH}-cc |
76 | . elif ${MACHINE_ARCH} == "powerpc" | | 76 | . elif ${MACHINE_ARCH} == "powerpc" |
77 | CONFIGURE_ARGS+= darwin-ppc-cc | | 77 | CONFIGURE_ARGS+= darwin-ppc-cc |
78 | . else | | 78 | . else |
79 | CONFIGURE_ARGS+= darwin-${MACHINE_ARCH}-cc | | 79 | CONFIGURE_ARGS+= darwin-${MACHINE_ARCH}-cc |
80 | . endif | | 80 | . endif |
81 | | | 81 | |
82 | .include "../../mk/dlopen.buildlink3.mk" | | 82 | .include "../../mk/dlopen.buildlink3.mk" |
83 | | | 83 | |
84 | SUBST_CLASSES+= dl | | 84 | SUBST_CLASSES+= dl |
85 | SUBST_MESSAGE.dl= Adding dynamic link compatibility library. | | 85 | SUBST_MESSAGE.dl= Adding dynamic link compatibility library. |
86 | SUBST_STAGE.dl= post-configure | | 86 | SUBST_STAGE.dl= post-configure |
87 | SUBST_FILES.dl= Makefile apps/Makefile crypto/Makefile \ | | 87 | SUBST_FILES.dl= Makefile apps/Makefile crypto/Makefile \ |
88 | crypto/pkcs7/Makefile test/Makefile | | 88 | crypto/pkcs7/Makefile test/Makefile |
89 | SUBST_SED.dl= -e 's,^EX_LIBS=,EX_LIBS=${DL_LDFLAGS:Q} ,g' | | 89 | SUBST_SED.dl= -e 's,^EX_LIBS=,EX_LIBS=${DL_LDFLAGS:Q} ,g' |
90 | | | 90 | |
91 | .elif ${OPSYS} == "Interix" | | 91 | .elif ${OPSYS} == "Interix" |
92 | | | 92 | |
93 | SUBST_CLASSES+= soname | | 93 | SUBST_CLASSES+= soname |
94 | SUBST_STAGE.soname= post-configure | | 94 | SUBST_STAGE.soname= post-configure |
95 | SUBST_FILES.soname= Makefile.shared | | 95 | SUBST_FILES.soname= Makefile.shared |
96 | SUBST_SED.soname= -e 's/-Wl,-soname=/-Wl,-h,/g' | | 96 | SUBST_SED.soname= -e 's/-Wl,-soname=/-Wl,-h,/g' |
97 | | | 97 | |
98 | .elif ${OPSYS} == "HPUX" | | 98 | .elif ${OPSYS} == "HPUX" |
99 | | | 99 | |
100 | CONFIGURE_SCRIPT= ./Configure | | 100 | CONFIGURE_SCRIPT= ./Configure |
101 | | | 101 | |
102 | . if ${ABI} == "64" | | 102 | . if ${ABI} == "64" |
103 | . if ${MACHINE_ARCH} == "hppa" | | 103 | . if ${MACHINE_ARCH} == "hppa" |
104 | CONFIGURE_ARGS+= hpux64-parisc2-${CC} | | 104 | CONFIGURE_ARGS+= hpux64-parisc2-${CC} |
105 | . else | | 105 | . else |
106 | CONFIGURE_ARGS+= hpux64-ia64-${CC} | | 106 | CONFIGURE_ARGS+= hpux64-ia64-${CC} |
107 | . endif | | 107 | . endif |
108 | . else | | 108 | . else |
109 | . if ${MACHINE_ARCH} == "hppa" | | 109 | . if ${MACHINE_ARCH} == "hppa" |
110 | CONFIGURE_ARGS+= hpux-parisc-${CC} | | 110 | CONFIGURE_ARGS+= hpux-parisc-${CC} |
111 | . else | | 111 | . else |
112 | CONFIGURE_ARGS+= hpux-ia64-${CC} | | 112 | CONFIGURE_ARGS+= hpux-ia64-${CC} |
113 | . endif | | 113 | . endif |
114 | . endif | | 114 | . endif |
115 | .elif ${OPSYS} == "Cygwin" | | 115 | .elif ${OPSYS} == "Cygwin" |
116 | USE_PLIST_SHLIB= no | | 116 | USE_PLIST_SHLIB= no |
117 | .endif | | 117 | .endif |
118 | | | 118 | |
119 | .include "../../security/openssl/options.mk" | | 119 | .include "../../security/openssl/options.mk" |
120 | | | 120 | |
121 | CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS} | | 121 | CONFIGURE_ARGS+= ${CFLAGS} ${LDFLAGS} |
122 | CONFIGURE_ENV+= PERL=${PERL5:Q} | | 122 | CONFIGURE_ENV+= PERL=${PERL5:Q} |
123 | | | 123 | |
| | | 124 | PLIST_SRC+= ${PKGDIR}/PLIST.common |
124 | USE_PLIST_SHLIB?= yes | | 125 | USE_PLIST_SHLIB?= yes |
125 | .if ${USE_PLIST_SHLIB} == "yes" | | 126 | .if ${USE_PLIST_SHLIB} == "yes" |
126 | PLIST_SRC+= ${PKGDIR}/PLIST.shlib | | 127 | PLIST_SRC+= ${PKGDIR}/PLIST.shlib |
127 | .endif | | 128 | .endif |
128 | PLIST_SUBST+= SHLIB_VERSION=${OPENSSL_VERS:C/[^0-9]*$//} | | 129 | PLIST_SUBST+= SHLIB_VERSION=${OPENSSL_VERS:C/[^0-9]*$//} |
129 | PLIST_SUBST+= SHLIB_MAJOR=${OPENSSL_VERS:C/\..*$//} | | 130 | PLIST_SUBST+= SHLIB_MAJOR=${OPENSSL_VERS:C/\..*$//} |
130 | | | 131 | |
131 | PKG_SYSCONFSUBDIR= openssl | | 132 | PKG_SYSCONFSUBDIR= openssl |
132 | CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \ | | 133 | CONF_FILES= ${PREFIX}/share/examples/openssl/openssl.cnf \ |
133 | ${PKG_SYSCONFDIR}/openssl.cnf | | 134 | ${PKG_SYSCONFDIR}/openssl.cnf |
134 | OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private | | 135 | OWN_DIRS= ${PKG_SYSCONFDIR}/certs ${PKG_SYSCONFDIR}/private |
135 | | | 136 | |
136 | INSTALLATION_DIRS+= share/examples/openssl | | 137 | INSTALLATION_DIRS+= share/examples/openssl |
137 | | | 138 | |
138 | # Fix the path to perl in various scripts. | | 139 | # Fix the path to perl in various scripts. |
139 | pre-configure: | | 140 | pre-configure: |
140 | cd ${WRKSRC} && ${PERL5} util/perlpath.pl ${PERL5} | | 141 | cd ${WRKSRC} && ${PERL5} util/perlpath.pl ${PERL5} |
141 | | | 142 | |
142 | .include "../../mk/bsd.pkg.mk" | | 143 | .include "../../mk/bsd.pkg.mk" |