From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58270) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gLv4c-0004nE-FJ for guix-patches@gnu.org; Sun, 11 Nov 2018 14:07:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gLv4Y-0004q0-CP for guix-patches@gnu.org; Sun, 11 Nov 2018 14:07:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42467) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gLv4Y-0004p8-6j for guix-patches@gnu.org; Sun, 11 Nov 2018 14:07:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gLv4Y-0003oS-0f for guix-patches@gnu.org; Sun, 11 Nov 2018 14:07:02 -0500 Subject: [bug#33347] [PATCH 1/4] gnu: Add pnglite. References: <871s7r3095.fsf@gmail.com> In-Reply-To: <871s7r3095.fsf@gmail.com> Resent-Message-ID: From: Alex Vong Date: Mon, 12 Nov 2018 03:06:27 +0800 Message-ID: <87wopj1ljg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33347@debbugs.gnu.org Cc: alexvong1995@gmail.com --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-Add-pnglite.patch Content-Transfer-Encoding: quoted-printable From=2071b7ccb3de4ca3d08032ca89f8bb2e7782f9959b Mon Sep 17 00:00:00 2001 From: Alex Vong Date: Mon, 12 Nov 2018 01:55:05 +0800 Subject: [PATCH 1/4] gnu: Add pnglite. * gnu/packages/image.scm (pnglite): New variable. =2D-- gnu/packages/image.scm | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 9bf9bd7e5..889128173 100644 =2D-- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -21,6 +21,7 @@ ;;; Copyright =C2=A9 2018 Pierre Neidhardt ;;; Copyright =C2=A9 2018 Marius Bakke ;;; Copyright =C2=A9 2018 Pierre-Antoine Rouby +;;; Copyright =C2=A9 2018 Alex Vong ;;; ;;; This file is part of GNU Guix. ;;; @@ -253,6 +254,60 @@ files. It can compress them as much as 40% losslessly= .") ;; This package used to be wrongfully name "pngcrunch". (deprecated-package "pngcrunch" pngcrush)) =20 +(define-public pnglite + (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38") + (revision "1")) + (package + (name "pnglite") + ;; The project was moved from sourceforge to github. + ;; The latest version in sourceforge was 0.1.17: + ;; https://sourceforge.net/projects/pnglite/files/pnglite/ + ;; No releases are made in github. + (version (git-version "0.1.17" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/dankar/pnglite") + (commit commit))) + (sha256 + (base32 + "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (let ((cflags '("-O2" "-fPIC")) + (ldflags '("-shared"))) + (apply invoke + `("gcc" + "-o" "libpnglite.so" + ,@cflags + ,@ldflags + "pnglite.c")) + #t))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib/")) + (include (string-append out "/include/")) + (doc (string-append out "/share/doc/" + ,name "-" ,version "/"))) + (install-file "libpnglite.so" lib) + (install-file "pnglite.h" include) + (install-file "README.md" doc) + #t)))))) + (inputs `(("zlib" ,zlib))) + (home-page "https://github.com/dankar/pnglite") + (synopsis "Pretty small png library") + (description "A pretty small png library. +Currently all documentation resides in @file{pnglite.h}.") + (license license:zlib)))) + (define-public libjpeg (package (name "libjpeg") =2D-=20 2.19.1 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQQwb8uPLAHCXSnTBVZh71Au9gJS8gUCW+h9swAKCRBh71Au9gJS 8iYAAQCwz1cgPN+ocTn/SfrwjwufnKZI8C+JXR/5AqXKJpj6RAD8DbsHTc+H3S2B XfLNg6tAB5EpesW5dpleC8vSkysJ0wY= =bX0y -----END PGP SIGNATURE----- --==-=-=--