public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
* [ITP] xxhash 0.7.4-1
@ 2020-07-13 22:09 Doug Henderson
  2020-07-14  4:42 ` ASSI
  0 siblings, 1 reply; 10+ messages in thread
From: Doug Henderson @ 2020-07-13 22:09 UTC (permalink / raw)
  To: Cygwin Apps

Hi,
I am volunteering to be the maintainer for xxhash. This is my first
ITP, so I'm sure that I don't have everything right.

The package is currently distributed on, at least, Ubuntu and Archlinux.

The library files xxhash.c and xxhash.h are BSD licensed. The utility
xxhsum is GPL licensed.

The package compiles cleanly and all tests run successfully, without
any cygwin specific patches.

You may download the current version of the dist files from
https://github.com/djhenderson/Temp/raw/master/xxhash.zip

I have some issues to resolve.

The install places files into the /usr/local tree instead of the /usr
tree. Usually I would just do "PREFIX=/ make", but that does not work,
so I'm not sure how to do this from the cygport file.

How do I change the name of the shared library to something like
cygxxhash.0.dll?

Do I need the libxxhash.a file? I think I should split the package
into devel and non-dev packages..Again, I'm not sure how to do that.
Or if that is necessary.

I am currently the maintainer for expat, mingw64-i686-expat,
mingw64-x86_64-expat packages.

Doug

-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-07-13 22:09 [ITP] xxhash 0.7.4-1 Doug Henderson
@ 2020-07-14  4:42 ` ASSI
  2020-07-14 16:29   ` ASSI
  0 siblings, 1 reply; 10+ messages in thread
From: ASSI @ 2020-07-14  4:42 UTC (permalink / raw)
  To: cygwin-apps

Doug Henderson via Cygwin-apps writes:
> I have some issues to resolve.

Yes, hand-written Makefiles that change constantly.  X-(

> The install places files into the /usr/local tree instead of the /usr
> tree. Usually I would just do "PREFIX=/ make", but that does not work,
> so I'm not sure how to do this from the cygport file.

You're missing an export in front of setting that variable, I'd think.

> How do I change the name of the shared library to something like
> cygxxhash.0.dll?

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.

> Do I need the libxxhash.a file?

No, the static library shouldn't be packaged.

> I think I should split the package into devel and non-dev packages.

Yes please.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Factory and User Sound Singles for Waldorf Q+, Q and microQ:
http://Synth.Stromeko.net/Downloads.html#WaldorfSounds

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-07-14  4:42 ` ASSI
@ 2020-07-14 16:29   ` ASSI
  2020-07-14 19:51     ` Doug Henderson
  0 siblings, 1 reply; 10+ messages in thread
From: ASSI @ 2020-07-14 16:29 UTC (permalink / raw)
  To: cygwin-apps

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.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Waldorf MIDI Implementation & additional documentation:
http://Synth.Stromeko.net/Downloads.html#WaldorfDocs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-07-14 16:29   ` ASSI
@ 2020-07-14 19:51     ` Doug Henderson
  2020-07-14 21:57       ` Ben RUBSON
  2020-08-03  5:58       ` Marco Atzeri
  0 siblings, 2 replies; 10+ messages in thread
From: Doug Henderson @ 2020-07-14 19:51 UTC (permalink / raw)
  To: Cygwin Apps

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
-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-07-14 19:51     ` Doug Henderson
@ 2020-07-14 21:57       ` Ben RUBSON
  2020-08-02 10:41         ` Ben RUBSON
  2020-08-03  5:58       ` Marco Atzeri
  1 sibling, 1 reply; 10+ messages in thread
From: Ben RUBSON @ 2020-07-14 21:57 UTC (permalink / raw)
  To: Cygwin Apps; +Cc: Wayne Davison

> On 14 Jul 2020, at 21:51, Doug Henderson via Cygwin-apps <cygwin-apps@cygwin.com> 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
> 

> (...)
> 
> Any way, I would like some critical feedback on the dist packaging.

Many thanks Doug, really nice work !
At least I successfully manage to build rsync with this package :

$ uname -s -r
CYGWIN_NT-6.1 3.1.6(0.340/5/3)

$ ./rsync --version
rsync  version 3.2.3dev  protocol version 31
(...)
Optimizations:
    no SIMD, asm, openssl-crypto
Checksum list:
    xxh64 (xxhash) md5 md4 none
Compress list:
    zstd lz4 zlibx zlib none

Not sure about the other things to check though.

Kind regards,

Ben


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-07-14 21:57       ` Ben RUBSON
@ 2020-08-02 10:41         ` Ben RUBSON
  2020-08-03  3:36           ` Doug Henderson
  0 siblings, 1 reply; 10+ messages in thread
From: Ben RUBSON @ 2020-08-02 10:41 UTC (permalink / raw)
  To: Cygwin Apps

> On 14 Jul 2020, at 21:51, Doug Henderson via Cygwin-apps <cygwin-apps@cygwin.com> 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
> 
> (...)
> 
> Any way, I would like some critical feedback on the dist packaging.

Hi,

Not sure about the whole integration process, but any news perhaps regarding this package release ?

Thank you very much,

Kind regards,

Ben

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-08-02 10:41         ` Ben RUBSON
@ 2020-08-03  3:36           ` Doug Henderson
  0 siblings, 0 replies; 10+ messages in thread
From: Doug Henderson @ 2020-08-03  3:36 UTC (permalink / raw)
  To: Cygwin Apps

On Sun, 2 Aug 2020 at 04:41, Ben RUBSON <> wrote:
> > On 14 Jul 2020, at 21:51, Doug Henderson via Cygwin-apps <> wrote:
> >
> > 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

> > Any way, I would like some critical feedback on the dist packaging.
>
> Hi,
>
> Not sure about the whole integration process, but any news perhaps regarding this package release ?
>
> Thank you very much,
>
> Kind regards,
>
> Ben

I have not received any feedback on the current packaging, nor an
enthusiastic buy in for the package.

Apparently a version of the code is already packaged in the zstd
package because that package uses xxhash. Please see if that will work
for your use case and report back here.

Thanks.

Doug
-- 
Doug Henderson, Calgary, Alberta, Canada - from gmail.com

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-07-14 19:51     ` Doug Henderson
  2020-07-14 21:57       ` Ben RUBSON
@ 2020-08-03  5:58       ` Marco Atzeri
  2020-08-03 16:08         ` Marco Atzeri
  1 sibling, 1 reply; 10+ messages in thread
From: Marco Atzeri @ 2020-08-03  5:58 UTC (permalink / raw)
  To: cygwin-apps

[-- Attachment #1: Type: text/plain, Size: 2611 bytes --]

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


[-- Attachment #2: xxhash.cygport --]
[-- Type: text/plain, Size: 1767 bytes --]

# 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
}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-08-03  5:58       ` Marco Atzeri
@ 2020-08-03 16:08         ` Marco Atzeri
  2020-08-25 15:46           ` Ben RUBSON
  0 siblings, 1 reply; 10+ messages in thread
From: Marco Atzeri @ 2020-08-03 16:08 UTC (permalink / raw)
  To: cygwin-apps

On 03.08.2020 07:58, Marco Atzeri wrote:
> On 14.07.2020 21:51, Doug Henderson via Cygwin-apps wrote:
>> On Tue, 14 Jul 2020 at 10:29, ASSI <> wrote:
>>>

> 
> 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
> 

Doug,
you can upload

Regards
Marco

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [ITP] xxhash 0.7.4-1
  2020-08-03 16:08         ` Marco Atzeri
@ 2020-08-25 15:46           ` Ben RUBSON
  0 siblings, 0 replies; 10+ messages in thread
From: Ben RUBSON @ 2020-08-25 15:46 UTC (permalink / raw)
  To: Cygwin Apps

> On 3 Aug 2020, at 18:08, Marco Atzeri via Cygwin-apps <cygwin-apps@cygwin.com> wrote:
> 
> On 03.08.2020 07:58, Marco Atzeri wrote:
>> On 14.07.2020 21:51, Doug Henderson via Cygwin-apps wrote:
>>> On Tue, 14 Jul 2020 at 10:29, ASSI <> wrote:
>>>> 
> 
>> 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
> 
> Doug,
> you can upload

Hi,

Did you somehow manage to go further ? :)

Thank you again guys !

Best regards,

Ben


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-08-25 15:46 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 22:09 [ITP] xxhash 0.7.4-1 Doug Henderson
2020-07-14  4:42 ` ASSI
2020-07-14 16:29   ` ASSI
2020-07-14 19:51     ` Doug Henderson
2020-07-14 21:57       ` Ben RUBSON
2020-08-02 10:41         ` Ben RUBSON
2020-08-03  3:36           ` Doug Henderson
2020-08-03  5:58       ` Marco Atzeri
2020-08-03 16:08         ` Marco Atzeri
2020-08-25 15:46           ` Ben RUBSON

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).