Skip to content

configure.in renamed to configure.ac - #66

Closed
sc0w wants to merge 1 commit into
amule-project:masterfrom
sc0w:configure_ac
Closed

configure.in renamed to configure.ac#66
sc0w wants to merge 1 commit into
amule-project:masterfrom
sc0w:configure_ac

Conversation

@sc0w

@sc0w sc0w commented Sep 22, 2016

Copy link
Copy Markdown
Member

Fixes GH issue #65

@gonosztopi

Copy link
Copy Markdown
Member

Partially committed (except m4/gettext.m4 and m4/isc-posix.m4, which will be overwritten by autogen.sh anyways).

@gonosztopi gonosztopi closed this Sep 25, 2016
ngosang added a commit to ngosang/amule that referenced this pull request Jun 11, 2026
Weblate updates docs/man/po/manpages-*.po but cannot run po4a, so the
rendered *.{lang}.1.in files tracked in git always drift and the check
turned every Weblate translation PR red (e.g. PR amule-project#66). Comment the job
out (not delete) until the rendered manpages are removed from the repo
and generated at build time with CMake + po4a; the tracked renders are
deliberately allowed to lag behind the .po files in the meantime.
ngosang added a commit to ngosang/amule that referenced this pull request Jun 11, 2026
Co-authored-by: Diego Heras <[email protected]>
Co-authored-by: John Doe <[email protected]>
Co-authored-by: Marcelo Roberto Jimenez <[email protected]>
ngosang pushed a commit to ngosang/amule that referenced this pull request Jun 11, 2026
Stop tracking the ~100 pre-rendered docs/man/*.{lang}.1.in and
src/utils/*/docs/*.{lang}.1.in. Generate them at build time from the
English masters + docs/man/po/manpages-*.po via po4a, then install
them under <prefix>/share/man/<lang>/man1/.

Why this matters:

Weblate edits docs/man/po/manpages-*.po but cannot run po4a, so every
Weblate translation PR left the tracked renders stale and turned the
manpages-sync CI red (PR amule-project#66). The stopgap commented the check out
entirely, which let the tracked renders deliberately lag behind the
translations.

Tracking generated files also forced CI to pin po4a 0.74 from
Debian trixie because po4a's output wrapping changes between versions
and any mismatch surfaced as spurious drift.

Pipeline

- docs/man/po4a.config.in: CMake-templated config; @CMAKE_*_DIR@
  references resolve to absolute build-dir output paths at configure
  time, so po4a writes straight into the build tree.
- docs/man/CMakeLists.txt:
  * cmake_dependent_option(TRANSLATED_MANPAGES ... ON ENABLE_NLS OFF)
  * find_program(po4a). If missing, install only English masters and
    surface a STATUS message (po4a is an optional build dep).
  * add_custom_command runs po4a once with DEPENDS on every
    manpages-*.po, then a second custom_command per output runs
    cmake/configure_translated_manpage.cmake to substitute @MAN_DATE@
    and @PACKAGE_VERSION@ (po4a passes those through verbatim).
  * The two-pass split is required because configure_file is
    configure-time only; the rendered .1.in inputs don't exist yet
    when CMakeLists.txt runs.
- cmake/configure_translated_manpage.cmake: tiny helper that
  re-implements configure_file @only semantics via file(READ) +
  string(CONFIGURE) + file(WRITE), invoked via cmake -P from the
  custom_command at build time.
- scripts/update-manpages-po.sh: counterpart to scripts/update-po.sh
  for translators. Runs po4a --no-translations against a temp
  docs/man-relative config (so #: source refs land as relative paths,
  not the developer's absolute fs path), regenerating manpages.pot
  and merging into manpages-*.po.
- .github/workflows/i18n.yml: replace the disabled manpages-sync
  with a manpages-pot-sync that re-runs update-manpages-po.sh and
  diffs the result, matching the existing pot-sync job for the
  application catalogs. Weblate can never break this one — Weblate
  only edits .po files.
- .github/workflows/release.yml: new source-bundle job builds
  aMule-<TAG>-src.tar.gz containing every tracked file plus the
  freshly-rendered translated manpages, so downstream packagers can
  consume a tarball that doesn't require po4a at build time. Attached
  to the draft Release alongside the binary artifacts.

The mtime gotcha the disabled manpages-sync job documents goes away
once nothing rendered is in git: CMake's DEPENDS on the .po inputs
drives incremental rebuilds rather than po4a's own
"outputs up-to-date" check.

Closes amule-project#69.
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.

2 participants