Page MenuHomeFreeBSD

Add `gnubin` dir for all programs that are prefixed with `g`
Needs RevisionPublic

Authored by me_cameronkatri.com on May 7 2021, 8:05 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 10 2024, 2:54 AM
Unknown Object (File)
Dec 25 2023, 4:48 AM
Unknown Object (File)
Nov 28 2023, 4:40 AM
Unknown Object (File)
Nov 23 2023, 1:48 AM
Unknown Object (File)
Nov 22 2023, 2:26 PM
Unknown Object (File)
Nov 22 2023, 12:44 PM
Unknown Object (File)
Nov 13 2023, 8:57 PM
Unknown Object (File)
Nov 12 2023, 10:08 AM

Details

Reviewers
bapt
Group Reviewers
Contributor Reviewers (ports)
Summary

Create a directory at ${PREFIX}/gnubin for symlinks to all utilities that are prefixed with a g to be used without the prefix. This is useful when project's build system needs a GNU userland but doesn't check for the binaries with a g prefix.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

me_cameronkatri.com created this revision.
bapt requested changes to this revision.May 7 2021, 8:27 PM
bapt added a subscriber: bapt.

We do have BINARY_ALIAS for that if that is needed, so I do not see what gnubin brings in here. For me I am not convince this brings anything useful.

This revision now requires changes to proceed.May 7 2021, 8:27 PM

I agree with @bapt here. Making gfoo program available as foo during build will probably make the port require is as foo during runtime too. This, in turn, would require to add gnubin to PATH and this is another big can of worms.

In D30167#677453, @bapt wrote:

We do have BINARY_ALIAS for that if that is needed, so I do not see what gnubin brings in here. For me I am not convince this brings anything useful.

I meant for when not building in ports.

I meant for when not building in ports.

The argument stays. If the software you are building uses autotools, you can usually pass things like SED=/usr/local/bin/gsed to the configure script. Same goes for CMake buildsystem and probably meson.

However, when cross-compiling for a gnu system it will then look for the wrong bin in runtime.

However, when cross-compiling for a gnu system it will then look for the wrong bin in runtime.

That's right, but such use-case seems to be quite specific. Are you doing such cross-compilations yourself?

I agree with @arrowd , I think this is too large a change for such a small use case. I think that if you want to cross-compile something on FreeBSD to GNU, you should probably work on improving the software being cross-compiled to support prefixes, as opposed to modifying FreeBSD to work with non-prefixing.