Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Urry <matthew.j.urry@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/1] chdkptp CLI added
Date: Mon, 23 Dec 2013 11:30:50 +0000	[thread overview]
Message-ID: <1387798250-2437-2-git-send-email-matthew.j.urry@gmail.com> (raw)
In-Reply-To: <1387798250-2437-1-git-send-email-matthew.j.urry@gmail.com>


Signed-off-by: Matthew Urry <matthew.j.urry@gmail.com>
---
 package/Config.in                                  |    1 +
 package/chdkptp/Config.in                          |   15 +++++++++++
 .../chdkptp-01-add_lm_flag_to_makefile.patch       |   15 +++++++++++
 ...ptp-02-create_sh_script_to_launch_chdkptp.patch |   22 ++++++++++++++++
 package/chdkptp/chdkptp.mk                         |   27 ++++++++++++++++++++
 5 files changed, 80 insertions(+)
 create mode 100644 package/chdkptp/Config.in
 create mode 100644 package/chdkptp/chdkptp-01-add_lm_flag_to_makefile.patch
 create mode 100644 package/chdkptp/chdkptp-02-create_sh_script_to_launch_chdkptp.patch
 create mode 100644 package/chdkptp/chdkptp.mk

diff --git a/package/Config.in b/package/Config.in
index 3685807..369d361 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -259,6 +259,7 @@ endmenu
 source "package/a10disp/Config.in"
 source "package/acpid/Config.in"
 source "package/cdrkit/Config.in"
+source "package/chdkptp/Config.in"
 source "package/cryptsetup/Config.in"
 source "package/dbus/Config.in"
 source "package/dbus-glib/Config.in"
diff --git a/package/chdkptp/Config.in b/package/chdkptp/Config.in
new file mode 100644
index 0000000..cfd2de9
--- /dev/null
+++ b/package/chdkptp/Config.in
@@ -0,0 +1,15 @@
+config BR2_PACKAGE_CHDKPTP
+	bool "chdkptp"
+	select BR2_PACKAGE_LUA 
+	select BR2_PACKAGE_LIBUSB
+	select BR2_PACKAGE_LIBUSB_COMPAT
+	depends on BR2_LARGEFILE
+	depends on BR2_USE_WCHAR
+	help
+	  chdkptp is a client application for interacting with
+	  the chdk ptp extension. This will complie the CLI only.
+	  
+	  http://chdk.wikia.com/wiki/CHDK
+	  https://www.assembla.com/spaces/chdkptp/wiki
+comment "chdkptp needs a toolchain w/ largefile and wchar"
+	depends on (!BR2_LARGEFILE || !BR2_USE_WCHAR)
diff --git a/package/chdkptp/chdkptp-01-add_lm_flag_to_makefile.patch b/package/chdkptp/chdkptp-01-add_lm_flag_to_makefile.patch
new file mode 100644
index 0000000..82aeedd
--- /dev/null
+++ b/package/chdkptp/chdkptp-01-add_lm_flag_to_makefile.patch
@@ -0,0 +1,15 @@
+Makefile: add -lm to linker flags
+
+Signed-off-by: Matthew Urry <matthew.j.urry@gmail.com>
+
+diff -purN chdkptp-461.orig/Makefile chdkptp-461/Makefile
+--- chdkptp-461.orig/Makefile	2013-12-08 12:10:18.469855434 +0000
++++ chdkptp-461/Makefile	2013-12-08 12:11:16.164098345 +0000
+@@ -88,6 +88,7 @@ INC_PATHS+=-I$(CHDK_SRC_DIR)
+ CFLAGS+=$(INC_PATHS) -DCHDKPTP_BUILD_NUM=$(SVNREV) -DCHDKPTP_REL_DESC="\"alpha\""
+ 
+ LDFLAGS+=$(LIB_PATHS) $(patsubst %,-l%,$(LINK_LIBS) $(SYS_LIBS)) 
++LDFLAGS+=-lm
+ 
+ SUBDIRS=lfs
+ 
diff --git a/package/chdkptp/chdkptp-02-create_sh_script_to_launch_chdkptp.patch b/package/chdkptp/chdkptp-02-create_sh_script_to_launch_chdkptp.patch
new file mode 100644
index 0000000..aadd6c7
--- /dev/null
+++ b/package/chdkptp/chdkptp-02-create_sh_script_to_launch_chdkptp.patch
@@ -0,0 +1,22 @@
+diff -purN chdkptp/chdkptp-sample.sh chdkptp-patched/chdkptp-sample.sh
+--- chdkptp/chdkptp-sample.sh	2013-12-23 09:06:03.772637062 +0000
++++ chdkptp-patched/chdkptp-sample.sh	1970-01-01 01:00:00.000000000 +0100
+@@ -1,7 +0,0 @@
+-#!/bin/sh
+-# adjust the following to your configuration
+-CHDKPTP_DIR=/path/to/chdkptp
+-# only need if you have compiled IUP support and have NOT installed the libraries to system directories 
+-#export LD_LIBRARY_PATH=/path/to/iup:/path/to/cd
+-export LUA_PATH="$CHDKPTP_DIR/lua/?.lua"
+-"$CHDKPTP_DIR/chdkptp" "$@"
+diff -purN chdkptp/chdkptp.sh chdkptp-patched/chdkptp.sh
+--- chdkptp/chdkptp.sh	1970-01-01 01:00:00.000000000 +0100
++++ chdkptp-patched/chdkptp.sh	2013-12-23 09:08:51.868642764 +0000
+@@ -0,0 +1,7 @@
++#!/bin/sh
++# adjust the following to your configuration
++CHDKPTP_DIR=/usr/share/chdkptp
++# only need if you have compiled IUP support and have NOT installed the libraries to system directories 
++#export LD_LIBRARY_PATH=/path/to/iup:/path/to/cd
++export LUA_PATH="$CHDKPTP_DIR/lua/?.lua"
++"$CHDKPTP_DIR/chdkptp" "$@"
diff --git a/package/chdkptp/chdkptp.mk b/package/chdkptp/chdkptp.mk
new file mode 100644
index 0000000..80b6a60
--- /dev/null
+++ b/package/chdkptp/chdkptp.mk
@@ -0,0 +1,27 @@
+################################################################################
+#
+# chdkptp
+#
+################################################################################
+
+CHDKPTP_VERSION = 461
+CHDKPTP_SITE = http://subversion.assembla.com/svn/chdkptp/trunk
+CHDKPTP_SITE_METHOD = svn
+CHDKPTP_DEPENDENCIES = libusb-compat lua
+CHDKPTP_LICENSE = GPLv2
+
+define CHDKPTP_BUILD_CMDS
+	$(MAKE) CC="$(TARGET_CC)" LD="$(TARGET_LD)" -C $(@D) 
+endef
+
+define CHDKPTP_INSTALL_TARGET_CMDS
+        $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/chdkptp
+        $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/chdkptp/lua
+        $(INSTALL) -d -m 0755 $(TARGET_DIR)/usr/share/chdkptp/lua/extras
+    	$(INSTALL) -m 0755 $(@D)/chdkptp $(TARGET_DIR)/usr/share/chdkptp
+        $(INSTALL) -m 0755 $(@D)/lua/*.lua $(TARGET_DIR)/usr/share/chdkptp/lua
+        $(INSTALL) -m 0755 $(@D)/lua/extras/*.lua $(TARGET_DIR)/usr/share/chdkptp/lua/extras
+        $(INSTALL) -m 0755 $(@D)/chdkptp.sh $(TARGET_DIR)/usr/bin/chdkptp
+endef
+
+$(eval $(generic-package))
-- 
1.7.10.4

  reply	other threads:[~2013-12-23 11:30 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23 11:30 [Buildroot] [PATCH 0/1] chdkptp cli Matthew Urry
2013-12-23 11:30 ` Matthew Urry [this message]
2013-12-28 16:38   ` [Buildroot] [PATCH 1/1] chdkptp CLI added Thomas Petazzoni
2014-03-07 22:50   ` Thomas Petazzoni
2014-06-11 20:28     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1387798250-2437-2-git-send-email-matthew.j.urry@gmail.com \
    --to=matthew.j.urry@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox