added my Recipes

This commit is contained in:
2024-07-11 14:16:35 +02:00
parent 38bc4f53ac
commit 09b621d929
7118 changed files with 525762 additions and 3 deletions

View File

@@ -0,0 +1,115 @@
From 6379331cd0647fc6f149f55e4505a9a92e4f159f Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 22 Aug 2022 22:43:26 -0700
Subject: [PATCH] Fix deprecared function prototypes
Fixes following errors:
error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype]
Upstream-Status: Submitted [https://github.com/libgd/libgd/pull/835]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/gd_nnquant.c | 32 +++++++-------------------------
src/gd_tiff.c | 4 +---
2 files changed, 8 insertions(+), 28 deletions(-)
diff --git a/src/gd_nnquant.c b/src/gd_nnquant.c
index 8b9aa794..013f7160 100644
--- a/src/gd_nnquant.c
+++ b/src/gd_nnquant.c
@@ -112,12 +112,7 @@ typedef struct {
/* Initialise network in range (0,0,0,0) to (255,255,255,255) and set parameters
----------------------------------------------------------------------- */
-static void initnet(nnq, thepic, len, sample, colours)
-nn_quant *nnq;
-unsigned char *thepic;
-int len;
-int sample;
-int colours;
+static void initnet(nn_quant *nnq, unsigned char *thepic, int len, int sample, int colours)
{
register int i;
register int *p;
@@ -163,9 +158,7 @@ static void unbiasnet(nn_quant *nnq)
}
/* Output colormap to unsigned char ptr in RGBA format */
-static void getcolormap(nnq, map)
-nn_quant *nnq;
-unsigned char *map;
+static void getcolormap(nn_quant *nnq, unsigned char *map)
{
int i,j;
for(j=0; j < nnq->netsize; j++) {
@@ -232,9 +225,7 @@ static void inxbuild(nn_quant *nnq)
/* Search for ABGR values 0..255 (after net is unbiased) and return colour index
---------------------------------------------------------------------------- */
-static unsigned int inxsearch(nnq, al,b,g,r)
-nn_quant *nnq;
-register int al, b, g, r;
+static unsigned int inxsearch(nn_quant *nnq, int al, int b, int g, int r)
{
register int i, j, dist, a, bestd;
register int *p;
@@ -306,9 +297,7 @@ register int al, b, g, r;
/* Search for biased ABGR values
---------------------------- */
-static int contest(nnq, al,b,g,r)
-nn_quant *nnq;
-register int al,b,g,r;
+static int contest(nn_quant *nnq, int al, int b, int g, int r)
{
/* finds closest neuron (min dist) and updates freq */
/* finds best neuron (min dist-bias) and returns position */
@@ -362,9 +351,7 @@ register int al,b,g,r;
/* Move neuron i towards biased (a,b,g,r) by factor alpha
---------------------------------------------------- */
-static void altersingle(nnq, alpha,i,al,b,g,r)
-nn_quant *nnq;
-register int alpha,i,al,b,g,r;
+static void altersingle(nn_quant *nnq, int alpha, int i,int al, int b, int g, int r)
{
register int *n;
@@ -382,10 +369,7 @@ register int alpha,i,al,b,g,r;
/* Move adjacent neurons by precomputed alpha*(1-((i-j)^2/[r]^2)) in radpower[|i-j|]
--------------------------------------------------------------------------------- */
-static void alterneigh(nnq, rad,i,al,b,g,r)
-nn_quant *nnq;
-int rad,i;
-register int al,b,g,r;
+static void alterneigh(nn_quant *nnq, int rad, int i, int al,int b,int g, int r)
{
register int j,k,lo,hi,a;
register int *p, *q;
@@ -429,9 +413,7 @@ register int al,b,g,r;
/* Main Learning Loop
------------------ */
-static void learn(nnq, verbose) /* Stu: N.B. added parameter so that main() could control verbosity. */
-nn_quant *nnq;
-int verbose;
+static void learn(nn_quant *nnq, int verbose) /* Stu: N.B. added parameter so that main() could control verbosity. */
{
register int i,j,al,b,g,r;
int radius,rad,alpha,step,delta,samplepixels;
diff --git a/src/gd_tiff.c b/src/gd_tiff.c
index 7f72b610..3d90e61a 100644
--- a/src/gd_tiff.c
+++ b/src/gd_tiff.c
@@ -446,9 +446,7 @@ BGD_DECLARE(void) gdImageTiffCtx(gdImagePtr image, gdIOCtx *out)
}
/* Check if we are really in 8bit mode */
-static int checkColorMap(n, r, g, b)
-int n;
-uint16_t *r, *g, *b;
+static int checkColorMap(int n, uint16_t *r, uint16_t *g, uint16_t *b)
{
while (n-- > 0)
if (*r++ >= 256 || *g++ >= 256 || *b++ >= 256)

View File

@@ -0,0 +1,55 @@
SUMMARY = "gd is a library used to create PNG, JPEG, or WBMP images"
DESCRIPTION = "The gd graphics library allows your code to quickly draw images \
complete with lines, arcs, text, multiple colors, cut and paste from other \
images, and flood fills, and to write out the result as a PNG or JPEG file. \
This is particularly useful in Web applications, where PNG and JPEG are two \
of the formats accepted for inline images by most browsers. Note that gd is not \
a paint program."
HOMEPAGE = "http://libgd.github.io/"
SECTION = "libs"
LICENSE = "GD"
LIC_FILES_CHKSUM = "file://COPYING;md5=ace63adfdac78400fc30fa22ee9c1bb1"
DEPENDS = "freetype libpng jpeg zlib tiff"
SRC_URI = "git://github.com/libgd/libgd.git;nobranch=1;protocol=https \
file://0001-Fix-deprecared-function-prototypes.patch \
"
SRCREV = "b5319a41286107b53daa0e08e402aa1819764bdc"
S = "${WORKDIR}/git"
inherit autotools binconfig gettext pkgconfig
EXTRA_OECONF += " --disable-rpath \
--with-jpeg=${STAGING_LIBDIR}/.. \
--with-freetype=yes \
--without-fontconfig \
--without-webp \
--without-xpm \
--without-x \
"
EXTRA_OEMAKE = 'LDFLAGS="${LDFLAGS}"'
DEBUG_OPTIMIZATION:append = " -Wno-error=maybe-uninitialized"
do_install:append:class-target() {
# cleanup buildpaths from gdlib.pc
sed -i -e 's#${STAGING_DIR_HOST}##g' ${D}${libdir}/pkgconfig/gdlib.pc
}
PACKAGES += "${PN}-tools"
FILES:${PN} = "${libdir}/lib*${SOLIBS}"
FILES:${PN}-tools = "${bindir}/*"
PROVIDES += "${PN}-tools"
RPROVIDES:${PN}-tools = "${PN}-tools"
RDEPENDS:${PN}-tools = "perl perl-module-strict"
CVE_PRODUCT = "libgd"
BBCLASSEXTEND = "native nativesdk"