diff options
author | Adrian Hühn | 2016-09-06 17:14:34 +0200 |
---|---|---|
committer | Adrian Hühn | 2016-09-06 17:14:34 +0200 |
commit | d7b98b924664e4f6b37ffc24df28ca7fb0fd4a89 (patch) | |
tree | 6d0822b7d68777decdebc51457a01b3bffe09510 | |
download | aur-d7b98b924664e4f6b37ffc24df28ca7fb0fd4a89.tar.gz |
first commit
-rw-r--r-- | .SRCINFO | 28 | ||||
-rw-r--r-- | Make.sys | 64 | ||||
-rw-r--r-- | PKGBUILD | 37 | ||||
-rw-r--r-- | fix-xcrysden-install.patch | 81 |
4 files changed, 210 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c83573c74b4d --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,28 @@ +pkgbase = xcrysden + pkgdesc = crystalline and molecular structure visualisation program + pkgver = 1.5.60 + pkgrel = 1 + url = http://www.xcrysden.org/ + arch = x86_64 + license = GPL2 + depends = tk + depends = tcl + depends = gl2ps + depends = fftw + depends = bwidget + depends = imagemagick + depends = gcc-fortran + depends = glu + depends = libxmu + optdepends = openbabel + optdepends = x11-apps + replaces = xcrysden-bin + source = http://www.xcrysden.org/download/xcrysden-1.5.60.tar.gz + source = fix-xcrysden-install.patch + source = Make.sys + sha256sums = a695729f1bb3e486b86a74106c06a392c8aca048dc6b0f20785c3c311cfb2ef4 + sha256sums = 61a0bbc7728beff05bcb7f1676053de468ebb926b638869174aa2bbcb5bc554c + sha256sums = 65087f42dc08b335798b2cdeee2e3dc5ed99ef177c71dbf9c5ff3ac5039161a6 + +pkgname = xcrysden + diff --git a/Make.sys b/Make.sys new file mode 100644 index 000000000000..06a19724d1b4 --- /dev/null +++ b/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 -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/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..a06bb3b6bab1 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,37 @@ +# Maintainer: Adrian Hühn <adrian.huehn@web.de> +# Previous Maintainer: Vit <vitruss@gmail.com> + +pkgname=xcrysden +pkgver=1.5.60 +pkgrel=1 +epoch= +pkgdesc="crystalline and molecular structure visualisation program" +arch=('x86_64') +url="http://www.xcrysden.org/" +license=('GPL2') +depends=('tk' 'tcl' 'gl2ps' 'fftw' 'bwidget' 'imagemagick' 'gcc-fortran' 'glu' 'libxmu') +optdepends=('openbabel' 'x11-apps') +replaces=('xcrysden-bin') +source=("http://www.xcrysden.org/download/xcrysden-${pkgver}.tar.gz" + "fix-xcrysden-install.patch" + "Make.sys") +sha256sums=('a695729f1bb3e486b86a74106c06a392c8aca048dc6b0f20785c3c311cfb2ef4' + '61a0bbc7728beff05bcb7f1676053de468ebb926b638869174aa2bbcb5bc554c' + '65087f42dc08b335798b2cdeee2e3dc5ed99ef177c71dbf9c5ff3ac5039161a6') + + +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/fix-xcrysden-install.patch b/fix-xcrysden-install.patch new file mode 100644 index 000000000000..9d3c3f252339 --- /dev/null +++ b/fix-xcrysden-install.patch @@ -0,0 +1,81 @@ +Author: Anton Kokalj <tone.kokalj@ijs.si> +Reviewed-by: Daniel Leidert <dleidert@debian.org> +Ported to Arch Linux: Adrian Hühn <adrian.huehn@web.de> + +Forwarded: not-needed + +Author: Anton Kokalj <tone.kokalj@ijs.si> +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 <stdio.h> + #include <string.h> +-#include "togl.h" +-#include "gl2ps.h" ++#include "togl.h" ++#include <gl2ps.h> + #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 + |