remove_zlib_convenience.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. From: Ruben Undheim <ruben.undheim@gmail.com>
  2. Date: Sat, 4 Aug 2018 13:17:43 +0000
  3. Subject: The library zlib is included in the source and
  4. built as a convenience library. This patch prevents this from being
  5. built and links berkeley-abc with debian's zlib library instead.
  6. Forwarded: doesn't make sense upstream
  7. ===================================================================
  8. ---
  9. Makefile | 3 ++-
  10. src/base/io/ioReadAiger.c | 2 +-
  11. src/base/io/ioWriteAiger.c | 2 +-
  12. src/sat/cnf/cnfMan.c | 2 +-
  13. 4 files changed, 5 insertions(+), 4 deletions(-)
  14. diff --git a/Makefile b/Makefile
  15. index 36b0f89..68651d2 100644
  16. --- a/Makefile
  17. +++ b/Makefile
  18. @@ -20,7 +20,7 @@ MODULES := \
  19. src/map/mapper src/map/mio src/map/super src/map/if \
  20. src/map/amap src/map/cov src/map/scl src/map/mpm \
  21. src/misc/extra src/misc/mvc src/misc/st src/misc/util src/misc/nm \
  22. - src/misc/vec src/misc/hash src/misc/tim src/misc/zlib \
  23. + src/misc/vec src/misc/hash src/misc/tim \
  24. src/misc/mem src/misc/bar src/misc/bbl src/misc/parse \
  25. src/opt/cut src/opt/fxu src/opt/fxch src/opt/rwr src/opt/mfs src/opt/sim \
  26. src/opt/ret src/opt/fret src/opt/res src/opt/lpk src/opt/nwk src/opt/rwt \
  27. @@ -144,6 +144,7 @@ ifneq ($(findstring Darwin, $(shell uname)), Darwin)
  28. endif
  29. LIBS += -lbz2
  30. +LIBS += -lz
  31. ifdef ABC_USE_LIBSTDCXX
  32. LIBS += -lstdc++
  33. diff --git a/src/base/io/ioReadAiger.c b/src/base/io/ioReadAiger.c
  34. index 4f0f6a3..e174ff6 100644
  35. --- a/src/base/io/ioReadAiger.c
  36. +++ b/src/base/io/ioReadAiger.c
  37. @@ -27,7 +27,7 @@
  38. #include <assert.h>
  39. #include <bzlib.h>
  40. -#include "misc/zlib/zlib.h"
  41. +#include <zlib.h>
  42. #include "ioAbc.h"
  43. ABC_NAMESPACE_IMPL_START
  44. diff --git a/src/base/io/ioWriteAiger.c b/src/base/io/ioWriteAiger.c
  45. index f0744c6..d265104 100644
  46. --- a/src/base/io/ioWriteAiger.c
  47. +++ b/src/base/io/ioWriteAiger.c
  48. @@ -27,7 +27,7 @@
  49. #include <assert.h>
  50. #include <bzlib.h>
  51. -#include "misc/zlib/zlib.h"
  52. +#include <zlib.h>
  53. #include "ioAbc.h"
  54. diff --git a/src/sat/cnf/cnfMan.c b/src/sat/cnf/cnfMan.c
  55. index 5a125ec..54c582f 100644
  56. --- a/src/sat/cnf/cnfMan.c
  57. +++ b/src/sat/cnf/cnfMan.c
  58. @@ -21,7 +21,7 @@
  59. #include "cnf.h"
  60. #include "sat/bsat/satSolver.h"
  61. #include "sat/bsat/satSolver2.h"
  62. -#include "misc/zlib/zlib.h"
  63. +#include <zlib.h>
  64. ABC_NAMESPACE_IMPL_START