Mon Jan 1 19:01:06 2024 UTC (147d)
a grapics/jasper update made some internal function symbols not
show up in the library. Fix the zyGrib build by using the public API


(plunky)
diff -r1.25 -r1.26 pkgsrc/misc/zyGrib/distinfo
diff -r0 -r1.1 pkgsrc/misc/zyGrib/patches/patch-g2clib_dec__jpeg2000.c
diff -r1.2 -r1.3 pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c

cvs diff -r1.25 -r1.26 pkgsrc/misc/zyGrib/distinfo (expand / switch to unified diff)

--- pkgsrc/misc/zyGrib/distinfo 2021/10/26 10:59:39 1.25
+++ pkgsrc/misc/zyGrib/distinfo 2024/01/01 19:01:06 1.26
@@ -1,13 +1,14 @@ @@ -1,13 +1,14 @@
1$NetBSD: distinfo,v 1.25 2021/10/26 10:59:39 nia Exp $ 1$NetBSD: distinfo,v 1.26 2024/01/01 19:01:06 plunky Exp $
2 2
3BLAKE2s (zyGrib-8.0.1.tgz) = d382684327d2fd8f2191bfee490be2f35ea98946980638d9e5316294a90e7229 3BLAKE2s (zyGrib-8.0.1.tgz) = d382684327d2fd8f2191bfee490be2f35ea98946980638d9e5316294a90e7229
4SHA512 (zyGrib-8.0.1.tgz) = bb7146289d0966a174e0d888d6edc2830a2399f9cf51eb439371d90656fb9529fb08eebde8ea74f21f3c2aa7e625a258a318b9388523636815c8348269adb73d 4SHA512 (zyGrib-8.0.1.tgz) = bb7146289d0966a174e0d888d6edc2830a2399f9cf51eb439371d90656fb9529fb08eebde8ea74f21f3c2aa7e625a258a318b9388523636815c8348269adb73d
5Size (zyGrib-8.0.1.tgz) = 19759812 bytes 5Size (zyGrib-8.0.1.tgz) = 19759812 bytes
6SHA1 (patch-ColorScale.cpp) = 26255acc30d81aba2abd7f51ef96677446645c78 6SHA1 (patch-ColorScale.cpp) = 26255acc30d81aba2abd7f51ef96677446645c78
7SHA1 (patch-IacPlot.h) = 7435270f2fa9ae967a2449229407c3ab05a3ac25 7SHA1 (patch-IacPlot.h) = 7435270f2fa9ae967a2449229407c3ab05a3ac25
8SHA1 (patch-SkewT.h) = 5318b576bb4eeeb0b0a8bf0130cf9ac9907dac7f 8SHA1 (patch-SkewT.h) = 5318b576bb4eeeb0b0a8bf0130cf9ac9907dac7f
9SHA1 (patch-Terrain.cpp) = 98aba88e5704cdf0771c757d86d962ee043cecf4 9SHA1 (patch-Terrain.cpp) = 98aba88e5704cdf0771c757d86d962ee043cecf4
10SHA1 (patch-aa) = 1de327ef2cb5ea601ffbd6e5f3ba760dfe9543b0 10SHA1 (patch-aa) = 1de327ef2cb5ea601ffbd6e5f3ba760dfe9543b0
11SHA1 (patch-ab) = 1da0e837a68b7942ab8d4a829b92eef6b8e359e8 11SHA1 (patch-ab) = 1da0e837a68b7942ab8d4a829b92eef6b8e359e8
12SHA1 (patch-g2clib_enc_jpeg2000.c) = 2119373fe7a0032edb9b9ff31ff79c974c513ce3 12SHA1 (patch-g2clib_dec__jpeg2000.c) = 45de487f139a65414f1ca5adea4690008aa33884
 13SHA1 (patch-g2clib_enc_jpeg2000.c) = ebd6c2cd706462c3ea21310fba269f19684f70c7
13SHA1 (patch-util_Util.h) = a7ae101a11de7ca29e8e6e8ccf173c5216ea3ac7 14SHA1 (patch-util_Util.h) = a7ae101a11de7ca29e8e6e8ccf173c5216ea3ac7

File Added: pkgsrc/misc/zyGrib/patches/patch-g2clib_dec__jpeg2000.c
$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;
     }
     

cvs diff -r1.2 -r1.3 pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c (expand / switch to unified diff)

--- pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c 2020/06/20 21:34:26 1.2
+++ pkgsrc/misc/zyGrib/patches/patch-g2clib_enc_jpeg2000.c 2024/01/01 19:01:06 1.3
@@ -1,14 +1,50 @@ @@ -1,14 +1,50 @@
1$NetBSD: patch-g2clib_enc_jpeg2000.c,v 1.2 2020/06/20 21:34:26 mef Exp $ 1$NetBSD: patch-g2clib_enc_jpeg2000.c,v 1.3 2024/01/01 19:01:06 plunky Exp $
2 2
3https://github.com/cloudruninc/wps/issues/5 3https://github.com/cloudruninc/wps/issues/5
4 4
5--- g2clib/enc_jpeg2000.c.orig 2019-10-28 18:40:41.262350843 +0100 5jpc_encode() is an internal jasper function, use jas_image_encode() instead
6+++ g2clib/enc_jpeg2000.c 2019-10-28 18:40:52.446238823 +0100 6
7@@ -121,7 +121,6 @@ 7--- g2clib/enc_jpeg2000.c.orig 2016-11-09 16:27:38.000000000 +0000
 8+++ g2clib/enc_jpeg2000.c
 9@@ -69,7 +69,7 @@ int enc_jpeg2000(unsigned char *cin,g2in
 10 *
 11 *$$$*/
 12 {
 13- int ier,rwcnt;
 14+ int ier,rwcnt,fmt;
 15 jas_image_t image;
 16 jas_stream_t *jpcstream,*istream;
 17 jas_image_cmpt_t cmpt,*pcmpt;
 18@@ -121,7 +121,6 @@ int enc_jpeg2000(unsigned char *cin,g2in
8 image.clrspc_=JAS_CLRSPC_SGRAY; /* grayscale Image */ 19 image.clrspc_=JAS_CLRSPC_SGRAY; /* grayscale Image */
9 image.cmprof_=0;  20 image.cmprof_=0;
10 #endif 21 #endif
11- image.inmem_=1; 22- image.inmem_=1;
12  23
13 cmpt.tlx_=0; 24 cmpt.tlx_=0;
14 cmpt.tly_=0; 25 cmpt.tly_=0;
 26@@ -143,6 +142,12 @@ int enc_jpeg2000(unsigned char *cin,g2in
 27 pcmpt=&cmpt;
 28 image.cmpts_=&pcmpt;
 29
 30+ fmt = jas_image_strtofmt("jpc");
 31+ if (fmt == -1) {
 32+ printf(" image format 'jpc' not found\n");
 33+ return -3;
 34+ }
 35+
 36 //
 37 // Open a JasPer stream containing the input grayscale values
 38 //
 39@@ -158,9 +163,9 @@ int enc_jpeg2000(unsigned char *cin,g2in
 40 //
 41 // Encode image.
 42 //
 43- ier=jpc_encode(&image,jpcstream,opts);
 44+ ier=jas_image_encode(&image,jpcstream,fmt,opts);
 45 if ( ier != 0 ) {
 46- printf(" jpc_encode return = %d \n",ier);
 47+ printf(" jas_image_encode return = %d \n",ier);
 48 return -3;
 49 }
 50 //