Mirror of GNU Guix
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.

117 lines
5.0 KiB

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
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 © 2012, 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
  3. ;;;
  4. ;;; This file is part of GNU Guix.
  5. ;;;
  6. ;;; GNU Guix is free software; you can redistribute it and/or modify it
  7. ;;; under the terms of the GNU General Public License as published by
  8. ;;; the Free Software Foundation; either version 3 of the License, or (at
  9. ;;; your option) any later version.
  10. ;;;
  11. ;;; GNU Guix is distributed in the hope that it will be useful, but
  12. ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
  13. ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. ;;; GNU General Public License for more details.
  15. ;;;
  16. ;;; You should have received a copy of the GNU General Public License
  17. ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
  18. (define-module (gnu packages pkg-config)
  19. #:use-module (guix licenses)
  20. #:use-module (guix packages)
  21. #:use-module (guix download)
  22. #:use-module (guix build-system gnu)
  23. #:use-module (guix build-system trivial)
  24. #:export (pkg-config))
  25. ;; This is the "primitive" pkg-config package. People should use `pkg-config'
  26. ;; (see below) rather than `%pkg-config', but we export `%pkg-config' so that
  27. ;; `fold-packages' finds it.
  28. (define-public %pkg-config
  29. (package
  30. (name "pkg-config")
  31. (version "0.29.2")
  32. (source (origin
  33. (method url-fetch)
  34. (uri (list
  35. (string-append
  36. "http://fossies.org/linux/misc/pkg-config-" version
  37. ".tar.gz")
  38. ;; FIXME: The following URL redirects to HTTPS, which
  39. ;; creates bootstrapping problems:
  40. ;; <http://bugs.gnu.org/22774>.
  41. (string-append
  42. "http://pkgconfig.freedesktop.org/releases/pkg-config-"
  43. version ".tar.gz")))
  44. (sha256
  45. (base32
  46. "14fmwzki1rlz8bs2p810lk6jqdxsk966d8drgsjmi54cd00rrikg"))))
  47. (build-system gnu-build-system)
  48. (arguments `(#:configure-flags '("--with-internal-glib")))
  49. (native-search-paths
  50. (list (search-path-specification
  51. (variable "PKG_CONFIG_PATH")
  52. (files '("lib/pkgconfig" "lib64/pkgconfig" "share/pkgconfig")))))
  53. (home-page "https://www.freedesktop.org/wiki/Software/pkg-config")
  54. (license gpl2+)
  55. (synopsis "Helper tool used when compiling applications and libraries")
  56. (description
  57. "pkg-config is a helper tool used when compiling applications and
  58. libraries. It helps you insert the correct compiler options on the
  59. command line so an application can use gcc -o test test.c `pkg-config
  60. --libs --cflags glib-2.0` for instance, rather than hard-coding values
  61. on where to find glib (or other libraries). It is language-agnostic, so
  62. it can be used for defining the location of documentation tools, for
  63. instance.")))
  64. (define (cross-pkg-config target)
  65. "Return a pkg-config for TARGET, essentially just a wrapper called
  66. `TARGET-pkg-config', as `configure' scripts like it."
  67. ;; See <http://www.flameeyes.eu/autotools-mythbuster/pkgconfig/cross-compiling.html>
  68. ;; for details.
  69. (package (inherit %pkg-config)
  70. (name (string-append (package-name %pkg-config) "-" target))
  71. (build-system trivial-build-system)
  72. (arguments
  73. `(#:modules ((guix build utils))
  74. #:builder (begin
  75. (use-modules (guix build utils))
  76. (let* ((in (assoc-ref %build-inputs "pkg-config"))
  77. (out (assoc-ref %outputs "out"))
  78. (bin (string-append out "/bin"))
  79. (prog (string-append ,target "-pkg-config"))
  80. (native (string-append in "/bin/pkg-config")))
  81. (mkdir-p bin)
  82. ;; Create a `TARGET-pkg-config' -> `pkg-config' symlink.
  83. ;; This satisfies the pkg.m4 macros, which use
  84. ;; AC_PROG_TOOL to determine the `pkg-config' program
  85. ;; name.
  86. (symlink native (string-append bin "/" prog))
  87. ;; Also make 'pkg.m4' available, some packages might
  88. ;; expect it.
  89. (mkdir-p (string-append out "/share"))
  90. (symlink (string-append in "/share/aclocal")
  91. (string-append out "/share/aclocal"))))))
  92. (native-inputs `(("pkg-config" ,%pkg-config)))
  93. ;; Ignore native inputs, and set `PKG_CONFIG_PATH' for target inputs.
  94. (native-search-paths '())
  95. (search-paths (package-native-search-paths %pkg-config))))
  96. (define (pkg-config-for-target target)
  97. "Return a pkg-config package for TARGET, which may be either #f for a native
  98. build, or a GNU triplet."
  99. (if target
  100. (cross-pkg-config target)
  101. %pkg-config))
  102. ;; This hack allows us to automatically choose the native or the cross
  103. ;; `pkg-config' depending on whether it's being used in a cross-build
  104. ;; environment or not.
  105. (define-syntax pkg-config
  106. (identifier-syntax (pkg-config-for-target (%current-target-system))))