[oe] [meta-oe][PATCH] cgdb: add recipe

Ben Shelton ben.shelton at ni.com
Fri Aug 15 15:00:31 UTC 2014


cgdb is a lightweight ncurses-based interface to gdb that provides
syntax highlighting, visual breakpoints, and other features.

Signed-off-by: Ben Shelton <ben.shelton at ni.com>
---
NOTE: I'm posting this because I had this recipe hanging around locally, and I
saw some traffic on the oe-core list about it but never saw a recipe submitted.
I'd like to get some feedback on whether the patch is an OK way to get around
the cross-target build issues, or whether there's a better way to do it.

 meta-oe/recipes-devtools/cgdb/cgdb/configfix.patch | 40 ++++++++++++++++++++++
 meta-oe/recipes-devtools/cgdb/cgdb_0.6.7.bb        | 16 +++++++++
 2 files changed, 56 insertions(+)
 create mode 100644 meta-oe/recipes-devtools/cgdb/cgdb/configfix.patch
 create mode 100644 meta-oe/recipes-devtools/cgdb/cgdb_0.6.7.bb

diff --git a/meta-oe/recipes-devtools/cgdb/cgdb/configfix.patch b/meta-oe/recipes-devtools/cgdb/cgdb/configfix.patch
new file mode 100644
index 0000000..25b1386
--- /dev/null
+++ b/meta-oe/recipes-devtools/cgdb/cgdb/configfix.patch
@@ -0,0 +1,40 @@
+diff -rupN cgdb-0.6.7-OLD/configure.in cgdb-0.6.7/configure.in
+--- cgdb-0.6.7-OLD/configure.in	2013-01-14 05:31:53.000000000 -0600
++++ cgdb-0.6.7/configure.in	2014-05-08 13:18:13.864632180 -0500
+@@ -65,8 +65,9 @@ AC_CHECK_HEADERS([getopt.h],
+ 		 [AC_DEFINE(HAVE_GETOPT_H, 1, have getopt_long)])
+ 
+ dnl determine if /dev/ptmx is available for pseudo terminals
+-AC_CHECK_FILE([/dev/ptmx],
+-	      [AC_DEFINE(HAVE_DEV_PTMX, 1, have /dev/ptmx)])
++dnl AC_CHECK_FILE([/dev/ptmx],
++dnl	      [AC_DEFINE(HAVE_DEV_PTMX, 1, have /dev/ptmx)])
++AC_DEFINE(HAVE_DEV_PTMX, 1, have /dev/ptmx)
+ 
+ dnl Checks for typedefs, structures, and compiler characteristics.
+ AC_C_CONST
+@@ -167,15 +168,15 @@ fi
+ 
+ dnl Make sure there is a version of readline that CGDB supports.
+ dnl Simply putting 5.1* -> 5.9* just to take into accout future versions.
+-RL_LIB_READLINE_VERSION
+-case "$ac_cv_rl_version" in
+-5.1*|5.2*|5.3*|5.4*|5.5*|5.6*|5.7*|5.8*|5.9*|6*|7*|8*|9*) ;;
+-*)      AC_MSG_ERROR([CGDB requires GNU readline 5.1 or greater to link.
+-  If you used --with-readline instead of using the system readline library, 
+-  make sure to set the correct readline library on the linker search path 
+-  via LD_LIBRARY_PATH or some other facility.])
+-	;;
+-esac
++dnl RL_LIB_READLINE_VERSION
++dnl case "$ac_cv_rl_version" in
++dnl 5.1*|5.2*|5.3*|5.4*|5.5*|5.6*|5.7*|5.8*|5.9*|6*|7*|8*|9*) ;;
++dnl *)      AC_MSG_ERROR([CGDB requires GNU readline 5.1 or greater to link.
++dnl  If you used --with-readline instead of using the system readline library, 
++dnl  make sure to set the correct readline library on the linker search path 
++dnl  via LD_LIBRARY_PATH or some other facility.])
++dnl	;;
++dnl esac
+ 
+ dnl This will DEFINE the readline headers.
+ RL_LIB_READLINE_INCLUDES
diff --git a/meta-oe/recipes-devtools/cgdb/cgdb_0.6.7.bb b/meta-oe/recipes-devtools/cgdb/cgdb_0.6.7.bb
new file mode 100644
index 0000000..26b2782
--- /dev/null
+++ b/meta-oe/recipes-devtools/cgdb/cgdb_0.6.7.bb
@@ -0,0 +1,16 @@
+SUMMARY = "curses-based interface to gdb"
+HOMEPAGE = "http://cgdb.github.io/"
+SECTION = "devel"
+LICENSE = "GPLv2"
+LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
+DEPENDS = "readline ncurses gdb"
+
+SRC_URI = "http://cgdb.me/files/cgdb-${PV}.tar.gz \
+	   file://configfix.patch"
+SRC_URI[md5sum] = "e2d9a973d2683faf8130a82703bf6a31"
+SRC_URI[sha256sum] = "074ed31d1e827a04574add8c27d391447d75313e85ff938005d8ec939499fda9"
+
+EXTRA_OECONF = "--with-readline=${STAGING_LIBDIR} --with-ncurses=${STAGING_LIBDIR}"
+
+inherit autotools
+
-- 
2.0.4




More information about the Openembedded-devel mailing list