Bug 281639

Summary: graphics/tiff: Update to 4.7.0 and switch to CMake
Product: Ports & Packages Reporter: Daniel Engberg <diizzy>
Component: Individual Port(s)Assignee: Daniel Engberg <diizzy>
Status: Closed FIXED    
Severity: Affects Only Me CC: arrowd, vishwin
Priority: --- Flags: vishwin: maintainer-feedback+
diizzy: exp-run?
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://gitlab.com/libtiff/libtiff/-/releases/v4.7.0
Bug Depends on:    
Bug Blocks: 281640, 281747, 281763, 281764    
Attachments:
Description Flags
Patch for tiff vishwin: maintainer-approval-

Description Daniel Engberg freebsd_committer freebsd_triage 2024-09-22 09:51:18 UTC
Created attachment 253734 [details]
Patch for tiff

Compile and runtime tested on FreeBSD 14.1-RELEASE (amd64) (make, make check-plist, make test)

Poudriere testport OK 13.3-RELEASE (amd64)
Poudriere testport OK 14.0-RELEASE (i386)
Poudriere testport OK 14.0-RELEASE (amd64)
Poudriere testport OK 14.1-RELEASE (amd64)

A "mini-exp" run on my end looks fine
Comment 1 Gleb Popov freebsd_committer freebsd_triage 2024-09-22 10:47:29 UTC
It is a bit strange that you use INSTALL_MAN to install docs in post-install-DOCS-on. Is this a copy-paste typo?
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2024-09-22 11:00:50 UTC
It's what Porters Handbook suggests
https://docs.freebsd.org/en/books/porters-handbook/book/#install-macros
Comment 3 Gleb Popov freebsd_committer freebsd_triage 2024-09-22 11:03:29 UTC
This is peculiar, I never noticed that. It also says "it does not compress anything" which is false for man pages, but OK.

Another point is switching the build to CMake. I personally don't mind, but other people may not welcome this change. I failed to find out what buildsystem the upstream recommends.
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2024-09-22 11:05:41 UTC
Hi,

I'd like to request an exp-run

Best regards,
Daniel
Comment 5 Daniel Engberg freebsd_committer freebsd_triage 2024-09-22 11:10:58 UTC
(In reply to Gleb Popov from comment #3)
It builds faster and provides .cmake files which upstream projects makes use of so I don't see this as a regression and distros such as Alpine Linux have already migrated to CMake.
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2024-09-22 11:27:09 UTC
Might also add that it speeds up unit tests (which also runs more tests than Autotools) and the majority of consumers also uses CMake.

Autotools:
make
        14.55s real             34.53s user             6.56s sys
make test:
        6.32s real              3.89s user              2.63s sys

CMake:
make:
        9.42s real              32.59s user             2.48s sys
make test:
        1.81s real              6.03s user              2.41s sys
Comment 7 Charlie Li freebsd_committer freebsd_triage 2024-09-22 14:50:53 UTC
Upstream needs to explicitly recommend using cmake; the README only mentions autotools. The "builds faster" and all other arguments are irrelevant. Not every distro chooses to use cmake (Arch Linux still uses autotools)
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2024-09-22 15:24:39 UTC
You missed the first sentence?
This file is just a placeholder; the entire documentation is now located
as reStructuredText in the doc directory.

https://libtiff.gitlab.io/libtiff/build.html or https://gitlab.com/libtiff/libtiff/-/blob/v4.7.0/doc/build.rst
Comment 9 Charlie Li freebsd_committer freebsd_triage 2024-09-22 18:47:24 UTC
It's still a README at the end of the day and it shall be treated as such.

That part of the documentation seems ambivalent about using either. CI also appears to run both. In which case, switching from one to the other is only really worth when accompanied by an API/ABI break, which these release notes mention none.
Comment 10 Antoine Brodin freebsd_committer freebsd_triage 2024-09-25 12:59:26 UTC
Please switch back to configure/make.
Symbol versionning is known to be totally broken with tiff built with cmake.
Comment 11 Gleb Popov freebsd_committer freebsd_triage 2024-09-25 13:15:01 UTC
(In reply to Antoine Brodin from comment #10)
Just a note - "maintainer-feedback -" means "no feedback" rather than "patch not accepted".
Comment 12 Daniel Engberg freebsd_committer freebsd_triage 2024-09-26 17:11:25 UTC
(In reply to Antoine Brodin from comment #10)
Can you elaborate on this as doesn't seem to be case in 4.7.0 ?
Comment 13 Daniel Engberg freebsd_committer freebsd_triage 2024-09-26 17:37:03 UTC
Might as well add that the symbol lists

https://reviews.freebsd.org/P648
Comment 15 commit-hook freebsd_committer freebsd_triage 2024-10-09 19:44:33 UTC
A commit in branch main references this bug:

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

commit 0bdf5887f0d2cc9f14ea0cc10ed9e371028dd620
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2024-10-09 19:12:09 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2024-10-09 19:43:25 +0000

    graphics/tiff: Update to 4.7.0 and switch to CMake

    Changelog:
    https://gitlab.com/libtiff/libtiff/-/releases/v4.7.0

    PR:             281639
    Approved by:    desktop (fluffy) via Matrix
    Exp-run by:     antoine

 graphics/tiff/Makefile                             | 32 ++++++---
 graphics/tiff/distinfo                             |  6 +-
 .../files/patch-cmake_LinkerChecks.cmake (new)     | 11 +++
 .../tiff/files/patch-libtiff_CMakeLists.txt (new)  | 11 +++
 .../patch-tools_unsupported_Makefile.in (gone)     | 10 ---
 graphics/tiff/pkg-plist                            | 81 ++++++++++++++++++++--
 6 files changed, 124 insertions(+), 27 deletions(-)