On 2021/07/02 16:46, Theo Buehler wrote:
> zlib 1.2.9 added an uncompress2 function that clashes with swish's
> internal compress2 function. The build is fixed by the following
> mechanical diff that renames the internal function to swish_uncompress2
> as was done in alpine:
> 
> https://git.alpinelinux.org/aports/tree/main/swish-e/zlib-shadowing.patch?h=3.14-stable
> 
> I couldn't come up with a preprocessor trick that would allow avoiding
> the bulk rename, but hopefully there's something cleverer that would
> avoid a big diff.
> 
> HOMEPAGE is broken, so I removed it.

here's the trick :) the actual symbol in libz is z_uncompress2, we can
just get rid of the macro then there's no more conflict.

I mirrored the distfile too.

Index: Makefile
===================================================================
RCS file: /cvs/ports/textproc/swish-e/Makefile,v
retrieving revision 1.14
diff -u -p -r1.14 Makefile
--- Makefile    12 Jul 2019 20:50:15 -0000      1.14
+++ Makefile    2 Jul 2021 15:45:45 -0000
@@ -3,12 +3,11 @@
 COMMENT =              web/text search engine
 
 DISTNAME =             swish-e-2.4.7
-REVISION =             4
+REVISION =             5
 SHARED_LIBS =          swish-e 2.1
 CATEGORIES =           textproc www
 
-HOMEPAGE =             http://swish-e.org/
-MASTER_SITES =         ${HOMEPAGE}distribution/
+MASTER_SITES =         https://spacehopper.org/mirrors/
 
 # GPLv2
 PERMIT_PACKAGE =       Yes
Index: patches/patch-src_compress_c
===================================================================
RCS file: /cvs/ports/textproc/swish-e/patches/patch-src_compress_c,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_compress_c
--- patches/patch-src_compress_c        2 Dec 2014 11:59:42 -0000       1.1
+++ patches/patch-src_compress_c        2 Jul 2021 15:45:45 -0000
@@ -1,7 +1,17 @@
 $OpenBSD: patch-src_compress_c,v 1.1 2014/12/02 11:59:42 naddy Exp $
---- src/compress.c.orig        Sun Apr  5 03:58:32 2009
-+++ src/compress.c     Tue Dec  2 05:06:54 2014
-@@ -995,7 +995,7 @@ void    remove_worddata_longs(unsigned char *worddata,
+
+Index: src/compress.c
+--- src/compress.c.orig
++++ src/compress.c
+@@ -53,6 +53,7 @@ $Id: compress.c 1945 2007-10-22 14:54:07Z karpet $
+ #ifdef HAVE_ZLIB
+ #include <zlib.h>
+ #define Z_BUFSIZE 16384
++#undef compress2
+ #endif
+ 
+ /* Surfing the web I found this:
+@@ -995,7 +996,7 @@ void    remove_worddata_longs(unsigned char *worddata,
              progerr("Internal error in remove_worddata_longs");
  
          /* dst may be smaller than src. So move the data */
Index: patches/patch-src_docprop_write_c
===================================================================
RCS file: patches/patch-src_docprop_write_c
diff -N patches/patch-src_docprop_write_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_docprop_write_c   2 Jul 2021 15:45:45 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: src/docprop_write.c
+--- src/docprop_write.c.orig
++++ src/docprop_write.c
+@@ -38,6 +38,7 @@
+ #include "db.h"
+ #ifdef HAVE_ZLIB
+ #include <zlib.h>
++#undef compress2
+ #endif
+ 
+ 
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/textproc/swish-e/pkg/PLIST,v
retrieving revision 1.3
diff -u -p -r1.3 PLIST
--- pkg/PLIST   16 Mar 2015 18:07:57 -0000      1.3
+++ pkg/PLIST   2 Jul 2021 15:45:45 -0000
@@ -3,7 +3,7 @@ bin/swish-config
 @bin bin/swish-e
 bin/swish-filter-test
 include/swish-e.h
-lib/libswish-e.a
+@static-lib lib/libswish-e.a
 lib/libswish-e.la
 @lib lib/libswish-e.so.${LIBswish-e_VERSION}
 lib/pkgconfig/swish-e.pc

Reply via email to