You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

147 lines
5.8 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Ludovic Courtès <>
;;; Copyright © 2015 Mark H Weaver <>
;;; Copyright © 2015 Eric Bavier <>
;;; This file is part of GNU Guix.
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages gd)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix build-system perl)
#:use-module (guix download)
#:use-module (gnu packages)
#:use-module (gnu packages perl)
#:use-module (gnu packages image)
#:use-module (gnu packages imagemagick)
#:use-module (gnu packages fontutils)
#:use-module (gnu packages compression)
#:use-module (gnu packages pkg-config)
#:use-module ((guix licenses) #:select (non-copyleft)))
(define-public gd
(name "gd")
;; Note: With now pointing to, genuine old
;; tarballs are no longer available. Notably, versions 2.0.x are
;; missing.
(version "2.1.1")
(source (origin
(method url-fetch)
(uri (string-append
"libgd-" version ".tar.xz"))
(build-system gnu-build-system)
`(("pkg-config" ,pkg-config)))
`(("freetype" ,freetype)
("libpng" ,libpng)
("zlib" ,zlib)))
`(("fontconfig" ,fontconfig)
("libjpeg" ,libjpeg)))
(home-page "")
(synopsis "Library for the dynamic creation of images by programmers")
"GD is a library for the dynamic creation of images by programmers. GD
is written in C, and \"wrappers\" are available for Perl, PHP and other
languages. GD creates PNG, JPEG, GIF, WebP, XPM, BMP images, among other
formats. GD is commonly used to generate charts, graphics, thumbnails, and
most anything else, on the fly. While not restricted to use on the web, the
most common applications of GD involve website development.")
(license (non-copyleft "file://COPYING"
"See COPYING file in the distribution."))))
(define-public perl-gd
(name "perl-gd")
(version "2.56")
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/L/LD/LDS/"
"GD-" version ".tar.gz"))
(search-patch "perl-gd-options-passthrough-and-fontconfig.patch")))))
(build-system perl-build-system)
`(("perl-module-build" ,perl-module-build))) ;needs Module::Build >= 0.42
`(("gd" ,gd)
("zlib" ,zlib)
("png" ,libpng)
("ft" ,freetype)
("jpeg" ,libjpeg)
("fontconfig" ,fontconfig)))
;; We must use Build.PL for building because Makefile.PL fails to build
;; the XS source.
`(#:module-build-flags (map (lambda (i)
(string-append "--lib_" i "_path="
(assoc-ref %build-inputs i)))
'("zlib" "png" "ft" "jpeg" "fontconfig"))
#:phases (alist-cons-after
'configure 'clear-autogenerated-files
(lambda _
;; This file is autogenerated by its .PLS script at build
;; time, but file creation fails because that file already
;; exists in the distribution with non-writable
;; permissions, so delete it first.
(delete-file "bdf_scripts/"))
(home-page "")
(synopsis "Perl interface to the GD graphics library")
(description " is an autoloadable interface module for libgd, a
popular library for creating and manipulating PNG files. With this library
you can create PNG images on the fly or modify existing files.")
(license (package-license perl))))
(define-public perl-gd-securityimage
(name "perl-gd-securityimage")
(version "1.73")
(method url-fetch)
(uri (string-append "mirror://cpan/authors/id/B/BU/BURAK/"
"GD-SecurityImage-" version ".tar.gz"))
(build-system perl-build-system)
`(("perl-module-build" ,perl-module-build)))
`(("perl-gd" ,perl-gd)
("perl-image-magick" ,perl-image-magick)))
(home-page "")
(synopsis "Security image generator.")
(description "This module provides a basic interface to create
security (captcha) images. The final output is the actual graphic data, the
mime type of the graphic, and the created random string. The module also has
some \"styles\" that are used to create the background (or foreground) of the
(license (package-license perl))))