Bug 238089 - lang/mono: Update to 5.20 (5.10.0 dates to 2018-02)
Summary: lang/mono: Update to 5.20 (5.10.0 dates to 2018-02)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-mono (Nobody)
URL:
Keywords: patch
Depends on:
Blocks: 198727 255643 273001
  Show dependency treegraph
 
Reported: 2019-05-24 01:42 UTC by Conrad Meyer
Modified: 2023-08-08 11:29 UTC (History)
31 users (show)

See Also:


Attachments
Patch for port of lang/mono 5.20.1.19 (31.91 KB, patch)
2019-05-25 03:50 UTC, Dave Curylo
no flags Details | Diff
patch 5.20.1.34 (32.98 KB, patch)
2019-07-22 23:37 UTC, Igor Zabelin
no flags Details | Diff
patch 5.20.1.34 for actual version (32.99 KB, patch)
2019-09-24 13:25 UTC, Igor Zabelin
no flags Details | Diff
without a dependency on Python 2.7 (33.79 KB, patch)
2019-10-06 12:17 UTC, Igor Zabelin
no flags Details | Diff
The latest Stable Mono release is: 6.4.0 Stable (6.4.0.198) (36.63 KB, patch)
2019-12-01 21:55 UTC, Igor Zabelin
no flags Details | Diff
Patch to fix build on powerpc64 (3.38 KB, patch)
2019-12-02 23:36 UTC, Curtis Hamilton
no flags Details | Diff
Patch to 5.20.1.34 (34.13 KB, patch)
2019-12-03 12:58 UTC, Igor Zabelin
no flags Details | Diff
Patch to 6.4.0.198, support for powerpc64 (38.28 KB, patch)
2019-12-03 13:06 UTC, Igor Zabelin
no flags Details | Diff
Output of make makeplist (151.70 KB, text/plain)
2019-12-03 17:31 UTC, Curtis Hamilton
no flags Details
Patch to 6.4.0.198, support for powerpc64, pdb-mdb (101.69 KB, patch)
2019-12-03 20:29 UTC, Igor Zabelin
no flags Details | Diff
Patch to 6.4.0.198, support for powerpc64 (101.66 KB, patch)
2019-12-04 10:06 UTC, Igor Zabelin
no flags Details | Diff
Patch to 6.8.0.96, support for powerpc64 (117.36 KB, patch)
2020-01-24 13:55 UTC, Ralf van der Enden
tremere: maintainer-approval?
Details | Diff
Patch to 6.8.0.105 (114.16 KB, patch)
2020-02-26 20:31 UTC, Igor Zabelin
no flags Details | Diff
Patch to 6.8.0.105 (268.47 KB, patch)
2020-11-05 04:56 UTC, Todd martin
no flags Details | Diff
Patch to 6.8.0.105 fixed (264.41 KB, patch)
2020-11-07 03:25 UTC, Todd martin
no flags Details | Diff
Patch to 5.20.1.34 (35.05 KB, patch)
2020-11-17 02:12 UTC, Todd martin
no flags Details | Diff
patch-mono-6.12.0.113 (70.40 KB, patch)
2020-12-15 18:33 UTC, Alex Levy
no flags Details | Diff
Fix build WITH_NINJA (1.38 KB, patch)
2023-08-04 22:39 UTC, Marcin Cieślak
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Conrad Meyer freebsd_committer freebsd_triage 2019-05-24 01:42:14 UTC

    
Comment 1 Dave Curylo 2019-05-25 03:50:20 UTC
Created attachment 204600 [details]
Patch for port of lang/mono 5.20.1.19

Many of the changes needed for mono 5.10 were rolled into upstream by time this 5.20.1.19 was released, so this removes those patches. Also changes were made in mono/tests/Makefile.am and mono/utils/mono-state.c for FreeBSD support in upstream, but they didn't make it in time for the 5.20.1.19 cut, so this patch accounts for those as well.
Comment 2 Dave Curylo 2019-05-25 03:52:21 UTC
Coincidentally I was working on this earlier this week, so I completed and tested a patch, and attached to this issue.  Please review and let me know if anything else is needed, otherwise it will be nice to bump up to this newer mono release.
Comment 3 Conrad Meyer freebsd_committer freebsd_triage 2019-05-25 21:40:40 UTC
Hey Dave,

It's a happy coincidence! :-)  Your patch looks good to me, although I am not a ports committer and cannot approve it.
Comment 4 Daniel Porsch 2019-05-29 15:36:45 UTC
I tried this patch but I got this error:
===>  Building package for mono-5.20.1.19_1
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/de/LC_MESSAGES/mcs.mo:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/es/LC_MESSAGES/mcs.mo:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/ja/LC_MESSAGES/mcs.mo:No such file or directory
pkg-static: Unable to access file /wrkdirs/usr/ports/lang/mono/work/stage/usr/local/share/locale/pt_BR/LC_MESSAGES/mcs.mo:No such file or directory
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/mono
=>> Cleaning up wrkdir
===>  Cleaning for mono-5.20.1.19_1
build of lang/mono | mono-5.20.1.19_1 ended at Wed May 29 17:34:24 CEST 2019
build time: 00:57:23
!!! build failure encountered !!!

Full log here: 
https://poudriere.digiworks.se/data/freebsd_12-0x64-HEAD/2019-05-29_16h36m37s/logs/errors/mono-5.20.1.19_1.log

Not sure whats wrong? It seem to build, but the packaging fails. :-(
Comment 5 Daniel Porsch 2019-05-30 01:18:25 UTC
It worked after removing NLS from options_unset in make.conf 
(In reply to Daniel Porsch from comment #4)
Comment 6 Thibault Payet 2019-06-09 17:28:25 UTC
(In reply to Daniel Porsch from comment #4)
For this the fix is to append %%NLS%% the corresponding files in the pkg-plist, so that the patch should be more ok
Comment 7 Igor Zabelin 2019-07-21 13:47:22 UTC
I have a question, for what is py-pillow needed here? As RUN_DEPENDS?
Don't see any references to use this.
Py-pillow requires by default a lot of dependencies. 


CONFLICTS_INSTALL=      czmq-3*
also not actual (bug 223188)
Comment 8 Igor Zabelin 2019-07-22 23:37:34 UTC
Created attachment 205999 [details]
patch 5.20.1.34

Py-pillow is needed only for mono-heapviz tool which is not used in all cases.
Here's my version of the patch for 5.20.1.34. mono-heapviz optional and disabled by default. 
Fixed postexec cert-sync in pkg-plist. Mono certificate store must be synchronized with ca_root_nss after install.
Comment 9 Justin Kyryliuk 2019-08-30 12:10:51 UTC
I know me too posts are in general frowned upon and should be avoided, but I'd like to chime in that the importance of this is raising, as many mono-reliant packages have moved off of 5.10 and will only support them for a short-while longer (such as the Sonarr project).
Comment 10 kralizeck 2019-09-09 15:32:36 UTC
(In reply to Igor Zabelin from comment #8)
I'm trying to apply your patch with no luck... I'm newby in this matters..

On a copy of /usr/ports/lang/mono I run:
patch -C < /tmp/mono-patch-5.20.1.34

with no errors, so I apply the patch:

patch < /tmp/mono-patch-5.20.1.34

All seems ok.

Now I run:
make install clean

This is the output:

===>  License MIT accepted by the user
===>   mono-5.20.1.34 depends on file: /usr/local/sbin/pkg - found
=> mono-5.20.1.34.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch https://download.mono-project.com/sources/mono/mono-5.20.1.34.tar.bz2
mono-5.20.1.34.tar.bz2                                 235 MB   65 MBps    04s
=> monolite-linux-1051000004-latest.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://download.mono-project.com/monolite/monolite-linux-1051000004-latest.tar.gz
monolite-linux-1051000004-latest.tar.gz               4707 kB   16 MBps    00s
===> Fetching all distfiles required by mono-5.20.1.34 for building
===>  Extracting for mono-5.20.1.34
=> SHA256 Checksum OK for mono-5.20.1.34.tar.bz2.
=> SHA256 Checksum OK for monolite-linux-1051000004-latest.tar.gz.
/bin/mkdir -p /hdd3/root/downgrades/mono/work/mono-5.20.1.34/mcs/class/lib/monolite-linux
/bin/mv /hdd3/root/downgrades/mono/work/monolite-linux-1051000004-latest /hdd3/root/downgrades/mono/work/mono-5.20.1.34/mcs/class/lib/monolite-linux/1051000004
===>  Patching for mono-5.20.1.34
===>  Applying FreeBSD patches for mono-5.20.1.34
  I can't seem to find a patch in there anywhere.
=> FreeBSD patch patch-configure.ac failed to apply cleanly.
*** Error code 1

Stop.
make[1]: stopped in /hdd3/root/downgrades/mono
*** Error code 1

Stop.
make: stopped in /hdd3/root/downgrades/mono


The file files/patch-configure.ac is empty.

Am I missing any step to apply the patch?
Thanks.
Comment 11 Henno Schooljan 2019-09-09 19:34:32 UTC
Apparently these zero-length files should be removed, patch -E should do that.
Comment 12 kralizeck 2019-09-10 07:24:28 UTC
(In reply to Henno Schooljan from comment #11)
Thanks!
It works.

On a clean copy of the mono 5.10 port I ran:

patch -E < /tmp/mono-patch-5.20.1.34
make install clean

It point finally to run make deinstall and make reinstall.

Sonarr, radarr and jackett are working without problems.
Comment 13 Daniel O'Connor 2019-09-24 12:01:25 UTC
This no longer cleanly compiles due to a PORTREVISION bump but apart from that works for me on a 12.x system.

I tested it with Jackett, Emby, Sonarr and Radarr and it seems to work fine.

Can it be committed soon? :)

Thanks
Comment 14 Igor Zabelin 2019-09-24 13:25:37 UTC
Created attachment 207765 [details]
patch 5.20.1.34 for actual version
Comment 15 cadavor 2019-10-02 12:38:19 UTC
Try the install after applying the latest patch but get errors after building and installing :
====> Compressing man pages (compress-man)
===>  Installing for cmake-3.15.3
===>  Checking if cmake is already installed
===>   Registering installation for cmake-3.15.3 as automatic
[test] Installing cmake-3.15.3...
===>   mono-5.20.1.34 depends on package: cmake>0 - found
===>   Returning to build of mono-5.20.1.34
===>   mono-5.20.1.34 depends on executable: bison - found
===>   mono-5.20.1.34 depends on executable: gmake - found
===>   mono-5.20.1.34 depends on file: /usr/local/bin/python2.7 - found
===>   mono-5.20.1.34 depends on executable: msgfmt - found
===>   mono-5.20.1.34 depends on executable: Xvfb - not found
===>  License MIT accepted by the user
===>   xorg-vfbserver-1.19.1_12,1 depends on file: /usr/local/sbin/pkg - found
=> xorg-server-1.19.1.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/xorg/xserver.
=> Attempting to fetch https://xorg.freedesktop.org/releases/individual/xserver/xorg-server-1.19.1.tar.bz2
xorg-server-1.19.1.tar.bz2                    100% of 5900 kB  512 kBps 00m12s
===> Fetching all distfiles required by xorg-vfbserver-1.19.1_12,1 for building
===>  Extracting for xorg-vfbserver-1.19.1_12,1
=> SHA256 Checksum OK for xorg/xserver/xorg-server-1.19.1.tar.bz2.
===>  Patching for xorg-vfbserver-1.19.1_12,1
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12176
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12177
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12178
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12179
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-12183
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-1218x
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-1218y
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-13721
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-CVE-2017-13723
===>  Applying extra patch /usr/ports/x11-servers/xorg-vfbserver/../xorg-server/files/patch-os_io.c
===>   xorg-vfbserver-1.19.1_12,1 depends on package: libepoxy>0 - not found
===>  libepoxy-1.5.2 needs Python 3.3 at least, but 2.7 was specified.
*** Error code 1

Stop.
make[4]: stopped in /usr/ports/graphics/libepoxy
*** Error code 1

Stop.
make[3]: stopped in /usr/ports/x11-servers/xorg-vfbserver
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/x11-servers/xorg-vfbserver
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/lang/mono
*** Error code 1

Stop.
make: stopped in /usr/ports/lang/mono


New patch needed?
Comment 16 Igor Zabelin 2019-10-03 20:00:38 UTC
(In reply to cadavor from comment #15)

Here's the problem with xorg-vfbserver and libepoxy dependency. It's not about this mono patch.
Comment 17 Matt 2019-10-05 04:56:04 UTC
(In reply to cadavor from comment #15)

Run pkg install libepoxy-1.5.2 llvm80

sorts the issues
Comment 18 Jan-Willem Spuij 2019-10-06 09:24:09 UTC
Heapviz has been made optional, but the dependency on python2.7 specifically remains. In the light of python27 sunset, I suggest to either remove Heapviz or patch it so it runs on python3.
Comment 19 Igor Zabelin 2019-10-06 12:16:04 UTC
Here's another patch.
Python is required during compilation for mono/mini/genmdesc.py.
Now it's any version of Python.
Comment 20 Igor Zabelin 2019-10-06 12:17:19 UTC
Created attachment 208135 [details]
without a dependency on Python 2.7
Comment 21 cadavor 2019-10-07 08:31:58 UTC
(In reply to Matt from comment #17)
Thanks a lot.
First try by compiling those ports were so long but worked...
Question : is it necessary to keep those packages installed after completed installation of mono (disk space saving)?
Comment 22 pstk 2019-11-29 18:32:53 UTC
This patch will be merge soon?
Comment 23 Igor Zabelin 2019-12-01 21:55:19 UTC
Created attachment 209579 [details]
The latest Stable Mono release is: 6.4.0 Stable (6.4.0.198)

Here is the latest stable version for tests.
Comment 24 Curtis Hamilton 2019-12-02 23:36:43 UTC
Created attachment 209634 [details]
Patch to fix build on powerpc64
Comment 25 Curtis Hamilton 2019-12-02 23:38:18 UTC
(In reply to Igor Zabelin from comment #23)
While you're updating to 6.4.0, please add support for powerpc64.

Support for FreeBSD on powerpc64 has been available and stable since mono version 5.21. The attached patches allows mono to build from ports.

There also seem to be issues with missing files in the port build pkg-plist. The build produces "mdb" files where the pkg-list has "pdb" files.
Comment 26 Igor Zabelin 2019-12-03 11:12:15 UTC
(In reply to Curtis Hamilton from comment #25)

What are "mdb" files? It is an auto generated pkg-plist by make makeplist with minor changes from mono 5.20.1.34.
Comment 27 Igor Zabelin 2019-12-03 12:58:37 UTC
Created attachment 209650 [details]
Patch to 5.20.1.34

Don't need ac_cv_header_sys_inotify_h=no. We have sys/inotify.h at localbase.
Comment 28 Igor Zabelin 2019-12-03 13:06:30 UTC
Created attachment 209651 [details]
Patch to 6.4.0.198, support for powerpc64

Added support for powerpc64.
Comment 29 Curtis Hamilton 2019-12-03 16:31:03 UTC
(In reply to Igor Zabelin from comment #26)
"mdb" files are mono debugging symbol files which are created when mono is built,  on powerpc64.  They are similar to the "pdb", program data files. I don't know why they are not being built for other CPUs. The only differences I can see is "dtrace" and "btls" are disabled for powerpc64.

I'll continue to investigate. It may be necessary to disable "mdb" support when building mono on powerpc64.
Comment 30 Igor Zabelin 2019-12-03 16:49:44 UTC
(In reply to Curtis Hamilton from comment #29)
I meant the list of mdb files.
At least when no btls there are no files:

lib/libmono-btls-shared.so
lib/mono/4.5/Mono.Btls.Interface.dll
lib/mono/gac/Mono.Btls.Interface/4.0.0.0__0738eb9f132ed756/Mono.Btls.Interface.dll
lib/mono/gac/Mono.Btls.Interface/4.0.0.0__0738eb9f132ed756/Mono.Btls.Interface.pdb

Look at the last patch and pkg-plist. Now these files are tagged and skipped.
Please send me output of "make makeplist".
Comment 31 Curtis Hamilton 2019-12-03 17:31:21 UTC
Created attachment 209662 [details]
Output of make makeplist

Attached is the output you requested.
Comment 32 Igor Zabelin 2019-12-03 20:29:28 UTC
Created attachment 209671 [details]
Patch to 6.4.0.198, support for powerpc64, pdb-mdb

Indeed, the lists are different, mdb instead of pdb.
Comment 33 Mikael Urankar freebsd_committer freebsd_triage 2019-12-04 08:13:19 UTC
On ppc64 elfv2:
cc: error: unknown argument: '-mminimal-toc'
Comment 34 Mikael Urankar freebsd_committer freebsd_triage 2019-12-04 09:29:43 UTC
(In reply to mikael.urankar from comment #33)
built without x11 on ppc64 elfv2:
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: lib/mono/4.5/mdbrebase.exe
Comment 35 Igor Zabelin 2019-12-04 09:45:48 UTC
(In reply to mikael.urankar from comment #34)

Duplicate string %%PPC%%lib/mono/4.5/mdbrebase.exe in pkg-plist. Try to remove it.
Comment 36 Igor Zabelin 2019-12-04 10:06:00 UTC
Created attachment 209678 [details]
Patch to 6.4.0.198, support for powerpc64
Comment 37 akanar 2020-01-12 13:02:04 UTC
I have been testing these patches out on FreeNAS 11.2-U7 under a 11.3-RELEASE jail using Jackett (https://github.com/Jackett/Jackett).

patch 5.20.1.34 (7-22-19)
Been running without issue other than needing to edit Makefile for a few months now.

without a dependency on Python 2.7 (10-6-19):
Patch to 5.20.1.34 (12-3-19):
Tested working without issue.

The latest Stable Mono release is: (6.4.0.198) (12-1-19):
Patch to 6.4.0.198, support for powerpc64 (12-4-19):
Mono Error (System.Net.Http.HttpRequestException: mono-io-layer-error (-1)) on about 1/3 of the torrent trackers.

Jackett.Common.IndexerException: Exception (nyaa-pantsu): mono-io-layer-error (-1) ---> System.Net.Http.HttpRequestException: mono-io-layer-error (-1) ---> System.Net.Sockets.SocketException: mono-io-layer-error (-1)
  at System.Net.Http.ConnectHelper.ConnectAsync (System.String host, System.Int32 port, System.Threading.CancellationToken cancellationToken) [0x00110] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
   --- End of inner exception stack trace ---
  at System.Net.Http.ConnectHelper.ConnectAsync (System.String host, System.Int32 port, System.Threading.CancellationToken cancellationToken) [0x001ac] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
  at System.Net.Http.HttpConnectionPool.CreateConnectionAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00134] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
  at System.Net.Http.HttpConnectionPool.WaitForCreatedConnectionAsync (System.Threading.Tasks.ValueTask`1[TResult] creationTask) [0x000a2] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
  at System.Net.Http.HttpConnectionPool.SendWithRetryAsync (System.Net.Http.HttpRequestMessage request, System.Boolean doRequestAuth, System.Threading.CancellationToken cancellationToken) [0x00089] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
  at System.Net.Http.DecompressionHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000ca] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
  at CloudflareSolverRe.ClearanceHandler.SendRequestAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x00090] in <9640d5c3ce934e55be2d347202d4fc66>:0
  at CloudflareSolverRe.ClearanceHandler.SendAsync (System.Net.Http.HttpRequestMessage request, System.Threading.CancellationToken cancellationToken) [0x000a4] in <9640d5c3ce934e55be2d347202d4fc66>:0
  at System.Net.Http.HttpClient.FinishSendAsyncBuffered (System.Threading.Tasks.Task`1[TResult] sendTask, System.Net.Http.HttpRequestMessage request, System.Threading.CancellationTokenSource cts, System.Boolean disposeCts) [0x0017e] in <e7fbcfc0e15c4681b7cfe771a977436a>:0
  at Jackett.Common.Utils.Clients.HttpWebClient.Run (Jackett.Common.Utils.Clients.WebRequest webRequest) [0x0048c] in <fceed2e6bbfe4225b39926f831493791>:0
  at Jackett.Common.Utils.Clients.WebClient.GetString (Jackett.Common.Utils.Clients.WebRequest request) [0x0010b] in <fceed2e6bbfe4225b39926f831493791>:0
  at Jackett.Common.Indexers.BaseWebIndexer.RequestStringWithCookies (System.String url, System.String cookieOverride, System.String referer, System.Collections.Generic.Dictionary`2[TKey,TValue] headers) [0x000cb] in <fceed2e6bbfe4225b39926f831493791>:0
  at Jackett.Common.Indexers.CardigannIndexer.PerformQuery (Jackett.Common.Models.TorznabQuery query) [0x0086a] in <fceed2e6bbfe4225b39926f831493791>:0
  at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery (Jackett.Common.Models.TorznabQuery query) [0x00091] in <fceed2e6bbfe4225b39926f831493791>:0
   --- End of inner exception stack trace ---
  at Jackett.Common.Indexers.BaseIndexer.ResultsForQuery (Jackett.Common.Models.TorznabQuery query) [0x000ee] in <fceed2e6bbfe4225b39926f831493791>:0
  at Jackett.Common.Indexers.BaseWebIndexer.ResultsForQuery (Jackett.Common.Models.TorznabQuery query) [0x0006b] in <fceed2e6bbfe4225b39926f831493791>:0
  at Jackett.Server.Controllers.ResultsController.Torznab (Jackett.Common.Models.DTO.TorznabRequest request) [0x003b1] in <2a2a65f5995e45f0b7a41f57266917f8>:0
Comment 38 Ralf van der Enden 2020-01-24 13:55:50 UTC
Created attachment 211011 [details]
Patch to 6.8.0.96, support for powerpc64


Based this patch on the latest one from Igor (209678).

- Updated to the latest available version of mono,
- Formatted the Makefile using ports-mgmt/portfmt,
- Changed bsd.port.mk to bsd.port.post.mk (to please portlint and poudriere)

Sonarr is happily running using this version on my amd64 machine. Swapfile usage is a lot less with this newer version of mono.
Comment 39 Sven Schellack 2020-01-24 21:33:26 UTC
@Ralf van der Enden: Are you aware of https://reviews.freebsd.org/D23300 ? I think he worked with the Mono folks for some time and I think you might want to contact him? Just my 2 Cents...
Comment 40 Ralf van der Enden 2020-01-27 09:43:06 UTC
I wasn't aware of that review.

Just wanted to help updating the port to the latest version mono.

Sorry if I kicked anyone against their shins.
Comment 41 kralizeck 2020-01-27 13:40:27 UTC
(In reply to Ralf van der Enden from comment #38)

Sonarr, Radarr and Jackett working fine with mono 6.8.0.96.
And another step to remove python2.7 from my system.

Thanks!
Comment 42 niqck 2020-02-26 09:38:09 UTC
Builds on poudriere 11.3 but fails on 12.1

../../doltlibtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../..  -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Qunused-arguments -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand -Wno-zero-length-array -I/usr/local/include -DLIBICONV_PLUG -DGC_FREEBSD_THREADS -DHOST_BSD -D_WITH_GETLINE -g  -DUSE_COMPILER_TLS -I../.. -I../../mono  -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Qunused-arguments -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand -Wno-zero-length-array -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing  -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -std=gnu99 -fno-strict-aliasing -fwrapv -DMONO_DLL_EXPORT -g -I/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96/external/corefx/src/Native/Unix/Common -I/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96/external/corefx/src/Native/Unix/System.Native -I/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96/external/corefx/src/Native/AnyOS/brotli/include -I../../mono/eglib -I../../mono/eglib -fvisibility=hidden -DBROTLI_BUILD_NO_RBIT -Wno-typedef-redefinition  -MT libmono_native_la-dictionary_hash.lo -MD -MP -MF .deps/libmono_native_la-dictionary_hash.Tpo -c -o libmono_native_la-dictionary_hash.lo `test -f '../../external/corefx/src/Native/AnyOS/brotli/enc/dictionary_hash.c' || echo './'`../../external/corefx/src/Native/AnyOS/brotli/enc/dictionary_hash.c
../../external/corefx/src/Native/AnyOS/brotli/enc/dictionary_hash.c:16:1: error: unknown type name 'BROTLI_INTERNAL'
BROTLI_INTERNAL const uint16_t kStaticDictionaryHash[32768] = {
^
../../external/corefx/src/Native/AnyOS/brotli/enc/dictionary_hash.c:16:17: error: expected identifier or '('
BROTLI_INTERNAL const uint16_t kStaticDictionaryHash[32768] = {
                ^
2 errors generated.
gmake[4]: *** [Makefile:1958: libmono_native_la-dictionary_hash.lo] Error 1
gmake[4]: Leaving directory '/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96/mono/native'
gmake[3]: *** [Makefile:522: all-recursive] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96/mono'
gmake[2]: *** [Makefile:603: all-recursive] Error 1
gmake[2]: Leaving directory '/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96'
gmake[1]: *** [Makefile:531: all] Error 2
gmake[1]: Leaving directory '/wrkdirs/usr/ports/lang/mono/work/mono-6.8.0.96'
*** Error code 1
Comment 43 Igor Zabelin 2020-02-26 20:31:13 UTC
Created attachment 211960 [details]
Patch to 6.8.0.105

5.10.1.57 port revision 3 (526962)
Comment 44 niqck 2020-03-04 21:50:31 UTC
Added USE_GCC=any to the port Makefile and now it builds on FreeBSD 12.1
Comment 45 Tommy P 2020-03-17 00:35:50 UTC
(In reply to Igor Zabelin from comment #43)

Hi Igor,

for some reason, the patch wouldn't work for the lang/mono/Makefile.  I had to manually patch it.  It compiled for a bit until I encounter the same error as nigck did.  His USE_GCC allows your patch to work on 12.1 amd64.

Thanks.

(In reply to niqck from comment #44)

Your fix make it work for me on 12.1.  Thanks.
Comment 46 Mikael Urankar freebsd_committer freebsd_triage 2020-03-19 14:55:14 UTC
(In reply to niqck from comment #42)
Same problem here, it seems to be a conflict with archivers/brotli.
Comment 47 kralizeck 2020-03-21 19:15:17 UTC
(In reply to Igor Zabelin from comment #43)
Works perfect on my system.
Thanks!
Comment 48 Chris Rees freebsd_committer freebsd_triage 2020-06-12 09:42:49 UTC
I'm so sorry to see duplicated effort here.

Can I suggest that any further discussion moves to the more up to date review at

https://reviews.freebsd.org/D23300

?

I'm really excited personally to get this in, and it looks pretty close now...
Comment 49 Igor Zabelin 2020-06-13 14:22:19 UTC
(In reply to Chris Rees from comment #48)
Please approve me to the reviews.freebsd.org.
I want to specify there that py-pillow is not RUN_DEPENDS for mono in general case. Only for one debug utility mono-heapviz. But it involves a large number of dependencies.
Comment 50 Chris Rees freebsd_committer freebsd_triage 2020-06-13 15:23:19 UTC
I think you can just sign up and follow the issue?
Comment 51 Igor Zabelin 2020-06-13 20:21:39 UTC
(In reply to Chris Rees from comment #50)
No, I can't.

- Your account has been created, but needs to be approved by an administrator. You'll receive an email once your account is approved.
Comment 52 Todd martin 2020-11-05 04:56:10 UTC
Created attachment 219366 [details]
Patch to 6.8.0.105

5.10.1.57 port revision 3 (526962)

compatible with 12.x
Comment 53 akanar 2020-11-05 09:54:25 UTC
(In reply to Todd martin from comment #52)
Not patching for me.


Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN mono_5.10/Makefile mono/Makefile
|--- mono_5.10/Makefile	2020-11-04 16:27:35.138010198 -0800
|+++ mono/Makefile	2020-11-04 19:32:22.025229113 -0800
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 2.
Hunk #2 succeeded at 14.
Hunk #3 succeeded at 23.
Hunk #4 succeeded at 39.
Hunk #5 succeeded at 47.
Hunk #6 succeeded at 61.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN mono_5.10/Makefile.orig mono/Makefile.orig
|--- mono_5.10/Makefile.orig	1969-12-31 16:00:00.000000000 -0800
|+++ mono/Makefile.orig	2020-11-04 19:29:39.818119997 -0800
--------------------------
Patching file Makefile.orig using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN mono_5.10/Makefile.rej mono/Makefile.rej
|--- mono_5.10/Makefile.rej	1969-12-31 16:00:00.000000000 -0800
|+++ mono/Makefile.rej	2020-11-04 19:30:31.828201876 -0800
--------------------------
(Creating file Makefile.rej...)
Patching file Makefile.rej using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN mono_5.10/distinfo mono/distinfo
|--- mono_5.10/distinfo	2020-11-04 16:27:35.120394426 -0800
|+++ mono/distinfo	2020-11-04 19:30:31.828575545 -0800
--------------------------
Patching file distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN mono_5.10/distinfo.orig mono/distinfo.orig
|--- mono_5.10/distinfo.orig	1969-12-31 16:00:00.000000000 -0800
|+++ mono/distinfo.orig	2020-11-04 19:29:39.817844788 -0800
--------------------------
Patching file distinfo.orig using Plan A...
Empty context always matches.
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN mono_5.10/files/patch-configure.ac mono/files/patch-configure.ac
|--- mono_5.10/files/patch-configure.ac	2020-11-04 16:27:35.214683997 -0800
|+++ mono/files/patch-configure.ac	2020-11-04 19:30:31.829174406 -0800
--------------------------
File to patch:
Comment 54 Todd martin 2020-11-05 23:45:01 UTC
that is due to the subfolder parsing...
use -p0 or -p1 until it works.  -p0 worked for me.
Comment 55 Todd martin 2020-11-06 06:00:13 UTC
(In reply to Todd martin from comment #54)
you need -p0 to properly find the subfolders if patching to:
/usr/ports/lang/mono

apply from
/usr/ports/lang
and it should parse the subfolders better.

my script is using this comppand:
patch -d /usr/ports/lang/ -E < /tmp/mono-patch-6.8.0.105
Comment 56 akanar 2020-11-06 10:36:57 UTC
(In reply to Todd martin from comment #55)
That works but then gets stuck on 'make install clean'.

===>  License MIT accepted by the user
===>   mono-5.10.1.57_3 depends on file: /usr/local/sbin/pkg - found
=> mono-5.10.1.57.tar.bz2 is not in /usr/ports/lang/mono/distinfo.
=> Either /usr/ports/lang/mono/distinfo is out of date, or
=> mono-5.10.1.57.tar.bz2 is spelled incorrectly.
*** Error code 1

Stop.
Comment 57 Sven Schellack 2020-11-06 13:22:04 UTC
@akanar: Did you rebuild your INDEX?
Comment 58 Sven Schellack 2020-11-07 01:24:52 UTC
Oh, and is there any reason why we can't go to 6.12? NetBSD and OpenBSD are there with no obvious penalties...
Comment 59 Todd martin 2020-11-07 03:25:41 UTC
Created attachment 219414 [details]
Patch to 6.8.0.105 fixed

added GCC build dependency

tested by applying to a fresh ports tree
make -DBATCH install
make -DBATCH package
== both successful
Comment 60 akanar 2020-11-07 03:45:10 UTC
(In reply to Sven Schellack from comment #57)

portsnap -I update ?

Doesn't work. I never had to rebuild the index when I tested any of the other patches. Didn't have to apply the other patches to lang either.

These are the commands I am running to be clear. Same ones I used on all the other patches. Except for patching to lang now and using 12.1 instead of 11.3.

ocage create -r 12.1-RELEASE -n monotst dhcp=on && iocage start monotst && iocage console monotst

pkg install -y ca_root_nss && portsnap fetch extract

fetch 'https://bz-attachments.freebsd.org/attachment.cgi?id=219414' -o /tmp/mono-patch-6.8.0.105


patch -d /usr/ports/lang/ -E < /tmp/mono-patch-6.8.0.105

cd /usr/ports/lang/mono

make -DBATCH install clean
Comment 61 Todd martin 2020-11-07 05:40:58 UTC
(In reply to akanar from comment #60)
I have reproduced your issue. 
traced it to Makefile not being patched in some situations.

not sure why it worked in various test but fails in others.

I will review and post my findings.
Comment 62 Todd martin 2020-11-07 18:56:04 UTC
(In reply to Todd martin from comment #61)

"

(In reply to akanar from comment #60)
Okay, so apparently the problem was my instructions.

I just did 3 test jails, 11.4, 12.1, and 12.2-RELEASE.

patch issues were resolved when I patched directly to /usr/ports/lang/mono

"
fetch 'https://bz-attachments.freebsd.org/attachment.cgi?id=219414' -o /tmp/mono-patch-6.8.0.105
cd /usr/ports/lang/mono
patch -p1 -E < /tmp/mono-patch-6.8.0.105
"
or
"
fetch 'https://bz-attachments.freebsd.org/attachment.cgi?id=219414' -o /tmp/mono-patch-6.8.0.105
patch -p1 -d /uar/ports/lang/mono -E < /tmp/mono-patch-6.8.0.105
"

@akanar  sorry for the mixup and thank you for pointing it out.
Comment 63 Todd martin 2020-11-17 02:12:39 UTC
Created attachment 219757 [details]
Patch to 5.20.1.34

updated for SVN r529063

patches subfolder files.  (use -p#)
Comment 64 Sven Schellack 2020-12-07 22:17:09 UTC
(In reply to Todd martin from comment #63)
@Todd martin: why the old patch? AND... regarding the 6X Patch: why do you pull GCC in? As for AMD64 I haven't experienced any problems with LLVM on 12.X.. Is this for PowerPC etc.?
Comment 65 Todd martin 2020-12-08 00:51:46 UTC
(In reply to Sven Schellack from comment #64)
I posted the 5.20.1.34 patch because my apps that use Mono only call for that version.  It is what I am using for my production machines.  I thought others might want to roll up to this version without needing 6.x yet.

The 6.8.0.105 patch that I created did not build on my test machine without GCC.  A better patch would identify which environments need GCC and only require it for those.  More input from testers is required to do so.

I did take the latest 6.8.0.123 patch and edited it to build properly.  The new addition of boringssl caused other issues after build & install.  If I come up with a working patch to 6.8.0.123, I will post it here also.
Comment 66 ddrinnon 2020-12-08 02:11:29 UTC
Would it be possible to build the 5.20.1.34 Patch against the current mono in lang/mono?  The Patch is for 5.10.1.57_2 while the port in the ports tree is at 5.10.1.57_3.  Thanks!  I'll be happy to test the patches - I run an OpenSimulator  Grid on 25 VMs on VMWare.
Comment 67 Todd martin 2020-12-08 06:21:35 UTC
(In reply to ddrinnon from comment #66)
@ddrinnon@cdor.net See comment #63

SVN Revision: 529063 == 5.10.1.57_3
Comment 68 ddrinnon 2020-12-08 23:31:13 UTC
Thanks Todd.  I was able to patch and build it on my Poudriere setup without any issues.  Currently testing it on 23 vmware VMs running OpenSimulator 0.9.1.1 and FreeBSD 11.4.  I was running my own Patched mono 5.14.0.177.

If there is a tester channel, I would be happy to help.
Comment 69 Mark Linimon freebsd_committer freebsd_triage 2020-12-13 03:46:12 UTC
(In reply to Todd martin from comment #63)

Perhaps I've patched it wrong but with your patch I get:

mv -f .deps/libmonoutils_la-mono-merp.Tpo .deps/libmonoutils_la-mono-merp.Plo
../../doltlibtool  --tag=CC   --mode=compile cc -DHAVE_CONFIG_H -I. -I../..  -I../.. -I../../mono -I../../libgc/include -I../../mono/eglib -I../../mono/eglib -fvisibility=hidden  -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Qunused-arguments -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand -Wno-zero-length-array -I/usr/local/include -DLIBICONV_PLUG -DGC_FREEBSD_THREADS -DHOST_BSD -g  -DUSE_COMPILER_TLS   -Wall -Wunused -Wmissing-declarations -Wpointer-arith -Wno-cast-qual -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value -Wno-attributes -Qunused-arguments -Wno-unused-function -Wno-tautological-compare -Wno-parentheses-equality -Wno-self-assign -Wno-return-stack-address -Wno-constant-logical-operand -Wno-zero-length-array -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -fno-strict-aliasing -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wno-format-zero-length -std=gnu99 -fno-strict-aliasing -fwrapv -DMONO_DLL_EXPORT -g -Werror=incompatible-pointer-types -Werror=return-type -Werror-implicit-function-declaration -MT libmonoutils_la-mono-state.lo -MD -MP -MF .deps/libmonoutils_la-mono-state.Tpo -c -o libmonoutils_la-mono-state.lo `test -f 'mono-state.c' || echo './'`mono-state.c
mono-state.c:162:53: error: use of undeclared identifier 'S_IWUSR'
[...]
16 errors generated.
gmake[6]: *** [Makefile:1352: libmonoutils_la-mono-state.lo] Error 1
gmake[6]: Leaving directory '/wrkdirs/usr/ports/lang/mono5.20/work/mono-5.20.1.34/mono/utils'
gmake[5]: *** [Makefile:1924: all-recursive] Error 1
Comment 70 Mark Linimon freebsd_committer freebsd_triage 2020-12-13 03:49:00 UTC
This is on FreeBSD-13 (13.0-CURRENT #0 r361720M: Tue Jun  2 08:10:56 UTC 2020)
Comment 71 Mark Linimon freebsd_committer freebsd_triage 2020-12-13 04:00:51 UTC
(In reply to Mark Linimon from comment #70)

Yes, it appears I left 3 of the new patches in the ../ directory.  Sigh.
Comment 72 commit-hook freebsd_committer freebsd_triage 2020-12-13 05:16:05 UTC
A commit references this bug:

Author: linimon
Date: Sun Dec 13 05:15:32 UTC 2020
New revision: 557882
URL: https://svnweb.freebsd.org/changeset/ports/557882

Log:
  Repocopy lang/mono to lang/mono5.20 in preparation for upgrade.

  PR:		238089
  Submitted by:	cem

Changes:
  head/lang/mono5.20/
Comment 73 commit-hook freebsd_committer freebsd_triage 2020-12-13 05:22:16 UTC
A commit references this bug:

Author: linimon
Date: Sun Dec 13 05:22:09 UTC 2020
New revision: 557883
URL: https://svnweb.freebsd.org/changeset/ports/557883

Log:
  Actually update the newly created port lang/mono5.20 to 5.20.

  This port is a WIP.  It compiles and packages on both amd64 and powerpc64.
  However, the ports depending on it are still under test.  As such, it is
  intentionally not yet connected to the build.  I will continue to work
  on this in the coming days.

  This corresponds to the most recent patches in 238089 for 5.x.

  Note: this port depends on the obsolete python2.7 (it is known that
  it will not work with python3.X).  Testing vs. tauthon is TBA.

  PR:		238089
  Submitted by:	cem

Changes:
  head/lang/mono5.20/Makefile
  head/lang/mono5.20/distinfo
  head/lang/mono5.20/pkg-plist
Comment 74 commit-hook freebsd_committer freebsd_triage 2020-12-13 05:51:23 UTC
A commit references this bug:

Author: linimon
Date: Sun Dec 13 05:51:18 UTC 2020
New revision: 557885
URL: https://svnweb.freebsd.org/changeset/ports/557885

Log:
  Remove stale patchfiles.

  Pointy hat to:	linimon
  PR:		238089

Changes:
  head/lang/mono5.20/files/patch-configure.ac
  head/lang/mono5.20/files/patch-mcs_class_Mono.Security_Mono.Security.Cryptography_KeyPairPersistence.cs
  head/lang/mono5.20/files/patch-mono_mini_tramp-amd64.c
  head/lang/mono5.20/files/patch-mono_utils_mono-context.h
Comment 75 Mark Linimon freebsd_committer freebsd_triage 2020-12-14 06:56:14 UTC
Here are the current results for the lang/mono5.20 port as recently committed from the patches above.

The following dependent ports now fail (these are regressions from 5.10):

  lang/fsharp
  emulators/mesen
  games/openbve
  games/openra

In addition to the above, the following dependent ports also regress with lang/mono6.8 (but as committed via D23300, not the patches here):

  devel/dbus-sharp
  devel/newtonsoft-json
  graphics/nplot
  x11-toolkits/gtk-sharp20
  x11-toolkits/gtk-sharp30

I am going to need assistance to evaluate all the above.  I am way out of my depth here.  And I do not know if regressing these ports is acceptable (I have been told that breaking lang/fsharp is *not* acceptable).

I can attempt to cherry-pick the 6.8.0.105 patches from above and merge, but my guess is that that will not fix the above problems.

I am still working on the metaport so that prospective users can switch amongst the 3 ports.  (PR 251795).
Comment 76 Alex Levy 2020-12-15 18:33:35 UTC
Created attachment 220588 [details]
patch-mono-6.12.0.113

Hi all,

I'd like to propose a patch I have been working on to build mono 6.12.0.113 from a mono github repository tag.

The patch was created with svn diff as explained in the porter's handbook. 

I ran portlint and make stage-qa to make sure the port is in a decent shape and no error was reported both of them. The port compiles and installs without problems for me.

This is the first time I patch a port so I hope I didn't do it completely wrong. 

I tested it in a fresh jail with patch -E < mono-6.12.0.113.diff from a copy of the directory /usr/ports/lang/mono.

I run FreeBSD 13.0-CURRENT so it'd be great if someone could test it on STABLE.

Thanks.
Comment 77 Mark Linimon freebsd_committer freebsd_triage 2020-12-15 20:00:35 UTC
(In reply to Alex Levy from comment #76)
Your patch changes identation and the order of things in the Makefile.  This makes it very difficult to see exactly what is being changed.

Could you please submit a version where the Makefile is closer to what is currently committed?

Thanks.
Comment 78 Alex Levy 2020-12-15 23:20:05 UTC
(In reply to Mark Linimon from comment #77)
I gave a try to reformat to be as close as the original Makefile but my Makefile is drastically different than the original one as it's based on pulling the sources from github and the buid process is different.

Also order of things in the original Makefile doesn't follow the porter's handbook recommendation (section 15), not sure if it's a blocker but portlint complains about it so I ordered my Makefile accordingly.

I don't think we can easily compare the 2 Makefiles with a diff even if I change indentation and order of things. I can instead explain the differences here if it helps (in order of appearance in the original Makefile) :

- I removed ONLY_FOR_ARCHS as I cannot say for sure that it builds on these platforms.

- The dependencies are almost the same except there is no need for run dependency on PY_PILLOW and no dependency at all on Perl.

- No need for a MONOLITE option (${GMAKE} get-monolite-latest in pre-build covers it).

- I removed the X11 option as configure script doesn't seem to expose any related parameters.

- I added DTRACE and BTLS options but they were not required per-se. The original Makefile was configuring with --enable-btls and --disable-dtrace hardcoded.

- GNU_CONFIGURE, LD_CONFIG are same

- SHEBANG_FILES differs because paths of scripts are different

- USE_PERL5, BINARY_ALIAS, MAKE_ENV, TEST_* and PORTSCOUT (should I keep this one?) are gone. 

- No need for the conditional on ${LOCALBASE}/bin/mcs.

- I added a pre-build that fetches monolite as instructed in https://www.mono-project.com/docs/compiling-mono/compiling-from-git/

- There is no post-patch, no post-configure and no post-extract* 

- post-install is the same, I just strip libmono-btls-shared.so as INSTALL_TARGET=install-strip didn't do the trick for this one.

Hope that it helps.
Comment 79 commit-hook freebsd_committer freebsd_triage 2020-12-18 19:17:08 UTC
A commit references this bug:

Author: linimon
Date: Fri Dec 18 19:16:39 UTC 2020
New revision: 558398
URL: https://svnweb.freebsd.org/changeset/ports/558398

Log:
  Mark various ports as BROKEN with Mono 5.20, and, in some other cases,
  Mono 6.8.

  PR:		238089
  Submitted by:	cem
  Obtained from:	lonesome.com build regression testing

Changes:
  head/devel/dbus-sharp/Makefile
  head/devel/newtonsoft-json/Makefile
  head/emulators/mesen/Makefile
  head/games/openbve/Makefile
  head/games/openra/Makefile
  head/graphics/nplot/Makefile
  head/lang/fsharp/Makefile
  head/x11-toolkits/gtk-sharp20/Makefile
  head/x11-toolkits/gtk-sharp30/Makefile
Comment 80 commit-hook freebsd_committer freebsd_triage 2020-12-18 19:41:21 UTC
A commit references this bug:

Author: linimon
Date: Fri Dec 18 19:40:49 UTC 2020
New revision: 558401
URL: https://svnweb.freebsd.org/changeset/ports/558401

Log:
  Hook the repocopied and updated mono ports to the build.

  PR:		238089, 251795
  Submitted by:	cem (238089)

Changes:
  head/lang/Makefile
Comment 81 Michiel van Baak Jansen 2021-03-11 13:30:16 UTC
If a port has the 'USES=mono' ... how can we make it use 5.20 or 6.8?
I looked in Mk/Uses/mono.mk but couldn't really find a way to do it.

Asking so I can update jackett, sonarr and radarr ;P
Comment 82 Dries Michiels freebsd_committer freebsd_triage 2021-03-11 19:37:23 UTC
You could always add a direct runtime dependency against lang/mono6.8. That should work. Maybe even use a binary alias for mono -> mono6.8 if the binary has the version number. The idea of this patch is rather that you can chose to use a newer version by specifying the default_versions = mono=6.8 in make.conf when building ports or in Poudriere.
Comment 83 Marcin Cieślak 2023-08-04 01:14:33 UTC
I think this is fixed now as we have a working 5.20 in the tree?

Btw. I think all mono ports should be using USES=   autoreconf:2.69 
otherwise it generates insane amount of warnings (while still mostly working...)
Comment 84 Igor Zabelin 2023-08-04 13:46:04 UTC
And again, py-pillow is completely unnecessary to run anything under mono.
It's a lot of unnecessary dependencies. Keep it simple ...

py-pillow only for mono-heapviz script.

"Generate a heap visualization for SGen from the heap dump written by mono if the MONO_GC_DEBUG is set to something like."
Comment 85 Marcin Cieślak 2023-08-04 22:39:00 UTC
Created attachment 243848 [details]
Fix build WITH_NINJA

* Fix build WITH_NINJA=on
* Downgrade USES to autoreconf:2.69 (probably could be done for all mono* ports)
* Do not regenerate configure/Makefiles twice with autogen.sh
Comment 86 Marcin Cieślak 2023-08-04 23:34:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272950 should fix x11-toolkits/gtk-sharp* ports for 6.8
Comment 87 Jan Beich freebsd_committer freebsd_triage 2023-08-07 17:33:13 UTC
> I think this is fixed now as we have a working 5.20 in the tree?

Not unless USES=mono is flavorized or MONO_DEFAULT is bumped. comment 82 advice only works for users but not for port maintainers. For example, BINARY_ALIAS trick won't work due to package conflict between multiple mono* versions. For another, DEFAULT_VERSIONS cannot be changed on the package cluster. Currently, the ports/ tree has very few lang/mono6.8 consumers, none of which have USES=mono or depend on devel/msbuild.

See bug 273001 for an example affected consumer. It's ready but cannot land due to lang/mono mess.
Comment 88 commit-hook freebsd_committer freebsd_triage 2023-08-08 11:22:52 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4f13ca16c773075e671c9b732cf452887596a402

commit 4f13ca16c773075e671c9b732cf452887596a402
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-08-08 10:52:26 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-08-08 11:22:12 +0000

    lang/mono: switch to 5.20 by default

    PR:             238089

 Mk/bsd.default-versions.mk                  | 2 +-
 devel/dbus-sharp/Makefile                   | 2 +-
 devel/log4net/Makefile                      | 2 +-
 devel/mono-addins/Makefile                  | 2 +-
 devel/msbuild/Makefile                      | 2 +-
 devel/nant/Makefile                         | 2 +-
 devel/ndesk-dbus-glib/Makefile              | 2 +-
 devel/ndesk-dbus/Makefile                   | 2 +-
 devel/ndesk-options/Makefile                | 2 +-
 devel/newtonsoft-json/Makefile              | 2 +-
 devel/nini/Makefile                         | 2 +-
 devel/notify-sharp/Makefile                 | 2 +-
 editors/bless/Makefile                      | 2 +-
 emulators/mesen/Makefile                    | 2 +-
 games/gbrainy/Makefile                      | 2 +-
 games/openbve/Makefile                      | 2 +-
 games/openclaw/Makefile                     | 2 +-
 games/openra/Makefile                       | 2 +-
 graphics/nplot/Makefile                     | 2 +-
 graphics/pinta/Makefile                     | 2 +-
 irc/smartirc4net/Makefile                   | 2 +-
 irc/smuxi/Makefile                          | 2 +-
 lang/fsharp/Makefile                        | 2 +-
 lang/mono-basic/Makefile                    | 2 +-
 misc/gedkeeper/Makefile                     | 2 +-
 net/avahi-sharp/Makefile                    | 2 +-
 net/ntpa/Makefile                           | 2 +-
 security/gnome-keyring-sharp/Makefile       | 2 +-
 security/keepass-plugin-keepassrpc/Makefile | 2 +-
 security/keepass/Makefile                   | 2 +-
 www/mod_mono/Makefile                       | 2 +-
 www/xsp/Makefile                            | 2 +-
 x11-toolkits/gtk-sharp20/Makefile           | 2 +-
 x11-toolkits/gtk-sharp30/Makefile           | 2 +-
 34 files changed, 34 insertions(+), 34 deletions(-)
Comment 89 Jan Beich freebsd_committer freebsd_triage 2023-08-08 11:29:49 UTC
Let's limit this to 5.* series like comment 0 and Summary implies.