From 9589022b1e4ff7a4f0667e0325e7cd9343c77562 Mon Sep 17 00:00:00 2001 From: Jakub Bogusz Date: Tue, 9 Mar 2021 06:32:40 +0100 Subject: [PATCH] - updated URLs and dependencies - added make patch (fix build with make 4.2) - added gstreamer-common-gtkdoc patch for files from gstreamer-common repository (adjusted for included version) - added gtk-doc patch (other gtk-doc fixes) --- farsight2-gtk-doc.patch | 324 ++++++++++++++++++++++++++++++++++ farsight2-make.patch | 11 ++ farsight2.spec | 47 ++++- gstreamer-common-gtkdoc.patch | 290 ++++++++++++++++++++++++++++++ 4 files changed, 663 insertions(+), 9 deletions(-) create mode 100644 farsight2-gtk-doc.patch create mode 100644 farsight2-make.patch create mode 100644 gstreamer-common-gtkdoc.patch diff --git a/farsight2-gtk-doc.patch b/farsight2-gtk-doc.patch new file mode 100644 index 0000000..0488880 --- /dev/null +++ b/farsight2-gtk-doc.patch @@ -0,0 +1,324 @@ +--- farsight2-0.0.31/gst-libs/gst/farsight/fs-conference-iface.c.orig 2011-10-09 23:06:33.000000000 +0200 ++++ farsight2-0.0.31/gst-libs/gst/farsight/fs-conference-iface.c 2021-03-08 18:39:40.693431414 +0100 +@@ -43,7 +43,7 @@ + * + * This will communicate asynchronous events to the user through #GstMessage + * of type #GST_MESSAGE_ELEMENT sent over the #GstBus. +- * ++ * + * The "<literal>farsight-error</literal>" message + * |[ + * "src-object" #GObject The object (#FsConference, #FsSession or #FsStream) that emitted the error +@@ -55,7 +55,7 @@ + * The message is sent on asynchronous errors. + * + * +- * ++ * + */ + + static void fs_conference_iface_init (FsConferenceClass *iface); +--- farsight2-0.0.31/gst-libs/gst/farsight/fs-session.c.orig 2011-10-09 23:06:33.000000000 +0200 ++++ farsight2-0.0.31/gst-libs/gst/farsight/fs-session.c 2021-03-08 18:40:29.326501279 +0100 +@@ -39,7 +39,7 @@ + * + * This will communicate asynchronous events to the user through #GstMessage + * of type #GST_MESSAGE_ELEMENT sent over the #GstBus. +- * ++ * + * The "<literal>farsight-send-codec-changed</literal>" + * message + * |[ +@@ -68,7 +68,7 @@ + * next "farsight-codecs-changed" message until reading the codecs. + * + * +- * ++ * + */ + + #ifdef HAVE_CONFIG_H +--- farsight2-0.0.31/gst-libs/gst/farsight/fs-stream.c.orig 2011-10-09 23:06:33.000000000 +0200 ++++ farsight2-0.0.31/gst-libs/gst/farsight/fs-stream.c 2021-03-08 18:41:26.726190318 +0100 +@@ -36,7 +36,7 @@ + * + * This will communicate asynchronous events to the user through #GstMessage + * of type #GST_MESSAGE_ELEMENT sent over the #GstBus. +- * ++ * + * The "<literal>farsight-new-local-candidate</literal>" message + * |[ + * "stream" #FsStream The stream that emits the message +@@ -93,7 +93,7 @@ + * This message is emitted the state of a component of a stream changes. + * + * +- * ++ * + */ + + #ifdef HAVE_CONFIG_H +--- farsight2-0.0.31/gst/fsrtpconference/fs-rtp-session.c.orig 2021-03-08 22:31:45.561327262 +0100 ++++ farsight2-0.0.31/gst/fsrtpconference/fs-rtp-session.c 2021-03-08 22:31:55.317941073 +0100 +@@ -30,7 +30,7 @@ + * fs_conference_new_session() on a #FsRtpConference. It can be either + * Audio or Video. It also represents data send with one and only one + * SSRC (although if there is a SSRC collision, that SSRC may change). +- * ++ * + * Codec profiles + * + * It is possible to define "codec profiles", that is non-autodetected +@@ -50,7 +50,7 @@ + * Also, it is possible to declare profiles with only a decoding pipeline, + * you will only be able to receive from this codec, the encoding may be a + * secondary pad of some other codec. +- * ++ * + */ + + #ifdef HAVE_CONFIG_H +--- farsight2-0.0.31/common/gstdoc-scangobj.orig 2010-10-08 18:38:56.000000000 +0200 ++++ farsight2-0.0.31/common/gstdoc-scangobj 2021-03-08 21:29:32.704883215 +0100 +@@ -30,9 +30,6 @@ + + use Getopt::Long; + +-unshift @INC, '/usr/share/gtk-doc/data'; +-require "gtkdoc-common.pl"; +- + # Options + + # name of documentation module +@@ -1791,6 +1788,59 @@ + unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan"; + } + ++# Copied from gtk-doc 1db161bd708cdfb88b362ea0b5d047034d9c3272 ++############################################################################# ++# Function : UpdateFileIfChanged ++# Description : Compares the old version of the file with the new version and ++# if the file has changed it moves the new version into the old ++# versions place. This is used so we only change files if ++# needed, so we can do proper dependency tracking and we don't ++# needlessly check files into version control systems that haven't ++# changed. ++# It returns 0 if the file hasn't changed, and 1 if it has. ++# Arguments : $old_file - the pathname of the old file. ++# $new_file - the pathname of the new version of the file. ++# $make_backup - 1 if a backup of the old file should be kept. ++# It will have the .bak suffix added to the file name. ++############################################################################# ++ ++sub UpdateFileIfChanged { ++ my ($old_file, $new_file, $make_backup) = @_; ++ ++ #@TRACE@("Comparing $old_file with $new_file..."); ++ ++ # If the old file doesn't exist we want this to default to 1. ++ my $exit_code = 1; ++ ++ if (-e $old_file) { ++ `cmp -s "$old_file" "$new_file"`; ++ $exit_code = $? >> 8; ++ #@TRACE@(" cmp exit code: $exit_code ($?)"); ++ } ++ ++ if ($exit_code > 1) { ++ die "Error running 'cmp $old_file $new_file'"; ++ } ++ ++ if ($exit_code == 1) { ++ #@TRACE@(" files changed - replacing old version with new version."); ++ if ($make_backup && -e $old_file) { ++ rename ($old_file, "$old_file.bak") ++ || die "Can't move $old_file to $old_file.bak: $!"; ++ } ++ rename ($new_file, $old_file) ++ || die "Can't move $new_file to $old_file: $!"; ++ ++ return 1; ++ } else { ++ #@TRACE@(" files the same - deleting new version."); ++ unlink ("$new_file") ++ || die "Can't delete file: $new_file: $!"; ++ ++ return 0; ++ } ++} ++ + #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0); + &UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0); + &UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0); +--- farsight2-0.0.31/docs/plugins/gtkdoc-scangobj-transmitters.orig 2010-11-01 22:32:09.000000000 +0100 ++++ farsight2-0.0.31/docs/plugins/gtkdoc-scangobj-transmitters 2021-03-08 21:33:25.266956651 +0100 +@@ -30,9 +30,6 @@ + + use Getopt::Long; + +-unshift @INC, '/usr/share/gtk-doc/data'; +-require "gtkdoc-common.pl"; +- + # Options + + # name of documentation module +@@ -842,7 +839,7 @@ + + for (i = 0; i < level; i++) + fprintf (fp, " "); +- fprintf (fp, g_type_name (type)); ++ fprintf (fp, "%s", g_type_name (type)); + fprintf (fp, "\\n"); + + children = g_type_children (type, &n_children); +@@ -893,7 +890,7 @@ + + if (n_interfaces > 0) + { +- fprintf (fp, g_type_name (type)); ++ fprintf (fp, "%s", g_type_name (type)); + for (i=0; i < n_interfaces; i++) + fprintf (fp, " %s", g_type_name (interfaces[i])); + fprintf (fp, "\\n"); +@@ -938,7 +935,7 @@ + + if (n_prerequisites > 0) + { +- fprintf (fp, g_type_name (type)); ++ fprintf (fp, "%s", g_type_name (type)); + for (i=0; i < n_prerequisites; i++) + fprintf (fp, " %s", g_type_name (prerequisites[i])); + fprintf (fp, "\\n"); +@@ -1558,6 +1555,59 @@ + + unlink "./$MODULE-scan.c", "./$MODULE-scan.o", "./$MODULE-scan.lo", "./$MODULE-scan"; + ++# Copied from gtk-doc 1db161bd708cdfb88b362ea0b5d047034d9c3272 ++############################################################################# ++# Function : UpdateFileIfChanged ++# Description : Compares the old version of the file with the new version and ++# if the file has changed it moves the new version into the old ++# versions place. This is used so we only change files if ++# needed, so we can do proper dependency tracking and we don't ++# needlessly check files into version control systems that haven't ++# changed. ++# It returns 0 if the file hasn't changed, and 1 if it has. ++# Arguments : $old_file - the pathname of the old file. ++# $new_file - the pathname of the new version of the file. ++# $make_backup - 1 if a backup of the old file should be kept. ++# It will have the .bak suffix added to the file name. ++############################################################################# ++ ++sub UpdateFileIfChanged { ++ my ($old_file, $new_file, $make_backup) = @_; ++ ++ #@TRACE@("Comparing $old_file with $new_file..."); ++ ++ # If the old file doesn't exist we want this to default to 1. ++ my $exit_code = 1; ++ ++ if (-e $old_file) { ++ `cmp -s "$old_file" "$new_file"`; ++ $exit_code = $? >> 8; ++ #@TRACE@(" cmp exit code: $exit_code ($?)"); ++ } ++ ++ if ($exit_code > 1) { ++ die "Error running 'cmp $old_file $new_file'"; ++ } ++ ++ if ($exit_code == 1) { ++ #@TRACE@(" files changed - replacing old version with new version."); ++ if ($make_backup && -e $old_file) { ++ rename ($old_file, "$old_file.bak") ++ || die "Can't move $old_file to $old_file.bak: $!"; ++ } ++ rename ($new_file, $old_file) ++ || die "Can't move $new_file to $old_file: $!"; ++ ++ return 1; ++ } else { ++ #@TRACE@(" files the same - deleting new version."); ++ unlink ("$new_file") ++ || die "Can't delete file: $new_file: $!"; ++ ++ return 0; ++ } ++} ++ + #&UpdateFileIfChanged ($old_signals_filename, $new_signals_filename, 0); + &UpdateFileIfChanged ($old_hierarchy_filename, $new_hierarchy_filename, 0); + &UpdateFileIfChanged ($old_interfaces_filename, $new_interfaces_filename, 0); +--- farsight2-0.0.31/common-modified/gtk-doc-plugins.mak.orig 2011-09-07 22:20:18.000000000 +0200 ++++ farsight2-0.0.31/common-modified/gtk-doc-plugins.mak 2021-03-08 22:25:41.416633337 +0100 +@@ -156,23 +156,13 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_ + --ignore-headers="$(IGNORE_HFILES)"; \ + touch scan-build.stamp + +-#### update templates; done on every build #### ++#### generate templates; done on every build #### + +-### FIXME: make this error out again when docs are fixed for 0.9 +-# in a non-srcdir build, we need to copy files from the previous step +-# and the files from previous runs of this step +-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) +- @echo '*** Rebuilding template files ***' +- if test x"$(srcdir)" != x. ; then \ +- for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ +- do \ +- if test -e $(srcdir)/$$f; then cp $(srcdir)/$$f . ; fi; \ +- done; \ +- fi +- gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log ++tmpl-build.stamp: ++ @echo ' DOC Building template files' + $(PYTHON) \ + $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/inspect tmpl +- @cat $(DOC_MODULE)-unused.txt ++ @-cat $(DOC_MODULE)-unused.txt + rm -f tmpl-build.log + touch tmpl-build.stamp + +@@ -190,9 +180,13 @@ sgml-build.stamp: tmpl.stamp scan-build. + $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done + @for f in $(EXAMPLE_CFILES); do \ + $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done ++ @_source_dir='' ; \ ++ for i in $(DOC_SOURCE_DIR) ; do \ ++ _source_dir="$${_source_dir} --source-dir=$$i" ; \ ++ done ; \ + gtkdoc-mkdb \ + --module=$(DOC_MODULE) \ +- --source-dir=$(DOC_SOURCE_DIR) \ ++ $${_source_dir} \ + --expand-content-files="$(expand_content_files)" \ + --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \ + --output-format=xml \ +@@ -217,10 +211,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_ + @for f in $(content_files); do cp $(srcdir)/$$f html; done + cp -pr xml html + cp ../version.entities html +- cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) +- mv html/index.sgml html/index.sgml.bak +- $(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml +- rm -f html/index.sgml.bak ++ cd html && gtkdoc-mkhtml $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE) + rm -f html/$(DOC_MAIN_SGML_FILE) + rm -rf html/xml + rm -f html/version.entities +@@ -269,11 +260,11 @@ install-data-local: + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ + done; \ + fi; \ +- echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \ +- $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \ ++ echo '-- Installing $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp' ; \ ++ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp \ + $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \ +- if test -e $(srcdir)/html/$(DOC_MODULE).devhelp2; then \ +- $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 \ ++ if test -e $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \ ++ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \ + $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \ + fi; \ + (which gtkdoc-rebase >/dev/null && \ diff --git a/farsight2-make.patch b/farsight2-make.patch new file mode 100644 index 0000000..e6eb55c --- /dev/null +++ b/farsight2-make.patch @@ -0,0 +1,11 @@ +--- farsight2-0.0.31/common-modified/gst-glib-gen.mak.orig 2011-09-07 22:20:18.000000000 +0200 ++++ farsight2-0.0.31/common-modified/gst-glib-gen.mak 2021-03-08 17:19:02.789640588 +0100 +@@ -6,6 +6,7 @@ + #glib_gen_prefix=gst_color_balance + #glib_gen_basename=colorbalance + +-enum_headers=$(foreach h,$(glib_enum_headers),\n\#include \"$(h)\") ++gst_hash=\# ++enum_headers=$(foreach h,$(glib_enum_headers),\n$(gst_hash)include \"$(h)\") + + # these are all the rules generating the relevant files diff --git a/farsight2.spec b/farsight2.spec index f94e38a..6d9120f 100644 --- a/farsight2.spec +++ b/farsight2.spec @@ -1,18 +1,22 @@ Summary: Audio/Video Communications Framework +Summary(pl.UTF-8): Szkielet do komunikacji audio/video Name: farsight2 Version: 0.0.31 Release: 1 License: LGPL v2+ Group: Libraries -Source0: http://farsight.freedesktop.org/releases/farsight2/%{name}-%{version}.tar.gz +Source0: https://www.freedesktop.org/software/farstream/releases/farsight2/%{name}-%{version}.tar.gz # Source0-md5: 3771d8268f025b28261cc1e977fab27f -URL: http://farsight.freedesktop.org/ +Patch0: %{name}-make.patch +Patch1: gstreamer-common-gtkdoc.patch +Patch2: %{name}-gtk-doc.patch +URL: https://www.freedesktop.org/wiki/Software/Farstream/ BuildRequires: autoconf >= 2.60 BuildRequires: automake BuildRequires: docbook-dtd412-xml -BuildRequires: glib2-devel >= 1:2.16.0 -BuildRequires: gstreamer-devel >= 0.10.33 -BuildRequires: gstreamer-plugins-base-devel >= 0.10.23 +BuildRequires: glib2-devel >= 1:2.26 +BuildRequires: gstreamer0.10-devel >= 0.10.33 +BuildRequires: gstreamer0.10-plugins-base-devel >= 0.10.33 BuildRequires: gtk-doc >= 1.8 BuildRequires: gupnp-devel >= 0.14 BuildRequires: gupnp-igd-devel @@ -20,9 +24,13 @@ BuildRequires: libnice-devel >= 0.1.0 BuildRequires: libtool BuildRequires: pkgconfig BuildRequires: python-devel >= 1:2.4 -BuildRequires: python-gstreamer-devel >= 0.10.10 -BuildRequires: python-pygtk-devel >= 2:2.12.0 +BuildRequires: python-gstreamer0.10-devel >= 0.10.10 +BuildRequires: python-pyobject-devel >= 2.16.0 +BuildRequires: rpm-build >= 4.6 BuildRequires: rpm-pythonprov +Requires: glib2 >= 1:2.26 +Requires: gstreamer0.10 >= 0.10.33 +Requires: gstreamer0.10-plugins-base >= 0.10.33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description @@ -37,13 +45,26 @@ applications. These applications should be able to use Farsight for all their Audio/Video conferencing needs without having to worry about any of the lower level streaming and NAT traversal issues. +%description -l pl.UTF-8 +Projekt Farsight to próba stworzenia szkieletu do obsługi wszystkich +znanych protokołów konferencji audio/video. Z jednej strony oferuje +generyczne API umożliwiające tworzenie wtyczek do różnych protokołów +strumieniowych, z drugiej strony oferuje API klienckie do używania +tych wtyczek. + +Głównym celem klientów Farsighta są komunikatory (aplikacje IM). +Powinny móc używać Farsighta do wszystkich potrzeb konferencji +audio/video bez zagłębiania się w niskopoziomowe szczegóły przesyłania +strumieni czy przechodzenia NAT. + %package devel Summary: Header files for farsight2 library Summary(pl.UTF-8): Pliki nagłówkowe biblioteki farsight2 Group: Development/Libraries Requires: %{name} = %{version}-%{release} -Requires: gstreamer-devel >= 0.10.33 -Requires: gstreamer-plugins-base-devel >= 0.10.23 +Requires: glib2-devel >= 1:2.26 +Requires: gstreamer0.10-devel >= 0.10.33 +Requires: gstreamer0.10-plugins-base-devel >= 0.10.33 %description devel Header files for farsight2 library. @@ -68,6 +89,7 @@ Summary: farsight2 library API documentation Summary(pl.UTF-8): Dokumentacja API biblioteki farsight2 Group: Documentation Requires: gtk-doc-common +BuildArch: noarch %description apidocs farsight2 library API documentation. @@ -80,6 +102,8 @@ Summary: farsight2 Python bindings Summary(pl.UTF-8): Wiązania Pythona do farsight2 Group: Libraries/Python Requires: %{name} = %{version}-%{release} +Requires: python-gstreamer0.10 >= 0.10.10 +Requires: python-pyobject >= 2.16.0 %description -n python-farsight2 farsight2 Python bindings. @@ -89,6 +113,11 @@ Wiązania Pythona do farsight2. %prep %setup -q +%patch0 -p1 +cd common +%patch1 -p1 +cd .. +%patch2 -p1 %build %{__gtkdocize} diff --git a/gstreamer-common-gtkdoc.patch b/gstreamer-common-gtkdoc.patch new file mode 100644 index 0000000..b23dc62 --- /dev/null +++ b/gstreamer-common-gtkdoc.patch @@ -0,0 +1,290 @@ +From 2de221ce94b657f9c9a75aa3cc0cb84dbb5da78b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Olivier=20Cr=C3=AAte?= +Date: Mon, 28 Jan 2013 20:28:09 +0100 +Subject: [PATCH] gtk-doc*.mak: Put the API version in the html book name + +This causes devhelp2 files to get a version. Due to that devhelp can show it +along with the 0.10 version. +--- + gtk-doc-plugins.mak | 11 ++++------- + gtk-doc.mak | 11 ++++------- + 2 files changed, 8 insertions(+), 14 deletions(-) + +diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak +index f69d9d7..f19e7d7 100644 +--- a/gtk-doc-plugins.mak ++++ b/gtk-doc-plugins.mak +@@ -215,10 +215,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_ + @for f in $(content_files); do cp $(srcdir)/$$f html; done + cp -pr xml html + cp ../version.entities html +- cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) +- mv html/index.sgml html/index.sgml.bak +- $(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml +- rm -f html/index.sgml.bak ++ cd html && gtkdoc-mkhtml $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE) + rm -f html/$(DOC_MAIN_SGML_FILE) + rm -rf html/xml + rm -f html/version.entities +@@ -267,11 +264,11 @@ install-data-local: + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ + done; \ + fi; \ +- echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \ +- $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \ ++ echo '-- Installing $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp' ; \ ++ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp \ + $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \ +- if test -e $(srcdir)/html/$(DOC_MODULE).devhelp2; then \ +- $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 \ ++ if test -e $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \ ++ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \ + $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \ + fi; \ + (which gtkdoc-rebase >/dev/null && \ +diff --git a/gtk-doc.mak b/gtk-doc.mak +index 17cee71..9d76889 100644 +--- a/gtk-doc.mak ++++ b/gtk-doc.mak +@@ -137,10 +137,7 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_ + @for f in $(content_files); do cp $(srcdir)/$$f html; done + cp -pr xml html + cp ../version.entities html +- cd html && gtkdoc-mkhtml $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) +- mv html/index.sgml html/index.sgml.bak +- $(SED) "s/ href=\"$(DOC_MODULE)\// href=\"$(DOC_MODULE)-@GST_MAJORMINOR@\//g" html/index.sgml.bak >html/index.sgml +- rm -f html/index.sgml.bak ++ cd html && gtkdoc-mkhtml $(DOC_MODULE)-@GST_MAJORMINOR@ $(DOC_MAIN_SGML_FILE) + rm -f html/$(DOC_MAIN_SGML_FILE) + rm -rf html/xml + rm -f html/version.entities +@@ -200,11 +197,11 @@ install-data-local: + echo '-- Installing '$$i ; \ + $(INSTALL_DATA) $$i $(DESTDIR)$(TARGET_DIR); \ + done; \ +- echo '-- Installing $(srcdir)/html/$(DOC_MODULE).devhelp' ; \ +- $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp \ ++ echo '-- Installing $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp' ; \ ++ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp \ + $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \ +- if test -e $(srcdir)/html/$(DOC_MODULE).devhelp2; then \ +- $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE).devhelp2 \ ++ if test -e $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \ ++ $(INSTALL_DATA) $(srcdir)/html/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2 \ + $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \ + fi; \ + (which gtkdoc-rebase >/dev/null && \ +From d37af32e2d6d1b546af72978f8441a84996ab3ea Mon Sep 17 00:00:00 2001 +From: Stefan Sauer +Date: Sun, 7 Jun 2015 20:12:05 +0200 +Subject: [PATCH] mangle-tmpl.py: generate tmpl files instead of merging + +We don't have any hand-written docs in tmpl files. Stop generating them with +gtkdoc and just write the minimal files ourself. +--- + gtk-doc-plugins.mak | 15 +++-------- + mangle-tmpl.py | 72 ++++++++++++----------------------------------------- + 2 files changed, 19 insertions(+), 68 deletions(-) + +diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak +index 5d9b2f9..767e55a 100644 +--- a/gtk-doc-plugins.mak ++++ b/gtk-doc-plugins.mak +@@ -154,20 +154,10 @@ scan-build.stamp: $(HFILE_GLOB) $(EXTRA_ + --ignore-headers="$(IGNORE_HFILES)"; \ + touch scan-build.stamp + +-#### update templates; done on every build #### ++#### generate templates; done on every build #### + +-### FIXME: make this error out again when docs are fixed for 0.9 +-# in a non-srcdir build, we need to copy files from the previous step +-# and the files from previous runs of this step +-tmpl-build.stamp: $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_OVERRIDES) +- @echo '*** Rebuilding template files ***' +- if test x"$(srcdir)" != x. ; then \ +- for f in $(SCANOBJ_FILES) $(SCAN_FILES); \ +- do \ +- if test -e $(srcdir)/$$f; then cp $(srcdir)/$$f . ; fi; \ +- done; \ +- fi +- gtkdoc-mktmpl --module=$(DOC_MODULE) | tee tmpl-build.log ++tmpl-build.stamp: ++ @echo ' DOC Building template files' + $(PYTHON) \ + $(top_srcdir)/common/mangle-tmpl.py $(srcdir)/inspect tmpl + @cat $(DOC_MODULE)-unused.txt +diff --git a/mangle-tmpl.py b/mangle-tmpl.py +index 51ea8c2..7a92d04 100644 +--- a/mangle-tmpl.py ++++ b/mangle-tmpl.py +@@ -2,21 +2,12 @@ + # vi:si:et:sw=4:sts=4:ts=4 + + """ +-use the output from gst-xmlinspect.py to mangle tmpl/*.sgml and +-insert/overwrite Short Description and Long Description ++use the files from inspect/*.xml to create mininal tmpl/*.sgml files containing ++'Short Description' and 'Long Description' to inject element details into the ++docbook files produced by gtkdoc-mkdb + """ + +-# FIXME: right now it uses pygst and scans on its own; +-# we really should use inspect/*.xml instead since the result of +-# gst-xmlinspect.py is commited by the docs maintainer, who can be +-# expected to have pygst, but this step should be done for every docs build, +-# so no pygst allowed +- +-# read in inspect/*.xml +-# for every tmpl/element-(name).xml: mangle with details from element +- + import glob +-import re + import sys + import os + +@@ -28,37 +19,12 @@ def __init__(self, filename): + self._sectionids = [] + self._sections = {} + +- def read(self): +- """ +- Read and parse the sections from the given file. +- """ +- lines = open(self.filename).readlines() +- matcher = re.compile("\n") +- id = None +- +- for line in lines: +- match = matcher.search(line) +- if match: +- id = match.expand("\\1") +- self._sectionids.append(id) +- self._sections[id] = [] +- else: +- if not id: +- sys.stderr.write( +- "WARNING: line before a SECTION header: %s" % line) +- else: +- self._sections[id].append(line) +- +- def get_section(self, id): +- """ +- Get the content from the given section. +- """ +- return self._sections[id] +- + def set_section(self, id, content): + """ + Replace the given section id with the given content. + """ ++ if not id in self._sectionids: ++ self._sectionids.append(id) + self._sections[id] = content + + def output(self): +@@ -73,14 +39,10 @@ def output(self): + + return "".join(lines) + +- def write(self, backup=False): ++ def write(self): + """ + Write out the template file again, backing up the previous one. + """ +- if backup: +- target = self.filename + ".mangle.bak" +- os.rename(self.filename, target) +- + handle = open(self.filename, "w") + handle.write(self.output()) + handle.close() +@@ -136,30 +98,28 @@ def main(): + inspectdir = sys.argv[1] + tmpldir = sys.argv[2] + ++ if not os.path.exists (tmpldir): ++ os.mkdir(tmpldir) ++ + # parse all .xml files; build map of element name -> short desc + #for file in glob.glob("inspect/plugin-*.xml"): + elements = {} + for file in glob.glob("%s/plugin-*.xml" % inspectdir): + elements.update(get_elements(file)) + +- for file in glob.glob("%s/element-*.sgml" % tmpldir): +- base = os.path.basename(file) +- element = base[len("element-"):-len(".sgml")] ++ for element in elements.keys(): ++ file = "%s/element-%s.sgml" % (tmpldir, element) + tmpl = Tmpl(file) +- tmpl.read() +- if element in elements.keys(): +- description = elements[element]['description'] +- tmpl.set_section("Short_Description", "%s\n\n" % description) + +- # put in an include if not yet there ++ description = elements[element]['description'] ++ tmpl.set_section("Short_Description", "%s\n" % description) ++ ++ # add include for details + line = '' + \ + '' + \ + '\n' +- section = tmpl.get_section("Long_Description") +- if not section[0] == line: +- section.insert(0, line) +- tmpl.set_section("Long_Description", section) ++ tmpl.set_section("Long_Description", line) + tmpl.write() + + main() +From f363b3205658a38e84fa77f19dee218cd4445275 Mon Sep 17 00:00:00 2001 +From: Nicolas Dufresne +Date: Mon, 20 Jun 2016 15:38:01 -0400 +Subject: [PATCH] Fix handling of DOC_SOURCE_DIR list + +As some places we where assuming a single directory. This caused some +plugins documentation to be ignored. +--- + gtk-doc-plugins.mak | 8 ++++++-- + gtk-doc.mak | 6 +++++- + 2 files changed, 11 insertions(+), 3 deletions(-) + +diff --git a/gtk-doc-plugins.mak b/gtk-doc-plugins.mak +index fe0977c..4b5dd1b 100644 +--- a/gtk-doc-plugins.mak ++++ b/gtk-doc-plugins.mak +@@ -178,9 +178,13 @@ sgml-build.stamp: tmpl.stamp scan-build. + $(top_srcdir)/common/plugins.xsl $$a > xml/`basename $$a`; done + @for f in $(EXAMPLE_CFILES); do \ + $(PYTHON) $(top_srcdir)/common/c-to-xml.py $$f > xml/element-`basename $$f .c`.xml; done ++ @_source_dir='' ; \ ++ for i in $(DOC_SOURCE_DIR) ; do \ ++ _source_dir="$${_source_dir} --source-dir=$$i" ; \ ++ done ; \ + gtkdoc-mkdb \ + --module=$(DOC_MODULE) \ +- --source-dir=$(DOC_SOURCE_DIR) \ ++ $${_source_dir} \ + --expand-content-files="$(expand_content_files)" \ + --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) \ + --output-format=xml \ +diff --git a/gtk-doc.mak b/gtk-doc.mak +index 2aab3a9..4beebcf 100644 +--- a/gtk-doc.mak ++++ b/gtk-doc.mak +@@ -118,7 +118,11 @@ tmpl.stamp: tmpl-build.stamp + ### FIXME: make this error out again when docs are complete + sgml-build.stamp: tmpl.stamp $(CFILE_GLOB) $(expand_content_files) + @echo '*** Building XML ***' +- gtkdoc-mkdb --module=$(DOC_MODULE) --source-dir=$(DOC_SOURCE_DIR) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log ++ @_source_dir='' ; \ ++ for i in $(DOC_SOURCE_DIR) ; do \ ++ _source_dir="$${_source_dir} --source-dir=$$i" ; \ ++ done ; \ ++ gtkdoc-mkdb --module=$(DOC_MODULE) $$(_source_dir) --expand-content-files="$(expand_content_files)" --main-sgml-file=$(srcdir)/$(DOC_MAIN_SGML_FILE) --output-format=xml $(MKDB_OPTIONS) | tee sgml-build.log + @if grep "WARNING:" sgml-build.log > /dev/null; then true; fi # exit 1; fi + cp ../version.entities xml + rm sgml-build.log -- 2.44.0