>From 45e7d3afb7247c3fc82fb9d1b275254bde054911 Mon Sep 17 00:00:00 2001 From: Cyrill Schenkel <[email protected]> Date: Sun, 6 Jul 2014 10:40:05 +0200 Subject: [PATCH] gnu: Add xulrunner and conkeror.
* gnu-system.am (GNU_SYSTEM_MODULES, dist_patch_DATA): Add new package and patch. * gnu/packages/conkeror.scm: New file. * gnu/packages/patches/xulrunner-install.patch: New file. * gnu/packages/xulrunner.scm: New file. --- gnu-system.am | 5 +- gnu/packages/conkeror.scm | 95 +++++++++++++++++++++++++ gnu/packages/patches/xulrunner-install.patch | 41 +++++++++++ gnu/packages/xulrunner.scm | 100 +++++++++++++++++++++++++++ 4 files changed, 240 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/conkeror.scm create mode 100644 gnu/packages/patches/xulrunner-install.patch create mode 100644 gnu/packages/xulrunner.scm diff --git a/gnu-system.am b/gnu-system.am index a538c45..3966c5a 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -55,6 +55,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/cmake.scm \ gnu/packages/compression.scm \ gnu/packages/complexity.scm \ + gnu/packages/conkeror.scm \ gnu/packages/cook.scm \ gnu/packages/cpio.scm \ gnu/packages/cppi.scm \ @@ -244,6 +245,7 @@ GNU_SYSTEM_MODULES = \ gnu/packages/xml.scm \ gnu/packages/xnee.scm \ gnu/packages/xorg.scm \ + gnu/packages/xulrunner.scm \ gnu/packages/yasm.scm \ gnu/packages/zile.scm \ gnu/packages/zip.scm \ @@ -375,7 +377,8 @@ dist_patch_DATA = \ gnu/packages/patches/vpnc-script.patch \ gnu/packages/patches/w3m-fix-compile.patch \ gnu/packages/patches/xmodmap-asprintf.patch \ - gnu/packages/patches/xpdf-constchar.patch + gnu/packages/patches/xpdf-constchar.patch \ + gnu/packages/patches/xulrunner-install.patch bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux diff --git a/gnu/packages/conkeror.scm b/gnu/packages/conkeror.scm new file mode 100644 index 0000000..e5f014f --- /dev/null +++ b/gnu/packages/conkeror.scm @@ -0,0 +1,95 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 Cyrill Schenkel <[email protected]> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(define-module (gnu packages conkeror) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system trivial) + #:use-module (gnu packages) + #:use-module (gnu packages xulrunner) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) + #:use-module (gnu packages compression) + #:use-module (ice-9 format)) + +(define-public conkeror + (package + (name "conkeror") + (version "1.0pre1") + (source (origin + (method url-fetch) + (uri + (string-append "http://repo.or.cz/w/conkeror.git/snapshot/" + "8a26fff5896a3360549e2adfbf06b1d57e909266" + ".tar.gz")) + (sha256 + (base32 + "1cgjzi7g3g22zcx6bpfnid4i12sb45w6icmxdzjn8d3c0m8qsyp1")))) + (build-system trivial-build-system) + (inputs `(("xulrunner" ,xulrunner) + ("bash" ,bash))) + (native-inputs `(("tar" ,tar) + ("gzip" ,gzip))) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (ice-9 ftw) + (guix build utils)) + (let ((select? + (lambda (name) + (not (equal? (car (string->list name)) #\.)))) + (datadir (string-append %output "/share/conkeror")) + (launcher "bin/conkeror")) + (setenv "PATH" (string-append + (assoc-ref %build-inputs "tar") "/bin:" + (assoc-ref %build-inputs "gzip") "/bin")) + (system* "tar" "xvf" (assoc-ref %build-inputs "source")) + (copy-recursively (string-append + (getcwd) "/" + (car (scandir (getcwd) select?))) + datadir) + (chdir %output) + (mkdir "bin") + (call-with-output-file launcher + (lambda (p) + (format p "#!~a/bin/bash +exec ~a/bin/xulrunner ~a \"$@\"~%" + (assoc-ref %build-inputs "bash") + (assoc-ref %build-inputs "xulrunner") + (string-append datadir + "/application.ini")))) + (chmod launcher #o555))))) + (synopsis "Keyboard focused web browser with Emacs look and feel") + (description " Conkeror is a highly-programmable web browser based on +Mozilla XULRunner which is the base of all Mozilla products including +Firefox. Conkeror has a sophisticated keyboard system for running commands and +interacting with web page content, modelled after Emacs and Lynx. It is +self-documenting and extensible with JavaScript. + +It comes with builtin support for several Web 2.0 sites like several Google +services (Search, Gmail, Maps, Reader, etc.), Del.icio.us, Reddit, Last.fm and +YouTube. For easier editing of form fields, it can spawn external editors. For +this feature the recommended conkeror-spawn-process-helper package needs to be +installed. + +Despite its very similar sounding name, Conkeror is not related to the KDE web +browser and file manager Konqueror in any way. ") + (home-page "http://conkeror.org") + (license (list license:gpl2 + license:lgpl2.1)))) diff --git a/gnu/packages/patches/xulrunner-install.patch b/gnu/packages/patches/xulrunner-install.patch new file mode 100644 index 0000000..89b44df --- /dev/null +++ b/gnu/packages/patches/xulrunner-install.patch @@ -0,0 +1,41 @@ +--- a/startupcache/test/Makefile.in ++++ a/startupcache/test/Makefile.in +@@ -1,10 +1,6 @@ + # + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + LIBS += $(MOZ_COMPONENT_LIBS) +-DIST_FILES += \ +- $(srcdir)/TestStartupCacheTelemetry.manifest \ +- $(srcdir)/TestStartupCacheTelemetry.js \ +- $(NULL) +--- a/startupcache/test/moz.build ++++ a/startupcache/test/moz.build +@@ -3,8 +3,12 @@ + # This Source Code Form is subject to the terms of the Mozilla Public + # License, v. 2.0. If a copy of the MPL was not distributed with this + # file, You can obtain one at http://mozilla.org/MPL/2.0/. + + CPP_UNIT_TESTS += [ + 'TestStartupCache.cpp', + ] + ++EXTRA_COMPONENTS += [ ++ 'TestStartupCacheTelemetry.js', ++ 'TestStartupCacheTelemetry.manifest', ++] +--- a/testing/testsuite-targets.mk ++++ a/testing/testsuite-targets.mk +@@ -508,8 +508,10 @@ + ifeq ($(MOZ_WIDGET_TOOLKIT),android) + $(NSINSTALL) $(topsrcdir)/testing/android_cppunittest_manifest.txt $(PKG_STAGE)/cppunittests + endif ++ifeq ($(MOZ_DISABLE_STARTUPCACHE),) + $(NSINSTALL) $(topsrcdir)/startupcache/test/TestStartupCacheTelemetry.js $(PKG_STAGE)/cppunittests + $(NSINSTALL) $(topsrcdir)/startupcache/test/TestStartupCacheTelemetry.manifest $(PKG_STAGE)/cppunittests ++endif + cp -RL $(DIST)/bin/jsapi-tests$(BIN_SUFFIX) $(PKG_STAGE)/cppunittests + + stage-jittest: make-stage-dir diff --git a/gnu/packages/xulrunner.scm b/gnu/packages/xulrunner.scm new file mode 100644 index 0000000..fdcc063 --- /dev/null +++ b/gnu/packages/xulrunner.scm @@ -0,0 +1,100 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2014 Cyrill Schenkel <[email protected]> +;;; +;;; 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 <http://www.gnu.org/licenses/>. + +(define-module (gnu packages xulrunner) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages python) + #:use-module (gnu packages perl) + #:use-module (gnu packages zip) + #:use-module (gnu packages glib) + #:use-module (gnu packages gtk) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages yasm) + #:use-module (gnu packages curl) + #:use-module (gnu packages linux) + #:use-module (gnu packages pulseaudio) + #:use-module (gnu packages xorg) + #:use-module (ice-9 format)) + +(define-public xulrunner + (package + (name "xulrunner") + (version "31.0b6") + (source (origin + (method url-fetch) + (uri + (string-append + "http://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/" + version "/source/xulrunner-" version ".source.tar.bz2")) + (sha256 + (base32 + "0h5jzz8998qpypx52svlbyaik5zw5hsp5n98pnvx1ahkahj0xj9n")) + (patches (list (search-patch "xulrunner-install.patch"))))) + (build-system gnu-build-system) + (inputs `(("gtk+-2" ,gtk+-2) + ("dbus" ,dbus) + ("dbus-glib" ,dbus-glib) + ("alsa-lib" ,alsa-lib) + ("pulseaudio" ,pulseaudio) + ("libxt" ,libxt))) + (native-inputs `(("python" ,python-2) + ("perl" ,perl) + ("unzip" ,unzip) + ("zip" ,zip) + ("pkg-config" ,pkg-config) + ("yasm" ,yasm))) + (arguments + `(#:make-flags '("-f" "client.mk" "build") + #:phases + (alist-replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (call-with-output-file ".mozconfig" + (lambda (p) + (format p "mk_add_options MOZ_CO_PROJECT=xulrunner +mk_add_options MOZ_OBJDIR=~a/obj-xulrunner + +ac_add_options --enable-application=xulrunner +ac_add_options --disable-gstreamer +ac_add_options --prefix=~a~%" (getcwd) out))) + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "SHELL" (which "bash")))) + (alist-cons-after + 'install 'make-xpcshell-executable + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (chmod (string-append + out "/lib/xulrunner-devel-" + (car (string-split ,version #\b)) + "/sdk/bin/xpcshell") + #o555))) + (alist-delete 'check %standard-phases))))) + (synopsis "A run-time engine for XUL") + (description "XULRunner is a Mozilla runtime package that can be used to +bootstrap XUL+XPCOM applications that are as rich as Firefox and +Thunderbird. It provides mechanisms for installing, upgrading, and +uninstalling these applications. XULRunner also provides libxul, a solution +which allows the embedding of Mozilla technologies in other projects and +products.") + (home-page + "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/XULRunner") + (license license:mpl2.0))) -- 2.0.0
