pkgsrc-Changes archive

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

CVS commit: pkgsrc/security/yara



Module Name:    pkgsrc
Committed By:   adam
Date:           Tue Jun 25 05:55:31 UTC 2024

Modified Files:
        pkgsrc/security/yara: distinfo
Added Files:
        pkgsrc/security/yara/patches:
            patch-libyara_modules_pe_authenticode-parser_helper.c
            patch-libyara_modules_pe_authenticode-parser_helper.h

Log Message:
yara: fix build on NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 pkgsrc/security/yara/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.c \
    pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.h

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

Modified files:

Index: pkgsrc/security/yara/distinfo
diff -u pkgsrc/security/yara/distinfo:1.20 pkgsrc/security/yara/distinfo:1.21
--- pkgsrc/security/yara/distinfo:1.20  Tue Jun 11 10:29:51 2024
+++ pkgsrc/security/yara/distinfo       Tue Jun 25 05:55:31 2024
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.20 2024/06/11 10:29:51 adam Exp $
+$NetBSD: distinfo,v 1.21 2024/06/25 05:55:31 adam Exp $
 
 BLAKE2s (yara-4.5.1.tar.gz) = b7c4ddc7bee7d61d5e3235aa3b7c7fb952fff46899b8aba2f9bd879f795c3100
 SHA512 (yara-4.5.1.tar.gz) = 8bf1df7089f9bc5a448dbae0999e04f4ecdec06b4478e2cb5f42a2a3201b99fce68379e3f8f7c67a9db201205366250d7befe5c38451cced807ed692d436422c
 Size (yara-4.5.1.tar.gz) = 2207552 bytes
 SHA1 (patch-configure.ac) = 4451fd7843ef57054f22a7144f93bc7f388daea5
+SHA1 (patch-libyara_modules_pe_authenticode-parser_helper.c) = 3b3746a353cd465fbd5cec712f6957170c6b98ee
+SHA1 (patch-libyara_modules_pe_authenticode-parser_helper.h) = af6741fa0e1ced2109cfa7e8ede8f6b264a8e850

Added files:

Index: pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.c
diff -u /dev/null pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.c:1.1
--- /dev/null   Tue Jun 25 05:55:31 2024
+++ pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.c  Tue Jun 25 05:55:31 2024
@@ -0,0 +1,22 @@
+$NetBSD: patch-libyara_modules_pe_authenticode-parser_helper.c,v 1.1 2024/06/25 05:55:31 adam Exp $
+
+NetBSD already has bswap16/32.
+
+--- libyara/modules/pe/authenticode-parser/helper.c.orig       2024-06-25 05:52:44.286197248 +0000
++++ libyara/modules/pe/authenticode-parser/helper.c
+@@ -28,6 +28,7 @@ SOFTWARE.
+ #include <stdlib.h>
+ #include <string.h>
+ 
++#if !defined(__NetBSD__)
+ uint16_t bswap16(uint16_t d)
+ {
+     return (d << 8) | (d >> 8);
+@@ -38,6 +39,7 @@ uint32_t bswap32(uint32_t d)
+     return (((d)&0xff000000) >> 24) | (((d)&0x00ff0000) >> 8) | (((d)&0x0000ff00) << 8) |
+            (((d)&0x000000ff) << 24);
+ }
++#endif
+ 
+ int calculate_digest(const EVP_MD* md, const uint8_t* data, size_t len, uint8_t* digest)
+ {
Index: pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.h
diff -u /dev/null pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.h:1.1
--- /dev/null   Tue Jun 25 05:55:31 2024
+++ pkgsrc/security/yara/patches/patch-libyara_modules_pe_authenticode-parser_helper.h  Tue Jun 25 05:55:31 2024
@@ -0,0 +1,19 @@
+$NetBSD: patch-libyara_modules_pe_authenticode-parser_helper.h,v 1.1 2024/06/25 05:55:31 adam Exp $
+
+NetBSD already has bswap16/32.
+
+--- libyara/modules/pe/authenticode-parser/helper.h.orig       2024-06-25 05:25:44.694385833 +0000
++++ libyara/modules/pe/authenticode-parser/helper.h
+@@ -38,8 +38,12 @@ extern "C" {
+ #endif
+ 
+ /* Endianity related functions for PE reading */
++#if defined(__NetBSD__)
++#include <sys/endian.h>
++#else
+ uint16_t bswap16(uint16_t d);
+ uint32_t bswap32(uint32_t d);
++#endif
+ 
+ #if defined(WORDS_BIGENDIAN)
+ #define letoh16(x) bswap16(x)



Home | Main Index | Thread Index | Old Index