void-packages/srcpkgs/berkeley-abc/patches/remove_zlib_convenience.patch

76 lines
2.2 KiB
Diff

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
--- a/Makefile
+++ b/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
--- a/src/base/io/ioReadAiger.c
+++ b/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
--- a/src/base/io/ioWriteAiger.c
+++ b/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
--- a/src/sat/cnf/cnfMan.c
+++ b/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