diff mbox

[7/7] ddrescue: fix target build

Message ID 99cad486180867002ec348364cf9ac9028b74d0e.1486669818.git.baruch@tkos.co.il
State Accepted
Headers show

Commit Message

Baruch Siach Feb. 9, 2017, 7:50 p.m. UTC
ddrescue is not an autotools package. Covert to generic package to make it
build correctly for target architecture.

Cc: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 package/ddrescue/ddrescue.mk | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Comments

Thomas Petazzoni Feb. 9, 2017, 8:40 p.m. UTC | #1
Hello,

On Thu,  9 Feb 2017 21:50:18 +0200, Baruch Siach wrote:
> ddrescue is not an autotools package. Covert to generic package to make it
> build correctly for target architecture.
> 
> Cc: Peter Seiderer <ps.report@gmx.net>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
>  package/ddrescue/ddrescue.mk | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)

It's really weird to have this mixed with a patch series related to
improving lzip support. I know ddrescue is using lzip, but this patch
is really unrelated from lzip support. It would be better to send such
patches separately.

Nevertheless, this was very useful, so I've applied. Thanks!

Thomas
Baruch Siach Feb. 9, 2017, 8:52 p.m. UTC | #2
Hi Thomas,

On Thu, Feb 09, 2017 at 09:40:44PM +0100, Thomas Petazzoni wrote:
> On Thu,  9 Feb 2017 21:50:18 +0200, Baruch Siach wrote:
> > ddrescue is not an autotools package. Covert to generic package to make it
> > build correctly for target architecture.
> > 
> > Cc: Peter Seiderer <ps.report@gmx.net>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >  package/ddrescue/ddrescue.mk | 18 +++++++++++++++++-
> >  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> It's really weird to have this mixed with a patch series related to
> improving lzip support. I know ddrescue is using lzip, but this patch
> is really unrelated from lzip support. It would be better to send such
> patches separately.

I found the problem when testing ddrescue build, and the patch context depends 
on the previous patch. So I thought it might be better to keep the path in 
this series to indicate the dependency.

But you are right. I should have posted this patch separately.

baruch
Peter Seiderer Feb. 9, 2017, 8:56 p.m. UTC | #3
Hello Baruch, Thomas,

On Thu, 9 Feb 2017 21:40:44 +0100, Thomas Petazzoni <thomas.petazzoni@free-electrons.com> wrote:

> Hello,
> 
> On Thu,  9 Feb 2017 21:50:18 +0200, Baruch Siach wrote:
> > ddrescue is not an autotools package. Covert to generic package to make it
> > build correctly for target architecture.
> > 
> > Cc: Peter Seiderer <ps.report@gmx.net>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> >  package/ddrescue/ddrescue.mk | 18 +++++++++++++++++-
> >  1 file changed, 17 insertions(+), 1 deletion(-)
> 
> It's really weird to have this mixed with a patch series related to
> improving lzip support. I know ddrescue is using lzip, but this patch
> is really unrelated from lzip support. It would be better to send such
> patches separately.
> 
> Nevertheless, this was very useful, so I've applied. Thanks!

To late for my Tested-by ;-)

Nevertheless many thanks for spotting this one...

Regards,
Peter

> 
> Thomas
diff mbox

Patch

diff --git a/package/ddrescue/ddrescue.mk b/package/ddrescue/ddrescue.mk
index 4c87e4dac8fa..4e244e6bdaef 100644
--- a/package/ddrescue/ddrescue.mk
+++ b/package/ddrescue/ddrescue.mk
@@ -10,4 +10,20 @@  DDRESCUE_SITE = http://download.savannah.gnu.org/releases/ddrescue
 DDRESCUE_LICENSE = GPLv2+
 DDRESCUE_LICENSE_FILES = COPYING
 
-$(eval $(autotools-package))
+define DDRESCUE_CONFIGURE_CMDS
+	(cd $(@D); \
+		$(TARGET_MAKE_ENV) ./configure \
+		--prefix=/usr \
+		$(TARGET_CONFIGURE_OPTS) \
+	)
+endef
+
+define DDRESCUE_BUILD_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define DDRESCUE_INSTALL_TARGET_CMDS
+	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
+endef
+
+$(eval $(generic-package))