%global commit 36b80aac50ea401a9adde44d86712c2241b2acfd %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global commitdate 20210402 Name: ISPCTexComp Version: 0 Release: 0.5.%{commitdate}git%{shortcommit}%{?dist} Summary: ISPC Texture Compressor - SIMD-optimized texture block compression License: MIT URL: https://github.com/GameTechDev/ISPCTextureCompressor Source0: %{url}/archive/%{commit}/ISPCTextureCompressor-%{shortcommit}.tar.gz # Only x86_64 and aarch64 are supported (ISPC SIMD targets) ExclusiveArch: x86_64 aarch64 BuildRequires: gcc-c++ BuildRequires: ispc BuildRequires: make %description ISPC Texture Compressor is a set of CPU SIMD-optimized texture block compression algorithms from Intel. It supports BC6H, BC7, ASTC, ETC1, BC1, BC3, BC4, and BC5 compression formats. The compressor uses the Intel ISPC compiler to generate optimized SIMD code for SSE2, AVX, and NEON instruction sets. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files for developing applications that use the ISPC Texture Compressor library. %prep %autosetup -n ISPCTextureCompressor-%{commit} # Fix the ISPC path to use the system ispc compiler instead of bundled binary sed -i 's|ISPC/linux/ispc|ispc|g' Makefile.linux # Ensure -shared is in the linker flags for the shared library build. # Fedora's hardened LDFLAGS inject startup files (Scrt1.o) which cause # "undefined reference to 'main'" errors when building shared libraries # without the -shared flag. Force -shared and -nostartfiles into the link line. sed -i 's/$(CXX) $(LDFLAGS)/$(CXX) -shared -nostartfiles $(LDFLAGS)/' Makefile.linux # Add -fPIC to ISPC and C++ compilation so object files are suitable for # shared library linking with Fedora's hardened toolchain. sed -i 's/$(ISPC)/$(ISPC) --pic/' Makefile.linux sed -i 's/$(CXX) $(CXXFLAGS)/$(CXX) -fPIC $(CXXFLAGS)/' Makefile.linux %build %ifarch x86_64 %make_build -f Makefile.linux ISPC_ARCH=x86-64 ISPC_TARGET="sse2,sse4,avx" %endif %ifarch aarch64 %make_build -f Makefile.linux ISPC_ARCH=aarch64 ISPC_TARGET="neon" %endif %install # Install shared library install -d %{buildroot}%{_libdir} install -p -m 0755 build/libispc_texcomp.so %{buildroot}%{_libdir}/libispc_texcomp.so.0.0.0 ln -s libispc_texcomp.so.0.0.0 %{buildroot}%{_libdir}/libispc_texcomp.so.0 ln -s libispc_texcomp.so.0 %{buildroot}%{_libdir}/libispc_texcomp.so # Install header file install -d %{buildroot}%{_includedir}/%{name} install -p -m 0644 ispc_texcomp/ispc_texcomp.h %{buildroot}%{_includedir}/%{name}/ispc_texcomp.h %files %license license.txt %{_libdir}/libispc_texcomp.so.0 %{_libdir}/libispc_texcomp.so.0.0.0 %files devel %{_includedir}/%{name}/ %{_libdir}/libispc_texcomp.so %changelog * Mon May 11 2026 Nick Schuetz - 0-0.5.20210402git36b80aa - Update to commit 36b80aac50ea401a9adde44d86712c2241b2acfd (2021-04-02) to match the engine pin (cmake/3rdParty/Platform/Linux/ BuiltInPackages_linux_x86_64.cmake on stabilization/26050 pins ISPCTexComp-36b80aa-rev1). The previous commit 691513b (2023-08-07) was newer chronologically but didn't match what the engine's BuiltInPackages references; drift-detection workflow had been flagging this as out-of-date since the script's first run. - Engine consumes ISPCTexComp's libispc_texcomp.so via the ImageProcessing Gem's BC1/BC3/BC4/BC5/BC6H/BC7/ASTC/ETC1 block compression path. Commit 36b80aa's "bool -> uint8 for dual_plane" change is the upstream-pinned API surface the engine expects. * Wed Feb 11 2026 O3DE Package Maintainers - 0-0.4.20230807git691513b - Add --pic to ISPC and -fPIC to CXX flags for PIC-compliant shared library - Fix R_X86_64_PC32 relocation error with Fedora hardened linker * Wed Feb 11 2026 O3DE Package Maintainers - 0-0.3.20230807git691513b - Fix shared library linking: add -shared -nostartfiles to linker flags - Fedora hardened LDFLAGS inject Scrt1.o causing undefined reference to main * Tue Feb 11 2025 O3DE Package Maintainers - 0-0.1.20230807git691513b - Initial package based on commit 691513b - SIMD-optimized texture compression library (BC6H, BC7, ASTC, ETC1, BC1-BC5)