Gentoo Archives: gentoo-commits

From: "Michael Weber (xmw)" <xmw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-office/teapot/files: teapot-2.3.0-doc-dir.patch teapot-2.3.0-helpfile.patch
Date: Fri, 31 May 2013 13:49:51
Message-Id: 20130531134947.77F8A2171E@flycatcher.gentoo.org
xmw         13/05/31 13:49:47

  Added:                teapot-2.3.0-doc-dir.patch
                        teapot-2.3.0-helpfile.patch
  Log:
  Version bump (bug 451738)
  
  (Portage version: 2.2.0_alpha177/cvs/Linux x86_64, signed Manifest commit with key 62EEF090)

Revision  Changes    Path
1.1                  app-office/teapot/files/teapot-2.3.0-doc-dir.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/teapot/files/teapot-2.3.0-doc-dir.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/teapot/files/teapot-2.3.0-doc-dir.patch?rev=1.1&content-type=text/plain

Index: teapot-2.3.0-doc-dir.patch
===================================================================
Fix to put docs in correct location based on ${PF}
This requires -DPF=${PF} passed to cmake

Also prevent the installation of COPYING

Patch by Kevin McCarthy <signals42@×××××.com>

--- teapot-2.3.0/CMakeLists.txt
+++ teapot-2.3.0/CMakeLists.txt
@@ -99,12 +99,12 @@
 	add_custom_target(pdf DEPENDS teapot.pdf)
 	add_custom_target(html DEPENDS html/index.html)
 	add_custom_target(doc ALL DEPENDS teapot.pdf html/index.html)
-	install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/teapot FILES_MATCHING PATTERN *.html PATTERN *.png)
-	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/teapot.pdf DESTINATION share/doc/teapot)
-	set(HELPFILE "${CMAKE_INSTALL_PREFIX}/share/doc/teapot/index.html")
+	install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/${PF} FILES_MATCHING PATTERN *.html PATTERN *.png)
+	install(FILES ${CMAKE_CURRENT_BINARY_DIR}/teapot.pdf DESTINATION share/doc/${PF})
+	set(HELPFILE "${CMAKE_INSTALL_PREFIX}/share/doc/${PF}/html/index.html")
 endif ()
 
-install(FILES COPYING README DESTINATION share/doc/teapot)
+install(FILES README DESTINATION share/doc/teapot)
 install(FILES teapot.1 DESTINATION share/man/man1)
 
 add_custom_target(dist



1.1                  app-office/teapot/files/teapot-2.3.0-helpfile.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/teapot/files/teapot-2.3.0-helpfile.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/teapot/files/teapot-2.3.0-helpfile.patch?rev=1.1&content-type=text/plain

Index: teapot-2.3.0-helpfile.patch
===================================================================
This fixes a bug where HELPFILE was being overridden by a hard coded path

This also fixes an issue with fl_filename_absolute returning a relative path
preventing fteapot from finding its helpfile when started from any directory
except /

Patch by Kevin McCarthy <signals42@×××××.com>

--- teapot-2.3.0/fteapot.fl
+++ teapot-2.3.0/fteapot.fl
@@ -5,6 +5,10 @@
 decl {\#include <stdint.h>} {private global
 }
 
+decl {\#include "config.h"} {private global
+}
+
+
 decl {\#include <limits.h>} {private global
 }
 
@@ -824,9 +828,9 @@
 
 Function {find_helpfile(char *buf, int size, const char *argv0)} {open C return_type void
 } {
-  code {fl_filename_absolute(buf, size, argv0);
+  code {strncpy(buf, size, argv0);
 char *p = (char *)fl_filename_name(buf);
-strncpy(p, "../share/doc/teapot/html/index.html", buf+size-p);
+strncpy(p, HELPFILE, buf+size-p);
 buf[size-1] = 0;
 
 // Check if help exists in default installed location, fallback value is valid for build directory