commit: 475fe45c89d774a7dbf72de27486b0fe8de84596 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Thu Feb 3 09:33:36 2022 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Feb 3 09:33:58 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=475fe45c
net-misc/rdate: convert respect AR sed into patch Sent upstream. Bug: https://bugs.gentoo.org/729998 Signed-off-by: Sam James <sam <AT> gentoo.org> net-misc/rdate/files/rdate-1.10.2-respect-AR.patch | 40 ++++++++++++++++++++++ net-misc/rdate/rdate-1.10.2.ebuild | 3 +- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch b/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch new file mode 100644 index 000000000000..05289f3453c9 --- /dev/null +++ b/net-misc/rdate/files/rdate-1.10.2-respect-AR.patch @@ -0,0 +1,40 @@ +https://github.com/resurrecting-open-source-projects/openrdate/pull/4 + +From: Sam James <s...@gentoo.org> +Date: Thu, 3 Feb 2022 09:30:53 +0000 +Subject: [PATCH] Respect AR from environment + +Detect `AR` from the environment (first the AR environment variable, but +failing that, ${CHOST}-ar). This allows using different toolchains (e.g. +Clang and LLVM's tooling) and also facilitates cross-compilation. + +Bug: https://bugs.gentoo.org/729998 +Signed-off-by: Sam James <s...@gentoo.org> +--- a/configure.ac ++++ b/configure.ac +@@ -11,6 +11,8 @@ AC_CONFIG_SRCDIR([src/rdate.c]) + AC_CONFIG_HEADERS([config.h]) + AC_ARG_VAR([kernel_version], [the version of the kernel to build against]) + ++AC_CANONICAL_HOST ++ + # Checks for programs. + AC_PROG_CC + +@@ -22,6 +24,8 @@ AC_PROG_INSTALL + AC_PROG_RANLIB + AC_PROG_EGREP + ++AM_PROG_AR ++ + # Checks for libraries. + AC_CHECK_LIB([c], [fork]) + AC_CHECK_LIB([util], [malloc]) +@@ -52,7 +56,6 @@ AC_CHECK_FUNCS([gettimeofday memset select socket]) + AC_PATH_PROG([UNAME], [uname], + [:]) + +-AC_CANONICAL_HOST + # Determine the particulars of the host + case "${host}" in + *-*-linux*) diff --git a/net-misc/rdate/rdate-1.10.2.ebuild b/net-misc/rdate/rdate-1.10.2.ebuild index 40191e638b49..b7d663d09747 100644 --- a/net-misc/rdate/rdate-1.10.2.ebuild +++ b/net-misc/rdate/rdate-1.10.2.ebuild @@ -21,13 +21,12 @@ RDEPEND="${DEPEND}" PATCHES=( "${FILESDIR}"/${PN}-1.10.2-fix-musl-compat-stdint.patch + "${FILESDIR}"/${PN}-1.10.2-respect-AR.patch ) src_prepare() { default - # Don't use hardcoded 'ar' command - sed -s '/^AC_PROG_CC/a m4_ifdef([AM_PROG_AR], [AM_PROG_AR], [AC_SUBST([AR], [$(tc-getAR])])' -i configure.ac || die eautoreconf }