mirror of
https://github.com/void-linux/void-packages.git
synced 2025-08-01 18:32:58 +02:00
licensechecker: fix 32-bit
This commit is contained in:
parent
bea9efdfbc
commit
97964b03e2
2 changed files with 28 additions and 1 deletions
27
srcpkgs/licensechecker/patches/fix-32-bit.patch
Normal file
27
srcpkgs/licensechecker/patches/fix-32-bit.patch
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
diff --git parsers/guesser.go parsers/guesser.go
|
||||||
|
index 1f55738..eeac0fa 100644
|
||||||
|
--- parsers/guesser.go
|
||||||
|
+++ parsers/guesser.go
|
||||||
|
@@ -299,7 +299,7 @@ func processFile(directory string, file string, rootLicenses []LicenseMatch) Fil
|
||||||
|
Md5Hash: getMd5Hash(content),
|
||||||
|
Sha1Hash: getSha1Hash(content),
|
||||||
|
Sha256Hash: getSha256Hash(content),
|
||||||
|
- BytesHuman: bytesToHuman(len(content)),
|
||||||
|
+ BytesHuman: bytesToHuman(int64(len(content))),
|
||||||
|
Bytes: len(content)}
|
||||||
|
|
||||||
|
return fileResult
|
||||||
|
diff --git parsers/helpers.go parsers/helpers.go
|
||||||
|
--- parsers/helpers.go
|
||||||
|
+++ parsers/helpers.go
|
||||||
|
@@ -80,9 +80,9 @@ func licenceListHasLicense(license LicenseMatch, licenseList []LicenseMatch) boo
|
||||||
|
// Apache-2.0 is compatible with GPL-3.0-only
|
||||||
|
// See https://apache.org/licenses/GPL-compatibility.html
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
-func bytesToHuman(bytes int) string {
|
||||||
|
+func bytesToHuman(bytes int64) string {
|
||||||
|
|
||||||
|
const TERABYTE = 1099511627776
|
||||||
|
const GIGABYTE = 1073741824
|
||||||
|
const MEGABYTE = 1048576
|
||||||
|
const KILOBYTE = 1024
|
|
@ -4,7 +4,7 @@ version=1.1.1
|
||||||
revision=1
|
revision=1
|
||||||
wrksrc="lc-${version}"
|
wrksrc="lc-${version}"
|
||||||
build_style=go
|
build_style=go
|
||||||
go_import_path="https://github.com/boyter/lc"
|
go_import_path="github.com/boyter/lc"
|
||||||
hostmakedepends="git"
|
hostmakedepends="git"
|
||||||
short_desc="Identify software licenses used on a source tree"
|
short_desc="Identify software licenses used on a source tree"
|
||||||
maintainer="Michael Gehring <mg@ebfe.org>"
|
maintainer="Michael Gehring <mg@ebfe.org>"
|
||||||
|
|
Loading…
Add table
Reference in a new issue