From: "Gábor Boskovits" <boskovits@gmail.com>
To: 31992@debbugs.gnu.org
Cc: "Gábor Boskovits" <boskovits@gmail.com>
Subject: [bug#31992] [PATCH] gnu: java-jarjar: Unbundle asm.
Date: Thu, 28 Jun 2018 09:37:27 +0200 [thread overview]
Message-ID: <20180628073727.32077-1-boskovits@gmail.com> (raw)
* 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.
---
gnu/packages/java.scm | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 003107986..e4b4eddf8 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -2629,7 +2629,16 @@ documentation tools.")
"code.google.com/jarjar/jarjar-src-" version ".zip"))
(sha256
(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)
(arguments
`(;; Tests require junit, which ultimately depends on this package.
@@ -2637,6 +2646,21 @@ documentation tools.")
#:build-target "jar"
#: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
(lambda* (#:key outputs #:allow-other-keys)
(let ((target (string-append (assoc-ref outputs "out")
@@ -2644,6 +2668,8 @@ documentation tools.")
(install-file (string-append "dist/jarjar-" ,version ".jar")
target))
#t)))))
+ (inputs
+ `(("java-asm-bootstrap" ,java-asm-bootstrap)))
(native-inputs
`(("unzip" ,unzip)))
(home-page "https://code.google.com/archive/p/jarjar/")
--
2.18.0
next reply other threads:[~2018-06-28 7:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-28 7:37 Gábor Boskovits [this message]
[not found] ` <handler.31992.B.153017146521741.ack@debbugs.gnu.org>
2018-06-28 15:44 ` bug#31992: Acknowledgement ([PATCH] gnu: java-jarjar: Unbundle asm.) Gábor Boskovits
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180628073727.32077-1-boskovits@gmail.com \
--to=boskovits@gmail.com \
--cc=31992@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.