new file mode 100644
@@ -0,0 +1,37 @@
+SUMMARY = "Utilities for manipulating PDF and PostScript documents"
+DESCRIPTION = "PSUtils is a collection of utilities for manipulating PDF \
+and PostScript documents: page selection and rearrangement, arrangement \
+into signatures for booklet printing, and page merging for n-up printing."
+HOMEPAGE = "https://github.com/rrthomas/psutils"
+LICENSE = "GPL-3.0-or-later"
+LIC_FILES_CHKSUM = "file://COPYING;md5=87212b5f1ae096371049a12f80034f32"
+
+SRC_URI = "https://github.com/rrthomas/psutils/releases/download/v${PV}/psutils-${PV}.tar.gz"
+SRC_URI[sha256sum] = "3ff76cc9f9fb535ec553d1591de56d6dbaa0d9f4df86778f6a49731ebd764cdf"
+
+UPSTREAM_CHECK_URI = "https://github.com/rrthomas/psutils/releases"
+UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
+
+inherit python_setuptools_build_meta
+
+# setup.py generates the man pages from the argparse parsers and runs 'paper'
+DEPENDS += " \
+ libpaper-native \
+ python3-argparse-manpage-native \
+ python3-puremagic-native \
+ python3-pypdf-native \
+"
+
+# setup.py runs 'paper', which needs a default size and finds no paperspecs in a relocated sysroot
+export PAPERSIZE = "a4"
+export XDG_CONFIG_HOME = "${STAGING_ETCDIR_NATIVE}"
+
+RDEPENDS:${PN} += " \
+ libpaper \
+ python3-core \
+ python3-io \
+ python3-puremagic \
+ python3-pypdf \
+"
+
+BBCLASSEXTEND = "native"
deleted file mode 100644
@@ -1,27 +0,0 @@
-LICENSE = "GPL-3.0-or-later"
-LIC_FILES_CHKSUM = "file://COPYING;md5=87212b5f1ae096371049a12f80034f32"
-
-SRC_URI = "https://github.com/rrthomas/psutils/releases/download/v${PV}/psutils-${PV}.tar.gz"
-SRC_URI[sha256sum] = "6f8339fd5322df5c782bfb355d9f89e513353220fca0700a5a28775404d7e98b"
-
-UPSTREAM_CHECK_URI = "https://github.com/rrthomas/psutils/releases"
-UPSTREAM_CHECK_REGEX = "releases/tag/v(?P<pver>\d+(\.\d+)+)"
-
-inherit perlnative autotools
-
-export PERL = "/usr/bin/env perl"
-
-DEPENDS += "libpaper-native"
-
-do_install:append() {
- sed -i -e 's|${STAGING_BINDIR_NATIVE}/perl-native/|/usr/bin/env |g' ${D}${bindir}/pstops
- for f in psbook psresize psnup psselect; do
- grep -v '${B}' ${D}${bindir}/$f > ${D}${bindir}/$f.temp
- install -m 0755 ${D}${bindir}/$f.temp ${D}${bindir}/$f
- rm -f ${D}${bindir}/$f.temp
- done
-}
-
-BBCLASSEXTEND += "native"
-# /usr/bin/pstops contained in package psutils requires perl
-RDEPENDS:${PN} += "perl"
PSUtils 3 is a rewrite in Python that adds PDF support to the same commands (psbook, psnup, pstops, psselect, psresize, epsffit, extractres, includeres, psjoin). Later 3.x releases improve paper size detection from PostScript files, accept psnup page specs without --specs again, and fix psresize --height. The recipe is rewritten from autotools/perl to a setuptools PEP 517 build. It now needs python3-puremagic, python3-pypdf and python3-argparse-manpage (for the man pages generated in setup.py) from meta-python, so it moves to meta-oe's meta-python dynamic layer. setup.py and the commands run 'paper', so libpaper-native stays a build dependency and libpaper becomes a runtime one. perl is no longer needed at runtime. setup.py runs 'paper', which needs a default paper size and cannot find the paperspecs file of a relocated libpaper-native, so set PAPERSIZE and XDG_CONFIG_HOME for the build. AI-Generated: Uses Claude Code Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com> --- .../recipes-support/psutils/psutils_3.3.17.bb | 37 +++++++++++++++++++ .../recipes-support/psutils/psutils_2.10.bb | 27 -------------- 2 files changed, 37 insertions(+), 27 deletions(-) create mode 100644 meta-oe/dynamic-layers/meta-python/recipes-support/psutils/psutils_3.3.17.bb delete mode 100644 meta-oe/recipes-support/psutils/psutils_2.10.bb