;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Efraim Flashner ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along wit
aboutsummaryrefslogtreecommitdiff
#!/bin/sh
# Print a version string.
scriptversion=2017-01-09.19; # UTC

# Copyright (C) 2007-2017 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
# It may be run two ways:
# - from a git repository in which the "git describe" command below
#   produces useful output (thus requiring at least one signed tag)
# - from a non-git-repo directory containing a .tarball-version file, which
#   presumes this script is invoked like "./git-version-gen .tarball-version".

# In order to use intra-version strings in your project, you will need two
# separate generated version string files:
#
# .tarball-version - present only in a distribution tarball, and not in
#   a checked-out repository.  Created with contents that were learned at
#   the last time autoconf was run, and used by git-version-gen.  Must not
#   be present in either $(srcdir) or $(builddir) for git-version-gen to
#   give accurate answers during normal development with a checked out tree,
#   but must be present in a tarball when there is no version control system.
#   Therefore, it cannot be used in any dependencies.  GNUmakefile has
#   hooks to force a reconfigure at distribution time to get the value
#   correct, without penalizing normal development with extra reconfigures.
#
# .version - present in a checked-out repository and in a distribution
#   tarball.  Usable in dependencies, particularly for files that don't
#   want to depend on config.h but do want to track version changes.
#   Delete this file prior to any autoconf run where you want to rebuild
#   files to pick up a version string change; and leave it stale to
#   minimize rebuild time after unrelated changes to configure sources.
#
# As with any generated file in a VC'd directory, you should add
# /.version to .gitignore, so that you don't accidentally commit it.
# .tarball-version is never generated in a VC'd directory, so needn't
# be listed there.
#
# Use the following line in your configure.ac, so that $(VERSION) will
# automatically be up-to-date each time configure is run (and note that
# since configure.ac no longer includes a version string, Makefile rules
# should not depend on configure.ac for version updates).
#
# AC_INIT([GNU project],
#         m4_esyscmd([build-aux/git-version-gen .tarball-version]),
#         [bug-project@example])
#
# Then use the following lines in your Makefile.am, so that .version
# will be present for dependencies, and so that .version and
# .tarball-version will exist in distribution tarballs.
#
# EXTRA_DIST = $(top_srcdir)/.version
# BUILT_SOURCES = $(top_srcdir)/.version
# $(top_srcdir)/.version:
#	echo $(VERSION) > $@-t && mv $@-t $@
# dist-hook:
#	echo $(VERSION) > $(distdir)/.tarball-version


me=$0

version="git-version-gen $scriptversion

Copyright 2011 Free Software Foundation, Inc.
There is NO warranty.  You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING."

usage="\
Usage: $me [OPTION]... \$srcdir/.tarball-version [TAG-NORMALIZATION-SED-SCRIPT]
Print a version string.

Options:

   --prefix PREFIX    prefix of git tags (default 'v')
   --fallback VERSION
                      fallback version to use if \"git --version\" fails

   --help             display this help and exit
   --version          output version information and exit

Running without arguments will suffice in most cases."

prefix=v
fallback=

while test $# -gt 0; do
  case $1 in
    --help) echo "$usage"; exit 0;;
    --version) echo "$version"; exit 0;;
    --prefix) shift; prefix=${1?};;
    --fallback) shift; fallback=${1?};;
    -*)
      echo "$0: Unknown option '$1'." >&2
      echo "$0: Try '--help' for more information." >&2
      exit 1;;
    *)
      if test "x$tarball_version_file" = x; then
        tarball_version_file="$1"
      elif test "x$tag_sed_script" = x; then
        tag_sed_script="$1"
      else
        echo "$0: extra non-option argument '$1'." >&2
        exit 1
      fi;;
  esac
  shift
done

if test "x$tarball_version_file" = x; then
    echo "$usage"
    exit 1
fi

tag_sed_script="${tag_sed_script:-s/x/x/}"

nl='
'

# Avoid meddling by environment variable of the same name.
v=
v_from_git=

# First see if there is a tarball-only version file.
# then try "git describe", then default.
if test -f $tarball_version_file
then
    v=`cat $tarball_version_file` || v=
    case $v in
        *$nl*) v= ;; # reject multi-line output
        [0-9]*) ;;
        *) v= ;;
    esac
    test "x$v" = x \
        && echo "$0: WARNING: $tarball_version_file is missing or damaged" 1>&2
fi

if test "x$v" != x
then
    : # use $v
# Otherwise, if there is at least one git commit involving the working
# directory, and "git describe" output looks sensible, use that to
# derive a version string.
elif test "`git log -1 --pretty=format:x . 2>&1`" = x \
    && v=`git describe --abbrev=4 --match="$prefix*" HEAD 2>/dev/null \
          || git describe --abbrev=4 HEAD 2>/dev/null` \
    && v=`printf '%s\n' "$v" | sed "$tag_sed_script"` \
    && case $v in
         $prefix[0-9]*) ;;
         *) (exit 1) ;;
       esac
then
    # Is this a new git that lists number of commits since the last
    # tag or the previous older version that did not?
    #   Newer: v6.10-77-g0f8faeb
    #   Older: v6.10-g0f8faeb
    case $v in
        *-*-*) : git describe is okay three part flavor ;;
        *-*)
            : git describe is older two part flavor
            # Recreate the number of commits and rewrite such that the
            # result is the same as if we were using the newer version
            # of git describe.
            vtag=`echo "$v" | sed 's/-.*//'`
            commit_list=`git rev-list "$vtag"..HEAD 2>/dev/null` \
                || { commit_list=failed;
                     echo "$0: WARNING: git rev-list failed" 1>&2; }
            numcommits=`echo "$commit_list" | wc -l`
            v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
            test "$commit_list" = failed && v=UNKNOWN
            ;;
    esac

    # Change the first '-' to a '.', so version-comparing tools work properly.
    # Remove the "g" in git describe's output string, to save a byte.
    v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
    v_from_git=1
elif test "x$fallback" = x || git --version >/dev/null 2>&1; then
    v=UNKNOWN
else
    v=$fallback
fi

v=`echo "$v" |sed "s/^$prefix//"`

# Test whether to append the "-dirty" suffix only if the version
# string we're using came from git.  I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
if test "x$v_from_git" != x; then
  # Don't declare a version "dirty" merely because a timestamp has changed.
  git update-index --refresh > /dev/null 2>&1

  dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
  case "$dirty" in
      '') ;;
      *) # Append the suffix only if there isn't one already.
          case $v in
            *-dirty) ;;
            *) v="$v-dirty" ;;
          esac ;;
  esac
fi

# Omit the trailing newline, so that m4_esyscmd can use the result directly.
printf %s "$v"

# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
s? "libbacktrace") ;; GCC 4.8+ comes with libbacktrace. By default it builds ;; with -Werror, which fails with a -Wcast-qual error in glibc ;; 2.21's stdlib-bsearch.h. Remove -Werror. (substitute* "libbacktrace/configure" (("WARN_FLAGS=(.*)-Werror" _ flags) (string-append "WARN_FLAGS=" flags))) (when (file-exists? "libsanitizer/libbacktrace") ;; Same in libsanitizer's bundled copy (!) found in 4.9+. (substitute* "libsanitizer/libbacktrace/Makefile.in" (("-Werror") "")))) ;; Add a RUNPATH to libstdc++.so so that it finds libgcc_s. ;; See ;; and . (substitute* "libstdc++-v3/src/Makefile.in" (("^OPT_LDFLAGS = ") "OPT_LDFLAGS = -Wl,-rpath=$(libdir) ")) ;; Move libstdc++*-gdb.py to the "lib" output to avoid a ;; circularity between "out" and "lib". (Note: ;; --with-python-dir is useless because it imposes $(prefix) as ;; the parent directory.) (substitute* "libstdc++-v3/python/Makefile.in" (("pythondir = .*$") (string-append "pythondir = " libdir "/share" "/gcc-$(gcc_version)/python\n"))) ;; Avoid another circularity between the outputs: this #define ;; ends up in auto-host.h in the "lib" output, referring to ;; "out". (This variable is used to augment cpp's search path, ;; but there's nothing useful to look for here.) (substitute* "gcc/config.in" (("PREFIX_INCLUDE_DIR") "PREFIX_INCLUDE_DIR_isnt_necessary_here")))) (alist-cons-after 'configure 'post-configure (lambda _ ;; Don't store configure flags, to avoid retaining references to ;; build-time dependencies---e.g., `--with-ppl=/gnu/store/xxx'. (substitute* "Makefile" (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest) "TOPLEVEL_CONFIGURE_ARGUMENTS=\n"))) %standard-phases)))) (native-search-paths ;; Use the language-specific variables rather than 'CPATH' because they ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'. ;; The intent is to allow headers that are in the search path to be ;; treated as "system headers" (headers exempt from warnings) just like ;; the typical /usr/include headers on an FHS system. (list (search-path-specification (variable "C_INCLUDE_PATH") (files '("include"))) (search-path-specification (variable "CPLUS_INCLUDE_PATH") (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) (properties `((gcc-libc . ,(assoc-ref inputs "libc")))) (synopsis "GNU Compiler Collection") (description "GCC is the GNU Compiler Collection. It provides compiler front-ends for several languages, including C, C++, Objective-C, Fortran, Java, Ada, and Go. It also includes runtime support libraries for these languages.") (license gpl3+) (home-page "http://gcc.gnu.org/")))) (define-public gcc-4.8 (package (inherit gcc-4.7) (version "4.8.5") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) (sha256 (base32 "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2")) (patches (search-patches "gcc-arm-link-spec-fix.patch")))))) (define-public gcc-4.9 (package (inherit gcc-4.8) (version "4.9.3") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) (sha256 (base32 "0zmnm00d2a1hsd41g34bhvxzvxisa2l584q3p447bd91lfjv4ci3")) (patches (search-patches "gcc-libvtv-runpath.patch")))))) (define-public gcc-5 (package (inherit gcc-4.9) (version "5.3.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) (sha256 (base32 "1ny4smkp5bzs3cp8ss7pl6lk8yss0d9m4av1mvdp72r1x695akxq")) (patches (search-patches "gcc-5.0-libvtv-runpath.patch")))))) (define-public gcc-6 (package (inherit gcc-5) (version "6.1.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gcc/gcc-" version "/gcc-" version ".tar.bz2")) (sha256 (base32 "0ld3y4rgimyqgx1nwvzqyl5gr4wzc0ch4akkvsqp3fgbmdfcii09")) (patches (search-patches "gcc-5.0-libvtv-runpath.patch")))))) ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions accordingly. (define-public gcc gcc-4.9) (define-public (make-libstdc++ gcc) "Return a libstdc++ package based on GCC. The primary use case is when using compilers other than GCC." (package (inherit gcc) (name "libstdc++") (arguments `(#:out-of-source? #t #:phases (alist-cons-before 'configure 'chdir (lambda _ (chdir "libstdc++-v3")) %standard-phases) #:configure-flags `("--disable-libstdcxx-pch" ,(string-append "--with-gxx-include-dir=" (assoc-ref %outputs "out") "/include")))) (outputs '("out" "debug")) (inputs '()) (native-inputs '()) (propagated-inputs '()) (synopsis "GNU C++ standard library"))) (define-public libstdc++-4.9 (make-libstdc++ gcc-4.9)) (define (make-libiberty gcc) "Return a libiberty package based on GCC." (package (inherit gcc) (name "libiberty") (arguments `(#:out-of-source? #t #:phases (modify-phases %standard-phases (add-before 'configure 'chdir (lambda _ (chdir "libiberty") #t)) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (lib (string-append out "/lib/")) (include (string-append out "/include/"))) (mkdir-p lib) (mkdir-p include) (copy-file "libiberty.a" (string-append lib "libiberty.a")) (copy-file "../include/libiberty.h" (string-append include "libiberty.h")) #t)))))) (inputs '()) (outputs '("out")) (native-inputs '()) (propagated-inputs '()) (synopsis "Collection of subroutines used by various GNU programs"))) (define-public libiberty (make-libiberty gcc)) (define* (custom-gcc gcc name languages #:optional (search-paths (package-native-search-paths gcc)) #:key (separate-lib-output? #t)) "Return a custom version of GCC that supports LANGUAGES. Use SEARCH-PATHS as the 'native-search-paths' field." (package (inherit gcc) (name name) (outputs (if separate-lib-output? (package-outputs gcc) (delete "lib" (package-outputs gcc)))) (native-search-paths search-paths) (arguments (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system) (guix build utils) (ice-9 regex) (srfi srfi-1) (srfi srfi-26)) ,@(package-arguments gcc)) ((#:configure-flags flags) `(cons (string-append "--enable-languages=" ,(string-join languages ",")) (remove (cut string-match "--enable-languages.*" <>) ,flags))) ((#:phases phases) `(modify-phases ,phases (add-after 'install 'remove-broken-or-conflicting-files (lambda* (#:key outputs #:allow-other-keys) (for-each delete-file (find-files (string-append (assoc-ref outputs "out") "/bin") ".*(c\\+\\+|cpp|g\\+\\+|gcov|gcc.*)")) #t)))))))) (define %generic-search-paths ;; This is the language-neutral search path for GCC. Entries in $CPATH are ;; not considered "system headers", which means GCC can raise warnings for ;; issues in those headers. 'CPATH' is the only one that works for ;; front-ends not in the C family. (list (search-path-specification (variable "CPATH") (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64"))))) (define-public gfortran-4.8 (custom-gcc gcc-4.8 "gfortran" '("fortran") %generic-search-paths)) (define-public gfortran-4.9 (custom-gcc gcc-4.9 "gfortran" '("fortran") %generic-search-paths)) (define-public gfortran (custom-gcc gcc "gfortran" '("fortran") %generic-search-paths)) (define-public gfortran-5 (custom-gcc gcc-5 "gfortran" '("fortran") %generic-search-paths)) (define-public gccgo-4.9 (custom-gcc gcc-4.9 "gccgo" '("go") %generic-search-paths ;; Suppress the separate "lib" output, because otherwise the ;; "lib" and "out" outputs would refer to each other, creating ;; a cyclic dependency. #:separate-lib-output? #f)) (define javac.in (origin (method url-fetch) (uri (string-append "http://sources.gentoo.org/cgi-bin/viewvc.cgi/" "gentoo-x86/dev-java/gcj-jdk/files/javac.in?revision=1.1")) (file-name "javac.in") (sha256 (base32 "1c3dk4z5yfj6ic2fn3lyxs27n6pmn2wy9k0r1s17lnkf1bzkrciv")))) (define-public gcj (package (inherit gcc) (name "gcj") (inputs `(("fastjar" ,fastjar) ("perl" ,perl) ("javac.in" ,javac.in) ("ecj-bootstrap" ,ecj-bootstrap) ,@(package-inputs gcc))) (native-inputs `(("dejagnu" ,dejagnu) ,@(package-native-inputs gcc))) (native-search-paths %generic-search-paths) ;; Suppress the separate "lib" output, because otherwise the ;; "lib" and "out" outputs would refer to each other, creating ;; a cyclic dependency. (outputs (delete "lib" (package-outputs gcc))) (arguments (substitute-keyword-arguments `(#:modules ((guix build gnu-build-system) (guix build utils) (ice-9 regex) (srfi srfi-1) (srfi srfi-26)) #:test-target "check-target-libjava" ,@(package-arguments gcc)) ((#:tests? _) #t) ((#:configure-flags flags) `(let ((ecj (assoc-ref %build-inputs "ecj-bootstrap"))) `("--enable-java-home" "--enable-gjdoc" ,(string-append "--with-ecj-jar=" ecj) "--enable-languages=java" ,@(remove (cut string-match "--enable-languages.*" <>) ,flags)))) ((#:phases phases) `(modify-phases ,phases (add-after 'unpack 'add-lib-output-to-rpath (lambda _ (substitute* "libjava/Makefile.in" (("libgcj_bc_dummy_LINK = .* -shared" line) (string-append line " -Wl,-rpath=$(libdir)")) (("libgcj(_bc)?_la_LDFLAGS =" ldflags _) (string-append ldflags " -Wl,-rpath=$(libdir)"))))) (add-after 'install 'install-javac-and-javap-wrappers (lambda _ (let* ((javac (assoc-ref %build-inputs "javac.in")) (ecj (assoc-ref %build-inputs "ecj-bootstrap")) (gcj (assoc-ref %outputs "out")) (gcjbin (string-append gcj "/bin/")) (jvm (string-append gcj "/lib/jvm/")) (target (string-append jvm "/bin/javac"))) (symlink (string-append gcjbin "jcf-dump") (string-append jvm "/bin/javap")) (copy-file ecj (string-append gcj "/share/java/ecj.jar")) ;; Create javac wrapper from the template javac.in by ;; replacing the @VARIABLES@ with paths. (copy-file javac target) (patch-shebang target) (substitute* target (("@JAVA@") (string-append jvm "/bin/java")) (("@ECJ_JAR@") (string-append gcj "/share/java/ecj.jar")) (("@RT_JAR@") (string-append jvm "/jre/lib/rt.jar")) (("@TOOLS_JAR@") (string-append jvm "/lib/tools.jar"))) (chmod target #o755) #t))) (add-after 'install 'remove-broken-or-conflicting-files (lambda _ (let ((out (assoc-ref %outputs "out"))) (for-each delete-file (append (find-files (string-append out "/lib/jvm/jre/lib") "libjawt.so") (find-files (string-append out "/bin") ".*(c\\+\\+|cpp|g\\+\\+|gcc.*)")))) #t)))))))) (define ecj-bootstrap (origin (method url-fetch) (uri "ftp://sourceware.org/pub/java/ecj-4.9.jar") (sha256 (base32 "1k9lgm3qamf6zy534pa2zwskr8mpiqrngbv1vw9j4y1ghrdyf1lm")))) (define-public gcc-objc-4.8 (custom-gcc gcc-4.8 "gcc-objc" '("objc") (list (search-path-specification (variable "OBJC_INCLUDE_PATH") (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64")))))) (define-public gcc-objc++-4.8 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++") (list (search-path-specification (variable "OBJCPLUS_INCLUDE_PATH") (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") (files '("lib" "lib64")))))) (define (make-libstdc++-doc gcc) "Return a package with the libstdc++ documentation for GCC." (package (inherit gcc) (name "libstdc++-doc") (version (package-version gcc)) (synopsis "GNU libstdc++ documentation") (outputs '("out")) (native-inputs `(("doxygen" ,doxygen) ("texinfo" ,texinfo) ("libxml2" ,libxml2) ("libxslt" ,libxslt) ("docbook-xml" ,docbook-xml) ("docbook-xsl" ,docbook-xsl) ("graphviz" ,graphviz))) ;for 'dot', invoked by 'doxygen' (inputs '()) (propagated-inputs '()) (arguments '(#:out-of-source? #t #:tests? #f ;it's just documentation #:phases (modify-phases %standard-phases (add-before 'configure 'chdir (lambda _ (chdir "libstdc++-v3"))) (add-before 'configure 'set-xsl-directory (lambda* (#:key inputs #:allow-other-keys) (let ((docbook (assoc-ref inputs "docbook-xsl"))) (substitute* (find-files "doc" "^Makefile\\.in$") (("@XSL_STYLE_DIR@") (string-append docbook "/xml/xsl/" (strip-store-file-name docbook))))))) (replace 'build (lambda _ ;; XXX: There's also a 'doc-info' target, but it ;; relies on docbook2X, which itself relies on ;; DocBook 4.1.2, which is not really usable ;; (lacks a catalog.xml.) (zero? (system* "make" "doc-html" "doc-man")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (zero? (system* "make" "doc-install-html" "doc-install-man")))))))))) (define-public libstdc++-doc-4.9 (make-libstdc++-doc gcc-4.9)) (define-public libstdc++-doc-5 (make-libstdc++-doc gcc-5)) (define-public isl (package (name "isl") (version "0.11.1") (source (origin (method url-fetch) (uri (list (string-append "http://isl.gforge.inria.fr/isl-" version ".tar.bz2") (string-append %gcc-infrastructure name "-" version ".tar.gz"))) (sha256 (base32 "13d9cqa5rzhbjq0xf0b2dyxag7pqa72xj9dhsa03m8ccr1a4npq9")))) (build-system gnu-build-system) (inputs `(("gmp" ,gmp))) (home-page "http://isl.gforge.inria.fr/") (synopsis "Manipulating sets and relations of integer points \ bounded by linear constraints") (description "isl is a library for manipulating sets and relations of integer points bounded by linear constraints. Supported operations on sets include intersection, union, set difference, emptiness check, convex hull, (integer) affine hull, integer projection, computing the lexicographic minimum using parametric integer programming, coalescing and parametric vertex enumeration. It also includes an ILP solver based on generalized basis reduction, transitive closures on maps (which may encode infinite graphs), dependence analysis and bounds on piecewise step-polynomials.") (license lgpl2.1+))) (define-public cloog (package (name "cloog") (version "0.18.0") (source (origin (method url-fetch) (uri (list (string-append "http://www.bastoul.net/cloog/pages/download/count.php3?url=cloog-" version ".tar.gz") (string-append %gcc-infrastructure name "-" version ".tar.gz"))) (sha256 (base32 "0a12rwfwp22zd0nlld0xyql11cj390rrq1prw35yjsw8wzfshjhw")) (file-name (string-append name "-" version ".tar.gz")))) (build-system gnu-build-system) (inputs `(("gmp" ,gmp) ("isl" ,isl))) (arguments '(#:configure-flags '("--with-isl=system"))) (home-page "http://www.cloog.org/") (synopsis "Library to generate code for scanning Z-polyhedra") (description "CLooG is a free software library to generate code for scanning Z-polyhedra. That is, it finds a code (e.g., in C, FORTRAN...) that reaches each integral point of one or more parameterized polyhedra. CLooG has been originally written to solve the code generation problem for optimizing compilers based on the polytope model. Nevertheless it is used now in various area e.g., to build control automata for high-level synthesis or to find the best polynomial approximation of a function. CLooG may help in any situation where scanning polyhedra matters. While the user has full control on generated code quality, CLooG is designed to avoid control overhead and to produce a very effective code.") (license gpl2+))) (define-public gnu-c-manual (package (name "gnu-c-manual") (version "0.2.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/gnu-c-manual/gnu-c-manual-" version ".tar.gz")) (sha256 (base32 "0cf4503shr7hxkbrjfi9dky6q2lqk95bgbgbjmvj2s2x312kakd9")))) (build-system gnu-build-system) (native-inputs `(("texinfo" ,texinfo))) (arguments '(#:phases (modify-phases %standard-phases (delete 'configure) (delete 'check) (replace 'build (lambda _ (zero? (system* "make" "gnu-c-manual.info" "gnu-c-manual.html")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (info (string-append out "/share/info")) (html (string-append out "/share/doc/gnu-c-manual"))) (mkdir-p info) (mkdir-p html) (for-each (lambda (file) (copy-file file (string-append info "/" file))) (find-files "." "\\.info(-[0-9])?$")) (for-each (lambda (file) (copy-file file (string-append html "/" file))) (find-files "." "\\.html$")) #t)))))) (synopsis "Reference manual for the C programming language") (description "This is a reference manual for the C programming language, as implemented by the GNU C Compiler (gcc). As a reference, it is not intended to be a tutorial of the language. Rather, it outlines all of the constructs of the language. Library functions are not included.") (home-page "http://www.gnu.org/software/gnu-c-manual") (license fdl1.3+)))