* added option to with GTK3

* Added build options for armv7 and ppc64
This commit is contained in:
Jan Horak 2017-04-05 17:52:36 +02:00
parent 9f930d1e0b
commit 8ec7d712c6
2 changed files with 41 additions and 11 deletions

View File

@ -11,7 +11,6 @@ ac_add_options --with-system-zlib
ac_add_options --with-system-libvpx ac_add_options --with-system-libvpx
ac_add_options --with-pthreads ac_add_options --with-pthreads
ac_add_options --disable-tests ac_add_options --disable-tests
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --disable-strip ac_add_options --disable-strip
# temporary disable system cairo, because compilation fails # temporary disable system cairo, because compilation fails
#ac_add_options --enable-system-cairo #ac_add_options --enable-system-cairo

View File

@ -9,6 +9,7 @@
%define system_sqlite 0 %define system_sqlite 0
%define system_ffi 1 %define system_ffi 1
%define use_gtk3 0
%define build_langpacks 1 %define build_langpacks 1
@ -46,9 +47,12 @@
%ifarch ppc64 s390x %ifarch ppc64 s390x
# Javascript Intl API is not supported on big endian platforms right now: # Javascript Intl API is not supported on big endian platforms right now:
# https://bugzilla.mozilla.org/show_bug.cgi?id=1322212 # https://bugzilla.mozilla.org/show_bug.cgi?id=1322212
%define big_endian 1 %define big_endian 1
%endif %endif
%if 0%{?fedora} >= 26
%define use_gtk3 1
%endif
%define build_with_rust 0 %define build_with_rust 0
@ -158,7 +162,11 @@ BuildRequires: zip
BuildRequires: bzip2-devel BuildRequires: bzip2-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
BuildRequires: libIDL-devel BuildRequires: libIDL-devel
%if %{?use_gtk3}
BuildRequires: gtk3-devel
%else
BuildRequires: gtk2-devel BuildRequires: gtk2-devel
%endif
BuildRequires: krb5-devel BuildRequires: krb5-devel
BuildRequires: pango-devel BuildRequires: pango-devel
BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: freetype-devel >= %{freetype_version}
@ -306,15 +314,29 @@ echo "ac_add_options --enable-system-ffi" >> .mozconfig
%endif %endif
%if %{?debug_build} %if %{?debug_build}
echo "ac_add_options --enable-debug" >> .mozconfig echo "ac_add_options --enable-debug" >> .mozconfig
echo "ac_add_options --disable-optimize" >> .mozconfig echo "ac_add_options --disable-optimize" >> .mozconfig
%else %else
echo "ac_add_options --disable-debug" >> .mozconfig %define optimize_flags "none"
%ifarch ppc64le aarch64 # Fedora 26 (gcc7) needs to disable default build flags (mozbz#1342344)
echo 'ac_add_options --enable-optimize="-g -O2"' >> .mozconfig %if 0%{?fedora} > 25
%else %ifnarch s390 s390x
echo "ac_add_options --enable-optimize" >> .mozconfig %define optimize_flags "-g -O2"
%endif %endif
%endif
%ifarch armv7hl
# ARMv7 need that (rhbz#1426850)
%define optimize_flags "-g -O2 -fno-schedule-insns"
%endif
%ifarch ppc64le aarch64
%define optimize_flags "-g -O2"
%endif
%if %{optimize_flags} != "none"
echo 'ac_add_options --enable-optimize=%{?optimize_flags}' >> .mozconfig
%else
echo 'ac_add_options --enable-optimize' >> .mozconfig
%endif
echo "ac_add_options --disable-debug" >> .mozconfig
%endif %endif
%ifarch %{arm} aarch64 %ifarch %{arm} aarch64
@ -379,6 +401,11 @@ echo "ac_add_options --with-system-libvpx" >> .mozconfig
%else %else
echo "ac_add_options --without-system-libvpx" >> .mozconfig echo "ac_add_options --without-system-libvpx" >> .mozconfig
%endif %endif
%if %{?use_gtk3}
echo "ac_add_options --enable-default-toolkit=cairo-gtk3" >> .mozconfig
%else
echo "ac_add_options --enable-default-toolkit=cairo-gtk2" >> .mozconfig
%endif
# install lightning langpacks # install lightning langpacks
cd .. cd ..
@ -402,9 +429,11 @@ cd %{tarballdir}
echo "Generate big endian version of config/external/icu/data/icud58l.dat" echo "Generate big endian version of config/external/icu/data/icud58l.dat"
%if 0%{?big_endian} %if 0%{?big_endian}
cd mozilla
./mach python intl/icu_sources_data.py . ./mach python intl/icu_sources_data.py .
ls -l config/external/icu/data ls -l config/external/icu/data
rm -f config/external/icu/data/icudt*l.dat rm -f config/external/icu/data/icudt*l.dat
cd -
%endif %endif
# Update the various config.guess to upstream release for aarch64 support # Update the various config.guess to upstream release for aarch64 support
@ -684,7 +713,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif %endif
%{mozappdir}/fonts %{mozappdir}/fonts
%{mozappdir}/chrome.manifest %{mozappdir}/chrome.manifest
%if %{?use_gtk3}
%{mozappdir}/gtk2/libmozgtk.so
%endif
#=============================================================================== #===============================================================================