Skip to content

textproc/iso8879: Fix build failure by using USES=zip - #610

Merged
laffer1 merged 1 commit into
masterfrom
textproc/iso8879
Jun 5, 2026
Merged

laffer1 merged 1 commit into
masterfrom
textproc/iso8879

Conversation

@laffer1

@laffer1 laffer1 commented Jun 5, 2026 •

Copy link
Copy Markdown
Member

Modernize the port by using USES=zip which utilizes the native unzip command. This fixes a build failure where /usr/local/bin/unzip was missing during the fake stage because it was only listed in BUILD_DEPENDS and the port used NO_BUILD=yes.

Also simplify the do-install target by using standard INSTALL_DATA and removing redundant pre-install target.

AI-Assisted-by: Gemini CLI [email protected]

Summary by Sourcery

Modernize the iso8879 port to use the standard zip framework and simplify installation while fixing a missing unzip build-time dependency.

Bug Fixes:

  • Resolve build failures by switching from an explicit unzip BUILD_DEPENDS to USES=zip, relying on the base system unzip.

Enhancements:

  • Simplify the iso8879 port Makefile by using standard INSTALL_DATA, consolidating PLIST substitutions, and removing the custom pre-install logic.

Modernize the port by using USES=zip which utilizes the native unzip command.
This fixes a build failure where /usr/local/bin/unzip was missing during the
fake stage because it was only listed in BUILD_DEPENDS and the port used
NO_BUILD=yes.

Also simplify the do-install target by using standard INSTALL_DATA and removing
redundant pre-install target.

AI-Assisted-by: Gemini CLI <[email protected]>
Signed-off-by: Lucas Holt <[email protected]>
@sourcery-ai

sourcery-ai Bot commented Jun 5, 2026 •

Copy link
Copy Markdown
Contributor
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Modernizes the iso8879 port to use the standard USES=zip framework instead of a manual unzip dependency and extraction, and simplifies installation by using standard INSTALL_DATA semantics and cleaning up redundant targets and plist substitutions.

Flow diagram for iso8879 port build with USES=zip

flowchart TD
    A["ports framework: fetch distfile isoENTS.zip"] --> B["USES=zip: run native unzip via UNZIP_CMD"]
    B --> C["extract to WRKSRC (NO_WRKSUBDIR=yes)"]
    C --> D["do-install: MKDIR INSTDIR"]
    D --> E["do-install: INSTALL_DATA ISO* to INSTDIR"]
    E --> F["do-install: INSTALL_DATA catalog to INSTDIR/catalog"]
    F --> G["package plist uses PLIST_SUB with DTD_NAME and CATALOG_PORTS_SGML"]
Loading

File-Level Changes

Change Details Files
Switch to USES=zip and rely on framework-provided extraction instead of a manual unzip dependency and EXTRACT_ONLY override.
  • Remove explicit EXTRACT_SUFX and EXTRACT_ONLY override that disabled default extraction.
  • Remove BUILD_DEPENDS on archivers/unzip and rely on USES=zip-provided native unzip handling.
  • Add USES=zip to declare the port uses a zip distfile and native extraction.
textproc/iso8879/Makefile
Simplify install logic to use framework helpers and clean up plist and dependency syntax.
  • Normalize RUN_DEPENDS syntax to use category/port form without ${PORTSDIR}.
  • Collapse PLIST_SUB definitions into a single, wrapped assignment line for readability.
  • Remove pre-install target and move directory creation into do-install using ${MKDIR}.
  • Replace manual unzip-based installation with INSTALL_DATA from ${WRKSRC}/ISO* into ${INSTDIR}.
  • Remove explicit chmod/chown operations, relying on standard INSTALL_DATA ownership and modes.
  • Retain catalog installation but rely on cleaned-up install logic in do-install.
textproc/iso8879/Makefile

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@claude

claude Bot commented Jun 5, 2026 •

Copy link
Copy Markdown

Claude encountered an error —— View job


I'll analyze this and get back to you.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the textproc/iso8879 Makefile by adopting the USES= zip framework, simplifying dependencies, and cleaning up the installation process. However, the do-install target installs files directly to ${INSTDIR} instead of utilizing the staging directory ${STAGEDIR}. This violates staging requirements and will lead to failures during the staging or packaging phase.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread textproc/iso8879/Makefile
Comment on lines +30 to 32
${MKDIR} ${INSTDIR}
${INSTALL_DATA} ${WRKSRC}/ISO* ${INSTDIR}
${INSTALL_DATA} ${FILESDIR}/catalog ${INSTDIR}/catalog

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

In MidnightBSD mports, all files must be installed into the stage directory using ${STAGEDIR} during the do-install target. Installing directly to ${INSTDIR} (which points to ${PREFIX}) will fail during the fake/stage phase or attempt to write directly to the host system.

	${MKDIR} ${STAGEDIR}${INSTDIR}
	${INSTALL_DATA} ${WRKSRC}/ISO* ${STAGEDIR}${INSTDIR}
	${INSTALL_DATA} ${FILESDIR}/catalog ${STAGEDIR}${INSTDIR}/catalog

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

In mports, FAKE_DESTDIR is used instead of STAGEDIR and it's not needed in do-install target on mports as PREFIX includes FAKE_DESTDIR

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • In the do-install target, consider replacing the ${WRKSRC}/ISO* wildcard with an explicit list of files to install to avoid unintentionally picking up unexpected files if the distfile contents change.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- In the do-install target, consider replacing the `${WRKSRC}/ISO*` wildcard with an explicit list of files to install to avoid unintentionally picking up unexpected files if the distfile contents change.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@laffer1
laffer1 merged commit 433dd09 into master Jun 5, 2026
9 of 10 checks passed
@laffer1
laffer1 deleted the textproc/iso8879 branch June 5, 2026 01:41
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.

1 participant