Bug 262137

Summary: devel/apr1: Fix output of `apu-1-config --libs` when default version of berkeley db is 18
Product: Ports & Packages Reporter: Yasuhiro Kimura <yasu>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Closed FIXED    
Severity: Affects Some People CC: joneum
Priority: --- Flags: koobs: maintainer-feedback+
koobs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
Bug Depends on:    
Bug Blocks: 261523    
Attachments:
Description Flags
Patch file none

Description Yasuhiro Kimura freebsd_committer freebsd_triage 2022-02-23 06:45:19 UTC
Created attachment 232027 [details]
Patch file

When default version of berkeley db is 18, `apu-1-config --libs` returns following output.

yasu@eastasia[2137]% apu-1-config --libs
  -ldb -lgdbm  -lexpat
yasu@eastasia[2146]%

However, it is not libdb.so but libdb-18.1.so that is installed under ${PREFIX}/lib when you install database/db18. And it results in build failure of some ports that depend on devel/apr1 and use the output of `apu-1-config --libs` to get the options necessary for linking libraries properly. So fix the output by adding patch that makes configure script detects library name correctly.
Comment 1 commit-hook freebsd_committer freebsd_triage 2022-02-23 12:19:16 UTC
A commit in branch main references this bug:

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

commit 01c086fdc8ba6e15aa430c515c71b4d3e1679e2e
Author:     Jochen Neumeister <joneum@FreeBSD.org>
AuthorDate: 2022-02-23 12:15:49 +0000
Commit:     Jochen Neumeister <joneum@FreeBSD.org>
CommitDate: 2022-02-23 12:15:49 +0000

    devel/apr1: Fix output of `apu-1-config --libs` when default version of berkeley db is 18

    When default version of berkeley db is 18, `apu-1-config --libs` returns following output.

    yasu@eastasia[2137]% apu-1-config --libs
      -ldb -lgdbm  -lexpat
    yasu@eastasia[2146]%

    However, it is not libdb.so but libdb-18.1.so that is installed under ${PREFIX}/lib when you install database/db18. And it results in build failure of some ports that depend on devel/apr1 and use the output of `apu-1-config --libs` to get the options necessary for linking libraries properly. So fix the output by adding patch that makes configure script detects library name correctly.

    PR:     262137
    Submitted by:   yasu
    Approved by:    apache (with hat)
    Sponsored by:   Netzkommune GmbH

 devel/apr1/Makefile                |   4 +-
 devel/apr1/files/patch-bdb18 (new) | 107 +++++++++++++++++++++++++++++++++++++
 2 files changed, 110 insertions(+), 1 deletion(-)
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2022-02-23 23:16:13 UTC
Presumably quarterly users are affected if they dont use the default BDB version. Can we get this merged please Jochen?