Skip to contentSkip to conversation

rhash: new package

PATCH New Vicente Olivert Riera 2 participants 4 messages Jun 2, 2017 – Jun 6, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v6 1/2 rhash: new package

---
Changes v5 -> v6:
- Nothing
Changes v4 -> v5:
- Do not install the console utility to staging.
Changes v3 -> v4:
- Add a comment explaining why we install the console utility to the staging directory. (Baruch)
- Perform the installation of the console utility to the staging directory into a post-install-staginig-hook. (Yann)
Changes v2 -> v3:
- Nothing
Changes v1 -> v2:
- Rename package to rhash
- Take the help text of the library instead of the console utility
- Sub-config option for the rhash binary starts with the package name
- Conditionals for shared/static/shared-static reordered
- Put make options into a make_opts variable
- Install the console utility to staging as well
(All suggestions by Arnout)

---
 package/Config.in        |  1 +
 package/rhash/Config.in  | 24 ++++++++++++++++++
 package/rhash/rhash.hash |  3 +++
 package/rhash/rhash.mk   | 66 ++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 94 insertions(+)
 create mode 100644 package/rhash/Config.in
 create mode 100644 package/rhash/rhash.hash
 create mode 100644 package/rhash/rhash.mk
package/Config.in +1 -0
index 497cac8b7..a7467977b 100644
@@ -969,6 +969,7 @@ menu "Crypto"
 	source "package/mbedtls/Config.in"
 	source "package/nettle/Config.in"
 	source "package/openssl/Config.in"
+	source "package/rhash/Config.in"
 	source "package/tinydtls/Config.in"
 	source "package/trousers/Config.in"
 	source "package/ustream-ssl/Config.in"
package/rhash/Config.in new file +24 -0
new file mode 100644
index 000000000..65812438e
@@ -0,0 +1,24 @@
+config BR2_PACKAGE_RHASH
+	bool "rhash"
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
+	help
+	  LibRHash is a professional,  portable,  thread-safe  C library for
+	  computing a wide variety of hash sums, such as  CRC32, MD4, MD5,
+	  SHA1, SHA256, SHA512, SHA3, AICH, ED2K, Tiger, DC++ TTH, BitTorrent
+	  BTIH,  GOST R 34.11-94, RIPEMD-160, HAS-160, EDON-R, Whirlpool and
+	  Snefru.
+
+	  https://github.com/rhash/RHash
+
+if BR2_PACKAGE_RHASH
+
+config BR2_PACKAGE_RHASH_BIN
+	bool "rhash binary"
+	depends on !BR2_STATIC_LIBS
+	help
+	  Install rhash console utility
+
+comment "rhash binary needs a toolchain w/ dynamic library"
+	depends on BR2_STATIC_LIBS
+
+endif
package/rhash/rhash.hash new file +3 -0
new file mode 100644
index 000000000..5efc3a67b
@@ -0,0 +1,3 @@
+# From https://sourceforge.net/projects/rhash/files/rhash/1.3.4/
+md5 0b51010604659e9e99f6307b053ba13b  rhash-1.3.4-src.tar.gz
+sha1 411d8c7ba84fa9763bc49fa2fd3a7587712fd52c  rhash-1.3.4-src.tar.gz
package/rhash/rhash.mk new file +66 -0

66 lines not on this page · raw message

Signature · 1 line
2.13.0
#1 lore raw

PATCH v6 2/2 cmake: bump version to 3.8.2

cmake depends on rhash, but host-cmake doesn't. This is because we use the bundled dependencies for host-cmake but not for target.

---
Changes v5 -> v6:
- Bump version to 3.8.2
Changes v4 -> v5:
- Nothing
Changes v3 -> v4:
- Nothing
Changes v2 -> v3:
- Bump version to 3.8.1
- Change LIBRHASH references to RHASH
Changes v1 -> v2:
- Added explanation in the commit log about why rhash dependency is needed for cmake but not for host-cmake. (Arnout)

---
 package/cmake/Config.in  | 1 +
 package/cmake/cmake.hash | 4 ++--
 package/cmake/cmake.mk   | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)
package/cmake/Config.in +1 -0
index 64ab15418..e7bd14e69 100644
@@ -29,6 +29,7 @@ config BR2_PACKAGE_CMAKE_CTEST
 	select BR2_PACKAGE_BZIP2
 	select BR2_PACKAGE_XZ
 	select BR2_PACKAGE_LIBUV
+	select BR2_PACKAGE_RHASH
 	help
 	  CTest is a testing tool distributed as a part of CMake. It
 	  can be used to automate updating (using CVS for example),
package/cmake/cmake.hash +2 -2
index 13c023759..f138ac79a 100644
@@ -1,2 +1,2 @@
-# From http://www.cmake.org/files/v3.7/cmake-3.7.2-SHA-256.txt
-sha256 dc1246c4e6d168ea4d6e042cfba577c1acd65feea27e56f5ff37df920c30cae0  cmake-3.7.2.tar.gz
+# From http://www.cmake.org/files/v3.8/cmake-3.8.2-SHA-256.txt
+sha256 da3072794eb4c09f2d782fcee043847b99bb4cf8d4573978d9b2024214d6e92d  cmake-3.8.2.tar.gz
package/cmake/cmake.mk +2 -2
index d9eea3285..46bd1e4e5 100644
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-CMAKE_VERSION_MAJOR = 3.7
+CMAKE_VERSION_MAJOR = 3.8
 CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).2
 CMAKE_SITE = https://cmake.org/files/v$(CMAKE_VERSION_MAJOR)
 CMAKE_LICENSE = BSD-3-Clause
@@ -22,7 +22,7 @@ CMAKE_LICENSE_FILES = Copyright.txt
 #   the system-wide libraries instead of rebuilding and statically
 #   linking with the ones bundled into the CMake sources.
 
-CMAKE_DEPENDENCIES = zlib jsoncpp libcurl libarchive expat bzip2 xz libuv
+CMAKE_DEPENDENCIES = zlib jsoncpp libcurl libarchive expat bzip2 xz libuv rhash
 
 CMAKE_CONF_OPTS = \
 	-DKWSYS_LFS_WORKS=TRUE \
Signature · 1 line
2.13.0
#2 lore raw

PATCH v6 2/2 cmake: bump version to 3.8.2

Hello,

Quoted 17 lines · Vicente Olivert Riera

cmake depends on rhash, but host-cmake doesn't. This is because we use the bundled dependencies for host-cmake but not for target.

---
Changes v5 -> v6:
- Bump version to 3.8.2
Changes v4 -> v5:
- Nothing
Changes v3 -> v4:
- Nothing
Changes v2 -> v3:
- Bump version to 3.8.1
- Change LIBRHASH references to RHASH
Changes v1 -> v2:
- Added explanation in the commit log about why rhash dependency is needed for cmake but not for host-cmake. (Arnout)

Quoted 5 lines
---
 package/cmake/Config.in  | 1 +
 package/cmake/cmake.hash | 4 ++--
 package/cmake/cmake.mk   | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH v6 1/2 rhash: new package

In reply to Vicente Olivert Riera

Hello,

Quoted 1 line · Vicente Olivert Riera

I've applied, after minor fixes, see below.

package/rhash/rhash.mk line 44

Quoted 3 lines
package/rhash/rhash.mk new file +3 -0
+define RHASH_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+	$(RHASH_MAKE_OPTS) $(RHASH_BUILD_TARGETS)

Indentation of the second line should have had two tabs, not one.

package/rhash/rhash.mk line 64

Quoted 12 lines
package/rhash/rhash.mk new file +12 -0
+define RHASH_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/librhash \
+		DESTDIR="$(TARGET_DIR)" $(RHASH_MAKE_OPTS) $(RHASH_INSTALL_TARGETS)
+endef
+
+ifeq ($(BR2_PACKAGE_RHASH_BIN),y)
+define RHASH_INSTALL_TARGET_RHASH_BIN
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+		DESTDIR="$(TARGET_DIR)" $(RHASH_MAKE_OPTS) install-shared
+endef
+RHASH_POST_INSTALL_TARGET_HOOKS += RHASH_INSTALL_TARGET_RHASH_BIN
+endif

Using post install target hooks is not really needed here, calling the variable directly from RHASH_INSTALL_TARGET_CMDS is a bit more common in generic-package packages.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com