diff mbox series

[meta-oe,v4] liboauth2: Add recipe at 2.2.0

Message ID 20260126121236.1304966-2-frederikbraendstrup@gmail.com
State Accepted
Headers show
Series [meta-oe,v4] liboauth2: Add recipe at 2.2.0 | expand

Commit Message

Frede Hoey Braendstrup Jan. 26, 2026, 12:12 p.m. UTC
V3: adds fixes for building with clang

V4: removes default PACKAGECONFIG used for testing builds

Signed-off-by: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com>
---
 ..._easy_setopt-takes-a-long-not-an-int.patch | 33 +++++++++++++++++++
 .../liboauth2/liboauth2_2.2.0.bb              | 23 +++++++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
 create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb

Comments

Khem Raj Jan. 27, 2026, 5:53 a.m. UTC | #1
On Mon, Jan 26, 2026 at 4:13 AM Frederik Brændstrup via
lists.openembedded.org <frederikbraendstrup=gmail.com@lists.openembedded.org>
wrote:

> V3: adds fixes for building with clang
>
> V4: removes default PACKAGECONFIG used for testing builds
>
> Signed-off-by: Frede Hoey Braendstrup <frederikbraendstrup@gmail.com>
> ---
>  ..._easy_setopt-takes-a-long-not-an-int.patch | 33 +++++++++++++++++++
>  .../liboauth2/liboauth2_2.2.0.bb              | 23 +++++++++++++
>  2 files changed, 56 insertions(+)
>  create mode 100644
> meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
>  create mode 100644 meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
>
> diff --git
> a/meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
> b/meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
> new file mode 100644
> index 0000000000..bdb4a0f108
> --- /dev/null
> +++
> b/meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
> @@ -0,0 +1,33 @@
> +From a9f28a44b9b387ef28904e24ca05d28562fdcc45 Mon Sep 17 00:00:00 2001
> +From: Frede Hoey Braendstrup <frede@vokalo.io>
> +Date: Mon, 26 Jan 2026 11:07:24 +0100
> +Subject: [PATCH] fix(clang): curl_easy_setopt takes a long not an int
> +
> +Signed-off-by: Frede Hoey Braendstrup <frede@vokalo.io>
> +Upstream-status: Backport https://github.com/OpenIDC/liboauth2/pull/69


Upstream status has a certain format, please make it so.
Upstream-Status: Backport [URL]


>
> +---
> + src/http.c | 4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/src/http.c b/src/http.c
> +index ab7a25a..bc242ed 100644
> +--- a/src/http.c
> ++++ b/src/http.c
> +@@ -1024,7 +1024,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char
> *url, const char *data,
> +       curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 5L);
> +
> +       if (ctx)
> +-              curl_easy_setopt(curl, CURLOPT_TIMEOUT, ctx->timeout);
> ++              curl_easy_setopt(curl, CURLOPT_TIMEOUT,
> (long)ctx->timeout);
> +
> +       curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
> +                        oauth2_http_curl_buf_write);
> +@@ -1092,7 +1092,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char
> *url, const char *data,
> +
> +       if (data != NULL) {
> +               curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
> +-              curl_easy_setopt(curl, CURLOPT_POST, 1);
> ++              curl_easy_setopt(curl, CURLOPT_POST, 1L);
> +       }
> +
> +       if (ctx)
> diff --git a/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
> b/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
> new file mode 100644
> index 0000000000..31d7aec69d
> --- /dev/null
> +++ b/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
> @@ -0,0 +1,23 @@
> +SUMMARY = "OAuth 2.x and OpenID Connect C library"
> +HOMEPAGE = "https://github.com/OpenIDC/liboauth2"
> +LICENSE = "Apache-2.0"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
> +
> +SRC_URI = " \
> +    git://
> github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV}
> <http://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v$%7BPV%7D>
> \
> +    file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch \
> +    "
> +
> +PV = "2.2.0"
> +SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
> +
> +DEPENDS = "libpcre2 jansson curl openssl cjose"
> +
> +inherit pkgconfig autotools-brokensep
> +
> +PACKAGECONFIG ??= ""
> +PACKAGECONFIG[memcache] =
> "--with-memcache,--without-memcache,libmemcached"
> +PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
> +PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
> +PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
> +
> --
> 2.52.0
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#123874):
> https://lists.openembedded.org/g/openembedded-devel/message/123874
> Mute This Topic: https://lists.openembedded.org/mt/117466911/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
diff mbox series

Patch

diff --git a/meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch b/meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
new file mode 100644
index 0000000000..bdb4a0f108
--- /dev/null
+++ b/meta-oe/recipes-support/liboauth2/liboauth2/0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch
@@ -0,0 +1,33 @@ 
+From a9f28a44b9b387ef28904e24ca05d28562fdcc45 Mon Sep 17 00:00:00 2001
+From: Frede Hoey Braendstrup <frede@vokalo.io>
+Date: Mon, 26 Jan 2026 11:07:24 +0100
+Subject: [PATCH] fix(clang): curl_easy_setopt takes a long not an int
+
+Signed-off-by: Frede Hoey Braendstrup <frede@vokalo.io>
+Upstream-status: Backport https://github.com/OpenIDC/liboauth2/pull/69
+---
+ src/http.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/http.c b/src/http.c
+index ab7a25a..bc242ed 100644
+--- a/src/http.c
++++ b/src/http.c
+@@ -1024,7 +1024,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data,
+ 	curl_easy_setopt(curl, CURLOPT_MAXREDIRS, 5L);
+ 
+ 	if (ctx)
+-		curl_easy_setopt(curl, CURLOPT_TIMEOUT, ctx->timeout);
++		curl_easy_setopt(curl, CURLOPT_TIMEOUT, (long)ctx->timeout);
+ 
+ 	curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION,
+ 			 oauth2_http_curl_buf_write);
+@@ -1092,7 +1092,7 @@ bool oauth2_http_call(oauth2_log_t *log, const char *url, const char *data,
+ 
+ 	if (data != NULL) {
+ 		curl_easy_setopt(curl, CURLOPT_POSTFIELDS, data);
+-		curl_easy_setopt(curl, CURLOPT_POST, 1);
++		curl_easy_setopt(curl, CURLOPT_POST, 1L);
+ 	}
+ 
+ 	if (ctx)
diff --git a/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb b/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
new file mode 100644
index 0000000000..31d7aec69d
--- /dev/null
+++ b/meta-oe/recipes-support/liboauth2/liboauth2_2.2.0.bb
@@ -0,0 +1,23 @@ 
+SUMMARY = "OAuth 2.x and OpenID Connect C library"
+HOMEPAGE = "https://github.com/OpenIDC/liboauth2"
+LICENSE = "Apache-2.0"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=2ee41112a44fe7014dce33e26468ba93"
+
+SRC_URI = " \
+    git://github.com/OpenIDC/liboauth2;protocol=https;branch=master;tag=v${PV} \
+    file://0001-fix-clang-curl_easy_setopt-takes-a-long-not-an-int.patch \
+    "
+
+PV = "2.2.0"
+SRCREV = "12571b6d6568c2db7d5f080f60ecb55795c0db19"
+
+DEPENDS = "libpcre2 jansson curl openssl cjose"
+
+inherit pkgconfig autotools-brokensep
+
+PACKAGECONFIG ??= ""
+PACKAGECONFIG[memcache] = "--with-memcache,--without-memcache,libmemcached"
+PACKAGECONFIG[redis] = "--with-redis,--without-redis,hiredis"
+PACKAGECONFIG[jq] = "--with-jq,--without-jq,jq"
+PACKAGECONFIG[apache] = "--with-apache,--without-apache,apache2"
+