## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 42; 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 %bcond_without check %global min_llvm 14 %if %{fedora} >= 39 %global max_llvm 17 %else %if %{fedora} >= 38 %global max_llvm 16 %else %global max_llvm 15 %endif %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 e9707ccad600f53e0844c64256be978cdb4844e5 %gometa %global common_description %{expand: This library provides bindings to a system-installed LLVM.} %global golicenses LICENSE.txt %global godocs README.markdown Name: %{goname} Version: 0 Release: %autorelease -p Summary: Go bindings to a system-installed LLVM License: Apache-2.0 AND NCSA URL: %{gourl} Source0: %{gosource} # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} 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 print('BuildRequires: llvm-devel(major) = ' .. version .. '\n') llvm_supported_versions = llvm_supported_versions .. ' ' .. version end rpm.define(llvm_supported_versions) } %description %{common_description} %gopkg %prep %goprep %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_32_CPPFLAGS=$(${LLVM_CONFIG} --cppflags | sed -e 's!/usr/lib64\b!/usr/lib!g' -e 's/-D_GNU_SOURCE -D__STDC_CONSTANT_MACROS/-D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS/') LLVM_64_CPPFLAGS=$(${LLVM_CONFIG} --cppflags | sed -e 's!/usr/lib\b!/usr/lib64!g' -e 's/-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 //') 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' ' ') LLVM_32_LDFLAGS=$(echo ${LLVM_LDFLAGS} | sed 's!/usr/lib64\b!/usr/lib!g') LLVM_64_LDFLAGS=$(echo ${LLVM_LDFLAGS} | sed 's!/usr/lib\b!/usr/lib64!g') cat > llvm_config_linux_llvm${version}.go << EOF //go:build !byollvm && linux && llvm${version} // +build !byollvm,linux,llvm${version} package llvm // #cgo arm 386 CPPFLAGS: ${LLVM_32_CPPFLAGS} // #cgo !arm,!386 CPPFLAGS: ${LLVM_64_CPPFLAGS} // #cgo CXXFLAGS: -std=${LLVM_CPP_STD} // #cgo arm 386 LDFLAGS: ${LLVM_32_LDFLAGS} // #cgo !arm,!386 LDFLAGS: ${LLVM_64_LDFLAGS} import "C" type run_build_sh int EOF done %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 * 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