[packages/libbpg] Rel 0.2
arekm
arekm at pld-linux.org
Wed May 20 20:52:09 CEST 2026
commit 905596a561c31302b38331c1b3559fed0e9ba3bf
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed May 20 20:51:52 2026 +0200
Rel 0.2
libbpg-includes.patch | 11 +++++++++++
libbpg-shared.patch | 4 ++--
libbpg.spec | 7 +++++--
3 files changed, 18 insertions(+), 4 deletions(-)
---
diff --git a/libbpg.spec b/libbpg.spec
index 242c7c3..1b37ce1 100644
--- a/libbpg.spec
+++ b/libbpg.spec
@@ -1,3 +1,4 @@
+# DEAD upstream (no updates since 2018)
#
# Conditional build:
%bcond_without sdl # SDL based viewer
@@ -9,13 +10,14 @@ Summary(pl.UTF-8): Biblioteka funkcji do operacji na plikach obrazów w formacie
Name: libbpg
Version: 0.9.8
# This library is full of CVE issues
-Release: 0.1
+Release: 0.2
# The original BPG code is BSD-licensed, while the modified FFmpeg library is under LGPLv2.1.
License: LGPL v2.1 and BSD
Group: Libraries
Source0: https://bellard.org/bpg/%{name}-%{version}.tar.gz
# Source0-md5: 1c8258bc6de26bbae7c688944a2023ac
Patch0: %{name}-shared.patch
+Patch1: %{name}-includes.patch
URL: https://bellard.org/bpg/
%if %{with sdl}
BuildRequires: SDL-devel
@@ -118,12 +120,13 @@ Oparta na SDL przeglądarka obrazów BPG.
%prep
%setup -q
%patch -P0 -p1
+%patch -P1 -p1
%build
%{__make} \
CC="%{__cc}" \
CXX="%{__cxx}" \
- OPTFLAGS="%{rpmcflags}" \
+ OPTFLAGS="%{rpmcflags} %{rpmcppflags}" \
%{!?with_sdl:USE_BPGVIEW=} \
%{!?with_x265:USE_X265=} \
%{?with_system_x265:X265_LIBS= BPGENC_LIBS="-lx265 -lpng -ljpeg"} \
diff --git a/libbpg-includes.patch b/libbpg-includes.patch
new file mode 100644
index 0000000..52aa78d
--- /dev/null
+++ b/libbpg-includes.patch
@@ -0,0 +1,11 @@
+--- libbpg-0.9.8/bpgdec.c.orig
++++ libbpg-0.9.8/bpgdec.c
+@@ -27,6 +27,8 @@
+ #include <math.h>
+ #include <getopt.h>
+ #include <inttypes.h>
++#include <string.h>
++#include <strings.h>
+
+ /* define it to include PNG output */
+ #define USE_PNG
diff --git a/libbpg-shared.patch b/libbpg-shared.patch
index f53397e..2c691fa 100644
--- a/libbpg-shared.patch
+++ b/libbpg-shared.patch
@@ -20,7 +20,7 @@
CFLAGS+=-I.
CFLAGS+=-DCONFIG_BPG_VERSION=\"$(shell cat VERSION)\"
@@ -53,7 +56,7 @@
- EMLDFLAGS+=-O3 --memory-init-file 0 --closure 1 --post-js post.js
+ EMLDFLAGS+=-O3 --memory-init-file 0 --closure 0 --pre-js pre.js --post-js post.js
EMCFLAGS:=$(CFLAGS)
-LDFLAGS=-g
@@ -62,7 +62,7 @@
bpgdec.js: $(LIBBPG_JS_OBJS) post.js
$(EMCC) $(EMLDFLAGS) -s TOTAL_MEMORY=33554432 -o $@ $(LIBBPG_JS_OBJS)
@@ -177,12 +180,17 @@
- $(EMCC) $(EMLDFLAGS) -s TOTAL_MEMORY=16777216 -o $@ $(LIBBPG_JS8A_OBJS)
+ $(EMCC) $(EMLDFLAGS) -s TOTAL_MEMORY=33554432 -o $@ $(LIBBPG_JS8A_OBJS)
size:
- strip bpgdec
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libbpg.git/commitdiff/905596a561c31302b38331c1b3559fed0e9ba3bf
More information about the pld-cvs-commit
mailing list