| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | |
| 12 | |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | |
| 20 | |
| 21 | |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | |
| 29 | |
| 30 | |
| 31 | |
| 32 | |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | |
| 46 | |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | |
| 52 | |
| 53 | |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | |
| 59 | |
| 60 | |
| 61 | |
| 62 | |
| 63 | |
| 64 | |
| 65 | |
| 66 |
|
| 67 | (define-module (gnu packages image)
|
| 68 | #:use-module (gnu packages)
|
| 69 | #:use-module (gnu packages algebra)
|
| 70 | #:use-module (gnu packages assembly)
|
| 71 | #:use-module (gnu packages autotools)
|
| 72 | #:use-module (gnu packages base)
|
| 73 | #:use-module (gnu packages bash)
|
| 74 | #:use-module (gnu packages boost)
|
| 75 | #:use-module (gnu packages build-tools)
|
| 76 | #:use-module (gnu packages check)
|
| 77 | #:use-module (gnu packages cmake)
|
| 78 | #:use-module (gnu packages compression)
|
| 79 | #:use-module (gnu packages cpp)
|
| 80 | #:use-module (gnu packages curl)
|
| 81 | #:use-module (gnu packages datastructures)
|
| 82 | #:use-module (gnu packages documentation)
|
| 83 | #:use-module (gnu packages fonts)
|
| 84 | #:use-module (gnu packages fontutils)
|
| 85 | #:use-module (gnu packages freedesktop)
|
| 86 | #:use-module (gnu packages gcc)
|
| 87 | #:use-module (gnu packages gettext)
|
| 88 | #:use-module (gnu packages ghostscript)
|
| 89 | #:use-module (gnu packages gimp)
|
| 90 | #:use-module (gnu packages gl)
|
| 91 | #:use-module (gnu packages glib)
|
| 92 | #:use-module (gnu packages gnome)
|
| 93 | #:use-module (gnu packages golang-build)
|
| 94 | #:use-module (gnu packages golang-graphics)
|
| 95 | #:use-module (gnu packages golang-xyz)
|
| 96 | #:use-module (gnu packages graphics)
|
| 97 | #:use-module (gnu packages gtk)
|
| 98 | #:use-module (gnu packages guile)
|
| 99 | #:use-module (gnu packages imagemagick)
|
| 100 | #:use-module (gnu packages linux)
|
| 101 | #:use-module (gnu packages lua)
|
| 102 | #:use-module (gnu packages man)
|
| 103 | #:use-module (gnu packages maths)
|
| 104 | #:use-module (gnu packages mcrypt)
|
| 105 | #:use-module (gnu packages mp3)
|
| 106 | #:use-module (gnu packages ncurses)
|
| 107 | #:use-module (gnu packages ocr)
|
| 108 | #:use-module (gnu packages perl)
|
| 109 | #:use-module (gnu packages photo)
|
| 110 | #:use-module (gnu packages pkg-config)
|
| 111 | #:use-module (gnu packages popt)
|
| 112 | #:use-module (gnu packages python)
|
| 113 | #:use-module (gnu packages python-build)
|
| 114 | #:use-module (gnu packages python-check)
|
| 115 | #:use-module (gnu packages python-xyz)
|
| 116 | #:use-module (gnu packages qt)
|
| 117 | #:use-module (gnu packages ragel)
|
| 118 | #:use-module (gnu packages sphinx)
|
| 119 | #:use-module (gnu packages sqlite)
|
| 120 | #:use-module (gnu packages swig)
|
| 121 | #:use-module (gnu packages textutils)
|
| 122 | #:use-module (gnu packages video)
|
| 123 | #:use-module (gnu packages web)
|
| 124 | #:use-module (gnu packages xdisorg)
|
| 125 | #:use-module (gnu packages xml)
|
| 126 | #:use-module (gnu packages xorg)
|
| 127 | #:use-module ((guix licenses) #:prefix license:)
|
| 128 | #:use-module (guix packages)
|
| 129 | #:use-module (guix gexp)
|
| 130 | #:use-module (guix download)
|
| 131 | #:use-module (guix git-download)
|
| 132 | #:use-module (guix utils)
|
| 133 | #:use-module (guix build-system gnu)
|
| 134 | #:use-module (guix build-system cmake)
|
| 135 | #:use-module (guix build-system copy)
|
| 136 | #:use-module (guix build-system go)
|
| 137 | #:use-module (guix build-system guile)
|
| 138 | #:use-module (guix build-system meson)
|
| 139 | #:use-module (guix build-system pyproject)
|
| 140 | #:use-module (guix build-system qt)
|
| 141 | #:use-module (guix build-system scons)
|
| 142 | #:use-module (guix deprecation)
|
| 143 | #:use-module (srfi srfi-1))
|
| 144 |
|
| 145 | (define-public converseen
|
| 146 | (package
|
| 147 | (name "converseen")
|
| 148 | (version "0.15.1.0")
|
| 149 | (source (origin
|
| 150 | (method git-fetch)
|
| 151 | (uri (git-reference
|
| 152 | (url "https://github.com/Faster3ck/Converseen")
|
| 153 | (commit (string-append "v" version))))
|
| 154 | (file-name (git-file-name name version))
|
| 155 | (sha256
|
| 156 | (base32
|
| 157 | "05nm6h4d2rq0kcf2maz95zvx8hd811wdqxxbzwahq1m2az1b11cn"))))
|
| 158 | (build-system qt-build-system)
|
| 159 | (arguments
|
| 160 | (list
|
| 161 | #:qtbase qtbase
|
| 162 | #:tests? #false |
| 163 | #:configure-flags #~(list "-DUSE_QT6=yes")
|
| 164 | #:phases
|
| 165 | #~(modify-phases %standard-phases
|
| 166 | (add-after 'unpack 'patch-source
|
| 167 | (lambda _
|
| 168 | |
| 169 | (substitute* "src/mainwindowimpl.cpp"
|
| 170 | (("up->checkForUpdates[(][)];") ""))
|
| 171 | (substitute* '("src/dialoginfo.cpp" "src/mainwindowimpl.cpp")
|
| 172 | (("QDesktopServices::openUrl.*;") ""))
|
| 173 | |
| 174 | |
| 175 | (substitute* "src/translator.cpp"
|
| 176 | (("QString\\(\"%1/share/converseen/loc\"\\).arg\\(rootPath\\)")
|
| 177 | (string-append "QString(\""
|
| 178 | #$output
|
| 179 | "/share/converseen/loc\")"))))))))
|
| 180 | (native-inputs
|
| 181 | (list pkg-config qttools))
|
| 182 | (inputs
|
| 183 | (list imagemagick qtbase qtwayland))
|
| 184 | (home-page "https://converseen.fasterland.net/")
|
| 185 | (synopsis "Batch image converter and resizer")
|
| 186 | (description
|
| 187 | "Converseen is an image batch conversion tool. You can resize and
|
| 188 | convert images in more than 100 different formats.")
|
| 189 | (license license:gpl3+)))
|
| 190 |
|
| 191 | (define-public didder
|
| 192 | (package
|
| 193 | (name "didder")
|
| 194 | |
| 195 | |
| 196 | |
| 197 | (properties '((commit . "408a18aef878b456fe5cdbec406070fd5bd5c2d2")
|
| 198 | (revision . "0")))
|
| 199 | (version (git-version "1.3.0"
|
| 200 | (assoc-ref properties 'revision)
|
| 201 | (assoc-ref properties 'commit)))
|
| 202 | (source
|
| 203 | (origin
|
| 204 | (method git-fetch)
|
| 205 | (uri (git-reference
|
| 206 | (url "https://github.com/makew0rld/didder")
|
| 207 | (commit (assoc-ref properties 'commit))))
|
| 208 | (file-name (git-file-name name version))
|
| 209 | (sha256
|
| 210 | (base32 "12vpxzn8p6ay5zqm9g83v0mf4i5nmm1xp13bhygs2yr24pbkkr24"))))
|
| 211 | (build-system go-build-system)
|
| 212 | (arguments
|
| 213 | (list
|
| 214 | #:install-source? #f
|
| 215 | #:build-flags
|
| 216 | #~(list (string-append "-ldflags="
|
| 217 | "-X main.builtBy=Guix"
|
| 218 | " -X main.version=" #$version
|
| 219 | " -X main.commit=" #$version))
|
| 220 | #:import-path "github.com/makeworld-the-better-one/didder"
|
| 221 | #:phases
|
| 222 | #~(modify-phases %standard-phases
|
| 223 | (add-after 'install 'install-man-page
|
| 224 | (lambda* (#:key import-path #:allow-other-keys)
|
| 225 | (let ((man1 (string-append #$output "/share/man/man1/"))
|
| 226 | (page (format #f "src/~a/didder.1" import-path)))
|
| 227 | (install-file page man1)))))))
|
| 228 | (native-inputs
|
| 229 | (list go-github-com-disintegration-imaging
|
| 230 | go-github-com-joshdk-quantize
|
| 231 | go-github-com-makeworld-the-better-one-dither-v2
|
| 232 | go-github-com-urfave-cli-v2
|
| 233 | go-golang-org-x-image))
|
| 234 | (home-page "https://github.com/makew0rld/didder")
|
| 235 | (synopsis "Image Dithering Utility")
|
| 236 | (description
|
| 237 | "Didder is a command-line image dithering tool. It can also be used
|
| 238 | for pipeline scripting. It is backed by
|
| 239 | @url{https://github.com/makeworld-the-better-one/dither, dithering library}.
|
| 240 | It provides various dithering algorithms and you can provide your own by
|
| 241 | specifying a matrix in json format")
|
| 242 | (license license:gpl3)))
|
| 243 |
|
| 244 | (define-public gradia
|
| 245 | (package
|
| 246 | (name "gradia")
|
| 247 | (version "1.13.0")
|
| 248 | (source
|
| 249 | (origin
|
| 250 | (method git-fetch)
|
| 251 | (uri (git-reference
|
| 252 | (url "https://github.com/AlexanderVanhee/Gradia")
|
| 253 | (commit (string-append "v" version))))
|
| 254 | (file-name (git-file-name name version))
|
| 255 | (sha256
|
| 256 | (base32 "00s6xj9crj5gkh233q98fmq67f41y877xgrn49cycwb3kybp237n"))))
|
| 257 | (build-system meson-build-system)
|
| 258 | (arguments
|
| 259 | (list
|
| 260 | #:imported-modules (append %meson-build-system-modules
|
| 261 | %pyproject-build-system-modules)
|
| 262 | #:modules '((guix build meson-build-system)
|
| 263 | ((guix build pyproject-build-system)
|
| 264 | #:prefix py:)
|
| 265 | (guix build utils))
|
| 266 | #:glib-or-gtk? #t
|
| 267 | #:phases
|
| 268 | #~(modify-phases %standard-phases
|
| 269 | (add-after 'unpack 'skip-gtk-update-icon-cache
|
| 270 | (lambda _
|
| 271 | (substitute* "meson.build"
|
| 272 | (("gtk_update_icon_cache: true")
|
| 273 | "gtk_update_icon_cache: false")
|
| 274 | (("update_desktop_database: true")
|
| 275 | "update_desktop_database: false"))))
|
| 276 | (add-after 'unpack 'set-tesseract-and-tessdata-path
|
| 277 | (lambda _
|
| 278 | (let* ((tesseract #$(this-package-input "tesseract-ocr"))
|
| 279 | (tesseract-bin (string-append tesseract "/bin/tesseract"))
|
| 280 | (tessdata (string-append tesseract "/share/tessdata")))
|
| 281 | (substitute* "meson.build"
|
| 282 | (("OCR_TESSERACT_CMD = '/app/bin/tesseract'")
|
| 283 | (format #f "OCR_TESSERACT_CMD = '~a'" tesseract-bin))
|
| 284 | (("OCR_ORIGINAL_TESSDATA_DIR = '/app/share/tessdata'")
|
| 285 | (format #f "OCR_ORIGINAL_TESSDATA_DIR = '~a'" tessdata))))))
|
| 286 | (add-after 'glib-or-gtk-wrap 'python-and-gi-wrap
|
| 287 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 288 | (wrap-program (string-append #$output "/bin/gradia")
|
| 289 | `("GUIX_PYTHONPATH" =
|
| 290 | (,(getenv "GUIX_PYTHONPATH") ,(py:site-packages inputs
|
| 291 | outputs)))
|
| 292 | `("GI_TYPELIB_PATH" =
|
| 293 | (,(getenv "GI_TYPELIB_PATH")))
|
| 294 | `("GDK_PIXBUF_MODULE_FILE" =
|
| 295 | (,(getenv "GDK_PIXBUF_MODULE_FILE")))))))))
|
| 296 | (inputs (list bash-minimal
|
| 297 | gtk
|
| 298 | gtksourceview
|
| 299 | libadwaita
|
| 300 | libportal
|
| 301 | libsoup
|
| 302 | python
|
| 303 | python-pillow
|
| 304 | python-pycairo
|
| 305 | python-pygobject
|
| 306 | python-pytesseract
|
| 307 | tesseract-ocr
|
| 308 | webp-pixbuf-loader))
|
| 309 | (native-inputs (list blueprint-compiler
|
| 310 | desktop-file-utils
|
| 311 | gettext-minimal
|
| 312 | `(,glib "bin")
|
| 313 | gobject-introspection
|
| 314 | pkg-config))
|
| 315 | (home-page "https://github.com/AlexanderVanhee/Gradia")
|
| 316 | (synopsis "Edit screenshots")
|
| 317 | (description
|
| 318 | "Gradia is a GTK 4 application for enhancing and preparing
|
| 319 | screenshots for blogs, social media, and documentation. It supports background
|
| 320 | customization, annotation tools (pen, arrow, text, highlight, stamp), padding,
|
| 321 | cropping, @acronym{OCR, optical character recognition} and various export formats.")
|
| 322 | (license license:gpl3+)))
|
| 323 |
|
| 324 | (define-public iqa
|
| 325 | (package
|
| 326 | (name "iqa")
|
| 327 | (version "1.1.2")
|
| 328 | (source
|
| 329 | (origin
|
| 330 | (method url-fetch)
|
| 331 | (uri
|
| 332 | (string-append "mirror://sourceforge/iqa/"
|
| 333 | version " Release" "/iqa_" version "_src.tar.gz"))
|
| 334 | (sha256
|
| 335 | (base32 "00mgwy031ammab6bwmd1whhvqv3fxy1cs1igabq0n3ag12zhjs77"))))
|
| 336 | (build-system gnu-build-system)
|
| 337 | (arguments
|
| 338 | `(#:test-target "test"
|
| 339 | #:phases
|
| 340 | (modify-phases %standard-phases
|
| 341 | (delete 'configure)
|
| 342 | (replace 'install
|
| 343 | (lambda* (#:key outputs #:allow-other-keys)
|
| 344 | (let* ((out (assoc-ref outputs "out"))
|
| 345 | (lib (string-append out "/lib")))
|
| 346 | (install-file "build/debug/libiqa.a" lib)
|
| 347 | #t))))))
|
| 348 | (synopsis "Image Quality Assessment")
|
| 349 | (description "IQA is a C library for objectively measuring image/video
|
| 350 | quality. It implements many popular algorithms, such as MS-SSIM, MS-SSIM*,
|
| 351 | SIMM, MSE, and PSNR. It is designed to be fast, accurate, and reliable. All
|
| 352 | code is Valgrind-clean and unit tested.")
|
| 353 | (home-page "https://sourceforge.net/projects/iqa/")
|
| 354 | (license license:bsd-4)))
|
| 355 |
|
| 356 | (define-public libdicom
|
| 357 | (package
|
| 358 | (name "libdicom")
|
| 359 | (version "1.2.0")
|
| 360 | (source
|
| 361 | (origin
|
| 362 | (method git-fetch)
|
| 363 | (uri (git-reference
|
| 364 | (url "https://github.com/ImagingDataCommons/libdicom")
|
| 365 | (commit (string-append "v" version))))
|
| 366 | (file-name (git-file-name name version))
|
| 367 | (sha256
|
| 368 | (base32 "0l1z8riv7lrw65nswq8lvyvnxn5vc06gydwc96gj3ywb1gcqv831"))))
|
| 369 | (build-system meson-build-system)
|
| 370 | (inputs (list check uthash))
|
| 371 | (native-inputs (list pkg-config))
|
| 372 | (home-page "https://github.com/ImagingDataCommons/libdicom")
|
| 373 | (synopsis "C library for reading DICOM files")
|
| 374 | (description
|
| 375 | "This package is a C library and a set of command-line tools for reading
|
| 376 | DICOM WSI files.")
|
| 377 | (license license:expat)))
|
| 378 |
|
| 379 | (define-public libpng
|
| 380 | (package
|
| 381 | (name "libpng")
|
| 382 | (version "1.6.39") |
| 383 | (source (origin
|
| 384 | (method url-fetch)
|
| 385 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
|
| 386 | version "/libpng-" version ".tar.xz")
|
| 387 | (string-append
|
| 388 | "ftp://ftp.simplesystems.org/pub/libpng/png/src"
|
| 389 | "/libpng16/libpng-" version ".tar.xz")
|
| 390 | (string-append
|
| 391 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
|
| 392 | "/libpng16/libpng-" version ".tar.xz")))
|
| 393 | (sha256
|
| 394 | (base32
|
| 395 | "0dv90dxvmqpk7mbywyjbz8lh08cv4b0ksqp1y62mzvmlf379cihz"))))
|
| 396 | (build-system gnu-build-system)
|
| 397 | (arguments
|
| 398 | `(#:configure-flags '("--disable-static")))
|
| 399 |
|
| 400 | |
| 401 | (propagated-inputs (list zlib))
|
| 402 |
|
| 403 | (synopsis "Library for handling PNG files")
|
| 404 | (description
|
| 405 | "Libpng is the official PNG (Portable Network Graphics) reference
|
| 406 | library. It supports almost all PNG features and is extensible.")
|
| 407 | (license license:zlib)
|
| 408 | (home-page "http://www.libpng.org/pub/png/libpng.html")))
|
| 409 |
|
| 410 | (define-public libpng-next
|
| 411 | (package
|
| 412 | (inherit libpng)
|
| 413 | (version "1.6.50")
|
| 414 | (source (origin
|
| 415 | (method url-fetch)
|
| 416 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
|
| 417 | version "/libpng-" version ".tar.xz")
|
| 418 | (string-append
|
| 419 | "ftp://ftp.simplesystems.org/pub/libpng/png/src"
|
| 420 | "/libpng16/libpng-" version ".tar.xz")
|
| 421 | (string-append
|
| 422 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
|
| 423 | "/libpng16/libpng-" version ".tar.xz")))
|
| 424 | (sha256
|
| 425 | (base32
|
| 426 | "01r34c31gq136jwshdfira44wbl6nb8qfgj4a4vam9r0hr8rdwsd"))))))
|
| 427 |
|
| 428 | (define-public libpng-apng
|
| 429 | |
| 430 | (package
|
| 431 | (name "libpng-apng")
|
| 432 | (version "1.6.39")
|
| 433 | (source
|
| 434 | (origin
|
| 435 | (method url-fetch)
|
| 436 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
|
| 437 | version "/libpng-" version ".tar.xz")
|
| 438 | (string-append
|
| 439 | "ftp://ftp.simplesystems.org/pub/libpng/png/src"
|
| 440 | "/libpng16/libpng-" version ".tar.xz")
|
| 441 | (string-append
|
| 442 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
|
| 443 | "/libpng16/libpng-" version ".tar.xz")))
|
| 444 | (sha256
|
| 445 | (base32 "0dv90dxvmqpk7mbywyjbz8lh08cv4b0ksqp1y62mzvmlf379cihz"))))
|
| 446 | (build-system gnu-build-system)
|
| 447 | (arguments
|
| 448 | `(#:modules ((guix build gnu-build-system)
|
| 449 | (guix build utils)
|
| 450 | (srfi srfi-1))
|
| 451 | #:phases
|
| 452 | (modify-phases %standard-phases
|
| 453 | (add-after 'unpack 'patch-apng
|
| 454 | (lambda* (#:key inputs #:allow-other-keys)
|
| 455 | (define (apply-patch file)
|
| 456 | (invoke "patch" "-p1" "--force"
|
| 457 | "--input" file))
|
| 458 | (let ((apng.gz (assoc-ref inputs "apng")))
|
| 459 | (format #t "Applying APNG patch '~a'...~%"
|
| 460 | apng.gz)
|
| 461 | (invoke "sh" "-c"
|
| 462 | (string-append "gunzip < " apng.gz " > the-patch"))
|
| 463 | (apply-patch "the-patch"))))
|
| 464 | (add-before 'configure 'no-checks
|
| 465 | (lambda _
|
| 466 | (substitute* "Makefile.in"
|
| 467 | (("^scripts/symbols.chk") "")
|
| 468 | (("check: scripts/symbols.chk") "")))))))
|
| 469 | (inputs
|
| 470 | `(("apng" ,(origin
|
| 471 | (method url-fetch)
|
| 472 | (uri
|
| 473 | (string-append "mirror://sourceforge/libpng-apng/libpng16/"
|
| 474 | version "/libpng-" version "-apng.patch.gz"))
|
| 475 | (sha256
|
| 476 | (base32
|
| 477 | "1z8cx011a2c7vagwgi92rbmky1wi8awmrdldqh9f5k80pbmbdi2a"))))))
|
| 478 | (native-inputs
|
| 479 | (list libtool))
|
| 480 | |
| 481 | (propagated-inputs
|
| 482 | (list zlib))
|
| 483 | (synopsis "APNG patch for libpng")
|
| 484 | (description
|
| 485 | "APNG (Animated Portable Network Graphics) is an unofficial
|
| 486 | extension of the APNG (Portable Network Graphics) format.
|
| 487 | APNG patch provides APNG support to libpng.")
|
| 488 | (home-page "https://sourceforge.net/projects/libpng-apng/")
|
| 489 | (license license:zlib)))
|
| 490 |
|
| 491 | |
| 492 | |
| 493 | (define-public libpng-apng-next
|
| 494 | (package
|
| 495 | (inherit libpng-apng)
|
| 496 | (version "1.6.50")
|
| 497 | (source
|
| 498 | (origin
|
| 499 | (method url-fetch)
|
| 500 | (uri (list (string-append "mirror://sourceforge/libpng/libpng16/"
|
| 501 | version "/libpng-" version ".tar.xz")
|
| 502 | (string-append
|
| 503 | "ftp://ftp.simplesystems.org/pub/libpng/png/src"
|
| 504 | "/libpng16/libpng-" version ".tar.xz")
|
| 505 | (string-append
|
| 506 | "ftp://ftp.simplesystems.org/pub/libpng/png/src/history"
|
| 507 | "/libpng16/libpng-" version ".tar.xz")))
|
| 508 | (sha256
|
| 509 | (base32
|
| 510 | "01r34c31gq136jwshdfira44wbl6nb8qfgj4a4vam9r0hr8rdwsd"))))
|
| 511 | (inputs
|
| 512 | (modify-inputs inputs
|
| 513 | (replace "apng"
|
| 514 | (origin
|
| 515 | (method url-fetch)
|
| 516 | (uri
|
| 517 | (string-append "mirror://sourceforge/libpng-apng/libpng16/"
|
| 518 | version "/libpng-" version "-apng.patch.gz"))
|
| 519 | (sha256
|
| 520 | (base32
|
| 521 | "0r811izi40qzy69jmhz0xlkpqlsjj89bang1b3ma6a5igh6dqzb8"))))))))
|
| 522 |
|
| 523 | (define-public pngcrush
|
| 524 | (package
|
| 525 | (name "pngcrush")
|
| 526 | (version "1.8.13")
|
| 527 | (source (origin
|
| 528 | (method url-fetch)
|
| 529 | (uri (string-append "mirror://sourceforge/pmt/pngcrush/"
|
| 530 | version "/pngcrush-" version "-nolib.tar.xz"))
|
| 531 | (sha256 (base32
|
| 532 | "0l43c59d6v9l0g07z3q3ywhb8xb3vz74llv3mna0izk9bj6aqkiv"))))
|
| 533 | (build-system gnu-build-system)
|
| 534 | (arguments
|
| 535 | '(#:tests? #f |
| 536 | #:phases
|
| 537 | (modify-phases %standard-phases
|
| 538 | (replace 'configure
|
| 539 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 540 | (substitute* "Makefile"
|
| 541 | (("^(PNG(INC|LIB) = )/usr/local/" line vardef)
|
| 542 | (string-append vardef (assoc-ref inputs "libpng") "/"))
|
| 543 | (("^(Z(INC|LIB) = )/usr/local/" line vardef)
|
| 544 | (string-append vardef (assoc-ref inputs "zlib") "/"))
|
| 545 | |
| 546 | (("\\$\\(DESTDIR\\)/usr/")
|
| 547 | (string-append (assoc-ref outputs "out") "/")))
|
| 548 | #t)))))
|
| 549 | (inputs
|
| 550 | (list libpng zlib))
|
| 551 | (home-page "https://pmt.sourceforge.io/pngcrush")
|
| 552 | (synopsis "Utility to compress PNG files")
|
| 553 | (description "Pngcrush optimizes @acronym{PNG, Portable Network Graphics}
|
| 554 | images. It can further losslessly compress them by as much as 40%.")
|
| 555 | (license license:zlib)))
|
| 556 |
|
| 557 | (define-public pngcheck
|
| 558 | (package
|
| 559 | (name "pngcheck")
|
| 560 | (version "3.0.3")
|
| 561 | (source (origin
|
| 562 | (method url-fetch)
|
| 563 | (uri (string-append
|
| 564 | "http://www.libpng.org/pub/png/src/pngcheck-" version
|
| 565 | ".tar.gz"))
|
| 566 | (sha256
|
| 567 | (base32
|
| 568 | "1rny14v57d2zvnqcqbh3m87mkya22qr2394fg7vm3xsacf8l8sn3"))))
|
| 569 | (build-system gnu-build-system)
|
| 570 | (arguments
|
| 571 | '(#:tests? #f |
| 572 | #:phases (modify-phases %standard-phases
|
| 573 | (delete 'configure)
|
| 574 | (replace 'build
|
| 575 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 576 | (invoke "make" "-f" "Makefile.unx")))
|
| 577 | (add-after 'build 'compress-man-pages
|
| 578 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 579 | (invoke "gzip" "pngcheck.1")
|
| 580 | (invoke "gzip" "gpl/pngsplit.1")
|
| 581 | (invoke "gzip" "gpl/png-fix-IDAT-windowsize.1")))
|
| 582 | (replace 'install
|
| 583 | (lambda* (#:key outputs #:allow-other-keys)
|
| 584 | (let* ((out (assoc-ref outputs "out"))
|
| 585 | (bin (string-append out "/bin/"))
|
| 586 | (man (string-append out "/share/man/man1/")))
|
| 587 | (install-file "pngcheck" bin)
|
| 588 | (install-file "pngcheck.1.gz" man)
|
| 589 | (install-file "pngsplit" bin)
|
| 590 | (install-file "gpl/pngsplit.1.gz" man)
|
| 591 | (install-file "png-fix-IDAT-windowsize" bin)
|
| 592 | (install-file "gpl/png-fix-IDAT-windowsize.1.gz" man)))))))
|
| 593 | (inputs (list zlib))
|
| 594 | (home-page "http://www.libpng.org/pub/png/apps/pngcheck.html")
|
| 595 | (synopsis "Print info and check PNG, JNG and MNG files")
|
| 596 | (description
|
| 597 | "@code{pngcheck} verifies the integrity of PNG, JNG and MNG files (by
|
| 598 | checking the internal 32-bit CRCs, a.k.a. checksums, and decompressing the image
|
| 599 | data); it can optionally dump almost all of the chunk-level information in the image
|
| 600 | in human-readable form. For example, it can be used to print the basic statistics
|
| 601 | about an image (dimensions, bit depth, etc.); to list the color and transparency info
|
| 602 | in its palette (assuming it has one); or to extract the embedded text annotations.
|
| 603 | This is a command-line program with batch capabilities (e.g. @code{pngcheck
|
| 604 | *.png}.)
|
| 605 |
|
| 606 | Also includes @code{pngsplit} which can split a PNG, MNG or JNG file into individual,
|
| 607 | numbered chunks, and @code{png-fix-IDAT-windowsize} that allows resetting first IDAT's
|
| 608 | zlib window-size bytes and fix up CRC to match.")
|
| 609 | |
| 610 | |
| 611 | (license (list license:x11 license:gpl2+))))
|
| 612 |
|
| 613 | (define-public pnglite
|
| 614 | (let ((commit "11695c56f7d7db806920bd9229b69f230e6ffb38")
|
| 615 | (revision "1"))
|
| 616 | (package
|
| 617 | (name "pnglite")
|
| 618 | |
| 619 | |
| 620 | |
| 621 | |
| 622 | (version (git-version "0.1.17" revision commit))
|
| 623 | (source (origin
|
| 624 | (method git-fetch)
|
| 625 | (uri (git-reference
|
| 626 | (url "https://github.com/dankar/pnglite")
|
| 627 | (commit commit)))
|
| 628 | (sha256
|
| 629 | (base32
|
| 630 | "1lmmkdxby5b8z9kx3zrpgpk33njpcf2xx8z9bgqag855sjsqbbby"))
|
| 631 | (file-name (git-file-name name version))))
|
| 632 | (build-system gnu-build-system)
|
| 633 | (arguments
|
| 634 | `(#:tests? #f |
| 635 | #:phases
|
| 636 | (modify-phases %standard-phases
|
| 637 | (delete 'configure)
|
| 638 | (replace 'build
|
| 639 | (lambda _
|
| 640 | |
| 641 | (let ((cflags '("-O2" "-g" "-fPIC"))
|
| 642 | (ldflags '("-shared")))
|
| 643 | (apply invoke
|
| 644 | `("gcc"
|
| 645 | "-o" "libpnglite.so"
|
| 646 | ,@cflags
|
| 647 | ,@ldflags
|
| 648 | "pnglite.c"))
|
| 649 | #t)))
|
| 650 | (replace 'install
|
| 651 | (lambda* (#:key outputs #:allow-other-keys)
|
| 652 | (let* ((out (assoc-ref outputs "out"))
|
| 653 | (lib (string-append out "/lib/"))
|
| 654 | (include (string-append out "/include/"))
|
| 655 | (doc (string-append out "/share/doc/"
|
| 656 | ,name "-" ,version "/")))
|
| 657 | (install-file "libpnglite.so" lib)
|
| 658 | (install-file "pnglite.h" include)
|
| 659 | (install-file "README.md" doc)
|
| 660 | #t))))))
|
| 661 | (inputs (list zlib))
|
| 662 | (home-page "https://github.com/dankar/pnglite")
|
| 663 | (synopsis "Pretty small png library")
|
| 664 | (description "A pretty small png library.
|
| 665 | Currently all documentation resides in @file{pnglite.h}.")
|
| 666 | (license license:zlib))))
|
| 667 |
|
| 668 | (define-public libimagequant
|
| 669 | (package
|
| 670 | (name "libimagequant")
|
| 671 | (version "2.12.6")
|
| 672 | (source
|
| 673 | (origin
|
| 674 | (method git-fetch)
|
| 675 | (uri (git-reference
|
| 676 | (url "https://github.com/ImageOptim/libimagequant")
|
| 677 | (commit version)))
|
| 678 | (file-name (git-file-name name version))
|
| 679 | (sha256
|
| 680 | (base32 "00w7fny3xf14cfyhbdnmqyh9ddqdh1irvgzxd35a2z65kp7vnvj0"))))
|
| 681 | (build-system gnu-build-system)
|
| 682 | (arguments
|
| 683 | '(#:tests? #f)) |
| 684 | (home-page "https://pngquant.org/lib/")
|
| 685 | (synopsis "Image palette quantization library")
|
| 686 | (description "libimagequant is a small, portable C library for
|
| 687 | high-quality conversion of RGBA images to 8-bit indexed-color (palette)
|
| 688 | images. This library can significantly reduces file sizes and powers pngquant
|
| 689 | and other PNG optimizers.")
|
| 690 | (license license:gpl3+)))
|
| 691 |
|
| 692 | (define-public pngquant
|
| 693 | (package
|
| 694 | (name "pngquant")
|
| 695 | (version "2.12.6")
|
| 696 | (source
|
| 697 | (origin
|
| 698 | (method git-fetch)
|
| 699 | (uri (git-reference
|
| 700 | (url "https://github.com/kornelski/pngquant")
|
| 701 | (commit version)))
|
| 702 | (file-name (git-file-name name version))
|
| 703 | (sha256
|
| 704 | (base32 "15hanshahxqs6s9fyc3aym02251dcys7bf78g3inp0y233amdbl3"))))
|
| 705 | (build-system gnu-build-system)
|
| 706 | (arguments
|
| 707 | `(#:test-target "test"
|
| 708 | #:configure-flags
|
| 709 | '("--with-openmp" "--with-lcms2")))
|
| 710 | (native-inputs
|
| 711 | (list pkg-config))
|
| 712 | (inputs
|
| 713 | (list libpng zlib lcms libimagequant))
|
| 714 | (home-page "https://pngquant.org/")
|
| 715 | (synopsis "Utility and library for lossy compressing PNG images")
|
| 716 | (description "pngquant is a PNG compressor that significantly reduces file
|
| 717 | sizes by converting images to a more efficient 8-bit PNG format with alpha
|
| 718 | channel (often 60-80% smaller than 24/32-bit PNG files). Compressed images
|
| 719 | are fully standards-compliant and are supported by all web browsers and
|
| 720 | operating systems.
|
| 721 |
|
| 722 | Features:
|
| 723 | @enumerate
|
| 724 | @item High-quality palette generation using a combination of vector
|
| 725 | quantization algorithms.
|
| 726 | @item Unique adaptive dithering algorithm that adds less noise to images
|
| 727 | than the standard Floyd-Steinberg.
|
| 728 | @item Easy to integrate with shell scripts, GUIs and server-side software.
|
| 729 | @item Fast mode for real-time processing/large numbers of images.
|
| 730 | @end enumerate")
|
| 731 | (license license:gpl3+)))
|
| 732 |
|
| 733 | (define-public ijg-libjpeg
|
| 734 | (package
|
| 735 | (name "libjpeg")
|
| 736 | (version "9f")
|
| 737 | (source (origin
|
| 738 | (method url-fetch)
|
| 739 | (uri (string-append "https://www.ijg.org/files/jpegsrc.v"
|
| 740 | version ".tar.gz"))
|
| 741 | (sha256 (base32
|
| 742 | "0nsn6bwc31clb2j435kff0a4k0xzsyiznwgvg6m9qimj1h8mqw04"))))
|
| 743 | (build-system gnu-build-system)
|
| 744 | (synopsis "Library for handling JPEG files")
|
| 745 | (description
|
| 746 | "Libjpeg implements JPEG image encoding, decoding, and transcoding.
|
| 747 | JPEG is a standardized compression method for full-color and gray-scale
|
| 748 | images.
|
| 749 | It also includes programs that provide conversion between the JPEG format and
|
| 750 | image files in PBMPLUS PPM/PGM, GIF, BMP, and Targa file formats, as well as
|
| 751 | lossless JPEG manipulations such as rotation, scaling or cropping:
|
| 752 | @enumerate
|
| 753 | @item cjpeg
|
| 754 | @item djpeg
|
| 755 | @item jpegtran
|
| 756 | @item rdjpgcom
|
| 757 | @item wrjpgcom
|
| 758 | @end enumerate")
|
| 759 | (license license:ijg)
|
| 760 | (home-page "https://www.ijg.org/")))
|
| 761 |
|
| 762 | (define-public libjxr
|
| 763 | (package
|
| 764 | (name "libjxr")
|
| 765 | (version "1.1")
|
| 766 | (source (origin
|
| 767 | |
| 768 | |
| 769 | (method url-fetch)
|
| 770 | (uri (string-append "mirror://debian/pool/main/j/jxrlib/jxrlib_"
|
| 771 | version ".orig.tar.gz"))
|
| 772 | (sha256
|
| 773 | (base32
|
| 774 | "00w3f3cmjsm3fiaxq5mxskmp5rl3mki8psrf9y8s1vqbg237na67"))
|
| 775 | (patch-flags '("-p1" "--binary"))
|
| 776 | (patches (search-patches "libjxr-fix-function-signature.patch"
|
| 777 | "libjxr-fix-typos.patch"))))
|
| 778 | (build-system gnu-build-system)
|
| 779 | (arguments
|
| 780 | `(#:make-flags
|
| 781 | (list ,(string-append "CC=" (cc-for-target))
|
| 782 | |
| 783 | |
| 784 | |
| 785 | |
| 786 | (string-append "CFLAGS=-I."
|
| 787 | " -Icommon/include"
|
| 788 | " -Iimage/sys"
|
| 789 | " -D__ANSI__"
|
| 790 | " -DDISABLE_PERF_MEASUREMENT"
|
| 791 | " -fPIC"
|
| 792 | " -w"
|
| 793 | " -O"
|
| 794 | " -Wno-error=implicit-function-declaration"
|
| 795 | " -Wno-error=incompatible-pointer-types"))
|
| 796 | #:tests? #f |
| 797 | #:phases
|
| 798 | (modify-phases %standard-phases
|
| 799 | (delete 'configure) |
| 800 | (add-after 'build 'build-shared-library
|
| 801 | (lambda _
|
| 802 | |
| 803 | |
| 804 | (invoke ,(cc-for-target) "-shared" "-fPIC" "-O"
|
| 805 | |
| 806 | "adapthuff.o" "image.o" "strcodec.o" "strPredQuant.o"
|
| 807 | "strTransform.o" "perfTimerANSI.o"
|
| 808 | |
| 809 | "decode.o" "postprocess.o" "segdec.o" "strdec.o"
|
| 810 | "strInvTransform.o" "strPredQuantDec.o" "JXRTranscode.o"
|
| 811 | |
| 812 | "encode.o" "segenc.o" "strenc.o" "strFwdTransform.o"
|
| 813 | "strPredQuantEnc.o"
|
| 814 | "-o" "libjpegxr.so")
|
| 815 | (invoke ,(cc-for-target) "-shared" "-fPIC" "-O"
|
| 816 | |
| 817 | "JXRGlue.o" "JXRMeta.o" "JXRGluePFC.o" "JXRGlueJxr.o"
|
| 818 | |
| 819 | "JXRTest.o" "JXRTestBmp.o" "JXRTestHdr.o" "JXRTestPnm.o"
|
| 820 | "JXRTestTif.o" "JXRTestYUV.o"
|
| 821 | "-o" "libjxrglue.so")))
|
| 822 | |
| 823 | (replace 'install
|
| 824 | (lambda* (#:key outputs #:allow-other-keys)
|
| 825 | (let* ((out (assoc-ref outputs "out"))
|
| 826 | (bin (string-append out "/bin"))
|
| 827 | (lib (string-append out "/lib"))
|
| 828 | (include (string-append out "/include/jxrlib")))
|
| 829 | (for-each (lambda (file)
|
| 830 | (install-file file include)
|
| 831 | (delete-file file))
|
| 832 | (append
|
| 833 | '("jxrgluelib/JXRGlue.h"
|
| 834 | "jxrgluelib/JXRMeta.h"
|
| 835 | "jxrtestlib/JXRTest.h"
|
| 836 | "image/sys/windowsmediaphoto.h")
|
| 837 | (find-files "common/include" "\\.h$")))
|
| 838 | (for-each (lambda (file)
|
| 839 | (install-file file lib)
|
| 840 | (delete-file file))
|
| 841 | (find-files "." "\\.(a|so)$"))
|
| 842 | (for-each (lambda (file)
|
| 843 | (install-file file bin)
|
| 844 | (delete-file file))
|
| 845 | '("JxrDecApp" "JxrEncApp")))
|
| 846 | #t)))))
|
| 847 | (synopsis "Implementation of the JPEG XR standard")
|
| 848 | (description "JPEG XR is an approved ISO/IEC International standard (its
|
| 849 | official designation is ISO/IEC 29199-2). This library is an implementation of that standard.")
|
| 850 | (license
|
| 851 | (license:non-copyleft
|
| 852 | "file://Makefile"
|
| 853 | "See the header of the Makefile in the distribution."))
|
| 854 | (home-page "https://jxrlib.codeplex.com/")))
|
| 855 |
|
| 856 | (define-public jhead
|
| 857 | (package
|
| 858 | (name "jhead")
|
| 859 | (version "3.08")
|
| 860 | (source
|
| 861 | (origin
|
| 862 | (method git-fetch)
|
| 863 | (uri (git-reference
|
| 864 | (url "https://github.com/Matthias-Wandel/jhead")
|
| 865 | (commit version)))
|
| 866 | (file-name (git-file-name name version))
|
| 867 | (sha256
|
| 868 | (base32 "0q9zc47ngnj4zfdpy43jcp2cbnmrlgg38aa7spv8zh94i75jwmvp"))))
|
| 869 | (build-system gnu-build-system)
|
| 870 | (arguments
|
| 871 | (list
|
| 872 | #:tests? #f |
| 873 | #:make-flags
|
| 874 | #~(list (string-append "CC=" #$(cc-for-target))
|
| 875 | (string-append "PREFIX=" #$output))
|
| 876 | #:phases
|
| 877 | #~(modify-phases %standard-phases
|
| 878 | (delete 'configure))))
|
| 879 | (home-page "https://github.com/Matthias-Wandel/jhead")
|
| 880 | (synopsis "Displays and manipulates EXIF header of JPEG files")
|
| 881 | (description
|
| 882 | "@command{jhead} is a simple command line tool for display and manipulate
|
| 883 | @acronym{EXIF, Exchangeable Image File Format} header data embedded in JPEG
|
| 884 | images.")
|
| 885 | (license license:public-domain)))
|
| 886 |
|
| 887 | (define-public jpegoptim
|
| 888 | (package
|
| 889 | (name "jpegoptim")
|
| 890 | (version "1.5.5")
|
| 891 | (source
|
| 892 | (origin
|
| 893 | (method git-fetch)
|
| 894 | (uri (git-reference
|
| 895 | (url "https://github.com/tjko/jpegoptim")
|
| 896 | (commit (string-append "v" version))))
|
| 897 | (file-name (git-file-name name version))
|
| 898 | (sha256
|
| 899 | (base32 "18zq7ada7n17vgkkcixpisxsbs7i8xp5qjp78hyyvmmb9dqy97fy"))))
|
| 900 | (build-system gnu-build-system)
|
| 901 | (arguments
|
| 902 | (list #:tests? #f))
|
| 903 | (inputs (list libjpeg-turbo))
|
| 904 | (synopsis "Optimize JPEG images")
|
| 905 | (description
|
| 906 | "jpegoptim provides lossless optimization (based on optimizing
|
| 907 | the Huffman tables) and \"lossy\" optimization based on setting
|
| 908 | maximum quality factor.")
|
| 909 | (license license:gpl3+)
|
| 910 | (home-page "https://www.kokkonen.net/tjko/projects.html#jpegoptim")))
|
| 911 |
|
| 912 | (define-public libicns
|
| 913 | (package
|
| 914 | (name "libicns")
|
| 915 | (version "0.8.1")
|
| 916 | (source (origin
|
| 917 | (method url-fetch)
|
| 918 | (uri (string-append
|
| 919 | "mirror://sourceforge/icns/"
|
| 920 | "libicns-" version ".tar.gz"))
|
| 921 | (sha256
|
| 922 | (base32
|
| 923 | "1hjm8lwap7bjyyxsyi94fh5817xzqhk4kb5y0b7mb6675xw10prk"))))
|
| 924 | (build-system gnu-build-system)
|
| 925 | (arguments
|
| 926 | (append
|
| 927 | (list
|
| 928 | #:configure-flags
|
| 929 | #~(list (string-append "CFLAGS= "
|
| 930 | |
| 931 | "-Wno-error=builtin-declaration-mismatch "
|
| 932 | "-Wno-error=implicit-function-declaration")))
|
| 933 | (if (and (target-riscv64?)
|
| 934 | (%current-target-system))
|
| 935 | (list #:phases
|
| 936 | #~(modify-phases %standard-phases
|
| 937 | (add-after 'unpack 'update-config-scripts
|
| 938 | (lambda* (#:key native-inputs inputs #:allow-other-keys)
|
| 939 | (for-each (lambda (file)
|
| 940 | (install-file
|
| 941 | (search-input-file
|
| 942 | (or native-inputs inputs)
|
| 943 | (string-append "/bin/" file)) "."))
|
| 944 | '("config.guess" "config.sub"))))))
|
| 945 | '())))
|
| 946 | (native-inputs
|
| 947 | (if (and (target-riscv64?)
|
| 948 | (%current-target-system))
|
| 949 | (list config)
|
| 950 | '()))
|
| 951 | (inputs
|
| 952 | (list libpng jasper))
|
| 953 | (home-page "https://icns.sourceforge.io/")
|
| 954 | (synopsis "Library for handling Mac OS icns resource files")
|
| 955 | (description
|
| 956 | "Libicns is a library for the manipulation of Mac OS IconFamily resource
|
| 957 | type files (ICNS). @command{icns2png} and @command{png2icns} are provided to
|
| 958 | convert between PNG and ICNS. @command{icns2png} will extract image files from
|
| 959 | ICNS files under names like \"Foo_48x48x32.png\" useful for installing for use
|
| 960 | with .desktop files. Additionally, @command{icontainer2png} is provided for
|
| 961 | extracting icontainer icon files.")
|
| 962 | (license (list license:lgpl2.1+ |
| 963 | license:lgpl2.0+ |
| 964 | license:gpl2+)))) |
| 965 |
|
| 966 | (define-public libtiff
|
| 967 | (package
|
| 968 | (name "libtiff")
|
| 969 | (version "4.7.2")
|
| 970 | (source
|
| 971 | (origin
|
| 972 | (method git-fetch)
|
| 973 | (uri (git-reference
|
| 974 | (url "https://gitlab.com/libtiff/libtiff.git")
|
| 975 | (commit (string-append "v" version))))
|
| 976 | (file-name (git-file-name name version))
|
| 977 | (sha256
|
| 978 | (base32
|
| 979 | "0q6q1kzam5fki7biip3yhrhfb8p8h87m03pajhrn6zcijn1yjhpb"))))
|
| 980 | (build-system gnu-build-system)
|
| 981 | (outputs '("out"
|
| 982 | "doc")) |
| 983 | (arguments
|
| 984 | (list #:configure-flags
|
| 985 | |
| 986 | #~(list (string-append "--with-docdir=" #$output:doc "/share/doc/"
|
| 987 | #$name "-" #$(package-version this-package))
|
| 988 | "--disable-static")))
|
| 989 | (native-inputs
|
| 990 | (list autoconf-2.72 automake libtool))
|
| 991 | (inputs
|
| 992 | (list libjpeg-turbo xz zlib))
|
| 993 | (synopsis "Library for handling TIFF files")
|
| 994 | (description
|
| 995 | "Libtiff provides support for the Tag Image File Format (TIFF), a format
|
| 996 | used for storing image data.
|
| 997 | Included are a library, libtiff, for reading and writing TIFF and a small
|
| 998 | collection of tools for doing simple manipulations of TIFF images.")
|
| 999 | (license (license:non-copyleft "file://COPYRIGHT"
|
| 1000 | "See COPYRIGHT in the distribution."))
|
| 1001 | (properties
|
| 1002 | '((upstream-name . "tiff")))
|
| 1003 | (home-page "http://www.simplesystems.org/libtiff/")))
|
| 1004 |
|
| 1005 | (define-public leptonica
|
| 1006 | (package
|
| 1007 | (name "leptonica")
|
| 1008 | (version "1.84.1")
|
| 1009 | (source
|
| 1010 | (origin
|
| 1011 | (method git-fetch)
|
| 1012 | (uri (git-reference
|
| 1013 | (url "https://github.com/DanBloomberg/leptonica")
|
| 1014 | (commit version)))
|
| 1015 | (file-name (git-file-name name version))
|
| 1016 | (sha256
|
| 1017 | (base32 "0b4ikf1p2ll4310n4dg5lg0b79wys71fb6nj22i7pz17wjdma0j8"))))
|
| 1018 | (build-system gnu-build-system)
|
| 1019 | (native-inputs
|
| 1020 | (list gnuplot |
| 1021 | autoconf
|
| 1022 | automake
|
| 1023 | libtool
|
| 1024 | pkg-config))
|
| 1025 | (inputs
|
| 1026 | (list giflib
|
| 1027 | libjpeg-turbo
|
| 1028 | libpng
|
| 1029 | libtiff
|
| 1030 | libwebp
|
| 1031 | openjpeg
|
| 1032 | zlib))
|
| 1033 | (arguments
|
| 1034 | (list
|
| 1035 | |
| 1036 | |
| 1037 | #:parallel-tests? #f
|
| 1038 | #:phases
|
| 1039 | #~(modify-phases %standard-phases
|
| 1040 | (add-after 'unpack 'patch-reg-wrapper
|
| 1041 | (lambda _
|
| 1042 | (substitute* "prog/reg_wrapper.sh"
|
| 1043 | ((" /bin/sh ")
|
| 1044 | (string-append " " (which "sh") " "))
|
| 1045 | (("which gnuplot")
|
| 1046 | "true"))))
|
| 1047 | (add-after 'install 'provide-absolute-giflib-reference
|
| 1048 | (lambda _
|
| 1049 | (let ((giflib #$(this-package-input "giflib")))
|
| 1050 | |
| 1051 | (with-directory-excursion (string-append #$output "/lib")
|
| 1052 | (substitute* '("libleptonica.la" "pkgconfig/lept.pc")
|
| 1053 | (("-lgif") (string-append "-L" giflib "/lib -lgif"))))))))))
|
| 1054 | (home-page "http://www.leptonica.com/")
|
| 1055 | (synopsis "Library and tools for image processing and analysis")
|
| 1056 | (description
|
| 1057 | "Leptonica is a C library and set of command-line tools for efficient
|
| 1058 | image processing and image analysis operations. It supports rasterop, affine
|
| 1059 | transformations, binary and grayscale morphology, rank order, and convolution,
|
| 1060 | seedfill and connected components, image transformations combining changes in
|
| 1061 | scale and pixel depth, and pixelwise masking, blending, enhancement, and
|
| 1062 | arithmetic ops.")
|
| 1063 | (license license:bsd-2)))
|
| 1064 |
|
| 1065 | (define-public jbig2dec
|
| 1066 | (package
|
| 1067 | (name "jbig2dec")
|
| 1068 | (version "0.19")
|
| 1069 | (source (origin
|
| 1070 | (method url-fetch)
|
| 1071 | (uri (string-append "https://github.com/ArtifexSoftware"
|
| 1072 | "/ghostpdl-downloads/releases/download"
|
| 1073 | "/gs9533/" name "-" version ".tar.gz"))
|
| 1074 | (sha256
|
| 1075 | (base32
|
| 1076 | "0dwa24kjqyg9hmm40fh048sdxfpnasz43l2rm8wlkw1qbdlpd517"))))
|
| 1077 | (build-system gnu-build-system)
|
| 1078 | (arguments '(#:configure-flags '("--disable-static")))
|
| 1079 | (native-inputs
|
| 1080 | (list python-minimal-wrapper)) |
| 1081 | (synopsis "Decoder of the JBIG2 image compression format")
|
| 1082 | (description
|
| 1083 | "JBIG2 is designed for lossy or lossless encoding of @code{bilevel} (1-bit
|
| 1084 | monochrome) images at moderately high resolution, and in particular scanned
|
| 1085 | paper documents. In this domain it is very efficient, offering compression
|
| 1086 | ratios on the order of 100:1.
|
| 1087 |
|
| 1088 | This is a decoder only implementation, and currently is in the alpha
|
| 1089 | stage, meaning it doesn't completely work yet. However, it is
|
| 1090 | maintaining parity with available encoders, so it is useful for real
|
| 1091 | work.")
|
| 1092 | (home-page "https://jbig2dec.com")
|
| 1093 | (license license:gpl2+)))
|
| 1094 |
|
| 1095 | (define-public jbigkit
|
| 1096 | (package
|
| 1097 | (name "jbigkit")
|
| 1098 | (version "2.1")
|
| 1099 | (source
|
| 1100 | (origin
|
| 1101 | (method url-fetch)
|
| 1102 | (uri (string-append "https://www.cl.cam.ac.uk/~mgk25/jbigkit/"
|
| 1103 | "download/jbigkit-" version ".tar.gz"))
|
| 1104 | (sha256
|
| 1105 | (base32 "0cnrcdr1dwp7h7m0a56qw09bv08krb37mpf7cml5sjdgpyv0cwfy"))
|
| 1106 | (modules '((guix build utils)))
|
| 1107 | (snippet
|
| 1108 | '(begin
|
| 1109 | |
| 1110 | (for-each delete-file-recursively
|
| 1111 | (list "contrib" "examples"))
|
| 1112 | #t))))
|
| 1113 | (build-system gnu-build-system)
|
| 1114 | (outputs (list "out" "pbmtools"))
|
| 1115 | (arguments
|
| 1116 | `(#:modules ((srfi srfi-26)
|
| 1117 | ,@%default-gnu-modules)
|
| 1118 | #:phases
|
| 1119 | (modify-phases %standard-phases
|
| 1120 | (delete 'configure) |
| 1121 | (replace 'install |
| 1122 | (lambda* (#:key outputs #:allow-other-keys)
|
| 1123 | (let* ((out (assoc-ref outputs "out"))
|
| 1124 | (lib (string-append out "/lib"))
|
| 1125 | (include (string-append out "/include")))
|
| 1126 | (with-directory-excursion "libjbig"
|
| 1127 | (for-each (cut install-file <> include)
|
| 1128 | (find-files "." "\\.h$"))
|
| 1129 | (for-each (cut install-file <> lib)
|
| 1130 | (find-files "." "\\.a$")))
|
| 1131 | #t)))
|
| 1132 | (add-after 'install 'install-pbmtools
|
| 1133 | (lambda* (#:key outputs #:allow-other-keys)
|
| 1134 | (let* ((out (assoc-ref outputs "pbmtools"))
|
| 1135 | (bin (string-append out "/bin"))
|
| 1136 | (man1 (string-append out "/share/man/man1"))
|
| 1137 | (man5 (string-append out "/share/man/man5")))
|
| 1138 | (with-directory-excursion "pbmtools"
|
| 1139 | (for-each (cut install-file <> bin)
|
| 1140 | (list "jbgtopbm" "jbgtopbm85"
|
| 1141 | "pbmtojbg" "pbmtojbg85"))
|
| 1142 |
|
| 1143 | (for-each (cut install-file <> man1)
|
| 1144 | (find-files "." "\\.1$"))
|
| 1145 | (for-each (cut install-file <> man5)
|
| 1146 | (find-files "." "\\.5$"))
|
| 1147 | #t)))))
|
| 1148 | #:test-target "test"
|
| 1149 | #:tests? #f)) |
| 1150 | (home-page "https://www.cl.cam.ac.uk/~mgk25/jbigkit/")
|
| 1151 | (synopsis "Lossless compression for bi-level high-resolution images")
|
| 1152 | (description
|
| 1153 | "JBIG-KIT implements the JBIG1 data compression standard (ITU-T T.82 and
|
| 1154 | ISO/IEC 11544:1993), designed for bi-level (one bit per pixel) images such as
|
| 1155 | black-and-white scanned documents. It is widely used in fax products, printer
|
| 1156 | firmware and drivers, document management systems, and imaging software.
|
| 1157 |
|
| 1158 | This package provides a static C library of (de)compression functions and some
|
| 1159 | simple command-line converters similar to those provided by netpbm.
|
| 1160 |
|
| 1161 | Two JBIG1 variants are available. One (@file{jbig.c}) implements nearly all
|
| 1162 | options of the standard but has to keep the full uncompressed image in memory.
|
| 1163 | The other (@file{jbig85.c}) implements just the ITU-T T.85 profile, with
|
| 1164 | memory management optimized for embedded and fax applications. It buffers
|
| 1165 | only a few lines of the uncompressed image in memory and is able to stream
|
| 1166 | images of initially unknown height.")
|
| 1167 | (license (list license:isc |
| 1168 | license:gpl2+)))) |
| 1169 |
|
| 1170 | (define-public sjpeg
|
| 1171 | |
| 1172 | (let ((commit "46da5aec5fce05faabf1facf0066e36e6b1c4dff")
|
| 1173 | (revision "0"))
|
| 1174 | (package
|
| 1175 | (name "sjpeg")
|
| 1176 | (version (git-version "0" revision commit))
|
| 1177 | (source
|
| 1178 | (origin
|
| 1179 | (method git-fetch)
|
| 1180 | (uri (git-reference
|
| 1181 | (url "https://github.com/webmproject/sjpeg")
|
| 1182 | (commit commit)))
|
| 1183 | (file-name (git-file-name name version))
|
| 1184 | (sha256
|
| 1185 | (base32 "0r496mp2ylisspwxl4883pzbl0l8qpscd1x9l7sb5nnmknawr868"))))
|
| 1186 | (build-system cmake-build-system)
|
| 1187 | (arguments
|
| 1188 | (list
|
| 1189 | #:phases
|
| 1190 | #~(modify-phases %standard-phases
|
| 1191 | (add-after 'unpack 'patch-cmake
|
| 1192 | (lambda _
|
| 1193 | |
| 1194 | (substitute* "CMakeLists.txt"
|
| 1195 | (("add_library\\(sjpeg " all)
|
| 1196 | (string-append all "SHARED ")))))
|
| 1197 | (add-before 'check 'patch-tests
|
| 1198 | (lambda _
|
| 1199 | (with-directory-excursion "../source/tests"
|
| 1200 | (substitute* '("test_cmd.sh" "test_png_jpg.sh")
|
| 1201 | (("\\.\\./examples") "../../build")))))
|
| 1202 | (replace 'check
|
| 1203 | (lambda* (#:key tests? #:allow-other-keys)
|
| 1204 | (when tests?
|
| 1205 | (with-directory-excursion "../source/tests"
|
| 1206 | (invoke "./test_cmd.sh")
|
| 1207 | (invoke "./test_png_jpg.sh"))))))))
|
| 1208 | (inputs (list freeglut libjpeg-turbo libpng zlib))
|
| 1209 | (home-page "https://github.com/webmproject/sjpeg")
|
| 1210 | (synopsis "Simple JPEG encoder")
|
| 1211 | (description
|
| 1212 | "sjpeg is a simple encoding library for encoding baseline JPEG files.
|
| 1213 | It is also a command-line tool that takes PNG or JPEG images as input to
|
| 1214 | produce JPEG files.")
|
| 1215 | (license license:asl2.0))))
|
| 1216 |
|
| 1217 | (define-public openjpeg-data
|
| 1218 | (package
|
| 1219 | (name "openjpeg-data")
|
| 1220 | (version "2021.09.26")
|
| 1221 | (source
|
| 1222 | (origin
|
| 1223 | (method git-fetch)
|
| 1224 | (uri
|
| 1225 | (git-reference
|
| 1226 | (url "https://github.com/uclouvain/openjpeg-data")
|
| 1227 | (commit "1f3d093030f9a0b43353ec6b48500f65786ff57a")))
|
| 1228 | (file-name (git-file-name name version))
|
| 1229 | (sha256
|
| 1230 | (base32 "13jpdaqk7mngk0xw6xbh9zgipip6n25spvqd97hwpfna1zyh8lzh"))))
|
| 1231 | (build-system copy-build-system)
|
| 1232 | (synopsis "Test files for OpenJPEG")
|
| 1233 | (description "OpenJPEG-Data contains all files required to run the openjpeg
|
| 1234 | test suite, including conformance tests (following Rec. ITU-T T.803 | ISO/IEC
|
| 1235 | 15444-4 procedures), non-regression tests and unit tests.")
|
| 1236 | (home-page "https://github.com/uclouvain/openjpeg-data")
|
| 1237 | (license license:bsd-2)))
|
| 1238 |
|
| 1239 | (define-public openjpeg
|
| 1240 | (package
|
| 1241 | (name "openjpeg")
|
| 1242 | (version "2.5.0")
|
| 1243 | (source
|
| 1244 | (origin
|
| 1245 | (method git-fetch)
|
| 1246 | (uri (git-reference
|
| 1247 | (url "https://github.com/uclouvain/openjpeg")
|
| 1248 | (commit (string-append "v" version))))
|
| 1249 | (file-name (git-file-name name version))
|
| 1250 | (sha256
|
| 1251 | (base32 "0xvcxlzqlylnjsyl1j64d7rgzv68ihm4qy6fpdrix3xzbqb3fjpz"))))
|
| 1252 | (build-system cmake-build-system)
|
| 1253 | (arguments
|
| 1254 | `(#:configure-flags
|
| 1255 | (list
|
| 1256 | "-DBUILD_STATIC_LIBS=OFF"
|
| 1257 | "-DBUILD_UNIT_TESTS=ON"
|
| 1258 | (string-append "-DOPJ_DATA_ROOT="
|
| 1259 | (assoc-ref %build-inputs "openjpeg-data")))
|
| 1260 | #:phases
|
| 1261 | (modify-phases %standard-phases
|
| 1262 | (add-after 'unpack 'disable-failing-tests
|
| 1263 | (lambda _
|
| 1264 | |
| 1265 | |
| 1266 | (substitute* "tests/CMakeLists.txt"
|
| 1267 | (("add_subdirectory\\(nonregression\\)")
|
| 1268 | ""))
|
| 1269 | |
| 1270 | (substitute* "tests/conformance/CMakeLists.txt"
|
| 1271 | |
| 1272 | (("numFileC1P0 RANGE 1 16") "numFileC1P0 RANGE 7 16")
|
| 1273 | |
| 1274 | (("numFileC1P1 RANGE 1 7") "numFileC1P1 1 6 7")
|
| 1275 | |
| 1276 | (("numFileJP2 RANGE 1 9") "numFileJP2 RANGE 4 9")
|
| 1277 | |
| 1278 | (("subsampling.*") "")
|
| 1279 | (("zoo.*") "")))))))
|
| 1280 | (native-inputs
|
| 1281 | (list openjpeg-data)) |
| 1282 | (inputs
|
| 1283 | (list lcms libpng libtiff zlib))
|
| 1284 | (synopsis "OPENJPEG Library and Applications")
|
| 1285 | (description "OpenJPEG is an implementation of JPEG 2000 codec written in C
|
| 1286 | language. It has been developed in order to promote the use of JPEG 2000, a
|
| 1287 | still-image compression standard from the Joint Photographic Experts Group
|
| 1288 | (JPEG). Since April 2015, it is officially recognized by ISO/IEC and ITU-T as a
|
| 1289 | JPEG 2000 Reference Software.")
|
| 1290 | (home-page "https://github.com/uclouvain/openjpeg")
|
| 1291 | (license license:bsd-2)))
|
| 1292 |
|
| 1293 | (define jp2k-test-codestreams
|
| 1294 | (origin
|
| 1295 | (method git-fetch)
|
| 1296 | (uri (git-reference
|
| 1297 | (url "https://github.com/aous72/jp2k_test_codestreams")
|
| 1298 | (commit "eda0844b9f3be47d9b64194bcea5eb1ac2285e39")))
|
| 1299 | (sha256
|
| 1300 | (base32 "1sci4a4dvgrgmrf942zdf0hqhcx30a5lffwfy6r3hya35l3q8q8f"))))
|
| 1301 |
|
| 1302 | (define-public openjph
|
| 1303 | (package
|
| 1304 | (name "openjph")
|
| 1305 | (version "0.27.3")
|
| 1306 | (source
|
| 1307 | (origin
|
| 1308 | (method git-fetch)
|
| 1309 | (uri (git-reference
|
| 1310 | (url "https://github.com/aous72/OpenJPH")
|
| 1311 | (commit version)))
|
| 1312 | (file-name (git-file-name name version))
|
| 1313 | (sha256
|
| 1314 | (base32 "1knygwn4bf6n53qr12w05yava7464x3c70rf5r20sz8adjcfccvx"))))
|
| 1315 | (build-system cmake-build-system)
|
| 1316 | (arguments
|
| 1317 | (list
|
| 1318 | #:configure-flags
|
| 1319 | #~(if #$(%current-target-system)
|
| 1320 | '()
|
| 1321 | '("-DOJPH_BUILD_TESTS=ON"))
|
| 1322 | #:phases
|
| 1323 | #~(modify-phases %standard-phases
|
| 1324 | (add-after 'unpack 'patch-cmake
|
| 1325 | (lambda _
|
| 1326 | (substitute* "tests/CMakeLists.txt"
|
| 1327 | (("^FetchContent_MakeAvailable\\(googletest\\)")
|
| 1328 | #$(if (%current-target-system)
|
| 1329 | ""
|
| 1330 | "find_package(GTest REQUIRED)"))
|
| 1331 | (("^FetchContent_MakeAvailable\\(jp2k_test_codestreams\\).*")
|
| 1332 | ""))))
|
| 1333 | #$@(if (%current-target-system)
|
| 1334 | #~()
|
| 1335 | #~((add-before 'check 'unpack-jp2k-test-codestreams
|
| 1336 | (lambda _
|
| 1337 | (copy-recursively #$jp2k-test-codestreams
|
| 1338 | "tests/jp2k_test_codestreams"))))))))
|
| 1339 | (native-inputs (if (%current-target-system)
|
| 1340 | '()
|
| 1341 | (list googletest)))
|
| 1342 | (inputs (list libtiff))
|
| 1343 | (home-page "https://github.com/aous72/OpenJPH")
|
| 1344 | (synopsis "JPEG2000 Part-15 (or JPH or HTJ2K) implementation")
|
| 1345 | (description
|
| 1346 | "OpenJPH is an implementation of @acronym{HTJ2K, High-throughput JPEG2000},
|
| 1347 | also known as JPH, JPEG2000 Part 15, ISO/IEC 15444-15, and ITU-T T.814.")
|
| 1348 | (license license:bsd-2)))
|
| 1349 |
|
| 1350 | (define-public openslide
|
| 1351 | (package
|
| 1352 | (name "openslide")
|
| 1353 | (version "4.0.0")
|
| 1354 | (source
|
| 1355 | (origin
|
| 1356 | (method git-fetch)
|
| 1357 | (uri (git-reference
|
| 1358 | (url "https://github.com/openslide/openslide")
|
| 1359 | (commit (string-append "v" version))))
|
| 1360 | (file-name (git-file-name name version))
|
| 1361 | (sha256
|
| 1362 | (base32 "00gc530g0lxm2lhwq249w97021w1v1y9ybqs2z5l1z922s15rhl2"))))
|
| 1363 | (build-system meson-build-system)
|
| 1364 | (inputs (list cairo
|
| 1365 | gdk-pixbuf
|
| 1366 | glib
|
| 1367 | libdicom
|
| 1368 | libjpeg-turbo
|
| 1369 | libpng
|
| 1370 | libtiff
|
| 1371 | libxml2
|
| 1372 | openjpeg
|
| 1373 | sqlite
|
| 1374 | zlib
|
| 1375 | zstd))
|
| 1376 | (native-inputs (list pkg-config))
|
| 1377 | (home-page "https://openslide.org/")
|
| 1378 | (synopsis "C library for reading slide image files")
|
| 1379 | (description
|
| 1380 | "OpenSlide is a C library for reading whole slide image files (also known
|
| 1381 | as virtual slides). It provides a consistent and simple API for reading files
|
| 1382 | from multiple vendors.")
|
| 1383 | (license license:lgpl2.1)))
|
| 1384 |
|
| 1385 | (define-public giflib
|
| 1386 | (package
|
| 1387 | (name "giflib")
|
| 1388 | (version "5.2.1")
|
| 1389 | (source (origin
|
| 1390 | (method url-fetch)
|
| 1391 | (uri (string-append "mirror://sourceforge/giflib/giflib-"
|
| 1392 | version ".tar.gz"))
|
| 1393 | (sha256
|
| 1394 | (base32
|
| 1395 | "1gbrg03z1b6rlrvjyc6d41bc8j1bsr7rm8206gb1apscyii5bnii"))))
|
| 1396 | (build-system gnu-build-system)
|
| 1397 | (outputs '("bin" |
| 1398 | "out")) |
| 1399 | (arguments
|
| 1400 | `(#:make-flags (list ,(string-append "CC=" (cc-for-target))
|
| 1401 | (string-append "PREFIX="
|
| 1402 | (assoc-ref %outputs "out"))
|
| 1403 | (string-append "BINDIR="
|
| 1404 | (assoc-ref %outputs "bin") "/bin"))
|
| 1405 | #:phases
|
| 1406 | (modify-phases %standard-phases
|
| 1407 | (add-after 'unpack 'disable-html-doc-gen
|
| 1408 | (lambda _
|
| 1409 | (substitute* "doc/Makefile"
|
| 1410 | (("^all: allhtml manpages") ""))
|
| 1411 | #t))
|
| 1412 | (delete 'configure)
|
| 1413 | (add-after 'install 'install-manpages
|
| 1414 | (lambda* (#:key outputs #:allow-other-keys)
|
| 1415 | (let* ((bin (assoc-ref outputs "bin"))
|
| 1416 | (man1dir (string-append bin "/share/man/man1")))
|
| 1417 | (mkdir-p man1dir)
|
| 1418 | (for-each (lambda (file)
|
| 1419 | (let ((base (basename file)))
|
| 1420 | (format #t "installing `~a' to `~a'~%"
|
| 1421 | base man1dir)
|
| 1422 | (copy-file file
|
| 1423 | (string-append
|
| 1424 | man1dir "/" base))))
|
| 1425 | (find-files "doc" "\\.1"))
|
| 1426 | #t))))))
|
| 1427 | (synopsis "Tools and library for working with GIF images")
|
| 1428 | (description
|
| 1429 | "GIFLIB is a library for reading and writing GIF images. It is API and
|
| 1430 | ABI compatible with libungif which was in wide use while the LZW compression
|
| 1431 | algorithm was patented. Tools are also included to convert, manipulate,
|
| 1432 | compose, and analyze GIF images.")
|
| 1433 | (home-page "http://giflib.sourceforge.net/")
|
| 1434 | (license license:x11)))
|
| 1435 |
|
| 1436 | (define-public libuemf
|
| 1437 | (package
|
| 1438 | (name "libuemf")
|
| 1439 | (version "0.2.7")
|
| 1440 | (source (origin
|
| 1441 | (method url-fetch)
|
| 1442 | (uri (string-append "mirror://sourceforge/libuemf/libUEMF-"
|
| 1443 | version ".tar.gz"))
|
| 1444 | (sha256
|
| 1445 | (base32
|
| 1446 | "05djs99vqf067x81xfpskh7a66y5x7b4mmjavybcy7swnm0swg7v"))))
|
| 1447 | (build-system cmake-build-system)
|
| 1448 | (arguments
|
| 1449 | `(#:phases
|
| 1450 | (modify-phases %standard-phases
|
| 1451 | |
| 1452 | (add-after 'unpack 'fix-CMakeLists.txt
|
| 1453 | (lambda _
|
| 1454 | (substitute* "CMakeLists.txt"
|
| 1455 | ((".*SET\\(CMAKE_INSTALL_PREFIX.*") ""))
|
| 1456 | #t))
|
| 1457 | (delete 'check)
|
| 1458 | (add-after 'install 'check
|
| 1459 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 1460 | (let* ((out (assoc-ref outputs "out"))
|
| 1461 | (bin (string-append out "/bin"))
|
| 1462 | (sources (string-append "../libUEMF-" ,version))
|
| 1463 | (drm-tools (assoc-ref inputs "drm-tools"))
|
| 1464 | (extract (string-append drm-tools "/bin/extract"))
|
| 1465 | (execinput (string-append drm-tools "/bin/execinput")))
|
| 1466 | (with-directory-excursion sources
|
| 1467 | (substitute* "testit.sh"
|
| 1468 | (("^EPATH=.*")
|
| 1469 | (format #f "EPATH=~a~%" bin))
|
| 1470 | (("`which diff`")
|
| 1471 | "diff")
|
| 1472 | (("^EXTRACT=.*")
|
| 1473 | (format #f "EXTRACT=~a~%" extract))
|
| 1474 | (("^EXECINPUT=.*")
|
| 1475 | (format #f "EXECINPUT=~a~%" execinput)))
|
| 1476 | (invoke "sh" "testit.sh"))))))))
|
| 1477 | (native-inputs (list drm-tools)) |
| 1478 | (home-page "https://libuemf.sourceforge.net/")
|
| 1479 | (synopsis "Library for working with WFM, EMF and EMF+ images")
|
| 1480 | (description "The libUEMF library is a portable C99 implementation for
|
| 1481 | reading and writing @acronym{WFM, Windows Metafile}, @acronym{EMF, Enhanced
|
| 1482 | Metafile}, and @acronym{EMF+, Enhanced Metafile Plus} files.")
|
| 1483 | (license license:gpl2+)))
|
| 1484 |
|
| 1485 | (define-public libungif
|
| 1486 | (package
|
| 1487 | (name "libungif")
|
| 1488 | (version "4.1.4")
|
| 1489 | (source (origin
|
| 1490 | (method url-fetch)
|
| 1491 | (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
|
| 1492 | "libungif-" version "/libungif-"
|
| 1493 | version ".tar.bz2"))
|
| 1494 | (sha256
|
| 1495 | (base32
|
| 1496 | "0cnksimmmjngdrys302ik1385sg1sj4i0gxivzldhgwd46n7x2kh"))))
|
| 1497 | (build-system gnu-build-system)
|
| 1498 | (inputs (list perl)) |
| 1499 | (home-page "http://giflib.sourceforge.net/")
|
| 1500 | (synopsis "GIF decompression library")
|
| 1501 | (description
|
| 1502 | "libungif is the old GIF decompression library by the GIFLIB project.")
|
| 1503 | (license license:expat)))
|
| 1504 |
|
| 1505 | (define-public imlib2
|
| 1506 | (package
|
| 1507 | (name "imlib2")
|
| 1508 | (version "1.12.6")
|
| 1509 | (source (origin
|
| 1510 | (method url-fetch)
|
| 1511 | (uri (string-append
|
| 1512 | "mirror://sourceforge/enlightenment/imlib2-src/" version
|
| 1513 | "/imlib2-" version ".tar.xz"))
|
| 1514 | (sha256
|
| 1515 | (base32
|
| 1516 | "13w5yahjpb2rvvjm697z2b1pypvhjn9sl6m857jj5icxyr99f3r5"))))
|
| 1517 | (build-system gnu-build-system)
|
| 1518 | (arguments
|
| 1519 | '(#:configure-flags (list "--disable-static")))
|
| 1520 | (native-inputs
|
| 1521 | (list pkg-config))
|
| 1522 | (inputs
|
| 1523 | (list bzip2
|
| 1524 | freetype
|
| 1525 | giflib
|
| 1526 | libid3tag
|
| 1527 | libjpeg-turbo
|
| 1528 | libpng
|
| 1529 | libtiff
|
| 1530 | libx11
|
| 1531 | libxext
|
| 1532 | libwebp))
|
| 1533 | (home-page "https://sourceforge.net/projects/enlightenment/")
|
| 1534 | (synopsis
|
| 1535 | "Loading, saving, rendering and manipulating image files")
|
| 1536 | (description
|
| 1537 | "Imlib2 is a library that does image file loading and saving as well as
|
| 1538 | rendering, manipulation, arbitrary polygon support, etc.
|
| 1539 |
|
| 1540 | It does ALL of these operations FAST. Imlib2 also tries to be highly
|
| 1541 | intelligent about doing them, so writing naive programs can be done easily,
|
| 1542 | without sacrificing speed.
|
| 1543 |
|
| 1544 | This is a complete rewrite over the Imlib 1.x series. The architecture is
|
| 1545 | more modular, simple, and flexible.")
|
| 1546 | (license license:imlib2)))
|
| 1547 |
|
| 1548 | (define-public imlib2-1.7
|
| 1549 | (package
|
| 1550 | (inherit imlib2)
|
| 1551 | (version "1.7.1")
|
| 1552 | (source (origin
|
| 1553 | (method url-fetch)
|
| 1554 | (uri (string-append
|
| 1555 | "mirror://sourceforge/enlightenment/imlib2-src/" version
|
| 1556 | "/imlib2-" version ".tar.bz2"))
|
| 1557 | (sha256
|
| 1558 | (base32
|
| 1559 | "01y45cdml2dr9cqgybrgxr86sd77d1qfa1gzclzy1j6bkminlfh3"))))))
|
| 1560 |
|
| 1561 | (define-public giblib
|
| 1562 | (package
|
| 1563 | (name "giblib")
|
| 1564 | (version "1.2.4")
|
| 1565 | (source (origin
|
| 1566 | (method url-fetch)
|
| 1567 | (uri (list
|
| 1568 | (string-append
|
| 1569 | "http://linuxbrit.co.uk/downloads/giblib-"
|
| 1570 | version ".tar.gz")
|
| 1571 | (string-append
|
| 1572 | "https://src.fedoraproject.org/repo/pkgs/giblib/giblib-"
|
| 1573 | version ".tar.gz/c810ef5389baf24882a1caca2954385e/giblib-"
|
| 1574 | version ".tar.gz")
|
| 1575 | (string-append
|
| 1576 | "https://sourceforge.net/projects/slackbuildsdirectlinks/"
|
| 1577 | "files/giblib/giblib-" version ".tar.gz")))
|
| 1578 | (sha256
|
| 1579 | (base32
|
| 1580 | "1b4bmbmj52glq0s898lppkpzxlprq9aav49r06j2wx4dv3212rhp"))))
|
| 1581 | (build-system gnu-build-system)
|
| 1582 | (inputs
|
| 1583 | (list libx11
|
| 1584 | |
| 1585 | imlib2-1.7))
|
| 1586 | (home-page
|
| 1587 | |
| 1588 | |
| 1589 | (string-append "https://web.archive.org/web/20140907071208/"
|
| 1590 | "https://linuxbrit.co.uk/software/"))
|
| 1591 | (synopsis "Wrapper library for imlib2")
|
| 1592 | (description
|
| 1593 | "Giblib is a simple library which wraps imlib2's context API, avoiding
|
| 1594 | all the context_get/set calls, adds fontstyles to the truetype renderer and
|
| 1595 | supplies a generic doubly-linked list and some string functions.")
|
| 1596 | |
| 1597 | |
| 1598 | (license (license:x11-style "file://COPYING"
|
| 1599 | "See 'COPYING' in the distribution."))))
|
| 1600 |
|
| 1601 | (define-public freeimage
|
| 1602 | (package
|
| 1603 | (name "freeimage")
|
| 1604 | (version "3.18.0")
|
| 1605 | (source (origin
|
| 1606 | (method url-fetch)
|
| 1607 | (uri (string-append
|
| 1608 | "mirror://sourceforge/freeimage/Source%20Distribution/"
|
| 1609 | version "/FreeImage"
|
| 1610 | (string-concatenate (string-split version #\.))
|
| 1611 | ".zip"))
|
| 1612 | (sha256
|
| 1613 | (base32
|
| 1614 | "1z9qwi9mlq69d5jipr3v2jika2g0kszqdzilggm99nls5xl7j4zl"))
|
| 1615 | (modules '((guix build utils)))
|
| 1616 | (snippet
|
| 1617 | '(begin
|
| 1618 | (for-each
|
| 1619 | (lambda (dir)
|
| 1620 | (delete-file-recursively (string-append "Source/" dir)))
|
| 1621 | '("LibJPEG" "LibOpenJPEG" "LibPNG" "LibRawLite"
|
| 1622 | "LibJXR" "LibWebP" "OpenEXR" "ZLib"))))
|
| 1623 | (patches
|
| 1624 | (append
|
| 1625 | (search-patches "freeimage-unbundle.patch"
|
| 1626 | "freeimage-libtiff-compat.patch"
|
| 1627 | "freeimage-CVE-2020-21428.patch"
|
| 1628 | "freeimage-CVE-2020-22524.patch"
|
| 1629 | "freeimage-libraw-0.21-compat.patch")
|
| 1630 | |
| 1631 | (list (origin
|
| 1632 | (method url-fetch)
|
| 1633 | (uri "https://raw.githubusercontent.com/archlinux\
|
| 1634 | /svntogit-community/ca3e6a52f5a46dec87cbf85e9d84fe370e282c8c/trunk\
|
| 1635 | /freeimage-libraw-0.20.patch")
|
| 1636 | (file-name "freeimage-libraw-compat.patch")
|
| 1637 | (sha256
|
| 1638 | (base32
|
| 1639 | "0cwjxjz0f4gs6igvwqg0p99mnrsrwzkal1l2n08yvz2xq9s5khki"))))))))
|
| 1640 | (build-system gnu-build-system)
|
| 1641 | (arguments
|
| 1642 | (list
|
| 1643 | #:phases
|
| 1644 | #~(modify-phases %standard-phases
|
| 1645 | |
| 1646 | |
| 1647 | (add-after 'unpack 'delete-unbuildable-files
|
| 1648 | (lambda _
|
| 1649 | (for-each (lambda (file)
|
| 1650 | (delete-file file)
|
| 1651 | (close (open file O_CREAT)))
|
| 1652 | '("Source/FreeImage/PluginG3.cpp"
|
| 1653 | "Source/FreeImageToolkit/JPEGTransform.cpp"))))
|
| 1654 | |
| 1655 | (replace 'configure
|
| 1656 | (lambda _
|
| 1657 | (invoke "sh" "gensrclist.sh")
|
| 1658 | (invoke "sh" "genfipsrclist.sh")))
|
| 1659 | (add-before 'build 'patch-makefile
|
| 1660 | (lambda* (#:key outputs #:allow-other-keys)
|
| 1661 | (substitute* "Makefile.gnu"
|
| 1662 | (("/usr") (assoc-ref outputs "out"))
|
| 1663 | (("-o root -g root") "")))))
|
| 1664 | #:make-flags
|
| 1665 | #~(let ((jxrlib (search-input-directory %build-inputs "include/jxrlib")))
|
| 1666 | (list (string-append "CC=" #$(cc-for-target))
|
| 1667 | |
| 1668 | |
| 1669 | (string-append "CFLAGS+=-O2 -fPIC -fvisibility=hidden "
|
| 1670 | "-fpermissive -I" jxrlib)))
|
| 1671 | #:tests? #f)) |
| 1672 | (native-inputs
|
| 1673 | (list pkg-config unzip))
|
| 1674 | (inputs
|
| 1675 | (list libjpeg-turbo
|
| 1676 | libjxr
|
| 1677 | libpng
|
| 1678 | libraw
|
| 1679 | libtiff
|
| 1680 | libwebp
|
| 1681 | openexr-2
|
| 1682 | openjpeg
|
| 1683 | zlib))
|
| 1684 | (synopsis "Library for handling popular graphics image formats")
|
| 1685 | (description
|
| 1686 | "FreeImage is a library for developers who would like to support popular
|
| 1687 | graphics image formats like PNG, BMP, JPEG, TIFF and others.")
|
| 1688 | (license (list license:gpl2+ license:gpl3+)) |
| 1689 | (home-page "https://freeimage.sourceforge.io/")))
|
| 1690 |
|
| 1691 | (define-public freeimagere
|
| 1692 | (let ((commit "97e3a992298d1b4c7d87c79ca3c8a735837b628e")
|
| 1693 | (revision "0"))
|
| 1694 | (package
|
| 1695 | (name "freeimagere")
|
| 1696 | (version (git-version "4.2.0" revision commit))
|
| 1697 | (source (origin
|
| 1698 | (method git-fetch)
|
| 1699 | (uri (git-reference
|
| 1700 | (url "https://github.com/agruzdev/FreeImageRe")
|
| 1701 | (commit commit)))
|
| 1702 | (file-name (git-file-name name version))
|
| 1703 | (sha256
|
| 1704 | (base32
|
| 1705 | "1lx94mgbwzhgi5hrj9dinaizyxlwvapfiz5c58bifkgpy3ab58an"))
|
| 1706 | (modules '((guix build utils)))
|
| 1707 | (snippet '(delete-file-recursively "3rdParty"))))
|
| 1708 | (build-system cmake-build-system)
|
| 1709 | |
| 1710 | (arguments
|
| 1711 | (list
|
| 1712 | #:tests? #f |
| 1713 | #:cmake cmake-minimal-4
|
| 1714 | #:configure-flags
|
| 1715 | #~(list
|
| 1716 | "-DUSE_SYSTEM_LIBS=ON"
|
| 1717 | "-DFREEIMAGE_WITH_LIBJXR=OFF" |
| 1718 | "-DFREEIMAGE_WITH_LIBOPENJPEG=OFF" |
| 1719 | "-DFREEIMAGE_WITH_LIBJPEGXL=OFF" |
| 1720 | "-DFREEIMAGE_WITH_LIBJPEG_TRANSFORMS=OFF" |
| 1721 | "-DFREEIMAGE_WITH_LIBTIFF=OFF"))) |
| 1722 | (native-inputs (list pkg-config))
|
| 1723 | (inputs
|
| 1724 | (list libheif
|
| 1725 | libjpeg-turbo
|
| 1726 | libpng
|
| 1727 | libraw
|
| 1728 | libwebp
|
| 1729 | openexr
|
| 1730 | openjph
|
| 1731 | yato
|
| 1732 | zlib))
|
| 1733 | (home-page "https://github.com/agruzdev/FreeImageRe")
|
| 1734 | (synopsis "Library for handling popular graphics image formats")
|
| 1735 | (description "FreeImage Re(surrected) is a fork of FreeImage, a library
|
| 1736 | that supports popular graphics image formats like PNG, BMP, JPEG, TIFF and
|
| 1737 | others.")
|
| 1738 | (license (list license:gpl3+ license:gpl2+))))) |
| 1739 |
|
| 1740 | (define-public ggg
|
| 1741 | (package
|
| 1742 | (name "ggg")
|
| 1743 | (version "0.6.1")
|
| 1744 | (source
|
| 1745 | (origin
|
| 1746 | (method git-fetch)
|
| 1747 | (uri (git-reference
|
| 1748 | (url "https://codeberg.org/jjba23/ggg.git")
|
| 1749 | (commit (string-append "v" version))))
|
| 1750 | (file-name (git-file-name name version))
|
| 1751 | (sha256
|
| 1752 | (base32 "0asrvc7fzyavv8xmrb0pbqqv35z8bhcl4si0xwj9xndbificx7li"))))
|
| 1753 | (build-system guile-build-system)
|
| 1754 | (arguments
|
| 1755 | (list
|
| 1756 | #:source-directory "src"
|
| 1757 | #:modules '((guix build guile-build-system)
|
| 1758 | (guix build utils)
|
| 1759 | (ice-9 match))
|
| 1760 | #:phases
|
| 1761 | #~(modify-phases %standard-phases
|
| 1762 | (add-before 'build 'install-program-files
|
| 1763 | (lambda _
|
| 1764 | (let ((bin (string-append #$output "/bin"))
|
| 1765 | (share (string-append #$output "/share")))
|
| 1766 | (install-file "resources/help.txt"
|
| 1767 | (string-append share "/resources"))
|
| 1768 | (copy-recursively "resources/svg-paths"
|
| 1769 | (string-append share "/resources/svg-paths"))
|
| 1770 | (install-file "scripts/ggg" bin)
|
| 1771 | (chmod (string-append bin "/ggg") #o755))))
|
| 1772 | (add-after 'unpack 'fix-paths
|
| 1773 | (lambda* (#:key inputs #:allow-other-keys)
|
| 1774 | (for-each (match-lambda
|
| 1775 | ((pattern program format-string)
|
| 1776 | (substitute* "scripts/ggg"
|
| 1777 | ((pattern)
|
| 1778 | (format #f format-string
|
| 1779 | (search-input-file inputs
|
| 1780 | (string-append "bin/"
|
| 1781 | program)))))))
|
| 1782 | '(("readlink -f " "readlink" "~s -f ")
|
| 1783 | ("realpath " "realpath" "~s ")
|
| 1784 | ("dirname " "dirname" "~s ")
|
| 1785 | ("getopt " "getopt" "~s ")
|
| 1786 | ("exec guile " "guile" "exec ~s ")))
|
| 1787 | (for-each (match-lambda
|
| 1788 | ((pattern program format-string)
|
| 1789 | (substitute* "src/ggg/main.scm"
|
| 1790 | ((pattern)
|
| 1791 | (format #f format-string
|
| 1792 | (search-input-file inputs
|
| 1793 | (string-append "bin/"
|
| 1794 | program)))))))
|
| 1795 | '(("convert -quality 100" "convert" "~a -quality 100"))))))))
|
| 1796 | (inputs
|
| 1797 | (list guile-3.0
|
| 1798 | bash-minimal
|
| 1799 | imagemagick
|
| 1800 | coreutils-minimal
|
| 1801 | util-linux))
|
| 1802 | (synopsis "GGG is a SVG image generator for project and web badges")
|
| 1803 | (description
|
| 1804 | "GGG (Guile Glyph Generator) is a command-line utility
|
| 1805 | that allows you to generate pretty images/badges which can be used for
|
| 1806 | your projects, announcing tech used, sponsoring and appreciating
|
| 1807 | other projects, distinguishing versions of things supported, etc.
|
| 1808 |
|
| 1809 | GGG is highly configurable, reads Scheme files where you define your tasks,
|
| 1810 | and supports badges between one and three parts. It leverages SVG generation
|
| 1811 | from Lisp and S-expressions, building pixel perfect badges.")
|
| 1812 | (home-page "https://codeberg.org/jjba23/ggg")
|
| 1813 | (license license:agpl3+)))
|
| 1814 |
|
| 1815 | (define-public vigra
|
| 1816 | (package
|
| 1817 | (name "vigra")
|
| 1818 | (version "1.12.2")
|
| 1819 | (source
|
| 1820 | (origin
|
| 1821 | (method git-fetch)
|
| 1822 | (uri (git-reference
|
| 1823 | (url "https://github.com/ukoethe/vigra")
|
| 1824 | (commit (string-append "Version-"
|
| 1825 | (string-join (string-split version #\.)
|
| 1826 | "-")))))
|
| 1827 | (file-name (git-file-name name version))
|
| 1828 | (sha256
|
| 1829 | (base32 "0x6qcsbjxp2alxqxsngs8a22fdi7pi2ylv9q4l1jgmypn0svkqqk"))))
|
| 1830 | (build-system cmake-build-system)
|
| 1831 | (arguments
|
| 1832 | (list
|
| 1833 | #:configure-flags
|
| 1834 | #~(list "-Wno-dev" |
| 1835 | (string-append
|
| 1836 | "-DVIGRANUMPY_INSTALL_DIR=" #$output "/lib/python"
|
| 1837 | #$(version-major+minor (package-version python))
|
| 1838 | "/site-packages")
|
| 1839 | |
| 1840 | "-DWITH_OPENEXR=1"
|
| 1841 | |
| 1842 | "-DCMAKE_C_FLAGS=-ffloat-store"
|
| 1843 | |
| 1844 | |
| 1845 | |
| 1846 | (string-append "-DCMAKE_CXX_FLAGS=-I"
|
| 1847 | (assoc-ref %build-inputs "ilmbase")
|
| 1848 | "/include/OpenEXR" " -ffloat-store")
|
| 1849 | |
| 1850 | "-DAUTOBUILD_TESTS=ON"
|
| 1851 | |
| 1852 | "-DAUTOEXEC_TESTS=OFF")))
|
| 1853 | (inputs (list boost
|
| 1854 | fftw
|
| 1855 | fftwf
|
| 1856 | hdf5
|
| 1857 | ilmbase |
| 1858 | |
| 1859 | libjpeg-turbo
|
| 1860 | libpng
|
| 1861 | libtiff
|
| 1862 | openexr-2
|
| 1863 | python-wrapper
|
| 1864 | python-numpy
|
| 1865 | zlib))
|
| 1866 | (native-inputs (list doxygen python-sphinx))
|
| 1867 | (synopsis "Computer vision library")
|
| 1868 | (description
|
| 1869 | "VIGRA stands for Vision with Generic Algorithms. It is an image
|
| 1870 | processing and analysis library that puts its main emphasis on customizable
|
| 1871 | algorithms and data structures. It is particularly strong for
|
| 1872 | multi-dimensional image processing.")
|
| 1873 | (license license:expat)
|
| 1874 | (home-page "https://ukoethe.github.io/vigra/")
|
| 1875 | (properties '((max-silent-time . 7200))))) |
| 1876 |
|
| 1877 | (define-public vigra-c
|
| 1878 | (let* ((commit "49f53191a12fe91d4e2fd177d22af167571c71d8")
|
| 1879 | (revision "2"))
|
| 1880 | (package
|
| 1881 | (name "vigra-c")
|
| 1882 | (version (git-version "0.0.0" revision commit))
|
| 1883 | (home-page "https://github.com/BSeppke/vigra_c")
|
| 1884 | (source (origin
|
| 1885 | (method git-fetch)
|
| 1886 | (uri (git-reference
|
| 1887 | (url home-page)
|
| 1888 | (commit commit)))
|
| 1889 | (sha256
|
| 1890 | (base32
|
| 1891 | "04ch1jhk4zjf1fpsyp8ldzjp8l9bx025zq0vskjx1clb3ncn305x"))
|
| 1892 | (file-name (git-file-name name version))))
|
| 1893 | (build-system cmake-build-system)
|
| 1894 | (arguments
|
| 1895 | `(#:tests? #f)) |
| 1896 | (native-inputs
|
| 1897 | (list doxygen))
|
| 1898 | (inputs
|
| 1899 | (list fftw fftwf hdf5 vigra))
|
| 1900 | (synopsis "C interface to the VIGRA computer vision library")
|
| 1901 | (description
|
| 1902 | "This package provides a C interface to the VIGRA C++ computer vision
|
| 1903 | library. It is designed primarily to ease the implementation of higher-level
|
| 1904 | language bindings to VIGRA.")
|
| 1905 | (license license:expat))))
|
| 1906 |
|
| 1907 | (define-public libwebp
|
| 1908 | (package
|
| 1909 | (name "libwebp")
|
| 1910 | (version "1.3.2")
|
| 1911 | (source
|
| 1912 | (origin
|
| 1913 | |
| 1914 | (method git-fetch)
|
| 1915 | (uri (git-reference
|
| 1916 | (url "https://chromium.googlesource.com/webm/libwebp")
|
| 1917 | (commit (string-append "v" version))))
|
| 1918 | (file-name (git-file-name name version))
|
| 1919 | (sha256
|
| 1920 | (base32
|
| 1921 | "1x37795gpc63g1ma9kqw4q3dikwhrjklixqzjjsj6viqksa19z41"))))
|
| 1922 | (build-system gnu-build-system)
|
| 1923 | (inputs
|
| 1924 | (list freeglut
|
| 1925 | giflib
|
| 1926 | libjpeg-turbo
|
| 1927 | libpng
|
| 1928 | libtiff))
|
| 1929 | (native-inputs
|
| 1930 | (list autoconf automake libtool))
|
| 1931 | (arguments
|
| 1932 | '(#:configure-flags '("--enable-libwebpmux"
|
| 1933 | "--enable-libwebpdemux"
|
| 1934 | "--enable-libwebpdecoder"
|
| 1935 | "--disable-static")))
|
| 1936 | (home-page "https://developers.google.com/speed/webp/")
|
| 1937 | (synopsis "Lossless and lossy image compression")
|
| 1938 | (description
|
| 1939 | "WebP is a new image format that provides lossless and lossy compression
|
| 1940 | for images. WebP lossless images are 26% smaller in size compared to
|
| 1941 | PNGs. WebP lossy images are 25-34% smaller in size compared to JPEG images at
|
| 1942 | equivalent SSIM index. WebP supports lossless transparency (also known as
|
| 1943 | alpha channel) with just 22% additional bytes. Transparency is also supported
|
| 1944 | with lossy compression and typically provides 3x smaller file sizes compared
|
| 1945 | to PNG when lossy compression is acceptable for the red/green/blue color
|
| 1946 | channels.")
|
| 1947 | (license license:bsd-3)))
|
| 1948 |
|
| 1949 | (define-public wuffs
|
| 1950 | (package
|
| 1951 | (name "wuffs")
|
| 1952 | (version "0.4.0-alpha.9")
|
| 1953 | (source
|
| 1954 | (origin
|
| 1955 | (method git-fetch)
|
| 1956 | (uri (git-reference
|
| 1957 | (url "https://github.com/google/wuffs")
|
| 1958 | (commit (string-append "v" version))))
|
| 1959 | (file-name (git-file-name name version))
|
| 1960 | (sha256
|
| 1961 | (base32 "12f5insi6gw9zpzr5k0kf8cdq6a1mcavbfakaafzp70qhhmskfsx"))))
|
| 1962 | (build-system copy-build-system)
|
| 1963 | (arguments
|
| 1964 | (list
|
| 1965 | #:install-plan
|
| 1966 | #~'( |
| 1967 | |
| 1968 | |
| 1969 | |
| 1970 | |
| 1971 | |
| 1972 | ("release/c/wuffs-v0.4.c" "include/")
|
| 1973 | ("release/c/README.md" "share/doc/wuffs/RELEASES.md"))
|
| 1974 | #:phases
|
| 1975 | #~(modify-phases %standard-phases
|
| 1976 | (add-before 'install 'check
|
| 1977 | (lambda* (#:key tests? #:allow-other-keys)
|
| 1978 | (when tests?
|
| 1979 | |
| 1980 | |
| 1981 | (substitute* "test/c/std/png.c"
|
| 1982 | (("wuffs-unsupported-snapshot\\.c")
|
| 1983 | "wuffs-v0.4.c"))
|
| 1984 | (invoke #$(cc-for-target)
|
| 1985 | "-std=c99"
|
| 1986 | "-Wall"
|
| 1987 | "-Werror"
|
| 1988 | "test/c/std/png.c"
|
| 1989 | "-o"
|
| 1990 | "png-test")
|
| 1991 | (invoke "./png-test")))))))
|
| 1992 | (home-page "https://github.com/google/wuffs")
|
| 1993 | (synopsis "Memory-safe file format library")
|
| 1994 | (description
|
| 1995 | "Wuffs is a memory-safe programming language and standard library for
|
| 1996 | wrangling untrusted binary data such as images and compressed files. This
|
| 1997 | package provides the upstream-generated, versioned single-file C libraries,
|
| 1998 | which can be used as header files or compiled as C or C++ implementations.")
|
| 1999 | (license (list license:asl2.0 license:expat))))
|
| 2000 |
|
| 2001 | (define-public libmng
|
| 2002 | (package
|
| 2003 | (name "libmng")
|
| 2004 | (version "2.0.3")
|
| 2005 | (source (origin
|
| 2006 | (method url-fetch)
|
| 2007 | (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
|
| 2008 | version "/" name "-" version ".tar.xz"))
|
| 2009 | (sha256
|
| 2010 | (base32
|
| 2011 | "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))
|
| 2012 | (build-system gnu-build-system)
|
| 2013 | (arguments
|
| 2014 | (if (and (target-riscv64?)
|
| 2015 | (%current-target-system))
|
| 2016 | (list #:phases
|
| 2017 | #~(modify-phases %standard-phases
|
| 2018 | (add-after 'unpack 'update-config-scripts
|
| 2019 | (lambda* (#:key inputs native-inputs #:allow-other-keys)
|
| 2020 | |
| 2021 | (for-each (lambda (file)
|
| 2022 | (install-file
|
| 2023 | (search-input-file
|
| 2024 | (or native-inputs inputs)
|
| 2025 | (string-append "/bin/" file)) "."))
|
| 2026 | '("config.guess" "config.sub"))))))
|
| 2027 | '()))
|
| 2028 | (native-inputs
|
| 2029 | (if (and (target-riscv64?)
|
| 2030 | (%current-target-system))
|
| 2031 | (list config)
|
| 2032 | '()))
|
| 2033 | (propagated-inputs
|
| 2034 | |
| 2035 | (list lcms libjpeg-turbo zlib))
|
| 2036 | (home-page "https://www.libmng.com/")
|
| 2037 | (synopsis "Library for handling MNG files")
|
| 2038 | (description
|
| 2039 | "Libmng is the MNG (Multiple-image Network Graphics) reference library.")
|
| 2040 | (license license:bsd-3)))
|
| 2041 |
|
| 2042 | (define-public exiv2
|
| 2043 | (package
|
| 2044 | (name "exiv2")
|
| 2045 | (version "0.28.8")
|
| 2046 | (source
|
| 2047 | (origin
|
| 2048 | (method git-fetch)
|
| 2049 | (uri (git-reference
|
| 2050 | (url "https://github.com/exiv2/exiv2")
|
| 2051 | (commit (string-append "v" version))))
|
| 2052 | (file-name (git-file-name name version))
|
| 2053 | (sha256
|
| 2054 | (base32 "1jj88acjqs8l2s8av1b2mmmh7aha9js7pmx0r288mnsfs2abw1zm"))))
|
| 2055 | (build-system cmake-build-system)
|
| 2056 | (arguments
|
| 2057 | (list
|
| 2058 | #:tests? #f |
| 2059 | #:configure-flags
|
| 2060 | #~(list "-DEXIV2_BUILD_UNIT_TESTS=ON"
|
| 2061 | |
| 2062 | |
| 2063 | "-DEXIV2_ENABLE_BMFF=ON")
|
| 2064 | #:modules '((guix build cmake-build-system)
|
| 2065 | ((guix build gnu-build-system) #:prefix gnu:)
|
| 2066 | (guix build utils))
|
| 2067 | #:phases
|
| 2068 | #~(modify-phases %standard-phases
|
| 2069 | (add-after 'unpack 'patch-gcc-reference
|
| 2070 | (lambda _
|
| 2071 | |
| 2072 | (substitute* "cmake/compilerFlags.cmake"
|
| 2073 | (("add_compile_options[(]-Wp,-D_GLIBCXX_ASSERTIONS[)]")
|
| 2074 | ""))))
|
| 2075 | (add-after 'install 'delete-static-libraries
|
| 2076 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2077 | (let* ((out (assoc-ref outputs "out"))
|
| 2078 | (lib (string-append out "/lib")))
|
| 2079 | (for-each delete-file (find-files lib "\\.a$")))))
|
| 2080 | (replace 'check
|
| 2081 | (lambda* (#:rest args)
|
| 2082 | (apply (assoc-ref gnu:%standard-phases 'check)
|
| 2083 | #:test-target "tests" args)))
|
| 2084 |
|
| 2085 | #$@(if (or (target-ppc64le?)
|
| 2086 | (target-aarch64?)
|
| 2087 | (target-riscv64?))
|
| 2088 | '((add-after 'unpack 'adjust-tests
|
| 2089 | (lambda _
|
| 2090 | |
| 2091 | |
| 2092 | |
| 2093 | |
| 2094 | (substitute* "tests/bugfixes/github/test_CVE_2018_12265.py"
|
| 2095 | (("\\$uncaught_exception \\$addition_overflow_message\n") "")
|
| 2096 | (("retval = \\[1\\]") "retval = [0]")))))
|
| 2097 | '()))))
|
| 2098 | (propagated-inputs
|
| 2099 | (list brotli expat libinih zlib))
|
| 2100 | (native-inputs
|
| 2101 | (list googletest python))
|
| 2102 | (home-page "https://www.exiv2.org/")
|
| 2103 | (synopsis "Library and command-line utility to manage image metadata")
|
| 2104 | (description
|
| 2105 | "Exiv2 is a C++ library and a command line utility to manage image
|
| 2106 | metadata. It provides fast and easy read and write access to the Exif, IPTC
|
| 2107 | and XMP metadata of images in various formats.")
|
| 2108 |
|
| 2109 | |
| 2110 | |
| 2111 | |
| 2112 | |
| 2113 | (license license:gpl2+)))
|
| 2114 |
|
| 2115 | (define-public exiv2-static
|
| 2116 | (package
|
| 2117 | (inherit exiv2)
|
| 2118 | (arguments
|
| 2119 | (substitute-keyword-arguments arguments
|
| 2120 | ((#:phases phases)
|
| 2121 | #~(modify-phases #$phases
|
| 2122 | (delete 'delete-static-libraries)))))))
|
| 2123 |
|
| 2124 | (define-public exiv2-0.27
|
| 2125 | (package/inherit exiv2
|
| 2126 | (name (package-name exiv2))
|
| 2127 | (version "0.27.7")
|
| 2128 | (source
|
| 2129 | (origin
|
| 2130 | (method git-fetch)
|
| 2131 | (uri (git-reference
|
| 2132 | (url "https://github.com/exiv2/exiv2")
|
| 2133 | (commit (string-append "v" version))))
|
| 2134 | (file-name (git-file-name name version))
|
| 2135 | (sha256
|
| 2136 | (base32 "1a3g7qly75zidj2xjfx1548h6az8sda79cpwvfknsjy3n8d5aay7"))))))
|
| 2137 |
|
| 2138 | (define-public jasper
|
| 2139 | (package
|
| 2140 | (name "jasper")
|
| 2141 | (version "2.0.33")
|
| 2142 | (source (origin
|
| 2143 | (method git-fetch)
|
| 2144 | (uri (git-reference
|
| 2145 | (url "https://github.com/mdadams/jasper")
|
| 2146 | (commit (string-append "version-" version))))
|
| 2147 | (file-name (git-file-name name version))
|
| 2148 | (sha256
|
| 2149 | (base32
|
| 2150 | "0p3fj89gkhd2ys5ci75cwb6p7rvb2pf52jd8c9d4g76qp846njnx"))))
|
| 2151 | (build-system cmake-build-system)
|
| 2152 | (inputs
|
| 2153 | (list libjpeg-turbo))
|
| 2154 | (synopsis "JPEG-2000 library")
|
| 2155 | (description "The JasPer Project is an initiative to provide a reference
|
| 2156 | implementation of the codec specified in the JPEG-2000 Part-1 standard (i.e.,
|
| 2157 | ISO/IEC 15444-1).")
|
| 2158 | (home-page "https://www.ece.uvic.ca/~frodo/jasper/")
|
| 2159 | (license (license:x11-style "file://LICENSE"))))
|
| 2160 |
|
| 2161 | (define-public zimg
|
| 2162 | (package
|
| 2163 | (name "zimg")
|
| 2164 | (version "3.0.5")
|
| 2165 | (source
|
| 2166 | (origin
|
| 2167 | (method git-fetch)
|
| 2168 | (uri (git-reference
|
| 2169 | (url "https://github.com/sekrit-twc/zimg")
|
| 2170 | (commit (string-append "release-" version))))
|
| 2171 | (file-name (git-file-name name version))
|
| 2172 | (sha256
|
| 2173 | (base32 "1vhwnhmrd217bf0iw8xvgqp762xnzjvac7w0nk58pj6f54fal90c"))))
|
| 2174 | (build-system gnu-build-system)
|
| 2175 | (native-inputs
|
| 2176 | (list autoconf automake libtool))
|
| 2177 | (synopsis "Scaling, colorspace conversion, and dithering library")
|
| 2178 | (description "Zimg implements the commonly required image processing basics
|
| 2179 | of scaling, colorspace conversion, and depth conversion. A simple API enables
|
| 2180 | conversion between any supported formats to operate with minimal knowledge from
|
| 2181 | the programmer.")
|
| 2182 | (home-page "https://github.com/sekrit-twc/zimg")
|
| 2183 | |
| 2184 | |
| 2185 | (license license:wtfpl2)))
|
| 2186 |
|
| 2187 | (define-public perceptualdiff
|
| 2188 | (package
|
| 2189 | (name "perceptualdiff")
|
| 2190 | (version "1.3")
|
| 2191 | (source
|
| 2192 | (origin
|
| 2193 | (method git-fetch)
|
| 2194 | (uri (git-reference
|
| 2195 | (url "https://github.com/myint/perceptualdiff")
|
| 2196 | (commit (string-append "v" version))))
|
| 2197 | (file-name (git-file-name name version))
|
| 2198 | (sha256
|
| 2199 | (base32 "0yys55f9i9g3wjjg0j2m0p0k21zwnid8520a8lrr30khm4k5gibp"))))
|
| 2200 | (build-system cmake-build-system)
|
| 2201 | (inputs (list freeimage))
|
| 2202 | (arguments
|
| 2203 | '(#:phases (modify-phases %standard-phases
|
| 2204 | (add-after 'unpack 'fix-tests
|
| 2205 | |
| 2206 | |
| 2207 | (lambda _
|
| 2208 | (substitute* "test/run_tests.bash"
|
| 2209 | (("../build") "../../build"))
|
| 2210 | #t)))))
|
| 2211 | (home-page "https://github.com/myint/perceptualdiff")
|
| 2212 | (synopsis "Perceptual image comparison utility")
|
| 2213 | (description "PerceptualDiff visually compares two images to determine
|
| 2214 | whether they look alike. It uses a computational model of the human visual
|
| 2215 | system to detect similarities. This allows it too see beyond irrelevant
|
| 2216 | differences in file encoding, image quality, and other small variations.")
|
| 2217 | (license license:gpl2+)))
|
| 2218 |
|
| 2219 | (define-public steghide
|
| 2220 | (package
|
| 2221 | (name "steghide")
|
| 2222 | (version "0.5.1")
|
| 2223 | (source (origin
|
| 2224 | (method url-fetch)
|
| 2225 | (uri (string-append "mirror://sourceforge/steghide/steghide/"
|
| 2226 | version "/steghide-" version ".tar.bz2"))
|
| 2227 | (sha256
|
| 2228 | (base32
|
| 2229 | "18bxlhbdc3zsmxj84i417xjh0q28kv26q449k23n0a72ldwziix2"))
|
| 2230 | (patches (list (search-patch "steghide-fixes.patch")))))
|
| 2231 | (build-system gnu-build-system)
|
| 2232 | (arguments
|
| 2233 | (list #:make-flags
|
| 2234 | #~(list "CXXFLAGS=-fpermissive") |
| 2235 | #:phases
|
| 2236 | #~(modify-phases %standard-phases
|
| 2237 | (add-before 'configure 'set-perl-search-path
|
| 2238 | (lambda _
|
| 2239 | |
| 2240 | (setenv "PERL5LIB"
|
| 2241 | (string-append (getcwd) "/tests:"
|
| 2242 | (getenv "PERL5LIB"))))))))
|
| 2243 | (native-inputs
|
| 2244 | (list gettext-minimal libtool perl))
|
| 2245 | (inputs
|
| 2246 | (list libjpeg-turbo libmhash libmcrypt zlib))
|
| 2247 | (home-page "https://steghide.sourceforge.net")
|
| 2248 | (synopsis "`Hide' (nonconfidential) data in image or audio files")
|
| 2249 | (description
|
| 2250 | "Steghide is a program to `hide' data in various kinds of image and audio
|
| 2251 | files. This practice is known as @dfn{steganography}, but the method used by
|
| 2252 | steghide is not very secure and should not be used where security is at stake.
|
| 2253 | Even if a password is used, steghide offers little plausible deniability.
|
| 2254 |
|
| 2255 | Nonetheless, neither color nor sample frequencies are changed, making the
|
| 2256 | embedding resistant against first-order statistical tests not aimed
|
| 2257 | specifically at this tool.")
|
| 2258 | (license license:gpl2+)))
|
| 2259 |
|
| 2260 | (define-public optipng
|
| 2261 | (package
|
| 2262 | (name "optipng")
|
| 2263 | (version "0.7.7")
|
| 2264 | (source
|
| 2265 | (origin
|
| 2266 | (method url-fetch)
|
| 2267 | (uri (string-append "http://prdownloads.sourceforge.net/optipng/optipng-"
|
| 2268 | version ".tar.gz"))
|
| 2269 | (sha256
|
| 2270 | (base32
|
| 2271 | "0lj4clb851fzpaq446wgj0sfy922zs5l5misbpwv6w7qrqrz4cjg"))
|
| 2272 | (modules '((guix build utils)))
|
| 2273 | (snippet
|
| 2274 | '(begin
|
| 2275 | (delete-file-recursively "src/libpng")
|
| 2276 | (delete-file-recursively "src/zlib")
|
| 2277 | #t))))
|
| 2278 | (build-system gnu-build-system)
|
| 2279 | (inputs
|
| 2280 | (list libpng zlib))
|
| 2281 | (arguments
|
| 2282 | '(#:phases
|
| 2283 | (modify-phases %standard-phases
|
| 2284 | (replace 'configure
|
| 2285 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2286 | |
| 2287 | (invoke "sh" "configure"
|
| 2288 | (string-append "--prefix=" (assoc-ref outputs "out"))
|
| 2289 | "-with-system-libs")
|
| 2290 | #t)))))
|
| 2291 | (synopsis "Optimizer that recompresses PNG image files to a smaller size")
|
| 2292 | (description "OptiPNG is a PNG optimizer that recompresses image
|
| 2293 | files to a smaller size, without losing any information. This program
|
| 2294 | also converts external formats (BMP, GIF, PNM and TIFF) to optimized
|
| 2295 | PNG, and performs PNG integrity checks and corrections.")
|
| 2296 | (home-page "https://optipng.sourceforge.net/")
|
| 2297 | (license license:zlib)))
|
| 2298 |
|
| 2299 | (define-public imgp
|
| 2300 | (package
|
| 2301 | (name "imgp")
|
| 2302 | |
| 2303 | (properties '((commit . "00b2b520964f22ca5b6e0c7d7cb07ce7a755cea7")
|
| 2304 | (revision . "0")))
|
| 2305 | (version (git-version "2.9"
|
| 2306 | (assoc-ref properties 'revision)
|
| 2307 | (assoc-ref properties 'commit)))
|
| 2308 | (source
|
| 2309 | (origin
|
| 2310 | (method git-fetch)
|
| 2311 | (uri (git-reference
|
| 2312 | (url "https://github.com/jarun/imgp")
|
| 2313 | (commit (assoc-ref properties 'commit))))
|
| 2314 | (file-name (git-file-name name version))
|
| 2315 | (sha256
|
| 2316 | (base32 "1rgm52agxrc8sirm72ksg6c2zpibjh4kvx1b2c59vx5inb33kfdh"))))
|
| 2317 | (build-system pyproject-build-system)
|
| 2318 | (arguments
|
| 2319 | (list #:test-backend #~'custom
|
| 2320 | |
| 2321 | #:test-flags #~(list "-m" "imgp" "--help")))
|
| 2322 | (native-inputs
|
| 2323 | (list python-setuptools))
|
| 2324 | (inputs
|
| 2325 | (list python-pillow))
|
| 2326 | (home-page "https://github.com/jarun/imgp")
|
| 2327 | (synopsis "High-performance CLI batch image resizer & rotator")
|
| 2328 | (description
|
| 2329 | "@code{imgp} is a command line image resizer and rotator for JPEG and PNG
|
| 2330 | images. It can resize (or thumbnail) and rotate thousands of images in a go
|
| 2331 | while saving significantly on storage.
|
| 2332 |
|
| 2333 | This package may optionally be built with @code{python-pillow-simd} in place
|
| 2334 | of @code{python-pillow} for SIMD parallelism.")
|
| 2335 | (license license:gpl3+)))
|
| 2336 |
|
| 2337 | (define-public pngsuite
|
| 2338 | (package
|
| 2339 | (name "pngsuite")
|
| 2340 | (version "2017jul19")
|
| 2341 | (source
|
| 2342 | (origin
|
| 2343 | (method url-fetch/tarbomb)
|
| 2344 | (uri (string-append "http://www.schaik.com/pngsuite2011/PngSuite-"
|
| 2345 | version ".tgz"))
|
| 2346 | (sha256
|
| 2347 | (base32
|
| 2348 | "1j7xgd9iffcnpphhzz9ld9ybrjmx9brhq0803g0450ssr52b5502"))))
|
| 2349 | (build-system gnu-build-system)
|
| 2350 | (arguments
|
| 2351 | '(#:tests? #f |
| 2352 | #:license-file-regexp "PngSuite.LICENSE"
|
| 2353 | #:phases
|
| 2354 | (modify-phases %standard-phases
|
| 2355 | (replace 'install
|
| 2356 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2357 | (let ((out (assoc-ref outputs "out")))
|
| 2358 | (copy-recursively "." (string-append out "/"))
|
| 2359 | #t)))
|
| 2360 | (delete 'build)
|
| 2361 | (delete 'configure))))
|
| 2362 | (home-page "http://www.schaik.com/pngsuite2011/pngsuite.html")
|
| 2363 | (synopsis "Example PNGs for use in test suites")
|
| 2364 | (description "Collection of graphics images created to test PNG
|
| 2365 | applications like viewers, converters and editors. As far as that is
|
| 2366 | possible, all formats supported by the PNG standard are represented.")
|
| 2367 | (license (license:fsdg-compatible "file://PngSuite.LICENSE" "Permission to
|
| 2368 | use, copy, modify and distribute these images for any purpose and without fee
|
| 2369 | is hereby granted."))))
|
| 2370 |
|
| 2371 | (define-public qoi
|
| 2372 | (let ((commit "6fff9b70dd79b12f808b0acc5cb44fde9998725e")
|
| 2373 | (revision "0"))
|
| 2374 | (package
|
| 2375 | (name "qoi")
|
| 2376 | (version (git-version "0.0.0" revision commit))
|
| 2377 | (source
|
| 2378 | (origin
|
| 2379 | (method git-fetch)
|
| 2380 | (uri (git-reference
|
| 2381 | (url "https://github.com/phoboslab/qoi")
|
| 2382 | (commit commit)))
|
| 2383 | (file-name (git-file-name name version))
|
| 2384 | (sha256
|
| 2385 | (base32 "078zasncyylgnwx6br82nkjssl82wygz6fh8zm65fbfpadzfa3x7"))))
|
| 2386 | (build-system copy-build-system)
|
| 2387 | (arguments
|
| 2388 | (list
|
| 2389 | #:install-plan
|
| 2390 | #~'(("qoi.h" "include/"))
|
| 2391 | #:tests? #f)) |
| 2392 | (home-page "https://qoiformat.org")
|
| 2393 | (synopsis "Library for the QOI image format")
|
| 2394 | (description
|
| 2395 | "This package provides a library for the QOI image format, offering
|
| 2396 | fast, lossless image compression.")
|
| 2397 | (license license:expat))))
|
| 2398 |
|
| 2399 | (define-public libjpeg-turbo
|
| 2400 | (package
|
| 2401 | (name "libjpeg-turbo")
|
| 2402 | (version "2.1.4")
|
| 2403 | (source (origin
|
| 2404 | (method url-fetch)
|
| 2405 | (uri (string-append "mirror://sourceforge/libjpeg-turbo/"
|
| 2406 | version "/libjpeg-turbo-" version ".tar.gz"))
|
| 2407 | (sha256
|
| 2408 | (base32
|
| 2409 | "0arl61ici38ann5xjidwdzkhmjdp1r95x4x4zinnh4qs2fhjdvfk"))))
|
| 2410 | (build-system cmake-build-system)
|
| 2411 | (native-inputs
|
| 2412 | (list nasm))
|
| 2413 | (arguments
|
| 2414 | (list #:configure-flags
|
| 2415 | #~'("-DCMAKE_INSTALL_LIBDIR:PATH=lib"
|
| 2416 | "-DENABLE_STATIC=0"
|
| 2417 | |
| 2418 | #$@(if (or (target-ppc32?)
|
| 2419 | (target-riscv64?))
|
| 2420 | '("-DFLOATTEST=NO")
|
| 2421 | '()))))
|
| 2422 | (home-page "https://libjpeg-turbo.org/")
|
| 2423 | (synopsis "SIMD-accelerated JPEG image handling library")
|
| 2424 | (description "libjpeg-turbo is a JPEG image codec that accelerates baseline
|
| 2425 | JPEG compression and decompression using SIMD instructions: MMX on x86, SSE2 on
|
| 2426 | x86-64, NEON on ARM, and AltiVec on PowerPC processors. Even on other systems,
|
| 2427 | its highly-optimized Huffman coding routines allow it to outperform libjpeg by
|
| 2428 | a significant amount.
|
| 2429 | libjpeg-turbo implements both the traditional libjpeg API and the less powerful
|
| 2430 | but more straightforward TurboJPEG API, and provides a full-featured Java
|
| 2431 | interface. It supports color space extensions that allow it to compress from
|
| 2432 | and decompress to 32-bit and big-endian pixel buffers (RGBX, XBGR, etc.).")
|
| 2433 | |
| 2434 | (license (list license:bsd-3 |
| 2435 | license:ijg |
| 2436 | license:zlib)))) |
| 2437 |
|
| 2438 | (define-public libjpeg-turbo-3
|
| 2439 | (package
|
| 2440 | (inherit libjpeg-turbo)
|
| 2441 | (name "libjpeg-turbo")
|
| 2442 | (version "3.1.2")
|
| 2443 | (source (origin
|
| 2444 | (method url-fetch)
|
| 2445 | (uri (string-append "https://github.com/" name "/" name
|
| 2446 | "/releases/download/" version "/" name
|
| 2447 | "-" version ".tar.gz"))
|
| 2448 | (sha256
|
| 2449 | (base32
|
| 2450 | "1kyhczwa17qp8ik3v876yjqsf4zrjj0z3464j04fak269cii404g"))))))
|
| 2451 |
|
| 2452 | (define-public nifticlib
|
| 2453 | |
| 2454 | (let* ((nifti-test-data-version "3.0.2")
|
| 2455 | (nifti-test-data-file (git-file-name "nifti-test-data"
|
| 2456 | nifti-test-data-version)))
|
| 2457 | (package
|
| 2458 | (name "nifticlib")
|
| 2459 | (version "3.0.1")
|
| 2460 | (source (origin
|
| 2461 | (method git-fetch)
|
| 2462 | (uri (git-reference
|
| 2463 | (url "https://github.com/NIFTI-Imaging/nifti_clib")
|
| 2464 | (commit (string-append "v" version))))
|
| 2465 | (file-name (git-file-name name version))
|
| 2466 | (sha256
|
| 2467 | (base32
|
| 2468 | "0hamm6nvbjdjjd5md4jahzvn5559frigxaiybnjkh59ckxwb1hy4"))))
|
| 2469 | (build-system cmake-build-system)
|
| 2470 | (arguments
|
| 2471 | (list
|
| 2472 | #:configure-flags
|
| 2473 | #~(append
|
| 2474 | (list "-DBUILD_SHARED_LIBS=ON"
|
| 2475 | "-DDOWNLOAD_TEST_DATA=OFF"
|
| 2476 | |
| 2477 | (string-append "-Dfetch_testing_data_SOURCE_DIR="
|
| 2478 | (canonicalize-path ".") "/source/test-data")
|
| 2479 | "-DUSE_CIFTI_CODE=ON")
|
| 2480 | |
| 2481 | (if #$(%current-target-system)
|
| 2482 | '()
|
| 2483 | (list "-DNIFTI_INSTALL_NO_DOCS=FALSE")))
|
| 2484 | #:phases
|
| 2485 | #~(modify-phases %standard-phases
|
| 2486 | (add-after 'unpack 'set-version
|
| 2487 | (lambda _
|
| 2488 | (substitute* "CMakeLists.txt"
|
| 2489 | (("0.0.0.0") #$version))))
|
| 2490 | (add-after 'unpack 'prepare-test-data
|
| 2491 | (lambda* (#:key tests? #:allow-other-keys)
|
| 2492 | (when tests?
|
| 2493 | (copy-recursively #$(this-package-native-input
|
| 2494 | nifti-test-data-file)
|
| 2495 | "test-data"))))
|
| 2496 | (add-after 'unpack 'patch-tests
|
| 2497 | (lambda* (#:key tests? #:allow-other-keys)
|
| 2498 | (when tests?
|
| 2499 | (substitute* (string-append "nifti2/nifti_regress_test/"
|
| 2500 | "cmake_testscripts/"
|
| 2501 | "install_linking_test.sh")
|
| 2502 | (("real_easy") "source/real_easy")))))
|
| 2503 | (delete 'check)
|
| 2504 | (add-after 'install 'check
|
| 2505 | (lambda args
|
| 2506 | |
| 2507 | (setenv "PATH" (string-append (getenv "PATH") ":"
|
| 2508 | #$output "/bin"))
|
| 2509 | (apply (assoc-ref %standard-phases 'check) args))))))
|
| 2510 | (inputs (list expat zlib))
|
| 2511 | (native-inputs
|
| 2512 | (append
|
| 2513 | (list
|
| 2514 | (origin
|
| 2515 | (method git-fetch)
|
| 2516 | (uri (git-reference
|
| 2517 | (url "https://github.com/NIFTI-Imaging/nifti-test-data")
|
| 2518 | (commit (string-append "v" nifti-test-data-version))))
|
| 2519 | (file-name nifti-test-data-file)
|
| 2520 | (sha256
|
| 2521 | (base32 "0jdm8amix7pvfb1zmrb89f7izji2s8fpbfncgamczsngc11yfgcp"))))
|
| 2522 | (if (%current-target-system)
|
| 2523 | '()
|
| 2524 | (list help2man))))
|
| 2525 | (synopsis
|
| 2526 | "C libraries for reading and writing files in @acronym{NIfTI, Neuroimaging
|
| 2527 | Informatics Technology Initiative} formats")
|
| 2528 | (description
|
| 2529 | "@code{Nifti_clib} is a set of I/O libraries for reading and writing files
|
| 2530 | in the nifti-1, nifti-2, and (to some degree) cifti file formats. These are
|
| 2531 | binary file formats for storing medical image data, e.g. @acronym{MRI, magnetic
|
| 2532 | resonance imaging} and @acronym{fMRI, functional MRI} brain images.")
|
| 2533 | (home-page "https://github.com/NIFTI-Imaging/nifti_clib")
|
| 2534 | (license license:public-domain))))
|
| 2535 |
|
| 2536 | (define-public niftilib
|
| 2537 | (deprecated-package "niftilib" nifticlib))
|
| 2538 |
|
| 2539 | (define-public mini
|
| 2540 | (package
|
| 2541 | (name "mini")
|
| 2542 | (version "0.9.17")
|
| 2543 | (source (origin
|
| 2544 | (method git-fetch)
|
| 2545 | (uri (git-reference
|
| 2546 | (url "https://github.com/pulzed/mINI")
|
| 2547 | (commit version)))
|
| 2548 | (file-name (git-file-name name version))
|
| 2549 | (sha256
|
| 2550 | (base32
|
| 2551 | "0n4c4dsmycp9pgaykc7rpgrgs23nb5gc9fb4agq95fdfpphdarm4"))))
|
| 2552 | (build-system gnu-build-system)
|
| 2553 | (arguments
|
| 2554 | (list #:phases
|
| 2555 | #~(modify-phases %standard-phases
|
| 2556 | (delete 'build)
|
| 2557 | (delete 'configure)
|
| 2558 | (replace 'check
|
| 2559 | (lambda* (#:key tests? #:allow-other-keys)
|
| 2560 | (when tests?
|
| 2561 | (with-directory-excursion "tests"
|
| 2562 | (for-each (lambda (test)
|
| 2563 | (let ((test-name (basename test
|
| 2564 | ".cpp")))
|
| 2565 | (invoke "./build.sh" test-name)
|
| 2566 | (invoke "./run.sh" test-name)))
|
| 2567 | (find-files "." ".cpp"))))))
|
| 2568 | (replace 'install
|
| 2569 | (lambda _
|
| 2570 | (install-file "src/mini/ini.h"
|
| 2571 | (string-append #$output "/include/mini")))))))
|
| 2572 | (home-page "https://github.com/pulzed/mINI")
|
| 2573 | (synopsis "INI file reader and writer header library")
|
| 2574 | (description
|
| 2575 | "This is a tiny, header-only C++ library for manipulating INI files.")
|
| 2576 | (license license:expat)))
|
| 2577 |
|
| 2578 | (define-public picket
|
| 2579 | (package
|
| 2580 | (name "picket")
|
| 2581 | (version "1.3")
|
| 2582 | (source (origin
|
| 2583 | (method git-fetch)
|
| 2584 | (uri (git-reference
|
| 2585 | (url "https://github.com/rajter/picket")
|
| 2586 | (commit (string-append "v" version))))
|
| 2587 | (file-name (git-file-name name version))
|
| 2588 | (sha256
|
| 2589 | (base32
|
| 2590 | "1zhpynyakjx9nc51b1j80b4y3138p3l380kp1cqmmjx2n9430144"))
|
| 2591 | (snippet '(begin
|
| 2592 | |
| 2593 | (delete-file "src/cfg/ini.h")))))
|
| 2594 | (native-inputs (list pkg-config))
|
| 2595 | (inputs (list gtkmm-3 mini))
|
| 2596 | (arguments
|
| 2597 | (list #:tests? #f
|
| 2598 | #:phases #~(modify-phases %standard-phases
|
| 2599 | (add-after 'unpack 'fix-mini-includes
|
| 2600 | (lambda _
|
| 2601 | (substitute* '("src/cfg/config.h"
|
| 2602 | "src/cfg/config.cpp")
|
| 2603 | (("#include \"ini.h\"")
|
| 2604 | "#include \"mini/ini.h\""))
|
| 2605 | (substitute* "src/main.cpp"
|
| 2606 | (("/usr")
|
| 2607 | #$output))))
|
| 2608 | (add-after 'unpack 'fix-cmake-paths
|
| 2609 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2610 | (substitute* "CMakeLists.txt"
|
| 2611 | (("src/cfg/ini.h")
|
| 2612 | (search-input-file inputs
|
| 2613 | "/include/mini/ini.h"))
|
| 2614 | (("/usr/")
|
| 2615 | #$output)))))))
|
| 2616 | (build-system cmake-build-system)
|
| 2617 | (home-page "https://github.com/rajter/picket")
|
| 2618 | (synopsis "Screen color picker with custom format output")
|
| 2619 | (description
|
| 2620 | "Picket is a screen color picker that includes a magnifier and supports
|
| 2621 | custom formats for representing color values..")
|
| 2622 | (license license:gpl3+)))
|
| 2623 |
|
| 2624 | (define-public gpick
|
| 2625 | (package
|
| 2626 | (name "gpick")
|
| 2627 | (version "0.2.6")
|
| 2628 | (source
|
| 2629 | (origin
|
| 2630 | (method git-fetch)
|
| 2631 | (uri (git-reference
|
| 2632 | (url "https://github.com/thezbyg/gpick")
|
| 2633 | (commit (string-append name "-" version))))
|
| 2634 | (file-name (git-file-name name version))
|
| 2635 | (sha256
|
| 2636 | (base32 "0nl89gca5nmbyycv5rl5bm6k7facapdk4pab9pl949aa3cjw9bk7"))))
|
| 2637 | (build-system scons-build-system)
|
| 2638 | (arguments
|
| 2639 | (list
|
| 2640 | #:tests? #f
|
| 2641 | #:scons-flags
|
| 2642 | #~(list (string-append "DESTDIR=" %output))
|
| 2643 | #:phases
|
| 2644 | #~(modify-phases %standard-phases
|
| 2645 | (add-before 'build 'fix-lua-reference
|
| 2646 | (lambda _
|
| 2647 | (substitute* "SConscript"
|
| 2648 | (("lua5.2")
|
| 2649 | "lua-5.2")))))))
|
| 2650 | (native-inputs (list boost-1.83 gettext-minimal pkg-config ragel))
|
| 2651 | (inputs (list expat gtk+-2 lua-5.2))
|
| 2652 | (home-page "http://www.gpick.org/")
|
| 2653 | (synopsis "Color picker")
|
| 2654 | (description "Gpick is an advanced color picker and palette editing tool.")
|
| 2655 | (license license:bsd-3)))
|
| 2656 |
|
| 2657 | (define-public libiptcdata
|
| 2658 | (package
|
| 2659 | (name "libiptcdata")
|
| 2660 | (version "1.0.5")
|
| 2661 | (source (origin
|
| 2662 | (method url-fetch)
|
| 2663 | (uri (string-append "https://github.com/ianw/libiptcdata"
|
| 2664 | "/releases/download/release_"
|
| 2665 | (string-join (string-split version #\.) "_")
|
| 2666 | "/" name "-" version ".tar.gz"))
|
| 2667 | (sha256
|
| 2668 | (base32
|
| 2669 | "17m2bscc76r1bymjgb44fbbfrdsjfqyb2ivg9wchyllm8pgx1560"))))
|
| 2670 | (build-system gnu-build-system)
|
| 2671 | (home-page "https://github.com/ianw/libiptcdata")
|
| 2672 | (synopsis "IPTC metadata manipulation library")
|
| 2673 | (description
|
| 2674 | "Libiptcdata is a C library for manipulating the International Press
|
| 2675 | Telecommunications Council (@dfn{IPTC}) metadata stored within multimedia files
|
| 2676 | such as images. This metadata can include captions and keywords, often used by
|
| 2677 | popular photo management applications. The library provides routines for
|
| 2678 | parsing, viewing, modifying, and saving this metadata.")
|
| 2679 | (license license:lgpl2.0+)))
|
| 2680 |
|
| 2681 | (define-public flameshot
|
| 2682 | (package
|
| 2683 | (name "flameshot")
|
| 2684 | (version "13.3.0")
|
| 2685 | (source
|
| 2686 | (origin
|
| 2687 | (method git-fetch)
|
| 2688 | (uri (git-reference
|
| 2689 | (url "https://github.com/flameshot-org/flameshot")
|
| 2690 | (commit (string-append "v" version))))
|
| 2691 | (file-name (git-file-name name version))
|
| 2692 | (sha256
|
| 2693 | (base32
|
| 2694 | "1v9xsivq9wnj7x1gr877a40xi6j672h9j82c5nkih9b64jg0naj7"))))
|
| 2695 | (build-system qt-build-system)
|
| 2696 | (arguments
|
| 2697 | (list
|
| 2698 | #:qtbase qtbase
|
| 2699 | #:tests? #f |
| 2700 | #:configure-flags
|
| 2701 | #~(list "-DFETCHCONTENT_FULLY_DISCONNECTED=ON"
|
| 2702 | "-DUSE_BUNDLED_KDSINGLEAPPLICATION=OFF"
|
| 2703 | "-DDISABLE_UPDATE_CHECKER=ON")))
|
| 2704 | (native-inputs (list qttools))
|
| 2705 | (inputs (list kdsingleapplication qtcolorwidgets qtsvg))
|
| 2706 | (home-page "https://github.com/flameshot-org/flameshot")
|
| 2707 | (synopsis "Powerful yet simple to use screenshot software")
|
| 2708 | (description "Flameshot is a screenshot program.
|
| 2709 | Features:
|
| 2710 |
|
| 2711 | @itemize
|
| 2712 | @item Customizable appearance.
|
| 2713 | @item Easy to use.
|
| 2714 | @item In-app screenshot edition.
|
| 2715 | @item DBus interface.
|
| 2716 | @item Upload to Imgur.
|
| 2717 | @end itemize\n")
|
| 2718 | (license license:gpl3+)))
|
| 2719 |
|
| 2720 | (define-public swappy
|
| 2721 | (package
|
| 2722 | (name "swappy")
|
| 2723 | (version "1.8.0")
|
| 2724 | (source
|
| 2725 | (origin
|
| 2726 | (method git-fetch)
|
| 2727 | (uri (git-reference
|
| 2728 | (url "https://github.com/jtheoof/swappy")
|
| 2729 | (commit (string-append "v" version))))
|
| 2730 | (file-name (git-file-name name version))
|
| 2731 | (sha256
|
| 2732 | (base32 "0drihlsc193dzffnllpjwhq5n6j7m5pix1wxgnkgp4x3nvmvkxxc"))))
|
| 2733 | (build-system meson-build-system)
|
| 2734 | (native-inputs
|
| 2735 | (list pkg-config scdoc
|
| 2736 | `(,glib "bin"))) |
| 2737 | (inputs
|
| 2738 | (list gtk+ libnotify gettext-minimal))
|
| 2739 | (propagated-inputs
|
| 2740 | |
| 2741 | (list font-awesome))
|
| 2742 | (home-page "https://github.com/jtheoof/swappy")
|
| 2743 | (synopsis "Grab and edit on the fly snapshots of a Wayland compositor")
|
| 2744 | (description
|
| 2745 | "@command{swappy} is a command-line utility to take and edit screenshots
|
| 2746 | of Wayland desktops. Works great with grim, slurp and sway. But can easily
|
| 2747 | work with other screen copy tools that can output a final PNG image to
|
| 2748 | stdout.")
|
| 2749 | (license license:expat)))
|
| 2750 |
|
| 2751 | (define-public gifsicle
|
| 2752 | (package
|
| 2753 | (name "gifsicle")
|
| 2754 | (version "1.95")
|
| 2755 | (source
|
| 2756 | (origin
|
| 2757 | (method git-fetch)
|
| 2758 | (uri (git-reference
|
| 2759 | (url "https://github.com/kohler/gifsicle")
|
| 2760 | (commit (string-append "v" version))))
|
| 2761 | (file-name (git-file-name name version))
|
| 2762 | (sha256
|
| 2763 | (base32 "1wvsf2kv90bqpyxcjilir4zgmaga0xjg96vnn7rzq4fkjx8pb3yg"))
|
| 2764 | (modules '((guix build utils)))
|
| 2765 | (snippet '(begin (substitute* "configure.ac"
|
| 2766 | (("2.72") "2.69"))))))
|
| 2767 | (build-system gnu-build-system)
|
| 2768 | (arguments
|
| 2769 | (list
|
| 2770 | #:phases
|
| 2771 | #~(modify-phases %standard-phases
|
| 2772 | (add-before 'check 'patch-tests
|
| 2773 | (lambda _
|
| 2774 | (substitute* "test/testie"
|
| 2775 | (("/usr/bin/perl")
|
| 2776 | (which "perl"))
|
| 2777 | (("/bin/sh")
|
| 2778 | (which "sh"))
|
| 2779 | (("/bin/rm")
|
| 2780 | (which "rm"))))))))
|
| 2781 | (native-inputs
|
| 2782 | (list
|
| 2783 | autoconf automake
|
| 2784 | perl)) |
| 2785 | (inputs (list libx11))
|
| 2786 | (home-page "https://www.lcdf.org/gifsicle/")
|
| 2787 | (synopsis "Edit GIF images and animations")
|
| 2788 | (description "Gifsicle is a command-line GIF image manipulation tool that:
|
| 2789 |
|
| 2790 | @itemize
|
| 2791 | @item Provides a batch mode for changing GIFs in place.
|
| 2792 | @item Prints detailed information about GIFs, including comments.
|
| 2793 | @item Control over interlacing, comments, looping, transparency, etc.
|
| 2794 | @item Creates well-behaved GIFs: removes redundant colors, only uses local color
|
| 2795 | tables, etc.
|
| 2796 | @item Shrinks colormaps and change images to use the Web-safe palette.
|
| 2797 | @item Optimizes GIF animations, or unoptimizes them for easier editing.
|
| 2798 | @end itemize
|
| 2799 |
|
| 2800 | Two other programs are included with Gifsicle: @command{gifview} is a
|
| 2801 | lightweight animated-GIF viewer, and @command{gifdiff} compares two GIFs for
|
| 2802 | identical visual appearance.")
|
| 2803 | (license license:gpl2+)))
|
| 2804 |
|
| 2805 | (define-public jp2a
|
| 2806 | (package
|
| 2807 | (name "jp2a")
|
| 2808 | (version "1.1.1")
|
| 2809 | (source
|
| 2810 | (origin
|
| 2811 | (method url-fetch)
|
| 2812 | (uri (string-append "https://github.com/Talinx/jp2a/releases/download/v"
|
| 2813 | version "/jp2a-" version ".tar.gz"))
|
| 2814 | (sha256
|
| 2815 | (base32
|
| 2816 | "10kwhh1a0ivrzagl2vcxrbqmlr2q8x29ymqwzchpiriy6xqxck8l"))))
|
| 2817 | (build-system gnu-build-system)
|
| 2818 | (inputs
|
| 2819 | (list curl libpng libjpeg-turbo ncurses))
|
| 2820 | (native-inputs
|
| 2821 | (list doxygen))
|
| 2822 | (home-page "https://csl.name/jp2a/")
|
| 2823 | (synopsis "Convert JPEG images to ASCII")
|
| 2824 | (description
|
| 2825 | "Jp2a is a small utility that converts JPEG images to ASCII.")
|
| 2826 | (license license:gpl2)))
|
| 2827 |
|
| 2828 | (define-public grim
|
| 2829 | (package
|
| 2830 | (name "grim")
|
| 2831 | (version "1.5.0")
|
| 2832 | (source
|
| 2833 | (origin
|
| 2834 | (method git-fetch)
|
| 2835 | (uri (git-reference
|
| 2836 | (url "https://gitlab.freedesktop.org/emersion/grim/")
|
| 2837 | (commit (string-append "v" version))))
|
| 2838 | (file-name (git-file-name name version))
|
| 2839 | (sha256
|
| 2840 | (base32 "1rabva3x203hbsnmad6zrvlpxadmxw1zmd42i3pjk05pnk73mym0"))))
|
| 2841 | (build-system meson-build-system)
|
| 2842 | (native-inputs (append (if (%current-target-system)
|
| 2843 | |
| 2844 | (list pkg-config-for-build wayland)
|
| 2845 | '())
|
| 2846 | (list pkg-config scdoc)))
|
| 2847 | (inputs (list pixman libpng libjpeg-turbo wayland wayland-protocols))
|
| 2848 | (home-page "https://gitlab.freedesktop.org/emersion/grim")
|
| 2849 | (synopsis "Create screenshots from a Wayland compositor")
|
| 2850 | (description "grim can create screenshots from a Wayland compositor.")
|
| 2851 | (license license:expat)))
|
| 2852 |
|
| 2853 | (define-public slurp
|
| 2854 | (package
|
| 2855 | (name "slurp")
|
| 2856 | (version "1.5.0")
|
| 2857 | (source
|
| 2858 | (origin
|
| 2859 | (method git-fetch)
|
| 2860 | (uri (git-reference
|
| 2861 | (url "https://github.com/emersion/slurp")
|
| 2862 | (commit (string-append "v" version))))
|
| 2863 | (file-name (git-file-name name version))
|
| 2864 | (sha256
|
| 2865 | (base32 "0wlml42c3shma50bsvqzll7p3zn251jaf0jm59q2idks8gg1zkyq"))))
|
| 2866 | (build-system meson-build-system)
|
| 2867 | (native-inputs
|
| 2868 | (append (if (%current-target-system)
|
| 2869 | |
| 2870 | (list wayland pkg-config-for-build)
|
| 2871 | '())
|
| 2872 | (list pkg-config scdoc)))
|
| 2873 | (inputs
|
| 2874 | (list cairo libxkbcommon wayland wayland-protocols))
|
| 2875 | (home-page "https://github.com/emersion/slurp")
|
| 2876 | (synopsis "Select a region in a Wayland compositor")
|
| 2877 | (description "Slurp can select a region in a Wayland compositor and print it
|
| 2878 | to the standard output. It works well together with grim.")
|
| 2879 | (license license:expat)))
|
| 2880 |
|
| 2881 | (define-public sng
|
| 2882 | (package
|
| 2883 | (name "sng")
|
| 2884 | (version "1.1.0")
|
| 2885 | (source
|
| 2886 | (origin
|
| 2887 | (method url-fetch)
|
| 2888 | (uri (string-append "mirror://sourceforge/sng/sng-"
|
| 2889 | version ".tar.gz"))
|
| 2890 | (sha256
|
| 2891 | (base32 "06a6ydvx9xb3vxvrzdrg3hq0rjwwj9ibr7fyyxjxq6qx1j3mb70i"))))
|
| 2892 | (build-system gnu-build-system)
|
| 2893 | (arguments
|
| 2894 | `(#:phases
|
| 2895 | (modify-phases %standard-phases
|
| 2896 | (add-before 'check 'link-pngsuite
|
| 2897 | |
| 2898 | (lambda* (#:key inputs #:allow-other-keys)
|
| 2899 | (symlink (assoc-ref inputs "pngsuite") "pngsuite")
|
| 2900 | #t)))
|
| 2901 | #:configure-flags
|
| 2902 | (list (string-append "--with-rgbtxt="
|
| 2903 | (assoc-ref %build-inputs "xorg-rgb")
|
| 2904 | "/share/X11/rgb.txt"))))
|
| 2905 | (inputs (list xorg-rgb libpng))
|
| 2906 | (native-inputs (list pngsuite))
|
| 2907 | (home-page "https://sng.sourceforge.net")
|
| 2908 | (synopsis "Markup language for representing PNG contents")
|
| 2909 | (description "SNG (Scriptable Network Graphics) is a minilanguage designed
|
| 2910 | specifically to represent the entire contents of a PNG (Portable Network
|
| 2911 | Graphics) file in an editable form. Thus, SNGs representing elaborate
|
| 2912 | graphics images and ancillary chunk data can be readily generated or modified
|
| 2913 | using only text tools.
|
| 2914 |
|
| 2915 | SNG is implemented by a compiler/decompiler called sng that
|
| 2916 | losslessly translates between SNG and PNG.")
|
| 2917 | (license license:zlib)))
|
| 2918 |
|
| 2919 | (define-public blurhash
|
| 2920 | (package
|
| 2921 | (name "blurhash")
|
| 2922 | (version "0.2.0")
|
| 2923 | (source
|
| 2924 | (origin
|
| 2925 | (method git-fetch)
|
| 2926 | (uri (git-reference
|
| 2927 | (url "https://github.com/Nheko-Reborn/blurhash")
|
| 2928 | (commit (string-append "v" version))))
|
| 2929 | (file-name (git-file-name name version))
|
| 2930 | (sha256
|
| 2931 | (base32 "0hx15fspava43z47kv17ivxv56g03fb2zf45dl07v3shickqxw0x"))))
|
| 2932 | (build-system meson-build-system)
|
| 2933 | (native-inputs
|
| 2934 | (list doctest pkg-config))
|
| 2935 | (home-page "https://github.com/Nheko-Reborn/blurhash")
|
| 2936 | (synopsis "C++ blurhash encoder/decoder")
|
| 2937 | (description "Simple encoder and decoder for blurhashes. Contains a
|
| 2938 | command line program as well as a shared library.")
|
| 2939 | (license license:boost1.0)))
|
| 2940 |
|
| 2941 | (define-public lodepng
|
| 2942 | |
| 2943 | |
| 2944 | (let ((commit "48e5364ef48ec2408f44c727657ac1b6703185f8")
|
| 2945 | (revision "1")
|
| 2946 | (version "20200215"))
|
| 2947 | (package
|
| 2948 | (name "lodepng")
|
| 2949 | (version (git-version version revision commit))
|
| 2950 | (source (origin
|
| 2951 | (method git-fetch)
|
| 2952 | (uri (git-reference
|
| 2953 | (url "https://github.com/lvandeve/lodepng")
|
| 2954 | (commit commit)))
|
| 2955 | (sha256
|
| 2956 | (base32
|
| 2957 | "1a1x8ag2scanzb2066jm9hg2y9kaa3wmpgmz10l1x9bkpik612lw"))
|
| 2958 | (file-name (git-file-name name version))))
|
| 2959 | (build-system gnu-build-system)
|
| 2960 | (arguments
|
| 2961 | '(#:phases
|
| 2962 | (modify-phases %standard-phases
|
| 2963 | (delete 'configure)
|
| 2964 | (replace 'build
|
| 2965 | (lambda _
|
| 2966 | (setenv "CXXFLAGS" "-fPIC")
|
| 2967 | (invoke "make" "lodepng.o")
|
| 2968 | (invoke "make" "lodepng_util.o")
|
| 2969 | (invoke "g++" "-fPIC" "-O3"
|
| 2970 | "-o" "liblodepng.so"
|
| 2971 | "-shared" "lodepng.o" "lodepng_util.o")
|
| 2972 | #t))
|
| 2973 | (replace 'check
|
| 2974 | (lambda _
|
| 2975 | (invoke "make" "unittest")
|
| 2976 | (invoke "./unittest")
|
| 2977 | #t))
|
| 2978 | (replace 'install
|
| 2979 | (lambda* (#:key outputs #:allow-other-keys)
|
| 2980 | (let* ((out (assoc-ref outputs "out"))
|
| 2981 | (doc (string-append out "/share/doc"))
|
| 2982 | (lib (string-append out "/lib"))
|
| 2983 | (include (string-append out "/include")))
|
| 2984 | (install-file "lodepng.h" include)
|
| 2985 | (install-file "lodepng_util.h" include)
|
| 2986 | (install-file "liblodepng.so" lib)
|
| 2987 | (install-file "README.md" doc)
|
| 2988 | #t))))))
|
| 2989 | (home-page "https://lodev.org/lodepng/")
|
| 2990 | (synopsis "PNG encoder and decoder in C and C++, without dependencies")
|
| 2991 | (description "LodePNG is a PNG image decoder and encoder, all in one,
|
| 2992 | no dependency or linkage required. It's made for C (ISO C90), and has a C++
|
| 2993 | wrapper with a more convenient interface on top.")
|
| 2994 | (license license:zlib))))
|
| 2995 |
|
| 2996 | (define-public lodepng/c
|
| 2997 | (package/inherit lodepng
|
| 2998 | (name "lodepng-c")
|
| 2999 | (arguments
|
| 3000 | (substitute-keyword-arguments arguments
|
| 3001 | ((#:make-flags _ '())
|
| 3002 | #~(list (string-append "CC=" #$(cc-for-target))
|
| 3003 | "CFLAGS=-fPIC"))
|
| 3004 | ((#:phases phases)
|
| 3005 | #~(modify-phases #$phases
|
| 3006 | (add-after 'unpack 'patch
|
| 3007 | (lambda _
|
| 3008 | (rename-file "lodepng.cpp" "lodepng.c")))
|
| 3009 | |
| 3010 | |
| 3011 | (delete 'check)
|
| 3012 | (replace 'build
|
| 3013 | (lambda* (#:key (make-flags '()) #:allow-other-keys)
|
| 3014 | (apply invoke "make" "lodepng.o" make-flags)
|
| 3015 | (invoke #$(cc-for-target) "-fPIC" "-O3"
|
| 3016 | "-o" "liblodepng.so"
|
| 3017 | "-shared" "lodepng.o")))
|
| 3018 | (replace 'install
|
| 3019 | (lambda _
|
| 3020 | (install-file "lodepng.h" (string-append #$output "/include"))
|
| 3021 | (install-file "liblodepng.so" (string-append #$output "/lib"))
|
| 3022 | (install-file "README.md"
|
| 3023 | (string-append #$output
|
| 3024 | "/share/doc/lodepng"))))))))
|
| 3025 | (properties '((upstream-name . "lodepng")))))
|
| 3026 |
|
| 3027 | (define-public icoutils
|
| 3028 | (package
|
| 3029 | (name "icoutils")
|
| 3030 | (version "0.32.3")
|
| 3031 | (source
|
| 3032 | (origin
|
| 3033 | (method url-fetch)
|
| 3034 | (uri (string-append
|
| 3035 | "mirror://savannah/icoutils/icoutils-" version ".tar.bz2"))
|
| 3036 | (sha256
|
| 3037 | (base32 "1q66cksms4l62y0wizb8vfavhmf7kyfgcfkynil3n99s0hny1aqp"))))
|
| 3038 | (build-system gnu-build-system)
|
| 3039 | (inputs
|
| 3040 | (list libpng perl))
|
| 3041 | (propagated-inputs
|
| 3042 | (list perl-libwww))
|
| 3043 | (home-page "https://www.nongnu.org/icoutils/")
|
| 3044 | (synopsis "Extract and convert bitmaps from Windows icon and cursor files")
|
| 3045 | (description "Icoutils are a set of program for extracting and converting
|
| 3046 | bitmaps from Microsoft Windows icon and cursor files. These files usually
|
| 3047 | have the extension @code{.ico} or @code{.cur}, but they can also be embedded
|
| 3048 | in executables and libraries (@code{.dll}-files). (Such embedded files are
|
| 3049 | referred to as resources.)
|
| 3050 |
|
| 3051 | Conversion of these files to and from PNG images is done @command{icotool}.
|
| 3052 | @command{extresso} automates these tasks with the help of special resource
|
| 3053 | scripts. Resources such can be extracted from MS Windows executable and
|
| 3054 | library files with @command{wrestool}.
|
| 3055 |
|
| 3056 | This package can be used to create @code{favicon.ico} files for web sites.")
|
| 3057 | (license license:gpl3+)))
|
| 3058 |
|
| 3059 | (define-public libavif
|
| 3060 | (package
|
| 3061 | (name "libavif")
|
| 3062 | (version "1.0.4")
|
| 3063 | (source (origin
|
| 3064 | (method git-fetch)
|
| 3065 | (uri (git-reference
|
| 3066 | (url "https://github.com/AOMediaCodec/libavif")
|
| 3067 | (commit (string-append "v" version))))
|
| 3068 | (file-name (git-file-name name version))
|
| 3069 | (sha256
|
| 3070 | (base32
|
| 3071 | "0k72q7yvfdn92wkslyifw14319nm981a8r3kd84i4ylxmrkgi0zm"))))
|
| 3072 | (build-system cmake-build-system)
|
| 3073 | (arguments
|
| 3074 | (list
|
| 3075 | #:modules '((guix build cmake-build-system)
|
| 3076 | (guix build utils)
|
| 3077 | (srfi srfi-26))
|
| 3078 | #:configure-flags
|
| 3079 | #~(list "-DAVIF_CODEC_AOM=ON" "-DAVIF_CODEC_DAV1D=ON"
|
| 3080 | #$@(if (this-package-input "rav1e")
|
| 3081 | '("-DAVIF_CODEC_RAV1E=ON")
|
| 3082 | '())
|
| 3083 | "-DAVIF_BUILD_TESTS=ON" "-DAVIF_ENABLE_GTEST=ON"
|
| 3084 | "-DAVIF_BUILD_APPS=ON" "-DAVIF_BUILD_GDK_PIXBUF=ON")
|
| 3085 | #:phases
|
| 3086 | #~(modify-phases %standard-phases
|
| 3087 | (add-before 'configure 'patch-thumbnailer
|
| 3088 | (lambda _
|
| 3089 | (substitute* "contrib/gdk-pixbuf/avif.thumbnailer.in"
|
| 3090 | (("@CMAKE_INSTALL_FULL_BINDIR@/gdk-pixbuf-thumbnailer")
|
| 3091 | (string-append #$gdk-pixbuf "/bin/gdk-pixbuf-thumbnailer")))))
|
| 3092 | (add-after 'install 'install-readme
|
| 3093 | (lambda _
|
| 3094 | (let ((doc (string-append #$output "/share/doc/libavif-"
|
| 3095 | #$(package-version this-package))))
|
| 3096 | (install-file "../source/README.md" doc))))
|
| 3097 | (add-after 'install 'split
|
| 3098 | (lambda _
|
| 3099 | (let* ((avifenc (string-append #$output "/bin/avifenc"))
|
| 3100 | (avifenc* (string-append #$output:tools "/bin/avifenc"))
|
| 3101 | (avifdec (string-append #$output "/bin/avifdec"))
|
| 3102 | (avifdec* (string-append #$output:tools "/bin/avifdec"))
|
| 3103 |
|
| 3104 | (thumbnailer (string-append
|
| 3105 | #$output
|
| 3106 | "/share/thumbnailers/avif.thumbnailer"))
|
| 3107 | (thumbnailer* (string-append
|
| 3108 | #$output:pixbuf-loader
|
| 3109 | "/share/thumbnailers/avif.thumbnailer"))
|
| 3110 | (pixbuf-loader (string-append
|
| 3111 | #$output
|
| 3112 | "/lib/gdk-pixbuf-2.0/2.10.0/loaders/"
|
| 3113 | "libpixbufloader-avif.so"))
|
| 3114 | (pixbuf-loader* (string-append
|
| 3115 | #$output:pixbuf-loader
|
| 3116 | "/lib/gdk-pixbuf-2.0/2.10.0/loaders/"
|
| 3117 | "libpixbufloader-avif.so")))
|
| 3118 | (mkdir-p (string-append #$output:tools "/bin"))
|
| 3119 | (for-each (compose mkdir-p
|
| 3120 | (cut string-append
|
| 3121 | #$output:pixbuf-loader <>))
|
| 3122 | '("/share/thumbnailers"
|
| 3123 | "/lib/gdk-pixbuf-2.0/2.10.0/loaders/"))
|
| 3124 |
|
| 3125 | (for-each (lambda (old new)
|
| 3126 | (copy-file old new)
|
| 3127 | (delete-file old)
|
| 3128 | (chmod new #o555))
|
| 3129 | (list avifenc avifdec
|
| 3130 | thumbnailer pixbuf-loader)
|
| 3131 | (list avifenc* avifdec*
|
| 3132 | thumbnailer* pixbuf-loader*))))))))
|
| 3133 | (native-inputs (list googletest pkg-config))
|
| 3134 | (inputs
|
| 3135 | (append
|
| 3136 | (if (member (%current-system) (package-transitive-supported-systems rav1e))
|
| 3137 | (list rav1e) '())
|
| 3138 | (list dav1d libaom zlib libpng libjpeg-turbo gdk-pixbuf)))
|
| 3139 | (outputs (list "out"
|
| 3140 | "tools" |
| 3141 | "pixbuf-loader"))
|
| 3142 | (synopsis "Encode and decode AVIF files")
|
| 3143 | (description "Libavif is a C implementation of @acronym{AVIF, the AV1 Image
|
| 3144 | File Format}. It can encode and decode all YUV formats and bit depths supported
|
| 3145 | by AOM, including with alpha.")
|
| 3146 | (home-page "https://github.com/AOMediaCodec/libavif")
|
| 3147 | (license (list license:bsd-2))))
|
| 3148 |
|
| 3149 | (define-public libheif
|
| 3150 | (package
|
| 3151 | (name "libheif")
|
| 3152 | (version "1.23.5")
|
| 3153 | (source
|
| 3154 | (origin
|
| 3155 | (method git-fetch)
|
| 3156 | (uri (git-reference
|
| 3157 | (url "https://github.com/strukturag/libheif")
|
| 3158 | (commit (string-append "v" version))))
|
| 3159 | (file-name (git-file-name name version))
|
| 3160 | (sha256
|
| 3161 | (base32 "0kl7zmyzj4rm2k3yqzkpw5kakaig6l2dym6yw0ihjmi50whd8yps"))))
|
| 3162 | (build-system cmake-build-system)
|
| 3163 | (arguments
|
| 3164 | (list
|
| 3165 | #:phases
|
| 3166 | #~(modify-phases %standard-phases
|
| 3167 | (add-after 'patch-dot-desktop-files 'patch-dot-thumbnailer-files
|
| 3168 | (lambda _
|
| 3169 | (define abs-path (string-append #$output "/bin/heif-thumbnailer"))
|
| 3170 | (substitute* (string-append #$output "/share/thumbnailers/heif.thumbnailer")
|
| 3171 | (("TryExec=heif-thumbnailer")
|
| 3172 | (format #f "TryExec=~a" abs-path))
|
| 3173 | (("Exec=heif-thumbnailer")
|
| 3174 | (format #f "Exec=~a" abs-path))))))))
|
| 3175 | (native-inputs
|
| 3176 | (list autoconf automake libtool pkg-config))
|
| 3177 | (inputs
|
| 3178 | (list gdk-pixbuf |
| 3179 | libjpeg-turbo
|
| 3180 | libpng))
|
| 3181 | |
| 3182 | (propagated-inputs
|
| 3183 | (list dav1d libaom libde265 libx264 openh264 x265))
|
| 3184 | (home-page "https://github.com/strukturag/libheif")
|
| 3185 | (synopsis "HEIF and AVIF file format decoder and encoder")
|
| 3186 | (description
|
| 3187 | "@code{libheif} is an ISO/IEC 23008-12:2017 HEIF and AVIF (AV1 Image File
|
| 3188 | Format) file format decoder and encoder.")
|
| 3189 | (license license:lgpl3+)))
|
| 3190 |
|
| 3191 | (define libjxl-testdata
|
| 3192 | (origin
|
| 3193 | (method git-fetch)
|
| 3194 | (uri (git-reference
|
| 3195 | (url "https://github.com/libjxl/testdata")
|
| 3196 | (commit "ff8d743aaba05b3014f17e5475e576242fa979fc")))
|
| 3197 | (sha256
|
| 3198 | (base32 "05nba2h0m74n5f9jzl3vzvnj74fj3si09ncwk2dqg41qdc49d1ng"))))
|
| 3199 |
|
| 3200 | (define-public libjxl
|
| 3201 | (package
|
| 3202 | (name "libjxl")
|
| 3203 | (version "0.11.2")
|
| 3204 | (outputs (list "out" "pixbuf-loader"))
|
| 3205 | (source
|
| 3206 | (origin
|
| 3207 | (method git-fetch)
|
| 3208 | (uri (git-reference
|
| 3209 | (url "https://github.com/libjxl/libjxl")
|
| 3210 | (commit (string-append "v" version))))
|
| 3211 | (file-name (git-file-name name version))
|
| 3212 | (sha256
|
| 3213 | (base32 "0a6fg2v81rqsbrzi97x1d7wadcikh2fizr64rsza668cwvsk631q"))))
|
| 3214 | (build-system cmake-build-system)
|
| 3215 | (arguments
|
| 3216 | (list
|
| 3217 | #:configure-flags
|
| 3218 | #~'("-DJPEGXL_FORCE_SYSTEM_GTEST=true"
|
| 3219 | "-DJPEGXL_FORCE_SYSTEM_BROTLI=true"
|
| 3220 | "-DJPEGXL_FORCE_SYSTEM_LCMS2=true"
|
| 3221 | "-DJPEGXL_FORCE_SYSTEM_HWY=true"
|
| 3222 | "-DJPEGXL_BUNDLE_LIBPNG=false"
|
| 3223 | "-DJPEGXL_ENABLE_PLUGINS=true")
|
| 3224 | #:phases
|
| 3225 | #~(modify-phases %standard-phases
|
| 3226 | #$@(cond
|
| 3227 | ((target-riscv64?)
|
| 3228 | #~((add-after 'unpack 'fix-atomic
|
| 3229 | (lambda _
|
| 3230 | (substitute* "lib/jxl/enc_xyb.cc"
|
| 3231 | (("#include \"lib/jxl/enc_xyb.h\"" a)
|
| 3232 | (string-append a "\n#include <atomic>")))))))
|
| 3233 | ((target-x86-32?)
|
| 3234 | #~((add-after 'unpack 'loosen-test-parameter
|
| 3235 | (lambda _
|
| 3236 | |
| 3237 | |
| 3238 | (substitute* "lib/jxl/color_management_test.cc"
|
| 3239 | (("8\\.7e-4") "8.7e-3"))))))
|
| 3240 | (#t
|
| 3241 | #~()))
|
| 3242 | (add-after 'unpack 'patch-dependencies
|
| 3243 | (lambda* (#:key inputs #:allow-other-keys)
|
| 3244 | (with-directory-excursion "third_party"
|
| 3245 | |
| 3246 | |
| 3247 | (apply invoke "touch"
|
| 3248 | '("sjpeg/CMakeLists.txt"
|
| 3249 | "sjpeg/COPYING"
|
| 3250 | "skcms/skcms.h"
|
| 3251 | "skcms/LICENSE"))
|
| 3252 | (substitute* "CMakeLists.txt"
|
| 3253 | (("include\\(skcms\\.cmake\\)")
|
| 3254 | "find_library(SKCMS_LIB NAMES skcms REQUIRED)")
|
| 3255 | (("include\\(sjpeg\\.cmake\\)")
|
| 3256 | "find_package(sjpeg REQUIRED)")))
|
| 3257 | (with-directory-excursion "lib"
|
| 3258 | (substitute* "jxl_cms.cmake"
|
| 3259 | (("target_link_skcms\\(jxl_cms\\)")
|
| 3260 | "target_link_libraries(jxl_cms PRIVATE ${SKCMS_LIB})"))
|
| 3261 | (substitute* "jxl_extras.cmake"
|
| 3262 | (("\\.\\.\\/third_party\\/sjpeg\\/src")
|
| 3263 | (dirname (search-input-file inputs "src/sjpegi.h")))))))
|
| 3264 | (add-after 'unpack 'unpack-testdata
|
| 3265 | (lambda _
|
| 3266 | (rmdir "testdata")
|
| 3267 | (copy-recursively #$libjxl-testdata "testdata")))
|
| 3268 | (add-after 'install 'split
|
| 3269 | (lambda _
|
| 3270 | (for-each
|
| 3271 | (lambda (path)
|
| 3272 | (let ((old (string-append #$output path))
|
| 3273 | (new (string-append #$output:pixbuf-loader path)))
|
| 3274 | (install-file old (dirname new))
|
| 3275 | (delete-file old)
|
| 3276 | (chmod new #o555)))
|
| 3277 | '("/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jxl.so"
|
| 3278 | "/share/thumbnailers/jxl.thumbnailer")))))))
|
| 3279 | (native-inputs
|
| 3280 | (list asciidoc
|
| 3281 | doxygen
|
| 3282 | googletest
|
| 3283 | pkg-config
|
| 3284 | python
|
| 3285 | (package-source sjpeg))) |
| 3286 | (inputs
|
| 3287 | (list freeglut
|
| 3288 | gdk-pixbuf
|
| 3289 | gflags
|
| 3290 | giflib
|
| 3291 | imath
|
| 3292 | lcms
|
| 3293 | libavif
|
| 3294 | libjpeg-turbo
|
| 3295 | libpng
|
| 3296 | libwebp
|
| 3297 | openexr
|
| 3298 | sjpeg
|
| 3299 | skcms
|
| 3300 | zlib))
|
| 3301 | |
| 3302 | (propagated-inputs
|
| 3303 | (list brotli google-highway))
|
| 3304 | (home-page "https://github.com/libjxl/libjxl")
|
| 3305 | (synopsis "JPEG XL image format reference implementation")
|
| 3306 | (description "This package contains a reference implementation of JPEG XL
|
| 3307 | (encoder and decoder).")
|
| 3308 | (properties
|
| 3309 | `((output-synopsis "pixbuf-loader" "gdk-pixbuf loader for the JXL format")))
|
| 3310 | (license license:bsd-3)))
|
| 3311 |
|
| 3312 | (define-public mtpaint
|
| 3313 | (package
|
| 3314 | (name "mtpaint")
|
| 3315 | |
| 3316 | |
| 3317 | (version "3.50.12")
|
| 3318 | (source
|
| 3319 | (origin
|
| 3320 | (method git-fetch)
|
| 3321 | (uri (git-reference
|
| 3322 | (url "https://github.com/wjaguar/mtPaint")
|
| 3323 | (commit "7cae5d663ed835a365d89a535536c39e18862a83")))
|
| 3324 | (file-name (git-file-name name version))
|
| 3325 | (sha256
|
| 3326 | (base32 "0rcblsdikn5659gzqwq3xdws5k03xyvd4yj7r0rm78daamki1wsv"))))
|
| 3327 | (build-system gnu-build-system)
|
| 3328 | (native-inputs
|
| 3329 | (list
|
| 3330 | gettext-minimal
|
| 3331 | perl
|
| 3332 | pkg-config
|
| 3333 | which))
|
| 3334 | (inputs
|
| 3335 | (list
|
| 3336 | glib
|
| 3337 | gtk+
|
| 3338 | imlib2
|
| 3339 | libjpeg-turbo
|
| 3340 | libpng
|
| 3341 | libtiff
|
| 3342 | libungif
|
| 3343 | libwebp
|
| 3344 | openjpeg
|
| 3345 | lcms
|
| 3346 | zlib))
|
| 3347 | (arguments
|
| 3348 | (list
|
| 3349 | #:tests? #f |
| 3350 | #:phases
|
| 3351 | #~(modify-phases %standard-phases
|
| 3352 | (replace 'configure
|
| 3353 | |
| 3354 | (lambda _
|
| 3355 | (invoke "./configure"
|
| 3356 | (string-append "--prefix=" #$output)
|
| 3357 | "intl" "man"))))))
|
| 3358 | (home-page "https://mtpaint.sourceforge.net/")
|
| 3359 | (synopsis "Create pixel art and manipulate digital images")
|
| 3360 | (description
|
| 3361 | "Mtpaint is a graphic editing program which uses the GTK+ toolkit.
|
| 3362 | It can create and edit indexed palette or 24bit RGB images, offers basic
|
| 3363 | painting and palette manipulation tools. It also handles JPEG, JPEG2000,
|
| 3364 | GIF, TIFF, WEBP, BMP, PNG, XPM formats.")
|
| 3365 | (license license:gpl3+)))
|
| 3366 |
|
| 3367 | (define-public mypaint
|
| 3368 | (package
|
| 3369 | (name "mypaint")
|
| 3370 | |
| 3371 | (properties '((commit . "35aa9d33cd3deba6cafea6d8fc901b5a1d161ceb")
|
| 3372 | (revision . "0")))
|
| 3373 | (version (git-version "2.0.1"
|
| 3374 | (assoc-ref properties 'revision)
|
| 3375 | (assoc-ref properties 'commit)))
|
| 3376 | (source
|
| 3377 | (origin
|
| 3378 | (method git-fetch)
|
| 3379 | (uri (git-reference
|
| 3380 | (url "https://github.com/mypaint/mypaint")
|
| 3381 | (commit (assoc-ref properties 'commit))))
|
| 3382 | (file-name (git-file-name name version))
|
| 3383 | (sha256
|
| 3384 | (base32 "1p1i799dzpx0zr7chkz0pjdq9l32ahckgyagbiw82c27mwxqabfh"))))
|
| 3385 | (build-system pyproject-build-system)
|
| 3386 | (arguments
|
| 3387 | (list
|
| 3388 | #:imported-modules `(,@%pyproject-build-system-modules
|
| 3389 | (guix build glib-or-gtk-build-system))
|
| 3390 | #:modules '((guix build pyproject-build-system)
|
| 3391 | ((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
|
| 3392 | (guix build utils))
|
| 3393 | #:phases
|
| 3394 | #~(modify-phases %standard-phases
|
| 3395 | (add-after 'install 'move-assets-to-data
|
| 3396 | |
| 3397 | |
| 3398 | |
| 3399 | |
| 3400 | |
| 3401 | |
| 3402 | |
| 3403 | |
| 3404 | |
| 3405 | |
| 3406 | (lambda _
|
| 3407 | (let* ((data (string-append #$output "/data"))
|
| 3408 | (data-icons (string-append data "/icons"))
|
| 3409 | (data-mypaint (string-append data "/mypaint"))
|
| 3410 | (icons (string-append #$output "/icons"))
|
| 3411 | (mypaint (string-append #$output "/mypaint")))
|
| 3412 | (mkdir-p data-icons)
|
| 3413 | (mkdir-p data-mypaint)
|
| 3414 | (copy-recursively icons data-icons)
|
| 3415 | (copy-recursively mypaint data-mypaint)
|
| 3416 | (delete-file-recursively icons)
|
| 3417 | (delete-file-recursively mypaint))))
|
| 3418 | (add-after 'install 'glib-or-gtk-wrap
|
| 3419 | (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap))
|
| 3420 | (add-after 'install 'wrap-program
|
| 3421 | (lambda* (#:key outputs inputs #:allow-other-keys)
|
| 3422 | (wrap-program (string-append #$output "/bin/mypaint")
|
| 3423 | `("GI_TYPELIB_PATH" ":" prefix
|
| 3424 | (,(getenv "GI_TYPELIB_PATH"))))))
|
| 3425 | (add-before 'check 'pre-check
|
| 3426 | (lambda _
|
| 3427 | |
| 3428 | (delete-file-recursively "lib")
|
| 3429 | |
| 3430 | (setenv "HOME" "/tmp"))))))
|
| 3431 | (native-inputs
|
| 3432 | (list gettext-minimal
|
| 3433 | gobject-introspection
|
| 3434 | pkg-config
|
| 3435 | python-pytest
|
| 3436 | python-setuptools
|
| 3437 | swig))
|
| 3438 | (inputs
|
| 3439 | (list bash-minimal
|
| 3440 | gdk-pixbuf
|
| 3441 | gtk+
|
| 3442 | hicolor-icon-theme
|
| 3443 | json-c
|
| 3444 | lcms
|
| 3445 | libmypaint-next
|
| 3446 | libpng
|
| 3447 | (librsvg-for-system)
|
| 3448 | mypaint-brushes
|
| 3449 | python-numpy
|
| 3450 | python-pycairo
|
| 3451 | python-pygobject))
|
| 3452 | (home-page "https://mypaint.org/")
|
| 3453 | (synopsis "Fast and simple painting app for artists")
|
| 3454 | (description
|
| 3455 | "MyPaint is a simple drawing and painting program that works well with
|
| 3456 | Wacom-style graphics tablets.")
|
| 3457 | (license license:gpl2+)))
|
| 3458 |
|
| 3459 | (define-public phockup
|
| 3460 | (package
|
| 3461 | (name "phockup")
|
| 3462 | (version "1.13.0")
|
| 3463 | (source
|
| 3464 | (origin
|
| 3465 | (method git-fetch)
|
| 3466 | (uri (git-reference
|
| 3467 | (url "https://github.com/ivandokov/phockup")
|
| 3468 | (commit version)))
|
| 3469 | (file-name (git-file-name name version))
|
| 3470 | (sha256
|
| 3471 | (base32 "1kwz2qy8mx0j25g3gyda08qaz5rgwm6vycsrqhgkd5cqqz76bbmc"))))
|
| 3472 | (build-system copy-build-system)
|
| 3473 | (arguments
|
| 3474 | `(#:install-plan '(("src" "share/phockup/")
|
| 3475 | ("phockup.py" "share/phockup/"))
|
| 3476 | #:phases
|
| 3477 | (modify-phases %standard-phases
|
| 3478 | (add-after 'unpack 'configure
|
| 3479 | (lambda* (#:key inputs #:allow-other-keys)
|
| 3480 | (substitute* (list "src/dependency.py"
|
| 3481 | "src/exif.py")
|
| 3482 | (("'exiftool")
|
| 3483 | (string-append "'" (search-input-file inputs "bin/exiftool"))))))
|
| 3484 | (add-before 'install 'check
|
| 3485 | (lambda* (#:key tests? #:allow-other-keys)
|
| 3486 | (when tests?
|
| 3487 | |
| 3488 | (let ((path (getenv "PATH"))
|
| 3489 | (pytest (which "pytest")))
|
| 3490 | (setenv "PATH" "")
|
| 3491 | (invoke pytest)
|
| 3492 | (setenv "PATH" path)))))
|
| 3493 | (add-after 'install 'install-bin
|
| 3494 | (lambda* (#:key outputs #:allow-other-keys)
|
| 3495 | (let ((out (assoc-ref outputs "out")))
|
| 3496 | (mkdir (string-append out "/bin"))
|
| 3497 | (symlink (string-append out "/share/phockup/phockup.py")
|
| 3498 | (string-append out "/bin/phockup")))))
|
| 3499 | (add-after 'install-bin 'wrap-program
|
| 3500 | (lambda* (#:key inputs outputs #:allow-other-keys)
|
| 3501 | (let ((out (assoc-ref outputs "out")))
|
| 3502 | (wrap-program (string-append out "/bin/phockup")
|
| 3503 | `("GUIX_PYTHONPATH" prefix
|
| 3504 | ,(search-path-as-string->list
|
| 3505 | (getenv "GUIX_PYTHONPATH"))))))))))
|
| 3506 | (inputs
|
| 3507 | (list bash-minimal perl-image-exiftool python python-tqdm))
|
| 3508 | (native-inputs
|
| 3509 | (list python-pytest python-pytest-mock python-pytest-socket))
|
| 3510 | (home-page "https://github.com/ivandokov/phockup")
|
| 3511 | (synopsis "Organize photos and videos in folders")
|
| 3512 | (description "Phockup is a media sorting tool that uses creation date and
|
| 3513 | time information in photos and videos to organize them into folders by year,
|
| 3514 | month and day. All files which are not images or videos or those which do not
|
| 3515 | have creation date information will be placed in a folder called
|
| 3516 | @file{unknown}.")
|
| 3517 | (license license:expat)))
|
| 3518 |
|
| 3519 | (define-public spng
|
| 3520 | (package
|
| 3521 | (name "spng")
|
| 3522 | (version "0.7.2")
|
| 3523 | (source (origin
|
| 3524 | (method git-fetch)
|
| 3525 | (uri (git-reference
|
| 3526 | (url "https://github.com/randy408/libspng")
|
| 3527 | (commit (string-append "v" version))))
|
| 3528 | (file-name (git-file-name name version))
|
| 3529 | (sha256
|
| 3530 | (base32
|
| 3531 | "0src9ii9w9afz2vgridn9r38pa6888myk28x2bjw0ynw5xcd62hs"))))
|
| 3532 | (build-system meson-build-system)
|
| 3533 | (inputs (list zlib))
|
| 3534 | (native-inputs (list libpng))
|
| 3535 | (home-page "https://libspng.org")
|
| 3536 | (synopsis "Simple PNG loading library")
|
| 3537 | (description
|
| 3538 | "@code{libspng} is a simple C library for loading Portable Network
|
| 3539 | Graphics (PNGs), intended as an easy-to-use replacement for @code{libpng}.")
|
| 3540 | (license license:bsd-2)
|
| 3541 | |
| 3542 | (properties '((tunable? . #t)))))
|
| 3543 |
|
| 3544 | (define-public libsixel
|
| 3545 | (package
|
| 3546 | (name "libsixel")
|
| 3547 | (version "1.10.5")
|
| 3548 | (source
|
| 3549 | (origin
|
| 3550 | (method git-fetch)
|
| 3551 | (uri (git-reference
|
| 3552 | (url "https://github.com/libsixel/libsixel")
|
| 3553 | (commit (string-append "v" version))))
|
| 3554 | (file-name (git-file-name name version))
|
| 3555 | (sha256
|
| 3556 | (base32 "1j85p8s5cy7vz1ph9vsvcmxdrr8yi57pgv8vz1xp6dr715jc3g51"))))
|
| 3557 | (build-system meson-build-system)
|
| 3558 | (arguments
|
| 3559 | (list
|
| 3560 | #:build-type "release"
|
| 3561 | #:configure-flags #~(list "--buildtype=plain"
|
| 3562 | "-Dtests=enabled"
|
| 3563 | "-Dlibcurl=disabled"
|
| 3564 | "-Dgdk-pixbuf2=enabled"
|
| 3565 | "-Dbashcompletiondir=etc/bash_completion.d")))
|
| 3566 | (native-inputs (list pkg-config))
|
| 3567 | (inputs (list libjpeg-turbo libpng python))
|
| 3568 | |
| 3569 | |
| 3570 | (propagated-inputs (list gdk-pixbuf))
|
| 3571 | (home-page "https://github.com/libsixel/libsixel")
|
| 3572 | (synopsis
|
| 3573 | "Encoder and decoder implementation for DEC SIXEL graphics")
|
| 3574 | (description
|
| 3575 | "LibSIXEL is a an encoder/decoder implementation for DEC SIXEL graphics,
|
| 3576 | and some converter programs. SIXEL is one of image formats for printer and
|
| 3577 | terminal imaging introduced by @acronym{DEC, Digital Equipment Corp.}. Its
|
| 3578 | data scheme is represented as a terminal-friendly escape sequence. So if you
|
| 3579 | want to view a SIXEL image file, all you have to do is @command{cat} it to
|
| 3580 | your terminal.")
|
| 3581 | (license license:expat)))
|
| 3582 |
|
| 3583 | (define-public libyuv
|
| 3584 | (package
|
| 3585 | (name "libyuv")
|
| 3586 | (version "1922")
|
| 3587 | (source
|
| 3588 | (origin
|
| 3589 | (method git-fetch)
|
| 3590 | (uri (git-reference
|
| 3591 | (url "https://chromium.googlesource.com/libyuv/libyuv")
|
| 3592 | |
| 3593 | (commit "500f45652c459cfccd20f83f297eb66cb7b015cb")))
|
| 3594 | (sha256
|
| 3595 | (base32 "0lmmag8rlpsbq5qg7cv89dcm5j7r0rbbsmjnkg8f5ld29mdd50y3"))))
|
| 3596 | (build-system cmake-build-system)
|
| 3597 | (arguments
|
| 3598 | (list
|
| 3599 | #:configure-flags
|
| 3600 | #~(list "-DUNIT_TEST=ON")
|
| 3601 | #:phases
|
| 3602 | #~(modify-phases %standard-phases
|
| 3603 | (replace 'check
|
| 3604 | (lambda _
|
| 3605 | |
| 3606 | |
| 3607 | (invoke "./libyuv_unittest"))))))
|
| 3608 | (inputs (list libjpeg-turbo))
|
| 3609 | (native-inputs (list googletest))
|
| 3610 | (home-page "https://chromium.googlesource.com/libyuv/libyuv/")
|
| 3611 | (synopsis "YUV scaling and conversion functionality")
|
| 3612 | (description "libyuv is an open source project that includes YUV scaling and
|
| 3613 | conversion functionality. It can:
|
| 3614 | @itemize
|
| 3615 | @item Scale YUV to prepare content for compression, with point, bilinear or box
|
| 3616 | filter.
|
| 3617 | @item Convert to YUV from webcam formats for compression.
|
| 3618 | @item Convert to RGB formats for rendering/effects.
|
| 3619 | @item Rotate by 90/180/270 degrees to adjust for mobile devices in portrait mode.
|
| 3620 | @end itemize")
|
| 3621 | (license license:expat)))
|
| 3622 |
|
| 3623 | (define-public libyuv-prev
|
| 3624 | (package
|
| 3625 | (inherit libyuv)
|
| 3626 | (version "2021.4")
|
| 3627 | (properties `((superseded . ,libyuv)))))
|