[packages/monodevelop] Fix build against mono 6.14 and OpenSSL 3; rel 4
arekm
arekm at pld-linux.org
Sun Aug 16 22:59:17 CEST 2026
commit 00f230ca80219a8a34df1d3ccd5b5fb13888a7fa
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sun Aug 16 22:57:37 2026 +0200
Fix build against mono 6.14 and OpenSSL 3; rel 4
monodevelop-aspnet.patch | 18 ++---
monodevelop-libgit2-openssl.patch | 140 ++++++++++++++++++++++++++++++++++++++
monodevelop.spec | 5 +-
3 files changed, 153 insertions(+), 10 deletions(-)
---
diff --git a/monodevelop.spec b/monodevelop.spec
index 14b4c6a..b237412 100644
--- a/monodevelop.spec
+++ b/monodevelop.spec
@@ -8,7 +8,7 @@ Summary: Mono IDE
Summary(pl.UTF-8): IDE dla Mono
Name: monodevelop
Version: 5.10.0.871
-Release: 3
+Release: 4
# most of code is MIT-licensed, some parts LGPL v2
License: LGPL v2, MIT
Group: Development/Tools
@@ -21,6 +21,7 @@ Patch3: %{name}-avoidgiterrors.patch
Patch4: %{name}-nuget-unbundle.patch
Patch5: %{name}-no-nuget-packages.patch
Patch6: %{name}-json.patch
+Patch7: %{name}-libgit2-openssl.patch
URL: http://monodevelop.com/
BuildRequires: autoconf >= 2.53
BuildRequires: automake >= 1:1.10
@@ -45,7 +46,6 @@ Requires: dotnet-gtk-sharp2 >= 2.12.8
Requires: hicolor-icon-theme
Requires: pkgconfig
%{?with_subversion:Requires: subversion-libs}
-Requires: xulrunner-libs
Suggests: ctags
Suggests: mono-compat-links >= 3.0.4
Suggests: mono-csharp >= 3.0.4
@@ -102,6 +102,7 @@ możliwości, a wśród nich:
%patch -P4 -p1
%patch -P5 -p1
%patch -P6 -p1
+%patch -P7 -p1
%{__sed} -i -e 's,\.\./version\.config,version.config,' configure.in
# bash is needed because of exec -a; avoid hiding dependency by env
diff --git a/monodevelop-aspnet.patch b/monodevelop-aspnet.patch
index 2553fd8..e4e585a 100644
--- a/monodevelop-aspnet.patch
+++ b/monodevelop-aspnet.patch
@@ -1,13 +1,14 @@
---- monodevelop-5.10/src/addins/AspNet/MonoDevelop.AspNet.csproj.orig 2015-11-17 15:29:48.000000000 +0100
-+++ monodevelop-5.10/src/addins/AspNet/MonoDevelop.AspNet.csproj 2016-02-02 21:18:04.078237294 +0100
-@@ -116,27 +116,13 @@
+--- monodevelop-5.10/src/addins/AspNet/MonoDevelop.AspNet.csproj
++++ monodevelop-5.10/src/addins/AspNet/MonoDevelop.AspNet.csproj
+@@ -116,27 +116,17 @@
<Name>MonoDevelop.Xml</Name>
<Private>False</Private>
</ProjectReference>
- <Reference Include="Microsoft.Web.Infrastructure">
- <HintPath>..\..\..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
- </Reference>
-- <Reference Include="System.Web.Razor">
++ <Reference Include="Microsoft.Web.Infrastructure" />
+ <Reference Include="System.Web.Razor">
- <HintPath>..\..\..\packages\Microsoft.AspNet.Razor.3.2.2\lib\net45\System.Web.Razor.dll</HintPath>
- </Reference>
- <Reference Include="System.Web.Helpers">
@@ -24,9 +25,10 @@
- </Reference>
- <Reference Include="System.Web.Mvc">
- <HintPath>..\..\..\packages\Microsoft.AspNet.Mvc.5.2.2\lib\net45\System.Web.Mvc.dll</HintPath>
-- </Reference>
-+ <Reference Include="Microsoft.Web.Infrastructure" />
-+ <Reference Include="System.Web.Razor" />
++ <!-- the 4.5-api reference assembly omits the internals this addin uses -->
++ <HintPath>/usr/lib/mono/4.5/System.Web.Razor.dll</HintPath>
++ <Private>False</Private>
+ </Reference>
+ <Reference Include="System.Web.Helpers" />
+ <Reference Include="System.Web.WebPages" />
+ <Reference Include="System.Web.WebPages.Deployment" />
@@ -35,7 +37,7 @@
</ItemGroup>
<ItemGroup>
<Reference Include="System" />
-@@ -458,34 +444,6 @@
+@@ -458,34 +448,6 @@
<None Include="Templates\Projects\WebApplication.xpt.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
diff --git a/monodevelop-libgit2-openssl.patch b/monodevelop-libgit2-openssl.patch
new file mode 100644
index 0000000..5d88624
--- /dev/null
+++ b/monodevelop-libgit2-openssl.patch
@@ -0,0 +1,140 @@
+Build bundled libgit2 against OpenSSL 1.1+.
+
+BIO_METHOD became opaque in OpenSSL 1.1, so the static initialiser and the
+b->ptr / b->init accesses no longer compile. Build the method at runtime
+instead, from init_ssl() which libgit2 already runs exactly once, and reach
+the stream through BIO_get_data()/BIO_set_data().
+
+--- monodevelop-5.10/external/libgit2/src/openssl_stream.c
++++ monodevelop-5.10/external/libgit2/src/openssl_stream.c
+@@ -33,10 +33,9 @@
+
+ static int bio_create(BIO *b)
+ {
+- b->init = 1;
+- b->num = 0;
+- b->ptr = NULL;
+- b->flags = 0;
++ BIO_set_init(b, 1);
++ BIO_set_data(b, NULL);
++ BIO_clear_flags(b, ~0);
+
+ return 1;
+ }
+@@ -46,23 +45,22 @@
+ if (!b)
+ return 0;
+
+- b->init = 0;
+- b->num = 0;
+- b->ptr = NULL;
+- b->flags = 0;
++ BIO_set_init(b, 0);
++ BIO_set_data(b, NULL);
++ BIO_clear_flags(b, ~0);
+
+ return 1;
+ }
+
+ static int bio_read(BIO *b, char *buf, int len)
+ {
+- git_stream *io = (git_stream *) b->ptr;
++ git_stream *io = (git_stream *) BIO_get_data(b);
+ return (int) git_stream_read(io, buf, len);
+ }
+
+ static int bio_write(BIO *b, const char *buf, int len)
+ {
+- git_stream *io = (git_stream *) b->ptr;
++ git_stream *io = (git_stream *) BIO_get_data(b);
+ return (int) git_stream_write(io, buf, len, 0);
+ }
+
+@@ -91,17 +89,31 @@
+ return bio_write(b, str, strlen(str));
+ }
+
+-static BIO_METHOD git_stream_bio_method = {
+- BIO_TYPE_SOURCE_SINK,
+- "git_stream",
+- bio_write,
+- bio_read,
+- bio_puts,
+- bio_gets,
+- bio_ctrl,
+- bio_create,
+- bio_destroy
+-};
++static BIO_METHOD *git_stream_bio_method;
++
++/* BIO_METHOD is opaque since OpenSSL 1.1, so it has to be built at runtime.
++ * Called once from init_ssl(). */
++int git_openssl_stream_global_init(void)
++{
++ int type = BIO_get_new_index();
++
++ if (type == -1)
++ return -1;
++
++ git_stream_bio_method = BIO_meth_new(type | BIO_TYPE_SOURCE_SINK, "git_stream");
++ if (!git_stream_bio_method)
++ return -1;
++
++ BIO_meth_set_write(git_stream_bio_method, bio_write);
++ BIO_meth_set_read(git_stream_bio_method, bio_read);
++ BIO_meth_set_puts(git_stream_bio_method, bio_puts);
++ BIO_meth_set_gets(git_stream_bio_method, bio_gets);
++ BIO_meth_set_ctrl(git_stream_bio_method, bio_ctrl);
++ BIO_meth_set_create(git_stream_bio_method, bio_create);
++ BIO_meth_set_destroy(git_stream_bio_method, bio_destroy);
++
++ return 0;
++}
+
+ static int ssl_set_error(SSL *ssl, int error)
+ {
+@@ -318,9 +330,9 @@
+ if ((ret = git_stream_connect(st->io)) < 0)
+ return ret;
+
+- bio = BIO_new(&git_stream_bio_method);
++ bio = BIO_new(git_stream_bio_method);
+ GITERR_CHECK_ALLOC(bio);
+- bio->ptr = st->io;
++ BIO_set_data(bio, st->io);
+
+ SSL_set_bio(st->ssl, bio, bio);
+ /* specify the host in case SNI is needed */
+--- monodevelop-5.10/external/libgit2/src/openssl_stream.h
++++ monodevelop-5.10/external/libgit2/src/openssl_stream.h
+@@ -9,6 +9,7 @@
+
+ #include "git2/sys/stream.h"
+
++extern int git_openssl_stream_global_init(void);
+ extern int git_openssl_stream_new(git_stream **out, const char *host, const char *port);
+
+ #endif
+--- monodevelop-5.10/external/libgit2/src/global.c
++++ monodevelop-5.10/external/libgit2/src/global.c
+@@ -90,6 +90,8 @@
+ }
+ #endif
+
++#include "openssl_stream.h"
++
+ static void init_ssl(void)
+ {
+ #ifdef GIT_OPENSSL
+@@ -115,6 +117,11 @@
+ if (!SSL_CTX_set_default_verify_paths(git__ssl_ctx)) {
+ SSL_CTX_free(git__ssl_ctx);
+ git__ssl_ctx = NULL;
++ return;
++ }
++ if (git_openssl_stream_global_init() < 0) {
++ SSL_CTX_free(git__ssl_ctx);
++ git__ssl_ctx = NULL;
+ }
+ #endif
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/monodevelop.git/commitdiff/00f230ca80219a8a34df1d3ccd5b5fb13888a7fa
More information about the pld-cvs-commit
mailing list