summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO4
-rw-r--r--3dfe19d4578c361f800738c9c974d9c405801209.patch43
-rw-r--r--PKGBUILD9
3 files changed, 52 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f66f370f82d6..00fe46e88a27 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mingw-w64-libpsl
pkgdesc = Public Suffix List library (mingw-w64)
pkgver = 0.21.2
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/rockdaboot/libpsl
arch = any
license = MIT
@@ -11,7 +11,9 @@ pkgbase = mingw-w64-libpsl
depends = mingw-w64-libunistring
source = https://github.com/rockdaboot/libpsl/releases/download/0.21.2/libpsl-0.21.2.tar.gz
source = c47cf796.patch
+ source = 3dfe19d4578c361f800738c9c974d9c405801209.patch
sha512sums = f1df72220bf4391d4701007100b0df66c833a2cbcb7481c9d13f0b9e0cad3b66d2d15d4b976e5bad60d2ad1540355112fa1acb07aa925c241d2d7cd20681c71d
sha512sums = a9b82a88c51abe86f10e65104b86afd345d992389fdbc4a7a71df632e2a3a1eb24f831103325e0d65205d081b9f6402864100a8f9b9b173e09e86f9d505f3355
+ sha512sums = 4f307e6a0dbd119c46de2f36d2121156ca785138e3e158b29bbc075ca7f177027ae11ed3c677c6a56f235ee1b8784cc9ea82db7569465ec76bc8dd8d71191832
pkgname = mingw-w64-libpsl
diff --git a/3dfe19d4578c361f800738c9c974d9c405801209.patch b/3dfe19d4578c361f800738c9c974d9c405801209.patch
new file mode 100644
index 000000000000..fc2adaa5ae58
--- /dev/null
+++ b/3dfe19d4578c361f800738c9c974d9c405801209.patch
@@ -0,0 +1,43 @@
+From 3dfe19d4578c361f800738c9c974d9c405801209 Mon Sep 17 00:00:00 2001
+From: Chun-wei Fan <fanchunwei@src.gnome.org>
+Date: Mon, 16 Jan 2023 11:17:04 +0800
+Subject: [PATCH] tools/psl.c: Fix logic fallout and warning
+
+In the previous update to tools/psl.c, I neglected to see the return type of
+localtime_s() and the difference in what value to expect for a successful call.
+
+Use macros instead to remedy this.
+
+Thanks to vtorri for pointing this out in issue #201.
+
+Fixes: #201.
+---
+ tools/psl.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/tools/psl.c b/tools/psl.c
+index 054d0b6..ed94d5c 100644
+--- a/tools/psl.c
++++ b/tools/psl.c
+@@ -41,7 +41,11 @@
+
+ // Windows does not have localtime_r but has localtime_s, which is more or less
+ // the same except that the arguments are reversed
+-# define localtime_r(t_sec,t_now) localtime_s(t_now,t_sec)
++# define LOCALTIME_R_SUCCESSFUL(t_sec,t_now) \
++ (localtime_s(t_now, t_sec) == 0)
++#else
++# define LOCALTIME_R_SUCCESSFUL(t_sec,t_now) \
++ (localtime_r(t_sec, t_now) != NULL)
+ #endif
+
+ #include <stdlib.h>
+@@ -94,7 +98,7 @@ static const char *time2str(time_t t)
+ static char buf[64];
+ struct tm tm;
+
+- if (localtime_r(&t, &tm) != NULL)
++ if (LOCALTIME_R_SUCCESSFUL(&t, &tm))
+ strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S %Z", &tm);
+ else
+ strcpy(buf, "--notime--");
diff --git a/PKGBUILD b/PKGBUILD
index 1b308fd5c15a..2bce6c4c7d7e 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=mingw-w64-libpsl
_pkgname=libpsl
pkgver=0.21.2
-pkgrel=2
+pkgrel=3
pkgdesc='Public Suffix List library (mingw-w64)'
url='https://github.com/rockdaboot/libpsl'
arch=(any)
@@ -11,9 +11,11 @@ license=('MIT')
depends=('mingw-w64-libidn2' 'mingw-w64-libunistring')
makedepends=('mingw-w64-meson' 'gtk-doc')
source=(https://github.com/rockdaboot/libpsl/releases/download/${pkgver}/${_pkgname}-${pkgver}.tar.gz
- c47cf796.patch)
+ c47cf796.patch
+ 3dfe19d4578c361f800738c9c974d9c405801209.patch)
sha512sums=('f1df72220bf4391d4701007100b0df66c833a2cbcb7481c9d13f0b9e0cad3b66d2d15d4b976e5bad60d2ad1540355112fa1acb07aa925c241d2d7cd20681c71d'
- 'a9b82a88c51abe86f10e65104b86afd345d992389fdbc4a7a71df632e2a3a1eb24f831103325e0d65205d081b9f6402864100a8f9b9b173e09e86f9d505f3355')
+ 'a9b82a88c51abe86f10e65104b86afd345d992389fdbc4a7a71df632e2a3a1eb24f831103325e0d65205d081b9f6402864100a8f9b9b173e09e86f9d505f3355'
+ '4f307e6a0dbd119c46de2f36d2121156ca785138e3e158b29bbc075ca7f177027ae11ed3c677c6a56f235ee1b8784cc9ea82db7569465ec76bc8dd8d71191832')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
@@ -28,6 +30,7 @@ build() {
mkdir -p "build-${_arch}" && pushd build-${_arch}
${_arch}-meson \
-D docs=false \
+ -D b_lto=false \
-D runtime=libidn2 ..
ninja
popd