[packages/MagickCache] - initial

qboosh qboosh at pld-linux.org
Sun Oct 5 20:07:34 CEST 2025


commit e17bc2ab23bb4836225d1e6cd51809515ce7bb54
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Oct 5 20:10:36 2025 +0200

    - initial

 MagickCache-build.patch | 20 +++++++++++++
 MagickCache.spec        | 78 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 98 insertions(+)
---
diff --git a/MagickCache.spec b/MagickCache.spec
new file mode 100644
index 0000000..1d5f8bb
--- /dev/null
+++ b/MagickCache.spec
@@ -0,0 +1,78 @@
+# NOTE: not ready yet, ImageMagick expects 0.9.3+
+Summary:	MagickCache: an Efficient Image Cache
+Summary(pl.UTF-8):	MagickCache - wydajna pamięć podręczna obrazów
+Name:		MagickCache
+%define	ver	0.9.2
+%define	pver	1
+Version:	%{ver}.%{pver}
+Release:	0.1
+License:	Apache-like
+Group:		Libraries
+#Source0Download: https://github.com/ImageMagick/MagickCache/releases
+Source0:	https://github.com/ImageMagick/MagickCache/archive/%{ver}-%{pver}/%{name}-%{ver}-%{pver}.tar.gz
+# Source0-md5:	69fe8a69e209f769f29bcdfda659f93b
+Patch0:		%{name}-build.patch
+URL:		https://imagemagick.org/script/magick-cache.php
+BuildRequires:	ImageMagick-devel >= 1:7.0.11.14
+BuildRequires:	pkgconfig
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The MagickCache provides secure methods and tools to cache images,
+image sequences, video, audio or metadata in a local folder. Any
+content is memory-mapped for efficient retrieval. Additional
+efficiencies are possible by retrieving a portion of an image. Content
+can persist or you can assign a time-to-live (TTL) to automatically
+expire content when the TTL is exceeded. MagickCache supports
+virtually unlimited content upwards of billions of images making it
+suitable as a web image service.
+
+%description -l pl.UTF-8
+MagickCache udostępnia bezpieczne metody i narzędzia do zarządzania
+pamięcią podręczną obrazów, sekwencji obrazów, filmów, dźwięku lub
+metadanych w katalogu lokalnym. Zawartość jest odwzorowywana w pamięci
+w celu wydajnego odtwarzania. Dodatkowo można poprawić wydajność
+pobierając fragment obrazu. Zawartość może być trwała lub mieć
+przypisany czas życia (TTL), aby zawartość automatycznie ulegała
+przedawnieniu. MagickCache obsługuje prawie nieograniczoną ilość
+obrazów, dzięki czemu nadaje się na usługę WWW.
+
+%package devel
+Summary:	MagickCache library
+Summary(pl.UTF-8):	Biblioteka MagickCache
+Group:		Development/Libraries
+
+%description devel
+MagickCache library.
+
+%description devel -l pl.UTF-8
+Biblioteka MagickCache.
+
+%prep
+%setup -q -n %{name}-%{ver}-%{pver}
+%patch -P0 -p1
+
+%build
+%configure \
+	--includedir=%{_includedir}/MagickCache
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc ChangeLog.md LICENSE README.md SECURITY.md
+%attr(755,root,root) %{_bindir}/magick-cache
+
+%files devel
+%defattr(644,root,root,755)
+%{_libdir}/libMagickCache.a
+%{_includedir}/MagickCache
diff --git a/MagickCache-build.patch b/MagickCache-build.patch
new file mode 100644
index 0000000..3dba3e1
--- /dev/null
+++ b/MagickCache-build.patch
@@ -0,0 +1,20 @@
+--- MagickCache-0.9.2-1/MagickCache/magick-cache.c.orig	2022-02-26 16:44:19.000000000 +0100
++++ MagickCache-0.9.2-1/MagickCache/magick-cache.c	2025-10-05 19:25:20.424648633 +0200
+@@ -1877,7 +1877,7 @@ MagickExport MagickBooleanType IterateMa
+   assert(cache != (MagickCache *) NULL);
+   assert(cache->signature == MagickCacheSignature);
+   status=MagickTrue;
+-  head=(ResourceNode *) AcquireCriticalMemory(sizeof(*node));
++  head=(struct ResourceNode *) AcquireCriticalMemory(sizeof(*node));
+   head->path=AcquireString(cache->path);
+   (void) ConcatenateString(&head->path,"/");
+   (void) ConcatenateString(&head->path,iri);
+@@ -1906,7 +1906,7 @@ MagickExport MagickBooleanType IterateMa
+         }
+       if (S_ISDIR(attributes.st_mode) != 0)
+         {
+-          node=(ResourceNode *) AcquireCriticalMemory(sizeof(*node));
++          node=(struct ResourceNode *) AcquireCriticalMemory(sizeof(*node));
+           node->path=path;
+           node->next=(struct ResourceNode *) NULL;
+           node->previous=q;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/MagickCache.git/commitdiff/e17bc2ab23bb4836225d1e6cd51809515ce7bb54



More information about the pld-cvs-commit mailing list