[Bug 273008] lang/nim Upgrade to 2.0.0

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 08 Aug 2023 05:30:15 UTC

            Bug ID: 273008
           Summary: lang/nim Upgrade to 2.0.0
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs@FreeBSD.org
          Reporter: thindil@laeran.pl.eu.org
                CC: ports@nicandneal.net
             Flags: maintainer-feedback?(ports@nicandneal.net)
                CC: ports@nicandneal.net

Created attachment 243951
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=243951&action=edit
Nim 2.0

This is a proposition to upgrade Nim to version 2.0. Same as with the
version of the language, the patch contains breaking changes. That's why the
post is so long. ;)

1. I've removed most of the old patches. They are now in upstream and no longer
needed. Additionally, some of them were blocking build Nim. Instead, I've added
a patch for handling configuration's files. I need to look closer at the issue,
and I will try later send a better patch upstream.

2. Nim itself changed, in a breaking way, how its files are stored. I've tried
to follow the language guide about packaging, with some typical for FreeBSD
- Configuration files are still in /usr/local/etc/nim directory
- Documentation files are still in /usr/local/share/doc/nim

3. The structure of files in /usr/local/lib/nim directory was changed as
suggested by the language's packaging guide. All these files are needed for
compiler to work, even if they only CSS files. The new structure is completely
different from previous one. Thus, I think it would be good to find a way to
force reinstall the package instead of just upgrading. Especially that there is
one more problem.

4. Nimble tool is now the part of the Nim package, previously was a separated
package in FreeBSD. The reason are breaking changes in Nim language libraries.
Nimble now has external dependencies and trying to build it as a separated
package ends in recursion: Nimble needs Nimble. ;) It can be build only with
the compiler source code, as it contains needed libraries. That's the reason
why I added Nimble as an installation conflict for this version of Nim. After
time we can mark Nimble package as deprecated and remove completely.

5. Related to the previous point. I removed the option to enable or disable to
build tools. Now they always build. As mentioned above, that's the only way to
build Nimble, which is needed to build practically almost every program written
in Nim. Also, many external tools assume that these tools are installed and
require them to work. Good example: Nim support for almost every editor or IDE.

6. New dependencies for the port, gmake is required to build. Git, on 99% too,
I think, the port now also requires network during build. Didn't test without

7. I think I fixed the problem when someone couldn't generate a Nim package
documentation if the Nim documentation wasn't installed. Now all needed files
are copied to /usr/local/lib/nim directory no matter do doc option is selected
or not.

Generally, please test the port and check if everything works. It works for me,
but I'm not everyone. :)

You are receiving this mail because:
You are the assignee for the bug.