summaryrefslogtreecommitdiff
path: root/sci-chemistry/molscript
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-chemistry/molscript
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-chemistry/molscript')
-rw-r--r--sci-chemistry/molscript/Manifest10
-rw-r--r--sci-chemistry/molscript/files/2.1.2-ldflags.patch22
-rw-r--r--sci-chemistry/molscript/files/2.1.2-libpng15.patch19
-rw-r--r--sci-chemistry/molscript/files/2.1.2-prll.patch10
-rw-r--r--sci-chemistry/molscript/files/fix-makefile-shared.patch62
-rw-r--r--sci-chemistry/molscript/files/glutbitmap.h32
-rw-r--r--sci-chemistry/molscript/metadata.xml8
-rw-r--r--sci-chemistry/molscript/molscript-2.1.2-r2.ebuild67
8 files changed, 230 insertions, 0 deletions
diff --git a/sci-chemistry/molscript/Manifest b/sci-chemistry/molscript/Manifest
new file mode 100644
index 000000000000..9e60a274b4e2
--- /dev/null
+++ b/sci-chemistry/molscript/Manifest
@@ -0,0 +1,10 @@
+AUX 2.1.2-ldflags.patch 818 SHA256 ef1f4079d7b11d69f8f9835266b7bf066fa74623ef2e34c1a5638125153771ab SHA512 0e14bbf2869357e19360a977941995f8610cf2c5c4fe272a30480725350705f4d8dfa83541b1eca441c78079ca926a6449d488854d3b6b7ee1c84e644d6c023a WHIRLPOOL eb0e1bdc1f88ca0e6bfc49ffdc61ce2bb77b461ac1beb6a3d4e8238298bd5d07f9bb0c29b32085b757340d4deac8ab3f1fd1d4d21156e6326ca5940501e3e0f0
+AUX 2.1.2-libpng15.patch 536 SHA256 46a9b1f08aabf4c6afe879a40241a4ffe3fb0e7489e73e074be1fec3bfa580de SHA512 29f929401478beb652e04ca2b043b8dd10497251c7fd7d6668479269f06791f1419db37f0535c173ec6e29cbeb44da26d68b3413593517641d6fe9ae63090f72 WHIRLPOOL eabf81779214d2a6e9d2626e9d858ab0a7c0e01931d29661bd4ce7b308cd141772ed2fe3f906c66b0ad8b1b6b2d87865719c9e24951385d6d43af63b9aa08bf1
+AUX 2.1.2-prll.patch 409 SHA256 23d968365bc5de71d43a9ef6bf2333dc749871b0ada84815f8687a82ca697364 SHA512 16b8566212cf06454a466678db61c2377c6080e8c72cd6e841b104f70f105fefa5d128ef96cb679f583a413d1d285a8f369dd2e757be347883d7e3e99bf88606 WHIRLPOOL 1eb32f1f7c6fd0debce8caadcd95f3146c2ad0e925adea6510a57738044727a80c4370a1ebcd520a0a24c9ef81b434f72cc62f93966deedf5c7469173f5a4bb3
+AUX fix-makefile-shared.patch 2051 SHA256 d692b236634d76f3f9d3482d3cc7b05451c0a116ad6edb8ade9075523e6b9bdf SHA512 0c12bd5aea0a6175b7647ed61ae139113329058c42cfb56105ee35af35bdab9f61adfe635a1c3322dbff00ddfcee06383bbd6bd048cc7ded1961f3997a527358 WHIRLPOOL 11d9a3e93cc3af9570a0a3e6863d4cea1a4ec8c9266dfe0c7bf2499ef211f52d714eed12e2986a06126162628ce75ae0e3933e60419d28e3a2c6976ea387df11
+AUX glutbitmap.h 845 SHA256 ba4caf7c2e7135e80385c2d33d7c780a28f5e9fc3ac557e297f65b70ce925a81 SHA512 a11e8c23472ed8950c8b56fdfd57ddd9c6539f427437ab26a2d3561ad388ca24a36029dee9ff6b8af759eeadf89fbd45dd10279d8089e6978eec07858624c7da WHIRLPOOL dc835c2604b33711ba26f5e846c40920eff7a26071560625f4fcd86f0a5c2d488b1adad0918d3e23ebf8775d08695caf17819608289f3fc87d35d72ee1144cbd
+DIST molscript-2.1.2.tar.gz 412497 SHA256 01252931f5a3542d5659ddaa4ebceaed2e75becb8ed150dfa14b59da9a63ca01 SHA512 0f82936da3123770c0fdb703094dbb5289cc39e9f9ffd034d8dba563f8d615788f67040d38158ac2f203b480c5838a7d8e71ca07bc5098181c1e3cfea26703a4 WHIRLPOOL 1588f4dd47117f8da797a8bf62a2eba071106b1faca4f79b06e3093fe76092cae54476f1a0be995e3637173561ae6003fded264dd6d3a424d235488f95085a75
+EBUILD molscript-2.1.2-r2.ebuild 1407 SHA256 afa6d50b88a21b65122820067794f064a4a9493265e7081f416c8ab2faf3a825 SHA512 37358b677743c89b94c7960b3c5eaa458f8bd77494d412deb6cd4f583d59848bf8eadc10bb0d6bf7e3afdac24e2abb166b07d4d2143558147b29b847e1a746cc WHIRLPOOL 51856285ba80961113dff8b62c4f2137fa3422508abea80a51c2ede18d5961a0c07df013edec4832c24b65334787bf37734d0c4521b871ac7f2789005bb5a2f6
+MISC ChangeLog 2585 SHA256 5bcae4b20fc7d69c6e4258f995451717378f8463e99c6a7d929a36553692533a SHA512 fa629a8bb0ce755095cf909d68910d56033a433a54224e6595ef534104fb356dbec1e63c43240057eea887127e07155109015ebe41792d01ba1764b37ad7e243 WHIRLPOOL 2a331d868b484696bcd94a411b1726096d70f6641a3636e052d6ecc0aa59dfe0eab5a8b8eb16a886a0d89ed578afaccb171e03c9e99ec0b323ebd44a7715a0f4
+MISC ChangeLog-2015 3112 SHA256 7fad4b90086b3c09b9fe27c5efa3f86dc1868fdb63ba56d982cdec5d3ca3c7b7 SHA512 8fcb4f5d0cb61497fa7e18677fe693a0b2cb16964e1edf33d41c2ec179786929d44af7f910c19391073f982c98866be550891e8c57537369eacb81807ae317ba WHIRLPOOL 32371c32cd772d8faad416a98a795a5ca1cb4d7337187ef1c21fcb38a5b3c22b19e4230397a14fb360431a53a99b1e745a4f1c966dcf87585e3f0c1752c3b1b2
+MISC metadata.xml 271 SHA256 70036ea85140f86ed670bc2791c9de861c4b6164755ee36a2560d1c812ec13f6 SHA512 3e6e6047a29e07123b81279cae1de17bc4bd4c3d7d8a8d26560114a18185f473d038fc220fa81c7213fa203ce197bad8b1c272d9b7e41cd770a953fa6308ff92 WHIRLPOOL 1ccb964819c99258af550a41c6712ba8ebdecbec1c821106de2f22c37b1c981cd4f324856a8014b08bd186bcd2a7fa45a7e772cc15705d1a39016b5229e77269
diff --git a/sci-chemistry/molscript/files/2.1.2-ldflags.patch b/sci-chemistry/molscript/files/2.1.2-ldflags.patch
new file mode 100644
index 000000000000..8867bc10a6b5
--- /dev/null
+++ b/sci-chemistry/molscript/files/2.1.2-ldflags.patch
@@ -0,0 +1,22 @@
+diff --git a/Makefile.complete b/Makefile.complete
+index 4ad535a..b565266 100644
+--- a/Makefile.complete
++++ b/Makefile.complete
+@@ -91,7 +91,7 @@ clean:
+
+ #------------------------------------------------------------
+ molscript: $(OBJ) clib/clib.a
+- $(CC) -o molscript $(COPT) $(OBJ) $(YLIB) clib/clib.a \
++ $(CC) $(LDFLAGS) -o molscript $(COPT) $(OBJ) $(YLIB) clib/clib.a \
+ $(GLUTLINK) $(JPEGLINK) $(PNGLINK) $(GIFLINK) $(ZLIBLINK) -lm
+
+ molscript.tab.o: molscript.tab.c molscript.tab.h
+@@ -147,7 +147,7 @@ gif_img.o: gif_img.c gif_img.h global.h graphics.h image.h opengl.h
+
+ #------------------------------------------------------------
+ molauto: molauto.o clib/clib.a
+- $(CC) -o molauto molauto.o clib/clib.a -lm
++ $(CC) $(LDFLAGS) -o molauto molauto.o clib/clib.a -lm
+
+ molauto.o: molauto.c
+
diff --git a/sci-chemistry/molscript/files/2.1.2-libpng15.patch b/sci-chemistry/molscript/files/2.1.2-libpng15.patch
new file mode 100644
index 000000000000..9ed1b85909e8
--- /dev/null
+++ b/sci-chemistry/molscript/files/2.1.2-libpng15.patch
@@ -0,0 +1,19 @@
+--- png_img.c
++++ png_img.c
+@@ -18,6 +18,7 @@
+
+ #include <GL/gl.h>
+
++#include <zlib.h>
+ #include <png.h>
+
+ #include "clib/str_utils.h"
+@@ -69,7 +70,7 @@
+ info_ptr = png_create_info_struct (png_ptr);
+ if (info_ptr == NULL)
+ yyerror ("png_img: could not create PNG info structure");
+- if (setjmp (png_ptr->jmpbuf)) yyerror ("png_img: could not setjmp");
++ if (setjmp (png_jmpbuf(png_ptr))) yyerror ("png_img: could not setjmp");
+
+ png_init_io (png_ptr, outfile);
+ png_set_compression_level (png_ptr, compression_level);
diff --git a/sci-chemistry/molscript/files/2.1.2-prll.patch b/sci-chemistry/molscript/files/2.1.2-prll.patch
new file mode 100644
index 000000000000..e4c972a10533
--- /dev/null
+++ b/sci-chemistry/molscript/files/2.1.2-prll.patch
@@ -0,0 +1,10 @@
+diff --git a/Makefile.complete b/Makefile.complete
+index 92ef20a..e3f68e3 100644
+--- a/Makefile.complete
++++ b/Makefile.complete
+@@ -153,4 +153,4 @@ molauto.o: molauto.c
+
+ #------------------------------------------------------------
+ clib/clib.a:
+- cd clib; make clib.a CFLAGS="-I. $(CFLAGS)" OPENGLCLIBOBJ="$(OPENGLCLIBOBJ)"
++ $(MAKE) -C clib clib.a CFLAGS="-I. $(CFLAGS)" OPENGLCLIBOBJ="$(OPENGLCLIBOBJ)"
diff --git a/sci-chemistry/molscript/files/fix-makefile-shared.patch b/sci-chemistry/molscript/files/fix-makefile-shared.patch
new file mode 100644
index 000000000000..a9947a61a665
--- /dev/null
+++ b/sci-chemistry/molscript/files/fix-makefile-shared.patch
@@ -0,0 +1,62 @@
+diff -urN molscript-2.1.2.orig/Makefile.complete molscript-2.1.2/Makefile.complete
+--- molscript-2.1.2.orig/Makefile.complete 1998-11-25 01:04:39.000000000 -0800
++++ molscript-2.1.2/Makefile.complete 2005-11-21 12:28:06.000000000 -0800
+@@ -23,9 +23,9 @@
+
+ # OpenGL and GLUT for X (UNIX).
+ # Must be modified for Windows 95/NT. <---
+-GLUTDIR = $(FREEWAREDIR)/glut
+-GLUTLINK = $(GLUTDIR)/lib/glut/libglut.a -lGLU -lGL -lXmu -lXext -lX11
+-OPENGLFLAG = -DOPENGL_SUPPORT -I$(GLUTDIR)/include
++GLUTDIR = $(FREEWAREDIR)
++GLUTLINK = -lglut -lGLU -lGL -lXmu -lXext -lX11
++OPENGLFLAG = -DOPENGL_SUPPORT -I$(GLUTDIR)/include/GL
+ OPENGLOBJ = opengl.o
+ OPENGLCLIBOBJ = ogl_utils.o ogl_body.o ogl_bitmap_character.o
+
+@@ -35,25 +35,25 @@
+
+ # JPEG image file format; requires the JPEG library.
+ # Comment out these lines if the JPEG library is not available. <---
+-JPEGDIR = $(FREEWAREDIR)/jpeg
+-JPEGLINK = $(JPEGDIR)/libjpeg.a
+-JPEGFLAG = -DJPEG_SUPPORT -I$(JPEGDIR)
++JPEGDIR = $(FREEWAREDIR)
++JPEGLINK = -ljpeg
++JPEGFLAG = -DJPEG_SUPPORT
+ JPEGOBJ = jpeg_img.o
+
+ # PNG image file format; requires the PNG library and the zlib library.
+ # Comment out these lines if the PNG and zlib libraries are not available. <---
+-ZLIBDIR = $(FREEWAREDIR)/zlib
+-ZLIBLINK = $(ZLIBDIR)/libz.a
+-PNGDIR = $(FREEWAREDIR)/libpng
+-PNGLINK = $(PNGDIR)/libpng.a
+-PNGFLAG = -DPNG_SUPPORT -I$(PNGDIR) -I$(ZLIBDIR)
++ZLIBDIR = $(FREEWAREDIR)
++ZLIBLINK = -lz
++PNGDIR = $(FREEWAREDIR)
++PNGLINK = -lpng
++PNGFLAG = -DPNG_SUPPORT
+ PNGOBJ = png_img.o
+
+ # GIF image file format; requires the gd 1.3 library.
+ # Comment out these lines if the gd 1.3 library is not available. <---
+-GIFDIR = $(FREEWAREDIR)/gd
+-GIFLINK = $(GIFDIR)/libgd.a
+-GIFFLAG = -DGIF_SUPPORT -I$(GIFDIR)
++GIFDIR = $(FREEWAREDIR)
++GIFLINK = -lgd
++GIFFLAG = -DGIF_SUPPORT
+ GIFOBJ = gif_img.o
+
+ # SGI IRIX's C compiler.
+@@ -62,7 +62,7 @@
+ COPT = -O1
+ # Correctness flags:
+ #CCHECK = -ansi -fullwarn -g -DSELECT_DEBUG
+-CCHECK = -ansi -fullwarn
++CCHECK = -ansi
+ #CCHECK = -ansi -fullwarn -DNDEBUG
+
+ # General cc compile flags.
diff --git a/sci-chemistry/molscript/files/glutbitmap.h b/sci-chemistry/molscript/files/glutbitmap.h
new file mode 100644
index 000000000000..9584bb129daa
--- /dev/null
+++ b/sci-chemistry/molscript/files/glutbitmap.h
@@ -0,0 +1,32 @@
+#ifndef __glutbitmap_h__
+#define __glutbitmap_h__
+
+/* Copyright (c) Mark J. Kilgard, 1994, 1998. */
+
+/* This program is freely distributable without licensing fees
+ and is provided without guarantee or warrantee expressed or
+ implied. This program is -not- in the public domain. */
+
+#define GLUT_NO_LIB_PRAGMA /* Avoid auto library linking when building
+ the GLUT library itself. */
+#include <GL/glut.h>
+
+typedef struct {
+ const GLsizei width;
+ const GLsizei height;
+ const GLfloat xorig;
+ const GLfloat yorig;
+ const GLfloat advance;
+ const GLubyte *bitmap;
+} BitmapCharRec, *BitmapCharPtr;
+
+typedef struct {
+ const char *name;
+ const int num_chars;
+ const int first;
+ const BitmapCharRec * const *ch;
+} BitmapFontRec, *BitmapFontPtr;
+
+typedef void *GLUTbitmapFont;
+
+#endif /* __glutbitmap_h__ */
diff --git a/sci-chemistry/molscript/metadata.xml b/sci-chemistry/molscript/metadata.xml
new file mode 100644
index 000000000000..8937bad0b175
--- /dev/null
+++ b/sci-chemistry/molscript/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>sci-chemistry@gentoo.org</email>
+ <name>Gentoo Chemistry Project</name>
+ </maintainer>
+</pkgmetadata>
diff --git a/sci-chemistry/molscript/molscript-2.1.2-r2.ebuild b/sci-chemistry/molscript/molscript-2.1.2-r2.ebuild
new file mode 100644
index 000000000000..054edd99f7ff
--- /dev/null
+++ b/sci-chemistry/molscript/molscript-2.1.2-r2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Display molecular 3D structures, such as proteins, in both schematic and detailed representations"
+HOMEPAGE="http://www.avatar.se/molscript/"
+SRC_URI="${P}.tar.gz"
+
+LICENSE="glut molscript"
+SLOT="0"
+KEYWORDS="amd64 ppc x86 ~amd64-linux ~x86-linux"
+IUSE=""
+
+DEPEND="
+ media-libs/freeglut
+ media-libs/gd:2=
+ media-libs/libpng:0=
+ virtual/jpeg:0=
+ || (
+ x11-libs/libXmu
+ x11-libs/libXext
+ x11-libs/libX11
+ )"
+RDEPEND="${DEPEND}"
+
+RESTRICT="fetch"
+
+pkg_nofetch() {
+ elog "Please visit ${HOMEPAGE}"
+ elog "and get ${A}."
+ elog "Place it in ${DISTDIR}"
+}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/fix-makefile-shared.patch \
+ "${FILESDIR}"/${PV}-ldflags.patch \
+ "${FILESDIR}"/${PV}-prll.patch \
+ "${FILESDIR}"/${PV}-libpng15.patch
+
+ # Provide glutbitmap.h, because freeglut doesn't have it
+ cp "${FILESDIR}"/glutbitmap.h "${S}"/clib/ || die
+
+ # Stop an incredibly hacky include
+ sed \
+ -e 's:<../lib/glut/glutbitmap.h>:"glutbitmap.h":g' \
+ -i "${S}"/clib/ogl_bitmap_character.c || die
+}
+
+src_compile() {
+ # Prefix of programs it links with
+ export FREEWAREDIR="${EPREFIX}/usr"
+
+ ln -s Makefile.complete Makefile || die
+
+ emake \
+ CC="$(tc-getCC)" \
+ COPT="${CFLAGS}"
+}
+
+src_install() {
+ dobin molscript molauto
+ dohtml "${S}"/doc/*.html
+}