summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2011-02-03 16:26:10 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2011-02-03 16:26:10 +0000
commite20cee515975607673f72022a5f8fe4bed9f28a4 (patch)
tree8f00413223c6d7a4884e1697ec5e09635b99ba42 /app-office/teapot/files
parentStable on amd64, ppc64, x86 (diff)
downloadgentoo-2-e20cee515975607673f72022a5f8fe4bed9f28a4.tar.gz
gentoo-2-e20cee515975607673f72022a5f8fe4bed9f28a4.tar.bz2
gentoo-2-e20cee515975607673f72022a5f8fe4bed9f28a4.zip
Initial commit wrt #353579 by Kevin McCarthy.
(Portage version: 2.2.0_alpha19/cvs/Linux x86_64)
Diffstat (limited to 'app-office/teapot/files')
-rw-r--r--app-office/teapot/files/teapot-2.2.0-doc-dir.patch27
-rw-r--r--app-office/teapot/files/teapot-2.2.0-helpfile.patch31
2 files changed, 58 insertions, 0 deletions
diff --git a/app-office/teapot/files/teapot-2.2.0-doc-dir.patch b/app-office/teapot/files/teapot-2.2.0-doc-dir.patch
new file mode 100644
index 000000000000..12a55ad71251
--- /dev/null
+++ b/app-office/teapot/files/teapot-2.2.0-doc-dir.patch
@@ -0,0 +1,27 @@
+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@gmail.com>
+
+
+--- CMakeLists.txt
++++ CMakeLists.txt
+@@ -83,12 +83,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/html/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 "/usr/share/doc/${PF}/html/index.html")
+ endif ()
+
+-install(FILES COPYING README DESTINATION share/doc/teapot)
++install(FILES README DESTINATION share/doc/${PF})
+
+ add_custom_target(dist
+ COMMAND ${CMAKE_COMMAND} -E remove_directory teapot-${Teapot_VERSION_MAJOR}.${Teapot_VERSION_MINOR}.${Teapot_VERSION_PATCH}
diff --git a/app-office/teapot/files/teapot-2.2.0-helpfile.patch b/app-office/teapot/files/teapot-2.2.0-helpfile.patch
new file mode 100644
index 000000000000..751e68119350
--- /dev/null
+++ b/app-office/teapot/files/teapot-2.2.0-helpfile.patch
@@ -0,0 +1,31 @@
+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@gmail.com>
+
+--- fteapot.fl
++++ fteapot.fl
+@@ -8,6 +8,9 @@
+ decl {\#include "misc.h"} {private global
+ }
+
++decl {\#include "config.h"} {private global
++}
++
+ decl {\#include <stdint.h>} {private global
+ }
+
+@@ -781,8 +784,8 @@
+
+ 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, argv0, size);
+ 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;} {}
+ }