## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 48; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.11.1 %bcond_without check %global debug_package %{nil} %global min_llvm 14 %if %{fedora} >= 40 %global max_llvm 18 %else %global max_llvm 17 %endif # https://github.com/tinygo-org/go-llvm %global goipath tinygo.org/x/go-llvm %global forgeurl https://github.com/tinygo-org/go-llvm %global commit aaff3eb751f0d40d1bc099e1aa3b5f5ce247e6d1 %gometa -L -f %global common_description %{expand: This library provides bindings to a system-installed LLVM.} %global golicenses LICENSE.txt %global godocs README.markdown Name: golang-tinygo-x-llvm Version: 0 Release: %autorelease -p Summary: Go bindings to a system-installed LLVM License: Apache-2.0 AND NCSA URL: %{gourl} Source: %{gosource} BuildRequires: gcc-c++ BuildRequires: make %{lua: local llvm_supported_versions = 'llvm_supported_versions' for version=tonumber(rpm.expand('%min_llvm')),tonumber(rpm.expand('%max_llvm')) do if version ~= 16 then -- LLVM16 is no longer supported print('BuildRequires: llvm-devel(major) = ' .. version .. '\n') llvm_supported_versions = llvm_supported_versions .. ' ' .. version end end rpm.define(llvm_supported_versions) } %description %{common_description} %gopkg %prep %goprep -A %autopatch -p1 # Set current LLVM paths. rm llvm_config_linux*.go for version in %{llvm_supported_versions}; do # Extra checks because of https://bugzilla.redhat.com/show_bug.cgi?id=1871659 if type llvm-config-${version}-%{__isa_bits}; then LLVM_CONFIG=llvm-config-${version}-%{__isa_bits} elif type llvm-config-${version}; then LLVM_CONFIG=llvm-config-${version} elif type llvm-config-%{__isa_bits}; then LLVM_CONFIG=llvm-config-%{__isa_bits} elif type llvm-config; then LLVM_CONFIG=llvm-config else echo "Unable to determine llvm-config for LLVM ${version}" exit 1 fi LLVM_CPPFLAGS=$(${LLVM_CONFIG} --cppflags) if [ ${version} -gt 15 ]; then LLVM_CPP_STD="c++17" else LLVM_CPP_STD="c++14" fi LLVM_COMPONENTS="all-targets analysis asmparser asmprinter bitreader bitwriter codegen core coroutines debuginfodwarf executionengine instrumentation interpreter ipo irreader linker mc mcjit objcarcopts option profiledata scalaropts support target" LLVM_LDFLAGS=$(${LLVM_CONFIG} --ldflags --libs --system-libs ${LLVM_COMPONENTS} | tr '\n' ' ') cat > llvm_config_linux_llvm${version}.go << EOF //go:build !byollvm && linux && llvm${version} // +build !byollvm,linux,llvm${version} package llvm // #cgo CPPFLAGS: ${LLVM_CPPFLAGS} // #cgo CXXFLAGS: -std=${LLVM_CPP_STD} // #cgo LDFLAGS: ${LLVM_LDFLAGS} import "C" type run_build_sh int EOF done %generate_buildrequires %go_generate_buildrequires %install %gopkginstall %if %{with check} %global gotestflags %gocompilerflags -tags="${TAGS}" %check for version in %{llvm_supported_versions}; do export TAGS=llvm${version} %gocheck done %endif %gopkgfiles %changelog ## START: Generated by rpmautospec * Mon Oct 28 2024 Elliott Sales de Andrade - 0-0.48 - Skip unsupported LLVM 16 * Mon Oct 28 2024 Elliott Sales de Andrade - 0-0.47 - Update to commit aaff3eb751f0d40d1bc099e1aa3b5f5ce247e6d1 * Thu Jul 18 2024 Fedora Release Engineering - 0-0.46 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Mon Jun 24 2024 Elliott Sales de Andrade - 0-0.45 - Enable LLVM 18 on Fedora 40+ * Mon Jun 24 2024 Elliott Sales de Andrade - 0-0.44 - Update to commit 697964f2a9dc06d2267b5141fbd7345d3be21596 * Mon Jun 17 2024 Robert-André Mauchin - 0-0.43 - Fix FTBFS * Wed Jan 24 2024 Fedora Release Engineering - 0-0.42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sat Jan 20 2024 Fedora Release Engineering - 0-0.41 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Sep 24 2023 Elliott Sales de Andrade - 0-0.40 - Update to commit e9707ccad600f53e0844c64256be978cdb4844e5 * Sun Sep 24 2023 Elliott Sales de Andrade - 0-0.39 - Drop support for i686 * Mon Sep 04 2023 Elliott Sales de Andrade - 0-0.38 - Update to commit 8e7ec80422a43886fe24b7725bb538ea39457944 * Thu Jul 20 2023 Fedora Release Engineering - 0-0.37 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Sun Apr 16 2023 Elliott Sales de Andrade - 0-0.36 - Support LLVM 16 * Mon Apr 10 2023 Elliott Sales de Andrade - 0-0.35 - Switch to SPDX license * Thu Jan 19 2023 Fedora Release Engineering - 0-0.34 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Mon Oct 24 2022 Elliott Sales de Andrade - 0-0.33 - Update to commit dcb078a262665943160fa7b6a8dd219c2e2fc990 * Sun Aug 07 2022 Elliott Sales de Andrade - 0-0.31 - Update to commit 86e76bb02d386095f0c0cb9edde38bc01903d916 * Sat May 07 2022 Elliott Sales de Andrade - 0-0.30 - Update to commit supporting LLVM 14 * Thu Jan 20 2022 Fedora Release Engineering - 0-0.29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Jan 04 2022 Elliott Sales de Andrade - 0-0.28 - Update to latest commit * Tue Sep 07 2021 Elliott Sales de Andrade - 0-0.27 - Make LLVM config file architecture independent * Mon Sep 06 2021 Elliott Sales de Andrade - 0-0.26 - Add support for LLVM 13 * Mon Sep 06 2021 Elliott Sales de Andrade - 0-0.25 - Fully test against all supported LLVM * Mon Aug 02 2021 Elliott Sales de Andrade - 0-0.24 - Build with LLVM 12. * Mon Aug 02 2021 Elliott Sales de Andrade - 0-0.23 - Update to commit e7b85195e81cf864a886c203c928997658c6f83a * Thu Jul 22 2021 Fedora Release Engineering - 0-0.17.20201119git570e7a6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jan 26 2021 Fedora Release Engineering - 0-0.16.20201119git570e7a6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Thu Nov 19 2020 Elliott Sales de Andrade - 0-0.15.20201119git570e7a6 - Update to 570e7a6841d9b3ae1c357ac08ff38fe43b55e9c3 - Drop compatibility with EOL Fedora 31 * Sat Sep 19 2020 Elliott Sales de Andrade - 0-0.14.20200919git70c5585 - Switch to llvm11 branch * Sun Aug 23 2020 Elliott Sales de Andrade - 0-0.13.20200818git345b294 - Simplify LLVM dependency * Tue Aug 18 2020 Elliott Sales de Andrade - 0-0.12.20200818git345b294 - Update to latest commit * Tue Jul 28 2020 Fedora Release Engineering - 0-0.11.20200419git8d12088 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun Apr 19 2020 Elliott Sales de Andrade - 0-0.10.20200419git8d12088 - Update to latest commit * Tue Feb 11 2020 Elliott Sales de Andrade - 0-0.9.20200207git1ff21df - Add support for LLVM 10 * Fri Feb 07 2020 Elliott Sales de Andrade - 0-0.8.20200207git1ff21df - Update to latest commit * Wed Jan 29 2020 Fedora Release Engineering - 0-0.7.20190925git95bc4ff - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Wed Sep 25 2019 Elliott Sales de Andrade - 0-0.6.20190925git95bc4ff - Update to latest commit * Thu Jul 25 2019 Fedora Release Engineering - 0-0.5.20190604git0713e35 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Thu Jul 04 01:54:04 CEST 2019 Robert-André Mauchin - 0-0.4.20190604git0713e35 - Update to new macros * Fri Jun 07 2019 Elliott Sales de Andrade - 0-0.3.20190604git0713e35 - Update to latest commit - Add gcc-c++ to Requires * Sat Apr 27 2019 Elliott Sales de Andrade - 0-0.2.20190427git7707ae5 - Add llvm-devel to Requires * Thu Apr 18 2019 Elliott Sales de Andrade - 0-0.1.20190427git7707ae5 - First package for Fedora ## END: Generated by rpmautospec