From 3cdfdde29b587142cc80123b47fef5b19be2b6b8 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 11 Jul 2018 14:09:35 +0200 Subject: xcrysden new --- xcrysden/Make.sys | 64 +++++++++++++++++++++++++++++ xcrysden/PKGBUILD | 36 +++++++++++++++++ xcrysden/fix-xcrysden-install.patch | 81 +++++++++++++++++++++++++++++++++++++ 3 files changed, 181 insertions(+) create mode 100644 xcrysden/Make.sys create mode 100644 xcrysden/PKGBUILD create mode 100644 xcrysden/fix-xcrysden-install.patch (limited to 'xcrysden') diff --git a/xcrysden/Make.sys b/xcrysden/Make.sys new file mode 100644 index 00000000..fd635ed0 --- /dev/null +++ b/xcrysden/Make.sys @@ -0,0 +1,64 @@ +######################################################################### +# +# System-dependent definitions suitable for compiling xcrysden using +# a system shared libraries (needs Tcl/Tk/GL/GLU/FFTW libraries) +# +######################################################################## + + +#------------------------------------------------------------------------ +# if you have a GNU make it is better to set the MAKE variable to point +# to gnu make +#------------------------------------------------------------------------ +MAKE = make + + +#------------------------------------------------------------------------ +# compilers & flags +#------------------------------------------------------------------------ +CFLAGS = -ffast-math -funroll-loops -fPIC -DUSE_FONTS -pedantic -Wall -DUSE_INTERP_RESULT +CC = gcc -g +#LDLIB = -ldl +MATH = -lm -lc + +FFLAGS = +FC = gfortran -std=legacy -fdefault-double-8 -fdefault-real-8 -O2 + +#------------------------------------------- +#debug options +#CFLAGS = -g +#------------------------------------------- + + +#------------------------------------------------------------------------ +# X-libraries & include files +#------------------------------------------------------------------------ +X_LIB = -lXmu -lX11 +X_INCDIR = + +#------------------------------------------------------------------------ +# +# Libraries +# + +TCL_LIB = -ltcl +TK_LIB = -ltk +GLU_LIB = -lGLU +GL_LIB = -lGL +FFTW3_LIB = -lfftw3 +EXT_LIB = -lgl2ps +# this is only used for some testing purposes +#MESCHACH_LIB = -lmeschach + +# +# Include directories +# + +TCL_INCDIR = -I/usr/include +TK_INCDIR = +GL_INCDIR = +FFTW3_INCDIR = +# this is only used for some testing purposes +#MESCHACH_INCDIR = + +#------------------------------------------------------------------------ diff --git a/xcrysden/PKGBUILD b/xcrysden/PKGBUILD new file mode 100644 index 00000000..8bc16680 --- /dev/null +++ b/xcrysden/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Erich Eckner +# Contributor: Adrian Hühn +# Previous Maintainer: Vit + +pkgname=xcrysden +pkgver=1.5.60 +pkgrel=1 +epoch= +pkgdesc="crystalline and molecular structure visualisation program" +arch=('i686' 'x86_64') +url="http://www.xcrysden.org/" +license=('GPL2') +depends=('tk' 'tcl' 'gl2ps' 'fftw' 'bwidget' 'imagemagick' 'gcc-fortran' 'glu' 'libxmu') +replaces=('xcrysden-bin') +source=("http://www.xcrysden.org/download/xcrysden-${pkgver}.tar.gz" + "fix-xcrysden-install.patch" + "Make.sys") +sha256sums=('a695729f1bb3e486b86a74106c06a392c8aca048dc6b0f20785c3c311cfb2ef4' + '61a0bbc7728beff05bcb7f1676053de468ebb926b638869174aa2bbcb5bc554c' + '077ca35a6d7264c0b13489a3c06cb49041c6afaf394d136c303ba9b4a5614d66') + +prepare() { + mv Make.sys "$pkgname-$pkgver" + cd "$pkgname-$pkgver" + patch -p1 -i $srcdir/fix-xcrysden-install.patch +} + +build() { + cd "$pkgname-$pkgver" + make xcrysden +} + +package() { + cd "$pkgname-$pkgver" + prefix=$pkgdir/usr make install +} diff --git a/xcrysden/fix-xcrysden-install.patch b/xcrysden/fix-xcrysden-install.patch new file mode 100644 index 00000000..9d3c3f25 --- /dev/null +++ b/xcrysden/fix-xcrysden-install.patch @@ -0,0 +1,81 @@ +Author: Anton Kokalj +Reviewed-by: Daniel Leidert +Ported to Arch Linux: Adrian Hühn + +Forwarded: not-needed + +Author: Anton Kokalj +Description: Use system libraries of libgl2ps and libtogl. Fix DESTDIR issue and +xcrysden directory name in Makefile. Fix installation directory to point to +/usr. +Forwarded: not-needed + +--- a/Makefile ++++ b/Makefile +@@ -17,7 +17,7 @@ + # some varibales ... + + all: tcl tk mesa fftw meschach xcrysden +-xcrysden: usage bwidget bindir src-C src-F src-Tcl ++xcrysden: usage bindir src-C src-F src-Tcl + + usage: $(TOPDIR)/docs/xcrysden.1 + man $(TOPDIR)/docs/xcrysden.1 | awk 'BEGIN {lprint=0; print "## do not edit changes will be lost (file automatically generated)\n"; } /SYNOPSIS/ { lprint=1; } /SEE ALSO/ { lprint=0; } /a*/ { if (lprint) print; }' > usage +@@ -226,9 +226,9 @@ + # + # ------------------------------------------------------------------------ + +-prefix ?= /usr/local ++prefix ?= $(DESTDIR)/usr + version := $(shell cat version) +-xcrysden = xcrysden-$(version) ++xcrysden = xcrysden + + install: xcrysden + @echo +--- a/C/Makefile ++++ b/C/Makefile +@@ -29,7 +29,7 @@ + + xcrys: $(XC_OBJS) $(EXTERNAL_OBJS) + $(CC) $(CFLAGS) $(XC_OBJS) $(EXTERNAL_OBJS) \ +- -o xcrys $(FFTW3_LIB) $(MESCHACH_LIB) $(TK_LIB) $(TCL_LIB) $(GLU_LIB) $(GL_LIB) $(X_LIB) $(MATH) $(LDLIB) ++ -o xcrys $(FFTW3_LIB) $(MESCHACH_LIB) $(TK_LIB) $(TCL_LIB) $(GLU_LIB) $(GL_LIB) $(X_LIB) $(MATH) $(LDLIB) $(EXT_LIB) + + xctclsh: xcTclsh.o + $(CC) $(CFLAGS) xcTclsh.o -o xctclsh $(TCL_LIB) $(MATH) $(LDLIB) +--- a/C/make-objects ++++ b/C/make-objects +@@ -1,6 +1,5 @@ + EXTERNAL_OBJS = \ + togl.o \ +- gl2ps.o \ + sgiRasterFont.o \ + sgiAux.o + +--- a/C/gl2psPrintTogl.c ++++ b/C/gl2psPrintTogl.c +@@ -18,8 +18,8 @@ + + #include + #include +-#include "togl.h" +-#include "gl2ps.h" ++#include "togl.h" ++#include + #include "xcfunc.h" + + extern void (*xcDisplay)(struct Togl *togl); +--- a/sys_utils/wrappers.sh ++++ b/sys_utils/wrappers.sh +@@ -5,8 +5,8 @@ + #!/bin/sh -f + + # simple wrapper to run $cmd +-XCRYSDEN_TOPDIR=$prefix/share/$xcrysden +-XCRYSDEN_LIB_BINDIR=$prefix/lib/$xcrysden ++XCRYSDEN_TOPDIR=/usr/share/xcrysden ++XCRYSDEN_LIB_BINDIR=/usr/lib/xcrysden + export XCRYSDEN_TOPDIR + export XCRYSDEN_LIB_BINDIR + -- cgit v1.2.3-54-g00ecf