New package: berkeley-abc-1.01+20201124

This commit is contained in:
Đoàn Trần Công Danh 2020-12-25 23:52:44 +07:00
parent 2f55c9abb0
commit c41b11b32d
4 changed files with 212 additions and 0 deletions

View file

@ -0,0 +1,62 @@
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Sat, 4 Aug 2018 13:17:43 +0000
Subject: The library bzlib is included in the source and
built as a convenience library. This patch prevents this from being
built and links berkeley-abc with debian's bzlib library instead.
Forwarded: doesn't make sense upstream
===================================================================
---
Makefile | 4 +++-
src/base/io/ioReadAiger.c | 2 +-
src/base/io/ioWriteAiger.c | 2 +-
3 files changed, 5 insertions(+), 3 deletions(-)
diff --git Makefile Makefile
index e0e8b8f..36b0f89 100644
--- Makefile
+++ Makefile
@@ -20,7 +20,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/zlib \
src/misc/mem src/misc/bar src/misc/bbl src/misc/parse \
src/opt/cut src/opt/fxu src/opt/fxch src/opt/rwr src/opt/mfs src/opt/sim \
src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
@@ -143,6 +143,8 @@ ifneq ($(findstring Darwin, $(shell uname)), Darwin)
LIBS += -lrt
endif
+LIBS += -lbz2
+
ifdef ABC_USE_LIBSTDCXX
LIBS += -lstdc++
$(info $(MSG_PREFIX)Using explicit -lstdc++)
diff --git src/base/io/ioReadAiger.c src/base/io/ioReadAiger.c
index f87d971..4f0f6a3 100644
--- src/base/io/ioReadAiger.c
+++ src/base/io/ioReadAiger.c
@@ -26,7 +26,7 @@
#include <string.h>
#include <assert.h>
-#include "misc/bzlib/bzlib.h"
+#include <bzlib.h>
#include "misc/zlib/zlib.h"
#include "ioAbc.h"
diff --git src/base/io/ioWriteAiger.c src/base/io/ioWriteAiger.c
index 0a68c7e..f0744c6 100644
--- src/base/io/ioWriteAiger.c
+++ src/base/io/ioWriteAiger.c
@@ -26,7 +26,7 @@
#include <string.h>
#include <assert.h>
-#include "misc/bzlib/bzlib.h"
+#include <bzlib.h>
#include "misc/zlib/zlib.h"
#include "ioAbc.h"

View file

@ -0,0 +1,75 @@
From: Ruben Undheim <ruben.undheim@gmail.com>
Date: Sat, 4 Aug 2018 13:17:43 +0000
Subject: The library zlib is included in the source and
built as a convenience library. This patch prevents this from being
built and links berkeley-abc with debian's zlib library instead.
Forwarded: doesn't make sense upstream
===================================================================
---
Makefile | 3 ++-
src/base/io/ioReadAiger.c | 2 +-
src/base/io/ioWriteAiger.c | 2 +-
src/sat/cnf/cnfMan.c | 2 +-
4 files changed, 5 insertions(+), 4 deletions(-)
diff --git Makefile Makefile
index 36b0f89..68651d2 100644
--- Makefile
+++ Makefile
@@ -20,7 +20,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/zlib \
+ src/misc/vec src/misc/hash src/misc/tim \
src/misc/mem src/misc/bar src/misc/bbl src/misc/parse \
src/opt/cut src/opt/fxu src/opt/fxch src/opt/rwr src/opt/mfs src/opt/sim \
src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
@@ -144,6 +144,7 @@ ifneq ($(findstring Darwin, $(shell uname)), Darwin)
endif
LIBS += -lbz2
+LIBS += -lz
ifdef ABC_USE_LIBSTDCXX
LIBS += -lstdc++
diff --git src/base/io/ioReadAiger.c src/base/io/ioReadAiger.c
index 4f0f6a3..e174ff6 100644
--- src/base/io/ioReadAiger.c
+++ src/base/io/ioReadAiger.c
@@ -27,7 +27,7 @@
#include <assert.h>
#include <bzlib.h>
-#include "misc/zlib/zlib.h"
+#include <zlib.h>
#include "ioAbc.h"
ABC_NAMESPACE_IMPL_START
diff --git src/base/io/ioWriteAiger.c src/base/io/ioWriteAiger.c
index f0744c6..d265104 100644
--- src/base/io/ioWriteAiger.c
+++ src/base/io/ioWriteAiger.c
@@ -27,7 +27,7 @@
#include <assert.h>
#include <bzlib.h>
-#include "misc/zlib/zlib.h"
+#include <zlib.h>
#include "ioAbc.h"
diff --git src/sat/cnf/cnfMan.c src/sat/cnf/cnfMan.c
index 5a125ec..54c582f 100644
--- src/sat/cnf/cnfMan.c
+++ src/sat/cnf/cnfMan.c
@@ -21,7 +21,7 @@
#include "cnf.h"
#include "sat/bsat/satSolver.h"
#include "sat/bsat/satSolver2.h"
-#include "misc/zlib/zlib.h"
+#include <zlib.h>
ABC_NAMESPACE_IMPL_START

View file

@ -0,0 +1,37 @@
From: Johann Klammer <klammerj@a1.net>
Date: Sat, 4 Aug 2018 13:17:43 +0000
Subject: Remove the __TIME__ etc macros
Otherwise the debian package checking complains...
===================================================================
---
src/base/cmd/cmdUtils.c | 2 +-
src/base/main/mainUtils.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git src/base/cmd/cmdUtils.c src/base/cmd/cmdUtils.c
index 3409543..9b7223f 100644
--- src/base/cmd/cmdUtils.c
+++ src/base/cmd/cmdUtils.c
@@ -589,7 +589,7 @@ void CmdCommandPrint( Abc_Frame_t * pAbc, int fPrintAll, int fDetails )
nColumns = 79 / (LenghtMax + 2);
// print the starting message
- fprintf( pAbc->Out, " Welcome to ABC compiled on %s %s!", __DATE__, __TIME__ );
+ fprintf( pAbc->Out, " Welcome to ABC!");
// print the command by group
sGroupCur = NULL;
diff --git src/base/main/mainUtils.c src/base/main/mainUtils.c
index d1fe1d2..3668f3b 100644
--- src/base/main/mainUtils.c
+++ src/base/main/mainUtils.c
@@ -52,7 +52,7 @@ static char * DateReadFromDateString( char * datestr );
char * Abc_UtilsGetVersion( Abc_Frame_t * pAbc )
{
static char Version[1000];
- sprintf(Version, "%s (compiled %s %s)", ABC_VERSION, __DATE__, __TIME__);
+ sprintf(Version, "%s", ABC_VERSION);
return Version;
}

View file

@ -0,0 +1,38 @@
# Template file for 'berkeley-abc'
pkgname=berkeley-abc
# This is the version shipped by Fedora 34
_gitrev=d4fb192575cd319de68764eac5b7e049f575f43e
version=1.01+20201124
revision=1
wrksrc=abc-$_gitrev
build_style=gnu-makefile
make_use_env=yes
make_build_args="ABC_MAKE_VERBOSE=1 ABC_USE_STDINT_H=1"
makedepends="readline-devel zlib-devel bzip2-devel"
short_desc="System for Sequential Synthesis and Verification"
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
license="custom:University-of-California, BSD-4-Clause, MIT, BSD-2-Clause"
homepage="http://www.eecs.berkeley.edu/~alanmi/abc/"
distfiles="https://github.com/berkeley-abc/abc/archive/$_gitrev.tar.gz"
checksum=52f1e9bf62c1e0d3b3cbe145f61b409a725e73fe606ba010efcbb2701a14171b
post_patch() {
vsed -i -e '/^CC *:=/d' -e '/^CXX *:=/d' -e '/^AR *:=/d' \
Makefile
}
do_install() {
vbin abc
vlicense copyright.txt
vlicense src/bdd/cudd/license cudd.license
vlicense src/sat/bsat/license bsat.license
vlicense src/sat/bsat2/LICENSE bsat2.license
vlicense src/sat/glucose/license glucose.license
vlicense src/sat/glucose2/license glucose2.license
sed -n '/Copyright/,/THE SOFTWARE/p' src/sat/lsat/solver.h >lsat.license
vlicense lsat.license
vlicense src/sat/satoko/LICENSE satoko.license
vlicense src/sat/xsat/license xsat.license
sed -n '/Copyright/,/SUCH DAMAGE/p' src/sat/bsat2/pstdint.h >pstdint.license
vlicense pstdint.license
}