Sync Mk with ports
[dports.git] / Mk / bsd.default-versions.mk
1 # MAINTAINER:   ports@FreeBSD.org
2 #
3 # Note: before committing to this file, contact portmgr to arrange for an
4 # experimental ports run.  Untested commits may be backed out at portmgr's
5 # discretion.
6 #
7 # Provide default versions for ports with multiple versions selectable
8 # by the user.
9 #
10 # Users who want to override these defaults can easily do so by defining
11 # DEFAULT_VERSIONS in their make.conf as follows:
12 #
13 #   DEFAULT_VERSIONS=   perl5=5.20 ruby=3.1
14
15 .if !defined(_INCLUDE_BSD_DEFAULT_VERSIONS_MK)
16 _INCLUDE_BSD_DEFAULT_VERSIONS_MK=       yes
17
18 LOCALBASE?=     /usr/local
19
20 .  for lang in APACHE BDB COROSYNC EMACS FIREBIRD FORTRAN FPC GCC \
21         GHOSTSCRIPT GL GO IMAGEMAGICK JAVA LAZARUS LIBRSVG2 LINUX LLVM \
22         LUA LUAJIT MONO MYSQL NINJA NODEJS OPENLDAP PERL5 PGSQL PHP PYTHON \
23         PYTHON2 PYTHON3 RUBY RUST SAMBA SSL TCLTK VARNISH
24 .    if defined(${lang}_DEFAULT)
25 ERROR+= "The variable ${lang}_DEFAULT is set and it should only be defined through DEFAULT_VERSIONS+=${lang:tl}=${${lang}_DEFAULT} in /etc/make.conf"
26 .    endif
27 #.undef ${lang}_DEFAULT
28 .  endfor
29
30 .  for lang in ${DEFAULT_VERSIONS}
31 _l=             ${lang:C/=.*//g}
32 ${_l:tu}_DEFAULT=       ${lang:C/.*=//g}
33 .  endfor
34
35 # tuxillo: since 2021Q4 we default to openssl again
36 SSL_DEFAULT?=  openssl
37
38 # Possible values: 2.4
39 APACHE_DEFAULT?=        2.4
40 # Possible values: 5, 18
41 BDB_DEFAULT?=           5
42 # Possible values: 2, 3
43 COROSYNC_DEFAULT?=      2
44 # Possible_values: full canna nox devel_full devel_nox
45 #EMACS_DEFAULT?=        let the flavor be the default if not explicitly set
46 # Possible values: 3.0, 4.0
47 FIREBIRD_DEFAULT?=      3.0
48 # Possible values: gfortran
49 FORTRAN_DEFAULT?=       gfortran
50 # Possible values: 3.2.2
51 FPC_DEFAULT?=           3.2.2
52 # Possible values: 8 (last to support powerpcspe), 9, 10, 11, 12
53 # (Any other version is completely unsupported and not meant for general use.)
54 .  if ${ARCH} == "powerpcspe"
55 GCC_DEFAULT?=           8
56 .  else
57 GCC_DEFAULT?=           12
58 .  endif
59 # Possible values: 9, agpl, 10
60 GHOSTSCRIPT_DEFAULT?=   agpl
61 # Possible values: mesa-libs, mesa-devel
62 GL_DEFAULT?=            mesa-libs
63 # Possible values: 1.18, 1.19, 1.20, 1.21-devel
64 GO_DEFAULT?=            1.20
65 # Possible versions: 6, 7
66 # Possible flavors:  x11, nox11
67 #                    (defaults to x11 when not specified)
68 # Format:            version[-flavor]
69 # Examples:          6-nox11, 7
70 IMAGEMAGICK_DEFAULT?=   7
71 # Possible values: 7, 8, 11, 17, 18
72 JAVA_DEFAULT?=          8
73 # Possible values: 2.2.6, 2.3.0
74 .  if !defined(WANT_LAZARUS_DEVEL)
75 LAZARUS_DEFAULT?=       2.2.6
76 .  else
77 LAZARUS_DEFAULT?=       2.3.0
78 .  endif
79 # Possible values: rust, legacy
80 .  if empty(ARCH:Naarch64:Nx86_64:Narmv7:Ni386:Npowerpc64:Npowerpc64le:Npowerpc:Nriscv64)
81 LIBRSVG2_DEFAULT?=      rust
82 .  else
83 LIBRSVG2_DEFAULT?=      legacy
84 .  endif
85 # Possible values: c7
86 LINUX_DEFAULT?=         c7
87 # Possible values: 10, 11, 12, 13, 14, 15, -devel (to be used when non-base compiler is required)
88 LLVM_DEFAULT?=          15
89 # Possible values: 5.1, 5.2, 5.3, 5.4
90 LUA_DEFAULT?=           5.4
91 # Possible values: luajit, luajit-devel, luajit-openresty
92 .  if ${ARCH:Mpowerpc64*}
93 LUAJIT_DEFAULT?=        luajit-openresty
94 .  else
95 LUAJIT_DEFAULT?=        luajit-devel
96 .  endif
97 # Possible values: 5.10, 5.20, 6.8
98 MONO_DEFAULT?=          5.10
99 # Possible values: 5.7, 8.0, 10.5m, 10.6m, 10.11m, 5.7p, 5.7w
100 MYSQL_DEFAULT?=         8.0
101 # Possible values: ninja, samurai
102 NINJA_DEFAULT?=         ninja
103 # Possible value: 16, 18, 20, current, lts (Note: current = 20 and lts = 18)
104 NODEJS_DEFAULT?=        lts
105 # Possible value: 24, 25, 26
106 OPENLDAP_DEFAULT?=      26
107 # Possible values: 5.32, 5.34, 5.36, 5.38, devel
108 .  if !exists(${LOCALBASE}/bin/perl) || (!defined(_PORTS_ENV_CHECK) && \
109     defined(PACKAGE_BUILDING))
110 PERL5_DEFAULT?=         5.32
111 .  elif !defined(PERL5_DEFAULT)
112 # There's no need to replace development versions, like "5.23" with "devel"
113 # because 1) nobody is supposed to use it outside of poudriere, and 2) it must
114 # be set manually in /etc/make.conf in the first place, and we're never getting
115 # in here.
116 .    if !defined(_PERL5_FROM_BIN)
117 _PERL5_FROM_BIN!=       ${LOCALBASE}/bin/perl -e 'printf "%vd\n", $$^V;'
118 .    endif
119 _EXPORTED_VARS+=        _PERL5_FROM_BIN
120 PERL5_DEFAULT:=         ${_PERL5_FROM_BIN:R}
121 .  endif
122 # Possible values: 11, 12, 13, 14, 15
123 PGSQL_DEFAULT?=         13
124 # Possible values: 8.0, 8.1, 8.2, 8.3
125 PHP_DEFAULT?=           8.1
126 # Possible values: 2.7, 3.8, 3.9, 3.10, 3.11
127 PYTHON_DEFAULT?=        3.9
128 # Possible values: 2.7
129 PYTHON2_DEFAULT?=       2.7
130 # Possible values: 3.8, 3.9, 3.10, 3.11
131 PYTHON3_DEFAULT?=       3.9
132 # Possible values: 3.0, 3.1, 3.2, 3.3
133 RUBY_DEFAULT?=          3.1
134 # Possible values: rust, rust-nightly
135 RUST_DEFAULT?=          rust
136 # Possible values: 4.13, 4.16
137 SAMBA_DEFAULT?=         4.13
138 # Possible values: base, openssl, libressl, libressl-devel
139 .  if !defined(SSL_DEFAULT)
140 #       If no preference was set, check for an installed base version
141 #       but give an installed port preference over it.
142 .    if !defined(SSL_DEFAULT) && \
143         !exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so) && \
144         exists(${DESTDIR}/usr/include/openssl/opensslv.h)
145 SSL_DEFAULT=    base
146 .    else
147 .      if exists(${DESTDIR}/${LOCALBASE}/lib/libcrypto.so)
148 .        if defined(PKG_BIN)
149 # find installed port and use it for dependency
150 .          if !defined(OPENSSL_INSTALLED)
151 .            if defined(DESTDIR)
152 PKGARGS=        -c ${DESTDIR}
153 .            else
154 PKGARGS=
155 .            endif
156 OPENSSL_INSTALLED!=     ${PKG_BIN} ${PKGARGS} which -qo ${LOCALBASE}/lib/libcrypto.so || :
157 .          endif
158 .          if defined(OPENSSL_INSTALLED) && !empty(OPENSSL_INSTALLED)
159 SSL_DEFAULT:=           ${OPENSSL_INSTALLED:T}
160 WARNING+=       "You have ${OPENSSL_INSTALLED} installed but do not have DEFAULT_VERSIONS+=ssl=${SSL_DEFAULT} set in your make.conf"
161 .          endif
162 .        else
163 check-makevars::
164         @${ECHO_MSG} "You have a ${LOCALBASE}/lib/libcrypto.so file installed, but the framework is unable"
165         @${ECHO_MSG} "to determine what port it comes from."
166         @${ECHO_MSG} "Add DEFAULT_VERSIONS+=ssl=<openssl package name> to your /etc/make.conf and try again."
167         @${FALSE}
168 .        endif
169 .      endif
170 .    endif
171 # Make sure we have a default in the end
172 SSL_DEFAULT?=   base
173 .  endif
174 # Possible values: 8.5, 8.6, 8.7
175 TCLTK_DEFAULT?=         8.6
176 # Possible values: 6, 7
177 VARNISH_DEFAULT?=       6
178
179 .endif