diff options
author | Sam James <sam@gentoo.org> | 2022-02-03 09:33:36 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-02-03 09:33:58 +0000 |
commit | 475fe45c89d774a7dbf72de27486b0fe8de84596 (patch) | |
tree | 3483647bed5604d9f195fe44c1a3746d6382b2bf /net-misc | |
parent | net-misc/rdate: fix build on musl (diff) | |
download | gentoo-475fe45c89d774a7dbf72de27486b0fe8de84596.tar.gz gentoo-475fe45c89d774a7dbf72de27486b0fe8de84596.tar.bz2 gentoo-475fe45c89d774a7dbf72de27486b0fe8de84596.zip |
net-misc/rdate: convert respect AR sed into patch
Sent upstream.
Bug: https://bugs.gentoo.org/729998
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/rdate/files/rdate-1.10.2-respect-AR.patch | 40 | ||||
-rw-r--r-- | 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 <sam@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 <sam@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 } |