summaryrefslogtreecommitdiff
path: root/sci-chemistry/molscript
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sci-chemistry/molscript
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sci-chemistry/molscript')
-rw-r--r--sci-chemistry/molscript/Manifest1
-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.xml5
-rw-r--r--sci-chemistry/molscript/molscript-2.1.2-r2.ebuild68
8 files changed, 219 insertions, 0 deletions
diff --git a/sci-chemistry/molscript/Manifest b/sci-chemistry/molscript/Manifest
new file mode 100644
index 00000000000..d1fa0a225a0
--- /dev/null
+++ b/sci-chemistry/molscript/Manifest
@@ -0,0 +1 @@
+DIST molscript-2.1.2.tar.gz 412497 SHA256 01252931f5a3542d5659ddaa4ebceaed2e75becb8ed150dfa14b59da9a63ca01 SHA512 0f82936da3123770c0fdb703094dbb5289cc39e9f9ffd034d8dba563f8d615788f67040d38158ac2f203b480c5838a7d8e71ca07bc5098181c1e3cfea26703a4 WHIRLPOOL 1588f4dd47117f8da797a8bf62a2eba071106b1faca4f79b06e3093fe76092cae54476f1a0be995e3637173561ae6003fded264dd6d3a424d235488f95085a75
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 00000000000..8867bc10a6b
--- /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 00000000000..9ed1b85909e
--- /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 00000000000..e4c972a1053
--- /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 00000000000..a9947a61a66
--- /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 00000000000..9584bb129da
--- /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 00000000000..51fdedab1b3
--- /dev/null
+++ b/sci-chemistry/molscript/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci-chemistry</herd>
+</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 00000000000..9440dce9820
--- /dev/null
+++ b/sci-chemistry/molscript/molscript-2.1.2-r2.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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
+}