3 # MAINTAINER: ports@FreeBSD.org
5 # Provide default versions for ports with multiple versions selectable
8 # Users who want to override these defaults can easily do so by defining
9 # DEFAULT_VERSIONS in their make.conf as follows:
11 # DEFAULT_VERSIONS= perl5=5.20 ruby=2.0
13 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK)
14 _INCLUDE_BSD_DEFAULT_VERSIONS_MK= yes
16 LOCALBASE?= /usr/local
18 .for lang in APACHE BDB FIREBIRD FPC GCC GHOSTSCRIPT LINUX LUA MYSQL PERL5 \
19 PGSQL PHP PYTHON PYTHON2 PYTHON3 RUBY SSL TCLTK
20 .if defined(${lang}_DEFAULT)
21 WARNING+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
22 WARNING+= "This behaviour has never been supported and will be removed on 2017-01-31"
24 #.undef ${lang}_DEFAULT
27 .for lang in ${DEFAULT_VERSIONS}
29 ${_l:tu}_DEFAULT= ${lang:C/.*=//g}
32 .if exists(/usr/lib/priv/libprivate_ssl.so)
33 SSL_DEFAULT?= libressl
36 # Possible values: 2.2, 2.4
38 # Possible values: 48, 5, 6
40 # Possible values: 2.5
41 FIREBIRD_DEFAULT?= 2.5
42 # Possible values: 3.0.0
44 # Possible values: 4.8, 4.9, 5, 6
46 # Possible values: 7, 8, 9, agpl
47 GHOSTSCRIPT_DEFAULT?= agpl
49 # Possible values: c6, c6_64, c7
55 .if defined(OVERRIDE_LINUX_BASE_PORT)
56 LINUX_DEFAULT:= ${OVERRIDE_LINUX_BASE_PORT}
57 WARNING+= "OVERRIDE_LINUX_BASE_PORT is deprecated, please use DEFAULT_VERSIONS+=linux=${OVERRIDE_LINUX_BASE_PORT}."
59 # Possible values: 5.1, 5.2, 5.3
61 # Possible values: 5.5, 5.6, 5.7, 8.0, 5.5m, 10.0m, 10.1m, 10.2m, 5.5p, 5.6p, 5.7p, 5.6w
63 # Possible values: 5.22, 5.24, 5.26, devel
64 .if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \
65 defined(PACKAGE_BUILDING))
67 .elif !defined(PERL5_DEFAULT)
68 # There's no need to replace development versions, like "5.23" with "devel"
69 # because 1) nobody is supposed to use it outside of poudriere, and 2) it must
70 # be set manually in /etc/make.conf in the first place, and we're never getting
72 .if !defined(_PERL5_FROM_BIN)
73 _PERL5_FROM_BIN!= perl -e 'printf "%vd\n", $$^V;'
75 _EXPORTED_VARS+= _PERL5_FROM_BIN
76 PERL5_DEFAULT:= ${_PERL5_FROM_BIN:R}
78 # Possible values: 9.2, 9.3, 9.4, 9.5, 9.6
80 # Possible values: 5.6, 7.0, 7.1
82 # Possible values: 2.7, 3.3, 3.4, 3.5, 3.6
84 # Possible values: 2.7
86 # Possible values: 3.3, 3.4, 3.5, 3.6
88 # Possible values: 2.2, 2.3, 2.4
90 # Possible values: 4.4, 4.5, 4.6
92 # Possible values: base, openssl, openssl-devel, libressl, libressl-devel
93 .if !defined(SSL_DEFAULT)
94 # If no preference was set, check for an installed base version
95 # but give an installed port preference over it.
96 . if defined(WITH_OPENSSL_PORT)
97 . if defined(OPENSSL_PORT)
98 SSL_DEFAULT:=${OPENSSL_PORT:T}
99 WARNING+= "Using WITH_OPENSSL_PORT and OPENSSL_PORT in make.conf is deprecated, replace them with DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} in your make.conf"
102 WARNING+= "Using WITH_OPENSSL_PORT in make.conf is deprecated, replace it with DEFAULT_VERSIONS+=ssl=openssl in your make.conf"
104 . elif defined(WITH_OPENSSL_BASE)
106 WARNING+= "Using WITH_OPENSSL_BASE in make.conf is deprecated, replace it with DEFAULT_VERSIONS+=ssl=base in your make.conf"
107 . elif !defined(WITH_OPENSSL_BASE) && \
108 !defined(WITH_OPENSSL_PORT) && \
109 !defined(SSL_DEFAULT) && \
110 !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \
111 exists(${DESTDIR}/usr/include/openssl/opensslv.h)
114 . if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so)
115 . if defined(PKG_BIN)
116 # find installed port and use it for dependency
117 . if !defined(OPENSSL_INSTALLED)
118 . if defined(DESTDIR)
119 PKGARGS= -c ${DESTDIR}
123 OPENSSL_INSTALLED!= ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || :
125 . if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED)
126 SSL_DEFAULT:= ${OPENSSL_INSTALLED:T}
127 WARNING+= "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf"
131 @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable"
132 @${ECHO_MSG} "to determine what port it comes from."
133 @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl=<openssl package name> to your /etc/make.conf and try again."
138 # Make sure we have a default in the end
141 # Possible values: 8.4, 8.5, 8.6
144 # Possible values: 4, 5