From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] gmock: new package
Date: Mon, 27 Apr 2015 23:52:43 +0200 [thread overview]
Message-ID: <20150427235243.3ffef238@free-electrons.com> (raw)
In-Reply-To: <1425304883-4332-2-git-send-email-casantos@datacom.ind.br>
Dear Carlos Santos,
On Mon, 2 Mar 2015 11:01:23 -0300, Carlos Santos wrote:
> diff --git a/package/gmock/gmock.hash b/package/gmock/gmock.hash
> new file mode 100644
> index 0000000..4d038e2
> --- /dev/null
> +++ b/package/gmock/gmock.hash
> @@ -0,0 +1,3 @@
> +# No upstream hashes for the following:
We use:
# Locally computed
and a single sha256 hash.
> +md5 073b984d8798ea1594f5e44d85b20d66 gmock-1.7.0.zip
> +sha1 f9d9dd882a25f4069ed9ee48e70aff1b53e3c5a5 gmock-1.7.0.zip
> diff --git a/package/gmock/gmock.mk b/package/gmock/gmock.mk
> new file mode 100644
> index 0000000..5ecf940
> --- /dev/null
> +++ b/package/gmock/gmock.mk
> @@ -0,0 +1,47 @@
> +################################################################################
> +#
> +# gmock
> +#
> +################################################################################
> +
> +GMOCK_VERSION = 1.7.0
> +GMOCK_SOURCE = gmock-$(GMOCK_VERSION).zip
> +GMOCK_SITE = http://googlemock.googlecode.com/files
> +GMOCK_INSTALL_STAGING = YES
> +GMOCK_INSTALL_TARGET = NO
> +GMOCK_LICENSE = BSD-3c
> +GMOCK_LICENSE_FILES = LICENSE
> +GMOCK_DEPENDENCIES = gtest
> +HOST_GMOCK_DEPENDENCIES = host-python
> +
> +GMOCK_CONF_OPTS = --with-gtest=$(STAGING_DIR)/usr/lib/
> +
> +define GMOCK_EXTRACT_CMDS
> + $(UNZIP) $(DL_DIR)/$(GMOCK_SOURCE) -d $(BUILD_DIR)
> +endef
> +
> +define GMOCK_INSTALL_STAGING_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/lib/.libs/libgmock.a $(STAGING_DIR)/usr/lib/libgmock.a
> + $(INSTALL) -D -m 0755 $(@D)/lib/.libs/libgmock_main.a $(STAGING_DIR)/usr/lib/libgmock_main.a
> + $(INSTALL) -d -m 0755 $(STAGING_DIR)/usr/include/gmock/
> + cp -rp $(@D)/include/gmock/* $(STAGING_DIR)/usr/include/gmock/
> +endef
Why don't you use the default rule for autotools-package staging
installation?
> +
> +
> +# Unzipping inside $(@D) and moving everything from the created subdirectory is
> +# required because unzipping directly in $(BUILD_DIR) would cause host-gmock to
> +# overwrite the gmock subdir instead of unzipping in a host-gmock subdir.
> +define HOST_GMOCK_EXTRACT_CMDS
> + $(UNZIP) $(DL_DIR)/$(GMOCK_SOURCE) -d $(@D)
> + mv $(@D)/gmock-$(GMOCK_VERSION)/* $(@D)
> + rmdir $(@D)/gmock-$(GMOCK_VERSION)
> +endef
> +
> +define HOST_GMOCK_INSTALL_CMDS
> + $(INSTALL) -D -m 0755 $(@D)/scripts/generator/gmock_gen.py $(HOST_DIR)/usr/bin/gmock_gen.py
> + ln -sf gmock_gen.py $(HOST_DIR)/usr/bin/gmock_gen
> + cp -rp $(@D)/scripts/generator/cpp $(HOST_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)/site-packages
> +endef
> +
> +$(eval $(autotools-package))
> +$(eval $(host-generic-package))
Who is using host-gmock? Your code is not using it apparently, so it
seems like dead code. Can you explain more how it is supposed to be
used? And why would it be a host-generic-package and not
host-autotools-package?
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-04-27 21:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 14:01 [Buildroot] [PATCH 0/1] gmock: new package Carlos Santos
2015-03-02 14:01 ` [Buildroot] [PATCH 1/1] " Carlos Santos
2015-04-19 11:03 ` Fabio Porcedda
2015-04-27 21:52 ` Thomas Petazzoni [this message]
2015-05-15 18:05 ` [Buildroot] [PATCH v2 " Carlos Santos
2015-07-14 10:09 ` Samuel Martin
2015-07-14 10:23 ` Thomas Petazzoni
2015-07-16 11:34 ` Carlos Santos
2015-07-16 20:51 ` Carlos Santos
2015-07-16 22:57 ` Samuel Martin
2015-07-23 20:39 ` [Buildroot] [PATCH V3 " Carlos Santos
2015-07-28 15:42 ` Romain Naour
2015-07-31 11:53 ` [Buildroot] [PATCH V4 " Carlos Santos
2015-07-31 14:06 ` Romain Naour
2015-09-17 19:21 ` Carlos Santos
2015-10-03 15:14 ` Peter Korsgaard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150427235243.3ffef238@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox