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