usb_modeswitch: update to 1.2.3
PATCH 1/2 usb_modeswitch: update to 1.2.3
This patch updates usb_modeswitch to version 1.2.3.
The usb_modeswitch.mk needed to be modified for usb_modeswitch to compile. Also added extra remove section for the added help scripts and files.
replace TARGET_MAKE_ENV and add USB_MODESWITCH_UNINSTALL_CMDS as recommended by Arnout Vandecappelle
--- .../usb_modeswitch/usb_modeswitch-makefile.patch | 39 +++++++++----------- package/usb_modeswitch/usb_modeswitch.mk | 20 +++++++---- 2 files changed, 31 insertions(+), 28 deletions(-)
package/usb_modeswitch/usb_modeswitch-makefile.patch +18 -21
@@ -1,23 +1,20 @@ -diff -Nura usb-modeswitch-1.1.2.orig/Makefile usb-modeswitch-1.1.2/Makefile ---- usb-modeswitch-1.1.2.orig/Makefile 2010-04-17 15:27:11.000000000 -0300 -+++ usb-modeswitch-1.1.2/Makefile 2010-04-22 15:05:32.363471807 -0300 -@@ -1,6 +1,6 @@ - PROG = usb_modeswitch - VERS = 1.1.2 --CC = gcc -+CC ?= gcc - CFLAGS += -Wall -l usb - RM = /bin/rm -f - OBJS = usb_modeswitch.c -@@ -23,8 +23,9 @@ - install: all - install -d $(SBINDIR) - install --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch -- install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch -- install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf -+ #install --mode=755 usb_modeswitch.tcl $(UDEVDIR)/usb_modeswitch -+ #install --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf -+ install -d $(MANDIR) - install --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1 +--- usb_modeswitch-1.2.3.orig/Makefile.orig 2012-02-06 14:00:15.000000000 -0500 ++++ usb_modeswitch-1.2.3/Makefile 2012-02-06 14:01:13.000000000 -0500 +@@ -46,7 +46,7 @@ + cd jim && $(MAKE) distclean + install-common: +- install -D -s --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch ++ install -D --mode=755 usb_modeswitch $(SBINDIR)/usb_modeswitch + install -D --mode=755 usb_modeswitch.sh $(UDEVDIR)/usb_modeswitch + install -D --mode=644 usb_modeswitch.conf $(ETCDIR)/usb_modeswitch.conf + install -D --mode=644 usb_modeswitch.1 $(MANDIR)/usb_modeswitch.1 +@@ -65,7 +65,7 @@ + install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher + + install-binary: +- install -D -s --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher ++ install -D --mode=755 usb_modeswitch_dispatcher $(SBINDIR)/usb_modeswitch_dispatcher + + install: all install-common install-script
package/usb_modeswitch/usb_modeswitch.mk +13 -7
@@ -4,25 +4,31 @@ # ############################################################# -USB_MODESWITCH_VERSION = 1.1.2 +USB_MODESWITCH_VERSION = 1.2.3 USB_MODESWITCH_SOURCE = usb-modeswitch-$(USB_MODESWITCH_VERSION).tar.bz2 USB_MODESWITCH_SITE = http://www.draisberghof.de/usb_modeswitch USB_MODESWITCH_DEPENDENCIES = libusb-compat define USB_MODESWITCH_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) + $(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) endef define USB_MODESWITCH_INSTALL_TARGET_CMDS $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install - $(INSTALL) -D $(@D)/usb_modeswitch.setup -m 0644 \ - $(TARGET_DIR)/etc/usb_modeswitch.setup endef + define USB_MODESWITCH_CLEAN_CMDS - rm -f $(TARGET_DIR)/usr/sbin/usb_modeswitch - rm -f $(TARGET_DIR)/etc/usb_modeswitch.setup - rm -f $(TARGET_DIR)/usr/share/man/man1/usb_modeswitch.1 + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) clean +endef + +define USB_MODESWITCH_UNINSTALL_CMDS + $(RM) -f $(TARGET_DIR)/usr/sbin/usb_modeswitch + $(RM) -f $(TARGET_DIR)/lib/udev/usb_modeswitch + $(RM) -f $(TARGET_DIR)/etc/usb_modeswitch.setup + $(RM) -f $(TARGET_DIR)/usr/share/man/man1/usb_modeswitch.1 + $(RM) -rf $(TARGET_DIR)/var/lib/usb_modeswitch + $(RM) -f $(TARGET_DIR)/usr/sbin/usb_modeswitch_dispatcher endef $(eval $(call GENTARGETS))
Signature · 1 line
1.7.5.4
PATCH 1/2 usb_modeswitch: update to 1.2.3
I believe I have implemented all changes requested. I have tested and this
builds fine for me with no error. I have installed the whole images onto my devices. Both a synapse E10 and an at91sam9g20evk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120212/be2250a6/attachment.html>
PATCH 2/2 new program: usb_modeswitch_data
In reply to J.C. Woltzusb_modeswitch_data provides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situation
Fix usb_modeswitch_data to depend usb_modeswitch
add $(TARGET_CONFIGURE_OPTS) to be consistent with usb_modeswitch
--- package/Config.in | 1 + package/usb_modeswitch_data/Config.in | 8 ++++++ .../usb_modeswitch_data-makefile.patch | 24 ++++++++++++++++++ package/usb_modeswitch_data/usb_modeswitch_data.mk | 26 ++++++++++++++++++++ 4 files changed, 59 insertions(+), 0 deletions(-) create mode 100644 package/usb_modeswitch_data/Config.in create mode 100644 package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch create mode 100644 package/usb_modeswitch_data/usb_modeswitch_data.mk
package/Config.in +1 -0
@@ -220,6 +220,7 @@ source "package/uboot-tools/Config.in" source "package/udev/Config.in" source "package/unionfs/Config.in" source "package/usb_modeswitch/Config.in" +source "package/usb_modeswitch_data/Config.in" source "package/usbmount/Config.in" source "package/usbutils/Config.in" source "package/wipe/Config.in"
package/usb_modeswitch_data/Config.in new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + depends on BR2_PACKAGE_USB_MODESWITCH + bool "usb_modeswitch_data" + help + USB mode switch data + Contains udev rules and other device data + + http://www.draisberghof.de/usb_modeswitch/
package/usb_modeswitch_data/usb_modeswitch_data-makefile.patch new file +24 -0
@@ -0,0 +1,24 @@ +diff -Nura usb_modeswitch_data-20120120.orig/Makefile usb_modeswitch_data-20120120/Makefile +--- usb_modeswitch_data-20120120.orig/Makefile 2012-01-20 17:25:32.000000000 -0500 ++++ usb_modeswitch_data-20120120/Makefile 2012-02-06 14:20:47.000000000 -0500 +@@ -12,9 +12,9 @@ + + clean: + +-install: files-install db-install rules-reload ++install: files-install db-install + +-install-packed: files-install db-install-packed rules-reload ++install-packed: files-install db-install-packed + + files-install: + install -d $(PREFIX)/share/usb_modeswitch +@@ -50,7 +50,7 @@ + fi \ + fi + +-uninstall: files-uninstall rules-reload ++uninstall: files-uninstall + + files-uninstall: + $(RM) $(RULESDIR)/40-usb_modeswitch.rules
package/usb_modeswitch_data/usb_modeswitch_data.mk new file +26 -0
@@ -0,0 +1,26 @@ +############################################################# +# +# usb_modeswitch_data +# +############################################################# + +USB_MODESWITCH_DATA_VERSION = 20120120 +USB_MODESWITCH_DATA_SOURCE = usb-modeswitch-data-$(USB_MODESWITCH_DATA_VERSION).tar.bz2 +USB_MODESWITCH_DATA_SITE = http://www.draisberghof.de/usb_modeswitch +USB_MODESWITCH_DATA_DEPENDENCIES = usb_modeswitch + +define USB_MODESWITCH_DATA_BUILD_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) +endef + +define USB_MODESWITCH_DATA_INSTALL_TARGET_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) install +endef + + +define USB_MODESWITCH_DATA_CLEAN_CMDS + $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) DESTDIR=$(TARGET_DIR) clean +endef + +$(eval $(call GENTARGETS)) +
Signature · 1 line
1.7.5.4
PATCH 2/2 new program: usb_modeswitch_data
Quoted 9 lines · On Sunday 12 February 2012 20:09:53 J.C. Woltz wrote:
usb_modeswitch_dataprovides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situationSigned-off-by J.C. Woltz <[email protected]>Fix
usb_modeswitch_datato dependusb_modeswitch
add $(TARGET_CONFIGURE_OPTS) to be consistent withusb_modeswitch
Err... You just changed it into TARGET_CONFIGURE_ENV in usb_modeswitch...
[snip]
package/usb_modeswitch_data/Config.in line 2
Quoted 4 lines
+++ b/package/usb_modeswitch_data/Config.in
package/usb_modeswitch_data/Config.in new file +2
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + depends on BR2_PACKAGE_USB_MODESWITCH
Can we have a third opinion on whether this should be depends or select?
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 2/2 new program: usb_modeswitch_data
Quoted 6 lines · Arnout Vandecappelle
Quoted 5 lines · On Sunday 12 February 2012 20:09:53 J.C. Woltz wrote:
usb_modeswitch_dataprovides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situation
Quoted 6 lines
Quoted 4 lines
Signed-off-by J.C. Woltz <[email protected]>Fix
usb_modeswitch_datato dependusb_modeswitch
add $(TARGET_CONFIGURE_OPTS) to be consistent withusb_modeswitch?Err... ?You just changed it into
TARGET_CONFIGURE_ENVinusb_modeswitch...
Yes, I did. I'm sorry about that mistake. I will fix, but will wait for third opinion on below select/depends...
Quoted 11 lines
[snip]
Review line 2
Quoted 4 lines
+++ b/package/usb_modeswitch_data/Config.in
(quoted diff) +2
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + ? ? depends on BR2_PACKAGE_USB_MODESWITCH?Can we have a third opinion on whether this should be depends or select?
?Regards,
?Arnout
Please let me know and I will fix.
Thank you,
J.C. Woltz
PATCH 2/2 new program: usb_modeswitch_data
In reply to Arnout VandecappelleQuoted 13 lines · Arnout Vandecappelle
Quoted 9 lines · On Sunday 12 February 2012 20:09:53 J.C. Woltz wrote:
usb_modeswitch_dataprovides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situationSigned-off-by J.C. Woltz <[email protected]>Fix
usb_modeswitch_datato dependusb_modeswitch
add $(TARGET_CONFIGURE_OPTS) to be consistent withusb_modeswitch?Err... ?You just changed it into
TARGET_CONFIGURE_ENVinusb_modeswitch...
Quoted 8 lines
[snip]
Review line 2
Quoted 4 lines
+++ b/package/usb_modeswitch_data/Config.in
(quoted diff) +2
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + ? ? depends on BR2_PACKAGE_USB_MODESWITCH?Can we have a third opinion on whether this should be depends or select?
Arnout,
Do I understand correctly from this that you prefer 'select'? Could you expand on this?
Thanks,
Thomas
PATCH 2/2 new program: usb_modeswitch_data
Quoted 9 lines · Thomas De Schampheleire
Quoted 8 lines · Arnout Vandecappelle
Quoted 7 lines · On Sunday 12 February 2012 20:09:53 J.C. Woltz wrote:
usb_modeswitch_dataprovides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situationSigned-off-by J.C. Woltz <[email protected]>
[snip]
Quoted 11 lines
Quoted 7 lines
Review line 2
Quoted 4 lines
+++ b/package/usb_modeswitch_data/Config.in
(quoted diff) +2
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + ? ? depends on BR2_PACKAGE_USB_MODESWITCH?Can we have a third opinion on whether this should be depends or select?
Arnout,
Do I understand correctly from this that you prefer 'select'? Could you expand on this?
I am waiting for an answer on that before resubmitting with the other fix. In the mean time I noticed something else. The script that get called from udev when it detects a device, usr/sbin/usb_modeswitch_dispatcher, uses tclsh. Specifically #!/usr/bin/tclsh
Three questions:
1. Should usb_modeswitch_data depend on tcl? (BR2_PACKAGE_TCL)
2. The tcl package creates a usr/bin/tclsh8.4 but not a usr/bin/tclsh. Should the BR2_PACKAGE_TCL when BR2_PACKAGE_TCL_SHLIB_ONLY is not selected, create a symlink?
3. How do I tell usb_modeswitch_data to depend on BR2_PACKAGE_TCL but to exclude BR2_PACKAGE_TCL_SHLIB_ONLY?
Thank you,
J.C. Woltz
PATCH 2/2 new program: usb_modeswitch_data
Quoted 7 lines · On Monday 13 February 2012 17:59:46 J.C. Woltz wrote:
The script that get
called from udev when it detects a device,usr/sbin/usb_modeswitch_dispatcher, uses tclsh. Specifically #!/usr/bin/tclshThree questions:
1. Shouldusb_modeswitch_datadepend on tcl? (BR2_PACKAGE_TCL)
Certainly. Or rather, it should select it :-)
Quoted 3 lines
2. The tcl package creates a
usr/bin/tclsh8.4but not ausr/bin/tclsh. Should theBR2_PACKAGE_TCLwhenBR2_PACKAGE_TCL_SHLIB_ONLYis not selected, create a symlink?
I guess it should...
Quoted 2 lines
3. How do I tell
usb_modeswitch_datato depend onBR2_PACKAGE_TCLbut to excludeBR2_PACKAGE_TCL_SHLIB_ONLY?
Good question... You can make the usb_modeswitch_data package depend
on !BR2_PACKAGE_TCL_SHLIB_ONLY. Or you could define a new BR2_PACKAGE_TCL_TCLSH config, and make BR2_PACKAGE_TCL_SHLIB_ONLY depend on !BR2_PACKAGE_TCL_TCLSH.
Regards,
Arnout
Signature · 9 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120215/24c5e138/attachment.html>
PATCH 1/1 tcl: replace option to install library only with positive option to install tclsh
From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
Without this patch, it was impossible for a package that relies on the tclsh interpreter to select it. This patch replaces the negative BR2_PACKAGE_TCL_SHLIB_ONLY config with the positive BR2_PACKAGE_TCL_TCLSH config.
Also a few minor fixes to the mk-file:
- Stripping the library didn't work because it was installed read-only.
- Create a symlink tclsh -> tclsh8.4.
---
I didn't think the minor fixes were relevant to send as separate patches. If I should split them up, please tell me which one should come first.
Regards,
Arnout
--- package/tcl/Config.in | 20 ++++++++++---------- package/tcl/tcl.mk | 29 ++++++++++++++++++++--------- 2 files changed, 30 insertions(+), 19 deletions(-)
package/tcl/Config.in +10 -10
@@ -5,10 +5,18 @@ config BR2_PACKAGE_TCL http://www.tcl.tk +if BR2_PACKAGE_TCL + +config BR2_PACKAGE_TCL_TCLSH + bool "install tclsh" + help + Install tclsh, the TCL interpreter. + + Takes ~14kb on top of the libraries. + config BR2_PACKAGE_TCL_DEL_ENCODINGS bool "delete encodings (saves 1.4Mb)" default y - depends on BR2_PACKAGE_TCL help Delete encoding files for TCL. If your programs do not use various tcl character recoding functions, you may safely
@@ -16,12 +24,4 @@ config BR2_PACKAGE_TCL_DEL_ENCODINGS It saves approx. 1.4 Mb of space. -config BR2_PACKAGE_TCL_SHLIB_ONLY - bool "install only shared library" - default y - depends on BR2_PACKAGE_TCL - help - Install only TCL shared library and not binary tcl - interpreter(tclsh8.4). - - Saves ~14kb. +endif
package/tcl/tcl.mk +20 -9
@@ -19,17 +19,28 @@ HOST_TCL_CONF_OPT = \ --disable-langinfo \ --disable-framework -define TCL_POST_INSTALL_CLEANUP - -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so - -if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \ - rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*; \ - fi - -if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \ - rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR); \ - fi +# libtcl is installed with mode 444, so correct that first. +define TCL_POST_INSTALL_STRIP + chmod +w $(TARGET_DIR)/usr/lib/libtcl$(TCL_VERSION_MAJOR).so + -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl$(TCL_VERSION_MAJOR).so endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_STRIP + +define TCL_POST_INSTALL_RM_ENCODINGS-y + rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_RM_ENCODINGS-$(BR2_PACKAGE_TCL_DEL_ENCODINGS) + +define TCL_POST_INSTALL_RM_TCLSH- + rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_RM_TCLSH-$(BR2_PACKAGE_TCL_TCLSH) + +define TCL_POST_INSTALL_LN_TCLSH-y + ln -snf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_LN_TCLSH-$(BR2_PACKAGE_TCL_TCLSH) -TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_CLEANUP $(eval $(call AUTOTARGETS)) $(eval $(call AUTOTARGETS,host))
Signature · 1 line
1.7.8.3
PATCH 1/1 tcl: replace option to install library only with positive option to install tclsh
Quoted 7 lines · Arnout Vandecappelle (Essensium/Mind)
From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
Without this patch, it was impossible for a package that relies on the tclsh interpreter to select it. ?This patch replaces the negative
BR2_PACKAGE_TCL_SHLIB_ONLYconfig with the positiveBR2_PACKAGE_TCL_TCLSHconfig.
Quoted 7 lines
Also a few minor fixes to the mk-file:
- Stripping the library didn't work because it was installed read-only.
- Create a symlink tclsh -> tclsh8.4.
Quoted 94 lines
---
I didn't think the minor fixes were relevant to send as separate patches. If I should split them up, please tell me which one should come first.Regards,
Arnout
---
?package/tcl/Config.in | ? 20 ++++++++++---------- ?package/tcl/tcl.mk ? ?| ? 29 ++++++++++++++++++++--------- ?2 files changed, 30 insertions(+), 19 deletions(-)package/tcl/Config.in +0
-0@@ -5,10 +5,18 @@ config BR2_PACKAGE_TCL? ? ? ? ?http://www.tcl.tk
package/tcl/Config.in +9
-0+if BR2_PACKAGE_TCL + +config BR2_PACKAGE_TCL_TCLSH + ? ? ? bool "install tclsh" + ? ? ? help + ? ? ? ? Install tclsh, the TCL interpreter. + + ? ? ? ? Takes ~14kb on top of the libraries. +?config
BR2_PACKAGE_TCL_DEL_ENCODINGS
? ? ? ?bool "delete encodings (saves 1.4Mb)"
? ? ? ?default y
- ? ? ? depends onBR2_PACKAGE_TCL
? ? ? ?help
? ? ? ? ?Delete encoding files for TCL. If your programs do not use ? ? ? ? ?various tcl character recoding functions, you may safelypackage/tcl/Config.in +0
-0@@ -16,12 +24,4 @@ config BR2_PACKAGE_TCL_DEL_ENCODINGS? ? ? ? ?It saves approx. 1.4 Mb of space.
package/tcl/Config.in +1
-9-config BR2_PACKAGE_TCL_SHLIB_ONLY - ? ? ? bool "install only shared library" - ? ? ? default y - ? ? ? depends on BR2_PACKAGE_TCL - ? ? ? help - ? ? ? ? Install only TCL shared library and not binary tcl - ? ? ? ? interpreter(tclsh8.4). - - ? ? ? ? Saves ~14kb. +endifpackage/tcl/tcl.mk +0
-0@@ -19,17 +19,28 @@ HOST_TCL_CONF_OPT = \ ? ? ? ? ? ? ? ?--disable-langinfo \? ? ? ? ? ? ? ?--disable-framework
package/tcl/tcl.mk +4
-8-define TCL_POST_INSTALL_CLEANUP - ? ? ? -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl8.4.so - ? ? ? -if [ "$(BR2_PACKAGE_TCL_DEL_ENCODINGS)" = "y" ]; then \ - ? ? ? rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/*; \ - ? ? ? fi - ? ? ? -if [ "$(BR2_PACKAGE_TCL_SHLIB_ONLY)" = "y" ]; then \ - ? ? ? rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR); \ - ? ? ? fi +# libtcl is installed with mode 444, so correct that first. +define TCL_POST_INSTALL_STRIP + ? ? ? chmod +w $(TARGET_DIR)/usr/lib/libtcl$(TCL_VERSION_MAJOR).so + ? ? ? -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libtcl$(TCL_VERSION_MAJOR).so?endef
package/tcl/tcl.mk +16
-1+TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_STRIP + +define TCL_POST_INSTALL_RM_ENCODINGS-y + ? ? ? rm -Rf $(TARGET_DIR)/usr/lib/tcl$(TCL_VERSION_MAJOR)/encoding/* +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_RM_ENCODINGS-$(BR2_PACKAGE_TCL_DEL_ENCODINGS) + +define TCL_POST_INSTALL_RM_TCLSH- + ? ? ? rm -f $(TARGET_DIR)/usr/bin/tclsh$(TCL_VERSION_MAJOR) +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_RM_TCLSH-$(BR2_PACKAGE_TCL_TCLSH) + +define TCL_POST_INSTALL_LN_TCLSH-y + ? ? ? ln -snf tclsh$(TCL_VERSION_MAJOR) $(TARGET_DIR)/usr/bin/tclsh +endef +TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_LN_TCLSH-$(BR2_PACKAGE_TCL_TCLSH) -TCL_POST_INSTALL_TARGET_HOOKS += TCL_POST_INSTALL_CLEANUP?$(eval $(call AUTOTARGETS))
?$(eval $(call AUTOTARGETS,host))
--
1.7.8.3
PATCH 1/1 tcl: replace option to install library only with positive option to install tclsh
In reply to Arnout Vandecappelle (Essensium/Mind)Le Wed, 15 Feb 2012 00:48:57 +0100,
"Arnout Vandecappelle (Essensium/Mind)" <[email protected]> a ?crit :
Quoted 7 lines
From: "Arnout Vandecappelle (Essensium/Mind)" <[email protected]>
Without this patch, it was impossible for a package that relies on the tclsh interpreter to select it. This patch replaces the negative
BR2_PACKAGE_TCL_SHLIB_ONLYconfig with the positiveBR2_PACKAGE_TCL_TCLSHconfig.
Quoted 7 lines
Also a few minor fixes to the mk-file:
- Stripping the library didn't work because it was installed read-only.
- Create a symlink tclsh -> tclsh8.4.
Is this still needed?
Thomas
Signature · 4 lines
Thomas Petazzoni, Free Electrons Kernel, drivers, real-time and embedded Linux development, consulting, training and support. http://free-electrons.com
PATCH 1/1 tcl: replace option to install library only with positive option to install tclsh
Quoted 10 lines · Thomas Petazzoni
Le Wed, 15 Feb 2012 00:48:57 +0100,
"Arnout Vandecappelle (Essensium/Mind)"<[email protected]> a ?crit :Quoted 7 lines
From: "Arnout Vandecappelle (Essensium/Mind)"<[email protected]>
Without this patch, it was impossible for a package that relies on the tclsh interpreter to select it. This patch replaces the negative
BR2_PACKAGE_TCL_SHLIB_ONLYconfig with the positiveBR2_PACKAGE_TCL_TCLSHconfig.
Quoted 9 lines
Quoted 7 lines
Also a few minor fixes to the mk-file:
- Stripping the library didn't work because it was installed read-only.
- Create a symlink tclsh -> tclsh8.4.
Signed-off-by Arnout Vandecappelle (Essensium/Mind)<[email protected]>Is this still needed?
It's a prerequisite for the usb_modeswitch_data package by J.C. Woltz.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout dot vandecappelle at essensium dot com Senior Embedded Software Architect . . +32-16-286540 . +32-478-010353 (mobile) Essensium, Mind division . . . . . . . . . . . . . . . . . http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium . . . . . . . . BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 31BB CF53 8660 6F88 345D 54CC A836 5879 20D7 CF43
PATCH 2/2 new program: usb_modeswitch_data
In reply to Thomas De SchampheleireQuoted 23 lines · On Monday 13 February 2012 09:03:23 Thomas De Schampheleire wrote:
Quoted 13 lines · Arnout Vandecappelle
Quoted 9 lines · On Sunday 12 February 2012 20:09:53 J.C. Woltz wrote:
usb_modeswitch_dataprovides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situationSigned-off-by J.C. Woltz <[email protected]>Fix
usb_modeswitch_datato dependusb_modeswitch
add $(TARGET_CONFIGURE_OPTS) to be consistent withusb_modeswitchErr... You just changed it into
TARGET_CONFIGURE_ENVinusb_modeswitch...Quoted 8 lines
[snip]
package/usb_modeswitch_data/Config.in line 2
Quoted 4 lines
+++ b/package/usb_modeswitch_data/Config.in
package/usb_modeswitch_data/Config.in new file +2
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + depends on BR2_PACKAGE_USB_MODESWITCHCan we have a third opinion on whether this should be depends or select?
Quoted 3 lines
Arnout,
Do I understand correctly from this that you prefer 'select'? Could you expand on this?
I explained that in my reply to the v1 of the patch:
"That's not entirely true. select itself is transitive; it just doesn't check if the select'd item depends on something. But it will recursively select other packages. So with the select statement, USB_MODESWITCH_DATA will select USB_MODESWITCH, which will select LIBUSB_COMPAT, which will select LIBUSB.
[snip]
I think the general trend is to prefer select rather than depends when
they are separate packages - precisely because this avoids the potential inconsistencies you mentioned. Take libusb-compat, for instance. It's obviously an extension of libusb, but because libusb-compat selects libusb, it makes it easy and safe for other packages to select libusb-compat."
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 2/2 new program: usb_modeswitch_data
Quoted 36 lines · Arnout Vandecappelle
Quoted 23 lines · On Monday 13 February 2012 09:03:23 Thomas De Schampheleire wrote:
Quoted 13 lines · Arnout Vandecappelle
Quoted 9 lines · On Sunday 12 February 2012 20:09:53 J.C. Woltz wrote:
usb_modeswitch_dataprovides udev rules for usb VID/PID combinations to switch usb deices from their default mode into a more useable mode. The default mode usually is a cdrom with installation software that is of little use in an embedded linux situationSigned-off-by J.C. Woltz <[email protected]>Fix
usb_modeswitch_datato dependusb_modeswitch
add $(TARGET_CONFIGURE_OPTS) to be consistent withusb_modeswitch?Err... ?You just changed it into
TARGET_CONFIGURE_ENVinusb_modeswitch...Quoted 8 lines
[snip]
Review line 2
Quoted 4 lines
+++ b/package/usb_modeswitch_data/Config.in
(quoted diff) +2
-0@@ -0,0 +1,8 @@ +config BR2_PACKAGE_USB_MODESWITCH_DATA + ? ? depends on BR2_PACKAGE_USB_MODESWITCH?Can we have a third opinion on whether this should be depends or select?
Quoted 3 lines
Arnout,
Do I understand correctly from this that you prefer 'select'? Could you expand on this??I explained that in my reply to the v1 of the patch:
"That's not entirely true. ?select itself is transitive; it just doesn't check if the select'd item depends on something. ?But it will recursively select other packages. ?So with the select statement,
USB_MODESWITCH_DATAwill selectUSB_MODESWITCH, which will selectLIBUSB_COMPAT, which will select LIBUSB.
Quoted 7 lines
[snip]
?I think the general trend is to prefer select rather than depends when they are separate packages - precisely because this avoids the potential inconsistencies you mentioned. ?Take libusb-compat, for instance. ?It's obviously an extension of libusb, but because libusb-compat selects libusb, it makes it easy and safe for other packages to select libusb-compat."
Sorry, I missed that reply.
Although I understand your reasoning, I look at it from a different angle. Package usb_modeswitch_data doesn't make sense if you don't have usb_modeswitch. No-one will think 'Hey, I want package usb_modeswitch_data' without realizing he should select usb_modeswitch first. Therefore it makes no sense in showing the configuration option unless usb_modeswitch has been selected.. That's why I think that a 'depends on' relation is more appropriate.
The fact that usb_modeswitch in turn 'selects' libusb and libusb-compat is a little different. For users that want usb_modeswitch, the relation to libusb/libusb-compat is probably not clear, and so 'depends on' is not appropriate here.
By using 'depends on' for usb_modeswitch_data, the dependencies between the various packages are correctly expressed.
On the other hand, due to the libusb/libusb-compat select from usb_modeswitch, there is a problem (independent of whether usb_modeswitch_data uses select or depends). Suppose libusb needs to depend on libsomething. Then, every package that selects libusb, needs to also select libsomething from that point onwards.
This shows that the usage of select should be limited as much as possible. The longer the select chain, the more risk you have of needing to add extra selects in the future.
I agree, input from other developers is very welcome here...
Best regards ,
Thomas
PATCH 2/2 new program: usb_modeswitch_data
Quoted 7 lines · On Tuesday 14 February 2012 10:22:49 Thomas De Schampheleire wrote:
Although I understand your reasoning, I look at it from a different angle. Package
usb_modeswitch_datadoesn't make sense if you don't haveusb_modeswitch. No-one will think 'Hey, I want packageusb_modeswitch_data' without realizing he should selectusb_modeswitchfirst. Therefore it makes no sense in showing the configuration option unlessusb_modeswitchhas been selected.. That's why I think that a 'depends on' relation is more appropriate.
However, there may be another package later that depends onusb_modeswitch_data. That other package should then either select both usb_modeswitch and usb_modeswitch_data, or it should be itself a 'depends on'. But for that other package, it may be much less obvious that it's related to usb_modeswitch at all.
Quoted 4 lines
The fact that
usb_modeswitchin turn 'selects' libusb and libusb-compat is a little different. For users that wantusb_modeswitch, the relation to libusb/libusb-compat is probably not clear, and so 'depends on' is not appropriate here.
True.
Quoted 5 lines
On the other hand, due to the libusb/libusb-compat select from
usb_modeswitch, there is a problem (independent of whetherusb_modeswitch_datauses select or depends). Suppose libusb needs to depend on libsomething. Then, every package that selects libusb, needs to also select libsomething from that point onwards.
Exactly my point. libusb itself shouldn't depend on another package,
it should only depend on stuff like USE_WCHAR. Adding a 'depends on' makes it more difficult to add packages later on.
Quoted 2 lines
This shows that the usage of select should be limited as much as possible.
No, it shows that usage of 'depends on' should be limited :-P
(I think we can carry on like this for a while :-)
Quoted 2 lines
The longer the select chain, the more risk you have of needing to add extra selects in the future.
If you look at the current packages, almost none use 'depends on'.
Of course, there are dependencies on 'big packages', like xorg, efl, gtk2, gstreamer, etc. And then there are some that are really obvious, like directfb-examples. And finally, some are wrong if you ask me, like alsamixergui.
Regards,
Arnout
Signature · 9 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20120214/c3b1d33e/attachment-0001.html>
PATCH 1/2 usb_modeswitch: update to 1.2.3
In reply to J.C. WoltzQuoted 5 lines · On Sunday 12 February 2012 20:09:52 J.C. Woltz wrote:
This patch updates
usb_modeswitchto version 1.2.3.
The usb_modeswitch.mk needed to be modified forusb_modeswitchto compile. Also added extra remove section for the added help scripts and files.Signed-off-by J.C. Woltz <[email protected]>
Thank you for your contribution!
Still two remarks for the next time you make a patch.
- Comments about the evolution of the patch, that don't need to end up in the git repository, like the one below, should go under three dashes. That way Peter can simply run 'git am' on your patch and the unnecessary comments will not be taken up in the git log.
- .patch files should have a comment at the top explaining why it is needed, and a Signed-off-by line. Also, try to send the patch upstream, so we don't need to carry it forward forever.
Regards,
Arnout
Quoted 5 lines
replace
TARGET_MAKE_ENVand addUSB_MODESWITCH_UNINSTALL_CMDSas recommended by Arnout VandecappelleSigned-off-by J.C. Woltz <[email protected]>---
[snip]
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/2 usb_modeswitch: update to 1.2.3
Quoted 9 lines · Arnout Vandecappelle
Quoted 5 lines · On Sunday 12 February 2012 20:09:52 J.C. Woltz wrote:
This patch updates
usb_modeswitchto version 1.2.3.
The usb_modeswitch.mk needed to be modified forusb_modeswitchto compile. Also added extra remove section for the added help scripts and files.Signed-off-by J.C. Woltz <[email protected]>
Quoted 8 lines
?Thank you for your contribution!
?Still two remarks for the next time you make a patch.
- Comments about the evolution of the patch, that don't need to end up in the git repository, like the one below, should go under three dashes. That way Peter can simply run 'git am' on your patch and the unnecessary comments will not be taken up in the git log.
Will do.
Quoted 4 lines
- .patch files should have a comment at the top explaining why it is needed, and a Signed-off-by line. ?Also, try to send the patch upstream, so we don't need to carry it forward forever.
What do you mean by this? Buildroot already had a patch for usb_modeswitch. The only thing my patch did to the makefile was remove the -s flag from two install commands. On a normal system, the -s on the install makes sense. In a buildroot environment where the software is not installed directly, this patch was needed. If you still believe that an upstream patch is needed, then I can do that.
Quoted 4 lines
?Regards,
?Arnout
Thank you,
J.C. Woltz
PATCH 1/2 usb_modeswitch: update to 1.2.3
Quoted 6 lines · On Monday 13 February 2012 03:57:05 J.C. Woltz wrote:
Quoted 3 lines
- .patch files should have a comment at the top explaining why it is needed, and a Signed-off-by line. Also, try to send the patch upstream, so we don't need to carry it forward forever.
What do you mean by this? Buildroot already had a patch for
usb_modeswitch.
Indeed, and this patch didn't have a Signed-off-by. That's why this
remarks is for the next time you write a patch.
Quoted 3 lines
- .patch files should have a comment at the top explaining why it is needed, and a Signed-off-by line. Also, try to send the patch upstream, so we don't need to carry it forward forever.
What do you mean by this? Buildroot already had a patch for usb_modeswitch. The only thing my patch did to the makefile was remove the -s flag from two install commands. On a normal system, the -s on the install makes sense. In a buildroot environment where the software is not installed directly, this patch was needed. If you still believe that an upstream patch is needed, then I can do that.
BTW the new patch file doesn't reuse any change from the old patch file,
so if there would have been and S-o-b in the original patch file, you wouldn't have had to keep it.
Quoted 5 lines
The only thing my patch did to the makefile was remove
the -s flag from two install commands. On a normal system, the -s on the install makes sense. In a buildroot environment where the software is not installed directly, this patch was needed. If you still believe that an upstream patch is needed, then I can do that.
But since install -s makes cross-compilation more difficult, it shouldn't
be used by anyone :-). The Makefile should at least replace it with something configurable, e.g. $(STRIP) (which we can define to ":", because we strip everything in the target directory but only if it was requested).
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286540 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F