gnu: java-jarjar: Unbundle asm.
* gnu/packages/java.scm (java-jarjar)[inputs]: Add java-asm-bootstrap. [source]: Add snippet to delete bundled asm and junit. [arguments]: Add phase 'do-not-use-bundled-asm to patch build.xml to use system asm.
This commit is contained in:
parent
3116a4c5f6
commit
88aa75e922
|
@ -2629,7 +2629,16 @@ documentation tools.")
|
||||||
"code.google.com/jarjar/jarjar-src-" version ".zip"))
|
"code.google.com/jarjar/jarjar-src-" version ".zip"))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))))
|
"1v8irhni9cndcw1l1wxqgry013s2kpj0qqn57lj2ji28xjq8ndjl"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
;; Delete bundled thirds-party jar archives.
|
||||||
|
;; TODO: unbundle maven-plugin-api.
|
||||||
|
(delete-file "lib/asm-4.0.jar")
|
||||||
|
(delete-file "lib/asm-commons-4.0.jar")
|
||||||
|
(delete-file "lib/junit-4.8.1.jar")
|
||||||
|
#t))))
|
||||||
(build-system ant-build-system)
|
(build-system ant-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(;; Tests require junit, which ultimately depends on this package.
|
`(;; Tests require junit, which ultimately depends on this package.
|
||||||
|
@ -2637,6 +2646,26 @@ documentation tools.")
|
||||||
#:build-target "jar"
|
#:build-target "jar"
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
|
(add-before 'build 'do-not-use-bundled-asm
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(substitute* "build.xml"
|
||||||
|
(("<path id=\"path.build\">")
|
||||||
|
(string-append "<path id=\"path.build\"><fileset dir=\""
|
||||||
|
(assoc-ref inputs "java-asm-bootstrap")
|
||||||
|
"/share/java\" includes=\"**/*.jar\"/>"))
|
||||||
|
(("<zipfileset src=\"lib/asm-4.0.jar\"/>") "")
|
||||||
|
(("lib/asm-commons-4.0.jar")
|
||||||
|
(string-append (assoc-ref inputs "java-asm-bootstrap")
|
||||||
|
"/share/java/asm-6.0.jar"))
|
||||||
|
(("<include name=\"org/objectweb/asm/commons/Remap\\*\\.class\"/>")
|
||||||
|
(string-append "<include name=\"org/objectweb/asm/"
|
||||||
|
"commons/Remap*.class\"/>"
|
||||||
|
"<include name=\"org/objectweb/asm/*.class\"/>"
|
||||||
|
"<include name=\"org/objectweb/asm/"
|
||||||
|
"signature/*.class\"/>"
|
||||||
|
"<include name=\"org/objectweb/asm/"
|
||||||
|
"commons/SignatureRemapper.class\"/>")))
|
||||||
|
#t))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key outputs #:allow-other-keys)
|
||||||
(let ((target (string-append (assoc-ref outputs "out")
|
(let ((target (string-append (assoc-ref outputs "out")
|
||||||
|
@ -2644,6 +2673,8 @@ documentation tools.")
|
||||||
(install-file (string-append "dist/jarjar-" ,version ".jar")
|
(install-file (string-append "dist/jarjar-" ,version ".jar")
|
||||||
target))
|
target))
|
||||||
#t)))))
|
#t)))))
|
||||||
|
(inputs
|
||||||
|
`(("java-asm-bootstrap" ,java-asm-bootstrap)))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("unzip" ,unzip)))
|
`(("unzip" ,unzip)))
|
||||||
(home-page "https://code.google.com/archive/p/jarjar/")
|
(home-page "https://code.google.com/archive/p/jarjar/")
|
||||||
|
|
Loading…
Reference in New Issue