File mingw64-webkitgtk3.spec of Package mingw64-webkitgtk

#
# spec file for package mingw64-webkitgtk3
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           mingw64-webkitgtk3
Version:        2.4.11
Release:        0
Summary:        Library for rendering web content, GTK+ 3 Port
License:        LGPL-2.0-only AND LGPL-2.0-or-later
Group:          Development/Libraries
Url:            http://webkit.org
Source0:        https://webkitgtk.org/releases/webkitgtk-%{version}.tar.xz
Patch0:         webkitgtk-2.4.3-gcc-asm.all.patch
Patch1:         webkitgtk-2.4.9-abs.patch
Patch2:         webkitgtk-2.4.11-windows.patch
Patch3:         webkitgtk-2.4.11-compile_assert.patch
Patch4:         webkitgtk-2.4.11-inlines.patch
Patch100:       fix.patch
Patch101:       bison3_7.patch
Patch102:       false-true-defines.patch
Patch103:       glib-2.68.0.patch
Patch104:       webkitgtk-gcc11.patch
Patch105:       webkitgtk-gcc12.patch
Patch106:       qt5-qtwebkit-fix-building-with-gcc-12.patch
%if %suse_version >= 1600
Patch107:       webkitgtk-ruby-3.2.patch
%endif
#!BuildIgnore: post-build-checks
BuildRequires:  autoconf
BuildRequires:  automake
BuildRequires:  bison
BuildRequires:  flex
BuildRequires:  glib2-devel
BuildRequires:  gperf
BuildRequires:  gtk-doc
BuildRequires:  libtool
BuildRequires:  mingw64-cairo-devel >= 1.2.0
BuildRequires:  mingw64-cross-binutils
BuildRequires:  mingw64-cross-gcc
BuildRequires:  mingw64-cross-gcc-c++
BuildRequires:  mingw64-cross-pkg-config
BuildRequires:  mingw64-enchant-devel
BuildRequires:  mingw64-filesystem
BuildRequires:  mingw64-fontconfig-devel >= 2.4.0
BuildRequires:  mingw64-freetype-devel
BuildRequires:  mingw64-glib2-devel
BuildRequires:  mingw64-gst-plugins-base-devel
BuildRequires:  mingw64-gstreamer-devel
BuildRequires:  mingw64-gtk3-devel
BuildRequires:  mingw64-libgeoclue-devel
BuildRequires:  mingw64-libicu-devel
BuildRequires:  mingw64-libidn-devel
BuildRequires:  mingw64-libjpeg-devel
BuildRequires:  mingw64-libpng-devel
BuildRequires:  mingw64-libsoup-devel >= 2.27.4
BuildRequires:  mingw64-libwebp-devel
BuildRequires:  mingw64-libxml2-devel >= 2.6.0
BuildRequires:  mingw64-libxslt-devel >= 1.1.7
BuildRequires:  mingw64-pango-devel
BuildRequires:  mingw64-sqlite-devel >= 3.0
BuildRequires:  python
BuildRequires:  ruby
BuildRequires:  xz
%_mingw64_package_header_debug
BuildArch:      noarch
%if 0%{?suse_version} > 1140
BuildRequires:  perl-Switch
%endif

%description
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%package -n mingw64-libwebkitgtk3
Summary:        Library for rendering web content, GTK+ 3 Port
Group:          Development/Libraries
Provides:       %{name} = %{version}

%description -n mingw64-libwebkitgtk3
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

%package -n mingw64-libwebkitgtk3-devel
Summary:        Library for rendering web content, GTK+ 3 Port (development files)
Group:          Development/Libraries

%description -n mingw64-libwebkitgtk3-devel
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%package tools
Summary:        Library for rendering web content, GTK+ 3 Port (tools)
Group:          Development/Libraries

%description tools
WebKit is a web content engine, derived from KHTML and KJS from KDE,
and used primarily in Apple's Safari browser.  It is made to be
embedded in other applications, such as mail readers, or web browsers.

It is able to display content such as HTML, SVG, XML, and others. It
also supports DOM, XMLHttpRequest, XSLT, CSS, Javascript/ECMAscript and
more.

%_mingw64_debug_package

%lang_package
%prep
%autosetup -p1 -n webkitgtk-%{version}

%build
autoreconf --verbose --install -I Source/autotools
# lower debug level to prevent memory exhaustion by linker
%global _mingw64_cflags %(echo %{_mingw64_cflags} | sed 's/-g /-g1 /') -Wno-expansion-to-defined -mms-bitfields
# fix undefined reference to `__memmove_chk
%global _mingw64_ldflags %{_mingw64_ldflags} -lssp

echo "lt_cv_deplibs_check_method='pass_all'" >>%{_mingw64_cache}
PATH="%{_mingw64_bindir}:$PATH" \
%{_mingw64_configure} \
	--enable-win32-target \
	--with-gtk=3.0 \
	--disable-accelerated-compositing \
	--disable-egl \
	--disable-credential-storage \
	--disable-geolocation \
	--disable-webkit2 \
	--disable-static --enable-shared
make %{?_smp_mflags} || make

%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
mv %{buildroot}%{_mingw64_datadir}/gtk-doc/html/webkitgtk \
   %{buildroot}%{_mingw64_datadir}/gtk-doc/html/webkitgtk3
mv %{buildroot}%{_mingw64_datadir}/gtk-doc/html/webkitdomgtk \
   %{buildroot}%{_mingw64_datadir}/gtk-doc/html/webkitdomgtk3
mv %{buildroot}%{_mingw64_bindir}/GtkLauncher.exe \
   %{buildroot}%{_mingw64_bindir}/GtkLauncher-3.exe

%find_lang WebKitGTK-3.0

%files -n mingw64-libwebkitgtk3
%defattr(-,root,root)
%{_mingw64_datadir}/webkitgtk-3.0
%{_mingw64_bindir}/libwebkitgtk-3.0-0.dll
%{_mingw64_bindir}/libjavascriptcoregtk-3.0-0.dll

%files lang -f WebKitGTK-3.0.lang
%defattr(-,root,root)

%files -n mingw64-libwebkitgtk3-devel
%defattr(-,root,root)
%{_mingw64_includedir}/webkitgtk-3.0
%{_mingw64_libdir}/libwebkitgtk-3.0.dll.a
%{_mingw64_libdir}/pkgconfig/webkitgtk-3.0.pc
%{_mingw64_libdir}/libjavascriptcoregtk-3.0.dll.a
%{_mingw64_libdir}/pkgconfig/javascriptcoregtk-3.0.pc
%{_mingw64_datadir}/gtk-doc/html/*

%files tools
%defattr(-,root,root)
%{_mingw64_bindir}/jsc*.exe
%{_mingw64_bindir}/GtkLauncher*.exe

%changelog
openSUSE Build Service is sponsored by