diff options
author | Koen Kooi <koen@openembedded.org> | 2009-10-21 18:15:49 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2009-10-21 18:15:49 +0200 |
commit | eaafa4bd4a5dfd202f7650ec8e1b7af453ace608 (patch) | |
tree | 9f66a9dbef44406abc02ac2396e98e7688d90315 | |
parent | 48239648e94b50d50ced9e76922f5e01a096dff3 (diff) |
gtksourceview: update to latest release, fix packaging
-rw-r--r-- | conf/checksums.ini | 4 | ||||
-rw-r--r-- | recipes/gtksourceview/files/acinclude.m4 | 90 | ||||
-rw-r--r-- | recipes/gtksourceview/files/gtk-doc.m4 | 53 | ||||
-rw-r--r-- | recipes/gtksourceview/files/gtk-doc.make | 173 | ||||
-rw-r--r-- | recipes/gtksourceview/gtksourceview2_2.7.3.bb | 6 | ||||
-rw-r--r-- | recipes/gtksourceview/gtksourceview2_2.9.1.bb | 30 |
6 files changed, 354 insertions, 2 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini index 3723da6787..6465f6e76d 100644 --- a/conf/checksums.ini +++ b/conf/checksums.ini @@ -10910,6 +10910,10 @@ sha256=92ddd976721e26377eaa59fea07707a0caa85eb874500868c1e6fdd9a21fe0dd md5=ea30aecfbd55ebf40c6cf5a0f254f9ba sha256=bf4c6285683a70addedd3ae6b9d4b450d928be497834272c4cd705471333f1ec +[http://ftp.gnome.org/pub/GNOME/sources/gtksourceview/2.9/gtksourceview-2.9.1.tar.bz2] +md5=1e3a378af5f6319d53413394620c4e4a +sha256=b5ebdc5e7d33b99790c6dda14a717711963039f8ea6242c889f540b24ed6678f + [http://downloads.sourceforge.net/gtkterm/gtkterm2-0.2.3.tar.gz] md5=a49f93d15909dbd2e7011428ae01f0f0 sha256=fb68b18d752ae2379f144186b94743be991af1a42c88bc1e6f0685e45cb1d573 diff --git a/recipes/gtksourceview/files/acinclude.m4 b/recipes/gtksourceview/files/acinclude.m4 new file mode 100644 index 0000000000..53518fb2eb --- /dev/null +++ b/recipes/gtksourceview/files/acinclude.m4 @@ -0,0 +1,90 @@ +## this one is commonly used with AM_PATH_PYTHONDIR ... +dnl AM_CHECK_PYMOD(MODNAME [,SYMBOL [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]]) +dnl Check if a module containing a given symbol is visible to python. +AC_DEFUN(AM_CHECK_PYMOD, +[AC_REQUIRE([AM_PATH_PYTHON]) +py_mod_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` +AC_MSG_CHECKING(for ifelse([$2],[],,[$2 in ])python module $1) +AC_CACHE_VAL(py_cv_mod_$py_mod_var, [ +ifelse([$2],[], [prog=" +import sys +try: + import $1 +except ImportError: + sys.exit(1) +except: + sys.exit(0) +sys.exit(0)"], [prog=" +import $1 +$1.$2"]) +if $PYTHON -c "$prog" 1>&AC_FD_CC 2>&AC_FD_CC + then + eval "py_cv_mod_$py_mod_var=yes" + else + eval "py_cv_mod_$py_mod_var=no" + fi +]) +py_val=`eval "echo \`echo '$py_cv_mod_'$py_mod_var\`"` +if test "x$py_val" != xno; then + AC_MSG_RESULT(yes) + ifelse([$3], [],, [$3 +])dnl +else + AC_MSG_RESULT(no) + ifelse([$4], [],, [$4 +])dnl +fi +]) + +dnl a macro to check for ability to create python extensions +dnl AM_CHECK_PYTHON_HEADERS([ACTION-IF-POSSIBLE], [ACTION-IF-NOT-POSSIBLE]) +dnl function also defines PYTHON_INCLUDES +AC_DEFUN([AM_CHECK_PYTHON_HEADERS], +[AC_REQUIRE([AM_PATH_PYTHON]) +AC_MSG_CHECKING(for headers required to compile python extensions) +dnl deduce PYTHON_INCLUDES +AC_ARG_WITH(python-includes, + [ --with-python-includes=DIR path to Python includes], py_exec_prefix=$withval) +if test x$py_exec_prefix != x; then +PYTHON_INCLUDES="-I${py_exec_prefix}/include/python${PYTHON_VERSION}" +else +py_prefix=`$PYTHON -c "import sys; print sys.prefix"` +py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"` +PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}" +if test "$py_prefix" != "$py_exec_prefix"; then + PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include/python${PYTHON_VERSION}" +fi +fi +AC_SUBST(PYTHON_INCLUDES) +dnl check if the headers exist: +save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES" +AC_TRY_CPP([#include <Python.h>],dnl +[AC_MSG_RESULT(found) +$1],dnl +[AC_MSG_RESULT(not found) +$2]) +CPPFLAGS="$save_CPPFLAGS" +]) + +dnl +dnl JH_ADD_CFLAG(FLAG) +dnl checks whether the C compiler supports the given flag, and if so, adds +dnl it to $CFLAGS. If the flag is already present in the list, then the +dnl check is not performed. +AC_DEFUN([JH_ADD_CFLAG], +[ +case " $CFLAGS " in +*@<:@\ \ @:>@$1@<:@\ \ @:>@*) + ;; +*) + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS $1" + AC_MSG_CHECKING([whether [$]CC understands $1]) + AC_TRY_COMPILE([], [], [jh_has_option=yes], [jh_has_option=no]) + AC_MSG_RESULT($jh_has_option) + if test $jh_has_option = no; then + CFLAGS="$save_CFLAGS" + fi + ;; +esac]) diff --git a/recipes/gtksourceview/files/gtk-doc.m4 b/recipes/gtksourceview/files/gtk-doc.m4 new file mode 100644 index 0000000000..3ec41666b2 --- /dev/null +++ b/recipes/gtksourceview/files/gtk-doc.m4 @@ -0,0 +1,53 @@ +dnl -*- mode: autoconf -*- + +# serial 1 + +dnl Usage: +dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +AC_DEFUN([GTK_DOC_CHECK], +[ + AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first + AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + dnl for overriding the documentation installation directory + AC_ARG_WITH(html-dir, + AC_HELP_STRING([--with-html-dir=PATH], [path to installed docs]),, + [with_html_dir='${datadir}/gtk-doc/html']) + HTML_DIR="$with_html_dir" + AC_SUBST(HTML_DIR) + + dnl enable/disable documentation building + AC_ARG_ENABLE(gtk-doc, + AC_HELP_STRING([--enable-gtk-doc], + [use gtk-doc to build documentation [default=no]]),, + enable_gtk_doc=no) + + have_gtk_doc=no + if test -z "$PKG_CONFIG"; then + AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + fi + if test "$PKG_CONFIG" != "no" && $PKG_CONFIG --exists gtk-doc; then + have_gtk_doc=yes + fi + + dnl do we want to do a version check? +ifelse([$1],[],, + [gtk_doc_min_version=$1 + if test "$have_gtk_doc" = yes; then + AC_MSG_CHECKING([gtk-doc version >= $gtk_doc_min_version]) + if $PKG_CONFIG --atleast-version $gtk_doc_min_version gtk-doc; then + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + have_gtk_doc=no + fi + fi +]) + if test x$enable_gtk_doc = xyes; then + if test "$have_gtk_doc" != yes; then + enable_gtk_doc=no + fi + fi + + AM_CONDITIONAL(ENABLE_GTK_DOC, test x$enable_gtk_doc = xyes) + AM_CONDITIONAL(GTK_DOC_USE_LIBTOOL, test -n "$LIBTOOL") +]) diff --git a/recipes/gtksourceview/files/gtk-doc.make b/recipes/gtksourceview/files/gtk-doc.make new file mode 100644 index 0000000000..354ffb7c66 --- /dev/null +++ b/recipes/gtksourceview/files/gtk-doc.make @@ -0,0 +1,173 @@ +# -*- mode: makefile -*- + +#################################### +# Everything below here is generic # +#################################### + +if GTK_DOC_USE_LIBTOOL +GTKDOC_CC = $(LIBTOOL) --mode=compile $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(LIBTOOL) --mode=link $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +else +GTKDOC_CC = $(CC) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +GTKDOC_LD = $(CC) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) +endif + +# We set GPATH here; this gives us semantics for GNU make +# which are more like other make's VPATH, when it comes to +# whether a source that is a target of one rule is then +# searched for in VPATH/GPATH. +# +GPATH = $(srcdir) + +TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE) + +EXTRA_DIST = \ + $(content_files) \ + $(HTML_IMAGES) \ + $(DOC_MAIN_SGML_FILE) \ + $(DOC_MODULE)-sections.txt \ + $(DOC_MODULE)-overrides.txt + +DOC_STAMPS=scan-build.stamp tmpl-build.stamp sgml-build.stamp html-build.stamp \ + $(srcdir)/tmpl.stamp $(srcdir)/sgml.stamp $(srcdir)/html.stamp + +SCANOBJ_FILES = \ + $(DOC_MODULE).args \ + $(DOC_MODULE).hierarchy \ + $(DOC_MODULE).interfaces \ + $(DOC_MODULE).prerequisites \ + $(DOC_MODULE).signals + +REPORT_FILES = \ + $(DOC_MODULE)-undocumented.txt \ + $(DOC_MODULE)-undeclared.txt \ + $(DOC_MODULE)-unused.txt + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) + +if ENABLE_GTK_DOC +all-local: html-build.stamp +else +all-local: +endif + +docs: html-build.stamp + +#### scan #### + +scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) + @echo 'gtk-doc: Scanning header files' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-scan --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --ignore-headers="$(IGNORE_HFILES)" $(SCAN_OPTIONS) $(EXTRA_HFILES) + if grep -l '^..*$$' $(srcdir)/$(DOC_MODULE).types > /dev/null 2>&1 ; then \ + CC="$(GTKDOC_CC)" LD="$(GTKDOC_LD)" CFLAGS="$(GTKDOC_CFLAGS)" LDFLAGS="$(GTKDOC_LIBS)" gtkdoc-scangobj $(SCANGOBJ_OPTIONS) --module=$(DOC_MODULE) --output-dir=$(srcdir) ; \ + else \ + cd $(srcdir) ; \ + for i in $(SCANOBJ_FILES) ; do \ + test -f $$i || touch $$i ; \ + done \ + fi + touch scan-build.stamp + +$(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp + @true + +#### templates #### + +tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt + @echo 'gtk-doc: Rebuilding template files' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && gtkdoc-mktmpl --module=$(DOC_MODULE) $(MKTMPL_OPTIONS) + touch tmpl-build.stamp + +tmpl.stamp: tmpl-build.stamp + @true + +tmpl/*.sgml: + @true + + +#### xml #### + +sgml-build.stamp: tmpl.stamp $(HFILE_GLOB) $(CFILE_GLOB) $(DOC_MODULE)-sections.txt $(srcdir)/tmpl/*.sgml $(expand_content_files) + @echo 'gtk-doc: Building XML' + @-chmod -R u+w $(srcdir) + cd $(srcdir) && \ + gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $(MKDB_OPTIONS) + touch sgml-build.stamp + +sgml.stamp: sgml-build.stamp + @true + +#### html #### + +html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) + @echo 'gtk-doc: Building HTML' + @-chmod -R u+w $(srcdir) + rm -rf $(srcdir)/html + mkdir $(srcdir)/html + cd $(srcdir)/html && gtkdoc-mkhtml $(DOC_MODULE) ../$(DOC_MAIN_SGML_FILE) + test "x$(HTML_IMAGES)" = "x" || ( cd $(srcdir) && cp $(HTML_IMAGES) html ) + @echo 'gtk-doc: Fixing cross-references' + cd $(srcdir) && gtkdoc-fixxref --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + touch html-build.stamp + +############## + +clean-local: + rm -f *~ *.bak + rm -rf .libs + +distclean-local: + cd $(srcdir) && \ + rm -rf xml $(REPORT_FILES) \ + $(DOC_MODULE)-decl-list.txt $(DOC_MODULE)-decl.txt + +maintainer-clean-local: clean + cd $(srcdir) && rm -rf xml html + +install-data-local: + -installfiles=`echo $(srcdir)/html/*`; \ + if test "$$installfiles" = '$(srcdir)/html/*'; \ + then echo '-- Nothing to install' ; \ + else \ + $(mkinstalldirs) $(DESTDIR)$(TARGET_DIR); \ + for i in $$installfiles; do \ + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ + done; \ + echo '-- Installing $(srcdir)/html/index.sgml' ; \ + $(INSTALL_DATA) $(srcdir)/html/index.sgml $(DESTDIR)$(TARGET_DIR) || :; \ + which gtkdoc-rebase >/dev/null && \ + gtkdoc-rebase --relative --dest-dir=$(DESTDIR) --html-dir=$(DESTDIR)$(TARGET_DIR) ; \ + fi + + +uninstall-local: + rm -f $(DESTDIR)$(TARGET_DIR)/* + +# +# Require gtk-doc when making dist +# +if ENABLE_GTK_DOC +dist-check-gtkdoc: +else +dist-check-gtkdoc: + @echo "*** gtk-doc must be installed and enabled in order to make dist" + @false +endif + +dist-hook: dist-check-gtkdoc dist-hook-local + mkdir $(distdir)/tmpl + mkdir $(distdir)/xml + mkdir $(distdir)/html + -cp $(srcdir)/tmpl/*.sgml $(distdir)/tmpl + -cp $(srcdir)/xml/*.xml $(distdir)/xml + cp $(srcdir)/html/* $(distdir)/html + -cp $(srcdir)/$(DOC_MODULE).types $(distdir)/ + -cp $(srcdir)/$(DOC_MODULE)-sections.txt $(distdir)/ + cd $(distdir) && rm -f $(DISTCLEANFILES) + -gtkdoc-rebase --online --relative --html-dir=$(distdir)/html + +.PHONY : dist-hook-local docs diff --git a/recipes/gtksourceview/gtksourceview2_2.7.3.bb b/recipes/gtksourceview/gtksourceview2_2.7.3.bb index 474b317678..20a2a5b440 100644 --- a/recipes/gtksourceview/gtksourceview2_2.7.3.bb +++ b/recipes/gtksourceview/gtksourceview2_2.7.3.bb @@ -2,12 +2,14 @@ DESCRIPTION = "Portable C library for multiline text editing" HOMEPAGE = "http://projects.gnome.org/gtksourceview/" LICENSE = "LGPL" DEPENDS = "gtk+ libgnomeprint" -PR = "r0" + +PR = "r1" + PNAME = "gtksourceview" S = "${WORKDIR}/${PNAME}-${PV}" -inherit gnome pkgconfig +inherit gnome pkgconfig lib_package # overrule SRC_URI from gnome.conf SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2" diff --git a/recipes/gtksourceview/gtksourceview2_2.9.1.bb b/recipes/gtksourceview/gtksourceview2_2.9.1.bb new file mode 100644 index 0000000000..f6695ecacd --- /dev/null +++ b/recipes/gtksourceview/gtksourceview2_2.9.1.bb @@ -0,0 +1,30 @@ +DESCRIPTION = "Portable C library for multiline text editing" +HOMEPAGE = "http://projects.gnome.org/gtksourceview/" +LICENSE = "LGPL" +DEPENDS = "gtk+ libgnomeprint" + +PNAME = "gtksourceview" + +S = "${WORKDIR}/${PNAME}-${PV}" + +inherit gnome pkgconfig lib_package + +# overrule SRC_URI from gnome.conf +SRC_URI = "${GNOME_MIRROR}/${PNAME}/${@gnome_verdir("${PV}")}/${PNAME}-${PV}.tar.bz2" + +SRC_URI += " \ + file://gtk-doc.make \ +" + +do_configure_prepend() { + cp ${WORKDIR}/gtk-doc.make ${S}/ + sed -i -e s:docs::g ${S}/Makefile.am + echo "EXTRA_DIST = version.xml" > gnome-doc-utils.make +} + +do_stage() { + autotools_stage_all +} + +FILES_${PN} += " ${datadir}/gtksourceview-2.0" + |