[minisat2] New upstream version. Drop upstreamed template patch. Drop unnecessary spec file elements (BuildRoot

Jerry James jjames at fedoraproject.org
Wed Jun 22 22:05:27 UTC 2011


commit 874c944e3be97e83b5f17cb8708ba8d2b00d50b3
Author: Jerry James <loganjerry at gmail.com>
Date:   Wed Jun 22 16:04:51 2011 -0600

    New upstream version.
    Drop upstreamed template patch.
    Drop unnecessary spec file elements (BuildRoot, etc.).

 .gitignore              |    2 +-
 minisat2-FPU.patch      |   18 ++++----
 minisat2-template.patch |   12 -----
 minisat2.spec           |  108 ++++++++++++++++++++++-------------------------
 sources                 |    2 +-
 5 files changed, 61 insertions(+), 81 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index f8c267b..ca1d8ce 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-minisat2-070721.zip
+/niklasso-minisat-releases-2.2.0-0-geb01ad6.tar.gz
diff --git a/minisat2-FPU.patch b/minisat2-FPU.patch
index 5396e19..cc2b3ec 100644
--- a/minisat2-FPU.patch
+++ b/minisat2-FPU.patch
@@ -1,11 +1,11 @@
---- minisat2-070721.orig/simp/Main.C
-+++ minisat2-070721/simp/Main.C
-@@ -244,7 +244,7 @@
- int main(int argc, char** argv)
- {
-     reportf("This is MiniSat 2.0 beta\n");
+--- simp/Main.cc.orig	2010-07-10 10:07:36.000000000 -0600
++++ simp/Main.cc	2011-06-22 15:13:36.468390581 -0600
+@@ -74,7 +74,7 @@ int main(int argc, char** argv)
+         setUsageHelp("USAGE: %s [options] <input-file> <result-output-file>\n\n  where input may be either in plain or gzipped DIMACS.\n");
+         // printf("This is MiniSat 2.0 beta\n");
+         
 -#if defined(__linux__)
 +#if defined(__linux__) && defined(_FPU_EXTENDED) && defined(_FPU_DOUBLE)
-     fpu_control_t oldcw, newcw;
-     _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
-     reportf("WARNING: for repeatability, setting FPU to use double precision\n");
+         fpu_control_t oldcw, newcw;
+         _FPU_GETCW(oldcw); newcw = (oldcw & ~_FPU_EXTENDED) | _FPU_DOUBLE; _FPU_SETCW(newcw);
+         printf("WARNING: for repeatability, setting FPU to use double precision\n");
diff --git a/minisat2.spec b/minisat2.spec
index adecf3d..9190334 100644
--- a/minisat2.spec
+++ b/minisat2.spec
@@ -1,73 +1,65 @@
-# Deal with odd and inconsistent upstream naming:
-%define myname minisat
-%define myversion 070721
-
-Summary: A minimalistic, open-source SAT solver
-Name: minisat2
-Version: 2.0
-# Use Fedora 'Snapshot' naming convention due to odd upstream version naming:
-Release: 10.20070721%{?dist}
-License: MIT
-Group: Applications/Engineering
-Source: http://minisat.se/downloads/%{name}-%{myversion}.zip
+%global myname minisat
+
+Name:           minisat2
+Version:        2.2.0
+Release:        1%{?dist}
+Summary:        Minimalistic SAT solver
+
+License:        MIT
+Group:          Applications/Engineering
+URL:            http://minisat.se/
+Source0:        https://github.com/niklasso/minisat/tarball/releases/2.2.0/niklasso-minisat-releases-%{version}-0-geb01ad6.tar.gz
 # Sent sources, test, patches (below) to upstream via email on 2008-07-08:
-Source1: http://www.dwheeler.com/essays/minisat-user-guide-1.0.html
-Source2: minisat2-test.in
-Patch1: minisat2-FPU.patch
-Patch2: minisat2-template.patch
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-URL: http://minisat.se/
-BuildRequires: zlib-devel
+Source1:        http://www.dwheeler.com/essays/minisat-user-guide-1.0.html
+Source2:        minisat2-test.in
+# Don't try to set the FPU to double precision unless the target CPU supports
+# that operation
+Patch0:         minisat2-FPU.patch
+
+BuildRequires:  zlib-devel
 
 %description
 MiniSat is a minimalistic, open-source Boolean satisfiability problem
-(SAT) solver, developed for researchers and developers alike.
-Winning all the industrial categories of the SAT 2005 competition,
-MiniSat is a good starting point both for future research in SAT, and
-for applications using SAT.
-
-A SAT solver can determine if it is possible to find assignments to boolean
-variables that would make a given expression true, if the expression is
-written with only AND, OR, NOT, parentheses, and boolean variables.
-If the expression is satisfiable, MiniSAT can also produce a
-set of assignments that make the expression true.
-Although the problem is NP-complete, SAT solvers (like this one)
-are often able to decide this problem in a reasonable time frame.
+(SAT) solver, developed to help researchers and developers alike to get
+started on SAT.  Together with SatELite, MiniSat was recently awarded in
+the three industrial categories and one of the "crafted" categories of
+the SAT 2005 competition.
+
+A SAT solver can determine if it is possible to find assignments to
+boolean variables that would make a given expression true, if the
+expression is written with only AND, OR, NOT, parentheses, and boolean
+variables.  If the expression is satisfiable, MiniSAT can also produce a
+set of assignments that make the expression true.  Although the problem
+is NP-complete, SAT solvers (like this one) are often able to decide
+this problem in a reasonable time frame.
 
 %prep
-%setup -q -n %{myname}
-%patch1 -p1 
-%patch2 -p1 
+%setup -q -n niklasso-minisat-eb01ad6
+%patch0
 
-%build
-cp -p %{SOURCE1} .
+cp -p %{SOURCE1} minisat-user-guide.html
 cp -p %{SOURCE2} .
-mv minisat-user-guide-*.html minisat-user-guide.html
 
 # Show key execution steps, so we can see that the right flags are used.
-sed -i 's/@$(CXX)/$(CXX)/' mtl/template.mk 
-
-# Note: Could get a 1-2% speed boost by building as static (use "rs" instead
-# of "r" when invoking "make"), but static executables are dispreferred by
-# Fedora (they create update complications and are larger).
-# If static executables were added later, they would need to
-# add a dependency on zlib-static.
+sed -i 's/@$(CXX)/$(CXX)/' mtl/template.mk
 
+%build
 # Build "simp", which adds simplification capabilities, instead of just "core"
-pushd simp
- make CFLAGS="-I../mtl -I../core -Wall -ffloat-store %{optflags}" r
- cp -p %{myname}* ../%{myname}
-popd
+make %{?_smp_mflags} -C simp r \
+  MROOT=`pwd` \
+  COPTIMIZE="$RPM_OPT_FLAGS -ffloat-store" \
+  LFLAGS="$RPM_OPT_FLAGS -ffloat-store -lz"
+cp -p simp/%{myname}_release %{myname}
 
 %install
-rm -rf %{buildroot}
-mkdir -p %{buildroot}%{_bindir}
-install -m 0755 %{myname} %{buildroot}%{_bindir}/
+mkdir -p $RPM_BUILD_ROOT%{_bindir}
+install -m 0755 %{myname} $RPM_BUILD_ROOT%{_bindir}
 
 %check
 # Test "minisat2-test.in" is a brief quote from
 # http://www.satcompetition.org/2004/format-solvers2004.html
-./minisat minisat2-test.in minisat2-test.out
+# Exit value is 10 for satisfiable, 20 for unsatisfiable
+./minisat minisat2-test.in minisat2-test.out || true
 echo
 echo "RESULTS:"
 cat minisat2-test.out
@@ -80,19 +72,20 @@ else
   false
 fi
 
-%clean
-rm -rf %{buildroot}
-
 %files
-%defattr(-,root,root)
 %doc LICENSE
+%doc doc/ReleaseNotes-2.2.0.txt
 %doc minisat-user-guide.html
 %doc minisat2-test.in
 %doc minisat2-test.out
 %attr(755,root,root) %{_bindir}/%{myname}
 
-
 %changelog
+* Wed Jun 22 2011 Jerry James <loganjerry at gmail.com> - 2.2.0-1
+- New upstream version
+- Drop upstreamed template patch
+- Drop unnecessary spec file elements (BuildRoot, etc.)
+
 * Tue Feb 08 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.0-10.20070721
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
 
@@ -131,4 +124,3 @@ rm -rf %{buildroot}
 * Thu Jun 26 2008 Earl Sammons <esammons at, hush.com> 2.0-1.20070721
 - Initial build
 - Include Debian patches minisat2-FPU.patch and minisat2-template.patch
-
diff --git a/sources b/sources
index db4da1d..74b544d 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-fb12db9a13f86a2133758abfba239546  minisat2-070721.zip
+2274977506042714811968afca01b68d  niklasso-minisat-releases-2.2.0-0-geb01ad6.tar.gz


More information about the scm-commits mailing list