Bug 286616 - math/mpdecimal: Update to 4.0.1
Summary: math/mpdecimal: Update to 4.0.1
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-06 03:24 UTC by wen
Modified: 2025-05-07 14:05 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (skrah)


Attachments
Update to 4.0.1 (1.26 KB, patch)
2025-05-06 03:24 UTC, wen
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description wen 2025-05-06 03:24:49 UTC
Created attachment 260190 [details]
Update to 4.0.1

Update to 4.0.1
Comment 1 Stefan Krah 2025-05-07 08:27:57 UTC
Hi,

mpdecimal-4.0.1 now unconditionally sets LD=$CC and LDXX=$CXX in ./configure, so
these lines can be removed:

.if ${CHOSEN_COMPILER_TYPE} == gcc
CONFIGURE_ARGS=	LD="${CC}" LDXX="${CXX}"
.endif

Then there is an already existing small issue in ``make stage-qa'', which is
nagging about adding pathfix to USES because the pkg-config path is fixed.
Perhaps it could be added now together with the update patch:

USES=		compiler:c++11-lang gmake pathfix



Thanks,

Stefan Krah
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 11:28:54 UTC
Also remove GNU_CONFIGURE_MANPREFIX.
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 11:39:59 UTC
> Then there is an already existing small issue in ``make stage-qa'', which is
> nagging about adding pathfix to USES because the pkg-config path is fixed.
Don't see warnings… Can you copy&paste this text?

My suggestion (tested build in poudriere 14.2 amd64):
@@ -1,5 +1,5 @@
 PORTNAME=      mpdecimal
-DISTVERSION=   4.0.0
+DISTVERSION=   4.0.1
 CATEGORIES=    math
 MASTER_SITES=  https://www.bytereef.org/software/mpdecimal/releases/

@@ -11,23 +11,13 @@
 LICENSE_FILE=  ${WRKSRC}/COPYRIGHT.txt

 USES=          compiler:c++11-lang gmake
-
-GNU_CONFIGURE= yes
-GNU_CONFIGURE_MANPREFIX=       ${PREFIX}/share
 USE_LDCONFIG=  yes
+GNU_CONFIGURE= yes
 ALL_TARGET=    default
 TEST_TARGET=   check_local

-.include <bsd.port.pre.mk>
-
-.if ${CHOSEN_COMPILER_TYPE} == gcc
-CONFIGURE_ARGS=        LD="${CC}" LDXX="${CXX}"
-.endif
-
-CONFIGURE_ARGS+=       LDXXFLAGS="${LDFLAGS}"
-
 post-install:
        ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmpdec.so.${DISTVERSION}
        ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libmpdec++.so.${DISTVERSION}

-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Comment 4 Stefan Krah 2025-05-07 12:20:57 UTC
> Don't see warnings… Can you copy&paste this text?

Yes, perhaps the warning is actually from make-package. The entire
commands are:

make clean
make stage && make check-plist && make stage-qa && make package

[...]
/usr/bin/install -c -m 644 doc/libmpdec.3 /usr/ports/math/mpdecimal/work/stage/usr/local/share/man/man3
/usr/bin/install -c -m 644 doc/libmpdec++.3 /usr/ports/math/mpdecimal/work/stage/usr/local/share/man/man3
===>   File(s) found in lib/pkgconfig while correct path is libdata/pkgconfig
       Applying fix but consider using USES= pathfix or adjust install path
/usr/bin/strip /usr/ports/math/mpdecimal/work/stage/usr/local/lib/libmpdec.so.4.0.0
/usr/bin/strip /usr/ports/math/mpdecimal/work/stage/usr/local/lib/libmpdec++.so.4.0.0
[...]
Comment 5 Stefan Krah 2025-05-07 12:25:19 UTC
LDXXFLAGS="${LDFLAGS}" is actually still needed. Only LD="${CC}" LDXX="${CXX}" can be removed.
Comment 6 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 12:34:10 UTC
(In reply to Stefan Krah from comment #5)
> LDXXFLAGS="${LDFLAGS}" is actually still needed.
Why? Build fine without this line.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 12:50:07 UTC
(In reply to Stefan Krah from comment #4)
Ok. I see this path in build log, but poudriere testport don't print warning.
Comment 8 Stefan Krah 2025-05-07 12:51:07 UTC
>> LDXXFLAGS="${LDFLAGS}" is actually still needed.
> Why? Build fine without this line.

It was added recently:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285382

The default build works fine, but when users use something like

   export CFLAGS=-flto CXXFLAGS=-flto LDFLAGS=-flto

then -flto is missing from the C++ linker invocations.

Unfortunately, LDXXFLAGS are non-standard and users don't expect
to set them.
Comment 9 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 13:28:01 UTC
(In reply to Stefan Krah from comment #8)
Ok.
Comment 10 commit-hook freebsd_committer freebsd_triage 2025-05-07 14:02:37 UTC
A commit in branch main references this bug:

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

commit 5ac1c11804f347e693be9754643241ddb296a930
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-05-07 13:46:33 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-05-07 14:01:27 +0000

    math/mpdecimal: Update 4.0.0 => 4.0.1

    Changelog:
    https://www.bytereef.org/mpdecimal/changelog.html#version-4-0-1

    - Remove GNU_CONFIGURE_MANPREFIX.
    - Remove CONFIGURE_ARGS=LD="${CC}" LDXX="${CXX}" - unconditionally
    sets LD=$CC and LDXX=$CXX in ./configure now.
    - Add USES+=pathfix to fix path for install *.pc files:
      lib/pkgconfig => libdata/pkgconfig.

    PR:             286616
    Approved by:    Stefan Krah <skrah@bytereef.org> (maintainer)
    Co-authored-by: wen <wenheping2000@hotmail.com>

 math/mpdecimal/Makefile  | 19 +++++--------------
 math/mpdecimal/distinfo  |  6 +++---
 math/mpdecimal/pkg-plist |  4 ++--
 3 files changed, 10 insertions(+), 19 deletions(-)
Comment 11 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 14:05:23 UTC
Thanks.