unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Alex Vong <alexvong1995@gmail.com>
To: 33077@debbugs.gnu.org
Cc: alexvong1995@gmail.com
Subject: [bug#33077] [PATCH 2/2] java-utils: Use 'strip-store-file-name'.
Date: Thu, 18 Oct 2018 03:41:51 +0800	[thread overview]
Message-ID: <87zhvce4xs.fsf@gmail.com> (raw)
In-Reply-To: <87d0s8fk5p.fsf@gmail.com>


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0002-java-utils-Use-strip-store-file-name.patch --]
[-- Type: text/x-diff, Size: 1868 bytes --]

From 3ddcfde711ce4a9cbff09c8b54f65bb2a977c094 Mon Sep 17 00:00:00 2001
From: Alex Vong <alexvong1995@gmail.com>
Date: Thu, 18 Oct 2018 03:08:31 +0800
Subject: [PATCH 2/2] java-utils: Use 'strip-store-file-name'.

See the discussion at
<https://lists.gnu.org/archive/html/guix-devel/2018-10/msg00250.html>.

* guix/build/java-utils.scm (package-name-version): Remove it.
(install-javadoc): Use 'strip-store-file-name' instead of
'package-name-version'.
---
 guix/build/java-utils.scm | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/guix/build/java-utils.scm b/guix/build/java-utils.scm
index 128be1ede..7c9cafacc 100644
--- a/guix/build/java-utils.scm
+++ b/guix/build/java-utils.scm
@@ -23,12 +23,6 @@
             install-jars
             install-javadoc))
 
-;; Copied from haskell-build-system.scm
-(define (package-name-version store-dir)
-  "Given a store directory STORE-DIR return 'name-version' of the package."
-  (let* ((base (basename store-dir)))
-    (string-drop base (+ 1 (string-index base #\-)))))
-
 (define* (ant-build-javadoc #:key (target "javadoc") (make-flags '())
                             #:allow-other-keys)
   (apply invoke `("ant" ,target ,@make-flags)))
@@ -48,8 +42,9 @@ is used in case the build.xml does not include an install target."
 install javadocs when this is not done by the install target."
   (lambda* (#:key outputs #:allow-other-keys)
     (let* ((out (assoc-ref outputs "out"))
+           (name-version (strip-store-file-name out))
            (docs (string-append (or (assoc-ref outputs "doc") out)
-                                "/share/doc/" (package-name-version out) "/")))
+                                "/share/doc/" name-version "/")))
       (mkdir-p docs)
       (copy-recursively apidoc-directory docs)
       #t)))
-- 
2.19.1


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  parent reply	other threads:[~2018-10-17 19:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-17 19:27 [bug#33077] [PATCH 0/2] Use 'strip-store-file-name' instead of 'package-name-version' Alex Vong
2018-10-17 19:37 ` Alex Vong
2018-10-17 19:51   ` Alex Vong
2018-10-17 19:40 ` [bug#33077] [PATCH 1/2] build-system/haskell: Use 'strip-store-file-name' Alex Vong
2018-10-17 19:41 ` Alex Vong [this message]
2018-10-17 19:54 ` Alex Vong
2018-10-19 21:20   ` bug#33077: " Ludovic Courtès
2018-10-17 19:55 ` [bug#33077] [PATCH 2/2] java-utils: " Alex Vong

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhvce4xs.fsf@gmail.com \
    --to=alexvong1995@gmail.com \
    --cc=33077@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 public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).