Compare commits

...

5 Commits
rawhide ... f36

Author SHA1 Message Date
Benjamin A. Beasley 8d09560956 A few improved descriptions 2022-09-10 09:37:19 -04:00
Benjamin A. Beasley c8cfc1e2f8 Improved summaries based on upstream’s README.md 2022-09-10 09:37:15 -04:00
Benjamin A. Beasley 03a5f4a415 Update to 8b5f1f3
- The stb_perlin-devel subpackage has been restored, as upstream
  believes all relevant patents are now expired.
2022-09-10 09:37:11 -04:00
Benjamin A. Beasley 0a0e983e8f Update License to SPDX 2022-09-10 09:37:08 -04:00
Benjamin A. Beasley 061deaee47 Reword spec file note on stb_include 2022-09-10 09:37:01 -04:00
4 changed files with 70 additions and 159 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/stb-3a1174060a7dd4eb652d4e6854bc4cd98c159200.tar.gz
/stb-c0c982601f40183e74d84a61237e968dca08380e.tar.gz
/stb-af1a5bc352164740c1cc1354942b1c6b72eacb8a.tar.gz
/stb-8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55.tar.gz

View File

@ -1,113 +0,0 @@
From f1fc796075dc6a3c41e67f0bb8a67585ff892435 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Wed, 8 Sep 2021 19:20:24 -0400
Subject: [PATCH] Remove stb_perlin from tests
---
tests/Makefile | 2 +-
tests/stb.dsp | 8 --------
tests/test.sbm | 1 -
tests/test_c_compilation.c | 3 +--
tests/test_cpp_compilation.cpp | 2 --
tests/test_perlin.c | 1 -
6 files changed, 2 insertions(+), 15 deletions(-)
delete mode 100644 tests/test_perlin.c
diff --git a/tests/Makefile b/tests/Makefile
index 1782ea6723..608e40fbcc 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -6,7 +6,7 @@ CPPFLAGS = -Wno-write-strings -DSTB_DIVIDE_TEST
#CFLAGS += -O -fsanitize=address
all:
- $(CC) $(INCLUDES) $(CFLAGS) ../stb_vorbis.c test_c_compilation.c test_c_lexer.c test_dxt.c test_easyfont.c test_image.c test_image_write.c test_perlin.c test_sprintf.c test_truetype.c test_voxel.c -lm
+ $(CC) $(INCLUDES) $(CFLAGS) ../stb_vorbis.c test_c_compilation.c test_c_lexer.c test_dxt.c test_easyfont.c test_image.c test_image_write.c test_sprintf.c test_truetype.c test_voxel.c -lm
$(CC) $(INCLUDES) $(CPPFLAGS) -std=c++0x test_cpp_compilation.cpp -lm -lstdc++
$(CC) $(INCLUDES) $(CFLAGS) -DIWT_TEST image_write_test.c -lm -o image_write_test
$(CC) $(INCLUDES) $(CFLAGS) fuzz_main.c stbi_read_fuzzer.c -lm -o image_fuzzer
diff --git a/tests/stb.dsp b/tests/stb.dsp
index ba13ba1371..af16faf354 100644
--- a/tests/stb.dsp
+++ b/tests/stb.dsp
@@ -150,10 +150,6 @@ SOURCE=..\stb_malloc.h
# End Source File
# Begin Source File
-SOURCE=..\stb_perlin.h
-# End Source File
-# Begin Source File
-
SOURCE=..\stb_rect_pack.h
# End Source File
# Begin Source File
@@ -218,10 +214,6 @@ SOURCE=.\test_packer.c
# End Source File
# Begin Source File
-SOURCE=.\test_perlin.c
-# End Source File
-# Begin Source File
-
SOURCE=.\test_sprintf.c
# End Source File
# Begin Source File
diff --git a/tests/test.sbm b/tests/test.sbm
index 9465605846..f1518672f0 100644
--- a/tests/test.sbm
+++ b/tests/test.sbm
@@ -53,7 +53,6 @@ main.c test_dxt.c
main.c test_easyfont.c
main.c test_image.c
main.c test_image_write.c
-main.c test_perlin.c
main.c test_sprintf.c
main.c test_vorbis.c ../stb_vorbis.c
main.c test_voxel.c
diff --git a/tests/test_c_compilation.c b/tests/test_c_compilation.c
index 11f60231e6..27be5d682c 100644
--- a/tests/test_c_compilation.c
+++ b/tests/test_c_compilation.c
@@ -17,7 +17,6 @@
#include "stb_herringbone_wang_tile.h"
#include "stb_image.h"
#include "stb_image_write.h"
-#include "stb_perlin.h"
#include "stb_c_lexer.h"
#include "stb_divide.h"
#include "stb_image_resize.h"
@@ -46,4 +45,4 @@ int quicktest(void)
char buffer[999];
stbsp_sprintf(buffer, "test%%test");
return 0;
-}
\ No newline at end of file
+}
diff --git a/tests/test_cpp_compilation.cpp b/tests/test_cpp_compilation.cpp
index fd8c5b6423..43ec5a2ba9 100644
--- a/tests/test_cpp_compilation.cpp
+++ b/tests/test_cpp_compilation.cpp
@@ -6,7 +6,6 @@
#include "stb_truetype.h"
#include "stb_image_write.h"
#include "stb_c_lexer.h"
-#include "stb_perlin.h"
#include "stb_dxt.h"
#include "stb_divide.h"
#include "stb_herringbone_wang_tile.h"
@@ -45,7 +44,6 @@ void my_free(void *) { }
#include "stb_rect_pack.h"
#include "stb_truetype.h"
#include "stb_image_write.h"
-#include "stb_perlin.h"
#include "stb_dxt.h"
#include "stb_divide.h"
#include "stb_herringbone_wang_tile.h"
diff --git a/tests/test_perlin.c b/tests/test_perlin.c
deleted file mode 100644
index de702c9bcc..0000000000
--- a/tests/test_perlin.c
+++ /dev/null
@@ -1 +0,0 @@
-#include "stb_perlin.h"
\ No newline at end of file

View File

@ -1 +1 @@
SHA512 (stb-af1a5bc352164740c1cc1354942b1c6b72eacb8a.tar.gz) = 5937baa1a9b7342ddc0e41c37ba0ea6b0c878f670a81b55bb124681e6b5e381fdc1d9557c96637e3ba082d6d968ed67a78b47f16aa5555c1c43394d1f9e57f2d
SHA512 (stb-8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55.tar.gz) = 76e0ed7536146aac71f89d6246235221c1dc0bd035ae4b33d496213acf5be95413cae4455a3f1419f84113320f7bd662dc50b47788cbdc8e7208bbbbcfd23f98

113
stb.spec
View File

@ -1,14 +1,18 @@
%global commit af1a5bc352164740c1cc1354942b1c6b72eacb8a
%global snapdate 20210910
%global commit 8b5f1f37b5b75829fc72d38e7b5d4bcbf8a26d55
%global snapdate 20220908
# We choose not to package the “stb_include” library (stb_include.h) because it
# is so rife with old-school blithe C behavior—wanton use of strcat/strcpy into
# a fixed-length buffer that is assumed (but not proven) to be large enough for
# all possible uses, ignoring possible I/O errors (possibly leading to
# undefined behavior from reading uninitialized memory), and so on. Making it
# safe to use would mean a substantial rewrite.
# We choose not to package the “stb_include” library (stb_include.h) because,
# during the package review, it was observed that it follows coding practices
# that make it dangerous to use on untrusted inputs, including but not limited
# to:
#
# If a request for this library arises, this decision may be revisited, or the
# - It uses of strcat/strcpy into a fixed-length buffer that is assumed (but
# not proven) to be large enough for all possible uses
# - It ignores I/O errors (possibly leading to undefined behavior from reading
# uninitialized memory), and so on. Making it
#
# A substantial rewrite would be required to mitigate these concerns. If a
# request for this library arises, this decision may be revisited, or the
# necessary rewrite may be done and offered upstream. For now, we omit the
# library and expect it will not be missed.
%bcond_with stb_include
@ -24,7 +28,7 @@ Release: %autorelease -p
Summary: Single-file public domain libraries for C/C++
# See LICENSE.
License: MIT or Unlicense
License: MIT OR Unlicense
# Additionally, the following are under different terms, but are not used; to
# make certain, they are removed in %%prep.
#
@ -50,10 +54,6 @@ Patch: %{url}/pull/1196.patch
# https://github.com/nothings/stb/pull/1198
Patch: %{url}/pull/1198.patch
# Remove stb_perlin from tests
# https://github.com/nothings/stb/pull/1198
Patch: %{url}/pull/1204.patch
# Candidate fix for:
# https://nvd.nist.gov/vuln/detail/CVE-2021-42715
#
@ -118,6 +118,7 @@ Patch: %{url}/pull/1297.patch
%global stb_image_write_version 1.16
%global stb_include_version 0.2
%global stb_leakcheck_version 0.6
%global stb_perlin_version 0.5
%global stb_rect_pack_version 1.1
%global stb_sprintf_version 1.10
%global stb_textedit_version 1.14
@ -174,6 +175,8 @@ Requires: stb_include-static = %{stb_include_version}%{snapinfo}-%{release
%endif
Requires: stb_leakcheck-devel%{?_isa} = %{stb_leakcheck_version}%{snapinfo}-%{release}
Requires: stb_leakcheck-static = %{stb_leakcheck_version}%{snapinfo}-%{release}
Requires: stb_perlin-devel%{?_isa} = %{stb_perlin_version}%{snapinfo}-%{release}
Requires: stb_perlin-static = %{stb_perlin_version}%{snapinfo}-%{release}
Requires: stb_rect_pack-devel%{?_isa} = %{stb_rect_pack_version}%{snapinfo}-%{release}
Requires: stb_rect_pack-static = %{stb_rect_pack_version}%{snapinfo}-%{release}
Requires: stb_sprintf-devel%{?_isa} = %{stb_sprintf_version}%{snapinfo}-%{release}
@ -189,12 +192,6 @@ Requires: stb_vorbis-static = %{stb_vorbis_version}%{snapinfo}-%{release}
Requires: stb_voxel_render-devel%{?_isa} = %{stb_voxel_render_version}%{snapinfo}-%{release}
Requires: stb_voxel_render-static = %{stb_voxel_render_version}%{snapinfo}-%{release}
# Upstream removed the stb_perlin library in commit
# 59e7dec3e8bb0a8d4050d03c2dc32cf71ffa87c6, asserting it was covered by
# patents.
Obsoletes: stb_perlin-devel < 0.5-0.5
Obsoletes: stb_perlin-static < 0.5-0.5
%description devel
The stb-devel package contains libraries and header files for developing
applications that use stb.
@ -203,7 +200,7 @@ This is a metapackage that requires the -devel packages for all stb libraries.
%package -n stb_c_lexer-devel
Summary: Lexer for making little C-like languages with recursive-descent parsers
Summary: Simplify writing parsers for C-like languages
Version: %{stb_c_lexer_version}%{snapinfo}
Provides: stb_c_lexer-static = %{stb_c_lexer_version}%{snapinfo}-%{release}
@ -213,7 +210,7 @@ Lexer for making little C-like languages with recursive-descent parsers.
%package -n stb_connected_components-devel
Summary: Connected components on grids
Summary: Incrementally compute reachability on grids
Version: %{stb_connected_components_version}%{snapinfo}
Provides: stb_connected_components-static = %{stb_connected_components_version}%{snapinfo}-%{release}
@ -227,17 +224,23 @@ their orthogonal neighbors, not diagonally.
%package -n stb_divide-devel
Summary: Three kinds of divide/modulus of signed integers
Summary: More useful 32-bit modulus e.g. “Euclidean divide”
Version: %{stb_divide_version}%{snapinfo}
Provides: stb_divide-static = %{stb_divide_version}%{snapinfo}-%{release}
%description -n stb_divide-devel
Three kinds of divide/modulus of signed integers.
This file provides three different consistent divide/mod pairs
implemented on top of arbitrary C/C++ division, including correct
handling of overflow of intermediate calculations:
trunc: a/b truncates to 0, a%b has same sign as a
floor: a/b truncates to -inf, a%b has same sign as b
eucl: a/b truncates to sign(b)*inf, a%b is non-negative
%package -n stb_ds-devel
Summary: Data structures
Summary: Typesafe dynamic array and hash tables for C, will compile in C++
Version: %{stb_ds_version}%{snapinfo}
Provides: stb_ds-static = %{stb_ds_version}%{snapinfo}-%{release}
@ -246,12 +249,11 @@ Provides: stb_ds-static = %{stb_ds_version}%{snapinfo}-%{release}
This is a single-header-file library that provides easy-to-use dynamic arrays
and hash tables for C (also works in C++).
For a gentle introduction:
http://nothings.org/stb_ds
For a gentle introduction: https://nothings.org/stb_ds
%package -n stb_dxt-devel
Summary: DXT1/DXT5 compressor
Summary: Fabian “ryg” Giesens real-time DXT compressor
Version: %{stb_dxt_version}%{snapinfo}
Provides: stb_dxt-static = %{stb_dxt_version}%{snapinfo}-%{release}
@ -260,9 +262,8 @@ Provides: stb_dxt-static = %{stb_dxt_version}%{snapinfo}-%{release}
DXT1/DXT5 compressor.
%package -n stb_easy_font-devel
Summary: Bitmap font for 3D rendering
Summary: Quick-and-dirty easy-to-deploy bitmap font for printing frame rate, etc
Version: %{stb_easy_font_version}%{snapinfo}
Provides: stb_easy_font-static = %{stb_easy_font_version}%{snapinfo}-%{release}
@ -282,7 +283,7 @@ Doesnt use any textures, instead builds characters out of quads.
%package -n stb_herringbone_wang_tile-devel
Summary: Herringbone Wang Tile Generator
Summary: Herringbone Wang tile map generator
Version: %{stb_herringbone_wang_tile_version}%{snapinfo}
Provides: stb_herringbone_wang_tile-static = %{stb_herringbone_wang_tile_version}%{snapinfo}-%{release}
@ -307,7 +308,7 @@ loading the tile set and specifying the constraints explicitly yourself.
%package -n stb_hexwave-devel
Summary: A flexible anti-aliased (bandlimited) digital audio oscillator
Summary: Audio waveform synthesizer
Version: %{stb_hexwave_version}%{snapinfo}
Provides: stb_hexwave-static = %{stb_hexwave_version}%{snapinfo}-%{release}
@ -323,17 +324,20 @@ multiple voices, etc.
%package -n stb_image-devel
Summary: Image loader
Summary: Image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PIC
Version: %{stb_image_version}%{snapinfo}
Provides: stb_image-static = %{stb_image_version}%{snapinfo}-%{release}
%description -n stb_image-devel
Image loader.
%{summary}.
Primarily of interest to game developers and other people who can avoid
problematic images and only need the trivial interface.
%package -n stb_image_resize-devel
Summary: Image resizing
Summary: Resize images larger/smaller with good quality
Version: %{stb_image_resize_version}%{snapinfo}
Provides: stb_image_resize-static = %{stb_image_resize_version}%{snapinfo}-%{release}
@ -348,7 +352,7 @@ w/Mitchell filter, upsamples w/cubic interpolation.
%package -n stb_image_write-devel
Summary: Writes out PNG/BMP/TGA/JPEG/HDR images to C stdio
Summary: Image writing to disk: PNG, TGA, BMP
Version: %{stb_image_write_version}%{snapinfo}
Provides: stb_image_write-static = %{stb_image_write_version}%{snapinfo}-%{release}
@ -365,7 +369,7 @@ run-time performance.
%if %{with stb_include}
%package -n stb_include-devel
Summary: Parse and process #include directives
Summary: Implement recursive #include support, particularly for GLSL
Version: %{stb_include_version}%{snapinfo}
Provides: stb_include-static = %{stb_include_version}%{snapinfo}-%{release}
@ -385,17 +389,27 @@ API.
%package -n stb_leakcheck-devel
Summary: Quick and dirty malloc leak-checking
Summary: Quick-and-dirty malloc/free leak-checking
Version: %{stb_leakcheck_version}%{snapinfo}
Provides: stb_leakcheck-static = %{stb_leakcheck_version}%{snapinfo}-%{release}
%description -n stb_leakcheck-devel
Quick and dirty malloc leak-checking.
%{summary}.
%package -n stb_perlin-devel
Summary: Perlins revised simplex noise w/ different seeds
Version: %{stb_perlin_version}%{snapinfo}
Provides: stb_perlin-static = %{stb_perlin_version}%{snapinfo}-%{release}
%description -n stb_perlin-devel
%{summary}.
%package -n stb_rect_pack-devel
Summary: Rectangle packing
Summary: Simple 2D rectangle packer with decent quality
Version: %{stb_rect_pack_version}%{snapinfo}
Provides: stb_rect_pack-static = %{stb_rect_pack_version}%{snapinfo}-%{release}
@ -417,7 +431,7 @@ same API, but with a different init function.
%package -n stb_sprintf-devel
Summary: Implementation of snprintf()
Summary: Fast sprintf, snprintf for C/C++
Version: %{stb_sprintf_version}%{snapinfo}
Provides: stb_sprintf-static = %{stb_sprintf_version}%{snapinfo}-%{release}
@ -448,7 +462,7 @@ when using MSVC static libs, calling sprintf drags in 16K.
%package -n stb_textedit-devel
Summary: Guts of a multi-line text-editing widget
Summary: Guts of a text editor for games etc., implementing them from scratch
Version: %{stb_textedit_version}%{snapinfo}
Provides: stb_textedit-static = %{stb_textedit_version}%{snapinfo}-%{release}
@ -468,7 +482,7 @@ Non-trivial behaviors are modelled after Windows text controls.
%package -n stb_tilemap_editor-devel
Summary: Embeddable tilemap editor for C/C++
Summary: Embeddable tilemap editor
Version: %{stb_tilemap_editor_version}%{snapinfo}
Provides: stb_tilemap_editor-static = %{stb_tilemap_editor_version}%{snapinfo}-%{release}
@ -478,7 +492,7 @@ Embeddable tilemap editor for C/C++.
%package -n stb_truetype-devel
Summary: Processes TrueType Files
Summary: Parse, decode, and rasterize characters from TrueType fonts
Version: %{stb_truetype_version}%{snapinfo}
Provides: stb_truetype-static = %{stb_truetype_version}%{snapinfo}-%{release}
@ -503,7 +517,7 @@ This library processes TrueType files:
%package -n stb_vorbis-devel
Summary: Ogg Vorbis audio decoder
Summary: Decode Ogg Vorbis files from file/memory to float/16-bit signed output
Version: %{stb_vorbis_version}%{snapinfo}
Provides: stb_vorbis-static = %{stb_vorbis_version}%{snapinfo}-%{release}
@ -660,6 +674,7 @@ done <<'EOF'
%{stb_image_write_version} stb_image_write.h
%{stb_include_version} stb_include.h
%{stb_leakcheck_version} stb_leakcheck.h
%{stb_perlin_version} stb_perlin.h
%{stb_rect_pack_version} stb_rect_pack.h
%{stb_sprintf_version} stb_sprintf.h
%{stb_textedit_version} stb_textedit.h
@ -787,6 +802,14 @@ EOF
%{_includedir}/stb_leakcheck.h
%files -n stb_perlin-devel
%license LICENSE
# Directory has shared ownership across stb subpackages:
%dir %{_includedir}/stb
%{_includedir}/stb/stb_perlin.h
%{_includedir}/stb_perlin.h
%files -n stb_rect_pack-devel
%license LICENSE
# Directory has shared ownership across stb subpackages: