* [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config
@ 2011-05-02 15:36 Gustavo Zacarias
2011-05-02 15:45 ` Peter Korsgaard
2011-05-02 19:02 ` Mike Frysinger
0 siblings, 2 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2011-05-02 15:36 UTC (permalink / raw)
To: buildroot
Exposed by commit 7e3e8ec040b06d6e2fb69e55c004f1ebc02c76d0
net-snmp-config goes for -L/usr/lib thus things break since this wins
over the sysroot if we have a host net-snmp library around when we build
packages that link against net-snmp.
Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
package/netsnmp/netsnmp.mk | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/package/netsnmp/netsnmp.mk b/package/netsnmp/netsnmp.mk
index edb1704..5704327 100644
--- a/package/netsnmp/netsnmp.mk
+++ b/package/netsnmp/netsnmp.mk
@@ -68,4 +68,14 @@ define NETSNMP_UNINSTALL_TARGET_CMDS
rm -f $(TARGET_DIR)/usr/lib/libnetsnmp*
endef
+define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
+ $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
+ -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
+ -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
+ -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
+ $(STAGING_DIR)/usr/bin/net-snmp-config
+endef
+
+NETSNMP_POST_INSTALL_STAGING_HOOKS += NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
+
$(eval $(call AUTOTARGETS,package,netsnmp))
--
1.7.3.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config
2011-05-02 15:36 [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config Gustavo Zacarias
@ 2011-05-02 15:45 ` Peter Korsgaard
2011-05-02 19:02 ` Mike Frysinger
1 sibling, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2011-05-02 15:45 UTC (permalink / raw)
To: buildroot
>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:
Gustavo> Exposed by commit 7e3e8ec040b06d6e2fb69e55c004f1ebc02c76d0
Gustavo> net-snmp-config goes for -L/usr/lib thus things break since this wins
Gustavo> over the sysroot if we have a host net-snmp library around when we build
Gustavo> packages that link against net-snmp.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config
2011-05-02 15:36 [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config Gustavo Zacarias
2011-05-02 15:45 ` Peter Korsgaard
@ 2011-05-02 19:02 ` Mike Frysinger
2011-05-02 19:05 ` Gustavo Zacarias
1 sibling, 1 reply; 4+ messages in thread
From: Mike Frysinger @ 2011-05-02 19:02 UTC (permalink / raw)
To: buildroot
On Monday, May 02, 2011 11:36:05 Gustavo Zacarias wrote:
> Exposed by commit 7e3e8ec040b06d6e2fb69e55c004f1ebc02c76d0
> net-snmp-config goes for -L/usr/lib thus things break since this wins
> over the sysroot if we have a host net-snmp library around when we build
> packages that link against net-snmp.
>
> --- a/package/netsnmp/netsnmp.mk
> +++ b/package/netsnmp/netsnmp.mk
> @@ -68,4 +68,14 @@ define NETSNMP_UNINSTALL_TARGET_CMDS
> rm -f $(TARGET_DIR)/usr/lib/libnetsnmp*
> endef
>
> +define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
> + $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
> + -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
> + -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
> + -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
> + $(STAGING_DIR)/usr/bin/net-snmp-config
> +endef
this should really be a common bit of logic instead of net-snmp specific.
just about every -config script can be fixed in this way.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20110502/1e9077b4/attachment.asc>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config
2011-05-02 19:02 ` Mike Frysinger
@ 2011-05-02 19:05 ` Gustavo Zacarias
0 siblings, 0 replies; 4+ messages in thread
From: Gustavo Zacarias @ 2011-05-02 19:05 UTC (permalink / raw)
To: buildroot
On 05/02/11 16:02, Mike Frysinger wrote:
> On Monday, May 02, 2011 11:36:05 Gustavo Zacarias wrote:
>> Exposed by commit 7e3e8ec040b06d6e2fb69e55c004f1ebc02c76d0
>> net-snmp-config goes for -L/usr/lib thus things break since this wins
>> over the sysroot if we have a host net-snmp library around when we build
>> packages that link against net-snmp.
>>
>> --- a/package/netsnmp/netsnmp.mk
>> +++ b/package/netsnmp/netsnmp.mk
>> @@ -68,4 +68,14 @@ define NETSNMP_UNINSTALL_TARGET_CMDS
>> rm -f $(TARGET_DIR)/usr/lib/libnetsnmp*
>> endef
>>
>> +define NETSNMP_STAGING_NETSNMP_CONFIG_FIXUP
>> + $(SED) "s,^prefix=.*,prefix=\'$(STAGING_DIR)/usr\',g" \
>> + -e "s,^exec_prefix=.*,exec_prefix=\'$(STAGING_DIR)/usr\',g" \
>> + -e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include\',g" \
>> + -e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
>> + $(STAGING_DIR)/usr/bin/net-snmp-config
>> +endef
>
> this should really be a common bit of logic instead of net-snmp specific.
> just about every -config script can be fixed in this way.
> -mike
Agreed, into package infrastructure, something like:
NETSNMP_CONFIG_FILE = net-snmp-config
or some wiser variable name to trigger the necessary fixup in the
appropiate file(s).
Regards.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-02 19:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02 15:36 [Buildroot] [PATCH] net-snmp: fixup paths in net-snmp-config Gustavo Zacarias
2011-05-02 15:45 ` Peter Korsgaard
2011-05-02 19:02 ` Mike Frysinger
2011-05-02 19:05 ` Gustavo Zacarias
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox