You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

249 lines
11 KiB

2 years ago
gnu: packages: Use 'search-patches' everywhere. * gnu/packages/abiword.scm: Use 'search-patches' for 'patches' field. * gnu/packages/acl.scm: Likewise. * gnu/packages/admin.scm: Likewise. * gnu/packages/algebra.scm: Likewise. * gnu/packages/animation.scm: Likewise. * gnu/packages/apr.scm: Likewise. * gnu/packages/audacity.scm: Likewise. * gnu/packages/audio.scm: Likewise. * gnu/packages/autotools.scm: Likewise. * gnu/packages/avahi.scm: Likewise. * gnu/packages/backup.scm: Likewise. * gnu/packages/base.scm: Likewise. * gnu/packages/bash.scm: Likewise. * gnu/packages/bioinformatics.scm: Likewise. * gnu/packages/cdrom.scm: Likewise. * gnu/packages/ci.scm: Likewise. * gnu/packages/cmake.scm: Likewise. * gnu/packages/cpio.scm: Likewise. * gnu/packages/cross-base.scm: Likewise. * gnu/packages/dico.scm: Likewise. * gnu/packages/doxygen.scm: Likewise. * gnu/packages/ebook.scm: Likewise. * gnu/packages/elf.scm: Likewise. * gnu/packages/emacs.scm: Likewise. * gnu/packages/engineering.scm: Likewise. * gnu/packages/firmware.scm: Likewise. * gnu/packages/flashing-tools.scm: Likewise. * gnu/packages/fltk.scm: Likewise. * gnu/packages/ftp.scm: Likewise. * gnu/packages/games.scm: Likewise. * gnu/packages/gawk.scm: Likewise. * gnu/packages/gcc.scm: Likewise. * gnu/packages/gd.scm: Likewise. * gnu/packages/ghostscript.scm: Likewise. * gnu/packages/glib.scm: Likewise. * gnu/packages/gnome.scm: Likewise. * gnu/packages/gnucash.scm: Likewise. * gnu/packages/gnunet.scm: Likewise. * gnu/packages/gnupg.scm: Likewise. * gnu/packages/gnuzilla.scm: Likewise. * gnu/packages/graphics.scm: Likewise. * gnu/packages/grub.scm: Likewise. * gnu/packages/gtk.scm: Likewise. * gnu/packages/guile.scm: Likewise. * gnu/packages/icu4c.scm: Likewise. * gnu/packages/idutils.scm: Likewise. * gnu/packages/image.scm: Likewise. * gnu/packages/imagemagick.scm: Likewise. * gnu/packages/irc.scm: Likewise. * gnu/packages/ldc.scm: Likewise. * gnu/packages/libcanberra.scm: Likewise. * gnu/packages/libevent.scm: Likewise. * gnu/packages/libreoffice.scm: Likewise. * gnu/packages/libunwind.scm: Likewise. * gnu/packages/libusb.scm: Likewise. * gnu/packages/linux.scm: Likewise. * gnu/packages/lirc.scm: Likewise. * gnu/packages/llvm.scm: Likewise. * gnu/packages/lsh.scm: Likewise. * gnu/packages/lua.scm: Likewise. * gnu/packages/lxqt.scm: Likewise. * gnu/packages/mail.scm: Likewise. * gnu/packages/maths.scm: Likewise. * gnu/packages/mcrypt.scm: Likewise. * gnu/packages/messaging.scm: Likewise. * gnu/packages/mit-krb5.scm: Likewise. * gnu/packages/mp3.scm: Likewise. * gnu/packages/multiprecision.scm: Likewise. * gnu/packages/music.scm: Likewise. * gnu/packages/ninja.scm: Likewise. * gnu/packages/nvi.scm: Likewise. * gnu/packages/ocaml.scm: Likewise. * gnu/packages/orpheus.scm: Likewise. * gnu/packages/ots.scm: Likewise. * gnu/packages/parallel.scm: Likewise. * gnu/packages/patchutils.scm: Likewise. * gnu/packages/pcre.scm: Likewise. * gnu/packages/pdf.scm: Likewise. * gnu/packages/perl.scm: Likewise. * gnu/packages/plotutils.scm: Likewise. * gnu/packages/polkit.scm: Likewise. * gnu/packages/pulseaudio.scm: Likewise. * gnu/packages/python.scm: Likewise. * gnu/packages/qemu.scm: Likewise. * gnu/packages/qt.scm: Likewise. * gnu/packages/ratpoison.scm: Likewise. * gnu/packages/rdf.scm: Likewise. * gnu/packages/readline.scm: Likewise. * gnu/packages/rush.scm: Likewise. * gnu/packages/scheme.scm: Likewise. * gnu/packages/screen.scm: Likewise. * gnu/packages/sdl.scm: Likewise. * gnu/packages/slim.scm: Likewise. * gnu/packages/ssh.scm: Likewise. * gnu/packages/tcl.scm: Likewise. * gnu/packages/tcsh.scm: Likewise. * gnu/packages/texinfo.scm: Likewise. * gnu/packages/tls.scm: Likewise. * gnu/packages/tor.scm: Likewise. * gnu/packages/tv.scm: Likewise. * gnu/packages/valgrind.scm: Likewise. * gnu/packages/version-control.scm: Likewise. * gnu/packages/video.scm: Likewise. * gnu/packages/vpn.scm: Likewise. * gnu/packages/vtk.scm: Likewise. * gnu/packages/w3m.scm: Likewise. * gnu/packages/web.scm: Likewise. * gnu/packages/wicd.scm: Likewise. * gnu/packages/wm.scm: Likewise. * gnu/packages/xdisorg.scm: Likewise. * gnu/packages/xfce.scm: Likewise. * gnu/packages/xiph.scm: Likewise. * gnu/packages/xml.scm: Likewise. * gnu/packages/xorg.scm: Likewise. * gnu/packages/zip.scm: Likewise.
6 years ago
gnu: Some cleanup based on lint checkers. * gnu/packages/admin.scm, gnu/packages/aidc.scm, gnu/packages/algebra.scm, gnu/packages/apr.scm, gnu/packages/avahi.scm, gnu/packages/backup.scm, gnu/packages/base.scm, gnu/packages/calcurse.scm, gnu/packages/cdrom.scm, gnu/packages/check.scm, gnu/packages/compression.scm, gnu/packages/cook.scm, gnu/packages/crypto.scm, gnu/packages/cryptsetup.scm, gnu/packages/curl.scm, gnu/packages/cyrus-sasl.scm, gnu/packages/databases.scm, gnu/packages/doxygen.scm, gnu/packages/dwm.scm, gnu/packages/elf.scm, gnu/packages/emacs.scm, gnu/packages/feh.scm, gnu/packages/file.scm, gnu/packages/fish.scm, gnu/packages/flex.scm, gnu/packages/fltk.scm, gnu/packages/fontutils.scm, gnu/packages/games.scm, gnu/packages/gcal.scm, gnu/packages/gcc.scm, gnu/packages/geeqie.scm, gnu/packages/ghostscript.scm, gnu/packages/gimp.scm, gnu/packages/gl.scm, gnu/packages/glib.scm, gnu/packages/gnome.scm, gnu/packages/gnunet.scm, gnu/packages/gnupg.scm, gnu/packages/gperf.scm, gnu/packages/grub.scm, gnu/packages/gsasl.scm, gnu/packages/gtk.scm, gnu/packages/guile-wm.scm, gnu/packages/guile.scm, gnu/packages/hurd.scm, gnu/packages/icu4c.scm, gnu/packages/image.scm, gnu/packages/imagemagick.scm, gnu/packages/irssi.scm, gnu/packages/kde.scm, gnu/packages/libdaemon.scm, gnu/packages/libevent.scm, gnu/packages/libidn.scm, gnu/packages/libusb.scm, gnu/packages/linux.scm, gnu/packages/lout.scm, gnu/packages/lsh.scm, gnu/packages/lsof.scm, gnu/packages/lua.scm, gnu/packages/maths.scm, gnu/packages/mcrypt.scm, gnu/packages/mp3.scm, gnu/packages/netpbm.scm, gnu/packages/noweb.scm, gnu/packages/ocaml.scm, gnu/packages/openssl.scm, gnu/packages/pcre.scm, gnu/packages/pdf.scm, gnu/packages/pkg-config.scm, gnu/packages/pretty-print.scm, gnu/packages/python.scm, gnu/packages/qt.scm, gnu/packages/rsync.scm, gnu/packages/scheme.scm, gnu/packages/scrot.scm, gnu/packages/sdl.scm, gnu/packages/skribilo.scm, gnu/packages/ssh.scm, gnu/packages/stalonetray.scm, gnu/packages/tcl.scm, gnu/packages/tcsh.scm, gnu/packages/telephony.scm, gnu/packages/texlive.scm, gnu/packages/tor.scm, gnu/packages/valgrind.scm, gnu/packages/version-control.scm, gnu/packages/vim.scm, gnu/packages/vpn.scm, gnu/packages/w3m.scm, gnu/packages/web.scm, gnu/packages/wordnet.scm, gnu/packages/xiph.scm, gnu/packages/xml.scm, gnu/packages/xorg.scm, gnu/packages/zile.scm, gnu/packages/zip.scm, gnu/packages/zsh.scm [synopsis, description]: Adjust according to lint checkers. * gnu/packages/fltk.scm (fltk)[source]: Wrap long line in uri. * /gnu/packages/xiph.scm (libogg, libtheora, vorbis-tools)[source]: Same.
7 years ago
  1. ;;; GNU Guix --- Functional package management for GNU
  2. ;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org>
  3. ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
  4. ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
  5. ;;; Copyright © 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
  6. ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
  7. ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
  8. ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com>
  9. ;;; Copyright © 2020 Mark Wielaard <mark@klomp.org>
  10. ;;;
  11. ;;; This file is part of GNU Guix.
  12. ;;;
  13. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  14. ;;; under the terms of the GNU General Public License as published by
  15. ;;; the Free Software Foundation; either version 3 of the License, or (at
  16. ;;; your option) any later version.
  17. ;;;
  18. ;;; GNU Guix is distributed in the hope that it will be useful, but
  19. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  20. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  21. ;;; GNU General Public License for more details.
  22. ;;;
  23. ;;; You should have received a copy of the GNU General Public License
  24. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  25. (define-module (gnu packages elf)
  26. #:use-module (guix utils)
  27. #:use-module (guix packages)
  28. #:use-module (guix download)
  29. #:use-module (guix build-system gnu)
  30. #:use-module ((guix licenses) #:select (gpl3+ lgpl3+ lgpl2.0+))
  31. #:use-module (gnu packages)
  32. #:use-module (gnu packages compression)
  33. #:use-module (gnu packages documentation)
  34. #:use-module (gnu packages gcc)
  35. #:use-module (gnu packages m4)
  36. #:use-module (gnu packages pkg-config)
  37. #:use-module (gnu packages python)
  38. #:use-module (gnu packages sphinx)
  39. #:use-module (gnu packages texinfo)
  40. #:use-module (gnu packages xml)
  41. #:use-module (srfi srfi-1)
  42. #:use-module (srfi srfi-26))
  43. (define-public elfutils
  44. (package
  45. (name "elfutils")
  46. (version "0.176")
  47. (source (origin
  48. (method url-fetch)
  49. (uri (string-append "https://sourceware.org/elfutils/ftp/"
  50. version "/elfutils-" version ".tar.bz2"))
  51. (sha256
  52. (base32
  53. "08qhrl4g6qqr4ga46jhh78y56a47p3msa5b2x1qhzbxhf71lfmzb"))
  54. (patches (search-patches "elfutils-tests-ptrace.patch"))))
  55. (build-system gnu-build-system)
  56. ;; Separate programs because that's usually not what elfutils users want,
  57. ;; and because they duplicate what Binutils provides (but are named
  58. ;; differently, using the eu- prefix and can be installed in parallel).
  59. (outputs '("out" ; libelf.so, elfutils/*.h, etc.
  60. "bin")) ; eu-nm, eu-objdump, etc.
  61. (arguments
  62. ;; Programs don't have libelf.so in their RUNPATH and libraries don't
  63. ;; know where to find each other.
  64. `(#:configure-flags (list (string-append "LDFLAGS=-Wl,-rpath="
  65. (assoc-ref %outputs "out")
  66. "/lib"))
  67. ;; Disable tests on MIPS and PowerPC (without changing
  68. ;; the arguments list on other systems).
  69. ,@(if (any (cute string-prefix? <> (or (%current-target-system)
  70. (%current-system)))
  71. '("mips" "powerpc"))
  72. '(#:tests? #f)
  73. '())
  74. #:phases
  75. (modify-phases %standard-phases
  76. ;; No reason has been found for this test to reliably fail on aarch64-linux.
  77. (add-after 'unpack 'disable-failing-aarch64-tests
  78. (lambda _
  79. (substitute* "tests/Makefile.in"
  80. (("run-backtrace-native.sh") ""))
  81. #t)))))
  82. (native-inputs `(("m4" ,m4)))
  83. (inputs `(("zlib" ,zlib)))
  84. (home-page "https://sourceware.org/elfutils/")
  85. (synopsis "Collection of utilities and libraries to handle ELF files and
  86. DWARF data")
  87. (description
  88. "Elfutils is a collection of utilities and libraries to read, create and
  89. modify Executable and Linkable Format (@dfn{ELF}) binary files, find and
  90. handle Debugging With Arbitrary Record Formats (@dfn{DWARF}) debug data,
  91. symbols, thread state and stacktraces for processes and core files on
  92. GNU/Linux. Elfutils includes @file{libelf} for manipulating ELF files,
  93. @file{libdw} for inspecting DWARF data and process state and utilities like
  94. @command{eu-stack} (to show backtraces), @command{eu-nm} (for listing symbols
  95. from object files), @command{eu-size} (for listing the section sizes of an
  96. object or archive file), @command{eu-strip} (for discarding symbols),
  97. @command{eu-readelf} (to see the raw ELF file structures),
  98. @command{eu-elflint} (to check for well-formed ELF files),
  99. @command{eu-elfcompress} (to compress or decompress ELF sections), and more.")
  100. ;; Libraries are dual-licensed LGPLv3.0+ | GPLv2, and programs are GPLv3+.
  101. (license lgpl3+)))
  102. (define-public libabigail
  103. (package
  104. (name "libabigail")
  105. (home-page "https://sourceware.org/libabigail/")
  106. (version "1.7")
  107. (source (origin
  108. (method url-fetch)
  109. (uri (string-append "https://sourceware.org/pub/libabigail/"
  110. "libabigail-" version ".tar.gz"))
  111. (sha256
  112. (base32
  113. "0bf8w01l6wm7mm4clfg5rqi30m1ws11qqa4bp2vxghfwgi9ai8i7"))))
  114. (build-system gnu-build-system)
  115. (arguments
  116. `(#:configure-flags '("--disable-static"
  117. "--enable-bash-completion"
  118. "--enable-manual")
  119. #:make-flags '("V=1")
  120. #:phases (modify-phases %standard-phases
  121. (add-after 'unpack 'patch-source
  122. (lambda _
  123. (substitute* "build-aux/ltmain.sh"
  124. ;; Don't add -specs=/usr/lib/rpm/redhat/redhat-hardened-ld
  125. ;; to the GCC command line.
  126. (("compiler_flags=\"-specs=.*")
  127. "compiler_flags=\n"))
  128. #t))
  129. (add-after 'build 'build-documentation
  130. (lambda _
  131. (invoke "make" "-C" "doc/manuals" "html-doc" "man" "info")))
  132. (add-before 'check 'set-test-environment
  133. (lambda _
  134. (setenv "XDG_CACHE_HOME" "/tmp")
  135. #t))
  136. (add-after 'install 'install-documentation
  137. (lambda _
  138. (invoke "make" "-C" "doc/manuals"
  139. "install-man-and-info-doc")))
  140. (add-after 'install-documentation 'install-bash-completion
  141. (lambda* (#:key outputs #:allow-other-keys)
  142. (for-each (lambda (file)
  143. (install-file
  144. file (string-append (assoc-ref outputs "out")
  145. "/share/bash-completion"
  146. "/completions")))
  147. (find-files "bash-completion" ".*abi.*"))
  148. #t)))))
  149. (native-inputs
  150. `(("pkg-config" ,pkg-config)
  151. ("makeinfo" ,texinfo)
  152. ("python-sphinx" ,python-sphinx)
  153. ("python" ,python))) ;for tests
  154. (propagated-inputs
  155. `(("elfutils" ,elfutils) ;libabigail.la says -lelf
  156. ("libxml2" ,libxml2))) ;in Requires.private of libabigail.pc
  157. (synopsis "Analyze application binary interfaces (ABIs)")
  158. (description
  159. "@dfn{ABIGAIL} stands for the Application Binary Interface Generic
  160. Analysis and Instrumentation Library. It is a framework which aims at
  161. helping developers and software distributors to spot ABI-related issues
  162. like interface incompatibility in ELF shared libraries by performing a
  163. static analysis of the ELF binaries at hand.")
  164. (license lgpl3+)))
  165. (define-public libelf
  166. (package
  167. (name "libelf")
  168. (version "0.8.13")
  169. (source
  170. (origin
  171. (method url-fetch)
  172. (uri (list
  173. ;; As of May 2019, the original URL at mr511.de redirects to a
  174. ;; domain that doesn't resolve. Use these two mirrors instead.
  175. (string-append "https://fossies.org/linux/misc/old/"
  176. "libelf-" version ".tar.gz")
  177. (string-append "https://ftp.osuosl.org/pub/blfs/conglomeration/"
  178. "libelf/libelf-" version ".tar.gz")))
  179. (sha256
  180. (base32
  181. "0vf7s9dwk2xkmhb79aigqm0x0yfbw1j0b9ksm51207qwr179n6jr"))))
  182. (build-system gnu-build-system)
  183. (arguments
  184. `(#:phases
  185. (modify-phases %standard-phases
  186. (replace 'configure
  187. (lambda* (#:key outputs #:allow-other-keys)
  188. ;; This old `configure' script doesn't support
  189. ;; variables passed as arguments.
  190. (let ((out (assoc-ref outputs "out")))
  191. (setenv "CONFIG_SHELL" (which "bash"))
  192. (invoke "./configure"
  193. (string-append "--prefix=" out)
  194. ,@(if (string=? "aarch64-linux"
  195. (%current-system))
  196. '("--host=aarch64-unknown-linux-gnu")
  197. '()))))))))
  198. (home-page (string-append "https://web.archive.org/web/20181111033959/"
  199. "http://www.mr511.de/software/english.html"))
  200. (synopsis "ELF object file access library")
  201. (description "Libelf is a C library to access ELF object files.")
  202. (license lgpl2.0+)))
  203. (define-public patchelf
  204. (package
  205. (name "patchelf")
  206. (version "0.10")
  207. (source (origin
  208. (method url-fetch)
  209. (uri (string-append
  210. "https://nixos.org/releases/patchelf/patchelf-"
  211. version
  212. "/patchelf-" version ".tar.bz2"))
  213. (sha256
  214. (base32
  215. "1wzwvnlyf853hw9zgqq5522bvf8gqadk8icgqa41a5n7593csw7n"))))
  216. (build-system gnu-build-system)
  217. (arguments
  218. '(#:phases
  219. (modify-phases %standard-phases
  220. (add-after 'unpack 'fix-tests
  221. ;; Our GCC code ensures that RUNPATH is never empty, it includes
  222. ;; at least glibc/lib and gcc:lib/lib.
  223. (lambda* (#:key inputs #:allow-other-keys)
  224. (substitute* "tests/no-rpath.sh"
  225. ;; Disable checking for an empty runpath:
  226. (("^if test.*") "")
  227. ;; Find libgcc_s.so, which is necessary for the test:
  228. (("/xxxxxxxxxxxxxxx") (string-append (assoc-ref inputs "gcc:lib")
  229. "/lib")))
  230. #t)))))
  231. (native-inputs
  232. `(("gcc:lib" ,gcc "lib")))
  233. (home-page "https://nixos.org/patchelf.html")
  234. (synopsis "Modify the dynamic linker and RPATH of ELF executables")
  235. (description
  236. "PatchELF allows the ELF \"interpreter\" and RPATH of an ELF binary to be
  237. changed.")
  238. (license gpl3+)))