Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 779577 | Differences between
and this patch

Collapse All | Expand All

(-)a/dev-lang/mono/files/mono-6.12.0.122-gss.patch (+126 lines)
Line 0 Link Here
1
--- /configure.ac
2
+++ /configure.ac
3
@@ -3804,45 +3804,74 @@
4
 	# HAVE_CURLPIPE_MULTIPLEX check skipped because we don't use libcurl in mono
5
 	# HAVE_CURL_SSLVERSION_TLSv1_012 check skipped because we don't use libcurl in mono
6
 
7
-	enable_gss=no;
8
-	AC_MSG_CHECKING(for GSS/GSS.h)
9
-	AC_TRY_COMPILE([
10
-			#include <GSS/GSS.h>
11
-	], [
12
-	],[
13
-			AC_MSG_RESULT(yes)
14
-			AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h])
15
-			AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
16
-			enable_gss=yes
17
-			AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
18
-	], [
19
-			AC_MSG_RESULT(no)
20
-	])
21
+	AC_ARG_ENABLE(gss, [  --enable-gss    Enable support for GSS (enabled by default)], enable_gss=$enableval, enable_gss=yes)
22
+	if test "x$enable_gss" = "xyes"; then
23
+		AC_MSG_CHECKING(for GSS/GSS.h)
24
+		AC_TRY_COMPILE([
25
+				#include <GSS/GSS.h>
26
+		], [
27
+		],[
28
+				AC_MSG_RESULT(yes)
29
+				AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h])
30
+				AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
31
+				AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
32
+		], [
33
+				AC_MSG_RESULT(no)
34
 
35
-	AC_MSG_CHECKING(for gssapi/gssapi_ext.h)
36
-	AC_TRY_COMPILE([
37
-			#include <gssapi/gssapi_ext.h>
38
-	], [
39
-	],[
40
-			AC_MSG_RESULT(yes)
41
-			enable_gss=yes
42
-			AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
43
-	], [
44
-			AC_MSG_RESULT(no)
45
-	])
46
+				AC_MSG_CHECKING(for gssapi/gssapi_ext.h)
47
+				AC_TRY_COMPILE([
48
+						#include <gssapi/gssapi_ext.h>
49
+				], [
50
+				],[
51
+						AC_MSG_RESULT(yes)
52
+						AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
53
+				], [
54
+						AC_MSG_RESULT(no)
55
+
56
+						AC_MSG_CHECKING(for gssapi/gssapi.h)
57
+						AC_TRY_COMPILE([
58
+								#include <gssapi/gssapi.h>
59
+						], [
60
+						],[
61
+								AC_MSG_RESULT(yes)
62
+
63
+								AC_DEFINE(ENABLE_GSS, 1, [ENABLE_GSS])
64
+								AC_DEFINE(HAVE_HEIMDAL_HEADERS, 1, [HAVE_HEIMDAL_HEADERS])
65
+						], [
66
+								AC_MSG_RESULT(no)
67
+								enable_gss=no
68
+						])
69
+				])
70
+		])
71
 
72
-	AC_MSG_CHECKING(for GSS_SPNEGO_MECHANISM)
73
-	AC_TRY_COMPILE([
74
-			#include <gssapi/gssapi_ext.h>
75
-			#include <gssapi/gssapi_krb5.h>
76
-			gss_OID_set_desc gss_mech_spnego_OID_set_desc = {.count = 1, .elements = GSS_SPNEGO_MECHANISM};
77
-	], [
78
-	],[
79
-			AC_MSG_RESULT(yes)
80
-			AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
81
-	], [
82
-			AC_MSG_RESULT(no)
83
-	])
84
+		if test "x$enable_gss" = "xyes"; then
85
+			AC_MSG_CHECKING(for GSS_SPNEGO_MECHANISM)
86
+			AC_TRY_COMPILE([
87
+					#if HAVE_HEIMDAL_HEADERS
88
+					#include <gssapi/gssapi.h>
89
+					#else
90
+					#include <gssapi/gssapi_ext.h>
91
+					#endif
92
+					#include <gssapi/gssapi_krb5.h>
93
+					gss_OID_set_desc gss_mech_spnego_OID_set_desc = {.count = 1, .elements = GSS_SPNEGO_MECHANISM};
94
+			], [
95
+			],[
96
+					AC_MSG_RESULT(yes)
97
+					AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
98
+			], [
99
+					AC_MSG_RESULT(no)
100
+			])
101
+
102
+			gssapi_lib=""
103
+			AC_CHECK_LIB(gssapi_krb5, gss_acquire_cred, [
104
+				gssapi_lib="-lgssapi_krb5"
105
+			], [
106
+				AC_CHECK_LIB(gssapi, gss_acquire_cred, [
107
+					gssapi_lib="-lgssapi"
108
+				])
109
+			])
110
+		fi
111
+	fi
112
 
113
 	AM_CONDITIONAL(ENABLE_GSS, test x$enable_gss = xyes)
114
 
115
@@ -6494,9 +6523,9 @@
116
 	MONO_NATIVE_CFLAGS=$CFLAGS
117
 	MONO_NATIVE_LDFLAGS=$LDFLAGS
118
 	if test x$enable_gss = xyes; then
119
-		MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS -lgssapi_krb5"
120
+		MONO_NATIVE_LDFLAGS="$MONO_NATIVE_LDFLAGS ${gssapi_lib}"
121
 	else
122
-		AC_MSG_WARN([GSS is not enabled, it requires libkrb5-dev package])
123
+		AC_MSG_WARN([GSS is not enabled, it requires libkrb5-dev or libheimdal-dev package])
124
 	fi
125
 	mono_native=yes
126
 	mono_native_compat=no
(-)a/dev-lang/mono/mono-6.12.0.122.ebuild (-3 / +4 lines)
Lines 13-26 SRC_URI="https://download.mono-project.com/sources/mono/${P}.tar.xz" Link Here
13
LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
13
LICENSE="MIT LGPL-2.1 GPL-2 BSD-4 NPL-1.1 Ms-PL GPL-2-with-linking-exception IDPL"
14
SLOT="0"
14
SLOT="0"
15
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
15
KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
16
IUSE="doc minimal nls pax_kernel xen"
16
IUSE="doc kerberos minimal nls pax_kernel xen"
17
17
18
# Note: mono works incorrect with older versions of libgdiplus
18
# Note: mono works incorrect with older versions of libgdiplus
19
# Details on dotnet overlay issue: https://github.com/gentoo/dotnet/issues/429
19
# Details on dotnet overlay issue: https://github.com/gentoo/dotnet/issues/429
20
DEPEND="
20
DEPEND="
21
	app-crypt/mit-krb5[${MULTILIB_USEDEP}]
22
	sys-libs/zlib[${MULTILIB_USEDEP}]
21
	sys-libs/zlib[${MULTILIB_USEDEP}]
23
	ia64? ( sys-libs/libunwind )
22
	ia64? ( sys-libs/libunwind )
23
	kerberos? ( virtual/krb5[${MULTILIB_USEDEP}] )
24
	!minimal? ( >=dev-dotnet/libgdiplus-6.0.2 )
24
	!minimal? ( >=dev-dotnet/libgdiplus-6.0.2 )
25
	nls? ( sys-devel/gettext )
25
	nls? ( sys-devel/gettext )
26
"
26
"
Lines 36-41 BDEPEND=" Link Here
36
36
37
PATCHES=(
37
PATCHES=(
38
	"${FILESDIR}"/${PN}-5.12-try-catch.patch
38
	"${FILESDIR}"/${PN}-5.12-try-catch.patch
39
	"${FILESDIR}"/${PN}-6.12.0.122-gss.patch
39
)
40
)
40
41
41
pkg_pretend() {
42
pkg_pretend() {
Lines 87-92 multilib_src_configure() { Link Here
87
		--disable-dtrace
88
		--disable-dtrace
88
		--enable-system-aot
89
		--enable-system-aot
89
		$(use_with doc mcs-docs)
90
		$(use_with doc mcs-docs)
91
		$(use_enable kerberos gss)
90
		$(use_enable nls)
92
		$(use_enable nls)
91
	)
93
	)
92
94
93
- 

Return to bug 779577