[packages/crnlib] Rel 4
arekm
arekm at pld-linux.org
Wed May 20 23:33:10 CEST 2026
commit 99a902dbe4ca1eeac4a320afb3497744b2ad6c0d
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Wed May 20 23:32:54 2026 +0200
Rel 4
crnlib-return-null.patch | 52 ++++++++++++++++++++++++++++++++++++++++++++++++
crnlib.spec | 4 +++-
2 files changed, 55 insertions(+), 1 deletion(-)
---
diff --git a/crnlib.spec b/crnlib.spec
index 2511752..463d654 100644
--- a/crnlib.spec
+++ b/crnlib.spec
@@ -7,7 +7,7 @@ Summary: crunch/crnlib - advanced DXTn texture compression library
Summary(pl.UTF-8): crunch/crnlib - zaawansowana biblioteka do kompresji tekstur DXTn
Name: crnlib
Version: 1.04
-Release: 3
+Release: 4
License: ZLib
Group: Libraries
#Source0Download: https://github.com/BinomialLLC/crunch/releases
@@ -19,6 +19,7 @@ Source0: crunch-104.tar.xz
# Source0-md5: f92837bba95abf27d6bd9ae0b2b04863
Patch0: %{name}-c++.patch
Patch1: %{name}-types.patch
+Patch2: %{name}-return-null.patch
URL: https://github.com/BinomialLLC/crunch
BuildRequires: libstdc++-devel
BuildRequires: libtool
@@ -63,6 +64,7 @@ Statyczna biblioteka crnlib.
%setup -q -n crunch
%patch -P0 -p1
%patch -P1 -p1
+%patch -P2 -p1
%{__sed} -i -e '/g++.*COMPILE_OPTIONS/s/g++/$(CXX)/' crnlib/Makefile
%{__sed} -i -e '/g++.*LINKER_OPTIONS/s/g++/$(CXXLINK)/' crnlib/Makefile
diff --git a/crnlib-return-null.patch b/crnlib-return-null.patch
new file mode 100644
index 0000000..c9b2a19
--- /dev/null
+++ b/crnlib-return-null.patch
@@ -0,0 +1,52 @@
+--- crunch/inc/crn_decomp.h.orig 2026-05-20 22:18:38.182851860 +0200
++++ crunch/inc/crn_decomp.h 2026-05-20 22:18:43.776217072 +0200
+@@ -2819,15 +2819,15 @@
+ *pSize = 0;
+
+ if ((!pData) || (data_size < cCRNHeaderMinSize))
+- return false;
++ return NULL;
+
+ crn_header tmp_header;
+ const crn_header* pHeader = crnd_get_header(tmp_header, pData, data_size);
+ if (!pHeader)
+- return false;
++ return NULL;
+
+ if (level_index >= pHeader->m_levels)
+- return false;
++ return NULL;
+
+ uint32 cur_level_ofs = pHeader->m_level_ofs[level_index];
+
+--- crunch/crnlib/crnlib.cpp.orig 2026-05-20 22:18:38.185033306 +0200
++++ crunch/crnlib/crnlib.cpp 2026-05-20 22:18:46.406217072 +0200
+@@ -172,7 +172,7 @@
+ if (pActual_bitrate) *pActual_bitrate = 0.0f;
+
+ if (!comp_params.check())
+- return false;
++ return NULL;
+
+ crnlib::vector<uint8> crn_file_data;
+ if (!create_compressed_texture(comp_params, crn_file_data, pActual_quality_level, pActual_bitrate))
+@@ -189,7 +189,7 @@
+ if (pActual_bitrate) *pActual_bitrate = 0.0f;
+
+ if ((!comp_params.check()) || (!mip_params.check()))
+- return false;
++ return NULL;
+
+ crnlib::vector<uint8> crn_file_data;
+ if (!create_compressed_texture(comp_params, mip_params, crn_file_data, pActual_quality_level, pActual_bitrate))
+--- crunch/crnlib/crn_image_utils.cpp.orig 2026-05-20 22:18:38.187048761 +0200
++++ crunch/crnlib/crn_image_utils.cpp 2026-05-20 22:18:47.919550405 +0200
+@@ -1305,7 +1305,7 @@
+ *pActualComps = 0;
+
+ if ((req_comps < 1) || (req_comps > 4))
+- return false;
++ return NULL;
+
+ mipmapped_texture tex;
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/crnlib.git/commitdiff/99a902dbe4ca1eeac4a320afb3497744b2ad6c0d
More information about the pld-cvs-commit
mailing list