diff mbox series

[bug#58952,1/3] gnu: Add easyexif

Message ID 20221101202246.17659-1-sharlatanus@gmail.com
State New
Headers show
Series gnu: meshlib: Unbundle some external libraries | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git-branch success View Git branch
cbaines/applying patch success
cbaines/issue success View issue

Commit Message

Sharlatan Hellseher Nov. 1, 2022, 8:22 p.m. UTC
* gnu/packages/photo.scm (easyexif): New variable.
---
 gnu/packages/photo.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)

Comments

Christopher Baines Nov. 3, 2022, 5:24 p.m. UTC | #1
Sharlatan Hellseher <sharlatanus@gmail.com> writes:

> * gnu/packages/photo.scm (easyexif): New variable.
> ---
>  gnu/packages/photo.scm | 44 ++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 44 insertions(+)

...

> +    (license license:bsd-0)))

Can you check this please, I think it's a different BSD licence variant.
diff mbox series

Patch

diff --git a/gnu/packages/photo.scm b/gnu/packages/photo.scm
index 642694bda1..0df6c7f271 100644
--- a/gnu/packages/photo.scm
+++ b/gnu/packages/photo.scm
@@ -227,6 +227,50 @@  (define-public libexif
 data as produced by digital cameras.")
     (license license:lgpl2.1+)))
 
+(define-public easyexif
+  (package
+    (name "easyexif")
+    (version "1.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/mayanklahiri/easyexif")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "0l3zr2gzjw25k7gw8z7cpz4prqzfrrpqdqd8gqw2py8pbsxkx8ap"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)
+                        (replace 'check
+                          (lambda* (#:key tests? #:allow-other-keys)
+                            (when tests?
+                              (invoke "./test.sh"))))
+                        (replace 'install
+                          (lambda* (#:key outputs #:allow-other-keys)
+                            (let* ((out (assoc-ref outputs "out"))
+                                   (bin (string-append out "/bin"))
+                                   (share (string-append out "/share"))
+                                   (include (string-append out
+                                                           "/include/easyexif")))
+                              (for-each (lambda (dir)
+                                          (mkdir-p dir))
+                                        (list bin include share))
+                              (install-file "demo" bin)
+                              (install-file "exif.cpp" include)
+                              (install-file "exif.h" include)
+                              (install-file "LICENSE" share)))))))
+    (home-page "https://github.com/mayanklahiri/easyexif")
+    (synopsis "ISO-compliant C++ EXIF parsing library")
+    (description
+     "EasyEXIF is a tiny, lightweight C++ library that parses basic information
+out of JPEG files.  It uses only the std::string library and is otherwise pure
+C++.  You pass it the binary contents of a JPEG file, and it parses several of
+the most important EXIF fields for you.")
+    (license license:bsd-0)))
+
 (define-public libgphoto2
   (package
     (name "libgphoto2")