diff mbox

Add xxhash package

Message ID 1437080375-96542-1-git-send-email-eswierk@skyportsystems.com
State Accepted
Headers show

Commit Message

Ed Swierk July 16, 2015, 8:59 p.m. UTC
"xxHash is an extremely fast hash algorithm, running at RAM
speed limits."

Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
---
 package/Config.in        |  1 +
 package/xxhash/Config.in |  7 +++++++
 package/xxhash/xxhash.mk | 19 +++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 package/xxhash/Config.in
 create mode 100644 package/xxhash/xxhash.mk

Comments

Yann E. MORIN July 16, 2015, 9:51 p.m. UTC | #1
Ed, All,

On 2015-07-16 13:59 -0700, Ed Swierk spake thusly:
> "xxHash is an extremely fast hash algorithm, running at RAM
> speed limits."
> 
> Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
[--SNIP--]
> new file mode 100644
> index 0000000..ba680ba
> --- /dev/null
> +++ b/package/xxhash/xxhash.mk
> @@ -0,0 +1,19 @@
> +################################################################################
> +#
> +# xxhash
> +#
> +################################################################################
> +
> +XXHASH_VERSION = r40
> +XXHASH_SITE = $(call github,Cyan4973,xxHash,$(XXHASH_VERSION))
> +XXHASH_LICENSE = Free

'Free' is not a license name (t least not a common one). We have a list
of commonly used licenses in the manual:
    http://buildroot.net/downloads/manual/manual.html#legal-info-list-licenses

However, the licensing terms of that package are in fact a bit weird. In
fact, the LICENSE file is the text of the BSD-2c. But when one looks at
the source files, one (xxhash.c) is BSD-2c, while the other (xxhsum.c)
is clearly GPLv2+.

So you would write:

    XXHASH_LICENSE = BSD-2c, GPLv2+
    XXHASH_LICENSE_FILES = LICENSE xxhsum.c

(yes, we put the source file in there because the GPLv2+ license is only
visible in that file).

Regards,
Yann E. MORIN.

> +define XXHASH_BUILD_CMDS
> +	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) xxhsum
> +endef
> +
> +define XXHASH_INSTALL_TARGET_CMDS
> +	$(INSTALL) -m 0755 -D $(@D)/xxhsum $(TARGET_DIR)/usr/bin/xxhsum
> +endef
> +
> +$(eval $(generic-package))
> -- 
> 1.9.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
Thomas Petazzoni Sept. 19, 2015, 1:53 p.m. UTC | #2
Dear Ed Swierk,

On Thu, 16 Jul 2015 13:59:35 -0700, Ed Swierk wrote:
> "xxHash is an extremely fast hash algorithm, running at RAM
> speed limits."
> 
> Signed-off-by: Ed Swierk <eswierk@skyportsystems.com>
> ---
>  package/Config.in        |  1 +
>  package/xxhash/Config.in |  7 +++++++
>  package/xxhash/xxhash.mk | 19 +++++++++++++++++++
>  3 files changed, 27 insertions(+)
>  create mode 100644 package/xxhash/Config.in
>  create mode 100644 package/xxhash/xxhash.mk

Applied, after doing the following changes:

    [Thomas:
     - tweak commit log title
     - add correct license and license files information, using the
       suggestion from Yann E. Morin
     - add $(TARGET_MAKE_ENV) in the environment in the build step.]

Thanks a lot!

Thomas
diff mbox

Patch

diff --git a/package/Config.in b/package/Config.in
index 86a53c8..916ff47 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1395,6 +1395,7 @@  if BR2_PACKAGE_BUSYBOX_SHOW_OTHERS
 	source "package/which/Config.in"
 endif
 	source "package/xmlstarlet/Config.in"
+	source "package/xxhash/Config.in"
 endmenu
 
 menu "System tools"
diff --git a/package/xxhash/Config.in b/package/xxhash/Config.in
new file mode 100644
index 0000000..6720225
--- /dev/null
+++ b/package/xxhash/Config.in
@@ -0,0 +1,7 @@ 
+config BR2_PACKAGE_XXHASH
+	bool "xxhash"
+	help
+	  xxHash is an extremely fast hash algorithm, running at RAM
+	  speed limits.
+	  
+	  https://github.com/Cyan4973/xxHash
diff --git a/package/xxhash/xxhash.mk b/package/xxhash/xxhash.mk
new file mode 100644
index 0000000..ba680ba
--- /dev/null
+++ b/package/xxhash/xxhash.mk
@@ -0,0 +1,19 @@ 
+################################################################################
+#
+# xxhash
+#
+################################################################################
+
+XXHASH_VERSION = r40
+XXHASH_SITE = $(call github,Cyan4973,xxHash,$(XXHASH_VERSION))
+XXHASH_LICENSE = Free
+
+define XXHASH_BUILD_CMDS
+	$(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) xxhsum
+endef
+
+define XXHASH_INSTALL_TARGET_CMDS
+	$(INSTALL) -m 0755 -D $(@D)/xxhsum $(TARGET_DIR)/usr/bin/xxhsum
+endef
+
+$(eval $(generic-package))