added my Recipes
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
From cbe8bd2948f522062c6170f581e1e265692a9a55 Mon Sep 17 00:00:00 2001
|
||||
From: Sergei Trofimovich <slyich@gmail.com>
|
||||
Date: Sun, 24 Oct 2021 18:53:04 +0100
|
||||
Subject: [PATCH] Makefile: fix parallel build of examples
|
||||
|
||||
Without the change examples fails to build as:
|
||||
|
||||
$ LANG=C make -j
|
||||
make -C src
|
||||
make -C examples
|
||||
make[1]: Entering directory 'libb64/src'
|
||||
cc -O3 -Werror -pedantic -I../include -c -o cencode.o cencode.c
|
||||
make[1]: Entering directory 'libb64/examples'
|
||||
make[1]: *** No rule to make target 'libb64.a', needed by 'c-example1'. Stop.
|
||||
make[1]: Leaving directory 'libb64/examples'
|
||||
make: *** [Makefile:8: all_examples] Error 2
|
||||
make: *** Waiting for unfinished jobs....
|
||||
cc -O3 -Werror -pedantic -I../include -c -o cdecode.o cdecode.c
|
||||
ar rv libb64.a cencode.o cdecode.o
|
||||
ar: creating libb64.a
|
||||
a - cencode.o
|
||||
a - cdecode.o
|
||||
make[1]: Leaving directory 'libb64/src'
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/libb64/libb64/pull/9]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
Makefile | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile b/Makefile
|
||||
index db40356..aa48c76 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -4,7 +4,7 @@ all_src:
|
||||
$(MAKE) -C src
|
||||
all_base64: all_src
|
||||
$(MAKE) -C base64
|
||||
-all_examples:
|
||||
+all_examples: all_src
|
||||
$(MAKE) -C examples
|
||||
|
||||
clean: clean_src clean_base64 clean_include clean_examples
|
||||
--
|
||||
2.37.2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 68f66d1583be670eb8d5f3f38dbd5dd1d63b733c Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Sat, 27 Mar 2021 21:41:04 -0700
|
||||
Subject: [PATCH] example: Do not run the tests
|
||||
|
||||
Upstream-Status: Inappropriate [Cross-compile specific]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
examples/Makefile | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/examples/Makefile b/examples/Makefile
|
||||
index d9667a5..554b346 100644
|
||||
--- a/examples/Makefile
|
||||
+++ b/examples/Makefile
|
||||
@@ -33,11 +33,8 @@ depend: $(SOURCES)
|
||||
makedepend -f- $(CFLAGS) $(SOURCES) 2> /dev/null 1> depend
|
||||
|
||||
test-c-example1: c-example1
|
||||
- ./c-example1
|
||||
|
||||
test-c-example2: c-example2
|
||||
- ./c-example2 loremgibson.txt encoded.txt decoded.txt
|
||||
- diff -q loremgibson.txt decoded.txt
|
||||
|
||||
test: test-c-example1 test-c-example2
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
From 98eaf510f40e384b32c01ad4bd5c3a697fdd8560 Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Wed, 24 Aug 2022 14:34:38 -0700
|
||||
Subject: [PATCH] examples: Use proper function prototype for main
|
||||
|
||||
Upstream-Status: Submitted [https://github.com/libb64/libb64/pull/10]
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
examples/c-example1.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/examples/c-example1.c b/examples/c-example1.c
|
||||
index a0001df..34585dd 100644
|
||||
--- a/examples/c-example1.c
|
||||
+++ b/examples/c-example1.c
|
||||
@@ -83,7 +83,7 @@ char* decode(const char* input)
|
||||
}
|
||||
|
||||
|
||||
-int main()
|
||||
+int main(int argc, char** argv)
|
||||
{
|
||||
const char* input = "hello world";
|
||||
char* encoded;
|
||||
--
|
||||
2.37.2
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
From 9ec49389f56816d7ac2331296c03d147531a421a Mon Sep 17 00:00:00 2001
|
||||
From: Jakub Wilk <jwilk@debian.org>
|
||||
Date: Sat, 27 Mar 2021 22:01:13 -0700
|
||||
Subject: [PATCH] use BUFSIZ as buffer size
|
||||
|
||||
Bug: http://sourceforge.net/tracker/?func=detail&atid=785907&aid=3591336&group_id=152942
|
||||
|
||||
Upstream-Status: Pending
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
|
||||
---
|
||||
include/b64/decode.h | 3 ++-
|
||||
include/b64/encode.h | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/include/b64/decode.h b/include/b64/decode.h
|
||||
index b2362e5..8db1d09 100644
|
||||
--- a/include/b64/decode.h
|
||||
+++ b/include/b64/decode.h
|
||||
@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64
|
||||
#ifndef BASE64_DECODE_H
|
||||
#define BASE64_DECODE_H
|
||||
|
||||
+#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
namespace base64
|
||||
@@ -22,7 +23,7 @@ namespace base64
|
||||
base64_decodestate _state;
|
||||
int _buffersize;
|
||||
|
||||
- decoder(int buffersize_in = BUFFERSIZE)
|
||||
+ decoder(int buffersize_in = BUFSIZ)
|
||||
: _buffersize(buffersize_in)
|
||||
{
|
||||
base64_init_decodestate(&_state);
|
||||
diff --git a/include/b64/encode.h b/include/b64/encode.h
|
||||
index c1a5f88..644e4dd 100644
|
||||
--- a/include/b64/encode.h
|
||||
+++ b/include/b64/encode.h
|
||||
@@ -8,6 +8,7 @@ For details, see http://sourceforge.net/projects/libb64
|
||||
#ifndef BASE64_ENCODE_H
|
||||
#define BASE64_ENCODE_H
|
||||
|
||||
+#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
namespace base64
|
||||
@@ -22,7 +23,7 @@ namespace base64
|
||||
base64_encodestate _state;
|
||||
int _buffersize;
|
||||
|
||||
- encoder(int buffersize_in = BUFFERSIZE)
|
||||
+ encoder(int buffersize_in = BUFSIZ)
|
||||
: _buffersize(buffersize_in)
|
||||
{
|
||||
base64_init_encodestate(&_state);
|
||||
@@ -0,0 +1,38 @@
|
||||
SUMMARY = "Base64 Encoding/Decoding Routines"
|
||||
DESCRIPTION = "base64 encoding/decoding library - runtime library \
|
||||
libb64 is a library of ANSI C routines for fast encoding/decoding data into \
|
||||
and from a base64-encoded format"
|
||||
HOMEPAGE = "https://github.com/libb64"
|
||||
LICENSE = "PD"
|
||||
LIC_FILES_CHKSUM = "file://LICENSE.md;md5=81296a564fa0621472714aae7c763d96"
|
||||
|
||||
PV .= "+2.0.0.2+git${SRCPV}"
|
||||
SRCREV = "ce864b17ea0e24a91e77c7dd3eb2d1ac4175b3f0"
|
||||
|
||||
SRC_URI = "git://github.com/libb64/libb64;protocol=https;branch=master \
|
||||
file://0001-example-Do-not-run-the-tests.patch \
|
||||
file://0002-use-BUFSIZ-as-buffer-size.patch \
|
||||
file://0001-Makefile-fix-parallel-build-of-examples.patch \
|
||||
file://0001-examples-Use-proper-function-prototype-for-main.patch \
|
||||
"
|
||||
|
||||
S = "${WORKDIR}/git"
|
||||
|
||||
CFLAGS += "-fPIC"
|
||||
|
||||
do_configure () {
|
||||
:
|
||||
}
|
||||
|
||||
do_compile () {
|
||||
oe_runmake
|
||||
${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,${BPN}.so.0 src/*.o -o src/${BPN}.so.0
|
||||
}
|
||||
|
||||
do_install () {
|
||||
install -d ${D}${includedir}/b64
|
||||
install -Dm 0644 ${B}/src/libb64.a ${D}${libdir}/libb64.a
|
||||
install -Dm 0644 ${B}/src/libb64.so.0 ${D}${libdir}/libb64.so.0
|
||||
ln -s libb64.so.0 ${D}${libdir}/libb64.so
|
||||
install -Dm 0644 ${S}/include/b64/*.h ${D}${includedir}/b64/
|
||||
}
|
||||
Reference in New Issue
Block a user