Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit master 1/1] ipsec-tools: breaks with parallel builds
From: Peter Korsgaard @ 2010-10-05 10:08 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=f40cb9cb5474ffe06bf05371593c6a9a8ef0d330
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                            |   10 +++++-----
 package/ipsec-tools/ipsec-tools.mk |    1 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/CHANGES b/CHANGES
index 4a382a2..9ca8a29 100644
--- a/CHANGES
+++ b/CHANGES
@@ -29,11 +29,11 @@
 	docker, dosfstools, dropbear, e2fsprogs, expat, ezxml, fbset,
 	fconfig, ffmpeg, freetype, gadgetfs-test, gamin, gawk, gperf,
 	gtk2-themes, gtkperf, gvfs, haserl, hdparm, hostapd, hwdata,
-	ifplugd, imagemagick, iperf, iproute2, iptables, iw, jpeg,
-	kexec, kismet, less, libcgi, libcurl, libdaemon, libdnet,
-	liberation, libevent, libeXosip2, libglade, libgtk2, libiconv,
-	libidn, libmms, libnl, liboil, libosip2, libpcap, libpng,
-	libtool, libungif, libxml2, libxslt, lighttpd, lite,
+	ifplugd, imagemagick, iperf, ipsec-tools, iproute2, iptables,
+	iw, jpeg, kexec, kismet, less, libcgi, libcurl, libdaemon,
+	libdnet, liberation, libevent, libeXosip2, libglade, libgtk2,
+	libiconv, libidn, libmms, libnl, liboil, libosip2, libpcap,
+	libpng, libtool, libungif, libxml2, libxslt, lighttpd, lite,
 	lm-sensors, lockfile-progs, logrotate, m4, mdadm, mesa3d,
 	metacity, mtd-utils, mysql_client, nano, nbd, ncftp, neon,
 	netperf, netsnmp, ng-spice-rework, ntfsprogs, ntp, openntpd,
diff --git a/package/ipsec-tools/ipsec-tools.mk b/package/ipsec-tools/ipsec-tools.mk
index eddc7ce..0861a05 100644
--- a/package/ipsec-tools/ipsec-tools.mk
+++ b/package/ipsec-tools/ipsec-tools.mk
@@ -8,6 +8,7 @@ IPSEC_TOOLS_VERSION = 0.7.3
 IPSEC_TOOLS_SOURCE = ipsec-tools-$(IPSEC_TOOLS_VERSION).tar.bz2
 IPSEC_TOOLS_SITE = http://ftp.sunet.se/pub/NetBSD/misc/ipsec-tools/0.7/
 IPSEC_TOOLS_INSTALL_STAGING = YES
+IPSEC_TOOLS_MAKE = $(MAKE1)
 IPSEC_TOOLS_DEPENDENCIES = openssl flex host-flex
 
 # configure hardcodes -Werror, so override CFLAGS on make invocation
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] hdparm: needs largefile support
From: Peter Korsgaard @ 2010-10-05 10:08 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=c1d0fae7d0226f044ffab26965213d9785deca27
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/hdparm/Config.in |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/package/hdparm/Config.in b/package/hdparm/Config.in
index 1b57439..32bd247 100644
--- a/package/hdparm/Config.in
+++ b/package/hdparm/Config.in
@@ -1,6 +1,10 @@
 config BR2_PACKAGE_HDPARM
 	bool "hdparm"
+	depends on BR2_LARGEFILE
 	help
 	  hdparm - get/set hard disk parameters for Linux IDE drives.
 
 	  http://www.ibiblio.org/pub/Linux/system/hardware/
+
+comment "hdparm requires a toolchain with LARGEFILE support"
+	depends on !BR2_LARGEFILE
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] Sparc Leon patches
From: Konrad Eisele @ 2010-10-05 10:48 UTC (permalink / raw)
  To: buildroot

H,
I prepared 3 Sparc Leon patches. I'll send them as replay to this mail in
a minute. In short they do the following.

0001-config-Add-sparc-leon-processors.-Readd-V7-8-part-of.patch:
 Add Sparc Leon processors to target config.

0003-gcc-patch-Add-patch-for-4.4.5-to-support-Sparc-leon-.patch:
 Add support for gcc configure option --with-cpu.

0002-toolchain-Add-support-for-with-cpu.patch:
 Add gcc patch for 4.4.5 that enables the Sparc Leon variants.

I hope the formatting is ok.

-- Greetings Konrad

^ permalink raw reply

* [Buildroot] [PATCH 1/3] config: Add sparc-leon processors. Readd V7, 8 part of BR2_SPARC_TYPE. Add BR2_GCC_TARGET_CPU. Remove depricated v9 Sparc type.
From: Konrad Eisele @ 2010-10-05 10:50 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4CAB0299.2010903@gaisler.com>

Add the Sparc processor variants hfleon (fpu,v7), hfleonv8 (fpu,v8),
sfleon (softfpu,v7) sfleonv8 (softfpu,v8). Readd the prevously removed BR2_SPARC_TYPE
entry for V7 and V8 as for it is used by uclibc to destinguish between v7 and v8.
Also add entry BR2_GCC_TARGET_CPU that is later used by toolchain/gcc/gcc-uclibc-4.x.mk
to add possblity for adding --with-cpu to gcc's configure. As for V9 seems to be removed
also removed the V9 targets from the choice selection.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
 target/Config.in.arch |   31 +++++++++++++++++++------------
 1 files changed, 19 insertions(+), 12 deletions(-)

diff --git a/target/Config.in.arch b/target/Config.in.arch
index e08ce5b..d828501 100644
--- a/target/Config.in.arch
+++ b/target/Config.in.arch
@@ -304,6 +304,14 @@ config BR2_sparc_cypress
 	bool "cypress"
 config BR2_sparc_v8
 	bool "v8"
+config BR2_sparc_sparchfleon
+	bool "hfleon"
+config BR2_sparc_sparchfleonv8
+	bool "hfleonv8"
+config BR2_sparc_sparcsfleon
+	bool "sfleon"
+config BR2_sparc_sparcsfleonv8
+	bool "sfleonv8"
 config BR2_sparc_supersparc
 	bool "supersparc"
 config BR2_sparc_sparclite
@@ -320,20 +328,13 @@ config BR2_sparc_sparclet
 	bool "sparclet"
 config BR2_sparc_tsc701
 	bool "tsc701"
-config BR2_sparc_v9
-	bool "v9"
-config BR2_sparc_v9a
-	bool "v9a"
-config BR2_sparc_v9b
-	bool "v9b"
-config BR2_sparc_ultrasparc
-	bool "ultrasparc"
-config BR2_sparc_ultrasparc3
-	bool "ultrasparc3"
-config BR2_sparc_niagara
-	bool "niagara"
 endchoice
 
+config BR2_SPARC_TYPE
+	string
+	default V7	if BR2_sparc_v7 || BR2_sparc_cypress || BR2_sparc_sparclite || BR2_sparc_f930 || BR2_sparc_f934 || BR2_sparc_sparclite86x || BR2_sparc_sparclet || BR2_sparc_tsc701 || BR2_sparc_sparchfleon || BR2_sparc_sparcsfleon
+	default V8	if BR2_sparc_v8 || BR2_sparc_supersparc || BR2_sparc_hypersparc || BR2_sparc_sparchfleonv8 || BR2_sparc_sparcsfleonv8
+
 choice
 	prompt "Target Architecture Variant"
 	depends on BR2_xtensa
@@ -666,3 +667,9 @@ config BR2_GCC_TARGET_ABI
 	default ibmlongdouble	if BR2_powerpc && BR2_PPC_ABI_ibmlongdouble
 	default ieeelongdouble	if BR2_powerpc && BR2_PPC_ABI_ieeelongdouble
 
+config BR2_GCC_TARGET_CPU
+	string
+	default sparchfleon	if BR2_sparc_sparchfleon
+	default sparchfleonv8	if BR2_sparc_sparchfleonv8
+	default sparcsfleon	if BR2_sparc_sparcsfleon
+	default sparcsfleonv8	if BR2_sparc_sparcsfleonv8
-- 
1.6.3.2

^ permalink raw reply related

* [Buildroot] [PATCH 2/3] toolchain: Add support for --with-cpu
From: Konrad Eisele @ 2010-10-05 10:50 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4CAB0299.2010903@gaisler.com>

Add support for gcc configuration switch --with-cpu. Uses newly added
BR2_GCC_TARGET_CPU from the target config.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
 toolchain/gcc/Makefile.in       |    3 +++
 toolchain/gcc/gcc-uclibc-4.x.mk |    8 ++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/toolchain/gcc/Makefile.in b/toolchain/gcc/Makefile.in
index b6ebca9..2e55ed0 100644
--- a/toolchain/gcc/Makefile.in
+++ b/toolchain/gcc/Makefile.in
@@ -37,6 +37,9 @@ endif
 ifneq ($(call qstrip,$(BR2_GCC_TARGET_ABI)),)
 GCC_WITH_ABI:=--with-abi=$(BR2_GCC_TARGET_ABI)
 endif
+ifneq ($(call qstrip,$(BR2_GCC_TARGET_CPU)),)
+GCC_WITH_CPU:=--with-cpu=$(BR2_GCC_TARGET_CPU)
+endif
 
 # AVR32 GCC configuration
 ifeq ($(BR2_avr32),y)
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index f17b73f..d40731d 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -211,7 +211,7 @@ $(GCC_BUILD_DIR1)/.configured: $(GCC_DIR)/.patched
 		$(THREADS) \
 		$(GCC_DECIMAL_FLOAT) \
 		$(SOFT_FLOAT_CONFIG_OPTION) \
-		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
 		$(EXTRA_GCC1_CONFIG_OPTIONS) \
 		$(QUIET) \
@@ -287,7 +287,7 @@ $(GCC_BUILD_DIR2)/.configured: $(GCC_DIR)/.patched
 		$(MULTILIB) \
 		$(GCC_DECIMAL_FLOAT) \
 		$(SOFT_FLOAT_CONFIG_OPTION) \
-		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
 		$(EXTRA_GCC2_CONFIG_OPTIONS) \
 		$(QUIET) \
@@ -362,7 +362,7 @@ $(GCC_BUILD_DIR3)/.configured: $(GCC_SRC_DIR)/.patched $(GCC_STAGING_PREREQ)
 		$(THREADS) \
 		$(GCC_DECIMAL_FLOAT) \
 		$(SOFT_FLOAT_CONFIG_OPTION) \
-		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(DISABLE_LARGEFILE) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
 		$(EXTRA_GCC2_CONFIG_OPTIONS) \
@@ -495,7 +495,7 @@ $(GCC_BUILD_DIR4)/.configured: $(GCC_BUILD_DIR4)/.prepared
 		$(THREADS) \
 		$(GCC_DECIMAL_FLOAT) \
 		$(SOFT_FLOAT_CONFIG_OPTION) \
-		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) \
+		$(GCC_WITH_ABI) $(GCC_WITH_ARCH) $(GCC_WITH_TUNE) $(GCC_WITH_CPU) \
 		$(DISABLE_LARGEFILE) \
 		$(EXTRA_GCC_CONFIG_OPTIONS) \
 		$(EXTRA_TARGET_GCC_CONFIG_OPTIONS) \
-- 
1.6.3.2

^ permalink raw reply related

* [Buildroot] [PATCH 3/3] gcc-patch: Add patch for 4.4.5 to support Sparc-leon processors
From: Konrad Eisele @ 2010-10-05 10:50 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <4CAB0299.2010903@gaisler.com>

Gcc patch that adds hfleon (fpu,v7), hfleonv8 (fpu, v8), sfleon (softfpu,v7),
sfleonv8 (softfpu,v8) SPARC variants. Default cpu is selected with --with-cpu.
Adds leon pipeline descrption to gcc.

Signed-off-by: Konrad Eisele <konrad@gaisler.com>
---
 toolchain/gcc/4.4.5/950-sparc-leon.patch |  206 ++++++++++++++++++++++++++++++
 1 files changed, 206 insertions(+), 0 deletions(-)
 create mode 100644 toolchain/gcc/4.4.5/950-sparc-leon.patch

diff --git a/toolchain/gcc/4.4.5/950-sparc-leon.patch b/toolchain/gcc/4.4.5/950-sparc-leon.patch
new file mode 100644
index 0000000..cdff2bb
--- /dev/null
+++ b/toolchain/gcc/4.4.5/950-sparc-leon.patch
@@ -0,0 +1,206 @@
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/leon.md gcc-4.4.5/gcc/config/sparc/leon.md
+--- gcc-4.4.5.ori/gcc/config/sparc/leon.md	1970-01-01 01:00:00.000000000 +0100
++++ gcc-4.4.5/gcc/config/sparc/leon.md	2010-10-05 11:47:08.000000000 +0200
+@@ -0,0 +1,56 @@
++;; Scheduling description for Leon.
++;;   Copyright (C) 2010 Free Software Foundation, Inc.
++;;
++;; This file is part of GCC.
++;;
++;; GCC is free software; you can redistribute it and/or modify
++;; it under the terms of the GNU General Public License as published by
++;; the Free Software Foundation; either version 3, or (at your option)
++;; any later version.
++;;
++;; GCC is distributed in the hope that it will be useful,
++;; but WITHOUT ANY WARRANTY; without even the implied warranty of
++;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++;; GNU General Public License for more details.
++;;
++;; You should have received a copy of the GNU General Public License
++;; along with GCC; see the file COPYING3.  If not see
++;; <http://www.gnu.org/licenses/>.
++
++
++(define_automaton "leon")
++
++(define_cpu_unit "leon_memory, leon_fpalu" "leon")
++(define_cpu_unit "leon_fpmds" "leon")
++(define_cpu_unit "write_buf" "leon")
++
++(define_insn_reservation "leon_load" 1
++  (and (eq_attr "cpu" "leon")
++    (eq_attr "type" "load,sload,fpload"))
++  "leon_memory")
++
++(define_insn_reservation "leon_store" 1
++  (and (eq_attr "cpu" "leon")
++    (eq_attr "type" "store,fpstore"))
++  "leon_memory+write_buf")
++  
++(define_insn_reservation "leon_fp_alu" 1
++  (and (eq_attr "cpu" "leon")
++    (eq_attr "type" "fp,fpmove"))
++  "leon_fpalu, nothing")
++
++(define_insn_reservation "leon_fp_mult" 1
++  (and (eq_attr "cpu" "leon")
++    (eq_attr "type" "fpmul"))
++  "leon_fpmds, nothing")
++
++(define_insn_reservation "leon_fp_div" 16
++  (and (eq_attr "cpu" "leon")
++    (eq_attr "type" "fpdivs,fpdivd"))
++  "leon_fpmds, nothing*15")
++
++(define_insn_reservation "leon_fp_sqrt" 23
++  (and (eq_attr "cpu" "leon")
++    (eq_attr "type" "fpsqrts,fpsqrtd"))
++  "leon_fpmds, nothing*21")
++
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/sparc.c gcc-4.4.5/gcc/config/sparc/sparc.c
+--- gcc-4.4.5.ori/gcc/config/sparc/sparc.c	2010-10-05 11:46:07.000000000 +0200
++++ gcc-4.4.5/gcc/config/sparc/sparc.c	2010-10-05 11:47:08.000000000 +0200
+@@ -246,6 +246,30 @@
+   0, /* shift penalty */
+ };
+ 
++static const
++struct processor_costs leon_costs = {
++  COSTS_N_INSNS (1), /* int load */
++  COSTS_N_INSNS (1), /* int signed load */
++  COSTS_N_INSNS (1), /* int zeroed load */
++  COSTS_N_INSNS (1), /* float load */
++  COSTS_N_INSNS (1), /* fmov, fneg, fabs */
++  COSTS_N_INSNS (1), /* fadd, fsub */
++  COSTS_N_INSNS (1), /* fcmp */
++  COSTS_N_INSNS (1), /* fmov, fmovr */
++  COSTS_N_INSNS (1), /* fmul */
++  COSTS_N_INSNS (15), /* fdivs */
++  COSTS_N_INSNS (15), /* fdivd */
++  COSTS_N_INSNS (23), /* fsqrts */
++  COSTS_N_INSNS (23), /* fsqrtd */
++  COSTS_N_INSNS (5), /* imul */
++  COSTS_N_INSNS (5), /* imulX */
++  0, /* imul bit factor */
++  COSTS_N_INSNS (5), /* idiv */
++  COSTS_N_INSNS (5), /* idivX */
++  COSTS_N_INSNS (1), /* movcc/movr */
++  0, /* shift penalty */
++};
++
+ const struct processor_costs *sparc_costs = &cypress_costs;
+ 
+ #ifdef HAVE_AS_RELAX_OPTION
+@@ -655,6 +679,10 @@
+     { TARGET_CPU_ultrasparc3, "ultrasparc3" },
+     { TARGET_CPU_niagara, "niagara" },
+     { TARGET_CPU_niagara2, "niagara2" },
++    { TARGET_CPU_sparchfleon, "sparchfleon" },
++    { TARGET_CPU_sparchfleonv8, "sparchfleonv8" },
++    { TARGET_CPU_sparcsfleon, "sparcsfleon" },
++    { TARGET_CPU_sparcsfleonv8, "sparcsfleonv8" },
+     { 0, 0 }
+   };
+   const struct cpu_default *def;
+@@ -693,6 +721,11 @@
+     /* UltraSPARC T1 */
+     { "niagara", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9|MASK_DEPRECATED_V8_INSNS},
+     { "niagara2", PROCESSOR_NIAGARA, MASK_ISA, MASK_V9},
++    /* SPARC-LEON */
++    { "sparchfleon",   PROCESSOR_LEON, MASK_ISA, MASK_FPU },
++    { "sparchfleonv8", PROCESSOR_LEON, MASK_ISA & ~(MASK_V8), MASK_V8|MASK_FPU },
++    { "sparcsfleon",   PROCESSOR_LEON, MASK_ISA | MASK_FPU, 0 },
++    { "sparcsfleonv8", PROCESSOR_LEON, (MASK_ISA | MASK_FPU) & ~(MASK_V8), MASK_V8 },
+     { 0, 0, 0, 0 }
+   };
+   const struct cpu_table *cpu;
+@@ -859,6 +892,9 @@
+     case PROCESSOR_NIAGARA2:
+       sparc_costs = &niagara2_costs;
+       break;
++    case PROCESSOR_LEON:
++      sparc_costs = &leon_costs;
++      break;
+     };
+ 
+ #ifdef TARGET_DEFAULT_LONG_DOUBLE_128
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/sparc.h gcc-4.4.5/gcc/config/sparc/sparc.h
+--- gcc-4.4.5.ori/gcc/config/sparc/sparc.h	2010-10-05 11:46:07.000000000 +0200
++++ gcc-4.4.5/gcc/config/sparc/sparc.h	2010-10-05 11:47:08.000000000 +0200
+@@ -243,6 +243,10 @@
+ #define TARGET_CPU_ultrasparc3	9
+ #define TARGET_CPU_niagara	10
+ #define TARGET_CPU_niagara2	11
++#define TARGET_CPU_sparchfleon  12
++#define TARGET_CPU_sparchfleonv8 13
++#define TARGET_CPU_sparcsfleon  14
++#define TARGET_CPU_sparcsfleonv8 15
+ 
+ #if TARGET_CPU_DEFAULT == TARGET_CPU_v9 \
+  || TARGET_CPU_DEFAULT == TARGET_CPU_ultrasparc \
+@@ -299,6 +303,26 @@
+ #define ASM_CPU32_DEFAULT_SPEC "-Asparclite"
+ #endif
+ 
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparchfleon
++#define CPP_CPU32_DEFAULT_SPEC "-Dsparcleon"
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparcsfleon
++#define CPP_CPU32_DEFAULT_SPEC "-Dsparcleon -D_SOFT_FLOAT"
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparchfleonv8
++#define CPP_CPU32_DEFAULT_SPEC "-Dsparcleon -D__sparc_v8__ "
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
++#if TARGET_CPU_DEFAULT == TARGET_CPU_sparcsfleonv8
++#define CPP_CPU32_DEFAULT_SPEC "-Dleon -D__sparc_v8__ -D_SOFT_FLOAT"
++#define ASM_CPU32_DEFAULT_SPEC ""
++#endif
++
+ #if TARGET_CPU_DEFAULT == TARGET_CPU_supersparc
+ #define CPP_CPU32_DEFAULT_SPEC "-D__supersparc__ -D__sparc_v8__"
+ #define ASM_CPU32_DEFAULT_SPEC ""
+@@ -533,6 +557,7 @@
+   PROCESSOR_V7,
+   PROCESSOR_CYPRESS,
+   PROCESSOR_V8,
++  PROCESSOR_LEON,
+   PROCESSOR_SUPERSPARC,
+   PROCESSOR_SPARCLITE,
+   PROCESSOR_F930,
+diff -Naur gcc-4.4.5.ori/gcc/config/sparc/sparc.md gcc-4.4.5/gcc/config/sparc/sparc.md
+--- gcc-4.4.5.ori/gcc/config/sparc/sparc.md	2010-10-05 11:46:07.000000000 +0200
++++ gcc-4.4.5/gcc/config/sparc/sparc.md	2010-10-05 11:47:08.000000000 +0200
+@@ -89,6 +89,7 @@
+   "v7,
+    cypress,
+    v8,
++   leon,
+    supersparc,
+    sparclite,f930,f934,
+    hypersparc,sparclite86x,
+@@ -320,6 +321,7 @@
+ (include "ultra3.md")
+ (include "niagara.md")
+ (include "niagara2.md")
++(include "leon.md")
+ 
+ 
+ ;; Operand and operator predicates and constraints
+diff -Naur gcc-4.4.5.ori/gcc/config.gcc gcc-4.4.5/gcc/config.gcc
+--- gcc-4.4.5.ori/gcc/config.gcc	2010-10-05 11:46:08.000000000 +0200
++++ gcc-4.4.5/gcc/config.gcc	2010-10-05 11:47:08.000000000 +0200
+@@ -2998,6 +2998,7 @@
+ 			case ${val} in
+ 			"" | sparc | sparcv9 | sparc64 | sparc86x \
+ 			| v7 | cypress | v8 | supersparc | sparclite | f930 \
++			| sparchfleon | sparcsfleon | sparchfleonv8 | sparcsfleonv8 \
+ 			| f934 | hypersparc | sparclite86x | sparclet | tsc701 \
+ 			| v9 | ultrasparc | ultrasparc3 | niagara | niagara2)
+ 				# OK
-- 
1.6.3.2

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] libintl: needs wchar like gettext
From: Peter Korsgaard @ 2010-10-05 11:24 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=06d764401d2dc2f8cee15a0e8a2c68d31b6ad2d8
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 CHANGES                   |   22 +++++++++++-----------
 package/gettext/Config.in |    1 +
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/CHANGES b/CHANGES
index 9ca8a29..d93e9e1 100644
--- a/CHANGES
+++ b/CHANGES
@@ -32,17 +32,17 @@
 	ifplugd, imagemagick, iperf, ipsec-tools, iproute2, iptables,
 	iw, jpeg, kexec, kismet, less, libcgi, libcurl, libdaemon,
 	libdnet, liberation, libevent, libeXosip2, libglade, libgtk2,
-	libiconv, libidn, libmms, libnl, liboil, libosip2, libpcap,
-	libpng, libtool, libungif, libxml2, libxslt, lighttpd, lite,
-	lm-sensors, lockfile-progs, logrotate, m4, mdadm, mesa3d,
-	metacity, mtd-utils, mysql_client, nano, nbd, ncftp, neon,
-	netperf, netsnmp, ng-spice-rework, ntfsprogs, ntp, openntpd,
-	openssh, openvpn, oprofile, pango, patch, pcre, php,
-	pkg-config, prboom, radvd, rdesktop, ruby, qt, quagga, samba,
-	sawman, sdl_mixer, sdl_sound, setserial, shared-mime-info,
-	speex, sqlite, squashfs, strace, sylpheed, taglib, tcpdump,
-	thttpd, tiff, tn5250, udev, udpcast, usbmount, usbutils,
-	vsftpd, vtun, which, wpa_supplicant,
+	libiconv, libidn, libintl, libmms, libnl, liboil, libosip2,
+	libpcap, libpng, libtool, libungif, libxml2, libxslt,
+	lighttpd, lite, lm-sensors, lockfile-progs, logrotate, m4,
+	mdadm, mesa3d, metacity, mtd-utils, mysql_client, nano, nbd,
+	ncftp, neon, netperf, netsnmp, ng-spice-rework, ntfsprogs,
+	ntp, openntpd, openssh, openvpn, oprofile, pango, patch, pcre,
+	php, pkg-config, prboom, radvd, rdesktop, ruby, qt, quagga,
+	samba, sawman, sdl_mixer, sdl_sound, setserial,
+	shared-mime-info, speex, sqlite, squashfs, strace, sylpheed,
+	taglib, tcpdump, thttpd, tiff, tn5250, udev, udpcast,
+	usbmount, usbutils, vsftpd, vtun, which, wpa_supplicant,
 	xdriver_xf86-input-{acecad,aiptek,evdev,joystick,keyboard},
 	xdriver-xf86-input-{mouse,synaptics,vmmouse,void},
 	xdriver-xf86-video-{apm,ark,ast,ati,chips,cirrus,dummy,fbdev},
diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index c1ae97f..fabfe1e 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -27,6 +27,7 @@ config BR2_PACKAGE_GETTEXT_STATIC
 config BR2_PACKAGE_LIBINTL
 	bool "libintl"
 	depends on BR2_NEEDS_GETTEXT
+	depends on BR2_USE_WCHAR
 	help
 	  Selecting this package installs all of gettext in the staging
 	  directory and the shared library for it's use in the target.
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH 01/10] input-tools: convert to gentargets
From: Martin Banky @ 2010-10-05 18:38 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20101005111715.6559e7d2@surf>

Thomas,
     I got the Debian patch routine from the cvs package, when I was
converting it. I just figured that there was some type of formatting issue
in the debian patches that needed to be addressed. If I read it correctly,
it looks like it strips any prefix from the name of the package to patch. I
must confess, I'm not very good with sed. Is this something that doesn't
need to be done? If so, just let me know, and I'll change the packages that
are affected.
     As to the *_TOOLS_BUILD_CMDS issue, until now, I thought that the hooks
were only available for the autotargets packages. I just re-read that
section in the Usage and documentation page, and it looks like you can use
the hooks in a gentargets package. I'll try it out, and change the packages
that have that issue.

Martin

On Tue, Oct 5, 2010 at 2:17 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> Thanks Martin for doing all this conversion work, this is much
> appreciated!
>
> On Tue,  5 Oct 2010 01:22:34 -0700
> Martin Banky <martin.banky@gmail.com> wrote:
>
> > +define INPUT_TOOLS_DEBIAN_PATCHES
> > +     if [ -d $(@D)/debian/patches ]; then \
> > +             (cd $(@D)/debian/patches && for i in *; \
> > +              do $(SED) 's,^\+\+\+
> .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,'
> $$i; \
>
> I have seen this in several of your patches, but I don't understand why
> it is here. There are several other packages that do apply the debian
> patches, but such a sed step is not needed.
>
> > +define INPUT_TOOLS_BUILD_CMDS
> > +     $(INPUT_TOOLS_DEBIAN_PATCHES)
>
> Even though it doesn't technically make any difference, I'd prefer to
> have this as a post-patch hook.
>
> Thanks!
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/a61967bb/attachment.html>

^ permalink raw reply

* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Martin Banky @ 2010-10-05 18:54 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20101005112147.2bc80d0e@surf>

Thomas,
     I guess I should have explained this better. What I meant about
microcom being a flat archive, is that when you extract it, it does not
create a directory for itself. It just sticks its files, without a directory
being created, in the current directory. $(TAR_STRIP_COMPONENTS)=1 is
'Automatically detect tar --strip-path/components option', which, equates to
either --strip-path or --strip-components, depending on the version of tar.
Per the man page: --strip-components = 'strip NUMBER leading components from
file names on extraction', which means that for microcom, which doesn't have
a directory structure, it strips all the file names off, so no files
actually get extracted. This in turn, means that the patch routine does not
work. Hence, the reason for manually patching microcom. If you have a better
solution, I'd appreciate it, if you would show me, because I couldn't figure
one out. I hope this makes more sense.

Martin

On Tue, Oct 5, 2010 at 2:21 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> On Tue,  5 Oct 2010 01:22:38 -0700
> Martin Banky <martin.banky@gmail.com> wrote:
>
> > +define MICROCOM_CONFIGURE_CMDS
> > +     $(ZCAT) $(DL_DIR)/$(MICROCOM_SOURCE) | tar -C $(@D) $(TAR_OPTIONS)
> -
>
> This sounds strange to me. The extraction is already done by the
> package infrastructure.
>
> >       toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/
> \*.patch
>
> This as well.
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/f8254073/attachment.html>

^ permalink raw reply

* [Buildroot] [PATCH 06/10] microperl: convert to gentargets
From: Martin Banky @ 2010-10-05 19:10 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <20101005111943.7ed624fa@surf>

Thomas,
     To be honest, I didn't delve into the reason why Errno.pm is needed by
the host. Also, the original makefile did not seem to really differentiate
between host and target. It modified the source and built both the host and
target from this one modified set of files. This is why I didn't create a
host build. I realize that 'ext/util/make_ext nonxs Errno MAKE="$(firstword
$(MAKE))" \' builds the host Errno.pm portion, but by that time so much work
has already been done, it seemed wasteful to repeat it for the target. I
couldn't figure out what modifications were only necessary for the host, and
which for the target, or if they were needed for both. I'm open to
suggestions.

Martin

On Tue, Oct 5, 2010 at 2:19 AM, Thomas Petazzoni <
thomas.petazzoni@free-electrons.com> wrote:

> Hello,
>
> On Tue,  5 Oct 2010 01:22:39 -0700
> Martin Banky <martin.banky@gmail.com> wrote:
>
> > +define MICROPERL_CONFIGURE_CMDS
>
> I am not a huge huge fan of this, because it's subverting the purpose
> of MICROPERL_CONFIGURE_CMDS to do a more-or-less partial build of
> microperl for the host. Do we really need such a partial build ? If so,
> shouldn't we create a host-microperl package ?
>
> Regards,
>
> Thomas
> --
> Thomas Petazzoni, Free Electrons
> Kernel, drivers, real-time and embedded Linux
> development, consulting, training and support.
> http://free-electrons.com
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/79a8df39/attachment.html>

^ permalink raw reply

* [Buildroot] [PATCH 01/10] input-tools: convert to gentargets
From: Martin Banky @ 2010-10-05 19:26 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <AANLkTin3Q3uafh2GjjCuGhg3fMRfb_c1fuKQ96WpkXGx@mail.gmail.com>

Thomas,
     Well, what do you know, post patch does work for gentargets! You learn
something new every day. I'll change the packages that are affected and
repost.
     Ok, I just checked on the cvs Debian patches, and now remember why I
didn't check the sed routine very hard. The patch is over 12,000 lines long,
however I just checked the patch and found at least on instance where the
patch needs to be fixed. Line 9527, '++++
../build-tree.new/cvs-1.12.13/src/root.c    2006-05-05 23:34:12.000000000
+0800' is one reason why the sed routine is needed. I haven't checked the
other patch sets, but it kind of seems that the sed routine might be needed
after all. Thoughts?

Martin

On Tue, Oct 5, 2010 at 11:38 AM, Martin Banky <Martin.Banky@gmail.com>wrote:

> Thomas,
>      I got the Debian patch routine from the cvs package, when I was
> converting it. I just figured that there was some type of formatting issue
> in the debian patches that needed to be addressed. If I read it correctly,
> it looks like it strips any prefix from the name of the package to patch. I
> must confess, I'm not very good with sed. Is this something that doesn't
> need to be done? If so, just let me know, and I'll change the packages that
> are affected.
>      As to the *_TOOLS_BUILD_CMDS issue, until now, I thought that the
> hooks were only available for the autotargets packages. I just re-read that
> section in the Usage and documentation page, and it looks like you can use
> the hooks in a gentargets package. I'll try it out, and change the packages
> that have that issue.
>
> Martin
>
>
> On Tue, Oct 5, 2010 at 2:17 AM, Thomas Petazzoni <
> thomas.petazzoni at free-electrons.com> wrote:
>
>> Hello,
>>
>> Thanks Martin for doing all this conversion work, this is much
>> appreciated!
>>
>> On Tue,  5 Oct 2010 01:22:34 -0700
>> Martin Banky <martin.banky@gmail.com> wrote:
>>
>> > +define INPUT_TOOLS_DEBIAN_PATCHES
>> > +     if [ -d $(@D)/debian/patches ]; then \
>> > +             (cd $(@D)/debian/patches && for i in *; \
>> > +              do $(SED) 's,^\+\+\+
>> .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,'
>> $$i; \
>>
>> I have seen this in several of your patches, but I don't understand why
>> it is here. There are several other packages that do apply the debian
>> patches, but such a sed step is not needed.
>>
>> > +define INPUT_TOOLS_BUILD_CMDS
>> > +     $(INPUT_TOOLS_DEBIAN_PATCHES)
>>
>> Even though it doesn't technically make any difference, I'd prefer to
>> have this as a post-patch hook.
>>
>> Thanks!
>>
>> Thomas
>> --
>> Thomas Petazzoni, Free Electrons
>> Kernel, drivers, real-time and embedded Linux
>> development, consulting, training and support.
>> http://free-electrons.com
>> _______________________________________________
>> buildroot mailing list
>> buildroot at busybox.net
>> http://lists.busybox.net/mailman/listinfo/buildroot
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/d5c51630/attachment-0001.html>

^ permalink raw reply

* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Peter Korsgaard @ 2010-10-05 19:48 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <AANLkTim76qFFMTStNN-D_ompE2Bcw+ZeT0aWgBE3bd=e@mail.gmail.com>

>>>>> "Martin" == Martin Banky <Martin.Banky@gmail.com> writes:

 Martin> Thomas,

 Martin> ???? I guess I should have explained this better. What I meant
 Martin> about microcom being a flat archive, is that when you extract
 Martin> it, it does not create a directory for itself. It just sticks
 Martin> its files, without a directory being created, in the current
 Martin> directory. $(TAR_STRIP_COMPONENTS)=1 is 'Automatically detect
 Martin> tar --strip-path/components option', which, equates to either
 Martin> --strip-path or --strip-components, depending on the version of
 Martin> tar. Per the man page: --strip-components = 'strip NUMBER
 Martin> leading components from file names on extraction', which means
 Martin> that for microcom, which doesn't have a directory structure, it
 Martin> strips all the file names off, so no files actually get
 Martin> extracted. This in turn, means that the patch routine does not
 Martin> work. Hence, the reason for manually patching microcom. If you
 Martin> have a better solution, I'd appreciate it, if you would show
 Martin> me, because I couldn't figure one out. I hope this makes more
 Martin> sense.

Maybe we should just get rid of the microcom package instead? It was
integrated into busybox a few years ago, which is also why it was marked
as deprecated.

I'll remove it later this week unless someone complains.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 0/2] Resubmit converted gentargets
From: Martin Banky @ 2010-10-05 20:04 UTC (permalink / raw)
  To: buildroot

As Thomas pointed out, gentargets can use post patch hooks. I've changed these
two packages to apply the debian patches in the post patch hooks.

[PATCH 1/2] input-tools: convert to gentargets
[PATCH 2/2] mii-diag: convert to gentargets and bump to 2.11.3

^ permalink raw reply

* [Buildroot] [PATCH 1/2] input-tools: convert to gentargets
From: Martin Banky @ 2010-10-05 20:04 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286309077-26567-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 .../input-tools/input-tools-20051019-rint.patch    |   18 ++++
 package/input-tools/input-tools.mk                 |   88 ++++++++-----------
 package/input-tools/joystick-20051019-rint.patch   |   18 ----
 3 files changed, 55 insertions(+), 69 deletions(-)
 create mode 100644 package/input-tools/input-tools-20051019-rint.patch
 delete mode 100644 package/input-tools/joystick-20051019-rint.patch

diff --git a/package/input-tools/input-tools-20051019-rint.patch b/package/input-tools/input-tools-20051019-rint.patch
new file mode 100644
index 0000000..b2aa13f
--- /dev/null
+++ b/package/input-tools/input-tools-20051019-rint.patch
@@ -0,0 +1,18 @@
+diff -urN joystick-20051019.orig/utils/jscal.c joystick-20051019/utils/jscal.c
+--- joystick-20051019.orig/utils/jscal.c	2004-10-19 09:51:52.000000000 +0200
++++ joystick-20051019/utils/jscal.c	2009-01-18 10:48:50.000000000 +0100
+@@ -141,10 +141,10 @@
+ 	c = 32767.0 / (inputs.cmin[1] - inputs.cmax[0]);
+ 	d = 32767.0 / (inputs.cmin[2] - inputs.cmax[1]);
+ 
+-	results[0] = rint(a);
+-	results[1] = rint(b);
+-	results[2] = rint(c*16384.0);
+-	results[3] = rint(d*16384.0);
++	results[0] = (int) (a + 0.5);
++	results[1] = (int) (b + 0.5);
++	results[2] = (int) (c*16384.0 + 0.5);
++	results[3] = (int) (d*16384.0 + 0.5);
+ 
+ 	return 1;
+ }
diff --git a/package/input-tools/input-tools.mk b/package/input-tools/input-tools.mk
index 9f5eb19..d4decc0 100644
--- a/package/input-tools/input-tools.mk
+++ b/package/input-tools/input-tools.mk
@@ -3,64 +3,50 @@
 # input-tools
 #
 #############################################################
+INPUT_TOOLS_VERSION = 20051019
+INPUT_TOOLS_SOURCE = joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz
+INPUT_TOOLS_PATCH = joystick_$(INPUT_TOOLS_VERSION)-5.diff.gz
+INPUT_TOOLS_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/j/joystick/
 
-INPUT_TOOLS_VERSION:=20051019
-INPUT_TOOLS_SOURCE:=joystick_$(INPUT_TOOLS_VERSION).orig.tar.gz
-INPUT_TOOLS_PATCH:=joystick_$(INPUT_TOOLS_VERSION)-2.diff.gz
-INPUT_TOOLS_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/j/joystick/
-INPUT_TOOLS_DIR:=$(BUILD_DIR)/joystick-$(INPUT_TOOLS_VERSION).orig
-INPUT_TOOLS_CAT:=$(ZCAT)
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_EVTEST) += evtest
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal
+INPUT_TOOLS_TARGETS_$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest
 
-INPUT_TOOLS_TARGETS-y:=
-
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_EVTEST) += evtest
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_INPUTATTACH) += inputattach
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_JSCAL) += jscal
-INPUT_TOOLS_TARGETS-$(BR2_PACKAGE_INPUT_TOOLS_JSTEST) += jstest
-
-INPUT_TOOLS_TARGETS := $(addprefix $(TARGET_DIR)/usr/bin/, $(INPUT_TOOLS_TARGETS-y))
-INPUT_TOOLS_SOURCES := $(addprefix $(INPUT_TOOLS_DIR)/utils/, \
-	$(addsuffix .c, $(INPUT_TOOLS_TARGETS-y)))
-
-$(DL_DIR)/$(INPUT_TOOLS_SOURCE):
-	$(call DOWNLOAD,$(INPUT_TOOLS_SITE),$(@F))
-
-$(DL_DIR)/$(INPUT_TOOLS_PATCH):
-	$(call DOWNLOAD,$(INPUT_TOOLS_SITE),$(@F))
-
-$(INPUT_TOOLS_DIR)/.unpacked: $(DL_DIR)/$(INPUT_TOOLS_SOURCE) $(DL_DIR)/$(INPUT_TOOLS_PATCH)
-	$(INPUT_TOOLS_CAT) $(DL_DIR)/$(INPUT_TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
 ifneq ($(INPUT_TOOLS_PATCH),)
-	(cd $(INPUT_TOOLS_DIR) && $(INPUT_TOOLS_CAT) $(DL_DIR)/$(INPUT_TOOLS_PATCH) | patch -p1)
+define INPUT_TOOLS_DEBIAN_PATCHES
+	if [ -d $(@D)/debian/patches ]; then \
+		(cd $(@D)/debian/patches && for i in *; \
+		 do $(SED) 's,^\+\+\+ .*joystick-$(INPUT_TOOLS_VERSION)/,+++ joystick-$(INPUT_TOOLS_VERSION)/,' $$i; \
+		 done; \
+		); \
+		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
+	fi
+endef
 endif
-	toolchain/patch-kernel.sh $(INPUT_TOOLS_DIR) package/input-tools/ \*.patch
-	touch $@
-
-$(INPUT_TOOLS_SOURCES): $(INPUT_TOOLS_DIR)/.unpacked
 
-$(INPUT_TOOLS_DIR)/utils/%: $(INPUT_TOOLS_DIR)/utils/%.c
-	$(TARGET_CC) $(TARGET_CFLAGS) -o $@ $^
+INPUT_TOOLS_POST_PATCH_HOOKS = INPUT_TOOLS_DEBIAN_PATCHES
 
-$(INPUT_TOOLS_TARGETS): $(TARGET_DIR)/usr/bin/%: $(INPUT_TOOLS_DIR)/utils/%
-	cp -dpf $^ $@
-	$(STRIPCMD) $(STRIP_STRIP_ALL) $@
+define INPUT_TOOLS_BUILD_CMDS
+	(cd $(@D)/utils; \
+		$(TARGET_CC) $(TARGET_CFLAGS) -o evtest evtest.c; \
+		$(TARGET_CC) $(TARGET_CFLAGS) -o inputattach inputattach.c; \
+		$(TARGET_CC) $(TARGET_CFLAGS) -o jscal jscal.c; \
+		$(TARGET_CC) $(TARGET_CFLAGS) -o jstest jstest.c; \
+	)
+endef
 
-input-tools: $(INPUT_TOOLS_TARGETS)
+define INPUT_TOOLS_INSTALL_TARGET_CMDS
+	test -z "$(INPUT_TOOLS_TARGETS_y)" || \
+	install -m 755 $(addprefix $(@D)/utils/,$(INPUT_TOOLS_TARGETS_y)) $(TARGET_DIR)/usr/bin/
+endef
 
-input-tools-source: $(DL_DIR)/$(INPUT_TOOLS_SOURCE) $(DL_DIR)/$(INPUT_TOOLS_PATCH)
+define INPUT_TOOLS_UNINSTALL_TARGET_CMDS
+	rm -f $(addprefix $(TARGET_DIR)/usr/bin/,$(INPUT_TOOLS_TARGETS_y))
+endef
 
-input-tools-unpacked: $(INPUT_TOOLS_DIR)/.unpacked
+define INPUT_TOOLS_CLEAN_CMDS
+	rm -f $(addprefix $(@D)/utils/,$(INPUT_TOOLS_TARGETS_y))
+endef
 
-input-tools-clean:
-	rm -f $(INPUT_TOOLS_TARGETS)
-
-input-tools-dirclean:
-	rm -rf $(INPUT_TOOLS_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_INPUT_TOOLS),y)
-TARGETS+=input-tools
-endif
+$(eval $(call GENTARGETS,package,input-tools))
diff --git a/package/input-tools/joystick-20051019-rint.patch b/package/input-tools/joystick-20051019-rint.patch
deleted file mode 100644
index b2aa13f..0000000
--- a/package/input-tools/joystick-20051019-rint.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff -urN joystick-20051019.orig/utils/jscal.c joystick-20051019/utils/jscal.c
---- joystick-20051019.orig/utils/jscal.c	2004-10-19 09:51:52.000000000 +0200
-+++ joystick-20051019/utils/jscal.c	2009-01-18 10:48:50.000000000 +0100
-@@ -141,10 +141,10 @@
- 	c = 32767.0 / (inputs.cmin[1] - inputs.cmax[0]);
- 	d = 32767.0 / (inputs.cmin[2] - inputs.cmax[1]);
- 
--	results[0] = rint(a);
--	results[1] = rint(b);
--	results[2] = rint(c*16384.0);
--	results[3] = rint(d*16384.0);
-+	results[0] = (int) (a + 0.5);
-+	results[1] = (int) (b + 0.5);
-+	results[2] = (int) (c*16384.0 + 0.5);
-+	results[3] = (int) (d*16384.0 + 0.5);
- 
- 	return 1;
- }
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 2/2] mii-diag: convert to gentargets and bump to 2.11.3
From: Martin Banky @ 2010-10-05 20:04 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286309077-26567-1-git-send-email-Martin.Banky@gmail.com>

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/mii-diag/mii-diag.mk |   79 ++++++++++++++++--------------------------
 1 files changed, 30 insertions(+), 49 deletions(-)

diff --git a/package/mii-diag/mii-diag.mk b/package/mii-diag/mii-diag.mk
index ba01c0e..8d946ae 100644
--- a/package/mii-diag/mii-diag.mk
+++ b/package/mii-diag/mii-diag.mk
@@ -3,59 +3,40 @@
 # mii-diag
 #
 #############################################################
-MIIDIAG_VERSION:=2.11
-MIIDIAG_DEBIAN_PATCH_LEVEL:=2
-MIIDIAG_SOURCE:=mii-diag_$(MIIDIAG_VERSION).orig.tar.gz
-MIIDIAG_PATCH_FILE=mii-diag_$(MIIDIAG_VERSION)-$(MIIDIAG_DEBIAN_PATCH_LEVEL).diff.gz
-MIIDIAG_SITE:=$(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
-MIIDIAG_DIR:=$(BUILD_DIR)/mii-diag-$(MIIDIAG_VERSION)
-MIIDIAG_CAT:=$(ZCAT)
-MIIDIAG_BINARY:=usr/sbin/mii-diag
-
-ifneq ($(MIIDIAG_PATCH_FILE),)
-MIIDIAG_PATCH=$(DL_DIR)/$(MIIDIAG_PATCH_FILE)
-$(MIIDIAG_PATCH):
-	$(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_PATCH_FILE))
-endif
-
-$(DL_DIR)/$(MIIDIAG_SOURCE):
-	$(call DOWNLOAD,$(MIIDIAG_SITE),$(MIIDIAG_SOURCE))
-
-$(MIIDIAG_DIR)/.unpacked: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
-	mkdir -p $(MIIDIAG_DIR)
-	$(MIIDIAG_CAT) $(DL_DIR)/$(MIIDIAG_SOURCE) | tar --strip 1 -C $(MIIDIAG_DIR) $(TAR_OPTIONS) -
-ifneq ($(MIIDIAG_PATCH_FILE),)
-	(cd $(MIIDIAG_DIR) && $(MIIDIAG_CAT) $(MIIDIAG_PATCH) | patch -p1)
+MII_DIAG_VERSION = 2.11
+MII_DIAG_SOURCE = mii-diag_$(MII_DIAG_VERSION).orig.tar.gz
+MII_DIAG_PATCH = mii-diag_$(MII_DIAG_VERSION)-3.diff.gz
+MII_DIAG_SITE = $(BR2_DEBIAN_MIRROR)/debian/pool/main/m/mii-diag
+
+ifneq ($(MII_DIAG_PATCH),)
+define MII_DIAG_DEBIAN_PATCHES
+	if [ -d $(@D)/debian/patches ]; then \
+		(cd $(@D)/debian/patches && for i in *; \
+		 do $(SED) 's,^\+\+\+ .*mii-diag-$(MII_DIAG_VERSION)/,+++ mii-diag-$(MII_DIAG_VERSION)/,' $$i; \
+		 done; \
+		); \
+		toolchain/patch-kernel.sh $(@D) $(@D)/debian/patches \*.patch; \
+	fi
+endef
 endif
-	toolchain/patch-kernel.sh $(MIIDIAG_DIR) package/mii-diag/ mii-diag-\*.patch*
-	touch $@
-
-$(MIIDIAG_DIR)/.configured: $(MIIDIAG_DIR)/.unpacked
-	touch $@
-
-$(MIIDIAG_DIR)/mii-diag: $(MIIDIAG_DIR)/.configured
-	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR)
 
-$(TARGET_DIR)/$(MIIDIAG_BINARY): $(MIIDIAG_DIR)/mii-diag
-	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" -C $(MIIDIAG_DIR) DESTDIR=$(TARGET_DIR) install
-	$(STRIPCMD) $@
-	touch $@
+MII_DIAG_POST_PATCH_HOOKS = MII_DIAG_DEBIAN_PATCHES
 
-mii-diag: $(TARGET_DIR)/$(MIIDIAG_BINARY)
+define MII_DIAG_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+	LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
 
-mii-diag-source: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
+define MII_DIAG_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
 
-mii-diag-clean:
-	-$(MAKE) -C $(MIIDIAG_DIR) clean
+define MII_DIAG_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/mii-diag
+endef
 
-mii-diag-dirclean:
-	rm -rf $(MIIDIAG_DIR)
+define MII_DIAG_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MIIDIAG),y)
-TARGETS+=mii-diag
-endif
+$(eval $(call GENTARGETS,package,mii-diag))
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Martin Banky @ 2010-10-05 21:05 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <878w2cs9oo.fsf@macbook.be.48ers.dk>

Peter,
     Yes, I'd be the one to complain ;-) I use it to troubleshoot serial
port communication issues on my embedded system. It's a fast and dirty way
to see if I have communication with the microprocessor. Basically it lets me
know if it's a hardware issue or if it's in my code. But other than that, I
don't have any other use for it. Also, buildroot is one of the few remaining
places to host it. Just my 2c's.

Martin

On Tue, Oct 5, 2010 at 12:48 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:

> >>>>> "Martin" == Martin Banky <Martin.Banky@gmail.com> writes:
>
>  Martin> Thomas,
>
>  Martin>      I guess I should have explained this better. What I meant
>  Martin> about microcom being a flat archive, is that when you extract
>  Martin> it, it does not create a directory for itself. It just sticks
>  Martin> its files, without a directory being created, in the current
>  Martin> directory. $(TAR_STRIP_COMPONENTS)=1 is 'Automatically detect
>  Martin> tar --strip-path/components option', which, equates to either
>  Martin> --strip-path or --strip-components, depending on the version of
>  Martin> tar. Per the man page: --strip-components = 'strip NUMBER
>  Martin> leading components from file names on extraction', which means
>  Martin> that for microcom, which doesn't have a directory structure, it
>  Martin> strips all the file names off, so no files actually get
>  Martin> extracted. This in turn, means that the patch routine does not
>  Martin> work. Hence, the reason for manually patching microcom. If you
>  Martin> have a better solution, I'd appreciate it, if you would show
>  Martin> me, because I couldn't figure one out. I hope this makes more
>  Martin> sense.
>
> Maybe we should just get rid of the microcom package instead? It was
> integrated into busybox a few years ago, which is also why it was marked
> as deprecated.
>
> I'll remove it later this week unless someone complains.
>
> --
> Bye, Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/1f8e186b/attachment-0001.html>

^ permalink raw reply

* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Peter Korsgaard @ 2010-10-05 21:13 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <AANLkTinZJqbMMdmTRu-EY42FWFjTGkjf8szXqPn3=83c@mail.gmail.com>

>>>>> "Martin" == Martin Banky <Martin.Banky@gmail.com> writes:

 Martin> Peter,

 Martin> ???? Yes, I'd be the one to complain ;-) I use it to
 Martin> troubleshoot serial port communication issues on my embedded
 Martin> system. It's a fast and dirty way to see if I have
 Martin> communication with the microprocessor. Basically it lets me
 Martin> know if it's a hardware issue or if it's in my code. But other
 Martin> than that, I don't have any other use for it. Also, buildroot
 Martin> is one of the few remaining places to host it. Just my 2c's.

Ok, any specific reasons why you don't just use the version in busybox
instead? (besides the fact that it isn't enabled in the defconfig, which
I've just fixed now)

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [git commit master 1/1] libpng: bump to 1.4.4
From: Martin Banky @ 2010-10-05 21:14 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=968ebae9dee10907e9bbc20ad5982e1de914efc5
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/libpng/libpng.mk |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/package/libpng/libpng.mk b/package/libpng/libpng.mk
index 5608f4f..82b88da 100644
--- a/package/libpng/libpng.mk
+++ b/package/libpng/libpng.mk
@@ -3,23 +3,22 @@
 # libpng (Portable Network Graphic library)
 #
 #############################################################
-LIBPNG_VERSION:=1.2.44
+LIBPNG_VERSION = 1.4.4
+LIBPNG_SERIES = 14
 LIBPNG_SITE = http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/libpng
 LIBPNG_SOURCE = libpng-$(LIBPNG_VERSION).tar.bz2
 LIBPNG_LIBTOOL_PATCH = NO
 LIBPNG_INSTALL_STAGING = YES
-LIBPNG_CONF_OPT = --without-libpng-compat
 LIBPNG_DEPENDENCIES = host-pkg-config zlib
 
-HOST_LIBPNG_CONF_OPT = --without-libpng-compat
 HOST_LIBPNG_DEPENDENCIES = host-pkg-config host-zlib
 
 define LIBPNG_STAGING_LIBPNG12_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/libpng12\',g" \
+		-e "s,^includedir=.*,includedir=\'$(STAGING_DIR)/usr/include/libpng$(LIBPNG_SERIES)\',g" \
 		-e "s,^libdir=.*,libdir=\'$(STAGING_DIR)/usr/lib\',g" \
-		$(STAGING_DIR)/usr/bin/libpng12-config
+		$(STAGING_DIR)/usr/bin/libpng$(LIBPNG_SERIES)-config
 endef
 
 LIBPNG_POST_INSTALL_STAGING_HOOKS += LIBPNG_STAGING_LIBPNG12_CONFIG_FIXUP
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [git commit master 1/1] busybox: 1.17.x.config: enable microcom applet
From: Peter Korsgaard @ 2010-10-05 21:14 UTC (permalink / raw)
  To: buildroot


commit: http://git.buildroot.net/buildroot/commit/?id=a2fcdacad6d6051288982c06c2737eb9e7f251fd
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

So we can get rid of the deprecated microcom package.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 package/busybox/busybox-1.17.x.config |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/package/busybox/busybox-1.17.x.config b/package/busybox/busybox-1.17.x.config
index 192bba2..d131dd6 100644
--- a/package/busybox/busybox-1.17.x.config
+++ b/package/busybox/busybox-1.17.x.config
@@ -668,7 +668,7 @@ CONFIG_MAKEDEVS=y
 # CONFIG_FEATURE_MAKEDEVS_LEAF is not set
 CONFIG_FEATURE_MAKEDEVS_TABLE=y
 # CONFIG_MAN is not set
-# CONFIG_MICROCOM is not set
+CONFIG_MICROCOM=y
 CONFIG_MOUNTPOINT=y
 CONFIG_MT=y
 # CONFIG_RAIDAUTORUN is not set
-- 
1.7.1

^ permalink raw reply related

* [Buildroot] [PATCH 3/4] libpng: bump to 1.4.4
From: Peter Korsgaard @ 2010-10-05 21:49 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1285485599-29412-3-git-send-email-Martin.Banky@gmail.com>

>>>>> "Martin" == Martin Banky <martin.banky@gmail.com> writes:

 Martin> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply

* [Buildroot] [PATCH 05/10] microcom: convert to gentargets
From: Martin Banky @ 2010-10-05 21:58 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <874od0s5q7.fsf@macbook.be.48ers.dk>

Peter,
     Only because, I didn't realize that busybox had it. I'll have to use
that one from now on. Much better from my way of thinking.

Martin

On Tue, Oct 5, 2010 at 2:13 PM, Peter Korsgaard <jacmet@uclibc.org> wrote:

> >>>>> "Martin" == Martin Banky <Martin.Banky@gmail.com> writes:
>
>  Martin> Peter,
>
>  Martin>      Yes, I'd be the one to complain ;-) I use it to
>  Martin> troubleshoot serial port communication issues on my embedded
>  Martin> system. It's a fast and dirty way to see if I have
>  Martin> communication with the microprocessor. Basically it lets me
>  Martin> know if it's a hardware issue or if it's in my code. But other
>  Martin> than that, I don't have any other use for it. Also, buildroot
>  Martin> is one of the few remaining places to host it. Just my 2c's.
>
> Ok, any specific reasons why you don't just use the version in busybox
> instead? (besides the fact that it isn't enabled in the defconfig, which
> I've just fixed now)
>
> --
> Bye, Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/4e562904/attachment.html>

^ permalink raw reply

* [Buildroot] [PATCH 0/1] Could use some help with this one
From: Martin Banky @ 2010-10-05 22:45 UTC (permalink / raw)
  To: buildroot

I've converted and bumped mrouted, but can't get it to build properly. I was
hoping that someone could take a look and see what I'm doing wrong. Also, is
anyone using this package?

Martin

[PATCH 1/1] mrouted: convet to gentargets and bump to version 3.9.2

^ permalink raw reply

* [Buildroot] [PATCH 1/1] mrouted: convet to gentargets and bump to version 3.9.2
From: Martin Banky @ 2010-10-05 22:45 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286318752-26740-1-git-send-email-Martin.Banky@gmail.com>

mrouted is once again being actively developed.
See http://github.com/troglobit/mrouted

Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
---
 package/mrouted/Config.in                          |    2 +-
 .../mrouted-3.9-beta3-bcopy_bcmp_bzero.patch       |  164 --------------------
 package/mrouted/mrouted-3.9.2-bcopy.patch          |   20 +++
 package/mrouted/mrouted-3.9.2-makefile-flags.patch |   62 ++++++++
 package/mrouted/mrouted-sys_errlist.patch          |   44 ------
 package/mrouted/mrouted.mk                         |   59 ++-----
 6 files changed, 99 insertions(+), 252 deletions(-)
 delete mode 100644 package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch
 create mode 100644 package/mrouted/mrouted-3.9.2-bcopy.patch
 create mode 100644 package/mrouted/mrouted-3.9.2-makefile-flags.patch
 delete mode 100644 package/mrouted/mrouted-sys_errlist.patch

diff --git a/package/mrouted/Config.in b/package/mrouted/Config.in
index df3c567..ed5852b 100644
--- a/package/mrouted/Config.in
+++ b/package/mrouted/Config.in
@@ -3,4 +3,4 @@ config BR2_PACKAGE_MROUTED
 	help
 	  An implementation of the DVMRP multicast routing protocol.
 
-	  http://freshmeat.net/projects/mrouted/
+	  http://github.com/troglobit/mrouted
diff --git a/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch b/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch
deleted file mode 100644
index e38efd2..0000000
--- a/package/mrouted/mrouted-3.9-beta3-bcopy_bcmp_bzero.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-diff -urN mrouted-3.9-beta3.0rig/cfparse.y mrouted-3.9-beta3/cfparse.y
---- mrouted-3.9-beta3.0rig/cfparse.y	1998-03-01 02:48:58.000000000 +0100
-+++ mrouted-3.9-beta3/cfparse.y	2009-01-14 21:17:00.000000000 +0100
-@@ -583,8 +583,7 @@
- 				  if (hp->h_addr_list[1])
- 				    fatal("Hostname %s does not %s",
- 					$1, "map to a unique address");
--
--				  bcopy(hp->h_addr_list[0], &$$,
-+				  memmove (&$$,	hp->h_addr_list[0],
- 					    hp->h_length);
- 				}
- 
-diff -urN mrouted-3.9-beta3.0rig/config.c mrouted-3.9-beta3/config.c
---- mrouted-3.9-beta3.0rig/config.c	1998-01-06 02:57:41.000000000 +0100
-+++ mrouted-3.9-beta3/config.c	2009-01-14 21:18:59.000000000 +0100
-@@ -89,7 +89,7 @@
- 	 * SIOCGIFFLAGS stomps over it because the requests
- 	 * are returned in a union.)
- 	 */
--	bcopy(ifrp->ifr_name, ifr.ifr_name, sizeof(ifr.ifr_name));
-+	memmove	(ifr.ifr_name,	ifrp->ifr_name,	sizeof(ifr.ifr_name));
- 
- 	/*
- 	 * Ignore loopback interfaces and interfaces that do not support
-diff -urN mrouted-3.9-beta3.0rig/defs.h mrouted-3.9-beta3/defs.h
---- mrouted-3.9-beta3.0rig/defs.h	2009-01-14 21:12:22.000000000 +0100
-+++ mrouted-3.9-beta3/defs.h	2009-01-14 21:20:05.000000000 +0100
-@@ -116,8 +116,6 @@
- #endif /* RSRR */
- 
- #ifdef SYSV
--#define bcopy(a, b, c)	memcpy(b, a, c)
--#define bzero(s, n) 	memset((s), 0, (n))
- #define setlinebuf(s)	setvbuf(s, NULL, _IOLBF, 0)
- #endif
- 
-diff -urN mrouted-3.9-beta3.0rig/igmp.c mrouted-3.9-beta3/igmp.c
---- mrouted-3.9-beta3.0rig/igmp.c	1998-01-06 02:57:43.000000000 +0100
-+++ mrouted-3.9-beta3/igmp.c	2009-01-14 21:27:41.000000000 +0100
-@@ -56,7 +56,7 @@
-     k_set_loop(FALSE);		/* disable multicast loopback     */
- 
-     ip         = (struct ip *)send_buf;
--    bzero(ip, sizeof(struct ip));
-+    memset(ip, 0, sizeof(struct ip));
-     /*
-      * Fields zeroed that aren't filled in later:
-      * - IP ID (let the kernel fill it in)
-@@ -421,7 +421,7 @@
- 	}
-     }
- 
--    bzero(&sdst, sizeof(sdst));
-+    memset(&sdst, 0, sizeof(sdst));
-     sdst.sin_family = AF_INET;
- #ifdef HAVE_SA_LEN
-     sdst.sin_len = sizeof(sdst);
-diff -urN mrouted-3.9-beta3.0rig/ipip.c mrouted-3.9-beta3/ipip.c
---- mrouted-3.9-beta3.0rig/ipip.c	1998-01-06 02:57:45.000000000 +0100
-+++ mrouted-3.9-beta3/ipip.c	2009-01-14 21:28:19.000000000 +0100
-@@ -61,7 +61,7 @@
-     ip = v->uv_encap_hdr = (struct ip *)malloc(sizeof(struct ip));
-     if (ip == NULL)
- 	log(LOG_ERR, 0, "out of memory");
--    bzero(ip, sizeof(struct ip));
-+    memset(ip, 0, sizeof(struct ip));
-     /*
-      * Fields zeroed that aren't filled in later:
-      * - IP ID (let the kernel fill it in)
-@@ -111,7 +111,7 @@
-     ip->ip_len = htons(ip->ip_len);
- #endif
- 
--    bzero(&sdst, sizeof(sdst));
-+    memset(&sdst, 0, sizeof(sdst));
-     sdst.sin_family = AF_INET;
- #ifdef HAVE_SA_LEN
-     sdst.sin_len = sizeof(sdst);
-@@ -123,7 +123,7 @@
-     iov[1].iov_base = (caddr_t)send_buf;
-     iov[1].iov_len = MIN_IP_HEADER_LEN + IGMP_MINLEN + datalen;
- 
--    bzero(&msg, sizeof(msg));
-+    memset(&msg, 0, sizeof(msg));
-     msg.msg_name = (caddr_t)&sdst;
-     msg.msg_namelen = sizeof(sdst);
-     msg.msg_iov = iov;
-diff -urN mrouted-3.9-beta3.0rig/main.c mrouted-3.9-beta3/main.c
---- mrouted-3.9-beta3.0rig/main.c	2009-01-14 21:12:22.000000000 +0100
-+++ mrouted-3.9-beta3/main.c	2009-01-14 21:22:33.000000000 +0100
-@@ -429,7 +429,7 @@
-     gettimeofday(&curtime, NULL);
-     lasttime = curtime;
-     for(;;) {
--	bcopy((char *)&readers, (char *)&rfds, sizeof(rfds));
-+	memmove	((char *)&rfds,	(char *)&readers,	sizeof(rfds));
- 	secs = timer_nextTimer();
- 	if (secs == -1)
- 	    timeout = NULL;
-diff -urN mrouted-3.9-beta3.0rig/prune.c mrouted-3.9-beta3/prune.c
---- mrouted-3.9-beta3.0rig/prune.c	1998-03-01 03:06:32.000000000 +0100
-+++ mrouted-3.9-beta3/prune.c	2009-01-14 21:27:06.000000000 +0100
-@@ -2450,7 +2450,7 @@
-     /* copy the packet to the sending buffer */
-     p = send_buf + MIN_IP_HEADER_LEN + IGMP_MINLEN;
-     
--    bcopy(data, p, datalen);
-+    memmove	(p,	data,	datalen);
-     
-     p += datalen;
-     
-@@ -2469,7 +2469,7 @@
-      * fill in initial response fields
-      */
-     resp = (struct tr_resp *)p;
--    bzero(resp, sizeof(struct tr_resp));
-+    memset(resp, 0, sizeof(struct tr_resp));
-     datalen += RLEN;
- 
-     resp->tr_qarr    = htonl(((tp.tv_sec + JAN_1970) << 16) + 
-diff -urN mrouted-3.9-beta3.0rig/route.c mrouted-3.9-beta3/route.c
---- mrouted-3.9-beta3.0rig/route.c	1998-01-15 01:08:34.000000000 +0100
-+++ mrouted-3.9-beta3/route.c	2009-01-14 21:26:37.000000000 +0100
-@@ -388,7 +388,8 @@
-     else                              r->rt_originwidth = 1;
-     r->rt_flags        = 0;
-     r->rt_dominants    = (u_int32 *)(r + 1);
--    bzero(r->rt_dominants, numvifs * sizeof(u_int32));
-+    memset(r->rt_dominants, 0, numvifs * sizeof(u_int32));
-+
-     r->rt_groups       = NULL;
-     VIFM_CLRALL(r->rt_children);
-     NBRM_CLRALL(r->rt_subordinates);
-@@ -968,7 +969,7 @@
-     bh->bh_dst = dst;
-     bh->bh_level = level;
-     bh->bh_datalen = datalen;
--    bcopy(p, (char *)(bh + 1), datalen);
-+    memmove	((char *)(bh + 1),	p,	datalen);
-     v->uv_blasterend += bblen;
- 
-     if (v->uv_blastertimer == 0) {
-diff -urN mrouted-3.9-beta3.0rig/rsrr.c mrouted-3.9-beta3/rsrr.c
---- mrouted-3.9-beta3.0rig/rsrr.c	1998-01-06 02:57:58.000000000 +0100
-+++ mrouted-3.9-beta3/rsrr.c	2009-01-14 21:29:18.000000000 +0100
-@@ -81,7 +81,7 @@
- 	log(LOG_ERR, errno, "Can't create RSRR socket");
- 
-     unlink(RSRR_SERV_PATH);
--    bzero((char *) &serv_addr, sizeof(serv_addr));
-+    memset((char *) &serv_addr, 0, sizeof(serv_addr));
-     serv_addr.sun_family = AF_UNIX;
-     strcpy(serv_addr.sun_path, RSRR_SERV_PATH);
- #ifdef HAVE_SA_LEN
-@@ -107,7 +107,7 @@
- {
-     register int rsrr_recvlen;
-     
--    bzero((char *) &client_addr, sizeof(client_addr));
-+    memset((char *) &client_addr, 0, sizeof(client_addr));
-     rsrr_recvlen = recvfrom(rsrr_socket, rsrr_recv_buf, sizeof(rsrr_recv_buf),
- 			    0, (struct sockaddr *)&client_addr, &client_length);
-     if (rsrr_recvlen < 0) {	
diff --git a/package/mrouted/mrouted-3.9.2-bcopy.patch b/package/mrouted/mrouted-3.9.2-bcopy.patch
new file mode 100644
index 0000000..d20e4df
--- /dev/null
+++ b/package/mrouted/mrouted-3.9.2-bcopy.patch
@@ -0,0 +1,20 @@
+--- troglobit-mrouted-b192f82/mtrace.c-orig	2010-08-20 11:27:26.000000000 -0700
++++ troglobit-mrouted-b192f82/mtrace.c	2010-10-02 22:34:17.000000000 -0700
+@@ -558,7 +558,7 @@ int send_recv(u_int32_t dst, int type, i
+ 		save->rtime = ((tr.tv_sec + JAN_1970) << 16) +
+ 		    (tr.tv_usec << 10) / 15625;
+ 		save->len = len;
+-		bcopy((char *)igmp, (char *)&save->igmp, ipdatalen);
++		memmove((char *)&save->igmp, (char *)igmp, ipdatalen)
+ 	    }
+ 	    return recvlen;
+ 	}
+@@ -651,6 +651,8 @@ void passive_mode(void)
+ 	    (tr.tv_usec << 10) / 15625;
+ 	base.len = len;
+ 	bcopy((char *)igmp, (char *)&base.igmp, ipdatalen);
++	memmove((char *)&base.igmp, (char *)igmp, ipdatalen)
++
+ 	/*
+ 	 * If the user specified which traces to monitor,
+ 	 * only accept traces that correspond to the
diff --git a/package/mrouted/mrouted-3.9.2-makefile-flags.patch b/package/mrouted/mrouted-3.9.2-makefile-flags.patch
new file mode 100644
index 0000000..c70cf3a
--- /dev/null
+++ b/package/mrouted/mrouted-3.9.2-makefile-flags.patch
@@ -0,0 +1,62 @@
+--- a/Makefile	2010-08-20 11:27:26.000000000 -0700
++++ b/Makefile	2010-10-05 15:25:32.000000000 -0700
+@@ -64,8 +64,8 @@ include config.mk
+ include snmp.mk
+ 
+ ## Common
+-CFLAGS        = ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} $(INCLUDES) $(DEFS) $(USERCOMPILE)
+-CFLAGS       += -O2 -W -Wall -Werror
++MROUTED_CFLAGS = ${MCAST_INCLUDE} ${SNMPDEF} ${RSRRDEF} $(INCLUDES) $(DEFS) $(USERCOMPILE)
++#CFLAGS       += -O2 -W -Wall
+ #CFLAGS       += -O -g
+ LDLIBS        = ${SNMPLIBDIR} ${SNMPLIBS} ${LIB2}
+ OBJS          = ${IGMP_OBJS} ${ROUTER_OBJS} ${MAPPER_OBJS} ${MRINFO_OBJS} \
+@@ -80,6 +80,9 @@ LINTFLAGS     = ${MCAST_INCLUDE} $(filte
+ 
+ all: $(EXECS) ${MSTAT}
+ 
++%.o: %.c
++	$(CC) $(MROUTED_CFLAGS) $(CFLAGS) -c -o $@ $<
++
+ install: $(EXECS)
+ 	$(Q)[ -n "$(DESTDIR)" -a ! -d $(DESTDIR) ] || install -d $(DESTDIR)
+ 	$(Q)install -d $(DESTDIR)$(prefix)/sbin
+@@ -111,7 +114,7 @@ mrouted: ${IGMP_OBJS} ${ROUTER_OBJS} ver
+ ifdef Q
+ 	@printf "  LINK    $(subst $(ROOTDIR),,$(shell pwd))/$@\n"
+ endif
+-	$(Q)${CC} ${CFLAGS} ${LDFLAGS} -Wl,-Map,$@.map -o $@ $^ $(LDLIBS$(LDLIBS-$(@)))
++	$(Q)$(CC) $(MROUTED_CFLAGS) $(CFLAGS) $(LDFLAGS) -Wl,-Map,$@.map -o $@ $^ $(LDLIBS$(LDLIBS-$(@)))
+ 
+ vers.c: Makefile
+ 	@echo $(VERSION) | sed -e 's/.*/char todaysversion[]="&";/' > vers.c
+@@ -120,25 +123,25 @@ map-mbone: ${IGMP_OBJS} ${MAPPER_OBJS}
+ ifdef Q
+ 	@printf "  LINK    $(subst $(ROOTDIR),,$(shell pwd))/$@\n"
+ endif
+-	$(Q)${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${IGMP_OBJS} ${MAPPER_OBJS} ${LIB2}
++	$(Q)$(CC) $(MROUTED_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ${IGMP_OBJS} ${MAPPER_OBJS} ${LIB2}
+ 
+ mrinfo: ${IGMP_OBJS} ${MRINFO_OBJS}
+ ifdef Q
+ 	@printf "  LINK    $(subst $(ROOTDIR),,$(shell pwd))/$@\n"
+ endif
+-	$(Q)${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${IGMP_OBJS} ${MRINFO_OBJS} ${LIB2}
++	$(Q)$(CC) $(MROUTED_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ${IGMP_OBJS} ${MRINFO_OBJS} ${LIB2}
+ 
+ mtrace: ${IGMP_OBJS} ${MTRACE_OBJS}
+ ifdef Q
+ 	@printf "  LINK    $(subst $(ROOTDIR),,$(shell pwd))/$@\n"
+ endif
+-	$(Q)${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${IGMP_OBJS} ${MTRACE_OBJS} ${LIB2}
++	$(Q)$(CC) $(MROUTED_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ${IGMP_OBJS} ${MTRACE_OBJS} ${LIB2}
+ 
+ mstat: ${MSTAT_OBJS} snmplib/libsnmp.a
+ ifdef Q
+ 	@printf "  LINK    $(subst $(ROOTDIR),,$(shell pwd))/$@\n"
+ endif
+-	$(Q)${CC} ${CFLAGS} ${LDFLAGS} -o $@ ${MSTAT_OBJS} -Lsnmplib -lsnmp
++	$(Q)$(CC) $(MROUTED_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ ${MSTAT_OBJS} -Lsnmplib -lsnmp
+ 
+ clean: ${SNMPCLEAN}
+ 	-$(Q)$(RM) $(OBJS) $(EXECS)
diff --git a/package/mrouted/mrouted-sys_errlist.patch b/package/mrouted/mrouted-sys_errlist.patch
deleted file mode 100644
index 8498dc7..0000000
--- a/package/mrouted/mrouted-sys_errlist.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Patches from Kevin P. Fleming <kpfleming@backtobasicsmgmt.com>.
-
---- mrouted-3.9-beta3.orig/main.c~	2004-03-10 19:00:38.000000000 -0700
-+++ mrouted-3.9-beta3.orig/main.c	2004-03-10 19:02:33.000000000 -0700
-@@ -1001,10 +1001,8 @@
- 		    thyme->tm_min, thyme->tm_sec, now.tv_usec / 1000, msg);
- 	if (syserr == 0)
- 	    fprintf(stderr, "\n");
--	else if (syserr < sys_nerr)
--	    fprintf(stderr, ": %s\n", sys_errlist[syserr]);
- 	else
--	    fprintf(stderr, ": errno %d\n", syserr);
-+	    fprintf(stderr, ": %s\n", strerror(syserr));
-     }
- 
-     /*
---- mrouted-3.9-beta3.orig/mrinfo.c~	1998-02-28 20:05:20.000000000 -0700
-+++ mrouted-3.9-beta3.orig/mrinfo.c	2004-03-10 19:01:49.000000000 -0700
-@@ -159,10 +159,8 @@
- 		vfprintf(stderr, fmt, ap);
- 		if (syserr == 0)
- 			fprintf(stderr, "\n");
--		else if (syserr < sys_nerr)
--			fprintf(stderr, ": %s\n", sys_errlist[syserr]);
- 		else
--			fprintf(stderr, ": errno %d\n", syserr);
-+			fprintf(stderr, ": %s\n", strerror(syserr));
- 	}
- 
- 	if (severity <= LOG_ERR)
---- mrouted-3.9-beta3.orig/mapper.c~	1998-01-05 18:57:47.000000000 -0700
-+++ mrouted-3.9-beta3.orig/mapper.c	2004-03-10 19:02:04.000000000 -0700
-@@ -197,10 +197,8 @@
- 	    vfprintf(stderr, fmt, ap);
- 	    if (syserr == 0)
- 		fprintf(stderr, "\n");
--	    else if (syserr < sys_nerr)
--		fprintf(stderr, ": %s\n", sys_errlist[syserr]);
- 	    else
--		fprintf(stderr, ": errno %d\n", syserr);
-+	        fprintf(stderr, ": %s\n", strerror(syserr));
-     }
- 
-     if (severity <= LOG_ERR)
diff --git a/package/mrouted/mrouted.mk b/package/mrouted/mrouted.mk
index 4438c6d..00c8d28 100644
--- a/package/mrouted/mrouted.mk
+++ b/package/mrouted/mrouted.mk
@@ -4,52 +4,25 @@
 #
 #
 #############################################################
-MROUTED_VERSION:=3.9-beta3.orig
-MROUTED_SOURCE:=mrouted_$(MROUTED_VERSION).tar.gz
-MROUTED_SITE:=http://archive.debian.org/debian-archive/pool/non-free/m/mrouted/
-MROUTED_DIR:=$(BUILD_DIR)/mrouted-$(MROUTED_VERSION)
-MROUTED_CAT:=$(ZCAT)
-MROUTED_PATCH:=mrouted_3.9-beta3-1.1.diff.gz
-MROUTED_BINARY:=mrouted
-MROUTED_TARGET_BINARY:=usr/sbin/mrouted
+MROUTED_VERSION = 3.9.2
+MROUTED_SOURCE = troglobit-mrouted-$(MROUTED_VERSION)-*.tar.gz
+MROUTED_SITE = http://github.com/troglobit/mrouted/tarball/3.9.2
 
-$(DL_DIR)/$(MROUTED_SOURCE):
-	 $(call DOWNLOAD,$(MROUTED_SITE),$(MROUTED_SOURCE))
-
-$(DL_DIR)/$(MROUTED_PATCH):
-	 $(call DOWNLOAD,$(MROUTED_SITE),$(MROUTED_PATCH))
-
-$(MROUTED_DIR)/.unpacked: $(DL_DIR)/$(MROUTED_SOURCE) $(DL_DIR)/$(MROUTED_PATCH)
-	$(MROUTED_CAT) $(DL_DIR)/$(MROUTED_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	$(MROUTED_CAT) $(DL_DIR)/$(MROUTED_PATCH) | patch -p1 -d $(MROUTED_DIR)
-	toolchain/patch-kernel.sh $(MROUTED_DIR) package/mrouted/ mrouted\*.patch
-	touch $(MROUTED_DIR)/.unpacked
-
-$(MROUTED_DIR)/$(MROUTED_BINARY): $(MROUTED_DIR)/.unpacked
+define MROUTED_BUILD_CMDS
 	$(TARGET_CONFIGURE_OPTS) \
-	$(MAKE) CC="$(TARGET_CC)" -C $(MROUTED_DIR)
-
-$(TARGET_DIR)/$(MROUTED_TARGET_BINARY): $(MROUTED_DIR)/$(MROUTED_BINARY)
-	cp -a $(MROUTED_DIR)/$(MROUTED_BINARY) $(TARGET_DIR)/$(MROUTED_TARGET_BINARY)
-
-mrouted: $(TARGET_DIR)/$(MROUTED_TARGET_BINARY)
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
 
-mrouted-source: $(DL_DIR)/$(MROUTED_SOURCE) $(DL_DIR)/$(MROUTED_PATCH)
+define MROUTED_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
 
-mrouted-unpacked: $(MROUTED_DIR)/.unpacked
+define MROUTED_UNINSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
+endef
 
-mrouted-clean:
-	rm -f $(TARGET_DIR)/$(MROUTED_TARGET_BINARY)
-	-$(MAKE) -C $(MROUTED_DIR) clean
+define MROUTED_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
 
-mrouted-dirclean:
-	rm -rf $(MROUTED_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MROUTED),y)
-TARGETS+=mrouted
-endif
+$(eval $(call GENTARGETS,package,mrouted))
-- 
1.7.3.1

^ permalink raw reply related

* [Buildroot] [PATCH 09/10] mplayer: convert to gentargets
From: Chih-Min Chao @ 2010-10-06  3:42 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <1286266963-23413-9-git-send-email-Martin.Banky@gmail.com>

On Tue, Oct 5, 2010 at 4:22 PM, Martin Banky <martin.banky@gmail.com> wrote:
> Would have bumped the version, but someone smarter than me is going to have to
> do it.
>
> Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
> ---
> ?package/multimedia/mplayer/mplayer.mk | ? 88 +++++++++++---------------------
> ?1 files changed, 30 insertions(+), 58 deletions(-)
>
> diff --git a/package/multimedia/mplayer/mplayer.mk b/package/multimedia/mplayer/mplayer.mk
> index ac3a67e..a53c687 100644
> --- a/package/multimedia/mplayer/mplayer.mk
> +++ b/package/multimedia/mplayer/mplayer.mk
> @@ -3,67 +3,54 @@
> ?# mplayer
> ?#
> ?#############################################################
> -MPLAYER_VERSION:=1.0rc2
> -MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
> -MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
> -MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
> -MPLAYER_CAT:=$(BZCAT)
> -MPLAYER_BINARY:=mplayer
> -MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
> +MPLAYER_VERSION = 1.0rc2
> +MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.bz2
> +MPLAYER_SITE = http://www.mplayerhq.hu/MPlayer/releases
>
> ?MPLAYER_DEPENDENCIES = \
> ? ? ? ?$(if $(BR2_PACKAGE_LIBMAD),libmad) \
> ? ? ? ?$(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)
>
> ?ifeq ($(BR2_ENDIAN),"BIG")
> -MPLAYER_ENDIAN:=--enable-big-endian
> +MPLAYER_CONF_OPTS += --enable-big-endian
> ?else
> -MPLAYER_ENDIAN:=--disable-big-endian
> +MPLAYER_CONF_OPTS += --disable-big-endian
> ?endif

How about using  MPLAYER_CONF_OPT += --disable-sdl  rather than
creating new var ?
>
> -# mplayer unfortunately uses --disable-largefileS, so we cannot use
> +# mplayer unfortunately uses --disable-largefiles, so we cannot use
> ?# DISABLE_LARGEFILE
> ?ifeq ($(BR2_LARGEFILE),y)
> -MPLAYER_LARGEFILE:=--enable-largefiles
> +MPLAYER_CONF_OPTS += --enable-largefiles
> ?else
> ?# dvdread/dvdcss requires largefile support
> -MPLAYER_LARGEFILE:=--disable-largefiles \
> +MPLAYER_CONF_OPTS += --disable-largefiles \
> ? ? ? ? ? ? ? ? ? --disable-dvdread-internal \
> ? ? ? ? ? ? ? ? ? --disable-libdvdcss-internal
> ?endif
>
> ?ifeq ($(BR2_PACKAGE_SDL),y)
> -MPLAYER_SDL:=--enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
> +MPLAYER_CONF_OPTS += --enable-sdl --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
> ?MPLAYER_DEPENDENCIES += sdl
> ?else
> -MPLAYER_SDL:=--disable-sdl
> +MPLAYER_CONF_OPTS += --disable-sdl
> ?endif
>
> ?ifeq ($(BR2_PACKAGE_FREETYPE),y)
> -MPLAYER_FREETYPE:= \
> +MPLAYER_CONF_OPTS += ?\
> ? ? ? ?--enable-freetype \
> ? ? ? ?--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config
> ?MPLAYER_DEPENDENCIES += freetype
> ?else
> -MPLAYER_FREETYPE:=--disable-freetype
> +MPLAYER_CONF_OPTS += --disable-freetype
> ?endif
>
> ?ifeq ($(BR2_i386),y)
> ?# This seems to be required to compile some of the inline asm
> -MPLAYER_CFLAGS:=-fomit-frame-pointer
> +MPLAYER_CFLAGS = -fomit-frame-pointer
> ?endif
>
> -$(DL_DIR)/$(MPLAYER_SOURCE):
> - ? ? ? $(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))
> -
> -$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
> - ? ? ? $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
> - ? ? ? toolchain/patch-kernel.sh $(MPLAYER_DIR) package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
> - ? ? ? $(CONFIG_UPDATE) $(MPLAYER_DIR)
> - ? ? ? touch $@
> -
> -$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
> - ? ? ? (cd $(MPLAYER_DIR); rm -rf config.cache; \
> +define MPLAYER_CONFIGURE_CMDS
> + ? ? ? (cd $(@D); rm -rf config.cache; \
> ? ? ? ? ? ? ? ?$(TARGET_CONFIGURE_OPTS) \
> ? ? ? ? ? ? ? ?$(TARGET_CONFIGURE_ARGS) \
> ? ? ? ? ? ? ? ?CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
> @@ -80,44 +67,29 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
> ? ? ? ? ? ? ? ?--charset=UTF-8 \
> ? ? ? ? ? ? ? ?--enable-mad \
> ? ? ? ? ? ? ? ?--enable-fbdev \
> - ? ? ? ? ? ? ? $(MPLAYER_ENDIAN) \
> - ? ? ? ? ? ? ? $(MPLAYER_LARGEFILE) \
> - ? ? ? ? ? ? ? $(MPLAYER_SDL) \
> - ? ? ? ? ? ? ? $(MPLAYER_FREETYPE) \
> + ? ? ? ? ? ? ? $(MPLAYER_CONF_OPTS) \
> ? ? ? ? ? ? ? ?--enable-cross-compile \
> ? ? ? ? ? ? ? ?--disable-ivtv \
> ? ? ? ? ? ? ? ?--disable-tv \
> ? ? ? ? ? ? ? ?--disable-live \
> ? ? ? ? ? ? ? ?--enable-dynamic-plugins \
> ? ? ? ?)
> - ? ? ? touch $@
> -
> -$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
> - ? ? ? $(MAKE1) -C $(MPLAYER_DIR)
> - ? ? ? touch -c $@
> +endef
merge target option to (PKG)_CONF_OPT and defining CONFIGURE_CMDS   is
not necessary

>
> -$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
> - ? ? ? $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> - ? ? ? -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> - ? ? ? touch -c $@
> +define MPLAYER_BUILD_CMDS
> + ? ? ? $(MAKE1) -C $(@D)
> +endef

is it necessary ?
>
> -mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> +define MPLAYER_INSTALL_TARGET_CMDS
> + ? ? ? $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
> +endef
>
> -mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
> +define MPLAYER_UNINSTALL_TARGET_CMDS
> + ? ? ? $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
> +endef
>
> -mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
> +define MPLAYER_CLEAN_CMDS
> + ? ? ? $(MAKE) -C $(@D) clean
> +endef
>
> -mplayer-clean:
> - ? ? ? rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> - ? ? ? -$(MAKE) -C $(MPLAYER_DIR) clean
> -
> -mplayer-dirclean:
> - ? ? ? rm -rf $(MPLAYER_DIR)
> -#############################################################
> -#
> -# Toplevel Makefile options
> -#
> -#############################################################
> -ifeq ($(BR2_PACKAGE_MPLAYER),y)
> -TARGETS+=mplayer
> -endif
> +$(eval $(call GENTARGETS,package/multimedia,mplayer))
> --
> 1.7.3.1
>
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>

^ permalink raw reply

* [Buildroot] [PATCH 09/10] mplayer: convert to gentargets
From: Martin Banky @ 2010-10-06  5:55 UTC (permalink / raw)
  To: buildroot
In-Reply-To: <AANLkTinB19PdEHHv7zfV9p2RwKoCv5_syOZDWQ4wBLhu@mail.gmail.com>

On Tue, Oct 5, 2010 at 8:42 PM, Chih-Min Chao <cmchao@gmail.com> wrote:

> On Tue, Oct 5, 2010 at 4:22 PM, Martin Banky <martin.banky@gmail.com>
> wrote:
> > Would have bumped the version, but someone smarter than me is going to
> have to
> > do it.
> >
> > Signed-off-by: Martin Banky <Martin.Banky@gmail.com>
> > ---
> >  package/multimedia/mplayer/mplayer.mk |   88
> +++++++++++---------------------
> >  1 files changed, 30 insertions(+), 58 deletions(-)
> >
> > diff --git a/package/multimedia/mplayer/mplayer.mkb/package/multimedia/mplayer/
> mplayer.mk
> > index ac3a67e..a53c687 100644
> > --- a/package/multimedia/mplayer/mplayer.mk
> > +++ b/package/multimedia/mplayer/mplayer.mk
> > @@ -3,67 +3,54 @@
> >  # mplayer
> >  #
> >  #############################################################
> > -MPLAYER_VERSION:=1.0rc2
> > -MPLAYER_SOURCE:=MPlayer-$(MPLAYER_VERSION).tar.bz2
> > -MPLAYER_SITE:=http://www7.mplayerhq.hu/MPlayer/releases
> > -MPLAYER_DIR:=$(BUILD_DIR)/MPlayer-$(MPLAYER_VERSION)
> > -MPLAYER_CAT:=$(BZCAT)
> > -MPLAYER_BINARY:=mplayer
> > -MPLAYER_TARGET_BINARY:=usr/bin/$(MPLAYER_BINARY)
> > +MPLAYER_VERSION = 1.0rc2
> > +MPLAYER_SOURCE = MPlayer-$(MPLAYER_VERSION).tar.bz2
> > +MPLAYER_SITE = http://www.mplayerhq.hu/MPlayer/releases
> >
> >  MPLAYER_DEPENDENCIES = \
> >        $(if $(BR2_PACKAGE_LIBMAD),libmad) \
> >        $(if $(BR2_PACKAGE_ALSA_LIB),alsa-lib)
> >
> >  ifeq ($(BR2_ENDIAN),"BIG")
> > -MPLAYER_ENDIAN:=--enable-big-endian
> > +MPLAYER_CONF_OPTS += --enable-big-endian
> >  else
> > -MPLAYER_ENDIAN:=--disable-big-endian
> > +MPLAYER_CONF_OPTS += --disable-big-endian
> >  endif
>
> How about using  MPLAYER_CONF_OPT += --disable-sdl  rather than
> creating new var ?
> >
> > -# mplayer unfortunately uses --disable-largefileS, so we cannot use
> > +# mplayer unfortunately uses --disable-largefiles, so we cannot use
> >  # DISABLE_LARGEFILE
> >  ifeq ($(BR2_LARGEFILE),y)
> > -MPLAYER_LARGEFILE:=--enable-largefiles
> > +MPLAYER_CONF_OPTS += --enable-largefiles
> >  else
> >  # dvdread/dvdcss requires largefile support
> > -MPLAYER_LARGEFILE:=--disable-largefiles \
> > +MPLAYER_CONF_OPTS += --disable-largefiles \
> >                   --disable-dvdread-internal \
> >                   --disable-libdvdcss-internal
> >  endif
> >
> >  ifeq ($(BR2_PACKAGE_SDL),y)
> > -MPLAYER_SDL:=--enable-sdl
> --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
> > +MPLAYER_CONF_OPTS += --enable-sdl
> --with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config
> >  MPLAYER_DEPENDENCIES += sdl
> >  else
> > -MPLAYER_SDL:=--disable-sdl
> > +MPLAYER_CONF_OPTS += --disable-sdl
> >  endif
> >
> >  ifeq ($(BR2_PACKAGE_FREETYPE),y)
> > -MPLAYER_FREETYPE:= \
> > +MPLAYER_CONF_OPTS +=  \
> >        --enable-freetype \
> >        --with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config
> >  MPLAYER_DEPENDENCIES += freetype
> >  else
> > -MPLAYER_FREETYPE:=--disable-freetype
> > +MPLAYER_CONF_OPTS += --disable-freetype
> >  endif
> >
> >  ifeq ($(BR2_i386),y)
> >  # This seems to be required to compile some of the inline asm
> > -MPLAYER_CFLAGS:=-fomit-frame-pointer
> > +MPLAYER_CFLAGS = -fomit-frame-pointer
> >  endif
> >
> > -$(DL_DIR)/$(MPLAYER_SOURCE):
> > -       $(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))
> > -
> > -$(MPLAYER_DIR)/.unpacked: $(DL_DIR)/$(MPLAYER_SOURCE)
> > -       $(MPLAYER_CAT) $(DL_DIR)/$(MPLAYER_SOURCE) | tar -C $(BUILD_DIR)
> $(TAR_OPTIONS) -
> > -       toolchain/patch-kernel.sh $(MPLAYER_DIR)
> package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*
> > -       $(CONFIG_UPDATE) $(MPLAYER_DIR)
> > -       touch $@
> > -
> > -$(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
> > -       (cd $(MPLAYER_DIR); rm -rf config.cache; \
> > +define MPLAYER_CONFIGURE_CMDS
> > +       (cd $(@D); rm -rf config.cache; \
> >                $(TARGET_CONFIGURE_OPTS) \
> >                $(TARGET_CONFIGURE_ARGS) \
> >                CFLAGS="$(TARGET_CFLAGS) $(MPLAYER_CFLAGS)" \
> > @@ -80,44 +67,29 @@ $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked
> >                --charset=UTF-8 \
> >                --enable-mad \
> >                --enable-fbdev \
> > -               $(MPLAYER_ENDIAN) \
> > -               $(MPLAYER_LARGEFILE) \
> > -               $(MPLAYER_SDL) \
> > -               $(MPLAYER_FREETYPE) \
> > +               $(MPLAYER_CONF_OPTS) \
> >                --enable-cross-compile \
> >                --disable-ivtv \
> >                --disable-tv \
> >                --disable-live \
> >                --enable-dynamic-plugins \
> >        )
> > -       touch $@
> > -
> > -$(MPLAYER_DIR)/$(MPLAYER_BINARY): $(MPLAYER_DIR)/.configured
> > -       $(MAKE1) -C $(MPLAYER_DIR)
> > -       touch -c $@
> > +endef
> merge target option to (PKG)_CONF_OPT and defining CONFIGURE_CMDS   is
> not necessary
>
> >
> > -$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
> > -       $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY)
> $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> > -       -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)
> $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> > -       touch -c $@
> > +define MPLAYER_BUILD_CMDS
> > +       $(MAKE1) -C $(@D)
> > +endef
>
> is it necessary ?
> >
> > -mplayer: $(MPLAYER_DEPENDENCIES) $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> > +define MPLAYER_INSTALL_TARGET_CMDS
> > +       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
> > +endef
> >
> > -mplayer-source: $(DL_DIR)/$(MPLAYER_SOURCE)
> > +define MPLAYER_UNINSTALL_TARGET_CMDS
> > +       $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) uninstall
> > +endef
> >
> > -mplayer-unpacked: $(MPLAYER_DIR)/.unpacked
> > +define MPLAYER_CLEAN_CMDS
> > +       $(MAKE) -C $(@D) clean
> > +endef
> >
> > -mplayer-clean:
> > -       rm -f $(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)
> > -       -$(MAKE) -C $(MPLAYER_DIR) clean
> > -
> > -mplayer-dirclean:
> > -       rm -rf $(MPLAYER_DIR)
> > -#############################################################
> > -#
> > -# Toplevel Makefile options
> > -#
> > -#############################################################
> > -ifeq ($(BR2_PACKAGE_MPLAYER),y)
> > -TARGETS+=mplayer
> > -endif
> > +$(eval $(call GENTARGETS,package/multimedia,mplayer))
> > --
> > 1.7.3.1
> >
> > _______________________________________________
> > buildroot mailing list
> > buildroot at busybox.net
> > http://lists.busybox.net/mailman/listinfo/buildroot
> >
>
This is a gentargets package, (PKG)_CONF_OPT is only available to
autotargets. This is why I added the 'S' to the end of the variable name, to
show that it's not an autotargets package. As for MAKE1, I'm not sure if
it's necessary, but it was in the original package, so I used it.

Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101005/99239999/attachment.html>

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox