~sircmpwn/alpine-aports (mirror)

main/ninja: update to 1.9.0 v1 PROPOSED

Drew DeVault: 1
 main/ninja: update to 1.9.0

 2 files changed, 47 insertions(+), 4 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/alpine-aports/patches/4044/mbox | git am -3
Learn more about email & git

[alpine-aports] [PATCH] main/ninja: update to 1.9.0 Export this patch

---
 main/ninja/APKBUILD       | 12 ++++++++----
 main/ninja/fix-musl.patch | 39 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+), 4 deletions(-)
 create mode 100644 main/ninja/fix-musl.patch

diff --git a/main/ninja/APKBUILD b/main/ninja/APKBUILD
index 58856b6724..d71952aa96 100644
--- a/main/ninja/APKBUILD
+++ b/main/ninja/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: k0r10n <k0r10n.dev@gmail.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=ninja
pkgver=1.8.2
pkgrel=1
pkgver=1.9.0
pkgrel=0
pkgdesc="Small build system with a focus on speed"
url="https://ninja-build.org/"
arch="all"
@@ -10,7 +10,10 @@ license="Apache-2.0"
checkdepends="gtest"
makedepends="asciidoctor python3 re2c"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/martine/ninja/archive/v$pkgver.tar.gz"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/martine/ninja/archive/v$pkgver.tar.gz
	fix-musl.patch
	"
builddir="$srcdir"/${pkgname}-${pkgver}

build() {
@@ -38,4 +41,5 @@ package() {
		"$pkgdir/usr/share/bash-completion/completions/ninja"
}

sha512sums="1650bf9e3eddeb0b0fbb415c2b8e0a7c094421e991fa8139fd77fae0f6ee7ee980b7cf5e98d883c3a884f99abcb06fa26e3980af3a3a5bb6dd655124755782c2  ninja-1.8.2.tar.gz"
sha512sums="a8b5ad00b60bddbdb8439a6092c91a65d093f9bcd6241f69088eb35bea2847efe673c3107a130dc754c747c7712b839d8f88e88d8389520cf7143668ee053feb  ninja-1.9.0.tar.gz
09159f24a0446eff7e1d0b306911fd1a1e96257f02a32d6b241c5d60e3350126a7859f0edf0a2f858214c5c5af23f886289ce2e9c77f0e8e2257fab931933de2  fix-musl.patch"
diff --git a/main/ninja/fix-musl.patch b/main/ninja/fix-musl.patch
new file mode 100644
index 0000000000..543d4f1c48
--- /dev/null
+++ b/main/ninja/fix-musl.patch
@@ -0,0 +1,39 @@
2ff54ad7478a90bd75c91e434236a Mon Sep 17 00:00:00 2001
From: makepost <makepost@firemail.cc>
Date: Mon, 24 Dec 2018 03:13:16 +0200
Subject: [PATCH] Use st_mtim if st_mtime is macro, fix #1510

In POSIX.1-2008, sys_stat has a st_mtim member and a st_mtime backward
compatibility macro. Should help avoid hardcoding platform detection.
---
 src/disk_interface.cc | 14 ++++----------
 1 file changed, 4 insertions(+), 10 deletions(-)

diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index d4c2fb087..dc297c449 100644
--- src/disk_interface.cc
@@ -202,19 +202,13 @@ TimeStamp RealDiskInterface::Stat(const string& path, string* err) const {
   // that it doesn't exist.
   if (st.st_mtime == 0)
     return 1;
-#if defined(__APPLE__) && !defined(_POSIX_C_SOURCE)
+#if defined(_AIX)
+  return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
+#elif defined(__APPLE__)
   return ((int64_t)st.st_mtimespec.tv_sec * 1000000000LL +
           st.st_mtimespec.tv_nsec);
-#elif (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700 || defined(_BSD_SOURCE) || defined(_SVID_SOURCE) || \
-       defined(__BIONIC__) || (defined (__SVR4) && defined (__sun)) || defined(__FreeBSD__))
-  // For glibc, see "Timestamp files" in the Notes of http://www.kernel.org/doc/man-pages/online/pages/man2/stat.2.html
-  // newlib, uClibc and musl follow the kernel (or Cygwin) headers and define the right macro values above.
-  // For bsd, see https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h and similar
-  // For bionic, C and POSIX API is always enabled.
-  // For solaris, see https://docs.oracle.com/cd/E88353_01/html/E37841/stat-2.html.
+#elif defined(st_mtime) // A macro, so we're likely on modern POSIX.
   return (int64_t)st.st_mtim.tv_sec * 1000000000LL + st.st_mtim.tv_nsec;
-#elif defined(_AIX)
-  return (int64_t)st.st_mtime * 1000000000LL + st.st_mtime_n;
 #else
   return (int64_t)st.st_mtime * 1000000000LL + st.st_mtimensec;
 #endif
-- 
2.21.0



---
Unsubscribe:  alpine-aports+unsubscribe@lists.alpinelinux.org
Help:         alpine-aports+help@lists.alpinelinux.org
---
View this thread in the archives