## START: Set by rpmautospec ## (rpmautospec version 0.7.2) ## RPMAUTOSPEC: autochangelog ## END: Set by rpmautospec # Debug info not procduced at the moment %global debug_package %{nil} %global commit 261316c1048463134def350f8fc0d80d2253a2ff %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: skia # https://chromiumdash.appspot.com/schedule Version: 132.0^20241111.261316c Release: 1%{?dist} Summary: Rendering library License: BSD-3-Clause URL: https://skia.org Source0: https://skia.googlesource.com/skia.git/+archive/%{commit}.tar.gz BuildRequires: gcc BuildRequires: g++ #BuildRequires: expat-devel BuildRequires: fontconfig-devel BuildRequires: freetype-devel BuildRequires: glibc-devel BuildRequires: gn #BuildRequires: graphite2-devel #BuildRequires: harfbuzz-devel #BuildRequires: icu #BuildRequires: libicu-devel # Not yet packaged #BuildRequires: libdng-devel # May have licensing restrictions #BuildRequires: dng_sdk #BuildRequires: libjpeg-turbo-devel #BuildRequires: libpng-devel #BuildRequires: libwebp-devel #BuildRequires: llvm BuildRequires: mesa-libGL-devel BuildRequires: mesa-libGLU-devel BuildRequires: pkgconfig BuildRequires: python3-devel BuildRequires: procps-ng-devel #BuildRequires: spirv-tools-devel BuildRequires: ninja-build #BuildRequires: vulkan-headers #BuildRequires: zlib-devel # Needed for tests BuildRequires: xorg-x11-server-Xvfb %description Graphics engine used in Chromium %package devel Summary: Skia development files Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Development header files and libraries for skia graphics engine. %prep %setup -c -n %{name}-%{commit} %build # Enable system Zlib to be used. Bug noted at: # https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/graphics.scm#n2148 sed -i 's|deps = \[ "//third_party/zlib" \]|deps = \[\]|g' BUILD.gn sed -i 's|deps += \[ "//third_party/externals/spirv[\-]tools:spvtools_val" \]|deps += \[\]|g' BUILD.gn sed -i 's|deps # dng_sdk is not packaged # wuffs is not packaged # ganesh fails to build, maybe try another commit GN_DEFINES_MAIN=" is_official_build=true" GN_DEFINES_MAIN+=" is_component_build=true" GN_DEFINES_MAIN+=" skia_use_dng_sdk=false" #GN_DEFINES_MAIN+=" skia_use_icu=false" GN_DEFINES_MAIN+=" skia_use_wuffs=false" GN_DEFINES_MAIN+=" skia_enable_ganesh=false" GN_DEFINES_MAIN+=" skia_use_zlib=false" #GN_DEFINES_MAIN+=" skia_enable_spirv_validation=false" #GN_DEFINES_MAIN+=" skia_use_freetype_zlib_bundled=false" #GN_DEFINES_MAIN+=" skia_use_system_expat=true" #GN_DEFINES_MAIN+=" skia_use_system_freetype2=true" #GN_DEFINES_MAIN+=" skia_use_system_harfbuzz=true" #GN_DEFINES_MAIN+=" skia_use_system_icu=true" #GN_DEFINES_MAIN+=" skia_use_system_libjpeg_turbo=true" #GN_DEFINES_MAIN+=" skia_use_system_libpng=true" #GN_DEFINES_MAIN+=" skia_use_system_libwebp=true" #GN_DEFINES_MAIN+=" skia_use_system_zlib=true" #GN_DEFINES+=" skia_use_vulkan=true" # Main build gn gen out/Build --args"${GN_DEFINES_MAIN}" # Testing build GN_DEFINES_DEBUG=" is_official_build=false" GN_DEFINES_DEBUG+=" is_component_build=true" #GN_DEFINES_DEBUG+=" skia_use_icu=false" GN_DEFINES_DEBUG+=" skia_use_dng_sdk=false" GN_DEFINES_DEBUG+=" skia_use_wuffs=false" GN_DEFINES_DEBUG+=" skia_enable_ganesh=false" GN_DEFINES_DEBUG+=" skia_use_zlib=false" #GN_DEFINES_DEBUG+=" skia_enable_spirv_validation=false" #GN_DEFINES_DEBUG+=" skia_use_freetype_zlib_bundled=false" #GN_DEFINES_DEBUG+=" skia_use_system_expat=true" #GN_DEFINES_DEBUG+=" skia_use_system_freetype2=true" #GN_DEFINES_DEBUG+=" skia_use_system_harfbuzz=true" #GN_DEFINES_DEBUG+=" skia_use_system_icu=true" #GN_DEFINES_DEBUG+=" skia_use_system_libjpeg_turbo=true" #GN_DEFINES_DEBUG+=" skia_use_system_libpng=true" #GN_DEFINES_DEBUG+=" skia_use_system_libwebp=true" #GN_DEFINES_DEBUG+=" skia_use_system_zlib=true" # Bug in generating using icu system libraries gn gen out/Debug --args"${GN_DEFINES_DEBUG}" # Builds ninja -C ./out/Build ninja -C ./out/Debug dm %install mkdir -p %{buildroot}/%{_libdir} install -m644 out/Build/*.so* %{buildroot}/%{_libdir}/ mkdir -p %{buildroot}/%{_includedir}/skia find include out/Release -type f -and -\( -name "*.h" ) -exec install -v -D -m644 {} %{buildroot}%{_includedir}/skia/{} \; mkdir -p %{buildroot}/%{_libdir}/pkgconfig cat << EOF > skia.pc prefix=%{_prefix} exec_prefix=%{prefix} libdir=%{_libdir} includedir=%{_includedir}/%{name} Name: %{name} Description: %{summary} URL: %{url} Version: %{version} Libs: -L%{_libdir} -lskia Cflags: -I%{_includedir}/%{name} EOF install -m 644 skia.pc %{buildroot}/%{_libdir}/pkgconfig/ %check xvfb-run -d -s 'terminate' out/Debug/dm --no-gpu --src tests -v -w dm_output %files %license LICENSE %doc README %{_libdir}/libskia.so %files devel %{_includedir}/skia/ %{_libdir}/pkgconfig/skia.pc %changelog ## START: Generated by rpmautospec * Tue Nov 12 2024 John Doe - 132.0^20241111.261316c-1 - Uncommitted changes ## END: Generated by rpmautospec