unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: hop: Remove use of patchelf.
@ 2015-05-06  1:29 Eric Bavier
  2015-05-06  7:29 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Bavier @ 2015-05-06  1:29 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 46 bytes --]

As a follow-up to my previous patch.

`~Eric


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-hop-Remove-use-of-patchelf.patch --]
[-- Type: text/x-diff; name=0001-gnu-hop-Remove-use-of-patchelf.patch, Size: 6946 bytes --]

From bc5eba1477f21fa09502f14043c7b67e528c6f47 Mon Sep 17 00:00:00 2001
From: Eric Bavier <bavier@member.fsf.org>
Date: Tue, 5 May 2015 20:21:38 -0500
Subject: [PATCH] gnu: hop: Remove use of patchelf.

* gnu/packages/patches/hop-linker-flags.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/scheme.scm (source)[patches]: Use it.
  (arguments)[phases]: Remove patch-rpath phase.
  [modules, imported-modules]: Remove.
  (native-inputs): Remove field.
---
 gnu-system.am                               |    1 +
 gnu/packages/patches/hop-linker-flags.patch |   60 +++++++++++++++++++++++++++
 gnu/packages/scheme.scm                     |   36 +++++-----------
 3 files changed, 72 insertions(+), 25 deletions(-)
 create mode 100644 gnu/packages/patches/hop-linker-flags.patch

diff --git a/gnu-system.am b/gnu-system.am
index 798188f..63e5ca6 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -451,6 +451,7 @@ dist_patch_DATA =						\
   gnu/packages/patches/guix-test-networking.patch		\
   gnu/packages/patches/gtkglext-disable-disable-deprecated.patch \
   gnu/packages/patches/hop-bigloo-4.0b.patch			\
+  gnu/packages/patches/hop-linker-flags.patch			\
   gnu/packages/patches/inetutils-syslogd.patch			\
   gnu/packages/patches/irrlicht-mesa-10.patch			\
   gnu/packages/patches/jbig2dec-ignore-testtest.patch		\
diff --git a/gnu/packages/patches/hop-linker-flags.patch b/gnu/packages/patches/hop-linker-flags.patch
new file mode 100644
index 0000000..f1f5dbf
--- /dev/null
+++ b/gnu/packages/patches/hop-linker-flags.patch
@@ -0,0 +1,60 @@
+Make hop's link rules honor flags set by the --blflags configure argument.
+
+--- hop-2.4.0/src/Makefile	2015-05-05 19:41:04.800151036 -0500
++++ hop-2.4.0/src/Makefile	2015-05-05 19:40:40.916150417 -0500
+@@ -69,10 +69,10 @@
+ 	$(MAKE) link.$(LINK) DEST=$@
+ 
+ link.dynamic:
+-	@ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST))
++	@ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$(DEST))
+ 
+ link.static:
+-	@ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST))
++	@ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),-static-all-bigloo $(OBJECTS),-o,$(DEST))
+ 
+ link.library:
+ 	echo "***ERROR: link.library not currently supported!"
+--- hop-2.4.0/hopc/Makefile	2013-01-30 07:17:59.000000000 -0600
++++ hop-2.4.0/hopc/Makefile	2015-05-05 19:45:21.876157699 -0500
+@@ -62,7 +62,7 @@
+ 	mkdir -p $@
+ 
+ $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS)
+-	@ $(call link,$(BIGLOO),$(BCFLAGS),,$(OBJECTS),-o,$@)
++	@ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@)
+ 
+ $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib
+ 	$(JAR) $@ META-INF/MANIFEST.MF -C o/class_s .
+--- hop-2.4.0/hophz/Makefile	2013-01-30 07:17:59.000000000 -0600
++++ hop-2.4.0/hophz/Makefile	2015-05-05 19:59:42.996180030 -0500
+@@ -16,9 +16,6 @@
+ -include ../etc/Makefile.hopconfig
+ -include ../etc/Makefile.version
+ 
+-BLFLAGS		= 
+-BLINKFLAGS 	= -suffix hop
+-
+ #*---------------------------------------------------------------------*/
+ #*    Target and Project                                               */
+ #*---------------------------------------------------------------------*/
+@@ -72,7 +69,7 @@
+ 	mkdir -p $@
+ 
+ $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS)
+-	@ $(call link,$(BIGLOO),$(BCFLAGS),$(BLINKFLAGS),$(OBJECTS),-o,$@)
++	@ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@)
+ 
+ $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib
+ 	@ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s .
+--- hop-2.4.0/hopsh/Makefile	2013-01-30 07:17:59.000000000 -0600
++++ hop-2.4.0/hopsh/Makefile	2015-05-05 19:46:36.060159626 -0500
+@@ -60,7 +60,7 @@
+ 	mkdir -p $@
+ 
+ $(BUILDBINDIR)/$(EXEC): .afile .etags $(OBJECTS)
+-	@ $(call link,$(BIGLOO),$(BCFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@)
++	@ $(call link,$(BIGLOO),$(BCFLAGS) $(BLFLAGS),$(BCFLAGSDEV),$(OBJECTS),-o,$@)
+ 
+ $(BUILDBINDIR)/$(EXEC).jar: .afile .etags .jfile $(BGL_CLASSES) META-INF/MANIFEST.MF jvm-stdlibs jvm-share jvm-lib
+ 	@ $(JAR) $@ META-INF/MANIFEST.MF -C o/class_s .
diff --git a/gnu/packages/scheme.scm b/gnu/packages/scheme.scm
index ae85979..adbb579 100644
--- a/gnu/packages/scheme.scm
+++ b/gnu/packages/scheme.scm
@@ -235,39 +235,25 @@ Scheme and C programs and between Scheme and Java programs.")
              (sha256
               (base32
                "1v2r4ga58kk1sx0frn8qa8ccmjpic9csqzpk499wc95y9c4b1wy3"))
-             (patches (list (search-patch "hop-bigloo-4.0b.patch")))))
+             (patches (list (search-patch "hop-bigloo-4.0b.patch")
+                            (search-patch "hop-linker-flags.patch")))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (alist-replace
         'configure
-        (lambda* (#:key inputs outputs #:allow-other-keys)
+        (lambda* (#:key outputs #:allow-other-keys)
           (let ((out (assoc-ref outputs "out")))
             (zero?
              (system* "./configure"
-                      (string-append "--prefix=" out)))))
-        (alist-cons-after
-         'strip 'patch-rpath
-         (lambda* (#:key outputs #:allow-other-keys)
-           ;; Add $out/lib to the RPATH of every installed library and
-           ;; executable.  Note that "patchelf --set-rpath" produces invalid
-           ;; binaries when used before stripping.
-           (let* ((out (assoc-ref outputs "out"))
-                  (lib (string-append out "/lib")))
-             (with-directory-excursion out
-               (every (cut augment-rpath <> lib)
-                      (append (find-files "bin" ".*")
-                              (find-files "lib" "\\.so$"))))))
-         %standard-phases))
-       #:tests? #f                                ; no test suite
-       #:modules ((guix build gnu-build-system)
-                  (guix build utils)
-                  (guix build rpath)
-                  (srfi srfi-26)
-                  (srfi srfi-1))
-       #:imported-modules (,@%gnu-build-system-modules
-                           (guix build rpath))))
-    (native-inputs `(("patchelf" ,patchelf)))
+                      (string-append "--prefix=" out)
+                      (string-append "--blflags="
+                                     ;; user flags completely override useful
+                                     ;; default flags, so repeat them here.
+                                     "-copt \\$(CPICFLAGS) -L\\$(BUILDLIBDIR) "
+                                     "-ldopt -Wl,-rpath," out "/lib")))))
+        %standard-phases)
+       #:tests? #f))                                ; no test suite
     (inputs `(("bigloo" ,bigloo)
               ("which" ,which)))
     (home-page "http://hop.inria.fr/")
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: hop: Remove use of patchelf.
  2015-05-06  1:29 [PATCH] gnu: hop: Remove use of patchelf Eric Bavier
@ 2015-05-06  7:29 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-05-06  7:29 UTC (permalink / raw)
  To: Eric Bavier; +Cc: guix-devel

Eric Bavier <bavier@member.fsf.org> skribis:

> From bc5eba1477f21fa09502f14043c7b67e528c6f47 Mon Sep 17 00:00:00 2001
> From: Eric Bavier <bavier@member.fsf.org>
> Date: Tue, 5 May 2015 20:21:38 -0500
> Subject: [PATCH] gnu: hop: Remove use of patchelf.
>
> * gnu/packages/patches/hop-linker-flags.patch: New file.
> * gnu-system.am (dist_patch_DATA): Add it.
> * gnu/packages/scheme.scm (source)[patches]: Use it.
>   (arguments)[phases]: Remove patch-rpath phase.
>   [modules, imported-modules]: Remove.
>   (native-inputs): Remove field.

OK.  Thanks for being so quick!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-05-06  7:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06  1:29 [PATCH] gnu: hop: Remove use of patchelf Eric Bavier
2015-05-06  7:29 ` Ludovic Courtès

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).