summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoraurtzy <aurtzy@gmail.com>2025-05-07 01:59:09 -0400
committerLudovic Courtès <ludo@gnu.org>2025-06-12 14:38:16 +0200
commitfa84972de70ca6fb9fd2fbcb544af727f2d0e13e (patch)
tree9d135fd30982c4a671734f494828e83d61d64fdc
parent856bfa268fade10ab8a53e8fc0ce0daa22e76107 (diff)
gnu: stb-*: Make it possible to translate descriptions.
* gnu/packages/stb.scm (define-stb-header-package): New macro. (stb-image, stb-image-resize2, stb-image-write, stb-rect-pack, stb-sprintf, stb-truetype): Use it. Change-Id: Ie7da51a2eb2dc91dff8d23e0d3c8397af3eb6d67 Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/stb.scm44
1 files changed, 24 insertions, 20 deletions
diff --git a/gnu/packages/stb.scm b/gnu/packages/stb.scm
index 64375e7480..395959608d 100644
--- a/gnu/packages/stb.scm
+++ b/gnu/packages/stb.scm
@@ -96,39 +96,43 @@ the C programming language.")
#t))))
(description description)))
-;; TODO: These descriptions are not translatable! They should be
-;; converted to macros as outlined in <https://bugs.gnu.org/32155>.
-(define-public stb-image
- (make-stb-header-package
- "stb-image" "2.30"
+(define-syntax define-stb-header-package
+ (syntax-rules (description)
+ ((_ symbol name version (description text))
+ (define-public symbol
+ (make-stb-header-package name version text)))))
+
+(define-stb-header-package stb-image
+ "stb-image" "2.30"
+ (description
"stb-image is a small and self-contained library for image loading or
decoding from file or memory. A variety of formats are supported."))
-(define-public stb-image-resize2
- (make-stb-header-package
- "stb-image-resize2" "2.12"
+(define-stb-header-package stb-image-resize2
+ "stb-image-resize2" "2.12"
+ (description
"stb-image-resize2 is a library that supports scaling and translation of
images."))
-(define-public stb-image-write
- (make-stb-header-package
- "stb-image-write" "1.16"
+(define-stb-header-package stb-image-write
+ "stb-image-write" "1.16"
+ (description
"stb-image-write is a small library for writing image files to the
C@tie{}@code{stdio} interface."))
-(define-public stb-rect-pack
- (make-stb-header-package
- "stb-rect-pack" "1.01"
+(define-stb-header-package stb-rect-pack
+ "stb-rect-pack" "1.01"
+ (description
"stb-rect-pack is a small rectangle packing library useful for, e.g., packing
rectangular textures into an atlas. It does not do rotation."))
-(define-public stb-sprintf
- (make-stb-header-package
- "stb-sprintf" "1.10"
+(define-stb-header-package stb-sprintf
+ "stb-sprintf" "1.10"
+ (description
"stb-sprintf implements fast @code{sprintf}, @code{snprintf} for C/C++."))
-(define-public stb-truetype
- (make-stb-header-package
- "stb-truetype" "1.26"
+(define-stb-header-package stb-truetype
+ "stb-truetype" "1.26"
+ (description
"stb-truetype is a library for parsing, decoding, and rasterizing
characters from TrueType fonts."))