Update to latest mercurial snapshot.

Also, drop the python2 subpackage; upstream moved python support to a
separate project.
This commit is contained in:
Jerry James 2016-02-05 16:06:55 -07:00
commit 744413fb3a
5 changed files with 45 additions and 101 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
/13cb576b8538.zip
/a8730ca647f5.zip

View file

@ -1,44 +1,25 @@
--- ./Makefile.orig 2015-03-06 12:01:18.000000000 -0700
+++ ./Makefile 2015-03-07 17:10:40.822991023 -0700
@@ -20,7 +20,7 @@ MODULES := \
--- Makefile.orig 2016-02-03 14:56:47.000000000 -0700
+++ Makefile 2016-02-04 21:41:31.862198725 -0700
@@ -18,7 +18,7 @@ MODULES := \
src/map/mapper src/map/mio src/map/super src/map/if \
src/map/amap src/map/cov src/map/scl src/map/mpm \
src/misc/extra src/misc/mvc src/misc/st src/misc/util src/misc/nm \
- src/misc/vec src/misc/hash src/misc/tim src/misc/bzlib src/misc/zlib \
+ src/misc/vec src/misc/hash src/misc/tim \
src/misc/mem src/misc/bar src/misc/bbl \
src/misc/mem src/misc/bar src/misc/bbl src/misc/parse \
src/opt/cut src/opt/fxu src/opt/rwr src/opt/mfs src/opt/sim \
src/opt/ret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
@@ -72,7 +72,7 @@ endif
src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
@@ -117,7 +117,7 @@ endif
endif
# LIBS := -ldl -lrt
-LIBS += -ldl
+LIBS += -Wl,--as-needed -lbz2 -lz -ldl
-LIBS += -ldl -lm
+LIBS += -Wl,--as-needed -lbz2 -lz -ldl -lm
ifneq ($(findstring Darwin, $(shell uname)), Darwin)
LIBS += -lrt
endif
@@ -109,15 +109,15 @@ DEP := $(OBJ:.o=.d)
%.o: %.c
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
- @$(CC) -c $(CFLAGS) $< -o $@
+ $(CC) -c $(CFLAGS) $< -o $@
%.o: %.cc
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
- @$(CXX) -c $(CXXFLAGS) $< -o $@
+ $(CXX) -c $(CXXFLAGS) $< -o $@
%.o: %.cpp
@echo "$(MSG_PREFIX)\`\` Compiling:" $(LOCAL_PATH)/$<
- @$(CXX) -c $(CXXFLAGS) $< -o $@
+ $(CXX) -c $(CXXFLAGS) $< -o $@
%.d: %.c
@echo "$(MSG_PREFIX)\`\` Generating dependency:" $(LOCAL_PATH)/$<
--- ./src/base/io/ioReadAiger.c.orig 2015-03-06 12:01:18.000000000 -0700
+++ ./src/base/io/ioReadAiger.c 2015-03-07 17:10:40.823990943 -0700
--- src/base/io/ioReadAiger.c.orig 2016-02-03 14:56:47.000000000 -0700
+++ src/base/io/ioReadAiger.c 2016-02-04 21:37:07.724515263 -0700
@@ -26,8 +26,8 @@
#include <string.h>
#include <assert.h>
@ -50,8 +31,8 @@
#include "ioAbc.h"
ABC_NAMESPACE_IMPL_START
--- ./src/base/io/ioReadBlifMv.c.orig 2015-03-06 12:01:18.000000000 -0700
+++ ./src/base/io/ioReadBlifMv.c 2015-03-07 17:10:40.825990781 -0700
--- src/base/io/ioReadBlifMv.c.orig 2016-02-03 14:56:47.000000000 -0700
+++ src/base/io/ioReadBlifMv.c 2016-02-04 21:37:07.726515102 -0700
@@ -18,8 +18,8 @@
***********************************************************************/
@ -63,8 +44,8 @@
#include "base/abc/abc.h"
#include "misc/vec/vecPtr.h"
#include "ioAbc.h"
--- ./src/base/io/ioWriteAiger.c.orig 2015-03-06 12:01:18.000000000 -0700
+++ ./src/base/io/ioWriteAiger.c 2015-03-07 17:10:40.826990701 -0700
--- src/base/io/ioWriteAiger.c.orig 2016-02-03 14:56:47.000000000 -0700
+++ src/base/io/ioWriteAiger.c 2016-02-04 21:37:07.727515021 -0700
@@ -26,8 +26,8 @@
#include <string.h>
#include <assert.h>
@ -76,8 +57,8 @@
#include "ioAbc.h"
--- ./src/sat/cnf/cnfMan.c.orig 2015-03-06 12:01:18.000000000 -0700
+++ ./src/sat/cnf/cnfMan.c 2015-03-07 17:10:40.827990620 -0700
--- src/sat/cnf/cnfMan.c.orig 2016-02-03 14:56:47.000000000 -0700
+++ src/sat/cnf/cnfMan.c 2016-02-04 21:37:07.728514940 -0700
@@ -21,7 +21,7 @@
#include "cnf.h"
#include "sat/bsat/satSolver.h"

View file

@ -1,24 +1,24 @@
--- ./Makefile.orig 2015-03-07 17:10:40.822991023 -0700
+++ ./Makefile 2015-03-07 17:12:53.760275780 -0700
--- Makefile.orig 2016-02-05 14:41:31.862198725 -0700
+++ Makefile 2016-02-04 21:46:14.618379630 -0700
@@ -46,7 +46,7 @@ ARCHFLAGS := $(ARCHFLAGS)
OPTFLAGS ?= -g -O #-DABC_NAMESPACE=xxx
OPTFLAGS ?= -g -O
-CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(OPTFLAGS) $(ARCHFLAGS) -Isrc
-CFLAGS += -Wall -Wno-unused-function -Wno-write-strings -Wno-sign-compare $(ARCHFLAGS)
+CFLAGS += -Wno-unused-function $(OPTFLAGS) $(ARCHFLAGS) -Isrc
ifneq ($(findstring arm,$(shell uname -m)),)
CFLAGS += -DABC_MEMALIGN=4
endif
@@ -148,6 +148,12 @@ $(PROG): $(OBJ)
@@ -186,6 +186,12 @@ $(PROG): $(OBJ)
@echo "$(MSG_PREFIX)\`\` Building binary:" $(notdir $@)
@$(LD) -o $@ $^ $(LIBS)
$(VERBOSE)$(LD) -o $@ $^ $(LIBS)
+lib$(PROG).so: $(OBJ)
+ @echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
+ $(LD) -shared -Wl,-h,lib$(PROG).so.0 -o lib$(PROG).so.0.0.0 $^ $(LIBS)
+ @ln -s lib$(PROG).so.0.0.0 lib$(PROG).so.0
+ @ln -s lib$(PROG).so.0 $@
+ $(VERBOSE)$(LD) -shared -Wl,-h,lib$(PROG).so.0 -o lib$(PROG).so.0.0.0 $^ $(LIBS)
+ $(VERBOSE)ln -s lib$(PROG).so.0.0.0 lib$(PROG).so.0
+ $(VERBOSE)ln -s lib$(PROG).so.0 $@
+
lib$(PROG).a: $(OBJ)
@echo "$(MSG_PREFIX)\`\` Linking:" $(notdir $@)
@ar rv $@ $?
$(VERBOSE)ar rv $@ $?

View file

@ -1,22 +1,14 @@
# Python packaging notes:
# 1. Upstream does not yet support python 3, so we build for python 2 only.
# 2. The python build does not link against the library stored in _libdir,
# because it has to be built differently. Look for instances of
# "#ifdef ABC_PYTHON_EMBED ... #endif" in the source code. Hence, the
# python2 subpackage is indepedent of the -libs subpackage.
# Upstream doesn't make releases. We have to check the code out of Mercurial.
%global owner alanmi
%global commit 13cb576b8538
%global hgdate 20150306
%global commit a8730ca647f5
%global hgdate 20160203
Name: abc
Version: 1.01
Release: 7.hg%{hgdate}%{?dist}
Release: 8.hg%{hgdate}%{?dist}
Summary: Sequential logic synthesis and formal verification
# This would be MIT, but we link with readline
License: GPLv3+
License: MIT
URL: http://www.eecs.berkeley.edu/~alanmi/abc/abc.htm
Source0: https://bitbucket.org/%{owner}/%{name}/get/%{commit}.zip
# Man page created by Jerry James using upstream text; hence, it is covered by
@ -28,13 +20,16 @@ Patch0: %{name}-bundlelib.patch
Patch1: %{name}-sharedlib.patch
BuildRequires: bzip2-devel
BuildRequires: python2-devel
BuildRequires: readline-devel
BuildRequires: swig
BuildRequires: zlib-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
# This can be removed once F-23 reaches EOL or someone packages the separate
# python extension for abc.
Obsoletes: %{name}-python2 < 1.01-8.hg20160203%{?dist}
Provides: %{name}-python2 = %{version}-%{release}
%description
ABC is a growing software system for synthesis and verification of
binary sequential logic circuits appearing in synchronous hardware
@ -62,15 +57,8 @@ Requires: %{name}-libs%{?_isa} = %{version}-%{release}
%description devel
Headers and libraries for developing applications that use ABC.
%package python2
Summary: Python 2 interface to ABC
%description python2
Python 2 interface to ABC
%prep
%setup -q -c
pushd %{owner}-%{name}-%{commit}
%setup -q -n %{owner}-%{name}-%{commit}
%patch0
%patch1
@ -83,10 +71,6 @@ for fil in readme.md readmeaig; do
touch -r ${fil}.orig ${fil}
rm -f ${fil}.orig
done
popd
# Prepare for the python 2 build
cp -a %{owner}-%{name}-%{commit} %{name}-python2
# Set the version number in the man page
sed 's/@VERSION@/%{version} (%{hgdate})/' %{SOURCE1} > %{name}.1
@ -94,22 +78,11 @@ touch -r %{SOURCE1} %{name}.1
%build
# Build the library and binary
pushd %{owner}-%{name}-%{commit}
make %{?_smp_mflags} libabc.so OPTFLAGS="%{optflags} -fPIC -DNDEBUG" \
LD="g++ $RPM_LD_FLAGS"
LD="g++ $RPM_LD_FLAGS" ABC_MAKE_VERBOSE=1
g++ src/base/main/main.o -o %{name} -L. -labc
popd
# Build for python 2
pushd %{name}-python2
make libabc.a %{?_smp_mflags} OPTFLAGS="%{optflags} -fPIC -DNDEBUG" \
LD="g++ $RPM_LD_FLAGS" ABC_PYTHON="%{__python2}"
cd src/python
%{__python2} setup.py build
popd
%install
pushd %{owner}-%{name}-%{commit}
# Install the library
mkdir -p %{buildroot}%{_libdir}
install -p -m 0755 lib%{name}.so.0.0.0 %{buildroot}%{_libdir}
@ -126,44 +99,33 @@ popd
# Install the binary
mkdir -p %{buildroot}%{_bindir}
install -p -m 0755 %{name} %{buildroot}%{_bindir}
popd
# Install the man page
mkdir -p %{buildroot}%{_mandir}/man1
install -p -m 0644 %{name}.1 %{buildroot}%{_mandir}/man1
# Install the python2 interface
pushd %{name}-python2
cd src/python
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
mkdir %{buildroot}%{python2_sitearch}/%{name}
mv %{buildroot}%{python2_sitearch}/*.py* %{buildroot}%{python2_sitearch}/*.so \
%{buildroot}%{python2_sitearch}/%{name}
chmod 0755 %{buildroot}%{python2_sitearch}/%{name}/*.so
popd
%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%files
%doc %{owner}-%{name}-%{commit}/readme.md %{owner}-%{name}-%{commit}/readmeaig
%doc readme.md readmeaig
%{_bindir}/%{name}
%{_mandir}/man1/%{name}*
%files libs
%license %{owner}-%{name}-%{commit}/copyright.txt
%license copyright.txt
%{_libdir}/lib%{name}.so.*
%files devel
%{_includedir}/%{name}/
%{_libdir}/lib%{name}.so
%files python2
%license %{owner}-%{name}-%{commit}/copyright.txt
%{python2_sitearch}/*
%changelog
* Fri Feb 5 2016 Jerry James <loganjerry@gmail.com> - 1.01-8.hg20160203
- Update to latest mercurial snapshot
- Drop the python2 subpackage; upstream moved support to a separate project
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.01-7.hg20150306
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

View file

@ -1 +1 @@
ac672fae774da114514727a02e3ea595 13cb576b8538.zip
97a91d0f0d3b3bbdc10edf9de37d064f a8730ca647f5.zip