From ac3567dcc9149ebcaed4e1ffba647b775e774b40 Mon Sep 17 00:00:00 2001 From: Nathan Owens Date: Thu, 31 Dec 2020 20:27:21 -0600 Subject: [PATCH] scanmem: fix cross-build --- srcpkgs/scanmem/patches/0001-fix-cross.patch | 37 ++++++++++++++++++++ srcpkgs/scanmem/template | 4 ++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 srcpkgs/scanmem/patches/0001-fix-cross.patch diff --git a/srcpkgs/scanmem/patches/0001-fix-cross.patch b/srcpkgs/scanmem/patches/0001-fix-cross.patch new file mode 100644 index 00000000000..8338537e546 --- /dev/null +++ b/srcpkgs/scanmem/patches/0001-fix-cross.patch @@ -0,0 +1,37 @@ +From 42b3c43a88474f818c0d8afa5d4ca2050873b65f Mon Sep 17 00:00:00 2001 +From: Nathan Owens +Date: Fri, 1 Jan 2021 15:32:48 -0600 +Subject: [PATCH] fix cross + +--- + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git configure.ac configure.ac +index 5b8bac3..740166f 100644 +--- configure.ac ++++ configure.ac +@@ -57,8 +57,10 @@ case "$host_os" in + AC_MSG_NOTICE([Your platform is not currently supported]) + ;; + esac +- ++AC_ARG_ENABLE([procmem], ++ AS_HELP_STRING([--disable-procmem], [Disable procmem])) + AS_IF([test "x$android" = "xno"], [ ++ AS_IF([test "x$enable_procmem" != "xno"], [ + # also need to check if the file is zero'ed (some hardened systems) + AC_CHECK_FILE([/proc/self/maps], [], [ + echo "This system does not seem to have /proc/pid/maps files." +@@ -84,7 +86,7 @@ AS_IF([test "x$android" = "xno"], [ + AC_SYS_LARGEFILE + # /proc/pid/mem is there but reading interesting data fails + AC_DEFINE(HAVE_PROCMEM, [0], [Enable /proc/pid/mem support]) +-]) ++])]) + + # Check for termcap and readline or bypass checking for the libraries. + AC_ARG_WITH([readline], [AS_HELP_STRING([--without-readline], +-- +2.30.0 + diff --git a/srcpkgs/scanmem/template b/srcpkgs/scanmem/template index d694f33d372..c8f6f4fe431 100644 --- a/srcpkgs/scanmem/template +++ b/srcpkgs/scanmem/template @@ -14,7 +14,9 @@ distfiles="https://github.com/${pkgname}/${pkgname}/archive/v${version}.tar.gz" checksum=f02054b91322cf41517506158fcb74554e9fc6644e696f8aa25e5acf162d374b CFLAGS="-D__NEED_pid_t" -nocross="checking for /proc/self/maps... configure: error" +if [ "$CROSS_BUILD" ]; then + configure_args+=" --disable-procmem" +fi pre_configure() { NOCONFIGURE=1 ./autogen.sh