Received: by mail.netbsd.org (Postfix, from userid 605) id 801AB84ED1; Mon, 1 Jan 2024 19:01:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id ECB0C84E9B for ; Mon, 1 Jan 2024 19:01:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 6vWsP7ATPTmA for ; Mon, 1 Jan 2024 19:01:06 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.NetBSD.org [IPv6:2001:470:a085:999:28c:faff:fe03:5984]) by mail.netbsd.org (Postfix) with ESMTP id A492584D93 for ; Mon, 1 Jan 2024 19:01:06 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 9BBCEFA42; Mon, 1 Jan 2024 19:01:06 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1704135666260910" MIME-Version: 1.0 Date: Mon, 1 Jan 2024 19:01:06 +0000 From: "Iain Hibbert" Subject: CVS commit: pkgsrc/misc/zyGrib To: pkgsrc-changes@NetBSD.org Reply-To: plunky@netbsd.org X-Mailer: log_accum Message-Id: <20240101190106.9BBCEFA42@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1704135666260910 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: plunky Date: Mon Jan 1 19:01:06 UTC 2024 Modified Files: pkgsrc/misc/zyGrib: distinfo pkgsrc/misc/zyGrib/patches: patch-g2clib_enc_jpeg2000.c Added Files: pkgsrc/misc/zyGrib/patches: patch-g2clib_dec__jpeg2000.c Log Message: a grapics/jasper update made some internal function symbols not show up in the library. Fix the zyGrib build by using the public API To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 pkgsrc/misc/zyGrib/distinfo cvs rdiff -u -r0 -r1.1 \ pkgsrc/misc/zyGrib/patches/patch-g2clib_dec__jpeg2000.c cvs rdiff -u -r1.2 -r1.3 \ pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_1704135666260910 Content-Disposition: inline Content-Length: 4606 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/misc/zyGrib/distinfo diff -u pkgsrc/misc/zyGrib/distinfo:1.25 pkgsrc/misc/zyGrib/distinfo:1.26 --- pkgsrc/misc/zyGrib/distinfo:1.25 Tue Oct 26 10:59:39 2021 +++ pkgsrc/misc/zyGrib/distinfo Mon Jan 1 19:01:06 2024 @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.25 2021/10/26 10:59:39 nia Exp $ +$NetBSD: distinfo,v 1.26 2024/01/01 19:01:06 plunky Exp $ BLAKE2s (zyGrib-8.0.1.tgz) = d382684327d2fd8f2191bfee490be2f35ea98946980638d9e5316294a90e7229 SHA512 (zyGrib-8.0.1.tgz) = bb7146289d0966a174e0d888d6edc2830a2399f9cf51eb439371d90656fb9529fb08eebde8ea74f21f3c2aa7e625a258a318b9388523636815c8348269adb73d @@ -9,5 +9,6 @@ SHA1 (patch-SkewT.h) = 5318b576bb4eeeb0b SHA1 (patch-Terrain.cpp) = 98aba88e5704cdf0771c757d86d962ee043cecf4 SHA1 (patch-aa) = 1de327ef2cb5ea601ffbd6e5f3ba760dfe9543b0 SHA1 (patch-ab) = 1da0e837a68b7942ab8d4a829b92eef6b8e359e8 -SHA1 (patch-g2clib_enc_jpeg2000.c) = 2119373fe7a0032edb9b9ff31ff79c974c513ce3 +SHA1 (patch-g2clib_dec__jpeg2000.c) = 45de487f139a65414f1ca5adea4690008aa33884 +SHA1 (patch-g2clib_enc_jpeg2000.c) = ebd6c2cd706462c3ea21310fba269f19684f70c7 SHA1 (patch-util_Util.h) = a7ae101a11de7ca29e8e6e8ccf173c5216ea3ac7 Index: pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c diff -u pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c:1.2 pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c:1.3 --- pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c:1.2 Sat Jun 20 21:34:26 2020 +++ pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c Mon Jan 1 19:01:06 2024 @@ -1,10 +1,21 @@ -$NetBSD: patch-g2clib_enc_jpeg2000.c,v 1.2 2020/06/20 21:34:26 mef Exp $ +$NetBSD: patch-g2clib_enc_jpeg2000.c,v 1.3 2024/01/01 19:01:06 plunky Exp $ https://github.com/cloudruninc/wps/issues/5 ---- g2clib/enc_jpeg2000.c.orig 2019-10-28 18:40:41.262350843 +0100 -+++ g2clib/enc_jpeg2000.c 2019-10-28 18:40:52.446238823 +0100 -@@ -121,7 +121,6 @@ +jpc_encode() is an internal jasper function, use jas_image_encode() instead + +--- g2clib/enc_jpeg2000.c.orig 2016-11-09 16:27:38.000000000 +0000 ++++ g2clib/enc_jpeg2000.c +@@ -69,7 +69,7 @@ int enc_jpeg2000(unsigned char *cin,g2in + * + *$$$*/ + { +- int ier,rwcnt; ++ int ier,rwcnt,fmt; + jas_image_t image; + jas_stream_t *jpcstream,*istream; + jas_image_cmpt_t cmpt,*pcmpt; +@@ -121,7 +121,6 @@ int enc_jpeg2000(unsigned char *cin,g2in image.clrspc_=JAS_CLRSPC_SGRAY; /* grayscale Image */ image.cmprof_=0; #endif @@ -12,3 +23,28 @@ https://github.com/cloudruninc/wps/issue cmpt.tlx_=0; cmpt.tly_=0; +@@ -143,6 +142,12 @@ int enc_jpeg2000(unsigned char *cin,g2in + pcmpt=&cmpt; + image.cmpts_=&pcmpt; + ++ fmt = jas_image_strtofmt("jpc"); ++ if (fmt == -1) { ++ printf(" image format 'jpc' not found\n"); ++ return -3; ++ } ++ + // + // Open a JasPer stream containing the input grayscale values + // +@@ -158,9 +163,9 @@ int enc_jpeg2000(unsigned char *cin,g2in + // + // Encode image. + // +- ier=jpc_encode(&image,jpcstream,opts); ++ ier=jas_image_encode(&image,jpcstream,fmt,opts); + if ( ier != 0 ) { +- printf(" jpc_encode return = %d \n",ier); ++ printf(" jas_image_encode return = %d \n",ier); + return -3; + } + // Added files: Index: pkgsrc/misc/zyGrib/patches/patch-g2clib_dec__jpeg2000.c diff -u /dev/null pkgsrc/misc/zyGrib/patches/patch-g2clib_dec__jpeg2000.c:1.1 --- /dev/null Mon Jan 1 19:01:06 2024 +++ pkgsrc/misc/zyGrib/patches/patch-g2clib_dec__jpeg2000.c Mon Jan 1 19:01:06 2024 @@ -0,0 +1,40 @@ +$NetBSD: patch-g2clib_dec__jpeg2000.c,v 1.1 2024/01/01 19:01:06 plunky Exp $ + +jpc_decode() is an internal jasper function, use jas_image_decode() instead + +--- g2clib/dec_jpeg2000.c.orig 2016-11-09 16:27:38.000000000 +0000 ++++ g2clib/dec_jpeg2000.c +@@ -50,7 +50,7 @@ + *$$$*/ + + { +- int ier; ++ int ier,fmt; + g2int i,j,k; + jas_image_t *image=0; + jas_stream_t *jpcstream; +@@ -61,6 +61,12 @@ + // jas_init(); + + ier=0; ++ ++ fmt = jas_image_strtofmt("jpc"); ++ if (fmt == -1) { ++ printf(" image format 'jpc' unknown\n"); ++ return -3; ++ } + // + // Create jas_stream_t containing input JPEG200 codestream in memory. + // +@@ -70,9 +76,9 @@ + // + // Decode JPEG200 codestream into jas_image_t structure. + // +- image=jpc_decode(jpcstream,opts); ++ image=jas_image_decode(jpcstream,fmt,opts); + if ( image == 0 ) { +- printf(" jpc_decode return\n"); ++ printf(" jas_image_decode return\n"); + return -3; + } + --_----------=_1704135666260910--