[PATCH] gnu: Add libjxr.
* gnu/packages/image.scm (libjxr): New variable. * gnu/packages/patches/libjxr-fix-function-signature.patch: New file. * gnu/packages/patches/libjxr-fix-typos.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patches.
This commit is contained in:
parent
e3100110ce
commit
b81245ccb3
|
@ -639,6 +639,8 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/libdrm-symbol-check.patch \
|
%D%/packages/patches/libdrm-symbol-check.patch \
|
||||||
%D%/packages/patches/libevent-dns-tests.patch \
|
%D%/packages/patches/libevent-dns-tests.patch \
|
||||||
%D%/packages/patches/libextractor-ffmpeg-3.patch \
|
%D%/packages/patches/libextractor-ffmpeg-3.patch \
|
||||||
|
%D%/packages/patches/libjxr-fix-function-signature.patch \
|
||||||
|
%D%/packages/patches/libjxr-fix-typos.patch \
|
||||||
%D%/packages/patches/liboop-mips64-deplibs-fix.patch \
|
%D%/packages/patches/liboop-mips64-deplibs-fix.patch \
|
||||||
%D%/packages/patches/libotr-test-auth-fix.patch \
|
%D%/packages/patches/libotr-test-auth-fix.patch \
|
||||||
%D%/packages/patches/liblxqt-include.patch \
|
%D%/packages/patches/liblxqt-include.patch \
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
|
;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
|
||||||
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
|
;;; Copyright © 2016 Eric Bavier <bavier@member.fsf.org>
|
||||||
;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
|
;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
|
||||||
|
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -129,6 +130,62 @@ image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats.")
|
||||||
(sha256 (base32
|
(sha256 (base32
|
||||||
"1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
|
"1cz0dy05mgxqdgjf52p54yxpyy95rgl30cnazdrfmw7hfca9n0h0"))))))
|
||||||
|
|
||||||
|
(define-public libjxr
|
||||||
|
(package
|
||||||
|
(name "libjxr")
|
||||||
|
(version "1.1")
|
||||||
|
(source (origin
|
||||||
|
;; We are using the Debian source because CodePlex does not
|
||||||
|
;; deliver an easily downloadable tarball.
|
||||||
|
(method url-fetch)
|
||||||
|
(uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
|
||||||
|
version ".orig.tar.gz"))
|
||||||
|
(sha256
|
||||||
|
(base32
|
||||||
|
"00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
|
||||||
|
(patch-flags '("-p1" "--binary"))
|
||||||
|
(patches (search-patches "libjxr-fix-function-signature.patch"
|
||||||
|
"libjxr-fix-typos.patch"))))
|
||||||
|
(build-system gnu-build-system)
|
||||||
|
(arguments '(#:make-flags '("CC=gcc")
|
||||||
|
#:tests? #f ; no check target
|
||||||
|
#:phases
|
||||||
|
(modify-phases %standard-phases
|
||||||
|
(delete 'configure) ; no configure script
|
||||||
|
;; The upstream makefile does not include an install phase.
|
||||||
|
(replace 'install
|
||||||
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(bin (string-append out "/bin"))
|
||||||
|
(lib (string-append out "/lib"))
|
||||||
|
(include (string-append out "/include/jxrlib")))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(install-file file include)
|
||||||
|
(delete-file file))
|
||||||
|
(append
|
||||||
|
'("jxrgluelib/JXRGlue.h"
|
||||||
|
"jxrgluelib/JXRMeta.h"
|
||||||
|
"jxrtestlib/JXRTest.h"
|
||||||
|
"image/sys/windowsmediaphoto.h")
|
||||||
|
(find-files "common/include" "\\.h$")))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(install-file file lib)
|
||||||
|
(delete-file file))
|
||||||
|
(find-files "." "\\.a$"))
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(install-file file bin)
|
||||||
|
(delete-file file))
|
||||||
|
'("JxrDecApp" "JxrEncApp")))
|
||||||
|
#t)))))
|
||||||
|
(synopsis "Implementation of the JPEG XR standard")
|
||||||
|
(description "JPEG XR is an approved ISO/IEC International standard (its
|
||||||
|
official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
|
||||||
|
(license
|
||||||
|
(license:non-copyleft
|
||||||
|
"file://Makefile"
|
||||||
|
"See the header of the Makefile in the distribution."))
|
||||||
|
(home-page "https://jxrlib.codeplex.com/")))
|
||||||
|
|
||||||
(define-public jpegoptim
|
(define-public jpegoptim
|
||||||
(package
|
(package
|
||||||
(name "jpegoptim")
|
(name "jpegoptim")
|
||||||
|
|
|
@ -0,0 +1,16 @@
|
||||||
|
Description: Fix function signature
|
||||||
|
Author: Mathieu Malaterre <malat@debian.org>
|
||||||
|
Origin: upstream, https://jxrlib.codeplex.com/SourceControl/changeset/04cf339385b8196f98025b43a366a0790deac994
|
||||||
|
Bug-Debian: http://bugs.debian.org/748590
|
||||||
|
|
||||||
|
--- jxrlib-1.1.orig/image/decode/JXRTranscode.c
|
||||||
|
+++ jxrlib-1.1/image/decode/JXRTranscode.c
|
||||||
|
@@ -47,7 +47,7 @@ EXTERN_C Void FreeCodingContextDec(CWMIm
|
||||||
|
EXTERN_C Int StrEncInit(CWMImageStrCodec *);
|
||||||
|
EXTERN_C Void StrIOEncTerm(CWMImageStrCodec *);
|
||||||
|
EXTERN_C Void FreeCodingContextEnc(CWMImageStrCodec *);
|
||||||
|
-EXTERN_C Void encodeMB(CWMImageStrCodec *, Int, Int);
|
||||||
|
+EXTERN_C Int encodeMB(CWMImageStrCodec *, Int, Int);
|
||||||
|
EXTERN_C Int writeIndexTableNull(CWMImageStrCodec *);
|
||||||
|
EXTERN_C Void writePacketHeader(BitIOInfo *, U8, U8);
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
Description: Fix typos and remove some warnings
|
||||||
|
Author: Mathieu Malaterre <malat@debian.org>
|
||||||
|
|
||||||
|
Index: jxrlib-1.1/jxrencoderdecoder/JxrEncApp.c
|
||||||
|
===================================================================
|
||||||
|
--- jxrlib-1.1.orig/jxrencoderdecoder/JxrEncApp.c
|
||||||
|
+++ jxrlib-1.1/jxrencoderdecoder/JxrEncApp.c
|
||||||
|
@@ -578,7 +578,7 @@ main(int argc, char* argv[])
|
||||||
|
|
||||||
|
//================================
|
||||||
|
Call(PKCreateCodecFactory(&pCodecFactory, WMP_SDK_VERSION));
|
||||||
|
- Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, &pEncoder));
|
||||||
|
+ Call(pCodecFactory->CreateCodec(&IID_PKImageWmpEncode, (void**)&pEncoder));
|
||||||
|
|
||||||
|
//----------------------------------------------------------------
|
||||||
|
Call(PKCreateTestFactory(&pTestFactory, WMP_SDK_VERSION));
|
||||||
|
Index: jxrlib-1.1/jxrgluelib/JXRMeta.h
|
||||||
|
===================================================================
|
||||||
|
--- jxrlib-1.1.orig/jxrgluelib/JXRMeta.h
|
||||||
|
+++ jxrlib-1.1/jxrgluelib/JXRMeta.h
|
||||||
|
@@ -34,7 +34,7 @@
|
||||||
|
|
||||||
|
#ifndef UNREFERENCED_PARAMETER
|
||||||
|
#define UNREFERENCED_PARAMETER(P) { (P) = (P); }
|
||||||
|
-#endif UNREFERENCED_PARAMETER
|
||||||
|
+#endif /*UNREFERENCED_PARAMETER*/
|
||||||
|
|
||||||
|
//================================================================
|
||||||
|
// Container
|
Loading…
Reference in New Issue