summaryrefslogtreecommitdiff
path: root/gnu/packages/java.scm
diff options
context:
space:
mode:
authorDanny Milosavljevic <dannym@friendly-machines.com>2026-04-01 00:18:46 +0200
committerDanny Milosavljevic <dannym@friendly-machines.com>2026-05-03 02:30:19 +0200
commit56bd7b5546462ddb6f2a9788e046af8ed2482605 (patch)
treedb0cf54b921df18f370dd99e6f83ea3ecee34adf /gnu/packages/java.scm
parentc97a0b330e266a3a9ca164c8d9c142b1fc0e169d (diff)
gnu: Add java-jsvg@1.6.1.
* gnu/packages/java.scm (java-jsvg-1.6.1): New variable. Change-Id: I11f158879e8de6b8da063779019b36bf3c1a0b7e
Diffstat (limited to 'gnu/packages/java.scm')
-rw-r--r--gnu/packages/java.scm85
1 files changed, 85 insertions, 0 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index d216a65df14..3e4333d5ebe 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -3341,6 +3341,91 @@ specification.")
3341 ;; Some files are licensed under ASL 2.0. 3341 ;; Some files are licensed under ASL 2.0.
3342 (license (list license:asl2.0 license:gpl2 license:cddl1.1)))) 3342 (license (list license:asl2.0 license:gpl2 license:cddl1.1))))
3343 3343
3344(define-public java-jsvg-1.6.1
3345 (package
3346 (name "java-jsvg")
3347 (version "1.6.1")
3348 (source
3349 (origin
3350 (method git-fetch)
3351 (uri (git-reference
3352 (url "https://github.com/weisJ/jsvg")
3353 (commit "v1.6.1-rc1")))
3354 (file-name (git-file-name name version))
3355 (sha256
3356 (base32 "0rcphd1596ps87q31qmksnh1nc4m1x1rrkn9amk3ggwy9l2pavsy"))
3357 (modules '((guix build utils)))
3358 (snippet
3359 ;; Remove @MustBeInvokedByOverriders annotations; not present
3360 ;; in java-jetbrains-annotations 19.0.0.
3361 ;; TODO: Update java-jetbrains-annotations to >= 20.0.0.
3362 '(begin
3363 (substitute* (find-files "." "\\.java$")
3364 (("import org\\.jetbrains\\.annotations\\.MustBeInvokedByOverriders;")
3365 "")
3366 (("@MustBeInvokedByOverriders") ""))
3367 #t))))
3368 (build-system ant-build-system)
3369 (arguments
3370 (list
3371 #:jdk openjdk17
3372 #:tests? #f
3373 ;; ant-build-system does not export a default-modules constant.
3374 #:modules '((guix build ant-build-system)
3375 (guix build java-utils)
3376 (guix build utils)
3377 (sxml simple))
3378 #:phases
3379 #~(modify-phases %standard-phases
3380 (replace 'build
3381 (lambda* (#:key inputs #:allow-other-keys)
3382 (let* ((src-dir "jsvg/src/main/java")
3383 (classes-dir "build/classes")
3384 (jar-file
3385 (string-append "build/jsvg-" #$version ".jar"))
3386 (annotations-cp
3387 (string-join
3388 (append
3389 (find-files (assoc-ref inputs
3390 "java-jetbrains-annotations")
3391 "\\.jar$")
3392 (find-files (assoc-ref inputs
3393 "java-error-prone-annotations")
3394 "\\.jar$"))
3395 ":")))
3396 (mkdir-p classes-dir)
3397 (apply invoke "javac"
3398 "--release" "11"
3399 "-cp" annotations-cp
3400 "-d" classes-dir
3401 (find-files src-dir "\\.java$"))
3402 (invoke "jar" "-cf" jar-file
3403 "-C" classes-dir "."))))
3404 (add-before 'build 'generate-pom
3405 (lambda _
3406 (call-with-output-file "pom.xml"
3407 (lambda (port)
3408 (sxml->xml
3409 `(*TOP*
3410 (*PI* xml "version=\"1.0\" encoding=\"UTF-8\"")
3411 (project
3412 (modelVersion "4.0.0")
3413 (groupId "com.github.weisj")
3414 (artifactId "jsvg")
3415 (version ,#$version)))
3416 port)))))
3417 (replace 'install
3418 (install-from-pom "pom.xml")))))
3419 (native-inputs
3420 (list java-jetbrains-annotations
3421 java-error-prone-annotations))
3422 (home-page "https://github.com/weisJ/jsvg")
3423 (synopsis "Java SVG rendering library")
3424 (description
3425 "JSVG is a Java library for rendering SVG images. It provides a
3426lightweight SVG parser and renderer using the Java2D API.")
3427 (license license:expat)))
3428
3344(define-public java-jtidy 3429(define-public java-jtidy
3345 (package 3430 (package
3346 (name "java-jtidy") 3431 (name "java-jtidy")