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
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')
-rw-r--r--app-office/teapot/ChangeLog10
-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
-rw-r--r--app-office/teapot/metadata.xml17
-rw-r--r--app-office/teapot/teapot-2.2.0.ebuild49
5 files changed, 134 insertions, 0 deletions
diff --git a/app-office/teapot/ChangeLog b/app-office/teapot/ChangeLog
new file mode 100644
index 000000000000..c271267c3dc7
--- /dev/null
+++ b/app-office/teapot/ChangeLog
@@ -0,0 +1,10 @@
+# ChangeLog for app-office/teapot
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/teapot/ChangeLog,v 1.1 2011/02/03 16:26:10 ssuominen Exp $
+
+*teapot-2.2.0 (03 Feb 2011)
+
+ 03 Feb 2011; Samuli Suominen <ssuominen@gentoo.org> +teapot-2.2.0.ebuild,
+ +files/teapot-2.2.0-doc-dir.patch, +files/teapot-2.2.0-helpfile.patch:
+ Initial commit wrt #353579 by Kevin McCarthy.
+
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;} {}
+ }
diff --git a/app-office/teapot/metadata.xml b/app-office/teapot/metadata.xml
new file mode 100644
index 000000000000..14c28dabee01
--- /dev/null
+++ b/app-office/teapot/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>desktop-misc</herd>
+ <maintainer>
+ <email>signals42@gmail.com</email>
+ <name>Kevin McCarthy</name>
+ </maintainer>
+ <maintainer>
+ <email>ssuominen@gentoo.org</email>
+ <name>Samuli Suominen</name>
+ </maintainer>
+ <maintainer>
+ <email>flameeyes@gentoo.org</email>
+ <name>Diego Elio Pettenò</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/app-office/teapot/teapot-2.2.0.ebuild b/app-office/teapot/teapot-2.2.0.ebuild
new file mode 100644
index 000000000000..fb5ce503a3fe
--- /dev/null
+++ b/app-office/teapot/teapot-2.2.0.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-office/teapot/teapot-2.2.0.ebuild,v 1.1 2011/02/03 16:26:10 ssuominen Exp $
+
+EAPI=4
+inherit cmake-utils flag-o-matic
+
+DESCRIPTION="A powerful spreadhseet program"
+HOMEPAGE="http://www.syntax-k.de/projekte/teapot/"
+SRC_URI="http://www.syntax-k.de/projekte/teapot/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc fltk"
+
+RDEPEND="sys-libs/ncurses
+ fltk? ( >=x11-libs/fltk-1.3.0_rc:1.1 )"
+DEPEND="${RDEPEND}
+ doc? (
+ app-office/lyx
+ dev-tex/latex2html
+ dev-tex/pgf
+ dev-texlive/texlive-fontsrecommended
+ )"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-doc-dir.patch
+ "${FILESDIR}"/${P}-helpfile.patch
+)
+
+src_configure() {
+ mycmakeargs=(
+ $(cmake-utils_use_enable doc HELP)
+ -DPF=${PF}
+ )
+
+ if use fltk; then
+ mycmakeargs+=(
+ -DFLTK_USE_FILE=/usr/share/cmake/Modules/FLTKConfig.cmake
+ -DFLTK_DIR=/usr/share/cmake/Modules
+ -DFLTK_FLUID_EXECUTABLE=/usr/bin/fluid
+ )
+ append-cxxflags -I/usr/include/fltk-1.1
+ append-ldflags -L/usr/$(get_libdir)/fltk-1.1
+ fi
+
+ cmake-utils_src_configure
+}