summaryrefslogtreecommitdiff
path: root/sci-mathematics/geomview
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-mathematics/geomview
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-mathematics/geomview')
-rw-r--r--sci-mathematics/geomview/Manifest9
-rw-r--r--sci-mathematics/geomview/files/50geomview-gentoo.el7
-rw-r--r--sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch34
-rw-r--r--sci-mathematics/geomview/files/gvcl-mode.el172
-rw-r--r--sci-mathematics/geomview/geomview-1.9.5-r1.ebuild70
-rw-r--r--sci-mathematics/geomview/metadata.xml15
6 files changed, 307 insertions, 0 deletions
diff --git a/sci-mathematics/geomview/Manifest b/sci-mathematics/geomview/Manifest
new file mode 100644
index 000000000000..76fc2ea33d58
--- /dev/null
+++ b/sci-mathematics/geomview/Manifest
@@ -0,0 +1,9 @@
+AUX 50geomview-gentoo.el 231 SHA256 b109acc005929e40cfe416b45ddea7e5c2831fe47648d4164905c587194a58d9 SHA512 c5d1420dedc078cee78870c48556f5470f384f1fd69c4cb4935ff4f59cbf2a9c17ea6e1dcdbf36149fcc4af2f801cc7420f1a1b0df8d96e14b97eb6439e94986 WHIRLPOOL 57c71c097c91f97e87bccd3eda89aabd7f2756e4667d94341b085b36016363072f8044e8db7ab355948835e419e1f42f5c79b0b5e9146fde5fe94d18b972ad4e
+AUX geomview-1.9.5-zlib.patch 1048 SHA256 4011e121f1c7f7396ad4e6b2fed7e88bc6782222c0382f1be1805843d59d8a3c SHA512 f7c15b512425e8c60ff5fe4eea7ab22b4c86633efca3905ac303f0c35f4cce8a6a70841fdc5bc25e861d594d8c25d73214f9b8dfbb4c824524461f52abf530e4 WHIRLPOOL 3b52449ff9655d2196e1baaa1d2c8626d72fe46d559b0ffb8fe078ad34947ed67bd8b2fe73549cb5079ae018a471f180baf2bb765d36ceb9581bed9c8c7aaf8b
+AUX gvcl-mode.el 7416 SHA256 924325cdd45314b7038c02d1afd1620f5884343b7c5fd8a5bc38a42437d9d811 SHA512 b7f834cc5a3187e4a1fe5342a392d22576aee7f76f95493e02512e3055b1f5e349e170405e6b419c06816470167fc3a063f6f6dee934b35ed4f02f5a3e0a0812 WHIRLPOOL b37892d488384bcf64327e60f95fd69a1539913fad28fbcb9837e9c7072ac9647df74482a3d1fa78a87272c49d665ba85875ea0b27f375adaf3cfd51543c7731
+DIST geomview-1.9.5.tar.bz2 4532535 SHA256 6b683735582ac4eab7f2618cf924c1244de58dd3ef195d06442aaea54cd9fb40 SHA512 a22bcd254e1e4c5c6797811f315d158f84fe82a3f95646bfdf3be203e9cd7fc8cacbf26f55a0a08bcb47cf2b2ad17ae4b48cdc4d78f810f48dab9fa1c7d56e7f WHIRLPOOL f89188ba357f814408fd8523ec416aab6052c1fb110110547e3e48a6c2d4bd8aa3d14f9d4995173e38714fa69156940950e2e4266d34685159d6ad35279b67f1
+DIST geomview.png.tar 10240 SHA256 cf1f5b94d868d363fa6f251343b1426cc7e9ed36ed8ee1fea4339ccabcba33cb SHA512 3abdc04f04410a50876af6b0f1aefc6891c47926ca9e5a4a31bd001310972996497f4e6c33db059fdbca09b236b7763e5476d75427e653d54861b4b3a4e54f51 WHIRLPOOL fecc6989bbef303b379673a503c322db1c8bbe61c346bc3dee984319eb29537985f2696c5a716e94398eb873fd6ed77a06e2462b615d7d4f22bad0bb033765a3
+EBUILD geomview-1.9.5-r1.ebuild 1468 SHA256 c872b72e269f01568505ab33e1b23a2ac3d5759887c3600d4165c409c01b85d8 SHA512 55b235a90a28d8061577ac022c4564148b6e8ee8568bc633bc51cdf45aa688c4f2206cccbddf75bb1c0ecbec497154001b56e45d43408280a696592015c9fc15 WHIRLPOOL a323b1fa960c50e610df91efd36be0d2151989bef4f1ab3ef50647c6239df880792eb736dca89cfe1bf1f8f1a2953bcb46802613efecf56d2474f12cd1687c38
+MISC ChangeLog 2794 SHA256 af927307168ff579f4887387e57c4343ae36111a0e6d55ff16600188521ecafa SHA512 0d1d1436946c840f69868798fe18ee9c1b304b06c7f022e38dabc4c868bb95a5986567a12c9c56179dd853668ac88d2bc5bceb3a00b9fbc0710f38c582cd086b WHIRLPOOL dbe18caaaa605f767688f57c5628bf0b6337c95eeae1320299daa4695604e7758b46006be1426c4116e942241efe1f1fc9a8b6d38d4c539a3363b394e5b98eb0
+MISC ChangeLog-2015 4458 SHA256 64f5104035ec767952d370e0e7d19827a4aa2761185f262c08a66538ada0313d SHA512 661e30da88f025511c267dea0b7a1077e732e0e015d46879e51b556a674211c761ae44b04a97d6ac022b0c87bbe8e1c2079d2890b3ffa24ebaef821ad9244300 WHIRLPOOL f908127a69392b264880b9e1c581b848a32bb92a5400995456c1f003f8af6fbe476dd98740e63ea2941cbfd8f81f1c8a1c32f01becaf2c8c727663bfa1bd6ae6
+MISC metadata.xml 571 SHA256 7e7a2cc2663bcc08af4c5bc7d497bc2287dbe57aa8fd0c5632616f6a68df1b6e SHA512 80840d70575485e2e4358734df0468566ad42f7768273640291a646b4261ae51823f682ad0e6582954502fcc1c69622d473abee45275a4907f6b30fc91c94d48 WHIRLPOOL bca94423c9fed43ddabfa2e0db70bcc733fd5d262abcbf34a71a9a9a96013fa36ab52fcfb198e24dd7553f6c8d836ddc5fc499ae4b9c395163a027f6abb3d229
diff --git a/sci-mathematics/geomview/files/50geomview-gentoo.el b/sci-mathematics/geomview/files/50geomview-gentoo.el
new file mode 100644
index 000000000000..2e078ec06c38
--- /dev/null
+++ b/sci-mathematics/geomview/files/50geomview-gentoo.el
@@ -0,0 +1,7 @@
+
+;;; geomview site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'gvcl-mode "gvcl-mode"
+ "Major mode for editing Geomview Command Language files." t)
+(add-to-list 'auto-mode-alist '("\\.gcl\\'" . gvcl-mode))
diff --git a/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch
new file mode 100644
index 000000000000..5d4b16a0867a
--- /dev/null
+++ b/sci-mathematics/geomview/files/geomview-1.9.5-zlib.patch
@@ -0,0 +1,34 @@
+Upstream diff to fix missing declarations with --without-zlib:
+* image.c:1028:34: error: 'gzip_data_pipe' undeclared here (not in a function)
+* { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } },
+* ^~~~~~~~~~~~~~
+See also: https://bugs.gentoo.org/show_bug.cgi?id=596414
+
+--- a/src/lib/shade/image.c
++++ b/src/lib/shade/image.c
+@@ -36,6 +36,8 @@
+
+ #ifndef HAVE_LIBZ
+ # define HAVE_LIBZ 0
++#elif HAVE_LIBZ
++# define HAVE_LIBZ 1
+ #endif
+
+ #if HAVE_LIBZ
+@@ -1025,9 +1027,15 @@
+ };
+
+ static struct filter decompressors[] = {
++#if HAVE_LIBZ
+ { decompressors+1, "gzip -dc", gzip_data_pipe, { "z", "gz", "gzip", NULL } },
+- { decompressors+2, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } },
++#else
++ { decompressors+1, "gzip -dc", NULL, { "z", "gz", "gzip", NULL } },
++#endif
++ { HAVE_LIBZ ? decompressors+2 : NULL, "bzip2 -dc", NULL, { "bz2", "bzip2", NULL } },
++#if HAVE_LIBZ
+ { NULL, NULL, zlib_data_pipe, { "zlib", NULL } },
++#endif
+ };
+
+ static struct filter converters[] = {
diff --git a/sci-mathematics/geomview/files/gvcl-mode.el b/sci-mathematics/geomview/files/gvcl-mode.el
new file mode 100644
index 000000000000..cbfadafc205f
--- /dev/null
+++ b/sci-mathematics/geomview/files/gvcl-mode.el
@@ -0,0 +1,172 @@
+;;; gvcl-mode.el --- A major mode for editing Geomview Command Language files
+
+;; Copyright (C) 2007 Claus-Justus Heine
+
+;; Author: Claus-Justus Heine
+;; Keywords: extensions
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2, or (at your option)
+;; any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs; see the file COPYING. If not, write to
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; Writing an Emacs major mode is really a non-trivial task. This file
+;; really covers only some basic things (comment-start,
+;; syntax-highlighting, crude indentation support).
+
+;;; Code:
+
+;; Setup
+
+;;First, we define some variables that all modes should
+;;define. gvlisp-mode-hook allows the user to run their own code when
+;;your mode is run
+
+(defvar gvcl-mode-hook nil)
+
+(defvar gvcl-indent-offset 2 "Incremental indentation offset.")
+
+;;Now we create a keymap. This map, here called gvcl-mode-map, allows
+;;both you and users to define their own keymaps. The keymap is
+;;immediately set to a default keymap. Then, using define-key, we
+;;insert an example keybinding into the keymap, which maps the
+;;newline-and-indent function to Control-j (which is actually the
+;;default binding for this function, but is included anyway as an
+;;example). Of course, you may define as many keybindings as you wish.
+;;
+;;If your keymap will have very few entries, then you may want to
+;;consider make-sparse-keymap rather than make-keymap
+(defvar gvcl-mode-map
+ (let ((gvcl-mode-map (make-keymap)))
+ (define-key gvcl-mode-map "\C-j" 'newline-and-indent)
+ gvcl-mode-map)
+ "Keymap for Geomview Command Language major mode.")
+
+;;Here, we append a definition to auto-mode-alist. This tells emacs
+;;that when a buffer with a name ending with .wpd is opened, then
+;;gvcl-mode should be started in that buffer. Some modes leave this
+;;step to the user.
+(add-to-list 'auto-mode-alist '("\\.gcl\\'" . gvcl-mode))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Syntax highlighting using keywords
+
+(defconst gvcl-font-lock-keywords-1
+ (list
+ '("(\\s-*\\(redraw\\|process-events\\|interest\\|time-interests\\|and\\|sleep-\\(for\\|until\\)\\|or\\|hdefine\\|geometry\\|quote\\|eval\\|if\\|while\\|setq\\|echo\\|let\\|exit\\|quit\\|lambda\\|defun\\|progn\\|backcolor\\|read\\|camera\\|new-geometry\\|car\\|cdr\\|cons\\|emodule\\S-*\\|ui-\\S-+\\|normalization\\)\\>" . font-lock-builtin-face)
+ '("\\(\"\\w*\"\\)" . font-lock-variable-name-face))
+ "Minimal highlighting expressions for GVCL mode.")
+
+(defconst gvcl-font-lock-keywords-2
+ (append gvcl-font-lock-keywords-1
+ (list
+ '("\\<\\(\\(location\\|origin\\)\\s-+\\(camera\\|local\\|global\\|ndc\\|screen\\)\\)\\>" . font-lock-constant-face)
+ '("\\<\\(define\\|geom\\(etry\\)?\\|camera\\|window\\|inertia\\|allgeoms\\|focus-change\\)\\>" . font-lock-keyword-face)))
+ "Additional Keywords to highlight in GVCL mode.")
+
+(defconst gvcl-font-lock-keywords-3
+ (append gvcl-font-lock-keywords-2
+ (list
+ '("\\<\\(INST\\|T?LIST\\|\\(ST\\)?Z?u?v?C?N?U?4?n?\\(OFF\\|MESH\\|SKEL\\|VECT\\|QUAD\\|BEZ\\|BBP\\|BBOX\\|SPHERE\\|GROUP\\|DISCGRP\\|COMMENT\\)\\)\\>" . font-lock-type-face)
+ ;; more OOGL keywords
+ '("\\<\\(SINUSOIDAL\\|CYLINDRICAL\\|RECTANGULAR\\|STEREOGRAPHIC\\|ONEFACE\\)\\>" . font-lock-keyword-face)
+ ;; apperance constants
+ '("\\<\\(blend\\|modulate\\|replace\\|decal\\|replacelights\\|face\\|edge\\|vect\\|transparent\\|normal\\|normscale\\|evert\\|texturing\\|mipmap\\|linear\\|mipinterp\\|backcull\\|concave\\|shadelines\\|keepcolor\\|smooth\\|flat\\|constant\\|csmooth\\|vcflat\\|replacelights\\|clamp\\s-+\\(s\\|t\\|st\\|none\\)\\)\\>" . font-lock-constant-face)
+ ;; image constants
+ '("\\<\\(RGB\\|RGBA\\|ALPHA\\|LUMINANCE\\|LUMINANCE_ALPHA\\)\\>" . font-lock-constant-face)
+ ;; image keywords
+ '("\\<\\(inertia\\|width\\|height\\|channels\\|maxval\\|data\\)\\>" . font-lock-keyword-face)
+ ;; apperance keywords
+ '("\\<\\(apply\\|shading\\|localviewer\\|attenconst\\|attenmult2?\\|normscale\\|shading\\|linewidth\\|patchdice\\|ka\\|ambient\\|kd\\|diffuse\\|ks\\|specular\\|shininess\\|backdiffuse\\|alpha\\|edgecolor\\|normalcolor\\|color\\|position\\|file\\|alphafile\\|background\\|texturing\\)\\>" . font-lock-keyword-face)
+ ;; some more types
+ '("\\<\\(texture\\|light\\|material\\|lighting\\|light\\|image\\|appearance\\|n?transforms?\\|tlist\\)\\>" . font-lock-type-face)
+ ;; some more constants
+ '("\\<\\(yes\\|no\\|on\\|off\\|toggle\\|center\\|none\\)\\>" . font-lock-constant-face)
+ ))
+ "Balls-out highlighting in GVCL mode.")
+
+;;I've now defined more GVCL constants. This completes the list of
+;;GVCL keywords.
+
+(defvar gvcl-font-lock-keywords gvcl-font-lock-keywords-3
+ "Default highlighting expressions for GVCL mode.")
+
+;;Here I've defined the default level of highlighting to be the
+;;maximum. This is just my preference\u2014 the user can change this
+;;variable (if the user knows how! This might be something to put in
+;;the documentation for your own mode).
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Indentation
+
+(defun gvcl-indent-line ()
+ "Indent current line as GVCL code."
+ (interactive)
+;; (beginning-of-line)
+ (let ((savep (> (current-column) (current-indentation)))
+ (indent (condition-case nil (max (gvcl-calculate-indentation) 0)
+ (error 0))))
+ (if savep
+ (save-excursion (indent-line-to indent))
+ (indent-line-to indent))))
+
+(defun gvcl-calculate-indentation ()
+ "Return the column to which the current line should be indented."
+ (save-excursion
+ (beginning-of-line)
+ (if (< (point) 2)
+ 0
+ (skip-chars-forward " \t")
+ (let ((indent-above (if (eq (char-syntax (following-char)) ?\) )
+ 0
+ gvcl-indent-offset)))
+ (up-list -1)
+ (+ (current-indentation) indent-above)))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; The syntax table
+
+(defvar gvcl-mode-syntax-table
+ (let ((st (make-syntax-table)))
+ (modify-syntax-entry ?_ "w" st)
+ (modify-syntax-entry ?# "<" st)
+ (modify-syntax-entry ?\n ">" st)
+ (modify-syntax-entry ?{ "(}" st)
+ (modify-syntax-entry ?} "){" st)
+ (modify-syntax-entry ?( "()" st)
+ (modify-syntax-entry ?) ")(" st)
+ st)
+ "Syntax table for `gvcl-mode'.")
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Derive the stuff from fundamental mode
+
+(define-derived-mode gvcl-mode fundamental-mode "GVCL"
+ "Major mode for editing Geomview Command Language files."
+ (set (make-local-variable 'font-lock-defaults) '(gvcl-font-lock-keywords))
+ (set (make-local-variable 'comment-start) "# ")
+ (set (make-local-variable 'comment-start-skip) "#+\\s-*")
+ (set (make-local-variable 'indent-line-function) 'gvcl-indent-line))
+
+
+(provide 'gvcl-mode)
+
+(provide 'gvcl-mode)
+
+;;; gvcl-mode.el ends here
diff --git a/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild
new file mode 100644
index 000000000000..675a3515f014
--- /dev/null
+++ b/sci-mathematics/geomview/geomview-1.9.5-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit elisp-common eutils fdo-mime flag-o-matic
+
+DESCRIPTION="Interactive Geometry Viewer"
+HOMEPAGE="http://geomview.sourceforge.net"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.bz2
+ https://dev.gentoo.org/~jlec/distfiles/geomview.png.tar"
+KEYWORDS="~amd64 ~ppc ~sparc ~x86"
+LICENSE="LGPL-2.1"
+SLOT="0"
+IUSE="motionaveraging debug emacs zlib"
+
+DEPEND="x11-libs/motif:0
+ virtual/glu
+ virtual/opengl
+ emacs? ( virtual/emacs )
+ zlib? ( sys-libs/zlib )"
+RDEPEND="${DEPEND}
+ x11-misc/xdg-utils"
+
+S="${WORKDIR}/${P/_/-}"
+
+SITEFILE="50${PN}-gentoo.el"
+PATCHES=( "${FILESDIR}/${PN}-1.9.5-zlib.patch" )
+
+src_configure() {
+ econf \
+ --with-htmlbrowser=xdg-open \
+ --with-pdfviewer=xdg-open \
+ $(use_enable debug d1debug) \
+ $(use_with zlib) \
+ $(use_enable motionaveraging motion-averaging)
+}
+
+src_compile() {
+ default
+
+ if use emacs; then
+ cp "${FILESDIR}/gvcl-mode.el" . || die
+ elisp-compile *.el
+ fi
+}
+
+src_install() {
+ default
+
+ doicon "${WORKDIR}"/geomview.png
+ make_desktop_entry ${PN} "GeomView ${PV}" \
+ /usr/share/pixmaps/${PN}.png \
+ "Science;Math;Education"
+
+ if use emacs; then
+ elisp-install ${PN} *.el *.elc
+ elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+ fi
+}
+
+pkg_postinst() {
+ fdo-mime_desktop_database_update
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ fdo-mime_desktop_database_update
+ use emacs && elisp-site-regen
+}
diff --git a/sci-mathematics/geomview/metadata.xml b/sci-mathematics/geomview/metadata.xml
new file mode 100644
index 000000000000..961597db5582
--- /dev/null
+++ b/sci-mathematics/geomview/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-mathematics@gentoo.org</email>
+ <name>Gentoo Mathematics Project</name>
+ </maintainer>
+ <longdescription>Geomview is an interactive geometry viewer and Object Oriented Graphics Library (OOGL).</longdescription>
+ <use>
+ <flag name="motionaveraging">Enable experimental motion averaging technique</flag>
+ </use>
+ <upstream>
+ <remote-id type="sourceforge">geomview</remote-id>
+ </upstream>
+</pkgmetadata>