diff options
| author | Sughosha <sughosha@disroot.org> | 2026-05-19 18:11:35 +0530 |
|---|---|---|
| committer | Nguyễn Gia Phong <cnx@loang.net> | 2026-05-25 22:54:42 +0900 |
| commit | 1ebc547b5a8d29b19cc5ecbdfdaa8335710e9776 (patch) | |
| tree | 5dc7ef226676ef92229d8f7feb8fb8897c59195b /gnu/packages/graphics.scm | |
| parent | 192806899ff217dbeae4e71290f1f6cd87527822 (diff) | |
gnu: Add skcms.
* gnu/packages/graphics.scm (skcms): New variable.
Change-Id: I9aba6db9a09f22d91f9b45ef3ac9913c701c6ff5
Merges: https://codeberg.org/guix/guix/pulls/8719
Signed-off-by: Nguyễn Gia Phong <cnx@loang.net>
Diffstat (limited to 'gnu/packages/graphics.scm')
| -rw-r--r-- | gnu/packages/graphics.scm | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/gnu/packages/graphics.scm b/gnu/packages/graphics.scm index 80dccc1e19a..dd125f5c2dc 100644 --- a/gnu/packages/graphics.scm +++ b/gnu/packages/graphics.scm | |||
| @@ -2392,6 +2392,71 @@ and engineering community.") | |||
| 2392 | (define-deprecated coin3D-4 coin3d) | 2392 | (define-deprecated coin3D-4 coin3d) |
| 2393 | (export coin3D-4) | 2393 | (export coin3D-4) |
| 2394 | 2394 | ||
| 2395 | (define-public skcms | ||
| 2396 | ;; No tags are available. | ||
| 2397 | (let ((commit "a7a3b15f06355692d86a3b8373c579a521598f4c") | ||
| 2398 | (revision "0")) | ||
| 2399 | (package | ||
| 2400 | (name "skcms") | ||
| 2401 | (version (git-version "0" revision commit)) | ||
| 2402 | (source | ||
| 2403 | (origin | ||
| 2404 | (method git-fetch) | ||
| 2405 | (uri (git-reference | ||
| 2406 | (url "https://skia.googlesource.com/skcms") | ||
| 2407 | (commit commit))) | ||
| 2408 | (file-name (git-file-name name version)) | ||
| 2409 | (sha256 | ||
| 2410 | (base32 "0ylrsm7cinw59ilgbffazbgifax81kkya5cxq8q8wybnxx6z6ps6")))) | ||
| 2411 | (build-system gnu-build-system) | ||
| 2412 | (arguments | ||
| 2413 | (list | ||
| 2414 | #:phases | ||
| 2415 | #~(modify-phases %standard-phases | ||
| 2416 | (add-after 'unpack 'patch-includes | ||
| 2417 | (lambda _ | ||
| 2418 | (substitute* "skcms.h" | ||
| 2419 | (("src\\/skcms_public\\.h") "skcms/skcms_public.h")))) | ||
| 2420 | (delete 'configure) | ||
| 2421 | (replace 'build | ||
| 2422 | (lambda _ | ||
| 2423 | ;; Some CPUs may not support these features. | ||
| 2424 | (let ((cflags (append '("-DSKCMS_DISABLE_HSW=1" | ||
| 2425 | "-DSKCMS_DISABLE_SKX=1") | ||
| 2426 | (if #$(target-mingw?) | ||
| 2427 | '("-DSKCMS_HAS_MUSTTAIL=0") | ||
| 2428 | '()))) | ||
| 2429 | (ldflags '("-lstdc++"))) | ||
| 2430 | (apply invoke #$(cc-for-target) | ||
| 2431 | `("-O2" "-g" "-fPIC" ,@cflags | ||
| 2432 | "skcms.cc" | ||
| 2433 | "src/skcms_TransformBaseline.cc" | ||
| 2434 | "src/skcms_TransformHsw.cc" | ||
| 2435 | "src/skcms_TransformSkx.cc" | ||
| 2436 | "-shared" ,@ldflags | ||
| 2437 | "-o" "libskcms.so")) | ||
| 2438 | (apply invoke #$(cc-for-target) | ||
| 2439 | `(,@cflags | ||
| 2440 | "tests.c" "test_only.c" | ||
| 2441 | "-Wl,-rpath=." "-L." "-lskcms" ,@ldflags | ||
| 2442 | "-o" "tests"))))) | ||
| 2443 | (replace 'check | ||
| 2444 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 2445 | (when tests? | ||
| 2446 | (invoke "./tests")))) | ||
| 2447 | (replace 'install | ||
| 2448 | (lambda _ | ||
| 2449 | (install-file "libskcms.so" (string-append #$output "/lib")) | ||
| 2450 | (install-file "skcms.h" (string-append #$output "/include")) | ||
| 2451 | (install-file "src/skcms_public.h" | ||
| 2452 | (string-append #$output "/include/skcms"))))))) | ||
| 2453 | (native-inputs (list ninja)) | ||
| 2454 | (home-page "https://skia.org/") | ||
| 2455 | (synopsis "Color management engine") | ||
| 2456 | (description | ||
| 2457 | "skcms is the color management engine. It is a part of @code{skia}.") | ||
| 2458 | (license license:bsd-3)))) | ||
| 2459 | |||
| 2395 | (define-public skia | 2460 | (define-public skia |
| 2396 | ;; Releases follow those of Chromium, about every 6 weeks. The release | 2461 | ;; Releases follow those of Chromium, about every 6 weeks. The release |
| 2397 | ;; version can be found on this page: | 2462 | ;; version can be found on this page: |
