Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37518164
en ru br
Репозитории ALT
S:3.28.2.2-alt1
5.1: 2.0.5.0-alt6
4.1: 2.0.5.0-alt5
4.0: 2.0.5.0-alt5
3.0: 2.0.4.0-alt2
www.altlinux.org/Changes

Группа :: Графика
Пакет: qcad

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: qcad-alt-use-system-zlib.patch
Скачать


 shared_app.pri                                 |  2 +-
 src/3rdparty/opennurbs/opennurbs.pro           |  1 -
 src/3rdparty/opennurbs/opennurbs/opennurbs.pro |  8 +----
 src/3rdparty/opennurbs/opennurbs_zlib.h        | 49 ++++++++++++++++++++++++--
 src/core/core.pro                              |  2 +-
 5 files changed, 49 insertions(+), 13 deletions(-)
diff --git a/shared_app.pri b/shared_app.pri
index afd3ae154..3759e4bda 100644
--- a/shared_app.pri
+++ b/shared_app.pri
@@ -16,7 +16,7 @@ LIBS += \
 !r_no_opennurbs {
     LIBS += \
         -lopennurbs \
-        -lzlib
+        -lz
 }
 
 win32 {
diff --git a/src/3rdparty/opennurbs/opennurbs.pro b/src/3rdparty/opennurbs/opennurbs.pro
index 440284a13..d5ca2d30f 100644
--- a/src/3rdparty/opennurbs/opennurbs.pro
+++ b/src/3rdparty/opennurbs/opennurbs.pro
@@ -1,5 +1,4 @@
 include (../../../shared.pri)
 TEMPLATE = subdirs
 SUBDIRS = \
-    zlib \
     opennurbs
diff --git a/src/3rdparty/opennurbs/opennurbs/opennurbs.pro b/src/3rdparty/opennurbs/opennurbs/opennurbs.pro
index 02c053c5a..fa1eca7e3 100644
--- a/src/3rdparty/opennurbs/opennurbs/opennurbs.pro
+++ b/src/3rdparty/opennurbs/opennurbs/opennurbs.pro
@@ -219,13 +219,7 @@ HEADERS += \
 TARGET = opennurbs
 TEMPLATE = lib
 CONFIG += staticlib
-CONFIG(release, debug|release) {
-    LIBS += -L../zlib/release
-}
-else {
-    LIBS += -L../zlib/debug
-}
-LIBS += -lzlib
+LIBS += -lz
 win32 {
     #DEFINES += ON_DLL_EXPORTS ON_COMPILING_OPENNURBS NDEBUG
     DEFINES += ON_COMPILING_OPENNURBS NDEBUG
diff --git a/src/3rdparty/opennurbs/opennurbs_zlib.h b/src/3rdparty/opennurbs/opennurbs_zlib.h
index d302909cc..dc8d424bf 100644
--- a/src/3rdparty/opennurbs/opennurbs_zlib.h
+++ b/src/3rdparty/opennurbs/opennurbs_zlib.h
@@ -27,10 +27,55 @@
 // and statically link with the zlib library. All the necessary
 // header files are included by opennurbs.h.
 
+#include "zlib.h"
 
 #if !defined(Z_PREFIX)
 /* decorates zlib functions with a "z_" prefix to prevent symbol collision. */
-#define Z_PREFIX
+//#define Z_PREFIX
+#  define z_deflateInit_          deflateInit_
+#  define z_deflate               deflate
+#  define z_deflateEnd            deflateEnd
+#  define z_inflateInit_          inflateInit_
+#  define z_inflate               inflate
+#  define z_inflateEnd            inflateEnd
+#  define z_deflateInit2_         deflateInit2_
+#  define z_deflateSetDictionary  deflateSetDictionary
+#  define z_deflateCopy           deflateCopy
+#  define z_deflateReset          deflateReset
+#  define z_deflateParams         deflateParams
+#  define z_deflateBound          deflateBound
+#  define z_deflatePrime          deflatePrime
+#  define z_inflateInit2_         inflateInit2_
+#  define z_inflateSetDictionary  inflateSetDictionary
+#  define z_inflateSync           inflateSync
+#  define z_inflateSyncPoint      inflateSyncPoint
+#  define z_inflateCopy           inflateCopy
+#  define z_inflateReset          inflateReset
+#  define z_inflateBack           inflateBack
+#  define z_inflateBackEnd        inflateBackEnd
+#  define z_compress              compress
+#  define z_compress2             compress2
+#  define z_compressBound         compressBound
+#  define z_uncompress            uncompress
+#  define z_adler32               adler32
+#  define z_crc32                 crc32
+#  define z_get_crc_table         get_crc_table
+#  define z_zError                zError
+
+#  define z_alloc_func            alloc_func
+#  define z_free_func             free_func
+#  define z_in_func               in_func
+#  define z_out_func              out_func
+#  define z_Byte                  Byte
+#  define z_uInt                  uInt
+#  define z_uLong                 uLong
+#  define z_Bytef                 Bytef
+#  define z_charf                 charf
+#  define z_intf                  intf
+#  define z_uIntf                 uIntf
+#  define z_uLongf                uLongf
+#  define z_voidpf                voidpf
+#  define z_voidp                 voidp
 #endif
 
 #if !defined(MY_ZCALLOC)
@@ -38,8 +83,6 @@
 //#define MY_ZCALLOC
 #endif
 
-#include "./zlib/zlib.h"
-
 ON_BEGIN_EXTERNC
 voidpf zcalloc (voidpf, unsigned, unsigned);
 void  zcfree (voidpf, voidpf);
diff --git a/src/core/core.pro b/src/core/core.pro
index cedb564be..67ccdfada 100644
--- a/src/core/core.pro
+++ b/src/core/core.pro
@@ -295,7 +295,7 @@ RC_FILE = core.rc
 OTHER_FILES += core.dox math/math.dox
 DEFINES += QCADCORE_LIBRARY
 
-LIBS += -lopennurbs -lzlib
+LIBS += -lopennurbs -lz
 
 win32 {
     LIBS += -lRpcrt4 -lAdvapi32
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin