Friday, July 02, 2021

Re: textproc/swish-e: fix upcoming build failure

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
+

No comments:

Post a Comment