mirror of
https://abf.rosa.ru/djam/newmoon.git
synced 2025-02-23 15:12:54 +00:00
Many bugfixes, cleanup of the spec and the compiler is Clang
This commit is contained in:
parent
53ba98fc23
commit
cee4d38957
2 changed files with 45 additions and 48 deletions
81
newmoon.spec
81
newmoon.spec
|
@ -7,18 +7,12 @@
|
|||
%define mozillalibdir %{_libdir}/%{name}-%{version}
|
||||
%define pluginsdir %{_libdir}/mozilla/plugins
|
||||
|
||||
# this seems fragile, so require the exact version or later (#58754)
|
||||
%define sqlite3_version %(pkg-config --modversion sqlite3 &>/dev/null && pkg-config --modversion sqlite3 2>/dev/null || echo 0)
|
||||
%define nss_version %(pkg-config --modversion nss &>/dev/null && pkg-config --modversion nss 2>/dev/null || echo 0)
|
||||
%define nspr_version %(pkg-config --modversion nspr &>/dev/null && pkg-config --modversion nspr 2>/dev/null |sed -e 's!\.0!!' || echo 0)
|
||||
|
||||
# We cannot use "Pale Moon" branding because of various restrictions, see:
|
||||
# http://www.palemoon.org/branding.shtml
|
||||
%define clang 1
|
||||
|
||||
Summary: Web browser based on Goanna engine
|
||||
Name: newmoon
|
||||
Version: 28.0.1
|
||||
Release: 1
|
||||
Release: 2
|
||||
License: MPLv2.0
|
||||
Group: Networking/WWW
|
||||
Url: http://www.palemoon.org
|
||||
|
@ -31,11 +25,16 @@ Source6: firefox-searchengines-google.xml
|
|||
Source9: kde.js
|
||||
# https://www.mozilla.org/en-US/firefox/all/
|
||||
Source10: firefox-dictionary-61.0.2.tar.bz2
|
||||
|
||||
Patch1: palemoon-28.0.1-prefs-edit.patch
|
||||
Patch6: palemoon-27.4.0-enable-addons.patch
|
||||
Patch7: palemoon-27.4.0-user-agent-overrides.patch
|
||||
|
||||
BuildRequires: autoconf2.1
|
||||
%if 0%{?clang}
|
||||
BuildRequires: clang
|
||||
BuildRequires: clang-devel
|
||||
BuildRequires: lld
|
||||
%endif
|
||||
BuildRequires: doxygen
|
||||
BuildRequires: imagemagick
|
||||
BuildRequires: makedepend
|
||||
|
@ -47,10 +46,8 @@ BuildRequires: wget
|
|||
BuildRequires: yasm
|
||||
BuildRequires: zip
|
||||
BuildRequires: libiw-devel
|
||||
BuildRequires: jpeg-devel
|
||||
BuildRequires: nss-static-devel
|
||||
BuildRequires: pkgconfig(alsa)
|
||||
BuildRequires: pkgconfig(cairo)
|
||||
BuildRequires: pkgconfig(dbus-glib-1)
|
||||
BuildRequires: pkgconfig(gconf-2.0)
|
||||
BuildRequires: pkgconfig(gl)
|
||||
|
@ -68,19 +65,11 @@ BuildRequires: pkgconfig(libnotify)
|
|||
BuildRequires: pkgconfig(libproxy-1.0)
|
||||
BuildRequires: pkgconfig(libpulse)
|
||||
BuildRequires: pkgconfig(libstartup-notification-1.0)
|
||||
BuildRequires: pkgconfig(nspr)
|
||||
BuildRequires: pkgconfig(nss)
|
||||
BuildRequires: pkgconfig(opus)
|
||||
BuildRequires: pkgconfig(pixman-1)
|
||||
BuildRequires: pkgconfig(python)
|
||||
BuildRequires: pkgconfig(sqlite3)
|
||||
BuildRequires: pkgconfig(xinerama)
|
||||
BuildRequires: pkgconfig(xscrnsaver)
|
||||
BuildRequires: pkgconfig(xt)
|
||||
BuildRequires: pkgconfig(zlib)
|
||||
Requires: %{_lib}nspr4 >= 2:%{nspr_version}
|
||||
Requires: %{_lib}nss3 >= 2:%{nss_version}
|
||||
Requires: %{_lib}sqlite3_0 >= %{sqlite3_version}
|
||||
Requires: indexhtml
|
||||
Requires: xdg-utils
|
||||
# fixes bug #42096
|
||||
|
@ -132,7 +121,7 @@ Files and macros mainly for building New Moon extensions.
|
|||
|
||||
%prep
|
||||
%setup -qn UXP-%{oname}%{version}_Release
|
||||
|
||||
%patch1 -p1 -b .prefs
|
||||
%patch6 -p1 -b .addons
|
||||
%patch7 -p1 -b .ua
|
||||
|
||||
|
@ -142,9 +131,13 @@ popd
|
|||
autoconf-2.13
|
||||
|
||||
%build
|
||||
%if 0%{?clang}
|
||||
export CC=clang
|
||||
export CXX=clang++
|
||||
export LINKER=ld.lld
|
||||
%else
|
||||
%global optflags %(echo %{optflags} | sed -e 's/-gdwarf-4//' -e 's/-fvar-tracking-assignments//' -e 's/-frecord-gcc-switches//' -e 's/-Wa,--compress-debug-sections//')
|
||||
%setup_compile_flags
|
||||
|
||||
CFLAGS=$(echo %{optflags} | sed -e 's/-fexceptions//')
|
||||
CFLAGS="$CFLAGS -fno-strict-aliasing"
|
||||
CXXFLAGS="$CFLAGS -fpermissive"
|
||||
|
@ -154,50 +147,41 @@ export CFLAGS
|
|||
export CXXFLAGS
|
||||
export RPM_OPT_FLAGS
|
||||
export LDFLAGS
|
||||
%endif
|
||||
|
||||
export MOZCONFIG=`pwd`/mozconfig
|
||||
cat << EOF > $MOZCONFIG
|
||||
mk_add_options MOZILLA_OFFICIAL=0
|
||||
mk_add_options BUILD_OFFICIAL=0
|
||||
mk_add_options MOZILLA_OFFICIAL=0
|
||||
mk_add_options MOZ_MAKE_FLAGS="%{_smp_mflags}"
|
||||
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj
|
||||
mk_add_options AUTOCLOBBER=1
|
||||
ac_add_options --enable-application=palemoon
|
||||
ac_add_options --host=%{_host}
|
||||
ac_add_options --target=%{_target_platform}
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --prefix="%{_prefix}"
|
||||
ac_add_options --libdir="%{_libdir}"
|
||||
ac_add_options --includedir="%{_includedir}"
|
||||
ac_add_options --datadir="%{_datadir}"
|
||||
ac_add_options --with-system-nspr
|
||||
ac_add_options --without-system-nss
|
||||
ac_add_options --with-system-zlib
|
||||
ac_add_options --with-pthreads
|
||||
ac_add_options --disable-webrtc
|
||||
ac_add_options --enable-jemalloc
|
||||
ac_add_options --enable-gio
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --host=%{_host}
|
||||
ac_add_options --includedir="%{_includedir}"
|
||||
ac_add_options --libdir="%{_libdir}"
|
||||
ac_add_options --prefix="%{_prefix}"
|
||||
ac_add_options --target=%{_target_platform}
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --without-system-libvpx
|
||||
ac_add_options --disable-official-branding
|
||||
ac_add_options --enable-libproxy
|
||||
ac_add_options --with-system-jpeg
|
||||
ac_add_options --enable-system-cairo
|
||||
ac_add_options --enable-system-pixman
|
||||
ac_add_options --enable-system-sqlite
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --disable-updater
|
||||
ac_add_options --disable-webrtc
|
||||
ac_add_options --enable-default-toolkit=cairo-gtk2
|
||||
ac_add_options --enable-extensions=default
|
||||
ac_add_options --enable-gio
|
||||
ac_add_options --enable-jemalloc
|
||||
ac_add_options --enable-libproxy
|
||||
ac_add_options --enable-optimize
|
||||
ac_add_options --enable-startup-notification
|
||||
ac_add_options --with-distribution-id=org.rosa
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --with-pthreads
|
||||
|
||||
EOF
|
||||
|
||||
perl -p -i -e 's|\-0|\-9|g' config/make-jars.pl
|
||||
|
||||
export LDFLAGS="%{ldflags}"
|
||||
make -f client.mk build
|
||||
./mach build
|
||||
|
||||
%install
|
||||
make -C %{_builddir}/obj/application/palemoon/installer STRIP=/bin/true MOZ_PKG_FATAL_WARNINGS=0
|
||||
|
@ -244,6 +228,7 @@ pref("browser.ctrlTab.previews", true);
|
|||
pref("browser.display.use_system_colors", true);
|
||||
pref("browser.download.folderList", 1);
|
||||
pref("browser.link.open_external", 3);
|
||||
pref("browser.newtab.url", "file:///usr/share/doc/HTML/index.html");
|
||||
pref("browser.search.openintab", true);
|
||||
pref("browser.shell.checkDefaultBrowser", false);
|
||||
pref("browser.startup.homepage", "file:///usr/share/doc/HTML/index.html");
|
||||
|
|
12
palemoon-28.0.1-prefs-edit.patch
Normal file
12
palemoon-28.0.1-prefs-edit.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
diff -Naur UXP-PM28.0.1_Release-orig/application/palemoon/components/nsBrowserContentHandler.js UXP-PM28.0.1_Release/application/palemoon/components/nsBrowserContentHandler.js
|
||||
--- UXP-PM28.0.1_Release-orig/application/palemoon/components/nsBrowserContentHandler.js 2018-08-30 17:59:46.000000000 +0300
|
||||
+++ UXP-PM28.0.1_Release/application/palemoon/components/nsBrowserContentHandler.js 2018-09-01 22:49:16.157720745 +0300
|
||||
@@ -594,7 +594,7 @@
|
||||
if (overridePage && startPage && !haveUpdateSession)
|
||||
return overridePage + "|" + startPage;
|
||||
|
||||
- return overridePage || startPage || "about:logopage";
|
||||
+ return overridePage || startPage || "file:///usr/share/doc/HTML/index.html";
|
||||
},
|
||||
|
||||
get startPage() {
|
Loading…
Add table
Reference in a new issue