From 938081b9cecba95803a6581b2ff4e9fc0d781ab6 Mon Sep 17 00:00:00 2001 From: Andreas Enge Date: Tue, 5 Mar 2013 00:14:44 +0100 Subject: gnu: Add lsof. * gnu/packages/lsof.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + 1 file changed, 1 insertion(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index c56bc41226..ed09e73023 100644 --- a/Makefile.am +++ b/Makefile.am @@ -115,6 +115,7 @@ MODULES = \ gnu/packages/linux-initrd.scm \ gnu/packages/lout.scm \ gnu/packages/lsh.scm \ + gnu/packages/lsof.scm \ gnu/packages/m4.scm \ gnu/packages/mailutils.scm \ gnu/packages/make-bootstrap.scm \ -- cgit v1.2.3 From c50cbfd61a540e120b922fa16bf6ab8533c37b0b Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 5 Mar 2013 20:26:24 +0100 Subject: gnu: Add Avahi. * gnu/packages/avahi.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + gnu/packages/avahi.scm | 77 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 gnu/packages/avahi.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index ed09e73023..78726a4556 100644 --- a/Makefile.am +++ b/Makefile.am @@ -58,6 +58,7 @@ MODULES = \ gnu/packages/aspell.scm \ gnu/packages/attr.scm \ gnu/packages/autotools.scm \ + gnu/packages/avahi.scm \ gnu/packages/base.scm \ gnu/packages/bash.scm \ gnu/packages/bdb.scm \ diff --git a/gnu/packages/avahi.scm b/gnu/packages/avahi.scm new file mode 100644 index 0000000000..f7ce908351 --- /dev/null +++ b/gnu/packages/avahi.scm @@ -0,0 +1,77 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages avahi) + #:use-module ((guix licenses) #:select (lgpl2.1+)) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages gdbm) + #:use-module (gnu packages libdaemon) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages glib) + #:use-module (gnu packages xml)) + +(define-public avahi + (package + (name "avahi") + (version "0.6.31") + (home-page "http://avahi.org") + (source (origin + (method url-fetch) + (uri (string-append home-page "/download/avahi-" + version ".tar.gz")) + (sha256 + (base32 + "0j5b5ld6bjyh3qhd2nw0jb84znq0wqai7fsrdzg7bpg24jdp2wl3")))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--with-distro=none" + "--disable-python" + "--disable-mono" + "--disable-doxygen-doc" + "--disable-xmltoman" + "--enable-tests" + "--disable-qt3" "--disable-qt4" + "--disable-gtk" "--disable-gtk3") + #:phases (alist-cons-before + 'configure 'set-perl-path + (lambda* (#:key inputs #:allow-other-keys) + ;; FIXME: Remove this phase when proper support for search + ;; paths is available. + (let ((xml-parser (assoc-ref inputs + "intltool/perl-xml-parser"))) + (setenv "PERL5LIB" + (string-append xml-parser + "/lib/perl5/site_perl")) + #t)) + %standard-phases))) + (inputs + `(("expat" ,expat) + ("glib" ,glib) + ("dbus" ,dbus) + ("libdaemon" ,libdaemon) + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("gdbm" ,gdbm))) + (synopsis "Avahi, an mDNS/DNS-SD implementation") + (description + "Avahi is a system which facilitates service discovery on a local +network. It is an implementation of the mDNS (for \"Multicast DNS\") and +DNS-SD (for \"DNS-Based Service Discovery\") protocols.") + (license lgpl2.1+))) -- cgit v1.2.3 From bd5ecea63754b2dbc0c142ae11d9d11716fd703a Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Mon, 4 Mar 2013 01:34:13 +0000 Subject: gnu: Add w3m. * gnu/packages/w3m.scm, gnu/packages/patches/w3m-fix-compile.patch: New files. * Makefile.am (MODULES): Add 'w3m.scm'. (dist_patch_DATA): Add 'w3m-fix-compile.patch'. --- Makefile.am | 4 +- gnu/packages/patches/w3m-fix-compile.patch | 15 ++++++ gnu/packages/w3m.scm | 81 ++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/w3m-fix-compile.patch create mode 100644 gnu/packages/w3m.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 78726a4556..0916d26fb9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -163,6 +163,7 @@ MODULES = \ gnu/packages/tor.scm \ gnu/packages/vim.scm \ gnu/packages/vpn.scm \ + gnu/packages/w3m.scm \ gnu/packages/wdiff.scm \ gnu/packages/wget.scm \ gnu/packages/which.scm \ @@ -221,7 +222,8 @@ dist_patch_DATA = \ gnu/packages/patches/tar-gets-undeclared.patch \ gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ - gnu/packages/patches/vpnc-script.patch + gnu/packages/patches/vpnc-script.patch \ + gnu/packages/patches/w3m-fix-compile.patch bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux diff --git a/gnu/packages/patches/w3m-fix-compile.patch b/gnu/packages/patches/w3m-fix-compile.patch new file mode 100644 index 0000000000..5604052f67 --- /dev/null +++ b/gnu/packages/patches/w3m-fix-compile.patch @@ -0,0 +1,15 @@ +https://bugs.archlinux.org/task/33397 + +diff -aur old/main.c new/main.c +--- main.c 2013-01-14 18:16:14.216210053 -0600 ++++ main.c 2013-01-14 18:17:28.816220559 -0600 +@@ -833,7 +833,8 @@ + mySignal(SIGPIPE, SigPipe); + #endif + +- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc); ++ orig_GC_warn_proc = GC_get_warn_proc(); ++ GC_set_warn_proc(wrap_GC_warn_proc); + err_msg = Strnew(); + if (load_argc == 0) { + /* no URL specified */ diff --git a/gnu/packages/w3m.scm b/gnu/packages/w3m.scm new file mode 100644 index 0000000000..9199cbd488 --- /dev/null +++ b/gnu/packages/w3m.scm @@ -0,0 +1,81 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Nikita Karetnikov +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages w3m) + #:use-module ((guix licenses) #:select (x11-style)) + #:use-module ((gnu packages gettext) + #:renamer (symbol-prefix-proc 'guix:)) + #:use-module (gnu packages bdw-gc) + #:use-module (gnu packages compression) + #:use-module (gnu packages ncurses) + #:use-module (gnu packages openssl) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public w3m + (package + (name "w3m") + (version "0.5.3") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/w3m/w3m-" + version ".tar.gz")) + (sha256 + (base32 + "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")))) + (build-system gnu-build-system) + (arguments `(#:tests? #f ; no check target + #:phases (alist-cons-before + 'configure 'fix-perl + (lambda _ + ;; https://launchpad.net/bugs/935540 + ;; 'struct file_handle' is used by 'glibc' + (substitute* '("istream.c" "istream.h") + (("struct[[:blank:]]+file_handle") + "struct w3m_file_handle")) + (substitute* '("scripts/w3mmail.cgi.in" + "scripts/dirlist.cgi.in") + (("@PERL@") (which "perl")))) + %standard-phases) + ;; cf. https://bugs.archlinux.org/task/33397 + #:patches (list (assoc-ref %build-inputs + "patch/fix-compile")) + #:patch-flags '("-p0"))) + (inputs + `(("gettext" ,guix:gettext) + ("libgc" ,libgc) + ("ncurses" ,ncurses) + ("openssl" ,openssl) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("zlib" ,zlib) + ("patch/fix-compile" ,(search-patch "w3m-fix-compile.patch")))) + (home-page "http://w3m.sourceforge.net/") + (synopsis "w3m, a text-mode web browser") + (description + "w3m is a text-based web browser as well as a pager like 'more' or +'less'. With w3m you can browse web pages through a terminal emulator +window. Moreover, w3m can be used as a text formatting tool which +typesets HTML into plain text.") + (license (x11-style "file://doc/README" + "See 'doc/README' in the distribution.")))) -- cgit v1.2.3 From 563e8b3920e67e0ac9297f4fd3165084c8844654 Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Wed, 6 Mar 2013 20:58:48 +0000 Subject: gnu: Add GNU Fdisk. * gnu/packages/fdisk.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + gnu/packages/fdisk.scm | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 gnu/packages/fdisk.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 0916d26fb9..5764f3caf9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -75,6 +75,7 @@ MODULES = \ gnu/packages/ddrescue.scm \ gnu/packages/ed.scm \ gnu/packages/emacs.scm \ + gnu/packages/fdisk.scm \ gnu/packages/file.scm \ gnu/packages/flex.scm \ gnu/packages/fontutils.scm \ diff --git a/gnu/packages/fdisk.scm b/gnu/packages/fdisk.scm new file mode 100644 index 0000000000..5cf02a9014 --- /dev/null +++ b/gnu/packages/fdisk.scm @@ -0,0 +1,54 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Nikita Karetnikov +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages fdisk) + #:use-module ((guix licenses) #:select (gpl3+)) + #:use-module ((gnu packages gettext) + #:renamer (symbol-prefix-proc 'guix:)) + #:use-module (gnu packages guile) + #:use-module (gnu packages linux) + #:use-module (gnu packages parted) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public fdisk + (package + (name "fdisk") + (version "2.0.0a") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://gnu/fdisk/gnufdisk-" + version ".tar.gz")) + (sha256 + (base32 + "04nd7civ561x2lwcmxhsqbprml3178jfc58fy1v7hzqg5k4nbhy3")))) + (build-system gnu-build-system) + (inputs + `(("gettext" ,guix:gettext) + ("guile" ,guile-1.8) + ("util-linux" ,util-linux) + ("parted" ,parted))) + (home-page "https://www.gnu.org/software/fdisk/") + (synopsis + "GNU Fdisk, a command-line disk partitioning tool") + (description + "GNU Fdisk provides alternatives to util-linux fdisk and util-linux +cfdisk. It uses GNU Parted.") + (license gpl3+))) \ No newline at end of file -- cgit v1.2.3 From 712e6e684cdab33edafa293cf1484b3866b23098 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Fri, 15 Mar 2013 05:41:12 +0100 Subject: gnu: Add lua. * gnu/packages/lua.scm: New file. * Makefile.am: add it. --- Makefile.am | 1 + gnu/packages/lua.scm | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 gnu/packages/lua.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 5764f3caf9..8fac0d60c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -118,6 +118,7 @@ MODULES = \ gnu/packages/lout.scm \ gnu/packages/lsh.scm \ gnu/packages/lsof.scm \ + gnu/packages/lua.scm \ gnu/packages/m4.scm \ gnu/packages/mailutils.scm \ gnu/packages/make-bootstrap.scm \ diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm new file mode 100644 index 0000000000..14fc28ced0 --- /dev/null +++ b/gnu/packages/lua.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Cyril Roelandt +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages lua) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages readline)) + +(define-public lua + (package + (name "lua") + (version "5.2.1") + (source (origin + (method url-fetch) + (uri (string-append "http://www.lua.org/ftp/lua-" + version ".tar.gz")) + (sha256 + (base32 "1rbv2ysq5fdksz7xg07dnrkl8i0gnx855hg4z6b324vng6l4sc34")))) + (build-system gnu-build-system) + (inputs `(("readline", readline))) + (arguments + '(#:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-1)) + #:test-target "test" + #:phases (alist-replace + 'build + (lambda _ (zero? (system* "make" "linux"))) ; XXX: Other OS. + (alist-replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system + (string-append "make install INSTALL_TOP=" out))))) + (alist-delete 'configure %standard-phases))))) + (home-page "http://www.lua.org/") + (synopsis "An embeddable scripting language.") + (description + "Lua is a powerful, fast, lightweight, embeddable scripting language. Lua +combines simple procedural syntax with powerful data description constructs +based on associative arrays and extensible semantics. Lua is dynamically typed, +runs by interpreting bytecode for a register-based virtual machine, and has +automatic memory management with incremental garbage collection, making it ideal +for configuration, scripting, and rapid prototyping.") + (license x11))) -- cgit v1.2.3 From b6a64843c6d651903bf6bee4cd029f5ac48c0858 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 12 Mar 2013 04:40:00 +0100 Subject: gnu: Add cmake. * gnu/packages/cmake.scm: New file. * gnu/packages/patches/cmake-fix-tests.patch: New file. * Makefile.am: Add them. --- Makefile.am | 2 + gnu/packages/cmake.scm | 78 ++++++++++++++++++++++++++++++ gnu/packages/patches/cmake-fix-tests.patch | 45 +++++++++++++++++ 3 files changed, 125 insertions(+) create mode 100644 gnu/packages/cmake.scm create mode 100644 gnu/packages/patches/cmake-fix-tests.patch (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 8fac0d60c2..3229f16c92 100644 --- a/Makefile.am +++ b/Makefile.am @@ -67,6 +67,7 @@ MODULES = \ gnu/packages/bootstrap.scm \ gnu/packages/cdrom.scm \ gnu/packages/check.scm \ + gnu/packages/cmake.scm \ gnu/packages/compression.scm \ gnu/packages/cpio.scm \ gnu/packages/curl.scm \ @@ -187,6 +188,7 @@ dist_patch_DATA = \ gnu/packages/patches/automake-skip-amhello-tests.patch \ gnu/packages/patches/bigloo-gc-shebangs.patch \ gnu/packages/patches/binutils-ld-new-dtags.patch \ + gnu/packages/patches/cmake-fix-tests.patch \ gnu/packages/patches/cpio-gets-undeclared.patch \ gnu/packages/patches/diffutils-gets-undeclared.patch \ gnu/packages/patches/emacs-configure-sh.patch \ diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm new file mode 100644 index 0000000000..734f55f330 --- /dev/null +++ b/gnu/packages/cmake.scm @@ -0,0 +1,78 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Cyril Roelandt +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages cmake) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages file)) + +(define-public cmake + (package + (name "cmake") + (version "2.8.10.2") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.cmake.org/files/v" + (substring version 0 + (string-index version #\. (+ 1 (string-index version #\.)))) + "/cmake-" version ".tar.gz")) + (sha256 + (base32 "1c8fj6i2x9sb39wc9av2ighj415mw33cxfrlfpafcvm0knrlylnf")))) + (build-system gnu-build-system) + (arguments + '(#:test-target "test" + #:patches (list (assoc-ref %build-inputs "fix-tests")) + #:patch-flags '("-p0") + #:phases (alist-replace + 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Replace "/bin/sh" by the right path in... a lot of + ;; files. + (substitute* + '("Modules/CompilerId/Xcode-3.pbxproj.in" + "Modules/CompilerId/Xcode-1.pbxproj.in" + "Modules/CompilerId/Xcode-2.pbxproj.in" + "Modules/CPack.RuntimeScript.in" + "Source/cmakexbuild.cxx" + "Source/cmGlobalXCodeGenerator.cxx" + "Source/CTest/cmCTestBatchTestHandler.cxx" + "Source/cmLocalUnixMakefileGenerator3.cxx" + "Utilities/cmbzip2/Makefile-libbz2_so" + "Utilities/Release/release_cmake.cmake" + "Utilities/cmlibarchive/libarchive/archive_write_set_format_shar.c" + "Tests/CMakeLists.txt") + (("/bin/sh") (which "sh"))) + (zero? (system* "./configure" + (string-append "--prefix=" out))))) + %standard-phases))) + (inputs + `(("file" ,file) + ("fix-tests" ,(search-patch "cmake-fix-tests.patch")))) + (home-page "http://www.cmake.org/") + (synopsis "A cross-platform, open-source build system") + (description + "CMake is a family of tools designed to build, test and package software. +CMake is used to control the software compilation process using simple platform +and compiler independent configuration files. CMake generates native makefiles +and workspaces that can be used in the compiler environment of your choice.") + (license bsd-3))) diff --git a/gnu/packages/patches/cmake-fix-tests.patch b/gnu/packages/patches/cmake-fix-tests.patch new file mode 100644 index 0000000000..ae28ca336b --- /dev/null +++ b/gnu/packages/patches/cmake-fix-tests.patch @@ -0,0 +1,45 @@ +--- Tests/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 ++++ Tests/CMakeLists.txt 2013-03-20 22:58:02.000000000 +0100 +@@ -1706,16 +1706,17 @@ + PASS_REGULAR_EXPRESSION "Could not find executable" + FAIL_REGULAR_EXPRESSION "SegFault") + +- configure_file( +- "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in" +- "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" +- @ONLY ESCAPE_QUOTES) +- add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND} +- -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V +- --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log" +- ) +- set_tests_properties(CTestTestUpload PROPERTIES +- PASS_REGULAR_EXPRESSION "Upload\\.xml") ++# This test requires network connectivity: skip it. ++# configure_file( ++# "${CMake_SOURCE_DIR}/Tests/CTestTestUpload/test.cmake.in" ++# "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" ++# @ONLY ESCAPE_QUOTES) ++# add_test(CTestTestUpload ${CMAKE_CTEST_COMMAND} ++# -S "${CMake_BINARY_DIR}/Tests/CTestTestUpload/test.cmake" -V ++# --output-log "${CMake_BINARY_DIR}/Tests/CTestTestUpload/testOut.log" ++# ) ++# set_tests_properties(CTestTestUpload PROPERTIES ++# PASS_REGULAR_EXPRESSION "Upload\\.xml") + + configure_file( + "${CMake_SOURCE_DIR}/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in" +--- Utilities/cmcurl/CMakeLists.txt 2013-03-20 22:57:13.000000000 +0100 ++++ Utilities/cmcurl/CMakeLists.txt 2013-03-20 23:08:41.000000000 +0100 +@@ -729,8 +729,9 @@ + ADD_EXECUTABLE(LIBCURL Testing/curltest.c) + TARGET_LINK_LIBRARIES(LIBCURL cmcurl ${CMAKE_DL_LIBS}) + +-IF(CMAKE_CURL_TEST_URL) +- ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) +-ENDIF(CMAKE_CURL_TEST_URL) ++# This test requires network connectivity: skip it. ++#IF(CMAKE_CURL_TEST_URL) ++# ADD_TEST(curl LIBCURL ${CMAKE_CURL_TEST_URL}) ++#ENDIF(CMAKE_CURL_TEST_URL) + + INSTALL(FILES COPYING DESTINATION ${CMake_DOC_DEST}/cmcurl) -- cgit v1.2.3 From 47a9cb950a181e7efa8af06f1c679ed0390a9164 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 26 Mar 2013 22:32:18 +0100 Subject: gnu: Add GNU cppi. * gnu/packages/cppi.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + gnu/packages/cppi.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 gnu/packages/cppi.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3229f16c92..2380e75fc6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -70,6 +70,7 @@ MODULES = \ gnu/packages/cmake.scm \ gnu/packages/compression.scm \ gnu/packages/cpio.scm \ + gnu/packages/cppi.scm \ gnu/packages/curl.scm \ gnu/packages/cyrus-sasl.scm \ gnu/packages/dejagnu.scm \ diff --git a/gnu/packages/cppi.scm b/gnu/packages/cppi.scm new file mode 100644 index 0000000000..53f24698fc --- /dev/null +++ b/gnu/packages/cppi.scm @@ -0,0 +1,45 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages cppi) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix licenses)) + +(define-public cppi + (package + (name "cppi") + (version "1.18") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/cppi/cppi-" + version ".tar.xz")) + (sha256 + (base32 + "1jk42cjaggk71rimjnx3qpmb6hivps0917vl3z7wbxk3i2whb98j")))) + (build-system gnu-build-system) + (home-page "http://www.gnu.org/software/cppi/") + (synopsis "A cpp directive indenter") + (description + "GNU cppi indents C preprocessor directives to reflect their nesting and +ensure that there is exactly one space character between each #if, #elif, +#define directive and the following token. The number of spaces between the +`#' and the following directive must correspond to the level of nesting of +that directive.") + (license gpl3+))) -- cgit v1.2.3 From 7bf569186c12cc9d344905ef673fecaa92a6c023 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 26 Mar 2013 22:43:41 +0100 Subject: gnu: Add GNU cflow. * gnu/packages/cflow.scm: New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + gnu/packages/cflow.scm | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 gnu/packages/cflow.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 2380e75fc6..c785014451 100644 --- a/Makefile.am +++ b/Makefile.am @@ -66,6 +66,7 @@ MODULES = \ gnu/packages/bison.scm \ gnu/packages/bootstrap.scm \ gnu/packages/cdrom.scm \ + gnu/packages/cflow.scm \ gnu/packages/check.scm \ gnu/packages/cmake.scm \ gnu/packages/compression.scm \ diff --git a/gnu/packages/cflow.scm b/gnu/packages/cflow.scm new file mode 100644 index 0000000000..bb000ddc59 --- /dev/null +++ b/gnu/packages/cflow.scm @@ -0,0 +1,51 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages cflow) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (guix licenses) + #:use-module (gnu packages emacs)) + +(define-public cflow + (package + (name "cflow") + (version "1.4") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/cflow/cflow-" + version ".tar.bz2")) + (sha256 + (base32 + "1jkbq97ajcf834z68hbn3xfhiz921zhn39gklml1racf0kb3jzh3")))) + (build-system gnu-build-system) + (home-page "http://www.gnu.org/software/cflow/") + (synopsis "A tool to analyze the control flow of C programs") + (description + "GNU cflow analyzes a collection of C source files and prints a +graph, charting control flow within the program. + +GNU cflow is able to produce both direct and inverted flowgraphs +for C sources. Optionally a cross-reference listing can be +generated. Two output formats are implemented: POSIX and GNU +(extended). + +The package also provides Emacs major mode for examining the +produced flowcharts in Emacs.") + (license gpl3+))) -- cgit v1.2.3 From 785db4d877959c0b948859d19dff22384924fae4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 27 Mar 2013 15:01:30 +0100 Subject: glib: Patch around prlimit(2) failure. * gnu/packages/glib.scm (glib)[source]: Switch to mirror://gnome. [inputs]: Add `patch/tests-prlimit'. [arguments]: Add it. * gnu/packages/patches/glib-tests-prlimit.patch: New file. * Makefile.am (dist_patch_DATA): Add it. --- Makefile.am | 5 +++-- gnu/packages/glib.scm | 9 ++++++--- gnu/packages/patches/glib-tests-prlimit.patch | 14 ++++++++++++++ 3 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 gnu/packages/patches/glib-tests-prlimit.patch (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index c785014451..706c00e8b3 100644 --- a/Makefile.am +++ b/Makefile.am @@ -201,6 +201,7 @@ dist_patch_DATA = \ gnu/packages/patches/gettext-gets-undeclared.patch \ gnu/packages/patches/glib-tests-desktop.patch \ gnu/packages/patches/glib-tests-homedir.patch \ + gnu/packages/patches/glib-tests-prlimit.patch \ gnu/packages/patches/glib-tests-timezone.patch \ gnu/packages/patches/glibc-bootstrap-system.patch \ gnu/packages/patches/glibc-no-ld-so-cache.patch \ @@ -209,7 +210,7 @@ dist_patch_DATA = \ gnu/packages/patches/guile-default-utf8.patch \ gnu/packages/patches/guile-linux-syscalls.patch \ gnu/packages/patches/guile-relocatable.patch \ - gnu/packages/patches/libapr-skip-getservbyname-test.patch \ + gnu/packages/patches/libapr-skip-getservbyname-test.patch \ gnu/packages/patches/libevent-dns-tests.patch \ gnu/packages/patches/libtool-skip-tests.patch \ gnu/packages/patches/lsh-guile-compat.patch \ @@ -226,7 +227,7 @@ dist_patch_DATA = \ gnu/packages/patches/readline-link-ncurses.patch \ gnu/packages/patches/shishi-gets-undeclared.patch \ gnu/packages/patches/tar-gets-undeclared.patch \ - gnu/packages/patches/tcsh-fix-autotest.patch \ + gnu/packages/patches/tcsh-fix-autotest.patch \ gnu/packages/patches/teckit-cstdio.patch \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/w3m-fix-compile.patch diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 72e8d7ed2b..fdcc9bdc31 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -76,7 +76,7 @@ shared NFS home directories.") (version "2.34.3") (source (origin (method url-fetch) - (uri (string-append "http://ftp.gnome.org/pub/gnome/sources/" + (uri (string-append "mirror://gnome/sources/" name "/2.34/" name "-" version ".tar.xz")) (sha256 @@ -99,11 +99,14 @@ shared NFS home directories.") ("patch/tests-homedir" ,(search-patch "glib-tests-homedir.patch")) ("patch/tests-desktop" - ,(search-patch "glib-tests-desktop.patch")))) + ,(search-patch "glib-tests-desktop.patch")) + ("patch/tests-prlimit" + ,(search-patch "glib-tests-prlimit.patch")))) (arguments '(#:patches (list (assoc-ref %build-inputs "patch/tests-tzdata") (assoc-ref %build-inputs "patch/tests-homedir") - (assoc-ref %build-inputs "patch/tests-desktop")) + (assoc-ref %build-inputs "patch/tests-desktop") + (assoc-ref %build-inputs "patch/tests-prlimit")) #:phases (alist-cons-before 'build 'pre-build (lambda* (#:key inputs outputs #:allow-other-keys) diff --git a/gnu/packages/patches/glib-tests-prlimit.patch b/gnu/packages/patches/glib-tests-prlimit.patch new file mode 100644 index 0000000000..f2b2a61bee --- /dev/null +++ b/gnu/packages/patches/glib-tests-prlimit.patch @@ -0,0 +1,14 @@ +prlimit(2) returns ENOSYS on Linux 2.6.32-5-xen-amd64 as found on +hydra.gnu.org, and strace(1) doesn't recognize it. + +--- glib-2.34.3/glib/tests/thread.c 2012-11-20 15:27:12.000000000 +0100 ++++ glib-2.34.3/glib/tests/thread.c 2013-03-27 14:48:31.000000000 +0100 +@@ -130,7 +130,7 @@ test_thread3 (void) + static void + test_thread4 (void) + { +-#ifdef HAVE_PRLIMIT ++#if 0 + struct rlimit ol, nl; + GThread *thread; + GError *error; -- cgit v1.2.3 From e9c0b9446bf9b76448349dce1a026eb010038a67 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 27 Mar 2013 15:13:25 +0100 Subject: gnu: Move GCC to its own module. * gnu/packages/base.scm (gcc-4.7): Move to... * gnu/packages/gcc.scm: ... here. New file. * Makefile.am (MODULES): Add it. --- Makefile.am | 1 + gnu/packages/base.scm | 114 +--------------------------------------- gnu/packages/gcc.scm | 140 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+), 113 deletions(-) create mode 100644 gnu/packages/gcc.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 706c00e8b3..022c9a9afe 100644 --- a/Makefile.am +++ b/Makefile.am @@ -83,6 +83,7 @@ MODULES = \ gnu/packages/flex.scm \ gnu/packages/fontutils.scm \ gnu/packages/gawk.scm \ + gnu/packages/gcc.scm \ gnu/packages/gdb.scm \ gnu/packages/gdbm.scm \ gnu/packages/gettext.scm \ diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 23bf00b241..92b94dc035 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -24,6 +24,7 @@ #:use-module (gnu packages bash) #:use-module (gnu packages bootstrap) #:use-module (gnu packages compression) + #:use-module (gnu packages gcc) #:use-module (gnu packages gawk) #:use-module (gnu packages guile) #:use-module (gnu packages multiprecision) @@ -378,119 +379,6 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.") (license gpl3+) (home-page "http://www.gnu.org/software/binutils/"))) -(define-public gcc-4.7 - (let ((stripped? #t)) ; TODO: make this a parameter - (package - (name "gcc") - (version "4.7.2") - (source (origin - (method url-fetch) - (uri (string-append "mirror://gnu/gcc/gcc-" - version "/gcc-" version ".tar.bz2")) - (sha256 - (base32 - "115h03hil99ljig8lkrq4qk426awmzh0g99wrrggxf8g07bq74la")))) - (build-system gnu-build-system) - (inputs `(("gmp" ,gmp) - ("mpfr" ,mpfr) - ("mpc" ,mpc))) ; TODO: libelf, ppl, cloog, zlib, etc. - (arguments - `(#:out-of-source? #t - #:strip-binaries? ,stripped? - #:configure-flags - `("--enable-plugin" - "--enable-languages=c,c++" - "--disable-multilib" - - "--with-local-prefix=/no-gcc-local-prefix" - - ,(let ((libc (assoc-ref %build-inputs "libc"))) - (if libc - (string-append "--with-native-system-header-dir=" libc - "/include") - "--without-headers"))) - #:make-flags - (let ((libc (assoc-ref %build-inputs "libc"))) - `(,@(if libc - (list (string-append "LDFLAGS_FOR_BUILD=" - "-L" libc "/lib " - "-Wl,-dynamic-linker " - "-Wl," libc - ,(glibc-dynamic-linker))) - '()) - ,(string-append "BOOT_CFLAGS=-O2 " - ,(if stripped? "-g0" "-g")))) - - #:tests? #f - #:phases - (alist-cons-before - 'configure 'pre-configure - (lambda* (#:key inputs outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out")) - (libc (assoc-ref inputs "libc"))) - (when libc - ;; The following is not performed for `--without-headers' - ;; cross-compiler builds. - - ;; Fix the dynamic linker's file name. - (substitute* (find-files "gcc/config" - "^linux(64|-elf)?\\.h$") - (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix) - (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%" - suffix - (string-append libc ,(glibc-dynamic-linker))))) - - ;; Tell where to find libstdc++, libc, and `?crt*.o', except - ;; `crt{begin,end}.o', which come with GCC. - (substitute* (find-files "gcc/config" - "^(gnu-user(64)?|linux-elf)\\.h$") - (("#define LIB_SPEC (.*)$" _ suffix) - ;; Note that with this "lib" spec, we may still add a - ;; RUNPATH to GCC even when `libgcc_s' is not NEEDED. - ;; There's not much that can be done to avoid it, though. - (format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \ -%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a~%" - libc libc out out suffix)) - (("#define STARTFILE_SPEC.*$" line) - (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\" -#define STANDARD_STARTFILE_PREFIX_2 \"\" -~a~%" - libc line)))) - - ;; Don't retain a dependency on the build-time sed. - (substitute* "fixincludes/fixincl.x" - (("static char const sed_cmd_z\\[\\] =.*;") - "static char const sed_cmd_z[] = \"sed\";")))) - - (alist-cons-after - 'configure 'post-configure - (lambda _ - ;; Don't store configure flags, to avoid retaining references to - ;; build-time dependencies---e.g., `--with-ppl=/nix/store/xxx'. - (substitute* "Makefile" - (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest) - "TOPLEVEL_CONFIGURE_ARGUMENTS=\n"))) - (alist-replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (zero? - (system* "make" - ,(if stripped? - "install-strip" - "install")))) - %standard-phases))))) - - (properties `((gcc-libc . ,(assoc-ref inputs "libc")))) - (synopsis "The GNU Compiler Collection") - (description - "The GNU Compiler Collection includes compiler front ends for C, C++, -Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well as -libraries for these languages (libstdc++, libgcj, libgomp,...). - -GCC development is a part of the GNU Project, aiming to improve the compiler -used in the GNU system including the GNU/Linux variant.") - (license gpl3+) - (home-page "http://gcc.gnu.org/")))) - (define-public glibc (package (name "glibc") diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm new file mode 100644 index 0000000000..a4ee04f5a5 --- /dev/null +++ b/gnu/packages/gcc.scm @@ -0,0 +1,140 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2012, 2013 Ludovic Courtès +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (gnu packages gcc) + #:use-module (guix licenses) + #:use-module (gnu packages) + #:use-module (gnu packages bootstrap) + #:use-module (gnu packages compression) + #:use-module (gnu packages multiprecision) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public gcc-4.7 + (let ((stripped? #t)) ; TODO: make this a parameter + (package + (name "gcc") + (version "4.7.2") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/gcc/gcc-" + version "/gcc-" version ".tar.bz2")) + (sha256 + (base32 + "115h03hil99ljig8lkrq4qk426awmzh0g99wrrggxf8g07bq74la")))) + (build-system gnu-build-system) + (inputs `(("gmp" ,gmp) + ("mpfr" ,mpfr) + ("mpc" ,mpc))) ; TODO: libelf, ppl, cloog, zlib, etc. + (arguments + `(#:out-of-source? #t + #:strip-binaries? ,stripped? + #:configure-flags + `("--enable-plugin" + "--enable-languages=c,c++" + "--disable-multilib" + + "--with-local-prefix=/no-gcc-local-prefix" + + ,(let ((libc (assoc-ref %build-inputs "libc"))) + (if libc + (string-append "--with-native-system-header-dir=" libc + "/include") + "--without-headers"))) + #:make-flags + (let ((libc (assoc-ref %build-inputs "libc"))) + `(,@(if libc + (list (string-append "LDFLAGS_FOR_BUILD=" + "-L" libc "/lib " + "-Wl,-dynamic-linker " + "-Wl," libc + ,(glibc-dynamic-linker))) + '()) + ,(string-append "BOOT_CFLAGS=-O2 " + ,(if stripped? "-g0" "-g")))) + + #:tests? #f + #:phases + (alist-cons-before + 'configure 'pre-configure + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (libc (assoc-ref inputs "libc"))) + (when libc + ;; The following is not performed for `--without-headers' + ;; cross-compiler builds. + + ;; Fix the dynamic linker's file name. + (substitute* (find-files "gcc/config" + "^linux(64|-elf)?\\.h$") + (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix) + (format #f "#define GLIBC_DYNAMIC_LINKER~a \"~a\"~%" + suffix + (string-append libc ,(glibc-dynamic-linker))))) + + ;; Tell where to find libstdc++, libc, and `?crt*.o', except + ;; `crt{begin,end}.o', which come with GCC. + (substitute* (find-files "gcc/config" + "^(gnu-user(64)?|linux-elf)\\.h$") + (("#define LIB_SPEC (.*)$" _ suffix) + ;; Note that with this "lib" spec, we may still add a + ;; RUNPATH to GCC even when `libgcc_s' is not NEEDED. + ;; There's not much that can be done to avoid it, though. + (format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \ +%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a~%" + libc libc out out suffix)) + (("#define STARTFILE_SPEC.*$" line) + (format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\" +#define STANDARD_STARTFILE_PREFIX_2 \"\" +~a~%" + libc line)))) + + ;; Don't retain a dependency on the build-time sed. + (substitute* "fixincludes/fixincl.x" + (("static char const sed_cmd_z\\[\\] =.*;") + "static char const sed_cmd_z[] = \"sed\";")))) + + (alist-cons-after + 'configure 'post-configure + (lambda _ + ;; Don't store configure flags, to avoid retaining references to + ;; build-time dependencies---e.g., `--with-ppl=/nix/store/xxx'. + (substitute* "Makefile" + (("^TOPLEVEL_CONFIGURE_ARGUMENTS=(.*)$" _ rest) + "TOPLEVEL_CONFIGURE_ARGUMENTS=\n"))) + (alist-replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (zero? + (system* "make" + ,(if stripped? + "install-strip" + "install")))) + %standard-phases))))) + + (properties `((gcc-libc . ,(assoc-ref inputs "libc")))) + (synopsis "The GNU Compiler Collection") + (description + "The GNU Compiler Collection includes compiler front ends for C, C++, +Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well as +libraries for these languages (libstdc++, libgcj, libgomp,...). + +GCC development is a part of the GNU Project, aiming to improve the compiler +used in the GNU system including the GNU/Linux variant.") + (license gpl3+) + (home-page "http://gcc.gnu.org/")))) -- cgit v1.2.3 From c6bded8a296d5593e31f6f860948ca2c2cdd43d4 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Tue, 26 Mar 2013 22:14:24 +0100 Subject: Add (guix build-system cmake). * guix/build/cmake-build-system.scm, guix/build-system/cmake.scm: New files. * Makefile.am (MODULES): Add them. --- Makefile.am | 2 + guix/build-system/cmake.scm | 123 ++++++++++++++++++++++++++++++++++++++ guix/build/cmake-build-system.scm | 63 +++++++++++++++++++ 3 files changed, 188 insertions(+) create mode 100644 guix/build-system/cmake.scm create mode 100644 guix/build/cmake-build-system.scm (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 022c9a9afe..41ef50318c 100644 --- a/Makefile.am +++ b/Makefile.am @@ -38,6 +38,7 @@ MODULES = \ guix/gnu-maintenance.scm \ guix/licenses.scm \ guix/build-system.scm \ + guix/build-system/cmake.scm \ guix/build-system/gnu.scm \ guix/build-system/perl.scm \ guix/build-system/trivial.scm \ @@ -45,6 +46,7 @@ MODULES = \ guix/store.scm \ guix/ui.scm \ guix/build/download.scm \ + guix/build/cmake-build-system.scm \ guix/build/gnu-build-system.scm \ guix/build/perl-build-system.scm \ guix/build/utils.scm \ diff --git a/guix/build-system/cmake.scm b/guix/build-system/cmake.scm new file mode 100644 index 0000000000..2a9db80cf8 --- /dev/null +++ b/guix/build-system/cmake.scm @@ -0,0 +1,123 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013 Cyril Roelandt +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (guix build-system cmake) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (guix derivations) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (guix packages) + #:use-module (ice-9 match) + #:export (cmake-build + cmake-build-system)) + +;; Commentary: +;; +;; Standard build procedure for packages using CMake. This is implemented as an +;; extension of `gnu-build-system'. +;; +;; Code: + +(define* (cmake-build store name source inputs + #:key (guile #f) + (outputs '("out")) (configure-flags ''()) + (make-flags ''()) + (patches ''()) (patch-flags ''("--batch" "-p1")) + (cmake (@ (gnu packages cmake) cmake)) + (out-of-source? #f) + (path-exclusions ''()) + (tests? #t) + (test-target "test") + (parallel-build? #t) (parallel-tests? #f) + (patch-shebangs? #t) + (strip-binaries? #t) + (strip-flags ''("--strip-debug")) + (strip-directories ''("lib" "lib64" "libexec" + "bin" "sbin")) + (phases '(@ (guix build cmake-build-system) + %standard-phases)) + (system (%current-system)) + (imported-modules '((guix build cmake-build-system) + (guix build gnu-build-system) + (guix build utils))) + (modules '((guix build cmake-build-system) + (guix build gnu-build-system) + (guix build utils)))) + "Build SOURCE using CMAKE, and with INPUTS. This assumes that SOURCE +provides a 'CMakeLists.txt' file as its build system." + (define builder + `(begin + (use-modules ,@modules) + (cmake-build #:source ,(if (and source (derivation-path? source)) + (derivation-path->output-path source) + source) + #:system ,system + #:outputs %outputs + #:inputs %build-inputs + #:patches ,patches + #:patch-flags ,patch-flags + #:phases ,phases + #:configure-flags ,configure-flags + #:make-flags ,make-flags + #:out-of-source? ,out-of-source? + #:path-exclusions ,path-exclusions + #:tests? ,tests? + #:test-target ,test-target + #:parallel-build? ,parallel-build? + #:parallel-tests? ,parallel-tests? + #:patch-shebangs? ,patch-shebangs? + #:strip-binaries? ,strip-binaries? + #:strip-flags ,strip-flags + #:strip-directories ,strip-directories))) + + (define guile-for-build + (match guile + ((? package?) + (package-derivation store guile system)) + ((and (? string?) (? derivation-path?)) + guile) + (#f ; the default + (let* ((distro (resolve-interface '(gnu packages base))) + (guile (module-ref distro 'guile-final))) + (package-derivation store guile system))))) + + (let ((cmake (package-derivation store cmake system))) + (build-expression->derivation store name system + builder + `(,@(if source + `(("source" ,source)) + '()) + ("cmake" ,cmake) + ,@inputs + + ;; Keep the standard inputs of + ;; `gnu-build-system'. + ,@(standard-inputs system)) + + #:modules imported-modules + #:outputs outputs + #:guile-for-build guile-for-build))) + +(define cmake-build-system + (build-system (name 'cmake) + (description "The standard CMake build system") + (build cmake-build))) + +;;; cmake.scm ends here diff --git a/guix/build/cmake-build-system.scm b/guix/build/cmake-build-system.scm new file mode 100644 index 0000000000..877d8110d7 --- /dev/null +++ b/guix/build/cmake-build-system.scm @@ -0,0 +1,63 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013 Ludovic Courtès +;;; Copyright © 2013 Cyril Roelandt +;;; +;;; 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 with GNU Guix. If not, see . + +(define-module (guix build cmake-build-system) + #:use-module ((guix build gnu-build-system) + #:renamer (symbol-prefix-proc 'gnu:)) + #:use-module (guix build utils) + #:use-module (ice-9 match) + #:export (%standard-phases + cmake-build)) + +;; Commentary: +;; +;; Builder-side code of the standard cmake build procedure. +;; +;; Code: + +(define* (configure #:key outputs (configure-flags '()) + #:allow-other-keys) + "Configure the given package." + (let ((out (assoc-ref outputs "out"))) + (if (file-exists? "CMakeLists.txt") + (let ((args `(,(string-append "-DCMAKE_INSTALL_PREFIX=" out) + ,@configure-flags))) + (format #t "running 'cmake' with arguments ~s~%" args) + (zero? (apply system* "cmake" args))) + (error "no CMakeLists.txt found")))) + +(define* (check #:key (tests? #t) (parallel-tests? #t) (test-target "test") + #:allow-other-keys) + (let ((gnu-check (assoc-ref gnu:%standard-phases 'check))) + (gnu-check #:tests? tests? #:test-target test-target + #:parallel-tests? parallel-tests?))) + +(define %standard-phases + ;; Everything is as with the GNU Build System except for the `configure' + ;; and 'check' phases. + (alist-replace 'configure configure + (alist-replace 'check check + gnu:%standard-phases))) + +(define* (cmake-build #:key inputs (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given package, applying all of PHASES in order." + (apply gnu:gnu-build #:inputs inputs #:phases phases args)) + +;;; cmake-build-system.scm ends here -- cgit v1.2.3