diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-gnome/gtk-doc')
5 files changed, 296 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch new file mode 100644 index 000000000..4a9028742 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch @@ -0,0 +1,40 @@ +From e733241fb580f032efbbe684ec35d4c9d27f1595 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Thu, 8 Sep 2016 13:38:39 +0300 +Subject: [PATCH] Do not error out if perl is not found or its version is too + old. + +This allows use to avoid depending on perl-native if we're not going +to use it (when api-docs are disabled). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 2a61d6e..29415bd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -36,7 +36,7 @@ dnl Check for Perl. + dnl + AC_PATH_PROG([PERL], [perl]) + if test -z "$PERL"; then +- AC_MSG_ERROR([perl not found]) ++ AC_MSG_WARN([perl not found]) + fi + + AC_MSG_CHECKING([if Perl version >= 5.18.0]) +@@ -44,7 +44,7 @@ if "$PERL" -e "require v5.18.0"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +- AC_MSG_ERROR([perl >= 5.18.0 is required for gtk-doc]) ++ AC_MSG_WARN([perl >= 5.18.0 is required for gtk-doc]) + fi + + dnl +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch new file mode 100644 index 000000000..99ae4d441 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-error-out-if-xsltproc-is-not-found.patch @@ -0,0 +1,31 @@ +From 8b7fbbb405959f2868ad6eadd7dd00018758a8a5 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 7 Sep 2016 14:52:04 +0300 +Subject: [PATCH] Do not error out if xsltproc is not found. + +This allows us to drop the hard xsltproc dependency, if we're not +going to actually run the gtkdoc scripts (when api documentation is +disabled). + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index b0c88d7..2a61d6e 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -58,7 +58,7 @@ dnl Check for xsltproc + dnl + AC_PATH_PROG([XSLTPROC], [xsltproc]) + if test -z "$XSLTPROC"; then +- AC_MSG_ERROR([xsltproc not found]) ++ AC_MSG_WARN([xsltproc not found]) + fi + + dnl +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch new file mode 100644 index 000000000..477fc9ae8 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch @@ -0,0 +1,139 @@ +From 6fab82b93c7bd301eb42448515b02f7cb3306897 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <alex.kanavin@gmail.com> +Date: Wed, 31 Aug 2016 16:44:46 +0300 +Subject: [PATCH] Do not hardocode paths to perl/python in scripts. + +Doing so when the interpreters are somewhere deep in a sysroot directory +can reach the shebang line limit, and resulting scripts wouldn't work +on targets either. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> +--- + gtkdoc-check.in | 2 +- + gtkdoc-common.pl.in | 2 +- + gtkdoc-depscan.in | 2 +- + gtkdoc-fixxref.in | 2 +- + gtkdoc-mkdb.in | 2 +- + gtkdoc-mktmpl.in | 2 +- + gtkdoc-rebase.in | 2 +- + gtkdoc-scan.in | 2 +- + gtkdoc-scangobj.in | 2 +- + tests/tools.sh.in | 4 ++-- + 10 files changed, 11 insertions(+), 11 deletions(-) + +diff --git a/gtkdoc-check.in b/gtkdoc-check.in +index 560d69b..b60857f 100755 +--- a/gtkdoc-check.in ++++ b/gtkdoc-check.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-common.pl.in b/gtkdoc-common.pl.in +index 4747396..cfadb78 100644 +--- a/gtkdoc-common.pl.in ++++ b/gtkdoc-common.pl.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-depscan.in b/gtkdoc-depscan.in +index 83af01b..917e247 100644 +--- a/gtkdoc-depscan.in ++++ b/gtkdoc-depscan.in +@@ -1,4 +1,4 @@ +-#!@PYTHON@ ++#!/usr/bin/env python + + import gzip, os.path, re + +diff --git a/gtkdoc-fixxref.in b/gtkdoc-fixxref.in +index 3d9e8d0..d55190b 100755 +--- a/gtkdoc-fixxref.in ++++ b/gtkdoc-fixxref.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-mkdb.in b/gtkdoc-mkdb.in +index 8dd6d5e..d808750 100755 +--- a/gtkdoc-mkdb.in ++++ b/gtkdoc-mkdb.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-mktmpl.in b/gtkdoc-mktmpl.in +index c64dfd3..2f46c18 100755 +--- a/gtkdoc-mktmpl.in ++++ b/gtkdoc-mktmpl.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-rebase.in b/gtkdoc-rebase.in +index 375482d..cf05b45 100644 +--- a/gtkdoc-rebase.in ++++ b/gtkdoc-rebase.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-scan.in b/gtkdoc-scan.in +index 048e5c9..78c6136 100755 +--- a/gtkdoc-scan.in ++++ b/gtkdoc-scan.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/gtkdoc-scangobj.in b/gtkdoc-scangobj.in +index fb66b76..67ee8f7 100644 +--- a/gtkdoc-scangobj.in ++++ b/gtkdoc-scangobj.in +@@ -1,4 +1,4 @@ +-#!@PERL@ -w ++#!/usr/bin/env perl + # -*- cperl -*- + # + # gtk-doc - GTK DocBook documentation generator. +diff --git a/tests/tools.sh.in b/tests/tools.sh.in +index a114a42..7073883 100644 +--- a/tests/tools.sh.in ++++ b/tests/tools.sh.in +@@ -11,7 +11,7 @@ echo "Running suite(s): gtk-doc-$suite"; + + # test perl scripts + for file in gtkdoc-check gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mktmpl gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj ; do +- @PERL@ -cwT `which $file` ++ perl -cwT `which $file` + if test $? = 1 ; then failed=`expr $failed + 1`; fi + tested=`expr $tested + 1` + done +@@ -34,7 +34,7 @@ done + + + # test python scripts +-@PYTHON@ -m py_compile `which gtkdoc-depscan` ++python -m py_compile `which gtkdoc-depscan` + if test $? != 0 ; then failed=`expr $failed + 1`; fi + tested=`expr $tested + 1` + +-- +2.9.3 + diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch new file mode 100644 index 000000000..c7688704e --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/files/pkg-config-native.patch @@ -0,0 +1,34 @@ +Use native pkg-config when looking for gtk-doc. + +Upstream-Status: Inappropriate +Signed-off-by: Ross Burton <ross.burton@intel.com> + +diff --git a/gtk-doc.m4 b/gtk-doc.m4 +index 3675543..94881ae 100644 +--- a/gtk-doc.m4 ++++ b/gtk-doc.m4 +@@ -1,6 +1,6 @@ + dnl -*- mode: autoconf -*- + +-# serial 2 ++# serial 2.1 + + dnl Usage: + dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) +@@ -10,11 +10,16 @@ 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 + ++ gtkdoc_pkgconfig_save=$PKG_CONFIG ++ PKG_CONFIG=pkg-config-native ++ + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + ++ PKG_CONFIG=$gtkdoc_pkgconfig_save ++ + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' diff --git a/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb new file mode 100644 index 000000000..6af996e35 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-gnome/gtk-doc/gtk-doc_1.25.bb @@ -0,0 +1,52 @@ +SUMMARY = "Documentation generator for glib-based software" +DESCRIPTION = "Gtk-doc is a set of scripts that extract specially formatted comments \ + from glib-based software and produce a set of html documentation files from them" +HOMEPAGE = "http://www.gtk.org/gtk-doc/" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" + +inherit gnomebase + +# Configure the scripts correctly (and build their dependencies) only if they are actually +# going to be used; otheriwse we need only the m4/makefile includes from the gtk-doc tarball. +PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "api-documentation", "working-scripts", "", d)}" + +# This will cause target gtk-doc to hardcode paths of native dependencies +# into its scripts. This means that target gtk-doc package is broken; +# hopefully no one minds because its scripts are not used for anything during build +# and shouldn't be used on targets. +PACKAGECONFIG[working-scripts] = "--with-highlight=source-highlight,--with-highlight=no,libxslt-native xmlto-native source-highlight-native perl-native" + +# We cannot use host perl, because it may be too old for gtk-doc +EXTRANATIVEPATH += "perl-native" + +SRC_URI += "file://0001-Do-not-hardocode-paths-to-perl-python-in-scripts.patch \ + file://0001-Do-not-error-out-if-xsltproc-is-not-found.patch \ + file://0001-Do-not-error-out-if-perl-is-not-found-or-its-version.patch \ + " +SRC_URI_append_class-native = " file://pkg-config-native.patch" + +SRC_URI[archive.md5sum] = "0dc6570953112a464a409fb99258ccbc" +SRC_URI[archive.sha256sum] = "1ea46ed400e6501f975acaafea31479cea8f32f911dca4dff036f59e6464fd42" + +BBCLASSEXTEND = "native" + +# Do not check for XML catalogs when building because that +# information is not used for anything during build. Recipe +# dependencies make sure we have all the right bits. +do_configure_prepend() { + sed -i -e 's,^JH_CHECK_XML_CATALOG.*,,' ${S}/configure.ac +} + +FILES_${PN} += "${datadir}/sgml" +FILES_${PN}-dev += "${libdir}/cmake" +FILES_${PN}-doc = "" + +SYSROOT_PREPROCESS_FUNCS_append_class-native = " gtkdoc_makefiles_sysroot_preprocess" +gtkdoc_makefiles_sysroot_preprocess() { + # Patch the gtk-doc makefiles so that the qemu wrapper is used to run transient binaries + # instead of libtool wrapper or running them directly + sed -i \ + -e "s|GTKDOC_RUN =.*|GTKDOC_RUN = \$(top_builddir)/gtkdoc-qemuwrapper|" \ + ${SYSROOT_DESTDIR}${datadir}/gtk-doc/data/gtk-doc*make +} |