Skip to contentSkip to conversation

input-tools: convert to gentargets

PATCH New Martin Banky 5 participants 30 messages Oct 5, 2010 – Dec 12, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/10 input-tools: convert to gentargets

---
 .../input-tools/input-tools-20051019-rint.patch    |   18 ++++
 package/input-tools/input-tools.mk                 |   97 ++++++++-----------
 package/input-tools/joystick-20051019-rint.patch   |   18 ----
 3 files changed, 59 insertions(+), 74 deletions(-)
 create mode 100644 package/input-tools/input-tools-20051019-rint.patch
 delete mode 100644 package/input-tools/joystick-20051019-rint.patch
package/input-tools/input-tools-20051019-rint.patch new file +18 -0
new file mode 100644
index 0000000..b2aa13f
@@ -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;
+ }
package/input-tools/input-tools.mk +41 -56

105 lines not on this page · raw message

package/input-tools/joystick-20051019-rint.patch deleted +0 -18
deleted file mode 100644
index b2aa13f..0000000
@@ -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;
- }
Signature · 1 line
1.7.3.1
#1 lore raw

PATCH 2/10 lsof: convert to gentargets and bump to 4.84

An explanation is required for this package. The source for this package is an archive inside an archive. The gentargets makefile only extracts the first archive, but not the second. This causes the patch routine to fail. I hide the patches from the gentargets patch routine, and then extract and patch the second archive during the configure routine. Also, I've changed the patches to no longer point to the sub-directory, which is version dependent.

---
 package/lsof/_lsof-4.84-makefile.patch             |   14 +++
 package/lsof/_lsof-4.84-noportmap.patch            |   18 ++++
 .../lsof/_lsof-4.84-remove-susvlegacy-funcs.patch  |   12 +++
 package/lsof/lsof-makefile.patch                   |   14 ---
 package/lsof/lsof-noportmap.patch                  |   18 ----
 package/lsof/lsof-remove-susvlegacy-funcs.patch    |   12 ---
 package/lsof/lsof-uclibc.patch                     |   12 ---
 package/lsof/lsof.mk                               |   86 ++++++++-----------
 8 files changed, 80 insertions(+), 106 deletions(-)
 create mode 100644 package/lsof/_lsof-4.84-makefile.patch
 create mode 100644 package/lsof/_lsof-4.84-noportmap.patch
 create mode 100644 package/lsof/_lsof-4.84-remove-susvlegacy-funcs.patch
 delete mode 100644 package/lsof/lsof-makefile.patch
 delete mode 100644 package/lsof/lsof-noportmap.patch
 delete mode 100644 package/lsof/lsof-remove-susvlegacy-funcs.patch
 delete mode 100644 package/lsof/lsof-uclibc.patch
package/lsof/_lsof-4.84-makefile.patch new file +14 -0
new file mode 100644
index 0000000..65b1b2e
@@ -0,0 +1,14 @@
+diff -ru lsof_4.81.orig/lsof_4.81_src/lib/Makefile.skel lsof_4.81/lsof_4.81_src/lib/Makefile.skel
+--- a/lib/Makefile.skel	2001-02-13 03:12:22.000000000 +0100
++++ b/lib/Makefile.skel	2006-11-29 13:51:44.000000000 +0100
+@@ -21,8 +21,8 @@
+ all:	${LIB}
+ 
+ ${LIB}:	${OBJ}
+-	${AR}
+-	${RANLIB}
++	${AR} cr ${LIB} ${OBJ}
++	${RANLIB} ${LIB}
+ 
+ clean:	FRC
+ 	rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core
package/lsof/_lsof-4.84-noportmap.patch new file +18 -0
new file mode 100644
index 0000000..984e0d8
@@ -0,0 +1,18 @@
+--- a/print.c	2006-08-23 13:37:43.000000000 -0600
++++ b/print.c	2006-08-23 13:38:29.000000000 -0600
+@@ -148,6 +148,7 @@
+ static void
+ fill_portmap()
+ {
++#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__)
+ 	char buf[128], *cp, *nm;
+ 	CLIENT *c;
+ 	int h, port, pr;
+@@ -266,6 +267,7 @@
+ 	    Pth[pr][h] = pt;
+ 	}
+ 	clnt_destroy(c);
++#endif
+ }
+ 
+ 
package/lsof/_lsof-4.84-remove-susvlegacy-funcs.patch new file +12 -0
new file mode 100644
index 0000000..fca66ae
@@ -0,0 +1,12 @@
+diff -rdup lsof_4.81.orig/lsof_4.81_src/dialects/linux/machine.h lsof_4.81/lsof_4.81_src/dialects/linux/machine.h
+--- a/dialects/linux/machine.h	2007-04-24 18:20:58.000000000 +0200
++++ b/dialects/linux/machine.h	2007-05-15 12:17:03.000000000 +0200
+@@ -616,6 +616,6 @@
+  * zeromem is a macro that uses bzero or memset.
+  */
+ 
+-#define	zeromem(a, l)	bzero(a, l)
++#define	zeromem(a, l)	memset(a, 0, l)
+ 
+ #endif	/* !defined(LSOF_MACHINE_H) */
+
package/lsof/lsof-makefile.patch deleted +0 -14
deleted file mode 100644
index 2d4e9d4..0000000
@@ -1,14 +0,0 @@
-diff -ru lsof_4.81.orig/lsof_4.81_src/lib/Makefile.skel lsof_4.81/lsof_4.81_src/lib/Makefile.skel
---- lsof_4.81.orig/lsof_4.81_src/lib/Makefile.skel	2001-02-13 03:12:22.000000000 +0100
-+++ lsof_4.81/lsof_4.81_src/lib/Makefile.skel	2006-11-29 13:51:44.000000000 +0100
-@@ -21,8 +21,8 @@
- all:	${LIB}
- 
- ${LIB}:	${OBJ}
--	${AR}
--	${RANLIB}
-+	${AR} cr ${LIB} ${OBJ}
-+	${RANLIB} ${LIB}
- 
- clean:	FRC
- 	rm -f ${LIB} ${OBJ} errs Makefile.bak a.out core
package/lsof/lsof-noportmap.patch deleted +0 -18
deleted file mode 100644
index 4a37db4..0000000
@@ -1,18 +0,0 @@
---- lsof_4.81/lsof_4.81_src/print.orig.c	2006-08-23 13:37:43.000000000 -0600
-+++ lsof_4.81/lsof_4.81_src/print.c	2006-08-23 13:38:29.000000000 -0600
-@@ -148,6 +148,7 @@
- static void
- fill_portmap()
- {
-+#if !defined __UCLIBC__ || (defined __UCLIBC__ && defined __UCLIBC_HAS_RPC__)
- 	char buf[128], *cp, *nm;
- 	CLIENT *c;
- 	int h, port, pr;
-@@ -266,6 +267,7 @@
- 	    Pth[pr][h] = pt;
- 	}
- 	clnt_destroy(c);
-+#endif
- }
- 
- 
package/lsof/lsof-remove-susvlegacy-funcs.patch deleted +0 -12
deleted file mode 100644
index d1d9371..0000000
@@ -1,12 +0,0 @@
-diff -rdup lsof_4.81.orig/lsof_4.81_src/dialects/linux/machine.h lsof_4.81/lsof_4.81_src/dialects/linux/machine.h
---- lsof_4.81.orig/lsof_4.81_src/dialects/linux/machine.h	2007-04-24 18:20:58.000000000 +0200
-+++ lsof_4.81/lsof_4.81_src/dialects/linux/machine.h	2007-05-15 12:17:03.000000000 +0200
-@@ -616,6 +616,6 @@
-  * zeromem is a macro that uses bzero or memset.
-  */
- 
--#define	zeromem(a, l)	bzero(a, l)
-+#define	zeromem(a, l)	memset(a, 0, l)
- 
- #endif	/* !defined(LSOF_MACHINE_H) */
-
package/lsof/lsof-uclibc.patch deleted +0 -12
deleted file mode 100644
index 797a0ce..0000000
@@ -1,12 +0,0 @@
-diff -ru lsof_4.81.orig/lsof_4.81_src/dialects/linux/dlsof.h lsof_4.81/lsof_4.81_src/dialects/linux/dlsof.h
---- lsof_4.81.orig/lsof_4.81_src/dialects/linux/dlsof.h	2006-03-28 00:57:14.000000000 +0200
-+++ lsof_4.81/lsof_4.81_src/dialects/linux/dlsof.h	2006-11-29 14:03:07.000000000 +0100
-@@ -49,7 +49,7 @@
- #include <unistd.h>
- #include <netinet/in.h>
- 
--# if	defined(GLIBCV)
-+# if	defined(GLIBCV) || defined __UCLIBC__
- #include <netinet/tcp.h>
- # else	/* !defined(GLIBCV) */
- #include <linux/tcp.h>
package/lsof/lsof.mk +36 -50

104 lines not on this page · raw message

Signature · 1 line
1.7.3.1
#2 lore raw

PATCH 2/10 lsof: convert to gentargets and bump to 4.84

Quoted 9 lines · On Tue, 5 Oct 2010 01:22:35 -0700 Martin Banky <[email protected]> wrote:

An explanation is required for this package. The source for this package is an archive inside an archive. The gentargets makefile only extracts the first archive, but not the second. This causes the patch routine to fail. I hide the patches from the gentargets patch routine, and then extract and patch the second archive during the configure routine. Also, I've changed the patches to no longer point to the sub-directory, which is version dependent.

Thanks, merged in one of my branch, with additional fixes.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH 3/10 lvm2: convert to autotargets and bump to 2.02.74

In reply to Martin Banky
---
 package/lvm2/lvm2.mk |  153 +++++++++++++++++---------------------------------
 1 files changed, 51 insertions(+), 102 deletions(-)
package/lvm2/lvm2.mk +51 -102
index 2bd6b8b..b359b97 100644
@@ -3,115 +3,64 @@
 # lvm2
 #
 #############################################################
-# Copyright (C) 2005 by Richard Downer <[email protected]>
-# Derived from work
-# Copyright (C) 2001-2005 by Erik Andersen <[email protected]>
-# Copyright (C) 2002 by Tim Riker <[email protected]>
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU Library General Public License as
-# published by the Free Software Foundation; either version 2 of the
-# License, or (at your option) any later version.
-#
-# This program 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
-# Library General Public License for more details.
-#
-# You should have received a copy of the GNU Library General Public
-# License along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
-# USA
-
-LVM2_BASEVER=2.02
-LVM2_DMVER=1.02
-LVM2_PATCH=50
-LVM2_VERSION=$(LVM2_BASEVER).$(LVM2_PATCH)
-LVM2_SOURCE:=LVM2.$(LVM2_VERSION).tgz
-LVM2_SITE:=ftp://sources.redhat.com/pub/lvm2
-LVM2_CAT:=$(ZCAT)
-LVM2_DIR:=$(BUILD_DIR)/LVM2.$(LVM2_VERSION)
-LVM2_SBIN:=lvchange lvcreate lvdisplay lvextend lvm lvmchange lvmdiskscan lvmsadc lvmsar lvreduce lvremove lvrename lvresize lvs lvscan pvchange pvcreate pvdisplay pvmove pvremove pvresize pvs pvscan vgcfgbackup vgcfgrestore vgchange vgck vgconvert vgcreate vgdisplay vgexport vgextend vgimport vgmerge vgmknodes vgreduce vgremove vgrename vgs vgscan vgsplit
-LVM2_DMSETUP_SBIN:=dmsetup
-LVM2_LIB:=libdevmapper.so.$(LVM2_DMVER)
-LVM2_TARGET_SBINS=$(foreach lvm2sbin, $(LVM2_SBIN), $(TARGET_DIR)/sbin/$(lvm2sbin))
-LVM2_TARGET_DMSETUP_SBINS=$(foreach lvm2sbin, $(LVM2_DMSETUP_SBIN), $(TARGET_DIR)/sbin/$(lvm2sbin))
-LVM2_TARGET_LIBS=$(foreach lvm2lib, $(LVM2_LIB), $(TARGET_DIR)/lib/$(lvm2lib))
-
-$(DL_DIR)/$(LVM2_SOURCE):
-	 $(call DOWNLOAD,$(LVM2_SITE),$(LVM2_SOURCE))
-
-lvm2-source: $(DL_DIR)/$(LVM2_SOURCE)
-
+LVM2_VERSION = 2.02.74
+LVM2_SOURCE = LVM2.$(LVM2_VERSION).tgz
+LVM2_SITE = ftp://sources.redhat.com/pub/lvm2
+LVM2_INSTALL_STAGING = YES
+
+LVM2_BINS = dmsetup fsadm lvchange lvconvert lvcreate lvdisplay lvextend lvm \
+		lvmchange lvmconf lvmdiskscan lvmdump lvmsadc lvmsar lvreduce lvremove \
+		lvrename lvresize lvs lvscan pvchange pvck pvcreate pvdisplay pvmove \
+		pvremove pvresize pvs pvscan vgcfgbackup vgcfgrestore vgchange vgck \
+		vgconvert vgcreate vgdisplay vgexport vgextend vgimport vgimportclone \
+		vgmerge vgmknodes vgreduce vgremove vgrename vgs vgscan vgsplit
 
 ifeq ($(BR2_PACKAGE_READLINE),y)
-LVM2_DEPENDENCIES+=readline
+LVM2_DEPENDENCIES += readline
 else
 # v2.02.44: disable readline usage, or binaries are linked against provider
 # of "tgetent" (=> ncurses) even if it's not used..
-LVM2_CONF_OPT+=--disable-readline
+LVM2_CONF_OPT += --disable-readline
 endif
 
-
-$(LVM2_DIR)/.unpacked: $(DL_DIR)/$(LVM2_SOURCE)
-	$(LVM2_CAT) $(DL_DIR)/$(LVM2_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	touch $(LVM2_DIR)/.unpacked
-
-$(LVM2_DIR)/.configured: $(LVM2_DIR)/.unpacked
-	(cd $(LVM2_DIR); rm -rf config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		$(DISABLE_NLS) \
-		$(DISABLE_LARGEFILE) \
-		--with-user=$(shell id -un) --with-group=$(shell id -gn) \
-		$(LVM2_CONF_OPT) \
-	)
-	touch $(LVM2_DIR)/.configured
-
-
-$(LVM2_DIR)/.built: $(LVM2_DIR)/.configured
-	$(MAKE1) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR)
-	$(MAKE1) -C $(LVM2_DIR) DESTDIR=$(STAGING_DIR) install
-	# Fixup write permissions so that the files can be overwritten
-	# several times in the $(TARGET_DIR)
-	chmod 755 $(STAGING_DIR)/sbin/lvm
-	chmod 755 $(STAGING_DIR)/sbin/dmsetup
-	chmod 644 $(STAGING_DIR)/lib/$(LVM2_LIB)
-	touch $(LVM2_DIR)/.built
-
-
-$(LVM2_TARGET_SBINS) $(LVM2_TARGET_DMSETUP_SBINS): $(LVM2_DIR)/.built
-	cp -a $(STAGING_DIR)/sbin/$(notdir $@) $@
-	touch $@
-
-$(LVM2_TARGET_LIBS): $(LVM2_DIR)/.built
-	cp -a $(STAGING_DIR)/lib/$(notdir $@) $@
-	touch $@
-
-
 ifeq ($(BR2_PACKAGE_LVM2_DMSETUP_ONLY),y)
-lvm2: $(LVM2_TARGET_DMSETUP_SBINS) $(LVM2_TARGET_LIBS)
-else
-lvm2: $(LVM2_TARGET_SBINS) $(LVM2_TARGET_DMSETUP_SBINS) $(LVM2_TARGET_LIBS)
+LVM2_MAKE_OPT = device-mapper
+LVM2_INSTALL_STAGING_OPT = DESTDIR=$$(STAGING_DIR) device-mapper_install
+LVM2_INSTALL_TARGET_OPT = DESTDIR=$$(STAGING_DIR) device-mapper_install
 endif
 
-
-lvm2-clean:
-	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(LVM2_DIR) uninstall
-	-$(MAKE) -C $(LVM2_DIR) clean
-
-lvm2-dirclean:
-	rm -rf $(LVM2_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_LVM2),y)
-TARGETS+=lvm2
-endif
+define LVM2_STAGING_FILE_PERMS_FIXUP
+	chmod 755 $(STAGING_DIR)/usr/sbin/lvm
+	chmod 755 $(STAGING_DIR)/usr/sbin/fsadm
+	chmod 755 $(STAGING_DIR)/usr/sbin/dmsetup
+	chmod 755 $(STAGING_DIR)/usr/sbin/lvmconf
+	chmod 755 $(STAGING_DIR)/usr/sbin/lvmdump
+	chmod 755 $(STAGING_DIR)/usr/sbin/vgimportclone
+	chmod 644 $(STAGING_DIR)/usr/lib/libdevmapper.so
+endef
+
+LVM2_POST_INSTALL_STAGING_HOOKS += LVM2_STAGING_FILE_PERMS_FIXUP
+
+define LVM2_TARGET_FILE_PERMS_FIXUP
+	chmod 755 $(TARGET_DIR)/usr/sbin/lvm
+	chmod 755 $(TARGET_DIR)/usr/sbin/fsadm
+	chmod 755 $(TARGET_DIR)/usr/sbin/dmsetup
+	chmod 755 $(TARGET_DIR)/usr/sbin/lvmconf
+	chmod 755 $(TARGET_DIR)/usr/sbin/lvmdump
+	chmod 755 $(TARGET_DIR)/usr/sbin/vgimportclone
+	chmod 644 $(TARGET_DIR)/usr/lib/libdevmapper.so
+endef
+
+LVM2_POST_INSTALL_TARGET_HOOKS += LVM2_TARGET_FILE_PERMS_FIXUP
+
+define LVM2_UNINSTALL_STAGING_CMDS
+	rm -f $(addprefix $(STAGING_DIR)/usr/sbin/,$(LVM2_BINS))
+	rm -f $(addprefix $(STAGING_DIR)/usr/lib/,libdevmapper.so*)
+endef
+
+define LVM2_UNINSTALL_TARGET_CMDS
+	rm -f $(addprefix $(TARGET_DIR)/usr/sbin/,$(LVM2_BINS))
+	rm -f $(addprefix $(TARGET_DIR)/usr/lib/,libdevmapper.so*)
+endef
+
+$(eval $(call AUTOTARGETS,package,lvm2))
Signature · 1 line
1.7.3.1
#4 lore raw

PATCH 3/10 lvm2: convert to autotargets and bump to 2.02.74

Quoted 1 line · On Tue, 5 Oct 2010 01:22:36 -0700 Martin Banky <[email protected]> wrote:

Thanks, merged in one of my branch, with some further fixes, simplification and bump to 2.02.78.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#5 lore raw

PATCH 4/10 memtester: convert to gentargets and bump to 4.2.0

In reply to Martin Banky

Also, memtester requires largefile support

---
 package/memtester/Config.in    |    4 +++
 package/memtester/memtester.mk |   55 ++++++++++++++--------------------------
 2 files changed, 23 insertions(+), 36 deletions(-)
package/memtester/Config.in +4 -0
index 7a504dc..82769f5 100644
@@ -1,6 +1,10 @@
 config BR2_PACKAGE_MEMTESTER
 	bool "memtester"
+	depends on BR2_LARGEFILE
 	help
 	  A userspace utility for testing the memory subsystem for faults.
 
 	  http://pyropus.ca/software/memtester/
+
+comment "memtester requires a toolchain with LARGEFILE support"
+       depends on !BR2_LARGEFILE
package/memtester/memtester.mk +19 -36

64 lines not on this page · raw message

Signature · 1 line
1.7.3.1
#6 lore raw

PATCH 4/10 memtester: convert to gentargets and bump to 4.2.0

Quoted 3 lines · On Tue, 5 Oct 2010 01:22:37 -0700 Martin Banky <[email protected]> wrote:

Also, memtester requires largefile support

Thanks, merged into my branch, with a bump to 4.2.1 and some minor other fixes.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#7 lore raw

PATCH 5/10 microcom: convert to gentargets

In reply to Martin Banky

The microcom archive is a flat archive, so the Makefile.package.in extract function fails to extract any files. The $(TAR_STRIP_COMPONENTS)=1 seems to strip the file names off.

---
 .../microcom/-microcom-102-001-speed-defines.patch |   34 ++++++++
 .../-microcom-102-002-rename-variable-log.patch    |   78 +++++++++++++++++++
 .../microcom/microcom-102-001-speed-defines.patch  |   34 --------
 .../microcom-102-002-rename-variable-log.patch     |   78 -------------------
 package/microcom/microcom.mk                       |   80 +++++--------------
 5 files changed, 133 insertions(+), 171 deletions(-)
 create mode 100644 package/microcom/-microcom-102-001-speed-defines.patch
 create mode 100644 package/microcom/-microcom-102-002-rename-variable-log.patch
 delete mode 100644 package/microcom/microcom-102-001-speed-defines.patch
 delete mode 100644 package/microcom/microcom-102-002-rename-variable-log.patch
package/microcom/-microcom-102-001-speed-defines.patch new file +34 -0
new file mode 100644
index 0000000..b9aece8
@@ -0,0 +1,34 @@
+diff -rdup microcom-1.02.orig/help.c microcom-1.02/help.c
+--- microcom-1.02.orig/help.c	2000-07-30 06:15:47.000000000 +0200
++++ microcom-1.02/help.c	2007-01-19 19:44:19.000000000 +0100
+@@ -273,12 +273,29 @@ static void help_set_speed(int fd, char 
+     B19200,
+     B38400,
+     B57600,
++#if defined B115200
+     B115200,
++#endif
++#if defined B230400
+     B230400,
++#endif
++#if defined B460800
+     B460800
++#endif
+   };
++#undef __STOPCHAR
++#if defined B115200
++#define __STOPCHAR 'h'
++#endif
++#if defined B230400
++#define __STOPCHAR 'i'
++#endif
++#if defined B460800
++#define __STOPCHAR 'j'
++#endif
+ 
+-  if (c < 'a' && c > 'j') {
++
++  if (c < 'a' && c > __STOPCHAR) {
+     if (c == '~') {
+       help_speed();
+       return;
package/microcom/-microcom-102-002-rename-variable-log.patch new file +78 -0

78 lines not on this page · raw message

package/microcom/microcom-102-001-speed-defines.patch deleted +0 -34
deleted file mode 100644
index b9aece8..0000000
@@ -1,34 +0,0 @@
-diff -rdup microcom-1.02.orig/help.c microcom-1.02/help.c
---- microcom-1.02.orig/help.c	2000-07-30 06:15:47.000000000 +0200
-+++ microcom-1.02/help.c	2007-01-19 19:44:19.000000000 +0100
-@@ -273,12 +273,29 @@ static void help_set_speed(int fd, char 
-     B19200,
-     B38400,
-     B57600,
-+#if defined B115200
-     B115200,
-+#endif
-+#if defined B230400
-     B230400,
-+#endif
-+#if defined B460800
-     B460800
-+#endif
-   };
-+#undef __STOPCHAR
-+#if defined B115200
-+#define __STOPCHAR 'h'
-+#endif
-+#if defined B230400
-+#define __STOPCHAR 'i'
-+#endif
-+#if defined B460800
-+#define __STOPCHAR 'j'
-+#endif
- 
--  if (c < 'a' && c > 'j') {
-+
-+  if (c < 'a' && c > __STOPCHAR) {
-     if (c == '~') {
-       help_speed();
-       return;
package/microcom/microcom-102-002-rename-variable-log.patch deleted +0 -78

78 lines not on this page · raw message

package/microcom/microcom.mk +21 -59

91 lines not on this page · raw message

Signature · 1 line
1.7.3.1
#8 lore raw

PATCH 5/10 microcom: convert to gentargets

package/microcom/microcom.mk line 11

Quoted 2 lines · On Tue, 5 Oct 2010 01:22:38 -0700 Martin Banky <[email protected]> wrote:
package/microcom/microcom.mk +2 -0
+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.

Quoted 1 line

toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/ \*.patch

This as well.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#9 lore raw

PATCH 5/10 microcom: convert to gentargets

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

Quoted 15 lines · Thomas Petazzoni

Review

Quoted 2 lines · On Tue, 5 Oct 2010 01:22:38 -0700 Martin Banky <[email protected]> wrote:
(quoted diff) +2 -0
+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.

Quoted 1 line
      toolchain/patch-kernel.sh $(MICROCOM_DIR) package/microcom/

\*.patch

This as well.

Quoted 11 lines

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>

#10 lore raw

PATCH 5/10 microcom: convert to gentargets

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Martin" == Martin Banky <[email protected]> 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.

Signature · 1 line
Bye, Peter Korsgaard
#11 lore raw

PATCH 5/10 microcom: convert to gentargets

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

Quoted 21 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Martin" == Martin Banky <[email protected]> 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.

Quoted 9 lines

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>

#12 lore raw

PATCH 5/10 microcom: convert to gentargets

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Martin" == Martin Banky <[email protected]> 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)

Signature · 1 line
Bye, Peter Korsgaard
#13 lore raw

PATCH 5/10 microcom: convert to gentargets

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

Quoted 12 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Martin" == Martin Banky <[email protected]> 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.

Quoted 7 lines

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>

#14 lore raw

PATCH 5/10 microcom: convert to gentargets

In reply to Peter Korsgaard
Quoted 5 lines · On Tue, 05 Oct 2010 21:48:07 +0200 Peter Korsgaard <[email protected]> wrote:

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.

I got rid of it in the branch I'm building with all pending Martin's patches.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#15 lore raw

PATCH 6/10 microperl: convert to gentargets

In reply to Martin Banky
---
 package/microperl/microperl.mk |  145 ++++++++++++++-------------------------
 1 files changed, 52 insertions(+), 93 deletions(-)
package/microperl/microperl.mk +52 -93
index bf76fa7..5b18606 100644
@@ -3,122 +3,81 @@
 # microperl
 #
 #############################################################
-MICROPERL_MAJ=5
-MICROPERL_VERSION=$(MICROPERL_MAJ).8.8
+MICROPERL_VERSION=5.8.8
 MICROPERL_SOURCE=perl-$(MICROPERL_VERSION).tar.bz2
-MICROPERL_CAT:=$(BZCAT)
 MICROPERL_SITE=ftp://ftp.cpan.org/pub/CPAN/src/5.0
-MICROPERL_DIR=$(BUILD_DIR)/perl-$(MICROPERL_VERSION)
 
-MICROPERL_MODS_DIR=/usr/lib/perl$(MICROPERL_MAJ)/$(MICROPERL_VERSION)
+MICROPERL_MODS_DIR=/usr/lib/perl5/$(MICROPERL_VERSION)
 MICROPERL_MODS=$(call qstrip,$(BR2_PACKAGE_MICROPERL_MODULES))
+
 ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
 MICROPERL_MODS+=File/Basename.pm Errno.pm Config.pm IO/File.pm Symbol.pm \
 	SelectSaver.pm IO/Seekable.pm IO/Handle.pm IO.pm XSLoader.pm \
 	DynaLoader.pm AutoLoader.pm Carp/Heavy.pm
 endif
-$(DL_DIR)/$(MICROPERL_SOURCE):
-	$(call DOWNLOAD,$(MICROPERL_SITE),$(MICROPERL_SOURCE))
 
-$(MICROPERL_DIR)/.source: $(DL_DIR)/$(MICROPERL_SOURCE)
-	$(MICROPERL_CAT) $(DL_DIR)/$(MICROPERL_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+define MICROPERL_CONFIGURE_CMDS
 	# makedepend contains bashisms
 	$(SED) 's~sh ./makedepend~bash ./makedepend~' \
-		$(MICROPERL_DIR)/Makefile.SH \
-		$(MICROPERL_DIR)/x2p/Makefile.SH \
-		$(MICROPERL_DIR)/pod/Makefile.SH
-	chmod -R u+w $(MICROPERL_DIR)
-	touch $@
-
-$(MICROPERL_DIR)/.host_configured: $(MICROPERL_DIR)/.source
+		$(@D)/Makefile.SH \
+		$(@D)/x2p/Makefile.SH \
+		$(@D)/pod/Makefile.SH
+	chmod -R u+w $(@D)
 	# we need to build a perl for the host just for Errno.pm
-	(cd $(MICROPERL_DIR); ./Configure -Dcc=$(HOSTCC) -de  )
-	touch $@
-
-
-$(MICROPERL_DIR)/.host_configured_and_fixed: $(MICROPERL_DIR)/.host_configured
-	$(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/Makefile
-	$(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/x2p/Makefile
-	$(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/makefile
-	$(SED) 's/^.*<command-line>.*//g' $(MICROPERL_DIR)/x2p/makefile
-	touch $@
-
-$(MICROPERL_DIR)/.host_make: $(MICROPERL_DIR)/.host_configured_and_fixed
-	$(MAKE) -C $(MICROPERL_DIR)		|| echo "An error is expected on make"
-	touch $@
-
-$(MICROPERL_DIR)/.host_make_fixed: $(MICROPERL_DIR)/.host_make
-	$(MAKE) -C $(MICROPERL_DIR) test	|| echo "An error is expected on make test"
-	touch $@
-
-$(MICROPERL_DIR)/.configured: $(MICROPERL_DIR)/.host_make_fixed
+	(cd $(@D); ./Configure -Dcc=$(HOSTCC) -de  )
+	$(SED) 's/^.*<command-line>.*//g' $(@D)/Makefile
+	$(SED) 's/^.*<command-line>.*//g' $(@D)/x2p/Makefile
+	$(SED) 's/^.*<command-line>.*//g' $(@D)/makefile
+	$(SED) 's/^.*<command-line>.*//g' $(@D)/x2p/makefile
+endef
+
+define MICROPERL_BUILD_CMDS
+	$(MAKE) -C $(@D)		|| echo "An error is expected on make"
+	$(MAKE) -C $(@D) test	|| echo "An error is expected on make test"
 	# we need to build a perl for the host just for Errno.pm
-	(cd $(MICROPERL_DIR); \
-	 chmod a+x ext/util/make_ext; \
-	 ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" \
+	(cd $(@D); \
+		chmod a+x ext/util/make_ext; \
+		ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))" \
 	)
-	(cd $(MICROPERL_DIR); \
-	 chmod u+w uconfig.h; ./uconfig.sh; \
-	 $(MAKE) -f $(MICROPERL_DIR)/Makefile.micro regen_uconfig; \
-	 $(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \
-		 -e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \
-		 -e 's,BIN ".*,BIN "/usr/bin",' \
-		 ./uconfig.h; \
+	(cd $(@D); \
+		chmod u+w uconfig.h; ./uconfig.sh; \
+		$(MAKE) -f $(@D)/Makefile.micro regen_uconfig; \
+		$(SED) 's,PRIVLIB ".*,PRIVLIB "/$(MICROPERL_MODS_DIR)",' \
+			-e 's,PRIVLIB_EXP ".*,PRIVLIB_EXP "$(MICROPERL_MODS_DIR)",' \
+			-e 's,BIN ".*,BIN "/usr/bin",' \
+			./uconfig.h; \
 	)
-	touch $@
-
-$(MICROPERL_DIR)/microperl: $(MICROPERL_DIR)/.configured
-	$(MAKE) -f $(MICROPERL_DIR)/Makefile.micro CC="$(TARGET_CC)" \
-		OPTIMIZE="$(TARGET_CFLAGS)" -C $(MICROPERL_DIR)
-ifeq ($(BR2_PACKAGE_AUTOMAKE),y)
-	#(cd $(@D); \
-	# CONFIG=uconfig.h $(SHELL) ext/util/make_ext nonxs Errno MAKE="$(firstword $(MAKE))"; \
-	#)
-endif
+	$(MAKE) -f $(@D)/Makefile.micro CC="$(TARGET_CC)" \
+		OPTIMIZE="$(TARGET_CFLAGS)" -C $(@D)
+endef
 
-$(TARGET_DIR)/usr/bin/microperl: $(MICROPERL_DIR)/microperl
 ifneq ($(MICROPERL_MODS),)
-	(cd $(MICROPERL_DIR); \
-	 for i in $(patsubst %,$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/%,$(dir $(MICROPERL_MODS))); do \
-		[ -d $$i ] || mkdir -p $$i; \
-	 done; \
-	 for i in $(MICROPERL_MODS); do \
-	 cp -dpf $(MICROPERL_DIR)/lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \
-	 done; \
+define MICROPERL_INSTALL_MODS
+	(cd $(@D); \
+		for i in $(patsubst %,$(TARGET_DIR)/$(MICROPERL_MODS_DIR)/%,$(dir $(MICROPERL_MODS))); do \
+			[ -d $$i ] || mkdir -p $$i; \
+		done; \
+		for i in $(MICROPERL_MODS); do \
+			install -D -m 644 $(@D)/lib/$$i $(TARGET_DIR)/$(MICROPERL_MODS_DIR)/$$i; \
+		done; \
 	)
+endef
 endif
-	cp -dpf $(MICROPERL_DIR)/microperl $@
-ifneq ($(BR2_STRIP_none),y)
-	$(STRIPCMD) $(STRIP_STRIP_ALL) $@
-endif
-	(cd $(TARGET_DIR)/usr/bin; rm -f perl; ln -s microperl perl;)
 
-microperl: $(TARGET_DIR)/usr/bin/microperl
-
-microperl-source: $(DL_DIR)/$(MICROPERL_SOURCE)
-
-microperl-unpacked: $(MICROPERL_DIR)/.source
-
-microperl-config: $(MICROPERL_DIR)/.host_configured
-
-microperl-host: $(MICROPERL_DIR)/.host_make
-
-microperl-host-fixed: $(MICROPERL_DIR)/.host_make_fixed
+define MICROPERL_INSTALL_TARGET_CMDS
+	$(MICROPERL_INSTALL_MODS)
+	install -D -m 755 $(@D)/microperl $(TARGET_DIR)/usr/bin/microperl
+	(cd $(TARGET_DIR)/usr/bin; rm -f perl; ln -s microperl perl;)
+endef
 
-microperl-clean:
+define MICROPERL_UNINSTALL_TARGET_CMDS
 	rm -rf $(TARGET_DIR)/usr/bin/microperl \
 		$(TARGET_DIR)/$(MICROPERL_MODS_DIR) $(TARGET_DIR)/usr/bin/perl
-	-rmdir $(TARGET_DIR)/usr/lib/perl$(MICROPERL_MAJ)
-	-$(MAKE) -C $(MICROPERL_DIR) -f Makefile.micro clean
+	-rmdir $(TARGET_DIR)/usr/lib/perl5
+endef
 
-microperl-dirclean:
-	rm -rf $(MICROPERL_DIR)
+define MICROPERL_CLEAN_CMDS
+	-$(MAKE) -C $(@D) -f Makefile.micro clean
+endef
 
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MICROPERL),y)
-TARGETS+=microperl
-endif
+$(eval $(call GENTARGETS,package,microperl))
Signature · 1 line
1.7.3.1
#16 lore raw

PATCH 6/10 microperl: convert to gentargets

Hello,

Quoted 1 line · On Tue, 5 Oct 2010 01:22:39 -0700 Martin Banky <[email protected]> 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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#17 lore raw

PATCH 6/10 microperl: convert to gentargets

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

Quoted 14 lines · Thomas Petazzoni

Hello,

Quoted 1 line · On Tue, 5 Oct 2010 01:22:39 -0700 Martin Banky <[email protected]> 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,

Quoted 11 lines

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>

#18 lore raw

PATCH 7/10 mii-diag: convert to gentargets and bump to 2.11.3

In reply to Martin Banky
---
 package/mii-diag/mii-diag.mk |   80 ++++++++++++++++--------------------------
 1 files changed, 30 insertions(+), 50 deletions(-)
package/mii-diag/mii-diag.mk +30 -50
index ba01c0e..8870073 100644
@@ -3,59 +3,39 @@
 # 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 $@
+define MII_DIAG_BUILD_CMDS
+	$(MII_DIAG_DEBIAN_PATCHES)
+	$(MAKE) CC="$(TARGET_CC)" CFLAGS="$(TARGET_CFLAGS)" \
+	LDFLAGS="$(TARGET_LDFLAGS)" -C $(@D)
+endef
 
-mii-diag: $(TARGET_DIR)/$(MIIDIAG_BINARY)
+define MII_DIAG_INSTALL_TARGET_CMDS
+	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
+endef
 
-mii-diag-source: $(DL_DIR)/$(MIIDIAG_SOURCE) $(MIIDIAG_PATCH)
+define MII_DIAG_UNINSTALL_TARGET_CMDS
+	rm -f $(TARGET_DIR)/usr/sbin/mii-diag
+endef
 
-mii-diag-clean:
-	-$(MAKE) -C $(MIIDIAG_DIR) clean
+define MII_DIAG_CLEAN_CMDS
+	$(MAKE) -C $(@D) clean
+endef
 
-mii-diag-dirclean:
-	rm -rf $(MIIDIAG_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_MIIDIAG),y)
-TARGETS+=mii-diag
-endif
+$(eval $(call GENTARGETS,package,mii-diag))
Signature · 1 line
1.7.3.1
#19 lore raw

PATCH 8/10 alsa-utils: convert to autotargets and bump to 1.0.23

In reply to Martin Banky
---
 package/multimedia/alsa-utils/alsa-utils.mk |   96 ++++++---------------------
 1 files changed, 20 insertions(+), 76 deletions(-)
package/multimedia/alsa-utils/alsa-utils.mk +20 -76
index 3d1b0ef..9bac6b8 100644
@@ -3,52 +3,23 @@
 # alsa-utils
 #
 #############################################################
-ALSA_UTILS_VERSION:=1.0.22
-ALSA_UTILS_SOURCE:=alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
-ALSA_UTILS_SITE:=ftp://ftp.alsa-project.org/pub/utils
-ALSA_UTILS_DIR:=$(BUILD_DIR)/alsa-utils-$(ALSA_UTILS_VERSION)
-ALSA_UTILS_CAT:=$(BZCAT)
-ALSA_UTILS_BINARY:=alsactl/alsactl
-ALSA_UTILS_TARGET_BINARY:=usr/sbin/alsactl
+ALSA_UTILS_VERSION = 1.0.23
+ALSA_UTILS_SOURCE = alsa-utils-$(ALSA_UTILS_VERSION).tar.bz2
+ALSA_UTILS_SITE = ftp://ftp.alsa-project.org/pub/utils
+ALSA_UTILS_INSTALL_STAGING = YES
+ALSA_UTILS_DEPENDENCIES = alsa-lib \
+		$(if $(BR2_PACKAGE_NCURSES),ncurses) \
+		$(if $(BR2_PACKAGE_LIBINTL),libintl) \
+		$(if $(BR2_PACKAGE_LIBICONV),libiconv)
 
-ALSA_UTILS_CONFIGURE_OPTS =
-ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
-ALSA_UTILS_CONFIGURE_OPTS += --disable-alsamixer --disable-alsatest
-endif
-
-$(DL_DIR)/$(ALSA_UTILS_SOURCE):
-	$(call DOWNLOAD,$(ALSA_UTILS_SITE),$(ALSA_UTILS_SOURCE))
-
-$(ALSA_UTILS_DIR)/.unpacked: $(DL_DIR)/$(ALSA_UTILS_SOURCE)
-	$(ALSA_UTILS_CAT) $(DL_DIR)/$(ALSA_UTILS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-	toolchain/patch-kernel.sh $(ALSA_UTILS_DIR) package/multimedia/alsa-utils/ alsa-utils-$(ALSA_UTILS_VERSION)\*.patch
-	$(CONFIG_UPDATE) $(ALSA_UTILS_DIR)
-	touch $@
+ALSA_UTILS_CONF_ENV = ac_cv_prog_ncurses5_config=$(STAGING_DIR)/bin/ncurses5-config
 
-$(ALSA_UTILS_DIR)/.configured: $(ALSA_UTILS_DIR)/.unpacked
-	(cd $(ALSA_UTILS_DIR); rm -f config.cache; \
-		$(TARGET_CONFIGURE_OPTS) \
-		$(TARGET_CONFIGURE_ARGS) \
-		CFLAGS="$(TARGET_CFLAGS)" \
-		LDFLAGS="$(TARGET_LDFLAGS)" \
-		ac_cv_prog_ncurses5_config=$(STAGING_DIR)/bin/ncurses5-config \
-		./configure $(QUIET) \
-		--target=$(GNU_TARGET_NAME) \
-		--host=$(GNU_TARGET_NAME) \
-		--build=$(GNU_HOST_NAME) \
-		--prefix=/usr \
-		$(ALSA_UTILS_CONFIGURE_OPTS) \
-		--disable-xmlto \
-		--with-curses=ncurses \
-	)
-	touch $@
+ALSA_UTILS_CONF_OPT = --disable-xmlto \
+		--with-curses=ncurses
 
-$(ALSA_UTILS_DIR)/$(ALSA_UTILS_BINARY): $(ALSA_UTILS_DIR)/.configured
-	$(MAKE) CC="$(TARGET_CC)" -C $(ALSA_UTILS_DIR)
-	touch -c $@
-
-ALSA_UTILS_TARGETS_ :=
-ALSA_UTILS_TARGETS_y :=
+ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
+ALSA_UTILS__CONF_OPT += --disable-alsamixer --disable-alsatest
+endif
 
 ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACONF) += usr/sbin/alsaconf
 ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ALSACTL) += usr/sbin/alsactl
@@ -65,13 +36,10 @@ ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQDUMP) += usr/bin/aseqdump
 ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_ASEQNET) += usr/bin/aseqnet
 ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST) += usr/bin/speaker-test
 
-$(TARGET_DIR)/$(ALSA_UTILS_TARGET_BINARY): $(ALSA_UTILS_DIR)/$(ALSA_UTILS_BINARY)
-	$(MAKE) DESTDIR=$(STAGING_DIR) -C $(ALSA_UTILS_DIR) install
-	mkdir -p $(TARGET_DIR)/usr/bin
-	mkdir -p $(TARGET_DIR)/usr/sbin
-	for file in $(ALSA_UTILS_TARGETS_y); do \
-		cp -dpf $(STAGING_DIR)/$$file $(TARGET_DIR)/$$file; \
-	done
+define ALSA_UTILS_INSTALL_TARGET_CMDS
+	test -z "$(ALSA_UTILS_INSTALL_FILES_y)" || \
+		install -D -m 755 $(addprefix $(STAGING_DIR)/,$(ALSA_UTILS_TARGETS_y)) \
+		$(TARGET_DIR)/usr/bin/
 	if [ -x "$(TARGET_DIR)/usr/bin/speaker-test" ]; then \
 		mkdir -p $(TARGET_DIR)/usr/share/alsa/speaker-test; \
 		mkdir -p $(TARGET_DIR)/usr/share/sounds/alsa; \
@@ -83,30 +51,6 @@ $(TARGET_DIR)/$(ALSA_UTILS_TARGET_BINARY): $(ALSA_UTILS_DIR)/$(ALSA_UTILS_BINARY
 		rm -rf $(TARGET_DIR)/usr/share/alsa/; \
 		cp -rdpf $(STAGING_DIR)/usr/share/alsa/ $(TARGET_DIR)/usr/share/alsa/; \
 	fi
-	touch -c $@
-
-alsa-utils: alsa-lib $(if $(BR2_PACKAGE_NCURSES),ncurses) $(if $(BR2_PACKAGE_LIBINTL),libintl) $(if $(BR2_PACKAGE_LIBICONV),libiconv) $(TARGET_DIR)/$(ALSA_UTILS_TARGET_BINARY)
+endef
 
-alsa-utils-unpacked: $(ALSA_UTILS_DIR)/.unpacked
-
-alsa-utils-source: $(DL_DIR)/$(ALSA_UTILS_SOURCE)
-
-alsa-utils-clean:
-	for file in $(ALSA_UTILS_TARGETS_y); do \
-		rm -f $(TARGET_DIR)/$$file; \
-	done
-	for file in $(ALSA_UTILS_TARGETS_); do \
-		rm -f $(TARGET_DIR)/$$file; \
-	done
-	-$(MAKE) -C $(ALSA_UTILS_DIR) clean
-
-alsa-utils-dirclean:
-	rm -rf $(ALSA_UTILS_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_ALSA_UTILS),y)
-TARGETS+=alsa-utils
-endif
+$(eval $(call AUTOTARGETS,package/multimedia,alsa-utils))
Signature · 1 line
1.7.3.1
#20 lore raw

PATCH 9/10 mplayer: convert to gentargets

In reply to Martin Banky

Would have bumped the version, but someone smarter than me is going to have to do it.

---
 package/multimedia/mplayer/mplayer.mk |   88 +++++++++++---------------------
 1 files changed, 30 insertions(+), 58 deletions(-)
package/multimedia/mplayer/mplayer.mk +30 -58
index ac3a67e..a53c687 100644
@@ -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
 
-# 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
 
-$(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
 
-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))
Signature · 1 line
1.7.3.1
#21 lore raw

PATCH 9/10 mplayer: convert to gentargets

Quoted 37 lines · Martin Banky

Would have bumped the version, but someone smarter than me is going to have to do it.

---
?package/multimedia/mplayer/mplayer.mk | ? 88 +++++++++++--------------------- ?1 files changed, 30 insertions(+), 58 deletions(-)

package/multimedia/mplayer/mplayer.mk +0 -0
index ac3a67e..a53c687 100644
@@ -3,67 +3,54 @@

?# mplayer
?# ?#############################################################

package/multimedia/mplayer/mplayer.mk +3 -7
-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")

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_ENDIAN:=--enable-big-endian
+MPLAYER_CONF_OPTS += --enable-big-endian

?else

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_ENDIAN:=--disable-big-endian
+MPLAYER_CONF_OPTS += --disable-big-endian
Quoted 1 line

?endif

How about using MPLAYER_CONF_OPT += --disable-sdl rather than creating new var ?

Quoted 68 lines
package/multimedia/mplayer/mplayer.mk +1 -1
-# mplayer unfortunately uses --disable-largefileS, so we cannot use
+# mplayer unfortunately uses --disable-largefiles, so we cannot use

?# DISABLE_LARGEFILE
?ifeq ($(BR2_LARGEFILE),y)

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_LARGEFILE:=--enable-largefiles
+MPLAYER_CONF_OPTS += --enable-largefiles

?else
?# dvdread/dvdcss requires largefile support

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_LARGEFILE:=--disable-largefiles \
+MPLAYER_CONF_OPTS += --disable-largefiles \

? ? ? ? ? ? ? ? ? --disable-dvdread-internal \
? ? ? ? ? ? ? ? ? --disable-libdvdcss-internal
?endif

?ifeq ($(BR2_PACKAGE_SDL),y)

package/multimedia/mplayer/mplayer.mk +1 -1
-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

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_SDL:=--disable-sdl
+MPLAYER_CONF_OPTS += --disable-sdl

?endif

?ifeq ($(BR2_PACKAGE_FREETYPE),y)

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_FREETYPE:= \
+MPLAYER_CONF_OPTS += ?\

? ? ? ?--enable-freetype \
? ? ? ?--with-freetype-config=$(STAGING_DIR)/usr/bin/freetype-config ?MPLAYER_DEPENDENCIES += freetype
?else

package/multimedia/mplayer/mplayer.mk +1 -1
-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

package/multimedia/mplayer/mplayer.mk +1 -1
-MPLAYER_CFLAGS:=-fomit-frame-pointer
+MPLAYER_CFLAGS = -fomit-frame-pointer

?endif

-$(DL_DIR)/$(MPLAYER_SOURCE):
- ? ? ? $(call DOWNLOAD,$(MPLAYER_SITE),$(MPLAYER_SOURCE))

package/multimedia/mplayer/mplayer.mk +2 -9
-
-$(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)" \

package/multimedia/mplayer/mplayer.mk +1 -4
@@ -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 \

package/multimedia/mplayer/mplayer.mk $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked · line 77

Quoted 10 lines
package/multimedia/mplayer/mplayer.mk +1 -5
 ? ? ? ? ? ? ? ?--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

package/multimedia/mplayer/mplayer.mk $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked · line 80

Quoted 8 lines
package/multimedia/mplayer/mplayer.mk +3 -4
-$(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 ?

Quoted 39 lines
package/multimedia/mplayer/mplayer.mk +10 -18
-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

#22 lore raw

PATCH 9/10 mplayer: convert to gentargets

Quoted 177 lines · Chih-Min Chao
Quoted 1 line · Martin Banky

Would have bumped the version, but someone smarter than me is going to

have to

Quoted 5 lines

do it.

---
 package/multimedia/mplayer/mplayer.mk |   88

+++++++++++---------------------

Review

Quoted 3 lines
 1 files changed, 30 insertions(+), 58 deletions(-)
(quoted diff) +0 -0

mplayer.mk

Quoted 19 lines

index ac3a67e..a53c687 100644

package/multimedia/mplayer/mplayer.mk +3 -7
@@ -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 = \

package/multimedia/mplayer/mplayer.mk line 18

Quoted 10 lines
package/multimedia/mplayer/mplayer.mk +2 -2
       $(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 ?

Quoted 7 lines
package/multimedia/mplayer/mplayer.mk +2 -2
-# 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

package/multimedia/mplayer/mplayer.mk

Quoted 10 lines
package/multimedia/mplayer/mplayer.mk +1 -2
 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

package/multimedia/mplayer/mplayer.mk line 31

Quoted 1 line
package/multimedia/mplayer/mplayer.mk +1 -0
+MPLAYER_CONF_OPTS += --enable-sdl

--with-sdl-config=$(STAGING_DIR)/usr/bin/sdl-config

Quoted 18 lines
package/multimedia/mplayer/mplayer.mk +3 -3
 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)

package/multimedia/mplayer/mplayer.mk

Quoted 10 lines
package/multimedia/mplayer/mplayer.mk +1 -6
 # 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) -

package/multimedia/mplayer/mplayer.mk line 60

Quoted 1 line
package/multimedia/mplayer/mplayer.mk +0 -1
-       toolchain/patch-kernel.sh $(MPLAYER_DIR)

package/multimedia/mplayer/ mplayer-$(MPLAYER_VERSION)\*.patch\*

Quoted 21 lines
package/multimedia/mplayer/mplayer.mk +3 -9
-       $(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 \

package/multimedia/mplayer/mplayer.mk $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked · line 77

Quoted 10 lines
package/multimedia/mplayer/mplayer.mk +1 -5
               --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

package/multimedia/mplayer/mplayer.mk $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked · line 99

Quoted 3 lines
package/multimedia/mplayer/mplayer.mk +0 -2
-$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY): $(MPLAYER_DIR)/$(MPLAYER_BINARY)
-       $(INSTALL) -m 0755 -D $(MPLAYER_DIR)/$(MPLAYER_BINARY)

$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)

package/multimedia/mplayer/mplayer.mk $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked · line 100

Quoted 1 line
package/multimedia/mplayer/mplayer.mk +0 -1
-       -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)

$(TARGET_DIR)/$(MPLAYER_TARGET_BINARY)

package/multimedia/mplayer/mplayer.mk $(MPLAYER_DIR)/.configured: $(MPLAYER_DIR)/.unpacked · line 81

Quoted 4 lines
package/multimedia/mplayer/mplayer.mk +3 -1
-       touch -c $@
+define MPLAYER_BUILD_CMDS
+       $(MAKE1) -C $(@D)
+endef

is it necessary ?

Quoted 34 lines
package/multimedia/mplayer/mplayer.mk +10 -18
-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

Quoted 6 lines
Quoted 5 lines

_______________________________________________
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>

#23 lore raw

PATCH 9/10 mplayer: convert to gentargets

In reply to Martin Banky
Quoted 3 lines · Martin Banky

Would have bumped the version, but someone smarter than me is going to have to
do it.

yeh , I will ask why we don't bumped the version to 1.0-RC3 ? is because have a big atmel patch ?

Signature · 8 lines
S?rgio M. B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3293 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20101008/0e3184ee/attachment.bin>
#24 lore raw

PATCH 9/10 mplayer: convert to gentargets

Quoted 11 lines · Sergio Monteiro Basto
Quoted 3 lines · Martin Banky

Would have bumped the version, but someone smarter than me is going to have to
do it.

yeh , I will ask why we don't bumped the version to 1.0-RC3 ? is because have a big atmel patch ?

--
S?rgio M. B.

I didn't bump the version to 1.0-RC3, because I couldn't get it to build. The build routine changed too much from RC2 to RC3. RC2 was released 07-Oct-2007, and RC3 was released 29-May-2010. RC3 was held up for over a year, before being release, and by mplayer's own admission "...it is outdated even before the day of its release." Also, RC3 has a lot of fixed bugs in it, and the mplayer developers _strongly_ suggest using an svn version. I tried getting an svn version to build, but failed at that. I'm not well versed enough in their build process, for now anyway, to figure it out. Like I said, "...someone smarter than me is going to have to do it."

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

#25 lore raw

PATCH 9/10 mplayer: convert to gentargets

In reply to Martin Banky
Quoted 4 lines · On Tue, 5 Oct 2010 01:22:42 -0700 Martin Banky <[email protected]> wrote:

Would have bumped the version, but someone smarter than me is going to have to do it.

I took this in my branch as well. However, I also bumped the version to the latest SVN, and did many other improvements.

Thomas

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#26 lore raw

PATCH 10/10 netplug: convert to gentargets and bump to 1.2.9.2

In reply to Martin Banky
---
 package/netplug/netplug-1.2.9-disable-werror.patch |   22 --------
 .../netplug/netplug-1.2.9.2-makefile-flags.patch   |   21 ++++++++
 package/netplug/netplug-socklen-type.patch         |   12 ----
 package/netplug/netplug.mk                         |   54 ++++++--------------
 4 files changed, 36 insertions(+), 73 deletions(-)
 delete mode 100644 package/netplug/netplug-1.2.9-disable-werror.patch
 create mode 100644 package/netplug/netplug-1.2.9.2-makefile-flags.patch
 delete mode 100644 package/netplug/netplug-socklen-type.patch
package/netplug/netplug-1.2.9-disable-werror.patch deleted +0 -22
deleted file mode 100644
index d8a3e15..0000000
@@ -1,22 +0,0 @@
-netplug uses nested functions, and gcc generates a warning that
-is turned into an error:
-
-cc1: warnings being treated as errors
-if_info.c: In function 'ifsm_scriptdone':
-if_info.c:289: error: generating trampoline in object (requires executable stack)
-
-Signed-off-by: Thomas Petazzoni <[email protected]>
-
-Index: netplug-1.2.9/Makefile
-===================================================================
---- netplug-1.2.9.orig/Makefile	2010-05-09 21:07:40.000000000 +0200
-+++ netplug-1.2.9/Makefile	2010-05-09 21:09:32.000000000 +0200
-@@ -9,7 +9,7 @@
- 
- install_opts :=
- 
--CFLAGS += -Wall -Werror -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
-+CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
- 	-DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
- 
- netplugd: config.o netlink.o lib.o if_info.o main.o
package/netplug/netplug-1.2.9.2-makefile-flags.patch new file +21 -0
new file mode 100644
index 0000000..b2468f8
@@ -0,0 +1,21 @@
+Preserve the cflags settings, because buildroot clobbers them.
+
+--- a/Makefile	2010-10-05 00:06:38.000000000 -0700
++++ b/Makefile	2010-10-05 00:15:27.000000000 -0700
+@@ -11,11 +11,14 @@ mandir ?= $(prefix)/usr/share/man
+ 
+ install_opts :=
+ 
+-CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
++NETPLUG_CFLAGS += -Wall -std=gnu99 -DNP_ETC_DIR='"$(etcdir)"' \
+ 	-DNP_SCRIPT_DIR='"$(scriptdir)"' -ggdb3 -O3 -DNP_VERSION='"$(version)"'
+ 
++%.o: %.c
++	$(CC) $(NETPLUG_CFLAGS) $(CFLAGS) -c -o $@ $<
++
+ netplugd: config.o netlink.o lib.o if_info.o main.o
+-	$(CC) $(LDFLAGS) -o $@ $^
++	$(CC) $(LDFLAGS) -o $@ $(NETPLUG_CFLAGS) $^
+ 
+ install:
+ 	install -d $(install_opts) -m 755 \
package/netplug/netplug-socklen-type.patch deleted +0 -12
deleted file mode 100644
index 1e36988..0000000
@@ -1,12 +0,0 @@
-diff -ur netplug-1.2.9/netlink.c netplug-1.2.9-patched/netlink.c
---- netplug-1.2.9/netlink.c	2005-01-07 23:57:09.000000000 -0600
-+++ netplug-1.2.9-patched/netlink.c	2008-02-27 20:18:09.855767996 -0600
-@@ -284,7 +284,7 @@
-         exit(1);
-     }
- 
--    int addr_len = sizeof(addr);
-+    socklen_t addr_len = sizeof(addr);
- 
-     if (getsockname(fd, (struct sockaddr *) &addr, &addr_len) == -1) {
-         do_log(LOG_ERR, "Could not get socket details: %m");
package/netplug/netplug.mk +15 -39

66 lines not on this page · raw message

Signature · 1 line
1.7.3.1
#27 lore raw

PATCH 1/10 input-tools: convert to gentargets

In reply to Martin Banky

Hello,

Thanks Martin for doing all this conversion work, this is much appreciated!

package/input-tools/input-tools.mk line 20

Quoted 4 lines · On Tue, 5 Oct 2010 01:22:34 -0700 Martin Banky <[email protected]> wrote:
package/input-tools/input-tools.mk +4 -0
+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.

package/input-tools/input-tools.mk line 29

Quoted 2 lines
package/input-tools/input-tools.mk +2 -0
+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

Signature · 4 lines
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#28 lore raw

PATCH 1/10 input-tools: convert to gentargets

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

Quoted 27 lines · Thomas Petazzoni

Hello,

Thanks Martin for doing all this conversion work, this is much appreciated!

package/input-tools/input-tools.mk

Quoted 4 lines · On Tue, 5 Oct 2010 01:22:34 -0700 Martin Banky <[email protected]> wrote:
package/input-tools/input-tools.mk +4 -0
+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.

package/input-tools/input-tools.mk line 29

Quoted 2 lines
package/input-tools/input-tools.mk +2 -0
+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!

Quoted 11 lines

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>

#29 lore raw

PATCH 1/10 input-tools: convert to gentargets

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

Quoted 14 lines · Martin Banky

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.

Quoted 46 lines

Martin

Quoted 38 lines · Thomas Petazzoni

Hello,

Thanks Martin for doing all this conversion work, this is much appreciated!

package/input-tools/input-tools.mk

Quoted 4 lines · On Tue, 5 Oct 2010 01:22:34 -0700 Martin Banky <[email protected]> wrote:
package/input-tools/input-tools.mk +4 -0
+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.

package/input-tools/input-tools.mk line 29

Quoted 2 lines
package/input-tools/input-tools.mk +2 -0
+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>