Ravenports generated: 08 Feb 2023 00:14
[ravenports.git] / bucket_89 / rhash
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               rhash
4 VERSION=                1.4.3
5 KEYWORDS=               security
6 VARIANTS=               standard ssl
7 SDESC[ssl]=             File digest utility with ssl runtime loading
8 SDESC[standard]=        File digest library and utility
9 HOMEPAGE=               https://github.com/rhash/RHash
10 CONTACT=                nobody
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            GITHUB/rhash:RHash:v1.4.3
14 DISTFILE[1]=            generated:main
15 DF_INDEX=               1
16 SPKGS[ssl]=             single
17 SPKGS[standard]=        single
18
19 OPTIONS_AVAILABLE=      SSL
20 OPTIONS_STANDARD=       none
21 VOPTS[ssl]=             SSL=ON
22
23 USES=                   cpe gettext
24
25 DISTNAME=               RHash-1.4.3
26
27 LICENSE=                MIT:single
28 LICENSE_FILE=           MIT:{{WRKSRC}}/COPYING
29 LICENSE_SCHEME=         solo
30
31 CPE_VENDOR=             rhash_project
32 FPC_EQUIVALENT=         security/rhash
33
34 MUST_CONFIGURE=         yes
35 CONFIGURE_ARGS=         --prefix="{{PREFIX}}"
36                         --enable-lib-shared
37                         --enable-lib-static
38                         --extra-cflags="{{CPPFLAGS}}"
39                         --extra-ldflags="{{LDFLAGS}}"
40                         --mandir="{{MANPREFIX}}/man"
41
42 BUILD_TARGET=           build-shared
43 MAKE_ARGS=              INSTALL_PROGRAM="{{INSTALL_PROGRAM}}"
44                         INSTALL_SHARED="{{INSTALL_PROGRAM}}"
45
46 INSTALL_TARGET=         install install-pkg-config
47 INSTALL_REQ_TOOLCHAIN=  yes
48
49 [SSL].DESCRIPTION=                      Use OpenSSL's MD5, SHA1 and SHA2 algorithms
50 [SSL].CONFIGURE_ARGS_OFF=               --disable-openssl
51 [SSL].CONFIGURE_ARGS_ON=                --enable-openssl-runtime
52 [SSL].USES_ON=                          ssl:openssl
53
54 post-patch:
55         ${REINPLACE_CMD} -e 's,/etc/,${PREFIX}&,' ${WRKSRC}/parse_cmdline.c
56         ${REINPLACE_CMD} -e '/BYTE_ORDER/s,__,_,g' \
57                 ${WRKSRC}/librhash/byte_order.h
58         # remove windows-only function that sun linker squawks on
59         # because its scraped into a symbol map while undefined
60         ${REINPLACE_CMD} -e '/rhash_wfile/d' ${WRKSRC}/librhash/rhash.h
61
62 post-install:
63 .if "${.MAKE.OS.NAME}" == "Darwin"
64         ${LN} -s librhash.0.dylib ${STAGEDIR}${PREFIX}/lib/librhash.dylib
65 .else
66         ${LN} -s librhash.so.0 ${STAGEDIR}${PREFIX}/lib/librhash.so
67 .endif
68         ${MV} ${STAGEDIR}${PREFIX}/etc/rhashrc \
69               ${STAGEDIR}${PREFIX}/etc/rhashrc.sample
70
71 [FILE:606:descriptions/desc.single]
72 RHash is a console utility and library for computing and verifying hash sums
73 of files.  It supports CRC32, MD4, MD5, SHA1, SHA256, SHA512, SHA3, Tiger,
74 TTH, Torrent BTIH, AICH, ED2K, GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R
75 256/512, Whirlpool, and Snefru-128/256 hash sums.  Its features are:
76
77   * Can calculate Magnet links
78   * Output in a predefined (SFV, BSD-like) or a user-defined format
79   * Ability to process directories recursively
80   * Updating existing hash-files (adding hash sums of files missing in a
81     hash-file)
82   * Portable, written in pure C, small in size, open source (MIT license)
83
84
85 [FILE:103:distinfo]
86 1e40fa66966306920f043866cbe8612f4b939b033ba5e2708c3f41be257c8a3e       429290 rhash-RHash-1.4.3.tar.gz
87
88
89 [FILE:526:manifests/plist.single]
90 @sample etc/rhashrc.sample
91 bin/
92  ed2k-link
93  edonr256-hash
94  edonr512-hash
95  gost12-256-hash
96  gost12-512-hash
97  has160-hash
98  magnet-link
99  rhash
100  sfv-hash
101  tiger-hash
102  tth-hash
103  whirlpool-hash
104 include/
105  rhash.h
106  rhash_torrent.h
107 lib/
108  librhash.a
109  librhash.so
110  librhash.so.0
111 lib/pkgconfig/librhash.pc
112 share/man/man1/
113  ed2k-link.1.gz
114  edonr256-hash.1.gz
115  edonr512-hash.1.gz
116  gost12-256-hash.1.gz
117  gost12-512-hash.1.gz
118  has160-hash.1.gz
119  magnet-link.1.gz
120  rhash.1.gz
121  sfv-hash.1.gz
122  tiger-hash.1.gz
123  tth-hash.1.gz
124  whirlpool-hash.1.gz
125
126
127 [FILE:800:patches/patch-configure]
128 $NetBSD: patch-configure,v 1.1 2020/08/24 12:58:52 schmonz Exp $
129
130 Avoid choosing aligned_alloc() when it's not present, such as CentOS 6
131 with lang/gcc7.
132
133 --- configure.orig      2022-06-14 20:25:13 UTC
134 +++ configure
135 @@ -659,6 +659,16 @@ elif test "$OPT_OPENSSL" = "auto" || tes
136    finish_check "$ALLOW_RUNTIME_LINKING"
137  fi
138  
139 +start_check "libc provides aligned_alloc"
140 +HAS_STDC_ALIGNED_ALLOC=no
141 +if cc_check_statement "stdlib.h" 'aligned_alloc(256, 1024);' "-Werror -Wno-unused-result"; then
142 +  HAS_STDC_ALIGNED_ALLOC=yes
143 +fi
144 +if test "$HAS_STDC_ALIGNED_ALLOC" = "no"; then
145 +  BUILD_EXTRA_CFLAGS=$(join_params $BUILD_EXTRA_CFLAGS -DNOPE_DOES_NOT_HAS_STDC_ALIGNED_ALLOC)
146 +fi
147 +finish_check "$HAS_STDC_ALIGNED_ALLOC"
148 +
149  SHARED_VSCRIPT=
150  if ! darwin; then
151    start_check "linker support for --version-script"
152
153
154 [FILE:430:patches/patch-librhash_byte__order.h]
155 --- librhash/byte_order.h.orig  2022-06-14 20:25:13 UTC
156 +++ librhash/byte_order.h
157 @@ -18,6 +18,13 @@
158  extern "C" {
159  #endif
160  
161 +#ifdef __sun__
162 +#undef  _LITTLE_ENDIAN
163 +#define _LITTLE_ENDIAN 1234
164 +#define _BIG_ENDIAN    4321
165 +#define _BYTE_ORDER    _LITTLE_ENDIAN
166 +#endif
167 +
168  /* if x86 compatible cpu */
169  #if defined(i386) || defined(__i386__) || defined(__i486__) || \
170         defined(__i586__) || defined(__i686__) || defined(__pentium__) || \
171
172
173 [FILE:530:patches/patch-librhash_util.h]
174 NetBSD: Avoid choosing aligned_alloc() when it's not present, such as CentOS 6
175         with lang/gcc7.
176
177 --- librhash/util.h.orig        2022-06-14 20:25:13 UTC
178 +++ librhash/util.h
179 @@ -42,6 +42,7 @@ extern "C" {
180  # define rhash_aligned_free(ptr) _aligned_free(ptr)
181  
182  #elif !defined(NO_STDC_ALIGNED_ALLOC) && (__STDC_VERSION__ >= 201112L || defined(_ISOC11_SOURCE)) \
183 +       && !defined(NOPE_DOES_NOT_HAS_STDC_ALIGNED_ALLOC) \
184         && !defined(__APPLE__) && (!defined(__ANDROID_API__) || __ANDROID_API__ >= 28)
185  
186  # define HAS_STDC_ALIGNED_ALLOC
187