# HG changeset patch # User Julien Cristau # Date 1358354536 -3600 # Node ID 67a5fccb802ab937cd9ebd28439a2ef55d5b4797 # Parent 2294fad830ca0133b72350bd28e2daf3b8111cdd [packaging] Fix search in squeeze cubicweb-documentation package (closes #2558496) Work around broken combination of jquery 1.4 and sphinx 0.6 in squeeze by patching up doctools.js. diff -r 2294fad830ca -r 67a5fccb802a debian/changelog --- a/debian/changelog Wed Jan 16 17:41:45 2013 +0100 +++ b/debian/changelog Wed Jan 16 17:42:16 2013 +0100 @@ -2,6 +2,8 @@ * Don't compress txt files. They're used by the doc's search functionality, and the javascript gets confused if it receives gzip instead of text. + * Work around broken combination of jquery 1.4 and sphinx 0.6 in squeeze by + patching up doctools.js. -- Julien Cristau Wed, 09 Jan 2013 19:09:16 +0100 diff -r 2294fad830ca -r 67a5fccb802a debian/rules --- a/debian/rules Wed Jan 16 17:41:45 2013 +0100 +++ b/debian/rules Wed Jan 16 17:42:16 2013 +0100 @@ -18,6 +18,11 @@ # distributions and we don't want to block a new release of Cubicweb # because of documentation issues. -PYTHONPATH=$${PYTHONPATH:+$${PYTHONPATH}:}$(CURDIR)/debian/pythonpath $(MAKE) -C doc/book/en all + # squeeze has a broken combination of jquery and sphinx, fix it up so search works(ish) + if grep -q jQuery\\.className doc/html/_static/doctools.js && grep -q "jQuery JavaScript Library v1\.4\." doc/html/_static/jquery.js; then \ + echo 'Patching doctools.js for jQuery 1.4 compat'; \ + sed -i 's/jQuery\.className.has(node\.parentNode, className)/jQuery(node.parentNode).hasClass(className)/' doc/html/_static/doctools.js; \ + fi rm -rf debian/pythonpath touch build-stamp