From mboxrd@z Thu Jan 1 00:00:00 1970 From: swedebugia Subject: Help needed with newmoon Date: Wed, 6 Mar 2019 21:04:17 +0100 Message-ID: <7a6ed6cd-ec48-0023-d637-8ca9c7e410f6@riseup.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="p2sLub9DtlTKfc0wYMcJsmV3VRR90nbCZ" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:37709) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h1cko-00048a-8n for guix-devel@gnu.org; Wed, 06 Mar 2019 15:03:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h1ckj-0001HP-4e for guix-devel@gnu.org; Wed, 06 Mar 2019 15:03:02 -0500 Received: from mx1.riseup.net ([198.252.153.129]:58446) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h1cki-0001Gc-9K for guix-devel@gnu.org; Wed, 06 Mar 2019 15:02:57 -0500 Received: from bell.riseup.net (bell-pn.riseup.net [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.riseup.net (Postfix) with ESMTPS id 6A9921A599D for ; Wed, 6 Mar 2019 12:02:54 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id C0CCB222586 for ; Wed, 6 Mar 2019 12:02:52 -0800 (PST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --p2sLub9DtlTKfc0wYMcJsmV3VRR90nbCZ Content-Type: multipart/mixed; boundary="dSLnF2ZNQwmJ2GB8Fq2w2fp6sLwcdqq49"; protected-headers="v1" From: swedebugia To: guix-devel Message-ID: <7a6ed6cd-ec48-0023-d637-8ca9c7e410f6@riseup.net> Subject: Help needed with newmoon --dSLnF2ZNQwmJ2GB8Fq2w2fp6sLwcdqq49 Content-Type: multipart/mixed; boundary="------------848F93B43C7C9E23ADCAEFCE" Content-Language: en-US This is a multi-part message in MIME format. --------------848F93B43C7C9E23ADCAEFCE Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi My pet project for today was working on getting newmoon to build. I failed :/ I got the definition from ng0 and have improved a few things and updated it to the newest version. I investigated the 3 errors below: 1. sqlite3 needs to be compiled with SQLITE_ENABLE_FTS3 (this results in a lot of builds, patch attached) 2. our libvpx does not provide vpx_mem/vpx_mem.h even though it is in the source of libvpx it is not installed it seems. 3. the pulseaudio-error I do not understand: : fatal error: when writing output to : Broken pipe ?? Here are the errors with context: 0:19.11 checking for vpx >=3D 1.5.0... yes 0:19.11 checking MOZ_LIBVPX_CFLAGS... 0:19.11 checking MOZ_LIBVPX_LIBS... -L/gnu/store/7s6z2ybw86k7r97cwzrix9hngs729lrk-libvpx-1.8.0/lib -lvpx -lm 0:19.17 checking for vpx/vpx_decoder.h... yes 0:19.38 checking for vpx_codec_dec_init_ver in -lvpx... yes 0:19.42 checking for vpx_mem/vpx_mem.h... no 0:19.44 checking for libpulse... yes 0:19.45 checking MOZ_PULSEAUDIO_CFLAGS... -D_REENTRANT 0:19.45 checking MOZ_PULSEAUDIO_LIBS... -L/gnu/store/hd3x89yknm4k6k4gw16jy5xk7idq1sxf-pulseaudio-12.2/lib -lpulse= 0:19.47 : fatal error: when writing output to : Broken pipe 0:19.47 compilation terminated. 0:19.48 /tmp/guix-build-newmoon-28.4.0.drv-0/source/old-configure: line 14935: test: : integer expression expected 0:19.50 checking for wget... no 0:19.52 checking for sqlite3 >=3D 3.26.0... yes 0:19.52 checking SQLITE_CFLAGS... 0:19.52 checking SQLITE_LIBS... -L/gnu/store/kg104rhqzvmnpqxk91ayvwxzsrncr0f4-sqlite-3.26.0/lib -lsqlite3= 0:19.67 checking for SQLITE_SECURE_DELETE support in system SQLite... ye= s 0:19.78 checking for SQLITE_THREADSAFE support in system SQLite... yes 0:19.90 checking for SQLITE_ENABLE_FTS3 support in system SQLite... no 0:19.90 configure: error: System SQLite library is not compiled with SQLITE_ENABLE_FTS3. 0:19.93 DEBUG: 0:19.94 DEBUG: configure:15039: checking for wget 0:19.94 DEBUG: configure:15362: checking for sqlite3 >=3D 3.26.0 0:19.94 DEBUG: configure:15369: checking SQLITE_CFLAGS 0:19.94 DEBUG: configure:15374: checking SQLITE_LIBS 0:19.94 DEBUG: configure:15405: checking for SQLITE_SECURE_DELETE support in system SQLite 0:19.94 DEBUG: configure:15428: /gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0/bin/gcc -std=3Dgnu9= 9 -o conftest -fno-strict-aliasing -fno-math-errno -msse2 -mfpmath=3Dsse -pthread -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id conftest.c -ldl -L/gnu/store/kg104rhqzvmnpqxk91ayvwxzsrncr0f4-sqlite-3.26.0/lib -lsqlite3 1>&5 0:19.94 DEBUG: configure:15451: checking for SQLITE_THREADSAFE support in system SQLite 0:19.94 DEBUG: configure:15474: /gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0/bin/gcc -std=3Dgnu9= 9 -o conftest -fno-strict-aliasing -fno-math-errno -msse2 -mfpmath=3Dsse -pthread -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id conftest.c -ldl -L/gnu/store/kg104rhqzvmnpqxk91ayvwxzsrncr0f4-sqlite-3.26.0/lib -lsqlite3 1>&5 0:19.94 DEBUG: configure:15497: checking for SQLITE_ENABLE_FTS3 support in system SQLite 0:19.94 DEBUG: configure:15520: /gnu/store/n2p1zs14y89lwkg9da68y12pc10c6sw9-gcc-5.5.0/bin/gcc -std=3Dgnu9= 9 -o conftest -fno-strict-aliasing -fno-math-errno -msse2 -mfpmath=3Dsse -pthread -lpthread -Wl,-z,noexecstack -Wl,-z,text -Wl,--build-id conftest.c -ldl -L/gnu/store/kg104rhqzvmnpqxk91ayvwxzsrncr0f4-sqlite-3.26.0/lib -lsqlite3 1>&5 0:19.94 DEBUG: configure: failed program was: 0:19.94 DEBUG: #line 15511 "configure" 0:19.94 DEBUG: #include "confdefs.h" 0:19.94 DEBUG: 0:19.94 DEBUG: #include "sqlite3.h" 0:19.94 DEBUG: 0:19.94 DEBUG: int main(int argc, char **argv){ 0:19.94 DEBUG: return !sqlite3_compileoption_used("SQLITE_ENABLE_FTS3"); 0:19.94 DEBUG: } 0:19.94 DEBUG: configure: error: System SQLite library is not compiled with SQLITE_ENABLE_FTS3. 0:19.94 ERROR: old-configure failed 0:19.98 *** Fix above errors and then restart with\ 0:19.98 "/gnu/store/7j3941iannrngdvgbclyxid12vds5w9i-make-4.2.1/bin/make -f client.mk build" 0:19.98 make[1]: *** [client.mk:378: configure] Error 1 make: *** [GNUmakefile:9: build] Error 2 --=20 Cheers Swedebugia --------------848F93B43C7C9E23ADCAEFCE Content-Type: text/x-patch; name="0001-WIP-gnu-Add-New-Moon.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-WIP-gnu-Add-New-Moon.patch" =46rom 89c0629198b10264c07de88f2f678af5292d4fbf Mon Sep 17 00:00:00 2001 From: swedebugia Date: Sat, 23 Feb 2019 05:34:45 +0100 Subject: [PATCH 1/2] WIP gnu: Add New Moon. --- gnu/packages/web-browsers.scm | 400 +++++++++++++++++++++++++++++++++- 1 file changed, 395 insertions(+), 5 deletions(-) diff --git a/gnu/packages/web-browsers.scm b/gnu/packages/web-browsers.sc= m index a19a0dc7c..105fe2839 100644 --- a/gnu/packages/web-browsers.scm +++ b/gnu/packages/web-browsers.scm @@ -4,10 +4,12 @@ ;;; Copyright =C2=A9 2015, 2016 Efraim Flashner ;;; Copyright =C2=A9 2016 Kei Kebreau ;;; Copyright =C2=A9 2017 Eric Bavier +;;; Copyright =C2=A9 2017, 2018 Nils Gillmann ;;; Copyright =C2=A9 2018, 2019 Tobias Geerinckx-Rice ;;; Copyright =C2=A9 2018 Rutger Helling ;;; Copyright =C2=A9 2018 Timo Eisenmann ;;; Copyright =C2=A9 2018 Pierre Neidhardt +;;; Copyright =C2=A9 2019 Pierre Neidhardt ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,30 +30,52 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages databases) #:use-module (gnu packages documentation) #:use-module (gnu packages fltk) #:use-module (gnu packages fontutils) - #:use-module (gnu packages gtk) + #:use-module (gnu packages gcc) + #:use-module (gnu packages gl) + #:use-module (gnu packages glib) + #:use-module (gnu packages gnome) #:use-module (gnu packages gnupg) + #:use-module (gnu packages gnuzilla) + #:use-module (gnu packages gstreamer) + #:use-module (gnu packages gtk) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages kerberos) + #:use-module (gnu packages libcanberra) #:use-module (gnu packages libevent) + #:use-module (gnu packages libffi) #:use-module (gnu packages libidn) + #:use-module (gnu packages libreoffice) + #:use-module (gnu packages linux) #:use-module (gnu packages lisp) #:use-module (gnu packages lua) - #:use-module (gnu packages gnome) + #:use-module (gnu packages m4) #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) - #:use-module (gnu packages python-web) +; #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages qt) - #:use-module (gnu packages image) + #:use-module (gnu packages shells) #:use-module (gnu packages sqlite) #:use-module (gnu packages tls) + #:use-module (gnu packages video) #:use-module (gnu packages webkit) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) - #:use-module (gnu packages gcc) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix build-system gnu) @@ -473,3 +497,369 @@ features for productive professionals.") ("unix-opts" ,sbcl-unix-opts) ("trivial-clipboard" ,sbcl-trivial-clipboard))) (synopsis "Infinitely extensible web-browser (with Lisp development = files)"))) + +(define-public newmoon + (package + (name "newmoon") + (version "28.4.0") + (source + (origin + ;; Only generated github tarball available. + (method git-fetch) + (uri (git-reference + (url "https://github.com/MoonchildProductions/UXP") + (commit (string-append "PM" version "_Release")))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0wnn15y7qpmz1b31rrmdlf3w4qz6f6qqrl8f1lgafx8czqgg9lwx")))) + (build-system gnu-build-system) + (inputs + `( + ;; ("gst-plugins-base" ,gst-plugins-base) + ;; ("gstreamer" ,gstreamer) + ;; ("mozjs" ,mozjs) + ;; ("nss" ,nss) + ;; ("openssl" ,openssl) + ("alsa-lib" ,alsa-lib) + ("bzip2" ,bzip2) + ("cairo" ,cairo) + ("cups" ,cups) + ("dbus" ,dbus) + ("dbus-glib" ,dbus-glib) + ("ffmpeg" ,ffmpeg) + ("freetype" ,freetype) + ("glib" ,glib) + ("gobject-introspection" ,gobject-introspection) + ("gtk+-2" ,gtk+-2) + ("hunspell" ,hunspell) + ("inetutils" ,inetutils) ; Native-input? + ("libcanberra" ,libcanberra) + ("libevent" ,libevent) + ("libffi" ,libffi) + ("libgnome" ,libgnome) + ("libidl" ,libidl) + ("libjpeg-turbo" ,libjpeg-turbo) + ("libnotify" ,libnotify) + ("libpng-apng" ,libpng-apng) + ("libvpx" ,libvpx) + ("libwebp" ,libwebp) + ("libx11" ,libx11) + ("libxcomposite" ,libxcomposite) + ("libxext" ,libxext) + ("libxft" ,libxft) + ("libxi" ,libxi) + ("libxrender" ,libxrender) + ("libxscrnsaver" ,libxscrnsaver) + ("libxt" ,libxt) + ("libxt" ,libxt) + ("mesa" ,mesa) + ("mit-krb5" ,mit-krb5) + ("nspr" ,nspr) + ("pixman" ,pixman) + ("pulseaudio" ,pulseaudio) + ("python-2" ,python-2) + ("python-ply" ,python-ply) + ("sqlite" ,sqlite-3.26.0) + ("startup-notification" ,startup-notification) + ("tcsh" ,tcsh) + ("unzip" ,unzip) + ("xextproto" ,xextproto) + ("yasm" ,yasm) + ("zip" ,zip))) + (native-inputs + `(("autoconf-2.13" ,autoconf-2.13) + ("fontconfig" ,fontconfig) + ("perl" ,perl) + ("pkg-config" ,pkg-config) + ("m4" ,m4) + ("which" ,which) + ("bash" ,bash))) + (arguments + `(#:modules ((ice-9 ftw) + (ice-9 rdelim) + (ice-9 match) + ,@%gnu-build-system-modules) + ;; #:validate-runpath? #f + #:phases + (modify-phases %standard-phases + (replace 'configure + ;; According to + ;; the only way to set configure options is in the .mozconfig= file + ;; (or the file set by variable MOZCONFIG). If you try to us= e + ;; our configure-flags, the configuration will break in unexp= ected + ;; ways. This includes breaking the mach build system detect= ion + ;; of --host, --build, and --arch, and carrying flags recursi= vely + ;; on to parts used later in the build system. + ;; The palemoon.org link describes an MS Windows build, but a= t + ;; least for Gentoo it is done comparable: + ;; . + (lambda* (#:key outputs configure-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bash (which "bash")) + (abs-srcdir (getcwd)) + (srcdir (string-append "../" (basename abs-srcdir)))= + (flags `(,(string-append "--prefix=3D" out) + ,@configure-flags)) + (mozconfig (string-append (getcwd) "/.mozconfig"))) + (setenv "SHELL" bash) + (setenv "AUTOCONF" + (string-append (assoc-ref %build-inputs + "autoconf-2.13") + "/bin/autoconf")) + (setenv "BUILD_OBJ_DIR" (string-append (getcwd) "/o")) + (setenv "CONFIG_SHELL" bash) + (setenv "QA_CONFIGURE_OPTIONS" ".*") + (setenv "MOZBUILD_STATE_PATH" + (string-append (getcwd) "/mach_state")) + (setenv "MOZCONFIG" + (string-append (getcwd) "/.mozconfig")) + (setenv "MOZ_NOSPAM" "1") + (mkdir-p (string-append (getcwd) "/builddir")) + (with-output-to-file mozconfig + (lambda () + ;; These procedures help us create the .mozbuild-file= + (define (enable option) + (string-append "ac_add_options --enable-" option "\= n")) + (define (disable option) + (string-append "ac_add_options --disable-" option "= \n")) + (define (var env) + (string-append "mk_add_options " env "\n")) + (define (with option) + (string-append "ac_add_options --with-" option "\n"= )) + ;; The full list of options can be obtained by runnin= g: + ;; $ ./configure --help + (display + (string-append + ;; Todo: dbus, safe-browsing,=20 + (enable "application=3Dpalemoon") + (enable "chrome-format=3Domni") + (enable "content-sandbox") + (enable "default-toolkit=3D\"cairo-gtk2\"") + (enable "devtools") + (enable "export-js") + (enable "ffmpeg") + (enable "jemalloc") + (enable "pulseaudio") + (enable "sandbox") + (enable "skia") + (enable "startup-notification") + (enable "strip") + (enable "system-cairo") + (enable "system-ffi") + (enable "system-hunspell") + (enable "system-pixman") + (enable "system-sqlite") ;Needs >=3D sqlite-3.26.0 + + (disable "accessibility") ;There is no such option?= + (disable "alsa") + ;;(disable "codesighs") + (disable "debug-symbols") + (disable "debug") + (disable "gamepad") + (disable "install-strip") + (disable "necko-wifi") + (disable "official-branding") ; Trademarks apply fo= r official branding + (disable "optimize") + (disable "parental-controls") ;Yes? No? + (disable "tests") ; TODO fix tests + (disable "updater") + (disable "valgrind") + + (with "pthreads") + (with "system-bz2") + (with "system-icu") + (with "system-jpeg") + (with "system-libevent") + (with "system-libvpx") + (with "system-nspr") + (with "system-png") + (with "system-zlib") + + (var "AUTOCONF=3D\"autoconf\"") + (var (string-append "MOZ_OBJDIR=3D" (getenv "BUILD_= OBJ_DIR"))) ;new + (var "PYTHON=3D\"python2\"") + "ac_add_options --prefix=3D" out "\n" + + ;;"ac_add_options --disable-installer\n" ; no such = option. + ;;"ac_add_options --disable-logging\n" + ;;"ac_add_options --disable-websms-backend\n" + ;;"ac_add_options --with-intl-api\n" + ;;"ac_add_options --with-system-ply\n" + ;;"ac_add_options --with-system-webp\n" + )))) + (display "mach configure, this is expected to \"crash\"\n= ") + (zero? (system* "./mach" "configure")) + (display "mach, and another round.\n") + (zero? (system* "./mach"))) + #t)) + (add-after 'patch-source-shebangs 'setenvs + (lambda _ + (substitute* (list "build/autoconf/config.guess" + "client.mk" + "js/src/configure.in" + "intl/icu/source/configure") + (("/bin/sh") (which "sh"))) + #t)) + (add-before 'build 'patch-clientmk + (lambda _ + (substitute* "client.mk" + (("/bin/sh") (which "sh"))) + #t)) + (replace 'build + (lambda _ + (chdir "build") + (display "mach build, the real build now\n") + (system* "../mach" "build") + #t)) + (add-after + 'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlo= pen + (lambda _ + ;; libxul.so dynamically opens libraries, so here we explic= itly + ;; link them into libxul.so instead. + ;; + ;; TODO: It might be preferable to patch in absolute file n= ames in + ;; calls to dlopen or PR_LoadLibrary, but that didn't seem = to + ;; work. More investigation is needed. + (substitute* "toolkit/library/moz.build" + (("^# This needs to be last") + "OS_LIBS +=3D [ + 'GL', 'gnome-2', 'canberra', 'Xss', 'cups', 'gssapi_krb5', + 'gstreamer-1.0', 'gstapp-1.0', 'gstvideo-1.0', 'png' ]\n\n")) + #t)) + (add-after 'unpack 'privacy-patch-branding + (lambda _ + (substitute* "application/palemoon/branding/unofficial/pref= /palemoon-branding.js" + (("http://www.palemoon.org/unofficial.shtml") + "https://gnu.org/s/guix")) + (substitute* "application/palemoon/branding/shared/pref/pre= ferences.inc" + (("http://www.palemoon.org/firstrun.shtml") + "https://gnu.org")) + (substitute* "application/palemoon/branding/shared/locales/= browserconfig.properties" + (("http://start.palemoon.org/") + "https://gnu.org/s/guix")) + #t)) + (replace 'install + (lambda* (#:key name outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lib (string-append out "/lib")) + (palemoon (string-append + out "/lib/palemoon/palemoon")) + ;; Use one objectdirectory for all architectures. + (objdir "o") + ;; (prefsfile (string-append objdir "/dist/bin/brows= er" + ;; "/defaults/profile" + ;; "/prefs.js")) + (tarfile (string-append objdir "/dist/palemoon-" + ,version ".linux-x86_64" + ".tar.bz2"))) + ;; We skip this for now. + ;; (substitute* prefsfile + ;; (("# Mozilla User Preferences") + ;; "# Mozilla User Preferences\n + ;; pref(\"app.update.enabled\", false);\n + ;; pref(\"browser.backspace_action\", 0);\n + ;; pref(\"browser.ctrlTab.previews\", false);\n + ;; pref(\"intl.locale.matchOS\", true);\n + ;; pref(\"general.useragent.locale\", \"chrome://global/l= ocale/intl.properties\");\n + ;; pref(\"browser.display.use_system_colors\", true);")) + ;; Create the package, unpack it, manually install + ;; the files from there to not miss anything. + (zero? (system* "../mach" "package")) + (display (getcwd)) + (chdir (string-append "../" objdir "/dist")) + (zero? (system* "tar" "xjpf" + "palemoon-" ,version ".linux-x86_64.tar.b= z2")) + (mkdir-p (string-append out "/lib/palemoon")) + (copy-recursively "palemoon" + (string-append out "/lib/palemoon")) + (mkdir-p bin) + (symlink (string-append out "/lib/palemoon/palemoon") + (string-append bin "/newmoon")) + ;; Avoid duplicate binaries. + ;; https://bugzilla.mozilla.org/show_bug.cgi?id=3D658850 = for + (delete-file (string-append out "/lib/palemoon/palemoon-b= in"))))) + ;; swap check and install phases and set paths to installed bin= aries + (add-before 'check 'set-path-for-check + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "PATH" (string-append (getenv "PATH") ":" out "/b= in"))) + #t)) + (add-after 'install 'check + ;;(assoc-ref %standard-phases 'check)) + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin/newmoon"))) + (invoke bin "--version")))) + (delete 'check) + (delete 'bootstrap) + ;; (replace 'check + ;; (lambda* (#:key outputs #:allow-other-keys) + ;; (let* ((out (assoc-ref outputs "out")) + ;; (bin (string-append out "/bin/newmoon"))) + ;; (invoke bin "--version")))) + (add-after 'install 'install-icons + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out"))) + (display (getcwd)) + (with-directory-excursion "../../browser/branding/unoffic= ial" + (for-each + (lambda (file) + (let* ((size (string-filter char-numeric? file)) + (icons (string-append out "/share/icons/hicol= or/" + size "x" size "/apps"))= ) + (mkdir-p icons) + (copy-file file (string-append icons "/newmoon.png= ")))) + '("default16.png" "default32.png" "default48.png" + "mozicon128.png")))))) + (add-after 'install 'install-desktop-file + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (apps (string-append out "/share/applications"))) + (display (getcwd)) + (with-directory-excursion "../../browser/branding/officia= l" + (substitute* "palemoon.desktop" + (("Pale Moon") + "New Moon") + (("Exec=3Dpalemoon -new-tab https://start.palemoon.or= g") + "Exec=3Dnewmoon -new-tab https://gnu.org/s/guix") + (("Exec=3Dpalemoon -new-window") + "Exec=3Dnewmoon -new-window") + (("Exec=3Dpalemoon -private-window") + "Exec=3Dnewmoon -private-window") + (("palemoon") + "newmoon")) + (install-file "palemoon.desktop" + (string-append apps + "/newmoon.desktop"))))))))= ) + + (home-page "https://www.palemoon.org/") + (synopsis "Web Browser compiled from Pale Moon sources") + (description + "New Moon is a web browser compiled from Pale Moon sourcecode. New= Moon +is an independent browser derived from Firefox. + +Among its features are: +@itemize +@item It's fast (much codebloat has been removed since the fork from Fir= efox). +@item The developers adhere to defence-in-depth, increasing the security= +step-by-step. +@item Builds upon the Unified XUL Platform=20 +@item Comes with the Goanna layout engine (forked from Gecko).=20 +@item Uses the pre-Australis Firefox user interface Continues add-on sup= port +for XUL, XPCOM, and NPAPI plugins. +@item Supports extensions and themes exclusive to Pale Moon, such as Adb= lock +Latitude. +@item Defaults to DuckDuckGo as the search engine. +@item Uses the IP-API service instead of Google's for geolocation.=20 +@item Fully customizable user interface. +@item Newmoon is not a full featured (bloated) media player or recorder = but +does support the HTML5 video standard. +@end itemize\n") + (properties '((upstream-name . "Pale-Moon"))) + ;; The exception clause of the Palemoon license states that + ;; New Moon builds can be redistributed freely. + (license (list license:mpl2.0 ;and others, see toolkit/content/licen= se.html + license:gpl2+ + license:lgpl2.1)))) --=20 2.19.2 --------------848F93B43C7C9E23ADCAEFCE Content-Type: text/x-patch; name="0002-gnu-sqlite-Add-build-flag-SQLITE_ENABLE_FTS3.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0002-gnu-sqlite-Add-build-flag-SQLITE_ENABLE_FTS3.patch" =46rom 9296960b3d24e0ae00894ba8c7547b7c3cb77ad1 Mon Sep 17 00:00:00 2001 From: swedebugia Date: Wed, 6 Mar 2019 20:56:27 +0100 Subject: [PATCH 2/2] gnu: sqlite: Add build flag: SQLITE_ENABLE_FTS3 * gnu/packages/sqlite.scm (sqlite)[arguments]: Add it. --- gnu/packages/sqlite.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 05d7ce6b9..7bacbfe2e 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -73,7 +73,8 @@ ;; to use the system SQLite unless these options are enabled. (list (string-append "CFLAGS=3D-O2 -DSQLITE_SECURE_DELETE " "-DSQLITE_ENABLE_UNLOCK_NOTIFY " - "-DSQLITE_ENABLE_DBSTAT_VTAB")))) + "-DSQLITE_ENABLE_DBSTAT_VTAB " + "-DSQLITE_ENABLE_FTS3")))) ; Needed for newmo= on (home-page "https://www.sqlite.org/") (synopsis "The SQLite database management system") (description --=20 2.19.2 --------------848F93B43C7C9E23ADCAEFCE Content-Type: text/x-scheme; name="palemoon.scm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="palemoon.scm" ;;; ports - package definitions for infotropique OS/core ;;; Copyright (C) 2017, 2018 Nils Gillmann ;;; ;;; 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 .= ;; Part of this module were originally based on the gnu/packages/gnuzilla= =2Escm file ;; from GNU Guix which is covered by the GPL3 license. Consult the file f= or the ;; list of contributors. (define-module (ports www palemoon palemoon) #:use-module ((srfi srfi-1) #:hide (zip)) #:use-module (gnu packages) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (gnu packages autotools) #:use-module (gnu packages admin) #:use-module (gnu packages base) #:use-module (gnu packages databases) #:use-module (gnu packages glib) #:use-module (gnu packages gstreamer) #:use-module (gnu packages gtk) #:use-module (gnu packages gnome) #:use-module (gnu packages gnuzilla) #:use-module (gnu packages libcanberra) #:use-module (gnu packages cups) #:use-module (gnu packages kerberos) #:use-module (gnu packages m4) #:use-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) #:use-module (gnu packages libevent) #:use-module (gnu packages libreoffice) ;for hunspell #:use-module (gnu packages image) #:use-module (gnu packages libffi) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) #:use-module (gnu packages shells) #:use-module (gnu packages tls) #:use-module (gnu packages xorg) #:use-module (gnu packages gl) #:use-module (gnu packages assembly) #:use-module (gnu packages icu4c) #:use-module (gnu packages video) #:use-module (gnu packages xdisorg) #:use-module (gnu packages xorg) #:use-module (gnu packages bash)) (define-public newmoon (package (name "newmoon") (version "28.0.1") (source (origin (method url-fetch) (uri (string-append "https://github.com/MoonchildProductions/" "UXP/archive/" version "_Release.tar.gz")) ;; https://github.com/MoonchildProductions/UXP/archive/PM28.0.1_Re= lease.tar.gz (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0xfkbxa8618zb379m3aaycmbz0lj1s5f2mlwgykp8d5qyvd35bdj")))) (build-system gnu-build-system) (inputs `(("alsa-lib" ,alsa-lib) ("mit-krb5" ,mit-krb5) ("bzip2" ,bzip2) ("cairo" ,cairo) ("cups" ,cups) ("libgnome" ,libgnome) ("libcanberra" ,libcanberra) ("dbus-glib" ,dbus-glib) ("dbus" ,dbus) ("glib" ,glib) ("gstreamer" ,gstreamer) ("gst-plugins-base" ,gst-plugins-base) ("gtk+-2" ,gtk+-2) ("gobject-introspection" ,gobject-introspection) ("freetype" ,freetype) ("hunspell" ,hunspell) ("libxt" ,libxt) ("libffi" ,libffi) ("libvpx" ,libvpx) ("libxt" ,libxt) ("libxcomposite" ,libxcomposite) ("libidl" ,libidl) ("libwebp" ,libwebp) ("libpng-apng" ,libpng-apng) ("libjpeg-turbo" ,libjpeg-turbo) ("libxscrnsaver" ,libxscrnsaver) ("libx11" ,libx11) ("libxext" ,libxext) ("libxft" ,libxft) ("libxi" ,libxi) ("libxrender" ,libxrender) ("xextproto" ,xextproto) ("libevent" ,libevent) ("libnotify" ,libnotify) ("mesa" ,mesa) ;; ("mozjs" ,mozjs) ("nspr" ,nspr) ;; ("nss" ,nss) ;; ("openssl" ,openssl) ("python-2" ,python-2) ("python-ply" ,python-ply) ("pixman" ,pixman) ("pulseaudio" ,pulseaudio) ("startup-notification" ,startup-notification) ("sqlite" ,sqlite) ("tcsh" ,tcsh) ("unzip" ,unzip) ("yasm" ,yasm) ("zip" ,zip) ("zlib" ,zlib) ("inetutils" ,inetutils))) ; Native-input? (native-inputs `(("autoconf-2.13" ,autoconf-2.13) ("fontconfig" ,fontconfig) ("perl" ,perl) ("pkg-config" ,pkg-config) ("m4" ,m4) ("which" ,which) ("bash" ,bash))) (arguments `(#:modules ((ice-9 ftw) (ice-9 rdelim) (ice-9 match) ,@%gnu-build-system-modules) ;; #:validate-runpath? #f #:phases (modify-phases %standard-phases (replace 'configure ;; According to ;; the only way to set configure options is in the .mozconfig = file ;; (or the file set by variable MOZCONFIG). If you try to use= ;; our configure-flags, the configuration will break in unexpe= cted ;; ways. This includes breaking the mach build system detecti= on ;; of --host, --build, and --arch, and carrying flags recursiv= ely ;; on to parts used later in the build system. ;; The palemoon.org link describes an MS Windows build, but at= ;; least for Gentoo it is done comparable: ;; . (lambda* (#:key outputs configure-flags #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bash (which "bash")) (abs-srcdir (getcwd)) (srcdir (string-append "../" (basename abs-srcdir))) (flags `(,(string-append "--prefix=3D" out) ,@configure-flags)) (mozconfig (string-append (getcwd) "/.mozconfig"))) (setenv "SHELL" bash) (setenv "AUTOCONF" (string-append (assoc-ref %build-inputs "autoconf-2.13") "/bin/autoconf")) (setenv "BUILD_OBJ_DIR" (string-append (getcwd) "/o")) (setenv "CONFIG_SHELL" bash) (setenv "QA_CONFIGURE_OPTIONS" ".*") (setenv "MOZBUILD_STATE_PATH" (string-append (getcwd) "/mach_state")) (setenv "MOZCONFIG" (string-append (getcwd) "/.mozconfig")) (setenv "MOZ_NOSPAM" "1") (mkdir-p (string-append (getcwd) "/builddir")) (with-output-to-file mozconfig (lambda () (display (string-append "ac_add_options --enable-application=3Dbrowser\n" "mk_add_options MOZ_OBJDIR=3D" (getenv "BUILD_OBJ_DI= R") "\n" ;new "ac_add_options --prefix=3D" out "\n" "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" "ac_add_options --disable-accessibility\n" ;There is= no such option? "ac_add_options --disable-updater\n" "ac_add_options --disable-installer\n" "ac_add_options --disable-parental-controls\n" ;Yes?= No? "ac_add_options --disable-install-strip" "ac_add_options --disable-tests\n" "ac_add_options --with-system-ply\n" "ac_add_options --with-system-libevent\n" "ac_add_options --with-system-zlib\n" "ac_add_options --with-system-bz2\n" "ac_add_options --with-system-webp\n" "ac_add_options --with-system-libvpx\n" "ac_add_options --enable-system-hunspell\n" "ac_add_options --enable-system-ffi\n" "ac_add_options --enable-system-sqlite\n" ;Needs >=3D= sqlite-3.21.0 "ac_add_options --enable-system-cairo\n" "ac_add_options --enable-system-pixman\n" "ac_add_options --enable-shared-js\n" "ac_add_options --disable-valgrind\n" "ac_add_options --with-pthreads\n" "ac_add_options --disable-optimize\n" "ac_add_options --enable-gstreamer\n" "ac_add_options --enable-default-toolkit=3D\"cairo-g= tk2\"\n" "ac_add_options --disable-alsa\n" "ac_add_options --enable-strip\n" "ac_add_options --disable-codesighs\n" "ac_add_options --disable-gamepad\n" "ac_add_options --disable-logging\n" "ac_add_options --disable-websms-backend\n" "ac_add_options --enable-chrome-format=3Domni\n" "ac_add_options --enable-startup-notification\n" "ac_add_options --enable-shared-js\n" "ac_add_options --enable-devtools\n" ;; XXX! "ac_add_options --with-system-png\n" "ac_add_options --enable-pulseaudio\n" "ac_add_options --disable-necko-wifi\n" "ac_add_options --with-system-jpeg\n" "ac_add_options --disable-official-branding\n" ; Tra= demarks apply for official branding "mk_add_options PYTHON=3D\"python2\"\n" "mk_add_options AUTOCONF=3D\"autoconf\"\n" "ac_add_options --with-system-nspr\n" "ac_add_options --enable-sandbox\n" "ac_add_options --enable-content-sandbox\n" "ac_add_options --enable-skia\n" "ac_add_options --enable-jemalloc\n" "ac_add_options --with-system-icu\n" "ac_add_options --with-intl-api\n")))) (display "mach configure, this is expected to \"crash\"") (zero? (system* "./mach" "configure")) (display "mach, and another round.") (zero? (system* "./mach"))))) (add-after 'patch-source-shebangs 'setenvs (lambda _ (substitute* (list "build/autoconf/config.guess" "client.mk" "js/src/configure.in" "intl/icu/source/configure") (("/bin/sh") (which "sh"))) #t)) (add-before 'build 'patch-clientmk (lambda _ (substitute* "client.mk" (("/bin/sh") (which "sh"))) #t)) (replace 'build (lambda _ (chdir "build") (display "mach build, the real build now") (system* "../mach" "build") #t)) (add-after 'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlop= en (lambda _ ;; libxul.so dynamically opens libraries, so here we explici= tly ;; link them into libxul.so instead. ;; ;; TODO: It might be preferable to patch in absolute file na= mes in ;; calls to dlopen or PR_LoadLibrary, but that didn't seem t= o ;; work. More investigation is needed. (substitute* "toolkit/library/moz.build" (("^# This needs to be last") "OS_LIBS +=3D [ 'GL', 'gnome-2', 'canberra', 'Xss', 'cups', 'gssapi_krb5', 'gstreamer-1.0', 'gstapp-1.0', 'gstvideo-1.0', 'png' ]\n\n")) #t)) (add-after 'unpack 'privacy-patch-branding (lambda _ (substitute* "browser/branding/unofficial/pref/palemoon-bran= ding.js" (("http://www.palemoon.org/unofficial.shtml") "https://gnu.org/s/guix")) (substitute* "browser/branding/shared/pref/preferences.inc" (("http://www.palemoon.org/firstrun.shtml") "https://gnu.org")) (substitute* "browser/branding/shared/locales/browserconfig.= properties" (("http://start.palemoon.org/") "https://gnu.org/s/guix")) #t)) (replace 'install (lambda* (#:key name outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (lib (string-append out "/lib")) (palemoon (string-append out "/lib/palemoon/palemoon")) ;; Use one objectdirectory for all architectures. (objdir "o") ;; (prefsfile (string-append objdir "/dist/bin/browse= r" ;; "/defaults/profile" ;; "/prefs.js")) (tarfile (string-append objdir "/dist/palemoon-" ,version ".linux-x86_64" ".tar.bz2"))) ;; We skip this for now. ;; (substitute* prefsfile ;; (("# Mozilla User Preferences") ;; "# Mozilla User Preferences\n ;; pref(\"app.update.enabled\", false);\n ;; pref(\"browser.backspace_action\", 0);\n ;; pref(\"browser.ctrlTab.previews\", false);\n ;; pref(\"intl.locale.matchOS\", true);\n ;; pref(\"general.useragent.locale\", \"chrome://global/lo= cale/intl.properties\");\n ;; pref(\"browser.display.use_system_colors\", true);")) ;; Create the package, unpack it, manually install ;; the files from there to not miss anything. (zero? (system* "../mach" "package")) (display (getcwd)) (chdir (string-append "../" objdir "/dist")) (zero? (system* "tar" "xjpf" "palemoon-" ,version ".linux-x86_64.tar.bz= 2")) (mkdir-p (string-append out "/lib/palemoon")) (copy-recursively "palemoon" (string-append out "/lib/palemoon")) (mkdir-p bin) (symlink (string-append out "/lib/palemoon/palemoon") (string-append bin "/newmoon")) ;; Avoid duplicate binaries. ;; https://bugzilla.mozilla.org/show_bug.cgi?id=3D658850 f= or (delete-file (string-append out "/lib/palemoon/palemoon-bi= n"))))) ;; swap check and install phases and set paths to installed bina= ries (add-before 'check 'set-path-for-check (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (setenv "PATH" (string-append (getenv "PATH") ":" out "/bi= n"))) #t)) (add-after 'install 'check ;;(assoc-ref %standard-phases 'check)) (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin/newmoon"))) (invoke bin "--version")))) (delete 'check) (delete 'bootstrap) ;; (replace 'check ;; (lambda* (#:key outputs #:allow-other-keys) ;; (let* ((out (assoc-ref outputs "out")) ;; (bin (string-append out "/bin/newmoon"))) ;; (invoke bin "--version")))) (add-after 'install 'install-icons (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) (display (getcwd)) (with-directory-excursion "../../browser/branding/unoffici= al" (for-each (lambda (file) (let* ((size (string-filter char-numeric? file)) (icons (string-append out "/share/icons/hicolo= r/" size "x" size "/apps")))= (mkdir-p icons) (copy-file file (string-append icons "/newmoon.png"= )))) '("default16.png" "default32.png" "default48.png" "mozicon128.png")))))) (add-after 'install 'install-desktop-file (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (apps (string-append out "/share/applications"))) (display (getcwd)) (with-directory-excursion "../../browser/branding/official= " (substitute* "palemoon.desktop" (("Pale Moon") "New Moon") (("Exec=3Dpalemoon -new-tab https://start.palemoon.org= ") "Exec=3Dnewmoon -new-tab https://gnu.org/s/guix") (("Exec=3Dpalemoon -new-window") "Exec=3Dnewmoon -new-window") (("Exec=3Dpalemoon -private-window") "Exec=3Dnewmoon -private-window") (("palemoon") "newmoon")) (install-file "palemoon.desktop" (string-append apps "/newmoon.desktop")))))))))= (home-page "https://www.palemoon.org/") (synopsis "Web Browser compiled from Pale Moon sources") (description "New Moon is a web browser compiled from Pale Moon sourcecode. New = Moon is an independent browser derived from Firefox. Among its features are: Replaces the Gecko layout engine with the Goanna fork Uses the pre-Austra= lis Firefox user interface Continues add-on support for XUL, XPCOM, and NPAPI= plugins[9] Supports extensions and themes exclusive to Pale Moon, such as= Adblock Latitude[ Defaults to a customizable start page in cooperation wi= th start.me Defaults to DuckDuckGo as the search engine instead of Google or= Yahoo! Uses the IP-API service instead of Google's for geolocation Fully= customizable user interface NOTE: Please note that in this work-in-progress version it points to the = start page which promotes some services and needs cookies, and has some other issues. IMPORTANT: This version is based on the old Pale Moon codebase w= hich is in maintenance mode, but continues to receive security patches and updates.") (properties '((upstream-name . "Pale-Moon"))) ;; The exception clause of the Palemoon license states that ;; New Moon builds can be redistributed freely. (license (list license:mpl2.0 ;and others, see toolkit/content/licens= e.html license:gpl2+ license:lgpl2.1)))) (define-public newmoon (package (name "newmoon") (version "27.9.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/MoonchildProductions/" "Pale-Moon/archive/" version "_Release.tar.gz"= )) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0xfkbxa8618zb379m3aaycmbz0lj1s5f2mlwgykp8d5qyvd35bdj")))) (build-system gnu-build-system) (inputs `(("alsa-lib" ,alsa-lib) ("mit-krb5" ,mit-krb5) ("bzip2" ,bzip2) ("cairo" ,cairo) ("cups" ,cups) ("libgnome" ,libgnome) ("libcanberra" ,libcanberra) ("dbus-glib" ,dbus-glib) ("dbus" ,dbus) ("glib" ,glib) ("gstreamer" ,gstreamer) ("gst-plugins-base" ,gst-plugins-base) ("gtk+-2" ,gtk+-2) ("gobject-introspection" ,gobject-introspection) ("freetype" ,freetype) ("hunspell" ,hunspell) ("libxt" ,libxt) ("libffi" ,libffi) ("libvpx" ,libvpx) ("libxt" ,libxt) ("libxcomposite" ,libxcomposite) ("libidl" ,libidl) ("libwebp" ,libwebp) ("libpng-apng" ,libpng-apng) ("libjpeg-turbo" ,libjpeg-turbo) ("libxscrnsaver" ,libxscrnsaver) ("libx11" ,libx11) ("libxext" ,libxext) ("libxft" ,libxft) ("libxi" ,libxi) ("libxrender" ,libxrender) ("xextproto" ,xextproto) ("libevent" ,libevent) ("libnotify" ,libnotify) ("mesa" ,mesa) ;; ("mozjs" ,mozjs) ("nspr" ,nspr) ;; ("nss" ,nss) ;; ("openssl" ,openssl) ("python-2" ,python-2) ("python-ply" ,python-ply) ("pixman" ,pixman) ("pulseaudio" ,pulseaudio) ("startup-notification" ,startup-notification) ("sqlite" ,sqlite) ("tcsh" ,tcsh) ("unzip" ,unzip) ("yasm" ,yasm) ("zip" ,zip) ("zlib" ,zlib) ("inetutils" ,inetutils))) ; Native-input? (native-inputs `(("autoconf-2.13" ,autoconf-2.13) ("fontconfig" ,fontconfig) ("perl" ,perl) ("pkg-config" ,pkg-config) ("m4" ,m4) ("which" ,which) ("bash" ,bash))) ;; Only processors with SSE2 are supported. (supported-systems '("x86_64-linux" "i686-linux")) (arguments `(#:modules ((ice-9 ftw) (ice-9 rdelim) (ice-9 match) ,@%gnu-build-system-modules) ;; We encounter runpath issues, looks harmless in practice. ;; But nevertheless: FIXME!!!!!! #:validate-runpath? #f #:phases (modify-phases %standard-phases (replace 'configure ;; According to ;; the only way to set configure options is in the .mozconfig = file ;; (or the file set by variable MOZCONFIG). If you try to use= ;; our configure-flags, the configuration will break in unexpe= cted ;; ways. This includes breaking the mach build system detecti= on ;; of --host, --build, and --arch, and carrying flags recursiv= ely ;; on to parts used later in the build system. ;; The palemoon.org link describes an MS Windows build, but at= ;; least for Gentoo it is done comparable: ;; . (lambda* (#:key outputs configure-flags #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bash (which "bash")) (abs-srcdir (getcwd)) (srcdir (string-append "../" (basename abs-srcdir))) (flags `(,(string-append "--prefix=3D" out) ,@configure-flags)) (mozconfig (string-append (getcwd) "/.mozconfig"))) (setenv "SHELL" bash) (setenv "AUTOCONF" (string-append (assoc-ref %build-inputs "autoconf-2.13") "/bin/autoconf")) (setenv "BUILD_OBJ_DIR" (string-append (getcwd) "/o")) (setenv "CONFIG_SHELL" bash) (setenv "QA_CONFIGURE_OPTIONS" ".*") (setenv "MOZBUILD_STATE_PATH" (string-append (getcwd) "/mach_state")) (setenv "MOZCONFIG" (string-append (getcwd) "/.mozconfig")) (setenv "MOZ_NOSPAM" "1") (mkdir-p (string-append (getcwd) "/builddir")) (with-output-to-file mozconfig (lambda () (display (string-append "ac_add_options --enable-application=3Dbrowser\n" "mk_add_options MOZ_OBJDIR=3D" (getenv "BUILD_OBJ_DI= R") "\n" ;new "ac_add_options --prefix=3D" out "\n" "ac_add_options --disable-debug\n" "ac_add_options --disable-debug-symbols\n" "ac_add_options --disable-accessibility\n" ;There is= no such option? "ac_add_options --disable-updater\n" "ac_add_options --disable-installer\n" "ac_add_options --disable-parental-controls\n" ;Yes?= No? "ac_add_options --disable-install-strip" "ac_add_options --disable-tests\n" "ac_add_options --with-system-ply\n" "ac_add_options --with-system-libevent\n" "ac_add_options --with-system-zlib\n" "ac_add_options --with-system-bz2\n" "ac_add_options --with-system-webp\n" "ac_add_options --with-system-libvpx\n" "ac_add_options --enable-system-hunspell\n" "ac_add_options --enable-system-ffi\n" "ac_add_options --enable-system-sqlite\n" ;Needs >=3D= sqlite-3.21.0 "ac_add_options --enable-system-cairo\n" "ac_add_options --enable-system-pixman\n" "ac_add_options --enable-shared-js\n" "ac_add_options --disable-valgrind\n" "ac_add_options --with-pthreads\n" "ac_add_options --disable-optimize\n" "ac_add_options --enable-gstreamer\n" "ac_add_options --enable-default-toolkit=3D\"cairo-g= tk2\"\n" "ac_add_options --disable-alsa\n" "ac_add_options --enable-strip\n" "ac_add_options --disable-codesighs\n" "ac_add_options --disable-gamepad\n" "ac_add_options --disable-logging\n" "ac_add_options --disable-websms-backend\n" "ac_add_options --enable-chrome-format=3Domni\n" "ac_add_options --enable-startup-notification\n" "ac_add_options --enable-shared-js\n" "ac_add_options --enable-devtools\n" ;; XXX! "ac_add_options --with-system-png\n" "ac_add_options --enable-pulseaudio\n" "ac_add_options --disable-necko-wifi\n" "ac_add_options --with-system-jpeg\n" "ac_add_options --disable-official-branding\n" ; Tra= demarks apply for official branding "mk_add_options PYTHON=3D\"python2\"\n" "mk_add_options AUTOCONF=3D\"autoconf\"\n" "ac_add_options --with-system-nspr\n" "ac_add_options --enable-sandbox\n" "ac_add_options --enable-content-sandbox\n" "ac_add_options --enable-skia\n" "ac_add_options --enable-jemalloc\n" "ac_add_options --with-system-icu\n" "ac_add_options --with-intl-api\n")))) (display "mach configure, this is expected to \"crash\"") (zero? (system* "./mach" "configure")) (display "mach, and another round.") (zero? (system* "./mach"))))) (add-after 'patch-source-shebangs 'setenvs (lambda _ (substitute* (list "build/autoconf/config.guess" "client.mk" "js/src/configure.in" "intl/icu/source/configure") (("/bin/sh") (which "sh"))) #t)) (add-before 'build 'patch-clientmk (lambda _ (substitute* "client.mk" (("/bin/sh") (which "sh"))) #t)) (replace 'build (lambda _ (chdir "build") (display "mach build, the real build now") (system* "../mach" "build") #t)) (add-after 'unpack 'arrange-to-link-libxul-with-libraries-it-might-dlop= en (lambda _ ;; libxul.so dynamically opens libraries, so here we explici= tly ;; link them into libxul.so instead. ;; ;; TODO: It might be preferable to patch in absolute file na= mes in ;; calls to dlopen or PR_LoadLibrary, but that didn't seem t= o ;; work. More investigation is needed. (substitute* "toolkit/library/moz.build" (("^# This needs to be last") "OS_LIBS +=3D [ 'GL', 'gnome-2', 'canberra', 'Xss', 'cups', 'gssapi_krb5', 'gstreamer-1.0', 'gstapp-1.0', 'gstvideo-1.0', 'png' ]\n\n")) #t)) (add-after 'unpack 'privacy-patch-branding (lambda _ (substitute* "browser/branding/unofficial/pref/palemoon-bran= ding.js" (("http://www.palemoon.org/unofficial.shtml") "https://gnu.org/s/guix")) (substitute* "browser/branding/shared/pref/preferences.inc" (("http://www.palemoon.org/firstrun.shtml") "https://gnu.org")) (substitute* "browser/branding/shared/locales/browserconfig.= properties" (("http://start.palemoon.org/") "https://gnu.org/s/guix")) #t)) (add-after 'unpack 'add-vendor-options (lambda _ (substitute* "browser/branding/unofficial/pref/palemoon-bran= ding.js" (("pref(\"app.update.url\", \"\")") "pref(\"app.update.url\", \"\");\n pref(\"browser.backspace_action\", 0);\n pref(\"browser.ctrlTab.previews\", false);\n pref(\"intl.locale.matchOS\", true);\n pref(\"extensions.blocklist.enabled\", false);\n pref(\"geo.enabled\", false);\n pref(\"services.sync.prefs.sync.security.OCSP.enabled\", = false);\n pref(\"security.OCSP.GET.enabled\", false);\n pref(\"security.OCSP.require\", false);\n pref(\"general.useragent.locale\", \"chrome://global/loca= le/intl.properties\");\n pref(\"browser.display.use_system_colors\", true);")) #t)) (replace 'install (lambda* (#:key name outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (lib (string-append out "/lib")) (palemoon (string-append out "/lib/palemoon/palemoon")) ;; Use one objectdirectory for all architectures. (objdir "o") ;; (prefsfile (string-append objdir "/dist/bin/browse= r" ;; "/defaults/preferences/= " ;; "/palemoon-branding.js"= )) (tarfile (string-append objdir "/dist/palemoon-" ,version ".linux-x86_64" ".tar.bz2"))) ;; Create the package, unpack it, manually install ;; the files from there to not miss anything. (zero? (system* "../mach" "package")) (display (getcwd)) (chdir (string-append "../" objdir "/dist")) (zero? (system* "tar" "xjpf" "palemoon-" ,version ".linux-x86_64.tar.bz= 2")) (mkdir-p (string-append out "/lib/palemoon")) (copy-recursively "palemoon" (string-append out "/lib/palemoon")) (mkdir-p bin) (symlink (string-append out "/lib/palemoon/palemoon") (string-append bin "/newmoon")) ;; Avoid duplicate binaries. ;; https://bugzilla.mozilla.org/show_bug.cgi?id=3D658850 f= or (delete-file (string-append out "/lib/palemoon/palemoon-bi= n"))))) ;; swap check and install phases and set paths to installed bina= ries (add-before 'check 'set-path-for-check (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (setenv "PATH" (string-append (getenv "PATH") ":" out "/bi= n"))) #t)) (add-after 'install 'check ;;(assoc-ref %standard-phases 'check)) (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin/newmoon"))) (invoke bin "--version")))) (delete 'check) (delete 'bootstrap) ;; (replace 'check ;; (lambda* (#:key outputs #:allow-other-keys) ;; (let* ((out (assoc-ref outputs "out")) ;; (bin (string-append out "/bin/newmoon"))) ;; (invoke bin "--version")))) (add-after 'install 'install-icons (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out"))) (display (getcwd)) (with-directory-excursion "../../browser/branding/unoffici= al" (for-each (lambda (file) (let* ((size (string-filter char-numeric? file)) (icons (string-append out "/share/icons/hicolo= r/" size "x" size "/apps")))= (mkdir-p icons) (copy-file file (string-append icons "/newmoon.png"= )))) '("default16.png" "default32.png" "default48.png" "mozicon128.png")))))) (add-after 'install 'install-desktop-file (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (apps (string-append out "/share/applications"))) (display (getcwd)) (with-directory-excursion "../../browser/branding/official= " (substitute* "palemoon.desktop" (("Pale Moon") "New Moon") (("Exec=3Dpalemoon -new-tab https://start.palemoon.org= ") "Exec=3Dnewmoon -new-tab https://gnu.org/s/guix") (("Exec=3Dpalemoon -new-window") "Exec=3Dnewmoon -new-window") (("Exec=3Dpalemoon -private-window") "Exec=3Dnewmoon -private-window") (("palemoon") "newmoon")) (install-file "palemoon.desktop" (string-append apps "/newmoon.desktop")))))))))= (home-page "https://www.palemoon.org/") (synopsis "Web Browser compiled from Pale Moon sources") (description "New Moon is a web browser compiled from Pale Moon sourcecode. New = Moon is an independent browser derived from Firefox. Among its features are: Replaces the Gecko layout engine with the Goanna fork Uses the pre-Austra= lis Firefox user interface Continues add-on support for XUL, XPCOM, and NPAPI= plugins[9] Supports extensions and themes exclusive to Pale Moon, such as= Adblock Latitude[ Defaults to a customizable start page in cooperation wi= th start.me Defaults to DuckDuckGo as the search engine instead of Google or= Yahoo! Uses the IP-API service instead of Google's for geolocation Fully= customizable user interface NOTE: Please note that in this work-in-progress version it points to the = start page which promotes some services and needs cookies, and has some other issues. IMPORTANT: This version is based on the old Pale Moon codebase w= hich is in maintenance mode, but continues to receive security patches and updates.") (properties '((upstream-name . "Pale-Moon"))) ;; The exception clause of the Palemoon license states that ;; New Moon builds can be redistributed freely. (license (list license:mpl2.0 ;and others, see toolkit/content/licens= e.html license:gpl2+ license:lgpl2.1)))) --------------848F93B43C7C9E23ADCAEFCE-- --dSLnF2ZNQwmJ2GB8Fq2w2fp6sLwcdqq49-- --p2sLub9DtlTKfc0wYMcJsmV3VRR90nbCZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYIAB0WIQR6IWNlOiLn9hD6a1XPzUNbKAts0gUCXIAnzAAKCRDPzUNbKAts 0uODAP44BBQNa3GXbbeg9amN29X88olVpw72uKIexd4qTSxTygD/ctlUWlo1oc6j Q1aDF1xOnJdp+3YwhIubO9611IVzgQc= =socE -----END PGP SIGNATURE----- --p2sLub9DtlTKfc0wYMcJsmV3VRR90nbCZ--