diff mbox series

[v6,05/28] package/qwt: Partially convert to qmake infra

Message ID 20200217212350.29750-6-anaumann@ultratronik.de
State Accepted
Headers show
Series Qt5 qmake infra and per-package compatibility | expand

Commit Message

Andreas Naumann Feb. 17, 2020, 9:23 p.m. UTC
Use the qmake infra CONFIGURE and BUILD generic but keep the manipulation
of qwtconfig.pri as PRE_CONFIGURE_HOOK as well as the custom install steps.

Signed-off-by: Andreas Naumann <anaumann@ultratronik.de>
---
 package/qwt/qwt.mk | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

Comments

Thomas Petazzoni March 11, 2020, 9:19 p.m. UTC | #1
Hello,

On Mon, 17 Feb 2020 22:23:27 +0100
Andreas Naumann <anaumann@ultratronik.de> wrote:

> -define QWT_CONFIGURE_CMDS
> +define QWT_PRE_CONFIGURE_CMD
>  	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
> -	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
>  endef
>  
> -define QWT_BUILD_CMDS
> -	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
> -endef
> +QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD

PRE_CONFIGURE_CMD is not a great name of a hook, as it doesn't say what
it does. So I renamed to QWT_TWEAK_QWTCONFIG_PRI, and applied.

Also, why can this package use INSTALL_ROOT in a "normal" way, i.e
INSTALL_ROOT=$(STAGING_DIR) and INSTALL_ROOT=$(TARGET_DIR) ?

Best regards,

Thomas
Andreas Naumann March 14, 2020, 8:58 p.m. UTC | #2
Hi,

On 11.03.20 22:19, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 17 Feb 2020 22:23:27 +0100
> Andreas Naumann <anaumann@ultratronik.de> wrote:
> 
>> -define QWT_CONFIGURE_CMDS
>> +define QWT_PRE_CONFIGURE_CMD
>>   	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
>> -	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
>>   endef
>>   
>> -define QWT_BUILD_CMDS
>> -	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
>> -endef
>> +QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD
> 
> PRE_CONFIGURE_CMD is not a great name of a hook, as it doesn't say what
> it does. So I renamed to QWT_TWEAK_QWTCONFIG_PRI, and applied.

Sounds better, yes.

> 
> Also, why can this package use INSTALL_ROOT in a "normal" way, i.e
> INSTALL_ROOT=$(STAGING_DIR) and INSTALL_ROOT=$(TARGET_DIR) ?

I guess the qwt project does not install anything in host so there's no 
need for us to separate the host from the target files. Which is why we 
cant use the INSTALL_ROOT method for other qt modules (and keep things 
generic).
I didnt entirely understand the additional modification in the staging 
install so just kept the install steps as is. Looking into it now I see 
a 'rm -Rf $(TARGET_DIR)/usr/mkspecs' in the target install which makes 
my assumption above invalid. So yes, maybe the install steps could be 
simplified by using the new pkg-qmake method.

best regards,
Andreas




> 
> Best regards,
> 
> Thomas
>
diff mbox series

Patch

diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk
index e0ffec765f..1fec17b19a 100644
--- a/package/qwt/qwt.mk
+++ b/package/qwt/qwt.mk
@@ -41,14 +41,11 @@  else
 QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/'
 endif
 
-define QWT_CONFIGURE_CMDS
+define QWT_PRE_CONFIGURE_CMD
 	$(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri
-	(cd $(@D); $(TARGET_MAKE_ENV) $(QT5_QMAKE))
 endef
 
-define QWT_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
-endef
+QWT_PRE_CONFIGURE_HOOKS += QWT_PRE_CONFIGURE_CMD
 
 # After installation, we fixup the INSTALL_PREFIX in qwtconfig.pri so
 # that when building with qmake, -L$(STAGING_DIR)/usr/lib is used and
@@ -64,4 +61,4 @@  define QWT_INSTALL_TARGET_CMDS
 	rm -Rf $(TARGET_DIR)/usr/mkspecs
 endef
 
-$(eval $(generic-package))
+$(eval $(qmake-package))