the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: xcrysden
Version: 1.5.24
Revision: 4
Description: Crystalline/molecular structure visualisation
License: GPL
Maintainer: Hanspeter Niederstrasser
Depends: <<
fftw3-shlibs,
gcc47-shlibs,
mesa-shlibs,
meschach-shlibs,
tcltk-shlibs,
x11-shlibs
<<
BuildDepends: <<
fftw3,
fink-package-precedence,
gcc47,
mesa,
meschach,
tcltk-dev,
x11-dev
<<
Recommends: <<
afni,
imagemagick,
mplayer,
netpbm-bin,
openbabel
<<
Source: http://www.xcrysden.org/download/xc-%v-src.tar.gz
Source-MD5: 3bc1a8e0cb8c3c6ba5f4d34062177e2e
SourceDirectory: XCrySDen-%v-src
PatchFile: %n.patch
PatchFile-MD5: c244b2c1beee933845aab9d6439812d8
PatchScript: <<
#!/bin/sh -ev
### Patch and them move Make.sys so future changes are noticed when patch fails
### x86_64 has tcltk 8.5; i386/ppc has 8.4
if [ "%m" = "x86_64" ]; then
export TCL_VERSION=8.5
else
export TCL_VERSION=8.4
fi
sed -e 's|@FINKPREFIX@|%p|g' -e "s|@TCL_VERSION@|$TCL_VERSION|g" < %{PatchFile} | patch -p1
cp system/Make.macosx-x11 Make.sys
<<
UseMaxBuildJobs: false
CompileScript: <<
make all
fink-package-precedence --depfile-ext='\.d' .
<<
InstallScript: <<
#!/bin/sh -ev
mkdir -p %i/lib/xcrysden/{bin,docs,examples,external,images,scripts,sys_utils,Tcl,util}
cp -R Awk bin docs examples external images scripts sys_utils Tcl util %i/lib/xcrysden/
cp xcConfigure{,.sh} %i/lib/xcrysden
cp xcrysden %i/lib/xcrysden
cp version %i/lib/xcrysden
### place a symlink in %p/bin for main executable
mkdir -p %i/bin
ln -s %p/lib/%n/xcrysden %i/bin/xcrysden
<<
DocFiles: AUTHORS COPYING COPYRIGHT ChangeLog NEWS README THANKS usage
RuntimeVars: <<
XCRYSDEN_TOPDIR: %p/lib/%n
<<
Homepage: http://www.xcrysden.org/
DescDetail: <<
XCrySDen is a crystalline and molecular structure visualisation
program, which aims at display of isosurfaces and contours, which
can be superimposed on crystalline structures and interactively
rotated and manipulated.
<<
DescUsage: <<
First use
---------
Run the script "%p/lib/%n/xcConfigure %p/lib/%n" to setup Xcrysden.
This will create settings and scratch folders and modify ~/.bashrc
with needed settings. The location of the scratch folder can be
modified by setting XCRYSDEN_SCRATCH in ~/.bashrc or another
startup script.
Normal use
----------
%p/bin/xcrysden
<<
DescPackaging: <<
o Needs non Apple-mesa.
o All folders need to be together, so send to %p/lib/%n and link
main executable in %p/bin for ease of use
<<
diff -ruN XCrySDen-1.5.24-src-orig/system/Make.macosx-x11 XCrySDen-1.5.24-src/system/Make.macosx-x11
--- XCrySDen-1.5.24-src-orig/system/Make.macosx-x11 2008-12-22 10:44:52.000000000 -0500
+++ XCrySDen-1.5.24-src/system/Make.macosx-x11 2012-01-10 20:49:09.000000000 -0500
@@ -34,14 +34,13 @@
#------------------------------------------------------------------------
# compilers & flags
#------------------------------------------------------------------------
-CFLAGS = -ansi -funroll-loops -fPIC -DHAVE_NO_GETLINE
-CC = gcc
+CFLAGS = -ansi -funroll-loops -fPIC -DXC_HAVE_NO_GETLINE -MD
+CC = gcc-4
#LDLIB = -ldl
MATH = -lm
FFLAGS = -O2
-FC = g77
-
+FC = gfortran
#------------------------------------------------------------------------
# X-libraries & include files
@@ -51,11 +50,19 @@
# NOTE: Use the XDarwin server instead of Apple's Xserver
-DARWIN_X11_PREFIX = /usr/X11R6-darwin
+DARWIN_X11_PREFIX = /usr/X11R6
X_LIB = -L$(DARWIN_X11_PREFIX)/lib -lXmu -lX11 -lXext
X_INCDIR = -I$(DARWIN_X11_PREFIX)/include
+#------------------------------------------------------------------------
+# Flags for external libraries
+#------------------------------------------------------------------------
+
+FFTW3_INCDIR = -I@FINKPREFIX@/include
+MESCHACH_INCDIR = -I@FINKPREFIX@/include
+FFTW3_LIB = -L@FINKPREFIX@/lib -lfftw3
+MESCHACH_LIB = -L@FINKPREFIX@/lib -lmeschach
###
### use EITHER THIS:
@@ -75,22 +82,27 @@
# Libraries (use .a for static and .dylib for dynamic libraries)
#
# Note: use the darwin OpenGL libraries
-TCL_LIB = -ltcl8.5.dylib
-TK_LIB = -ltk8.5.dylib
-GLU_LIB = -L$(DARWIN_X11_PREFIX)/lib -lGLU.dylib
-GL_LIB = -lGL.dylib
+TCL_LIB = -L@FINKPREFIX@/lib -ltcl@TCL_VERSION@
+TK_LIB = -L@FINKPREFIX@/lib -ltk@TCL_VERSION@
+## GL that comes with Apple's X11 leads to runtime crash
+#GLU_LIB = -L$(DARWIN_X11_PREFIX)/lib -lGLU
+#GL_LIB = -L$(DARWIN_X11_PREFIX)/lib -lGL
+GLU_LIB = -L@FINKPREFIX@/lib/mesa -lGLU
+GL_LIB = -L@FINKPREFIX@/lib/mesa -lGL
#
# Include directories (set accoring to your needs)
#
-TCL_INCDIR = \
- -I/Library/Frameworks/Tcl.framework/Versions/8.5/Headers \
- -I/Library/Frameworks/Tcl.framework/Versions/8.5/PrivateHeaders
-TK_INCDIR = \
- -I/Library/Frameworks/Tk.framework/Versions/8.5/Headers \
- -I/Library/Frameworks/Tk.framework/Versions/8.5/PrivateHeaders
+TCL_INCDIR = -I@FINKPREFIX@/include
+TK_INCDIR = -I@FINKPREFIX@/include
+#TCL_INCDIR = \
+ -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/Headers \
+ -I/System/Library/Frameworks/Tcl.framework/Versions/8.5/PrivateHeaders
+#TK_INCDIR = \
+ -I/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers \
+ -I/System/Library/Frameworks/Tk.framework/Versions/8.5/PrivateHeaders
GL_INCDIR = \
- -I$(DARWIN_X11_PREFIX)/include
+ -I@FINKPREFIX@/include/mesa
#------------------------------------------------------------------------