On Thu, May 27, 2010 at 09:58:35PM +0200, Remy Bohmer wrote:
> Signed-off-by: Remy Bohmer <[email protected]>
> ---
>  patches/latencytop-0.5/no-gtk-ui.patch            |   18 +++++
>  patches/latencytop-0.5/repair-cross-compile.patch |   24 +++++++
>  patches/latencytop-0.5/series                     |    2 +
>  rules/latencytop.in                               |   24 +++++++
>  rules/latencytop.make                             |   74 
> +++++++++++++++++++++
>  5 files changed, 142 insertions(+), 0 deletions(-)
>  create mode 100644 patches/latencytop-0.5/no-gtk-ui.patch
>  create mode 100644 patches/latencytop-0.5/repair-cross-compile.patch
>  create mode 100644 patches/latencytop-0.5/series
>  create mode 100644 rules/latencytop.in
>  create mode 100644 rules/latencytop.make
> 
> diff --git a/patches/latencytop-0.5/no-gtk-ui.patch 
> b/patches/latencytop-0.5/no-gtk-ui.patch
> new file mode 100644
> index 0000000..05d3b70
> --- /dev/null
> +++ b/patches/latencytop-0.5/no-gtk-ui.patch
> @@ -0,0 +1,18 @@
> +Disable the GTK UI
> +
> +Signed-off-by: Remy Bohmer <[email protected]>
> +---
> + Makefile |    2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +Index: latencytop-0.5/Makefile
> +===================================================================
> +--- latencytop-0.5.orig/Makefile     2009-10-02 17:40:05.000000000 +0200
> ++++ latencytop-0.5/Makefile  2009-10-02 17:40:11.000000000 +0200
> +@@ -1,5 +1,5 @@
> + # FIXME: Use autoconf ?
> +-HAS_GTK_GUI = 1
> ++#HAS_GTK_GUI = 1
> + 
> + DESTDIR =
> + SBINDIR = /usr/sbin

LATENCYTOP_MAKE_OPT := HAS_GTK_GUI=

instead of this patch should work too.


> diff --git a/patches/latencytop-0.5/repair-cross-compile.patch 
> b/patches/latencytop-0.5/repair-cross-compile.patch
> new file mode 100644
> index 0000000..7a5f058
> --- /dev/null
> +++ b/patches/latencytop-0.5/repair-cross-compile.patch
> @@ -0,0 +1,24 @@
> +Adapt the Makefile for Cross-compilation
> +
> +Signed-off-by: Remy Bohmer <[email protected]>
> +---
> + Makefile |    4 ++--
> + 1 file changed, 2 insertions(+), 2 deletions(-)
> +
> +Index: latencytop-0.5/Makefile
> +===================================================================
> +--- latencytop-0.5.orig/Makefile     2009-10-05 10:12:15.000000000 +0200
> ++++ latencytop-0.5/Makefile  2009-10-05 10:12:19.000000000 +0200
> +@@ -26,10 +26,10 @@ endif
> + 
> + # We write explicity this "implicit rule"
> + %.o : %.c
> +-    gcc -c $(CFLAGS) $(XCFLAGS) $< -o $@
> ++    ${CROSS_COMPILE}gcc -c $(CFLAGS) $(CPPFLAGS) $(XCFLAGS) $< -o $@
> + 
> + latencytop:  $(OBJS) latencytop.h Makefile
> +-    gcc $(CFLAGS) $(OBJS) $(LDF) -o latencytop 
> ++    ${CROSS_COMPILE}gcc $(CFLAGS) $(LDFLAGS) $(OBJS) $(LDF) -o latencytop 
> + 
> + clean:
> +     rm -f *~ latencytop DEADJOE *.o

use $(CC) instead of ${CROSS_COMPILE}gcc

> diff --git a/patches/latencytop-0.5/series b/patches/latencytop-0.5/series
> new file mode 100644
> index 0000000..6df9c60
> --- /dev/null
> +++ b/patches/latencytop-0.5/series
> @@ -0,0 +1,2 @@
> +no-gtk-ui.patch
> +repair-cross-compile.patch
> diff --git a/rules/latencytop.in b/rules/latencytop.in
> new file mode 100644
> index 0000000..5fca73f
> --- /dev/null
> +++ b/rules/latencytop.in
> @@ -0,0 +1,24 @@
> +## SECTION=shell_and_console
> +
> +config LATENCYTOP
> +     tristate
> +     prompt "LatencyTOP"
> +     select GLIB
> +        select NCURSES
> +        select NCURSES_WIDE_CHAR

use tabs please

> +     help
> +       Skipping audio, slower servers, everyone knows the symptoms of 
> latency.
> +       But to know what's going on in the system, what's causing the 
> latency, how
> +       to fix it... that's a hard question without good answers right now.
> +       LatencyTOP is a Linux* tool for software developers (both kernel and 
> userspace),
> +       aimed at identifying where in the system latency is happening, and 
> what kind
> +       of operation/action is causing the latency to happen so that the code 
> can
> +       be changed to avoid the worst latency hiccups.
> +       There are many types and causes of latency. LatencyTOP focuses on the 
> type
> +       of latency that causes skips in audio, stutters in your desktop 
> experience
> +       or that overloads your server (while you have plenty of CPU power 
> left).
> +       LatencyTOP focuses on the cases where the applications want to run and
> +       execute useful code, but there's some resource that's not currently 
> available
> +       (and the kernel then blocks the process). This is done both on a 
> system level
> +       and on a per process level, so that you can see what's happening to 
> the system,
> +       and which process is suffering and/or causing the delays.
> diff --git a/rules/latencytop.make b/rules/latencytop.make
> new file mode 100644
> index 0000000..d0c9825
> --- /dev/null
> +++ b/rules/latencytop.make
> @@ -0,0 +1,74 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2010 by Remy Bohmer <[email protected]>
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LATENCYTOP) += latencytop
> +
> +#
> +# Paths and names
> +#
> +LATENCYTOP_VERSION   := 0.5
> +LATENCYTOP           := latencytop-$(LATENCYTOP_VERSION)
> +LATENCYTOP_SUFFIX    := tar.gz
> +LATENCYTOP_URL               := 
> http://www.latencytop.org/download/$(LATENCYTOP).$(LATENCYTOP_SUFFIX)
> +LATENCYTOP_SOURCE    := $(SRCDIR)/$(LATENCYTOP).$(LATENCYTOP_SUFFIX)
> +LATENCYTOP_DIR               := $(BUILDDIR)/$(LATENCYTOP)
> +LATENCYTOP_LICENSE   := GPLv2
> +
> +# 
> ----------------------------------------------------------------------------
> +# Get
> +# 
> ----------------------------------------------------------------------------
> +
> +$(LATENCYTOP_SOURCE):
> +     @$(call targetinfo)
> +     @$(call get, LATENCYTOP)
> +
> +# 
> ----------------------------------------------------------------------------
> +# Prepare
> +# 
> ----------------------------------------------------------------------------
> +
> +LATENCYTOP_PATH      := PATH=$(CROSS_PATH)
> +LATENCYTOP_ENV       := $(CROSS_ENV)
> +LATENCYTOP_COMPILE_ENV := \
> +             CROSS_COMPILE=$(COMPILER_PREFIX) \

$(CROSS_ENV_CC)
that will define CC

> +             SYSROOT=$(SYSROOT) \
> +             $(CROSS_ENV_FLAGS)
> +
> +$(STATEDIR)/latencytop.prepare:
> +     @$(call targetinfo)
> +     @$(call touch)

LATENCYTOP_CONF_TOOL := NO

instead of the empty prepare stage

> +
> +# 
> ----------------------------------------------------------------------------
> +# Target-Install
> +# 
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/latencytop.targetinstall:
> +     @$(call targetinfo)
> +
> +     @$(call install_init,  latencytop)
> +     @$(call install_fixup, latencytop,PACKAGE,latencytop)
> +     @$(call install_fixup, latencytop,PRIORITY,optional)
> +     @$(call install_fixup, latencytop,VERSION,$(LATENCYTOP_VERSION))
> +     @$(call install_fixup, latencytop,SECTION,base)
> +     @$(call install_fixup, latencytop,AUTHOR,"Remy Bohmer 
> <[email protected]>")
> +     @$(call install_fixup, latencytop,DEPENDS,)
> +     @$(call install_fixup, latencytop,DESCRIPTION,missing)
> +
> +     @$(call install_copy, latencytop, 0, 0, 0644, 
> $(LATENCYTOP_DIR)/latencytop.trans, /usr/share/latencytop/latencytop.trans, n)
> +     @$(call install_copy, latencytop, 0, 0, 0755, 
> $(LATENCYTOP_DIR)/latencytop, /usr/sbin/latencytop)

@$(call install_copy, latencytop, 0, 0, 0644, -, 
/usr/share/latencytop/latencytop.trans)
@$(call install_copy, latencytop, 0, 0, 0755, -, /usr/sbin/latencytop)

These are properly installed if I read the install target in the makefile 
correctly.



> +
> +     @$(call install_finish, latencytop)
> +
> +     @$(call touch)
> +
> +
> +# vim: syntax=make
> -- 
> 1.7.0.4
> 
> 
> -- 
> ptxdist mailing list
> [email protected]
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
[email protected]

Reply via email to