File mingw64-libvsg.spec of Package mingw64-libvsg
#
# spec file for package libvsg
#
# Copyright (c) 2021 SUSE LLC
#
# 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 https://bugs.opensuse.org/
#
%define _vsg_so_nr 14
%define rname VulkanSceneGraph
%define _name libvsg
%define glslang_version 20230222+git.e4075496
Name: mingw64-%{_name}
Version: 1.0.9
Release: 0
Summary: 3D graphics toolkit
License: MIT
Group: Productivity/Graphics/Other
URL: https://vsg-dev.github.io/VulkanSceneGraph
Source0: %{rname}-%{version}.tar.xz
Source1: glslang-%{glslang_version}.tar.xz
# can't be applied as regular patch
Source2: glslang-20230222+git.e4075496-gcc13-fix.patch
BuildRequires: mingw64-cross-cmake
BuildRequires: mingw64-cross-gcc-c++
BuildRequires: mingw64-vulkan-devel
%_mingw64_package_header_debug
BuildArch: noarch
%description
The VulkanSceneGraph is a graphics toolkit for the development of
graphic applications such as flight simulators, games, virtual
reality and scientific visualization. Based around the concept of a
scene graph, it provides an object-oriented framework on top of
Vulkan freeing the developer from implementing and optimizing low
level graphics calls, and provides many additional utilities for
development of graphics applications.
%package -n mingw64-libvsg%{_vsg_so_nr}
Summary: Shared libraries for VulkanSceneGraph
# try to cover up past mistakes
Group: System/Libraries
%description -n mingw64-libvsg%{_vsg_so_nr}
The VulkanSceneGraph is a graphics toolkit for the development of
graphic applications such as flight simulators, games, virtual
reality and scientific visualization. Based around the concept of a
scene graph, it provides an object-oriented framework on top of
Vulkan.
This package contains the shared libraries for VulkanSceneGraph.
%package devel
Summary: VulkanSceneGraph development files
Group: Development/Libraries/C and C++
Requires: mingw64-libvsg%{_vsg_so_nr} = %{version}
Requires: mingw64-vulkan-devel
%description devel
The VulkanSceneGraph is a graphics toolkit for the development of
graphic applications such as flight simulators, games, virtual
reality and scientific visualization. Based around the concept of a
scene graph, it provides an object-oriented framework on top of
OpenGL.
This package contains the header and development files for
VulkanSceneGraph.
%_mingw64_debug_package
%prep
%autosetup -p1 -n %{rname}-%{version}
tar -xJf %{SOURCE1}
patch -p0 -i %{SOURCE2}
mv glslang-%{glslang_version} src/glslang
%build
MINGW64_LFLAGS="-Wl,--enable-stdcall-fixup %_mingw64_ldflags"
%_mingw64_cmake \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_RELWITHDEBINFO_POSTFIX= \
-DGLSLANG_ResourceLimits_maxDualSourceDrawBuffersEXT_EXITCODE=0 \
-DGLSLANG_ResourceLimits_maxDualSourceDrawBuffersEXT_EXITCODE__TRYRUN_OUTPUT="" \
-DGLSLANG_EShLanguage_EShLangRayGen_EXITCODE=0 \
-DGLSLANG_EShLanguage_EShLangRayGen_EXITCODE__TRYRUN_OUTPUT="" \
-DGLSLANG_EShLanguage_EShLangRayGenNV_EXITCODE=0 \
-DGLSLANG_EShLanguage_EShLangRayGenNV_EXITCODE__TRYRUN_OUTPUT="" \
-DVulkan_LIBRARY=%_mingw64_prefix/bin/vulkan-1.dll
%_mingw64_cmake_build
%install
%_mingw64_cmake_install
%files -n mingw64-libvsg%{_vsg_so_nr}
%defattr(-,root,root)
%license LICENSE.md
%_mingw64_bindir/lib*.dll
%files devel
%defattr(-,root,root)
%_mingw64_includedir/vsg*/
%_mingw64_libdir/lib*.a
%_mingw64_libdir/cmake
%changelog