pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/archivers/bzip3



Module Name:    pkgsrc
Committed By:   nros
Date:           Wed Jan  3 08:16:37 UTC 2024

Modified Files:
        pkgsrc/archivers/bzip3: distinfo
        pkgsrc/archivers/bzip3/patches: patch-include_common.h
Added Files:
        pkgsrc/archivers/bzip3/patches: patch-include_libsais.h

Log Message:
bzip3: avoid redefinition of bswap16 on NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/archivers/bzip3/distinfo
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/archivers/bzip3/patches/patch-include_common.h
cvs rdiff -u -r0 -r1.1 pkgsrc/archivers/bzip3/patches/patch-include_libsais.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/archivers/bzip3/distinfo
diff -u pkgsrc/archivers/bzip3/distinfo:1.2 pkgsrc/archivers/bzip3/distinfo:1.3
--- pkgsrc/archivers/bzip3/distinfo:1.2 Sat Dec 16 11:40:53 2023
+++ pkgsrc/archivers/bzip3/distinfo     Wed Jan  3 08:16:36 2024
@@ -1,6 +1,7 @@
-$NetBSD: distinfo,v 1.2 2023/12/16 11:40:53 nros Exp $
+$NetBSD: distinfo,v 1.3 2024/01/03 08:16:36 nros Exp $
 
 BLAKE2s (bzip3-1.3.2.tar.xz) = fe40f2a6908a4157678ad048a5e9a9c9744cf63209166d6d3c003f82833d4aeb
 SHA512 (bzip3-1.3.2.tar.xz) = 76521377adfe737b30e77f5c3241c1c12214165492fba5acbc5ba09c8e7b91396b772f9fec936d6603413c3ef179a13597b13509df99bd8a2d56cbf14a70a84f
 Size (bzip3-1.3.2.tar.xz) = 277768 bytes
-SHA1 (patch-include_common.h) = 85fb4952cdedbd5180607810950764dd90bab48b
+SHA1 (patch-include_common.h) = 2040d8bf4b72cf4818b9916a8203401931f7b54b
+SHA1 (patch-include_libsais.h) = 6150076839740e8542141d33b133d2a72c63dcca

Index: pkgsrc/archivers/bzip3/patches/patch-include_common.h
diff -u pkgsrc/archivers/bzip3/patches/patch-include_common.h:1.1 pkgsrc/archivers/bzip3/patches/patch-include_common.h:1.2
--- pkgsrc/archivers/bzip3/patches/patch-include_common.h:1.1   Sat Dec 16 11:40:53 2023
+++ pkgsrc/archivers/bzip3/patches/patch-include_common.h       Wed Jan  3 08:16:36 2024
@@ -1,10 +1,12 @@
-$NetBSD: patch-include_common.h,v 1.1 2023/12/16 11:40:53 nros Exp $
+$NetBSD: patch-include_common.h,v 1.2 2024/01/03 08:16:36 nros Exp $
 
 * _*_ENDIAN is defined to nothing on solaris-like systems leading to preprocessor errors
   when == try to compare to nothing. Use if _*_ENDIAN are defined as set in sys/isa_defs.h
   on solaris-like systems to check for endianess instead of _BYTE_ORDER.
 
---- include/common.h.orig      2023-12-16 12:17:00.391225325 +0000
+* Avoid redefinition of bswap16 on NetBSD
+
+--- include/common.h.orig      2023-08-06 08:22:20.000000000 +0000
 +++ include/common.h
 @@ -93,6 +93,7 @@ static void write_neutral_s32(u8 * data,
      #error Your compiler, configuration or platform is not supported.
@@ -14,7 +16,7 @@ $NetBSD: patch-include_common.h,v 1.1 20
  #if !defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
      #if defined(_LITTLE_ENDIAN) || (defined(BYTE_ORDER) && defined(LITTLE_ENDIAN) && BYTE_ORDER == LITTLE_ENDIAN) || \
          (defined(_BYTE_ORDER) && defined(_LITTLE_ENDIAN) && _BYTE_ORDER == _LITTLE_ENDIAN) ||                        \
-@@ -108,6 +109,14 @@ static void write_neutral_s32(u8 * data,
+@@ -108,17 +109,25 @@ static void write_neutral_s32(u8 * data,
          #define __LITTLE_ENDIAN__
      #endif
  #endif
@@ -29,3 +31,18 @@ $NetBSD: patch-include_common.h,v 1.1 20
  
  #if defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
      #if defined(HAS_BUILTIN_BSWAP16)
+-        #define bswap16(x) (__builtin_bswap16(x))
++        #define bzip3_beton16(x) (__builtin_bswap16(x))
+     #elif defined(_MSC_VER) && !defined(__INTEL_COMPILER)
+-        #define bswap16(x) (_byteswap_ushort(x))
++        #define bzip3_beton16(x) (_byteswap_ushort(x))
+     #else
+-        #define bswap16(x) ((u16)(x >> 8) | (u16)(x << 8))
++        #define bzip3_beton16(x) ((u16)(x >> 8) | (u16)(x << 8))
+     #endif
+ #elif !defined(__LITTLE_ENDIAN__) && defined(__BIG_ENDIAN__)
+-    #define bswap16(x) (x)
++    #define bzip3_beton16(x) (x)
+ #else
+     #error Your compiler, configuration or platform is not supported.
+ #endif

Added files:

Index: pkgsrc/archivers/bzip3/patches/patch-include_libsais.h
diff -u /dev/null pkgsrc/archivers/bzip3/patches/patch-include_libsais.h:1.1
--- /dev/null   Wed Jan  3 08:16:37 2024
+++ pkgsrc/archivers/bzip3/patches/patch-include_libsais.h      Wed Jan  3 08:16:36 2024
@@ -0,0 +1,330 @@
+$NetBSD: patch-include_libsais.h,v 1.1 2024/01/03 08:16:36 nros Exp $
+
+* Avoid redefinition of bswap16 on NetBSD
+
+--- include/libsais.h.orig     2024-01-03 08:05:47.672459407 +0000
++++ include/libsais.h
+@@ -4629,7 +4629,7 @@ static void libsais_unbwt_decode_1(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+     }
+ 
+     *i0 = p0;
+@@ -4651,7 +4651,7 @@ static void libsais_unbwt_decode_2(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4659,7 +4659,7 @@ static void libsais_unbwt_decode_2(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+     }
+ 
+     *i0 = p0;
+@@ -4683,7 +4683,7 @@ static void libsais_unbwt_decode_3(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4691,7 +4691,7 @@ static void libsais_unbwt_decode_3(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4699,7 +4699,7 @@ static void libsais_unbwt_decode_3(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = bzip3_beton16(c2);
+     }
+ 
+     *i0 = p0;
+@@ -4725,7 +4725,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4733,7 +4733,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4741,7 +4741,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = bzip3_beton16(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4749,7 +4749,7 @@ static void libsais_unbwt_decode_4(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = bzip3_beton16(c3);
+     }
+ 
+     *i0 = p0;
+@@ -4778,7 +4778,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4786,7 +4786,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4794,7 +4794,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = bzip3_beton16(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4802,7 +4802,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = bzip3_beton16(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -4810,7 +4810,7 @@ static void libsais_unbwt_decode_5(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = bzip3_beton16(c4);
+     }
+ 
+     *i0 = p0;
+@@ -4841,7 +4841,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4849,7 +4849,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4857,7 +4857,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = bzip3_beton16(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4865,7 +4865,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = bzip3_beton16(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -4873,7 +4873,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = bzip3_beton16(c4);
+         u16 c5 = fastbits[p5 >> shift];
+         if (bucket2[c5] <= p5) {
+             do {
+@@ -4881,7 +4881,7 @@ static void libsais_unbwt_decode_6(u8 * 
+             } while (bucket2[c5] <= p5);
+         }
+         p5 = P[p5];
+-        U5[i] = bswap16(c5);
++        U5[i] = bzip3_beton16(c5);
+     }
+ 
+     *i0 = p0;
+@@ -4914,7 +4914,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -4922,7 +4922,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -4930,7 +4930,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = bzip3_beton16(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -4938,7 +4938,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = bzip3_beton16(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -4946,7 +4946,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = bzip3_beton16(c4);
+         u16 c5 = fastbits[p5 >> shift];
+         if (bucket2[c5] <= p5) {
+             do {
+@@ -4954,7 +4954,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c5] <= p5);
+         }
+         p5 = P[p5];
+-        U5[i] = bswap16(c5);
++        U5[i] = bzip3_beton16(c5);
+         u16 c6 = fastbits[p6 >> shift];
+         if (bucket2[c6] <= p6) {
+             do {
+@@ -4962,7 +4962,7 @@ static void libsais_unbwt_decode_7(u8 * 
+             } while (bucket2[c6] <= p6);
+         }
+         p6 = P[p6];
+-        U6[i] = bswap16(c6);
++        U6[i] = bzip3_beton16(c6);
+     }
+ 
+     *i0 = p0;
+@@ -4997,7 +4997,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c0] <= p0);
+         }
+         p0 = P[p0];
+-        U0[i] = bswap16(c0);
++        U0[i] = bzip3_beton16(c0);
+         u16 c1 = fastbits[p1 >> shift];
+         if (bucket2[c1] <= p1) {
+             do {
+@@ -5005,7 +5005,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c1] <= p1);
+         }
+         p1 = P[p1];
+-        U1[i] = bswap16(c1);
++        U1[i] = bzip3_beton16(c1);
+         u16 c2 = fastbits[p2 >> shift];
+         if (bucket2[c2] <= p2) {
+             do {
+@@ -5013,7 +5013,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c2] <= p2);
+         }
+         p2 = P[p2];
+-        U2[i] = bswap16(c2);
++        U2[i] = bzip3_beton16(c2);
+         u16 c3 = fastbits[p3 >> shift];
+         if (bucket2[c3] <= p3) {
+             do {
+@@ -5021,7 +5021,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c3] <= p3);
+         }
+         p3 = P[p3];
+-        U3[i] = bswap16(c3);
++        U3[i] = bzip3_beton16(c3);
+         u16 c4 = fastbits[p4 >> shift];
+         if (bucket2[c4] <= p4) {
+             do {
+@@ -5029,7 +5029,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c4] <= p4);
+         }
+         p4 = P[p4];
+-        U4[i] = bswap16(c4);
++        U4[i] = bzip3_beton16(c4);
+         u16 c5 = fastbits[p5 >> shift];
+         if (bucket2[c5] <= p5) {
+             do {
+@@ -5037,7 +5037,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c5] <= p5);
+         }
+         p5 = P[p5];
+-        U5[i] = bswap16(c5);
++        U5[i] = bzip3_beton16(c5);
+         u16 c6 = fastbits[p6 >> shift];
+         if (bucket2[c6] <= p6) {
+             do {
+@@ -5045,7 +5045,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c6] <= p6);
+         }
+         p6 = P[p6];
+-        U6[i] = bswap16(c6);
++        U6[i] = bzip3_beton16(c6);
+         u16 c7 = fastbits[p7 >> shift];
+         if (bucket2[c7] <= p7) {
+             do {
+@@ -5053,7 +5053,7 @@ static void libsais_unbwt_decode_8(u8 * 
+             } while (bucket2[c7] <= p7);
+         }
+         p7 = P[p7];
+-        U7[i] = bswap16(c7);
++        U7[i] = bzip3_beton16(c7);
+     }
+ 
+     *i0 = p0;



Home | Main Index | Thread Index | Old Index