| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> |
| 3 | ;;; Copyright © 2016, 2018 Ricardo Wurmus <rekado@elephly.net> |
| 4 | ;;; Copyright © 2016, 2017, 2018, 2020 Efraim Flashner <efraim@flashner.co.il> |
| 5 | ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr> |
| 6 | ;;; Copyright © 2018 Leo Famulari <leo@famulari.name> |
| 7 | ;;; Copyright © 2018 Thorsten Wilms <t_w_@freenet.de> |
| 8 | ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> |
| 9 | ;;; |
| 10 | ;;; This file is part of GNU Guix. |
| 11 | ;;; |
| 12 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 13 | ;;; under the terms of the GNU General Public License as published by |
| 14 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 15 | ;;; your option) any later version. |
| 16 | ;;; |
| 17 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 18 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | ;;; GNU General Public License for more details. |
| 21 | ;;; |
| 22 | ;;; You should have received a copy of the GNU General Public License |
| 23 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 24 | |
| 25 | (define-module (gnu packages gimp) |
| 26 | #:use-module (guix packages) |
| 27 | #:use-module (guix download) |
| 28 | #:use-module (guix git-download) |
| 29 | #:use-module (guix utils) |
| 30 | #:use-module ((guix licenses) #:prefix license:) |
| 31 | #:use-module (guix build-system gnu) |
| 32 | #:use-module (guix build-system glib-or-gtk) |
| 33 | #:use-module (guix build-system meson) |
| 34 | #:use-module (gnu packages) |
| 35 | #:use-module (gnu packages algebra) |
| 36 | #:use-module (gnu packages autotools) |
| 37 | #:use-module (gnu packages base) |
| 38 | #:use-module (gnu packages documentation) |
| 39 | #:use-module (gnu packages pkg-config) |
| 40 | #:use-module (gnu packages glib) |
| 41 | #:use-module (gnu packages gtk) |
| 42 | #:use-module (gnu packages gnome) |
| 43 | #:use-module (gnu packages graphics) |
| 44 | #:use-module (gnu packages image) |
| 45 | #:use-module (gnu packages ghostscript) |
| 46 | #:use-module (gnu packages compression) |
| 47 | #:use-module (gnu packages xml) |
| 48 | #:use-module (gnu packages linux) |
| 49 | #:use-module (gnu packages ncurses) |
| 50 | #:use-module (gnu packages patchutils) |
| 51 | #:use-module (gnu packages pdf) |
| 52 | #:use-module (gnu packages photo) |
| 53 | #:use-module (gnu packages python) |
| 54 | #:use-module (gnu packages web) |
| 55 | #:use-module (gnu packages xorg)) |
| 56 | |
| 57 | (define-public poly2tri-c |
| 58 | (package |
| 59 | (name "poly2tri-c") |
| 60 | (version "0.1.0") |
| 61 | (source |
| 62 | (origin |
| 63 | (method url-fetch) |
| 64 | (uri |
| 65 | (string-append "https://storage.googleapis.com/" |
| 66 | "google-code-archive-source/v2/code.google.com/" |
| 67 | "poly2tri-c/source-archive.zip")) |
| 68 | (file-name |
| 69 | (string-append name "-" version ".zip")) |
| 70 | (sha256 |
| 71 | (base32 "17cw0zhbnf2gb59jm26z0wcarqgdwir9jr1fpi3v9lcvyb2s3mqj")))) |
| 72 | (build-system glib-or-gtk-build-system) |
| 73 | (outputs '("out" "doc")) |
| 74 | (arguments |
| 75 | `(#:configure-flags |
| 76 | (list |
| 77 | "--disable-static") |
| 78 | #:phases |
| 79 | (modify-phases %standard-phases |
| 80 | (add-after 'unpack 'disable-strict-rules |
| 81 | (lambda _ |
| 82 | (substitute* "configure.ac" |
| 83 | (("\\$CFLAGS -Wall -ansi -pedantic") |
| 84 | "$CFLAGS") |
| 85 | (("\\$CFLAGS -Werror") |
| 86 | "$CFLAGS")) |
| 87 | #t)) |
| 88 | (add-after 'disable-strict-rules 'fix-build-errors |
| 89 | (lambda _ |
| 90 | (substitute* "poly2tri-c/refine/Makefile.am" |
| 91 | (("cdt.c") |
| 92 | "rcdt.c") |
| 93 | (("cdt.h") |
| 94 | "rcdt.h") |
| 95 | (("utils.c") |
| 96 | "rutils.c") |
| 97 | (("utils.h") |
| 98 | "rutils.h")) |
| 99 | #t)) |
| 100 | (add-before 'bootstrap 'configure-later |
| 101 | (lambda _ |
| 102 | (setenv "NOCONFIGURE" "set") |
| 103 | #t)) |
| 104 | (add-after 'build 'generate-doc |
| 105 | (lambda _ |
| 106 | (invoke "doxygen") |
| 107 | #t)) |
| 108 | (add-after 'install 'install-doc |
| 109 | (lambda* (#:key outputs #:allow-other-keys) |
| 110 | (let* ((out (assoc-ref outputs "out")) |
| 111 | (doc (assoc-ref outputs "doc"))) |
| 112 | (copy-recursively |
| 113 | "doc" |
| 114 | (string-append doc "/share/doc/poly2tri-c")) |
| 115 | #t)))))) |
| 116 | (native-inputs |
| 117 | `(("autoconf" ,autoconf) |
| 118 | ("automake" ,automake) |
| 119 | ("doxygen" ,doxygen) |
| 120 | ("libtool" ,libtool) |
| 121 | ("pkg-config" ,pkg-config) |
| 122 | ("unzip" ,unzip) |
| 123 | ("which" ,which))) |
| 124 | (propagated-inputs |
| 125 | `(("glib" ,glib))) |
| 126 | (synopsis "2D constrained Delaunay triangulation library") |
| 127 | (description "Poly2Tri-C is a library for generating, refining and rendering |
| 128 | 2-Dimensional Constrained Delaunay Triangulations.") |
| 129 | (home-page "https://code.google.com/archive/p/poly2tri-c/") |
| 130 | (license license:bsd-3))) |
| 131 | |
| 132 | (define-public mrg |
| 133 | (package |
| 134 | (name "mrg") |
| 135 | (version "0.1.4") |
| 136 | (source |
| 137 | (origin |
| 138 | (method git-fetch) |
| 139 | (uri |
| 140 | (git-reference |
| 141 | (url "https://github.com/hodefoting/mrg.git") |
| 142 | (commit version))) |
| 143 | (file-name |
| 144 | (git-file-name name version)) |
| 145 | (sha256 |
| 146 | (base32 "106qhh0c11576cc5kh90ds0ram72d3r6n9sadw0y4krnhap6dvwk")))) |
| 147 | (build-system meson-build-system) |
| 148 | (arguments |
| 149 | `(#:glib-or-gtk? #t)) ; To wrap binaries and/or compile schemas |
| 150 | (native-inputs |
| 151 | `(("pkg-config" ,pkg-config))) |
| 152 | (propagated-inputs |
| 153 | `(("alsa" ,alsa-lib) |
| 154 | ("cairo" ,cairo) |
| 155 | ("gtk+" ,gtk+) |
| 156 | ("mmm" ,mmm) |
| 157 | ("x11" ,libx11))) |
| 158 | (synopsis "Microraptor GUI") |
| 159 | (description "MrG is is a C API for creating user interfaces. It can be |
| 160 | used as an application writing environment or as an interactive canvas for part |
| 161 | of a larger interface.") |
| 162 | (home-page "https://github.com/hodefoting/mrg") |
| 163 | (license license:lgpl2.0+))) |
| 164 | |
| 165 | (define-public babl |
| 166 | (package |
| 167 | (name "babl") |
| 168 | (version "0.1.78") |
| 169 | (source (origin |
| 170 | (method url-fetch) |
| 171 | (uri (list (string-append "https://download.gimp.org/pub/babl/" |
| 172 | (version-major+minor version) |
| 173 | "/babl-" version ".tar.xz") |
| 174 | (string-append "https://ftp.gtk.org/pub/babl/" |
| 175 | (version-major+minor version) |
| 176 | "/babl-" version ".tar.xz") |
| 177 | (string-append "ftp://ftp.gtk.org/pub/babl/" |
| 178 | (version-major+minor version) |
| 179 | "/babl-" version ".tar.xz"))) |
| 180 | (sha256 |
| 181 | (base32 |
| 182 | "0fjjfb0pbgimlqi7rk8cqz8pq595b7gw8nrpkxfmixdz6cv4km8p")))) |
| 183 | (build-system meson-build-system) |
| 184 | (arguments |
| 185 | `(#:configure-flags |
| 186 | (list "-Denable-gir=false"))) |
| 187 | (native-inputs |
| 188 | `(("pkg-config" ,pkg-config))) |
| 189 | (propagated-inputs |
| 190 | ;; Propagated to satisfy ‘babl.pc’. |
| 191 | `(("lcms" ,lcms))) |
| 192 | (home-page "http://gegl.org/babl/") |
| 193 | (synopsis "Image pixel format conversion library") |
| 194 | (description |
| 195 | "Babl is a dynamic, any-to-any pixel format translation library. |
| 196 | It allows converting between different methods of storing pixels, known as |
| 197 | @dfn{pixel formats}, that have different bit depths and other data |
| 198 | representations, color models, and component permutations. |
| 199 | |
| 200 | A vocabulary to formulate new pixel formats from existing primitives is |
| 201 | provided, as well as a framework to add new color models and data types.") |
| 202 | (license license:lgpl3+))) |
| 203 | |
| 204 | (define-public gegl |
| 205 | (package |
| 206 | (name "gegl") |
| 207 | (version "0.4.24") |
| 208 | (source (origin |
| 209 | (method url-fetch) |
| 210 | (uri (list (string-append "https://download.gimp.org/pub/gegl/" |
| 211 | (string-take version 3) |
| 212 | "/gegl-" version ".tar.xz") |
| 213 | (string-append "https://ftp.gtk.org/pub/gegl/" |
| 214 | (version-major+minor version) |
| 215 | "/gegl-" version ".tar.xz") |
| 216 | (string-append "ftp://ftp.gtk.org/pub/gegl/" |
| 217 | (version-major+minor version) |
| 218 | "/gegl-" version ".tar.xz"))) |
| 219 | (sha256 |
| 220 | (base32 |
| 221 | "0ji57s7cba94vzy49agn7x47ca61rccm6rif0cb0s6rl4ygljrbp")))) |
| 222 | (build-system meson-build-system) |
| 223 | (arguments |
| 224 | `(#:configure-flags |
| 225 | (list "-Dintrospection=false"))) |
| 226 | ;; These are propagated to satisfy 'gegl-0.4.pc'. |
| 227 | (propagated-inputs |
| 228 | `(("babl" ,babl) |
| 229 | ("glib" ,glib) |
| 230 | ("json-glib" ,json-glib))) |
| 231 | (inputs |
| 232 | `(("cairo" ,cairo) |
| 233 | ("pango" ,pango) |
| 234 | ("libpng" ,libpng) |
| 235 | ("libjpeg" ,libjpeg-turbo))) |
| 236 | (native-inputs |
| 237 | `(("pkg-config" ,pkg-config) |
| 238 | ("glib" ,glib "bin") ; for gtester |
| 239 | ("intltool" ,intltool))) |
| 240 | (home-page "http://gegl.org") |
| 241 | (synopsis "Graph based image processing framework") |
| 242 | (description "GEGL (Generic Graphics Library) provides infrastructure to |
| 243 | do demand based cached non destructive image editing on larger than RAM |
| 244 | buffers.") |
| 245 | ;; The library itself is licensed under LGPL while the sample commandline |
| 246 | ;; application and GUI binary gegl is licensed under GPL. |
| 247 | (license (list license:lgpl3+ license:gpl3+)))) |
| 248 | |
| 249 | (define-public gimp |
| 250 | (package |
| 251 | (name "gimp") |
| 252 | (version "2.10.20") |
| 253 | (source (origin |
| 254 | (method url-fetch) |
| 255 | (uri (string-append "https://download.gimp.org/pub/gimp/v" |
| 256 | (version-major+minor version) |
| 257 | "/gimp-" version ".tar.bz2")) |
| 258 | (sha256 |
| 259 | (base32 |
| 260 | "0g3vzh1bjffqx94mfghmwvkhncv71cgah2mnfx17q00s9f3rybz1")))) |
| 261 | (build-system gnu-build-system) |
| 262 | (outputs '("out" |
| 263 | "doc")) ; 9 MiB of gtk-doc HTML |
| 264 | (arguments |
| 265 | '(#:configure-flags |
| 266 | (list (string-append "--with-html-dir=" |
| 267 | (assoc-ref %outputs "doc") |
| 268 | "/share/gtk-doc/html") |
| 269 | |
| 270 | ;; Prevent the build system from running 'gtk-update-icon-cache' |
| 271 | ;; which is not needed during the build because Guix runs it at |
| 272 | ;; profile creation time. |
| 273 | "ac_cv_path_GTK_UPDATE_ICON_CACHE=true" |
| 274 | |
| 275 | ;; Disable automatic network request on startup to check for |
| 276 | ;; version updates. |
| 277 | "--disable-check-update" |
| 278 | |
| 279 | ;; ./configure requests not to annoy upstream with packaging bugs. |
| 280 | "--with-bug-report-url=https://bugs.gnu.org/guix") |
| 281 | #:phases |
| 282 | (modify-phases %standard-phases |
| 283 | (add-after 'install 'install-sitecustomize.py |
| 284 | ;; Install 'sitecustomize.py' into gimp's python directory to |
| 285 | ;; add pygobject and pygtk to pygimp's search path. |
| 286 | (lambda* (#:key outputs #:allow-other-keys) |
| 287 | (let* ((pythonpath (getenv "PYTHONPATH")) |
| 288 | (out (assoc-ref outputs "out")) |
| 289 | (sitecustomize.py |
| 290 | (string-append |
| 291 | out "/lib/gimp/2.0/python/sitecustomize.py"))) |
| 292 | (call-with-output-file sitecustomize.py |
| 293 | (lambda (port) |
| 294 | (format port "import site~%") |
| 295 | (format port "for dir in '~a'.split(':'):~%" pythonpath) |
| 296 | (format port " site.addsitedir(dir)~%"))))))))) |
| 297 | (inputs |
| 298 | `(("babl" ,babl) |
| 299 | ("glib" ,glib) |
| 300 | ("glib-networking" ,glib-networking) |
| 301 | ("libtiff" ,libtiff) |
| 302 | ("libwebp" ,libwebp) |
| 303 | ("libjpeg" ,libjpeg-turbo) |
| 304 | ("atk" ,atk) |
| 305 | ("gexiv2" ,gexiv2) |
| 306 | ("gtk+" ,gtk+-2) |
| 307 | ("libmypaint" ,libmypaint) |
| 308 | ("mypaint-brushes" ,mypaint-brushes-1.3) |
| 309 | ("exif" ,libexif) ; optional, EXIF + XMP support |
| 310 | ("lcms" ,lcms) ; optional, color management |
| 311 | ("librsvg" ,librsvg) ; optional, SVG support |
| 312 | ("poppler" ,poppler) ; optional, PDF support |
| 313 | ("poppler-data" ,poppler-data) |
| 314 | ("python" ,python-2) ; optional, Python support |
| 315 | ("python2-pygtk" ,python2-pygtk) ; optional, Python support |
| 316 | ("gegl" ,gegl))) |
| 317 | (native-inputs |
| 318 | `(("glib:bin" ,glib "bin") ; for glib-compile-resources and gdbus-codegen |
| 319 | ("pkg-config" ,pkg-config) |
| 320 | ("intltool" ,intltool))) |
| 321 | (home-page "https://www.gimp.org") |
| 322 | (synopsis "GNU Image Manipulation Program") |
| 323 | (description |
| 324 | "GIMP is an application for image manipulation tasks such as photo |
| 325 | retouching, composition and authoring. It supports all common image formats |
| 326 | as well as specialized ones. It features a highly customizable interface |
| 327 | that is extensible via a plugin system.") |
| 328 | (license license:gpl3+))) ; some files are lgplv3 |
| 329 | |
| 330 | (define-public gimp-fourier |
| 331 | (package |
| 332 | (name "gimp-fourier") |
| 333 | (version "0.4.3-2") |
| 334 | (source (origin |
| 335 | (method url-fetch) |
| 336 | (uri (string-append "http://registry.gimp.org/files/fourier-" |
| 337 | version ".tar.gz")) |
| 338 | (sha256 |
| 339 | (base32 |
| 340 | "1rpacyad678lqgxa3hh2n0zpg4azs8dpa8q079bqsl12812k9184")))) |
| 341 | (build-system gnu-build-system) |
| 342 | (arguments |
| 343 | `(#:tests? #f ;no tests |
| 344 | #:phases |
| 345 | (modify-phases %standard-phases |
| 346 | ;; FIXME: The gegl package only installs "gegl-0.4.pc", but |
| 347 | ;; "gimp-2.0.pc" requires "gegl-0.3.pc", so we just copy it. |
| 348 | (replace 'configure |
| 349 | (lambda* (#:key inputs #:allow-other-keys) |
| 350 | (mkdir-p "tmppkgconfig") |
| 351 | (copy-file (string-append (assoc-ref inputs "gegl") |
| 352 | "/lib/pkgconfig/gegl-0.4.pc") |
| 353 | "tmppkgconfig/gegl-0.3.pc") |
| 354 | (setenv "PKG_CONFIG_PATH" |
| 355 | (string-append "tmppkgconfig:" |
| 356 | (or (getenv "PKG_CONFIG_PATH") ""))) |
| 357 | #t)) |
| 358 | (add-after 'unpack 'set-prefix |
| 359 | (lambda* (#:key outputs #:allow-other-keys) |
| 360 | ;; gimptool-2.0 does not allow us to install to any target |
| 361 | ;; directory. |
| 362 | (let ((target (string-append (assoc-ref outputs "out") |
| 363 | "/lib/gimp/" |
| 364 | (car (string-split ,(package-version gimp) #\.)) |
| 365 | ".0/plug-ins"))) |
| 366 | (substitute* "Makefile" |
| 367 | (("\\$\\(PLUGIN_INSTALL\\) fourier") |
| 368 | (string-append "cp fourier " target))) |
| 369 | (mkdir-p target)) |
| 370 | #t))))) |
| 371 | (inputs |
| 372 | `(("fftw" ,fftw) |
| 373 | ("gimp" ,gimp) |
| 374 | ;; needed by gimp-2.0.pc |
| 375 | ("gdk-pixbuf" ,gdk-pixbuf) |
| 376 | ("gegl" ,gegl) |
| 377 | ("cairo" ,cairo) |
| 378 | ("glib" ,glib) |
| 379 | ;; needed by gimpui-2.0.pc |
| 380 | ("gtk+" ,gtk+-2))) |
| 381 | (native-inputs |
| 382 | `(("pkg-config" ,pkg-config))) |
| 383 | (home-page "https://www.lprp.fr/gimp_plugin_en/#fourier") |
| 384 | (synopsis "GIMP plug-in to edit image in fourier space") |
| 385 | (description |
| 386 | "This package provides a simple plug-in to apply the fourier transform on |
| 387 | an image, allowing you to work with the transformed image inside GIMP. You |
| 388 | can draw or apply filters in fourier space and get the modified image with an |
| 389 | inverse fourier transform.") |
| 390 | (license license:gpl3+))) |
| 391 | |
| 392 | (define-public libmypaint |
| 393 | (package |
| 394 | (name "libmypaint") |
| 395 | (version "1.5.1") |
| 396 | (source (origin |
| 397 | (method url-fetch) |
| 398 | (uri (string-append "https://github.com/mypaint/libmypaint/" |
| 399 | "releases/download/v" version "/libmypaint-" |
| 400 | version ".tar.xz")) |
| 401 | (sha256 |
| 402 | (base32 |
| 403 | "0aqcv4fyscpfhknxgfpq0v84aj2nzigqvpi4zgv2zkl41h51by5f")))) |
| 404 | (build-system gnu-build-system) |
| 405 | (native-inputs |
| 406 | `(("intltool" ,intltool) |
| 407 | ("pkg-config" ,pkg-config))) |
| 408 | ;; As needed by 'libmypaint.pc'. |
| 409 | (propagated-inputs |
| 410 | `(("json-c" ,json-c) |
| 411 | ("gobject-introspection" ,gobject-introspection))) |
| 412 | (inputs |
| 413 | `(("glib" ,glib))) |
| 414 | (synopsis "Artistic brushes library") |
| 415 | (description "Libmypaint, also called \"brushlib\", is a library for making |
| 416 | brushstrokes which is used by MyPaint and GIMP.") |
| 417 | (home-page "http://mypaint.org") |
| 418 | (license license:isc))) |
| 419 | |
| 420 | (define-public mypaint-brushes |
| 421 | (package |
| 422 | (name "mypaint-brushes") |
| 423 | (version "2.0.2") |
| 424 | (source |
| 425 | (origin |
| 426 | (method git-fetch) |
| 427 | (uri (git-reference |
| 428 | (url "https://github.com/mypaint/mypaint-brushes") |
| 429 | (commit (string-append "v" version)))) |
| 430 | (file-name (git-file-name name version)) |
| 431 | (sha256 |
| 432 | (base32 "0kcqz13vzpy24dhmrx9hbs6s7hqb8y305vciznm15h277sabpmw9")))) |
| 433 | (build-system gnu-build-system) |
| 434 | (native-inputs |
| 435 | `(("autoconf" ,autoconf) |
| 436 | ("automake" ,automake))) |
| 437 | (synopsis "Default brushes for MyPaint") |
| 438 | (description "This package provides the default set of brushes for |
| 439 | MyPaint.") |
| 440 | (home-page "https://github.com/mypaint/mypaint-brushes/") |
| 441 | ;; Scripts are distributed under GPL2+ terms, brushes are provided as |
| 442 | ;; public domain or under CC0 terms. |
| 443 | (license (list license:gpl2+ license:cc0 license:public-domain)))) |
| 444 | |
| 445 | (define-public mypaint-brushes-1.3 |
| 446 | (package |
| 447 | (inherit mypaint-brushes) |
| 448 | (name "mypaint-brushes") |
| 449 | (version "1.3.1") |
| 450 | (source |
| 451 | (origin |
| 452 | (method git-fetch) |
| 453 | (uri (git-reference |
| 454 | (url "https://github.com/mypaint/mypaint-brushes") |
| 455 | (commit (string-append "v" version)))) |
| 456 | (file-name (git-file-name name version)) |
| 457 | (sha256 |
| 458 | (base32 "1c95l1vfz7sbrdlzrbz7h1p6s1k113kyjfd9wfnxlm0p6562cz3j")))))) |
| 459 | |
| 460 | (define-public gimp-resynthesizer |
| 461 | ;; GIMP does not respect any plugin search path environment variable, so after |
| 462 | ;; installation users have to edit their GIMP settings to include |
| 463 | ;; "$HOME/.guix-profile/lib/gimp/2.0/plug-ins/" in |
| 464 | ;; “Edit->Preferences->Folders->Plug Ins”. |
| 465 | (package |
| 466 | (name "gimp-resynthesizer") |
| 467 | (version "2.0.3") |
| 468 | (source |
| 469 | (origin |
| 470 | (method git-fetch) |
| 471 | (uri (git-reference |
| 472 | (url "https://github.com/bootchk/resynthesizer") |
| 473 | (commit (string-append "v" version)))) |
| 474 | (sha256 |
| 475 | (base32 |
| 476 | "1jwc8bhhm21xhrgw56nzbma6fwg59gc8anlmyns7jdiw83y0zx3j")) |
| 477 | (file-name (git-file-name name version)))) |
| 478 | (build-system gnu-build-system) |
| 479 | (arguments |
| 480 | `( ;; Turn off tests to avoid: |
| 481 | ;; make[1]: *** No rule to make target '../src/resynth-gui.c', needed by 'resynthesizer.pot'. Stop. |
| 482 | #:tests? #f |
| 483 | #:phases |
| 484 | (modify-phases %standard-phases |
| 485 | (add-after 'unpack 'set-env |
| 486 | (lambda _ |
| 487 | (setenv "CONFIG_SHELL" (which "sh")) |
| 488 | #t)) |
| 489 | (add-after 'configure 'set-prefix |
| 490 | ;; Install plugin under $prefix, not under GIMP's libdir. |
| 491 | (lambda* (#:key outputs #:allow-other-keys) |
| 492 | (let ((target (string-append (assoc-ref outputs "out") |
| 493 | "/lib/gimp/" |
| 494 | ,(version-major |
| 495 | (package-version gimp)) |
| 496 | ".0"))) |
| 497 | (substitute* (list "src/resynthesizer/Makefile" |
| 498 | "src/resynthesizer-gui/Makefile") |
| 499 | (("GIMP_LIBDIR = .*") |
| 500 | (string-append "GIMP_LIBDIR = " target "\n"))) |
| 501 | (mkdir-p target) |
| 502 | #t)))))) |
| 503 | (native-inputs |
| 504 | `(("autoconf" ,autoconf-wrapper) |
| 505 | ("automake" ,automake) |
| 506 | ("glib" ,glib "bin") ; glib-gettextize |
| 507 | ("intltool" ,intltool) |
| 508 | ("pkg-config" ,pkg-config))) |
| 509 | (inputs |
| 510 | `(("gimp" ,gimp) |
| 511 | ("gdk-pixbuf" ,gdk-pixbuf) ; needed by gimp-2.0.pc |
| 512 | ("cairo" ,cairo) |
| 513 | ("gegl" ,gegl) |
| 514 | ("gtk+" ,gtk+-2) ; needed by gimpui-2.0.pc |
| 515 | ("glib" ,glib))) |
| 516 | (home-page "https://github.com/bootchk/resynthesizer") |
| 517 | (synopsis "GIMP plugins for texture synthesis") |
| 518 | (description |
| 519 | "This package provides resynthesizer plugins for GIMP, which encompasses |
| 520 | tools for healing selections (content-aware fill), enlarging the canvas and |
| 521 | healing the border, increasing the resolution while adding detail, and |
| 522 | transferring the style of an image.") |
| 523 | (license license:gpl3+))) |