[ITP] xxhash 0.7.4-1

Marco Atzeri marco.atzeri@gmail.com
Mon Aug 3 05:58:57 GMT 2020


On 14.07.2020 21:51, Doug Henderson via Cygwin-apps wrote:
> On Tue, 14 Jul 2020 at 10:29, ASSI <> wrote:
>>
>> ASSI writes:
>>> By patching the Makefile, just like you need to do for all the other
>>> stuff from the same author.  You can have a look at the zstd packages.
>>
>> Come to think of it, xxhash is already part of zstd.  Can't you just
>> link to that?
>>
>>
>> Regards,
>> Achim.
> 
> I have patched the Makefile as suggested. The newest version of the
> dist files as located at
> 
> https://github.com/djhenderson/Temp/raw/master/xxhash.zip
> 
> I compared the xxhash sources between the xxhash repo and the zstd
> repo. There are major differences in the code. This is obvious from wc
> 
> $ wc -l /usr/src/xxhash.src/xxhash-0.7.4-1.x86_64/origsrc/xxHash-0.7.4/xxhash.c
> /usr/src/zstd-1.4.5-1.src/zstd-1.4.5-1.x86_64/origsrc/zstd-1.4.5/lib/common/xxhash.c
>     43 /usr/src/xxhash.src/xxhash-0.7.4-1.x86_64/origsrc/xxHash-0.7.4/xxhash.c
>    864 /usr/src/zstd-1.4.5-1.src/zstd-1.4.5-1.x86_64/origsrc/zstd-1.4.5/lib/common/xxhash.c
>    907 total
> 
> $ wc -l /usr/src/xxhash.src/xxhash-0.7.4-1.x86_64/origsrc/xxHash-0.7.4/xxhash.h
> /usr/src/zstd-1.4.5-1.src/zstd-1.4.5-1.x86_64/origsrc/zstd-1.4.5/lib/common/xxhash.h
>   2076 /usr/src/xxhash.src/xxhash-0.7.4-1.x86_64/origsrc/xxHash-0.7.4/xxhash.h
>    285 /usr/src/zstd-1.4.5-1.src/zstd-1.4.5-1.x86_64/origsrc/zstd-1.4.5/lib/common/xxhash.h
>   2361 total
> 
> I had a brief look at the code, but did not attempt to judge the
> merits of either code base.
> 
> The zstd repo does not include the xxhsum command which has a similar
> CLI to cksum, md5sum, sha256sum, etc.
> 
> Apparently xxhash will use the SSE2 instructions for some operations.
> Someone with an older CPU without those instructions should test to
> make sure the xxhsum programs works for them. (I'm just saying that, I
> don't really know what that means.)
> 
> Any way, I would like some critical feedback on the dist packaging.
> 
> Thanks,
> Doug
> 


$ cygport xxhash-0.7.4-1.cygport all
 >>> Preparing xxhash-0.7.4-1.x86_64
 >>> Unpacking source xxhash-0.7.4-1.tar.gz
*** ERROR: SRC_DIR is not correctly defined

this happens when the system is case sensitive, see
attachment for solution.

Additional, you do not need a version in the cygport file name.

Any reason to have not defined a proper patch as originally
planned ?


PATCH_URI="
"
#       xxhash-cygwin-build-1.src.patch
#       xxhash-cygming-dll.patch

looks good, but I have no time for adding the package to
cygwin-pkg-maint

so if no one do it before, I will add it this evening (CET)

Regards
Marco

-------------- next part --------------
# package name
NAME="xxhash"
VERSION=0.7.4
RELEASE=1

# .hint generation
CATEGORY="Utils"
SUMMARY="Extremely fast hash algorithm"
DESCRIPTION="xxHash is an Extremely fast Hash algorithm,
running at RAM speed limits. It successfully completes the
SMHasher test suite which evaluates collision,
dispersion and randomness qualities of hash functions.
Code is highly portable, and hashes are identical on
all platforms (little / big endian)."

HOMEPAGE=https://github.com/Cyan4973/xxHash

# source and patch files
# rename download file from v${VERSION}.tar.gz to ${PF}.tar.gz
SRC_URI="https://github.com/Cyan4973/xxHash/archive/v${VERSION}.tar.gz#/${PF}.tar.gz"
SRC_DIR="xxHash-${PV}"
PATCH_URI="
"
#	xxhash-cygwin-build-1.src.patch
#	xxhash-cygming-dll.patch

# awk is a symlink to gawk
# sort is in coreutils
# valgrind required for test-all target
BUILD_REQUIRES="clang coreutils cppcheck gawk grep"

# from zstd

PKG_NAMES="${NAME} lib${NAME}0 lib${NAME}-devel"

xxhash_CONTENTS="
	usr/bin/xxh*sum*
	usr/share/doc/xxhash/
	usr/share/man/man1/*
"

libxxhash0_CATEGORY="Libs"
libxxhash0_SUMMARY="Extremely fast hash algorithm"
libxxhash0_CONTENTS="
	usr/bin/cygxxhash-0.dll
"

libxxhash_devel_CATEGORY="Libs"
libxxhash_devel_SUMMARY=${libxxhash0_SUMMARY}
libxxhash_devel_CONTENTS="
	usr/include/*.h
	usr/lib/libxxhash.dll.a
	usr/lib/pkgconfig/libxxhash.pc
"

# zstd - MAKEOPTS="-j1 PREFIX=/usr OS=Cygwin EXT=.exe"
MAKEOPTS="-j1 PREFIX=/usr OS=Cygwin"
# required due to some Heisenbug someplace I can't find
# CFLAGS+=" -DPLATFORM_POSIX_VERSION=200809L"

src_compile() {
    cd ${S}
    lndirs
    cd ${B}
    cygmake lib
    cygmake xxhsum
}

src_test() {
    cd ${B}
    cygmake test
}

src_install() {
    cd ${B}
    cyginstall
    rm -f ${D}/usr/lib/libxxhash.a
}


More information about the Cygwin-apps mailing list