mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-26 07:37:14 +00:00
xdotool: fix do_install failure due to missing pc.sh
The 4.20251130.1 upgrade switched SRC_URI from a git snapshot to the
GitHub release tarball. That tarball ships a prebuilt libxdo.pc but does
not include pc.sh, even though the Makefile still carries the rule:
libxdo.pc: VERSION
sh pc.sh $(VERSION) $(INSTALLLIB) $(INSTALLINCLUDE) > libxdo.pc
do_install runs "make install", which pulls in the installpc target.
Because libxdo.pc depends on VERSION, whenever a fresh unpack leaves
VERSION with an mtime newer than or equal to libxdo.pc, make considers
the shipped libxdo.pc stale and re-runs pc.sh, failing with:
sh: 0: cannot open pc.sh: No such file
make: *** [Makefile:153: libxdo.pc] Error 2
The mtime ordering after unpack is not deterministic, so the failure is
intermittent and typically shows up after a re-fetch. On top of that,
the prebuilt libxdo.pc in the tarball hard-codes /usr/local paths, so
even when the race does not trigger, an incorrect .pc gets installed.
Ship the upstream pc.sh alongside the recipe and place it in ${S} so the
installpc rule regenerates libxdo.pc with the correct libdir/includedir
from EXTRA_OEMAKE. This fixes both the build failure and the wrong paths.
Signed-off-by: Yogesh Tyagi <yogesh.tyagi@intel.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
VERSION=$1
|
||||
LIBDIR=$2
|
||||
INCLUDEDIR=$3
|
||||
|
||||
cat <<ENDPC
|
||||
libdir=${LIBDIR}
|
||||
includedir=${INCLUDEDIR}
|
||||
|
||||
Name: libxdo
|
||||
Description: fake keyboard/mouse input, window management, and more
|
||||
Version: ${VERSION}
|
||||
Requires: x11
|
||||
Libs: -L\${libdir} -lxdo
|
||||
Cflags: -I\${includedir}
|
||||
ENDPC
|
||||
@@ -9,7 +9,13 @@ inherit features_check pkgconfig perlnative
|
||||
# depends on virtual/libx11
|
||||
REQUIRED_DISTRO_FEATURES = "x11"
|
||||
|
||||
SRC_URI = "https://github.com/jordansissel/${BPN}/releases/download/v${PV}/${BP}.tar.gz"
|
||||
# The release tarball ships a prebuilt (and wrongly pathed) libxdo.pc but omits
|
||||
# pc.sh, which the Makefile's installpc rule needs to (re)generate libxdo.pc.
|
||||
# Depending on the unpack mtime ordering of VERSION vs libxdo.pc, make tries to
|
||||
# rebuild libxdo.pc and fails with "sh: 0: cannot open pc.sh". Supply the
|
||||
# upstream pc.sh so regeneration works with the correct libdir/includedir.
|
||||
SRC_URI = "https://github.com/jordansissel/${BPN}/releases/download/v${PV}/${BP}.tar.gz \
|
||||
file://pc.sh"
|
||||
SRC_URI[sha256sum] = "eee789b00d6a13d47b31bbc139727e6408c21b5f6ba5e804fdf6ecfb8c781356"
|
||||
|
||||
EXTRA_OEMAKE = "PREFIX=${prefix} INSTALLLIB=${libdir} INSTALLMAN=${mandir} WITHOUT_RPATH_FIX=1"
|
||||
@@ -17,6 +23,10 @@ EXTRA_OEMAKE = "PREFIX=${prefix} INSTALLLIB=${libdir} INSTALLMAN=${mandir} WITHO
|
||||
UPSTREAM_CHECK_URI = "https://github.com/jordansissel/xdotool/tags"
|
||||
UPSTREAM_CHECK_REGEX = "v(?P<pver>\d+\.\d{8}\.\d+)"
|
||||
|
||||
do_configure:append() {
|
||||
install -m 0755 ${UNPACKDIR}/pc.sh ${S}/pc.sh
|
||||
}
|
||||
|
||||
do_install() {
|
||||
oe_runmake install DESTDIR=${D} PREFIX=${prefix} LDCONFIG=true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user