Bug 283292 - www/osrm-backend: Attempt to unbundle old version of sol2
Summary: www/osrm-backend: Attempt to unbundle old version of sol2
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: Robert Clausecker
URL:
Keywords:
Depends on: 283287
Blocks:
  Show dependency treegraph
 
Reported: 2024-12-12 21:55 UTC by Peter Laursen
Modified: 2025-01-06 23:12 UTC (History)
1 user (show)

See Also:


Attachments
Patch removing dependency on clang18 and attempts to unbundle old sol2 library (1.83 KB, patch)
2024-12-12 21:55 UTC, Peter Laursen
freebsd: maintainer-approval+
Details | Diff
Proper patch; last one is wrong (1.79 KB, patch)
2024-12-13 08:44 UTC, Peter Laursen
freebsd: maintainer-approval+
Details | Diff
Replace sol2 include path with proper LOCALBASE via sed (1.23 KB, patch)
2024-12-15 10:34 UTC, Peter Laursen
freebsd: maintainer-approval+
Details | Diff
Whitespace issue fix; otherwise the REINPLACE_CMD command failed while patching CMakeLists.txt (1.22 KB, patch)
2024-12-15 10:53 UTC, Peter Laursen
no flags Details | Diff
Fix garbled patch. (1.10 KB, patch)
2024-12-20 12:56 UTC, Peter Laursen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Laursen 2024-12-12 21:55:27 UTC
Created attachment 255820 [details]
Patch removing dependency on clang18 and attempts to unbundle old sol2 library

Hi,
I am the maintainer of this port.

I finally found some time to attempt to unbundle the old version of sol2 used by default, because it caused some build issues with modern Clang on FreeBSD-Current.
Attached is a patch that:
* Removes the DEBUG option - it did nothing.
* Tries to unbundle the included sol2 library.
* Removes the dependency on Clang 18 for FreeBSD-Current.
* Bumps PORTREVISION

I couldn't figure out how to replace the bundled sol2 library's include path using REINPLACE_CMD - that's why that modification is its own separate file and not part of the Makefile. If anyone can find a better way of doing so, you have my permission to modify the command. I should also note that the path to sol2 is hardcoded to /usr/local/include/sol because of the previous issue - if it can be fixed to be more generic, that's fine by me.

All the best,

Peter.
Comment 1 Peter Laursen 2024-12-13 08:44:32 UTC
Created attachment 255832 [details]
Proper patch; last one is wrong

While generating the initial attachment, I got some command invocation wrong.
Here's the proper patch.
Comment 2 Robert Clausecker freebsd_committer freebsd_triage 2024-12-15 04:09:26 UTC
Thank you for this patch.  Unfortunately it hard codes the assumption that LOCALBASE is /usr/local, which is not guaranteed to be the case.  Instead of adding the patch, you can add something like the following to the Makefile to make it work correctly:

    pre-configure:
            ${REINPLACE_CMD} -e 's,$${CMAKE_CURRENT_SOURCE_DIR}/third_party/sol2/include,${LOCALBASE}/include/sol,' ${WRKSRC}/CMakeLists.txt

Please check if that works out.
Comment 3 Peter Laursen 2024-12-15 10:34:07 UTC
Created attachment 255870 [details]
Replace sol2 include path with proper LOCALBASE via sed

Hi Robert,
Thanks for letting me know about the path fix.
I've tested this and it seemed to work on Current.
Attached is a patch incorporating your suggestion.

All the best,

Peter.
Comment 4 Peter Laursen 2024-12-15 10:53:12 UTC
Created attachment 255871 [details]
Whitespace issue fix; otherwise the REINPLACE_CMD command failed while patching CMakeLists.txt
Comment 5 Robert Clausecker freebsd_committer freebsd_triage 2024-12-15 13:04:29 UTC
(In reply to Peter Laursen from comment #4)

Your patch has been mutilated and does not apply.  All tabs have been changed to whitespace and trailing whitespace has been discarded.  Did you perhaps copy/paste it using the clipboard?  Please make sure the patch stays exactly the same when you upload it.
Comment 6 Peter Laursen 2024-12-20 12:56:23 UTC
Created attachment 255979 [details]
Fix garbled patch.

Hi,
Thanks for spotting.
I did (as you guessed) choose the "Paste attachment as plain text"-option from the web interface and copied the file contents over.
This time, the patch has (hopefully) been untouched as it's been uploaded straight from a git diff.

All the best,

Peter.
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-01-06 23:08:07 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2ae03d3a684e76d8ecc643a13104088bef26fbb7

commit 2ae03d3a684e76d8ecc643a13104088bef26fbb7
Author:     Peter Laursen <freebsd@mosedal.net>
AuthorDate: 2025-01-04 17:50:19 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-06 23:06:10 +0000

    www/osrm-backend: unbundle sol2

     - Remove the DEBUG option - it did nothing.
     - Trie to unbundle the included sol2 library.
     - Remove the dependency on Clang 18 for FreeBSD-Current.
     - Bump PORTREVISION

    PR:             283292
    MFH:            2025Q1

 www/osrm-backend/Makefile | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-01-06 23:09:21 UTC
A commit in branch 2025Q1 references this bug:

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

commit de13c4bea037b5e0eb0b65f94dd52d795d62b79f
Author:     Peter Laursen <freebsd@mosedal.net>
AuthorDate: 2025-01-04 17:50:19 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2025-01-06 23:08:03 +0000

    www/osrm-backend: unbundle sol2

     - Remove the DEBUG option - it did nothing.
     - Trie to unbundle the included sol2 library.
     - Remove the dependency on Clang 18 for FreeBSD-Current.
     - Bump PORTREVISION

    PR:             283292
    MFH:            2025Q1
    (cherry picked from commit 2ae03d3a684e76d8ecc643a13104088bef26fbb7)

 www/osrm-backend/Makefile | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
Comment 9 Robert Clausecker freebsd_committer freebsd_triage 2025-01-06 23:12:02 UTC
Thank you for your submission.