Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: tune MANPREFIX configuration for FreeBSD #1043

Merged
merged 1 commit into from May 5, 2023

Conversation

ihoro
Copy link
Contributor

@ihoro ihoro commented Apr 29, 2023

We could think of the following use cases:

  1. User installs git-extras from official port/pkg. man/man* structure is quite common among different systems, but location of man/ itself can be different. FreeBSD Ports framework setups MANPREFIX to PREFIX by default, i.e. it's /usr/local. The idea is that software may provide different man/man* sections, with final path being /usr/local/man/man*. In contrast, git-extras' Makefile process simplifies the things due to it works with section 1 only, and expects MANPREFIX to be set down to man/man1 path. For this reason, installation via FreeBSD Ports requires unconditional man path configuration like this:

    ifeq ($(OS), FreeBSD)
    MANPREFIX = "$(PREFIX)/man/man1"

Otherwise, the path will be incorrect. And this is how official FreeBSD port of git-extras has been fixing this difference for many years.

  1. End user installs git-extras manually. There are two sub-cases:

2.a. User explicitly defines custom MANPREFIX. Okay, it's user's
decision -- nothing to do here, just follow as is.
(But /usr/local will be corrected to /usr/local/man/man1)

2.b. User does not define custom paths, i.e. it's expected to be
installed according to FreeBSD defaults. And default values in
git-extras' Makefile forms the expected correct path.

This change supports all the cases above, with the goal to avoid wrong man path for the most of the situations. As long as official git-extras make process tries to support FreeBSD, this change allows to omit extra patching for FreeBSD Ports framework.

We could think of the following use cases:

1. User installs git-extras from official port/pkg. man/man* structure
is quite common among different systems, but location of man/ itself can
be different. FreeBSD Ports framework setups MANPREFIX to PREFIX by
default, i.e. it's /usr/local. The idea is that software may provide
different man/man* sections, with final path being /usr/local/man/man*.
In contrast, git-extras' Makefile process simplifies the things due to
it works with section 1 only, and expects MANPREFIX to be set down to
man/man1 path. For this reason, installation via FreeBSD Ports requires
unconditional man path configuration like this:

    ifeq ($(OS), FreeBSD)
        MANPREFIX = "$(PREFIX)/man/man1"

Otherwise, the path will be incorrect. And this is how official FreeBSD
port of git-extras has been fixing this difference for many years.

2. End user installs git-extras manually. There are two sub-cases:

  2.a. User explicitly defines custom MANPREFIX. Okay, it's user's
  decision -- nothing to do here, just follow as is.

  2.b. User does not define custom paths, i.e. it's expected to be
  installed according to FreeBSD defaults. And default values in
  git-extras' Makefile forms the expected correct path.

This change supports all the cases above, with the goal to avoid wrong
man path for the most of the situations. As long as official git-extras
make process tries to support FreeBSD, this change allows to omit extra
patching for FreeBSD Ports framework.
Copy link
Collaborator

@spacewander spacewander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@spacewander spacewander merged commit 6d73f74 into tj:master May 5, 2023
3 checks passed
vanpipy pushed a commit to vanpipy/git-extras that referenced this pull request Sep 14, 2023
We could think of the following use cases:

1. User installs git-extras from official port/pkg. man/man* structure
is quite common among different systems, but location of man/ itself can
be different. FreeBSD Ports framework setups MANPREFIX to PREFIX by
default, i.e. it's /usr/local. The idea is that software may provide
different man/man* sections, with final path being /usr/local/man/man*.
In contrast, git-extras' Makefile process simplifies the things due to
it works with section 1 only, and expects MANPREFIX to be set down to
man/man1 path. For this reason, installation via FreeBSD Ports requires
unconditional man path configuration like this:

    ifeq ($(OS), FreeBSD)
        MANPREFIX = "$(PREFIX)/man/man1"

Otherwise, the path will be incorrect. And this is how official FreeBSD
port of git-extras has been fixing this difference for many years.

2. End user installs git-extras manually. There are two sub-cases:

  2.a. User explicitly defines custom MANPREFIX. Okay, it's user's
  decision -- nothing to do here, just follow as is.

  2.b. User does not define custom paths, i.e. it's expected to be
  installed according to FreeBSD defaults. And default values in
  git-extras' Makefile forms the expected correct path.

This change supports all the cases above, with the goal to avoid wrong
man path for the most of the situations. As long as official git-extras
make process tries to support FreeBSD, this change allows to omit extra
patching for FreeBSD Ports framework.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants