Compare commits

4 Commits

Author SHA1 Message Date
c67a24d8aa Add Fedora copyright
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-27 13:41:56 -07:00
c648f72b16 Simplify file removal
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-25 14:58:59 -07:00
83344ccd5f Remove changelog
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-25 08:39:00 -07:00
0b2c479b0b Remove --with check option
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
2025-08-19 12:02:01 -07:00
2 changed files with 67 additions and 63 deletions

View File

@@ -1,28 +0,0 @@
* Fri Oct 20 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 5.7.1-1
- Update to 5.7.1
* Tue Oct 03 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 5.7.0-1
- Update to 5.7
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.6.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jun 30 2023 Jeremy Newton <alexjnewt at hotmail dot com> - 5.6.0-1
- Update to 5.6
* Tue Jun 20 2023 Tom Rix <trix@redhat.com> - 5.5.1-4
- For cxx flags change
* Fri Jun 16 2023 Tom Rix <trix@redhat.com> - 5.5.1-3
- Cleanup licenses
- Cleanup docdir ownership
* Thu Jun 15 2023 Tom Rix <trix@redhat.com> - 5.5.1-2
- add provides rocprim-static
- change *.cmake install location
- fix bad include dir another way
- add doxygen proactively for expected upstream change
- add NOTICES.txt to license files
* Tue Jun 6 2023 Tom Rix <trix@redhat.com> - 5.5.1-1
- Initial package

View File

@@ -1,3 +1,24 @@
#
# Copyright Fedora Project Authors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
%global upstreamname rocPRIM
%global rocm_release 6.4
%global rocm_patch 2
@@ -6,20 +27,31 @@
%global toolchain rocm
# hipcc does not support some clang flags
%global build_cxxflags %(echo %{optflags} | sed -e 's/-fstack-protector-strong/-Xarch_host -fstack-protector-strong/' -e 's/-fcf-protection/-Xarch_host -fcf-protection/' -e 's/-mtls-dialect=gnu2//')
# there is no debug package
%global debug_package %{nil}
# Option to test suite for testing on real HW during build
%bcond_with check
# Option to build test subpackage
%bcond_with test
# Option to build test subpackage
# enable building of tests if check or test are enabled
%if %{with test}
%global build_test ON
%else
%global build_test OFF
# there is no debug package, this just headers
%global debug_package %{nil}
%endif
# For documentation
%bcond_with doc
%bcond_with debug
%if %{with debug}
%global build_type DEBUG
%else
%global build_type RelWithDebInfo
%endif
Name: rocprim
Version: %{rocm_version}
Release: 3%{?dist}
Release: 6%{?dist}
Summary: ROCm parallel primatives
License: MIT AND BSD-3-Clause
@@ -46,7 +78,7 @@ BuildRequires: doxygen
BuildRequires: python3dist(marshalparser)
%endif
%if %{with check} || %{with test}
%if %{with test}
%if 0%{?suse_version}
BuildRequires: gtest
%else
@@ -84,51 +116,42 @@ tests for the rocPRIM package
%prep
%autosetup -p1 -n %{upstreamname}-rocm-%{version}
# In file included from rocPRIM-rocm-6.4.2/test/rocprim/test_texture_cache_iterator.cpp:26:
# ../rocprim/include/rocprim/iterator/texture_cache_iterator.hpp:231:13: error:
# 'tex1Dfetch<int, nullptr>' is unavailable: The image/texture API not supported on the device
# Remove fail to build test
sed -i -e 's@add_rocprim_test("rocprim.texture_cache_iterator"@#add_rocprim_test("rocprim.texture_cache_iterator"@' test/rocprim/CMakeLists.txt
grep texture_cach test/rocprim/CMakeLists.txt
%build
%if %{with check}
# Building all the gpu's does not make sense
# Build only the first one, this only works well with rpmbuild.
gpu=`rocm_agent_enumerator | head -n 1`
%endif
%cmake \
-DCMAKE_CXX_COMPILER=hipcc \
-DCMAKE_C_COMPILER=hipcc \
-DCMAKE_LINKER=%rocmllvm_bindir/ld.lld \
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
-DBUILD_TEST=%{build_test} \
-DCMAKE_AR=%rocmllvm_bindir/llvm-ar \
-DCMAKE_BUILD_TYPE=%build_type \
-DCMAKE_C_COMPILER=hipcc \
-DCMAKE_CXX_COMPILER=hipcc \
-DCMAKE_INSTALL_LIBDIR=share \
-DCMAKE_LINKER=%rocmllvm_bindir/ld.lld \
-DCMAKE_PREFIX_PATH=%{rocmllvm_cmakedir}/.. \
-DCMAKE_RANLIB=%rocmllvm_bindir/llvm-ranlib \
-DBUILD_FILE_REORG_BACKWARD_COMPATIBILITY=OFF \
%if %{with check} || %{with test}
-DBUILD_TEST=ON \
%endif
%if %{with check}
-DAMDGPU_TARGETS=${gpu} \
%endif
-DCMAKE_PREFIX_PATH=%{rocmllvm_cmakedir}/.. \
-DCMAKE_INSTALL_LIBDIR=share \
-DROCM_SYMLINK_LIBS=OFF
-DGPU_TARGETS=%{rocm_gpu_list_test} \
-DROCM_SYMLINK_LIBS=OFF
%cmake_build
%install
%cmake_install
if [ -f %{buildroot}%{_prefix}/share/doc/rocprim/LICENSE.txt ]; then
rm %{buildroot}%{_prefix}/share/doc/rocprim/LICENSE.txt
fi
rm -f %{buildroot}%{_prefix}/share/doc/rocprim/LICENSE.txt
%if %{with test}
# force the cmake test file to use absolute paths for its referenced binaries
sed -i -e 's@\.\.@\/usr\/bin@' %{buildroot}%{_bindir}/%{name}/CTestTestfile.cmake
%endif
%if %{with check}
%check
%ctest
%endif
%files devel
%doc README.md
%license LICENSE.txt
@@ -145,6 +168,15 @@ sed -i -e 's@\.\.@\/usr\/bin@' %{buildroot}%{_bindir}/%{name}/CTestTestfile.cmak
%changelog
* Wed Aug 27 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-6
- Add Fedora copyright
* Mon Aug 25 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-5
- Simplify file removal
* Mon Aug 18 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-4
- Remove check option
* Tue Jul 29 2025 Tom Rix <Tom.Rix@amd.com> - 6.4.2-3
- Remove -mtls-dialect cflag