* [Buildroot] [PATCH v3 1/2] rhash: new package
@ 2017-05-08 17:00 Vicente Olivert Riera
2017-05-08 17:00 ` [Buildroot] [PATCH v3 2/2] cmake: bump version to 3.8.1 Vicente Olivert Riera
2017-05-08 17:34 ` [Buildroot] [PATCH v3 1/2] rhash: new package Baruch Siach
0 siblings, 2 replies; 4+ messages in thread
From: Vicente Olivert Riera @ 2017-05-08 17:00 UTC (permalink / raw)
To: buildroot
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
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 | 69 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 97 insertions(+)
create mode 100644 package/rhash/Config.in
create mode 100644 package/rhash/rhash.hash
create mode 100644 package/rhash/rhash.mk
diff --git a/package/Config.in b/package/Config.in
index d57813c..9b64ce2 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -964,6 +964,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"
diff --git a/package/rhash/Config.in b/package/rhash/Config.in
new file mode 100644
index 0000000..6581243
--- /dev/null
+++ b/package/rhash/Config.in
@@ -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
diff --git a/package/rhash/rhash.hash b/package/rhash/rhash.hash
new file mode 100644
index 0000000..5efc3a6
--- /dev/null
+++ b/package/rhash/rhash.hash
@@ -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
diff --git a/package/rhash/rhash.mk b/package/rhash/rhash.mk
new file mode 100644
index 0000000..8cefff8
--- /dev/null
+++ b/package/rhash/rhash.mk
@@ -0,0 +1,69 @@
+################################################################################
+#
+# rhash
+#
+################################################################################
+
+RHASH_VERSION = 1.3.4
+RHASH_SOURCE = rhash-$(RHASH_VERSION)-src.tar.gz
+RHASH_SITE = https://sourceforge.net/projects/rhash/files/rhash/$(RHASH_VERSION)
+RHASH_LICENSE = MIT
+RHASH_LICENSE_FILES = COPYING
+RHASH_INSTALL_STAGING = YES
+
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+RHASH_DEPENDENCIES += gettext
+RHASH_ADDCFLAGS += -DUSE_GETTEXT
+RHASH_ADDLDFLAGS += -lintl
+endif
+
+ifeq ($(BR2_PACKAGE_OPENSSL)x$(BR2_STATIC_LIBS),yx)
+RHASH_DEPENDENCIES += openssl
+RHASH_ADDCFLAGS += -DOPENSSL_RUNTIME -rdynamic
+RHASH_ADDLDFLAGS += -ldl
+endif
+
+RHASH_MAKE_OPTS = \
+ ADDCFLAGS="$(RHASH_ADDCFLAGS)" \
+ ADDLDFLAGS="$(RHASH_ADDLDFLAGS)" \
+ PREFIX="/usr"
+
+ifeq ($(BR2_SHARED_LIBS),y)
+RHASH_BUILD_TARGETS = lib-shared build-shared
+RHASH_INSTALL_TARGETS = install-lib-shared install-so-link
+else ifeq ($(BR2_STATIC_LIBS),y)
+RHASH_BUILD_TARGETS = lib-static
+RHASH_INSTALL_TARGETS = install-lib-static
+else
+RHASH_BUILD_TARGETS = lib-static lib-shared build-shared
+RHASH_INSTALL_TARGETS = install-lib-static install-lib-shared install-so-link
+endif
+
+define RHASH_BUILD_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+ $(RHASH_MAKE_OPTS) $(RHASH_BUILD_TARGETS)
+endef
+
+define RHASH_INSTALL_STAGING_CMDS
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/librhash \
+ DESTDIR="$(STAGING_DIR)" $(RHASH_MAKE_OPTS) $(RHASH_INSTALL_TARGETS) \
+ install-headers
+endef
+
+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_RHASH_BIN
+ $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+ DESTDIR="$(STAGING_DIR)" $(RHASH_MAKE_OPTS) install-shared
+
+ $(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_RHASH_BIN
+endif
+
+$(eval $(generic-package))
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v3 2/2] cmake: bump version to 3.8.1
2017-05-08 17:00 [Buildroot] [PATCH v3 1/2] rhash: new package Vicente Olivert Riera
@ 2017-05-08 17:00 ` Vicente Olivert Riera
2017-05-08 17:34 ` [Buildroot] [PATCH v3 1/2] rhash: new package Baruch Siach
1 sibling, 0 replies; 4+ messages in thread
From: Vicente Olivert Riera @ 2017-05-08 17:00 UTC (permalink / raw)
To: buildroot
cmake depends on rhash, but host-cmake doesn't. This is because we use
the bundled dependencies for host-cmake but not for target.
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
---
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 | 6 +++---
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/package/cmake/Config.in b/package/cmake/Config.in
index 64ab154..e7bd14e 100644
--- a/package/cmake/Config.in
+++ b/package/cmake/Config.in
@@ -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),
diff --git a/package/cmake/cmake.hash b/package/cmake/cmake.hash
index 13c0237..2aea9bc 100644
--- a/package/cmake/cmake.hash
+++ b/package/cmake/cmake.hash
@@ -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.1-SHA-256.txt
+sha256 ce5d9161396e06501b00e52933783150a87c33080d4bdcef461b5b7fd24ac228 cmake-3.8.1.tar.gz
diff --git a/package/cmake/cmake.mk b/package/cmake/cmake.mk
index d9eea32..10af415 100644
--- a/package/cmake/cmake.mk
+++ b/package/cmake/cmake.mk
@@ -4,8 +4,8 @@
#
################################################################################
-CMAKE_VERSION_MAJOR = 3.7
-CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).2
+CMAKE_VERSION_MAJOR = 3.8
+CMAKE_VERSION = $(CMAKE_VERSION_MAJOR).1
CMAKE_SITE = https://cmake.org/files/v$(CMAKE_VERSION_MAJOR)
CMAKE_LICENSE = BSD-3-Clause
CMAKE_LICENSE_FILES = Copyright.txt
@@ -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 \
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v3 1/2] rhash: new package
2017-05-08 17:00 [Buildroot] [PATCH v3 1/2] rhash: new package Vicente Olivert Riera
2017-05-08 17:00 ` [Buildroot] [PATCH v3 2/2] cmake: bump version to 3.8.1 Vicente Olivert Riera
@ 2017-05-08 17:34 ` Baruch Siach
2017-05-08 21:16 ` Yann E. MORIN
1 sibling, 1 reply; 4+ messages in thread
From: Baruch Siach @ 2017-05-08 17:34 UTC (permalink / raw)
To: buildroot
Hi Vicente,
On Mon, May 08, 2017 at 06:00:06PM +0100, Vicente Olivert Riera wrote:
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> ---
> 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)
[...]
> +ifeq ($(BR2_PACKAGE_RHASH_BIN),y)
> +define RHASH_INSTALL_RHASH_BIN
> + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> + DESTDIR="$(STAGING_DIR)" $(RHASH_MAKE_OPTS) install-shared
You mention above that Arnout suggested to install the binaries to staging.
But this is quite unusual. A comment explaining the reason for that would be
nice.
> + $(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_RHASH_BIN
> +endif
> +
> +$(eval $(generic-package))
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 4+ messages in thread* [Buildroot] [PATCH v3 1/2] rhash: new package
2017-05-08 17:34 ` [Buildroot] [PATCH v3 1/2] rhash: new package Baruch Siach
@ 2017-05-08 21:16 ` Yann E. MORIN
0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2017-05-08 21:16 UTC (permalink / raw)
To: buildroot
Vicente, Baruch, All,
On 2017-05-08 20:34 +0300, Baruch Siach spake thusly:
> Hi Vicente,
>
> On Mon, May 08, 2017 at 06:00:06PM +0100, Vicente Olivert Riera wrote:
> > Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
> > ---
> > 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)
>
> [...]
>
> > +ifeq ($(BR2_PACKAGE_RHASH_BIN),y)
> > +define RHASH_INSTALL_RHASH_BIN
> > + $(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
> > + DESTDIR="$(STAGING_DIR)" $(RHASH_MAKE_OPTS) install-shared
>
> You mention above that Arnout suggested to install the binaries to staging.
> But this is quite unusual. A comment explaining the reason for that would be
> nice.
And please do so in a post-staging-install hook, not in the post-target-install
hook.
Regards,
Yann E. MORIN.
> > + $(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_RHASH_BIN
> > +endif
> > +
> > +$(eval $(generic-package))
>
> baruch
>
> --
> http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
> =}------------------------------------------------ooO--U--Ooo------------{=
> - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-05-08 21:16 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-08 17:00 [Buildroot] [PATCH v3 1/2] rhash: new package Vicente Olivert Riera
2017-05-08 17:00 ` [Buildroot] [PATCH v3 2/2] cmake: bump version to 3.8.1 Vicente Olivert Riera
2017-05-08 17:34 ` [Buildroot] [PATCH v3 1/2] rhash: new package Baruch Siach
2017-05-08 21:16 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox