From e20cee515975607673f72022a5f8fe4bed9f28a4 Mon Sep 17 00:00:00 2001 From: Samuli Suominen Date: Thu, 3 Feb 2011 16:26:10 +0000 Subject: Initial commit wrt #353579 by Kevin McCarthy. (Portage version: 2.2.0_alpha19/cvs/Linux x86_64) --- app-office/teapot/ChangeLog | 10 +++++ app-office/teapot/files/teapot-2.2.0-doc-dir.patch | 27 ++++++++++++ .../teapot/files/teapot-2.2.0-helpfile.patch | 31 ++++++++++++++ app-office/teapot/metadata.xml | 17 ++++++++ app-office/teapot/teapot-2.2.0.ebuild | 49 ++++++++++++++++++++++ 5 files changed, 134 insertions(+) create mode 100644 app-office/teapot/ChangeLog create mode 100644 app-office/teapot/files/teapot-2.2.0-doc-dir.patch create mode 100644 app-office/teapot/files/teapot-2.2.0-helpfile.patch create mode 100644 app-office/teapot/metadata.xml create mode 100644 app-office/teapot/teapot-2.2.0.ebuild (limited to 'app-office') 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 +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 + + +--- 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 + +--- fteapot.fl ++++ fteapot.fl +@@ -8,6 +8,9 @@ + decl {\#include "misc.h"} {private global + } + ++decl {\#include "config.h"} {private global ++} ++ + decl {\#include } {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 @@ + + + + desktop-misc + + signals42@gmail.com + Kevin McCarthy + + + ssuominen@gentoo.org + Samuli Suominen + + + flameeyes@gentoo.org + Diego Elio Pettenò + + 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 +} -- cgit v1.2.3-65-gdbad