public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/symfpu] f45: Version 1.2.0
@ 2026-09-25 21:16 Jerry James
  0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-09-25 21:16 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/symfpu
            Branch : f45
            Commit : 7abfd1e82966d4d51a63a221ad7b6a90934b1a63
            Author : Jerry James <loganjerry@gmail.com>
            Date   : 2026-09-25T13:55:54-06:00
            Stats  : +52/-19 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/symfpu/c/7abfd1e82966d4d51a63a221ad7b6a90934b1a63?branch=f45

            Log:
            Version 1.2.0

- Update License: GPL-3.0-or-later OR BSD-3-Clause
- Build with -fno-strict-aliasing due to type punning
- Build a shared library

---
diff --git a/sources b/sources
index c1595cb..215b8ef 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (symfpu-227a724.tar.gz) = 8cf26a7bc2107932a038cc3f147182138070913fae07034bd1364db2daaf28bb211b9294cdf0b10ddd863cf236ffd8516fee837bc154d83edc739fede9839bca
+SHA512 (symfpu-1.2.0-dual-license.tar.gz) = 0c441c37e9ccc5f25d3df0f7fbfe4d8efeb63eb6e4ece290fb6d4429fb3080ded5bdbf152d46fc1d93e493d8b0690ac11b7859e8579434d617ae98dd72f05b5b

diff --git a/symfpu.spec b/symfpu.spec
index c7ed32f..4463aaa 100644
--- a/symfpu.spec
+++ b/symfpu.spec
@@ -1,25 +1,20 @@
-# Upstream doesn't make releases.  We have to check the code out of git.
-# Use the cvc5 branch.
-%global gittag   227a7246b8ce513b393cc2645d6d65d3490ea1de
-%global shorttag %{sub %{gittag} 1 7}
-%global gitdate  20260406
-
-# There are no ELF objects in this package, so turn off debuginfo generation.
-%global debug_package %{nil}
-
 Name:           symfpu
-Version:        0
+Version:        1.2.0
 Release:        %autorelease
 Summary:        An implementation of IEEE-754 / SMT-LIB floating-point 
 
-License:        GPL-3.0-or-later
-URL:            https://github.com/cvc5/symfpu
+# See LICENSE for the choice between GPL-3.0-or-later and BSD-3-Clause
+License:        GPL-3.0-or-later OR BSD-3-Clause
+URL:            https://github.com/martin-cs/symfpu
 VCS:            git:%{url}.git
-Source:         %{url}/archive/%{gittag}/%{name}-%{shorttag}.tar.gz
+Source:         %{url}/archive/%{name}-%{version}-dual-license.tar.gz
 
 # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
 
+BuildRequires:  make
+BuildRequires:  gcc-c++
+
 %description
 SymFPU is an implementation of the SMT-LIB / IEEE-754 operations in terms of
 bit-vector operations.  It is templated in terms of the bit-vectors,
@@ -33,25 +28,63 @@ again, performance will likely not be good).
 %package devel
 Summary:        Development files for %{name}
 BuildArch:      noarch
-Provides:       %{name}-static = %{version}-%{release}
 
 %description devel
 This package contains header files and library links for developing
 applications that use %{name}.
 
 %prep
-%autosetup -n %{name}-%{gittag}
+%autosetup -n %{name}-%{name}-%{version}-dual-license
+
+# The build expects to be done in a directory named symfpu
+ln -s %{name}-%{name}-%{version}-dual-license ../symfpu
+
+# Turn off x86-specific build flags for other architectures
+%ifnarch %{x86_64}
+sed -i 's/ -msse2 -mfpmath=sse//;s/ -mfma -mno-fma4//' flags
+%endif
 
 %build
-# Nothing to do
+# The source dereferences type-punned pointers
+export CFLAGS='%{build_cflags} -fno-strict-aliasing'
+export CXXFLAGS='%{build_cxxflags} -fno-strict-aliasing'
+# Parallel build almost always leads to an error
+make
+
+# Build a shared library instead of a static library, and give it an soname
+flags=$(sed 's/CXXFLAGS+=//' flags)
+cd baseTypes
+g++ $CXXFLAGS $flags -fPIC -I../../ -c simpleExecutable.cpp \
+    -o simpleExecutable.o
+g++ %{build_ldflags} -shared -Wl,-h,libsymfpu.so.0 -o ../libsymfpu.so.0.0.0 \
+    simpleExecutable.o
+cd -
 
 %install
-mkdir -p %{buildroot}%{_includedir}/%{name}
+# Install the header files
+mkdir -p %{buildroot}%{_includedir}/%{name}/baseTypes
+cp -p baseTypes/*.h %{buildroot}%{_includedir}/%{name}/baseTypes
 cp -a core utils %{buildroot}%{_includedir}/%{name}
+rm %{buildroot}%{_includedir}/%{name}/{core,utils}/Makefile
 
-%files devel
+# Install the library
+mkdir -p %{buildroot}%{_libdir}
+cp -p libsymfpu.so.0.0.0 %{buildroot}%{_libdir}
+ln -s libsymfpu.so.0.0.0 %{buildroot}%{_libdir}/libsymfpu.so.0
+ln -s libsymfpu.so.0 %{buildroot}%{_libdir}/libsymfpu.so
+
+# The test executable always exits with error code 1, which isn't super helpful
+#%%check
+#./test --allTests
+
+%files
+%doc README.md
 %license LICENSE
+%{_libdir}/libsymfpu.so.0{,.*}
+
+%files devel
 %{_includedir}/%{name}/
+%{_libdir}/libsymfpu.so
 
 %changelog
 %autochangelog

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-09-25 21:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-25 21:16 [rpms/symfpu] f45: Version 1.2.0 Jerry James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox