[140738] trunk/dports/science
dstrubbe at macports.org
dstrubbe at macports.org
Thu Oct 1 12:52:13 PDT 2015
Revision: 140738
https://trac.macports.org/changeset/140738
Author: dstrubbe at macports.org
Date: 2015-10-01 12:52:13 -0700 (Thu, 01 Oct 2015)
Log Message:
-----------
xcrysden: new port. Closes ticket #41320.
Added Paths:
-----------
trunk/dports/science/xcrysden/
trunk/dports/science/xcrysden/Portfile
trunk/dports/science/xcrysden/files/
trunk/dports/science/xcrysden/files/patch-Makefile.diff
trunk/dports/science/xcrysden/files/patch-Tcl-Viewer.tcl.diff
trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Main.tcl.diff
trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Multi.tcl.diff
trunk/dports/science/xcrysden/files/patch-Tcl-wnOpen.tcl.diff
trunk/dports/science/xcrysden/files/patch-tests-crystals.tcl.diff
Added: trunk/dports/science/xcrysden/Portfile
===================================================================
--- trunk/dports/science/xcrysden/Portfile (rev 0)
+++ trunk/dports/science/xcrysden/Portfile 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,121 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+PortGroup active_variants 1.1
+PortGroup compilers 1.0
+
+name xcrysden
+version 1.5.60
+categories science
+platforms darwin
+license GPL-2+
+maintainers dstrubbe
+
+description X-windows CRYstalline Structures and DENsities
+
+long_description XCrySDen is a crystalline and molecular structure visualisation program aiming at display of \
+ isosurfaces and contours, which can be superimposed on crystalline structures and interactively \
+ rotated and manipulated.
+
+homepage http://www.xcrysden.org/
+master_sites ${homepage}/download
+
+checksums rmd160 2473752e074b2877df890b232cdc7bd02580a9e5 \
+ sha1 388cf837aa757e612f36a12eb7fb592c36cfd6f3
+
+compilers.choose fc
+compilers.setup require_fortran
+
+require_active_variants tk x11
+
+depends_lib port:fftw-3 port:mesa port:tcl port:tk \
+ port:xorg-libXmu port:xorg-libX11 port:xorg-libXext
+depends_run port:BWidget
+
+set prefix_share ${prefix}/share/${distname}
+notes "You can test this installation via the command:" \
+ "XCRYSDEN_TOPDIR=${prefix_share} XCRYSDEN_SCRATCH=/tmp ${prefix_share}/tests/run_test.sh structures" \
+ "Additional functionality can be enabled by installing any of these ports, detected at runtime:" \
+ "netpbm (for ppmtompeg), openbabel, whirlgif, imagemagick, mplayer (for mencoder), gifsicle."
+
+# Package ImageMagick's convert: /opt/local/bin/convert
+# Package ImageMagick's import: /opt/local/bin/import
+# Package Gifsicle: /opt/local/bin/gifsicle
+# Package Whirlgif: /opt/local/bin/whirlgif
+# Package Mencoder: /opt/local/bin/mencoder
+# Package Ppmtompeg: /opt/local/bin/ppmtompeg
+# Package Babel: /opt/local/bin/babel
+# Package Xwd: /opt/X11/bin/xwd
+
+# Patched issues:
+# Makefile did not respect DESTDIR, or install tests, or allow use of external BWidget
+# CRYSTAL tests should only be run if CRYSTAL package is available
+# WIEN2K conversion (str2xcr) wrote into working directory not scratch
+# last 3 are to fix this error that would happen with Mesa versions later than 7.0.2:
+# X Error of failed request: BadWindow (invalid Window parameter)
+# Major opcode of failed request: 3
+# ResourceID in failed request: 0xffffffff
+# Serial number of failed request: 567
+# X Error of failed request: BadWindow (invalid Window parameter)
+# Major opcode of failed request: 3
+# ResourceID in failed request: 0xffffffff
+# Serial number of failed request: 569
+
+patchfiles patch-Makefile.diff \
+ patch-tests-crystals.tcl.diff \
+ patch-Tcl-wnOpen.tcl.diff \
+ patch-Tcl-Viewer.tcl.diff \
+ patch-Tcl-fs-FS_Main.tcl.diff \
+ patch-Tcl-fs-FS_Multi.tcl.diff
+
+configure {
+ system -W ${worksrcpath} "echo '
+CC=${configure.cc}
+CFLAGS=-O3 -DUSE_INTERP_RESULT
+FC=${configure.fc}
+FFLAGS=-O3
+COMPILE_TCLTK=no
+COMPILE_MESA=no
+COMPILE_FFTW=no
+FFTW3_LIB=${prefix}/lib/libfftw3.dylib
+X_LIB=${prefix}/lib/libXmu.dylib ${prefix}/lib/libX11.dylib ${prefix}/lib/libXext.dylib
+TK_LIB=${prefix}/lib/libtk.dylib
+TCL_LIB=${prefix}/lib/libtcl.dylib
+GL_LIB=${prefix}/lib/libGL.dylib
+GLU_LIB=${prefix}/lib/libGLU.dylib
+GL_INCDIR=-I${prefix}/include/mesa
+FFTW3_INCDIR=-I${prefix}/include' > Make.sys"
+}
+
+test {
+ ui_error "The normal test infrastructure cannot be used because tests for this port need to use X11."
+ ui_error "You can test this installation by hand via the command:"
+ ui_error "XCRYSDEN_TOPDIR=${prefix_share} XCRYSDEN_SCRATCH=/tmp ${prefix_share}/tests/run_test.sh structures"
+ return -code error "Test can only be run by hand."
+}
+
+use_parallel_build yes
+universal_variant no
+
+build.target xcrysden
+
+destroot.env prefix=${prefix}
+
+# replace path to where XCrySDen would install BWidget itself
+post-build {
+ reinplace -W ${worksrcpath}/Tcl "s|\$system(TOPDIR)/external/lib/bwidget-\*|${prefix}/lib/BWidget|" xcInit.tcl
+}
+
+# Doesn't work to run test, I guess X11 display cannot be used in that. Error message:
+# cannot application-specific initialization failed: couldn't connect to display "/tmp/launch-TfisC0/org.macosforge.xquartz:0"
+# See way to run by hand in notes above.
+
+#test {
+# xinstall -W ${worksrcpath} C/xcrys bin/xcrys
+# system -W ${worksrcpath}/tests "sh run_test.sh structures"
+#}
+
+livecheck.type regex
+livecheck.url [lindex ${master_sites} 0]
+livecheck.regex xcrysden-(\[0-9.\]+)${extract.suffix}
Property changes on: trunk/dports/science/xcrysden/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: trunk/dports/science/xcrysden/files/patch-Makefile.diff
===================================================================
--- trunk/dports/science/xcrysden/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/science/xcrysden/files/patch-Makefile.diff 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,65 @@
+--- Makefile.orig 2015-10-01 14:38:39.000000000 -0400
++++ Makefile 2015-10-01 14:45:53.000000000 -0400
+@@ -16,8 +16,8 @@
+
+ # some varibales ...
+
+-all: tcl tk mesa fftw meschach xcrysden
+-xcrysden: usage bwidget bindir src-C src-F src-Tcl
++all: tcl tk mesa fftw meschach bwidget xcrysden
++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
+@@ -230,35 +230,37 @@
+ version := $(shell cat version)
+ xcrysden = xcrysden-$(version)
+
++dprefix=$(DESTDIR)/$(prefix)
++
+ install: xcrysden
+ @echo
+ @echo "#-----"
+ @echo "# "
+- @echo "# Installing XCRYSDEN to: $(prefix)"
++ @echo "# Installing XCRYSDEN to: $(dprefix)"
+ @echo "# "
+ @echo "#-----"
+ @echo
+- install -m755 -d $(prefix)/share/$(xcrysden)
+- cp -a $(IRON_ITEMS) $(prefix)/share/$(xcrysden)
++ install -m755 -d $(dprefix)/share/$(xcrysden)
++ cp -a $(IRON_ITEMS) $(dprefix)/share/$(xcrysden)
+ \
+- for subdir in Awk examples $(EXTERNAL_LIB_BWIDGET) images scripts Tcl util; do \
++ for subdir in Awk examples images scripts Tcl util tests; do \
+ if test -d $$subdir; then \
+- install -m755 -d $(prefix)/share/$(xcrysden)/$$subdir; \
+- cp -a $$subdir/* $(prefix)/share/$(xcrysden)/$$subdir; \
++ install -m755 -d $(dprefix)/share/$(xcrysden)/$$subdir; \
++ cp -a $$subdir/* $(dprefix)/share/$(xcrysden)/$$subdir; \
+ fi; \
+ done
+ \
+- install -m755 -d $(prefix)/share/man/man1
+- install -m644 $(MAN_FILES) $(prefix)/share/man/man1/
+- gzip -f $(addprefix $(prefix)/share/man/man1/,$(MAN_PAGES))
++ install -m755 -d $(dprefix)/share/man/man1
++ install -m644 $(MAN_FILES) $(dprefix)/share/man/man1/
++ gzip -f $(addprefix $(dprefix)/share/man/man1/,$(MAN_PAGES))
+ \
+- install -m755 -d $(prefix)/lib/$(xcrysden)
+- install -m755 bin/* $(prefix)/lib/$(xcrysden)/
++ install -m755 -d $(dprefix)/lib/$(xcrysden)
++ install -m755 bin/* $(dprefix)/lib/$(xcrysden)/
+ \
+- prefix=$(prefix) xcrysden=$(xcrysden) sh sys_utils/wrappers.sh
+- if test ! -d $(prefix)/bin; then install -m755 -d $(prefix)/bin; fi
++ prefix=$(dprefix) xcrysden=$(xcrysden) sh sys_utils/wrappers.sh
++ if test ! -d $(dprefix)/bin; then install -m755 -d $(dprefix)/bin; fi
+ for prog in $(PROGS); do \
+- install -m755 $$prog.wrapper $(prefix)/bin/$$prog; \
++ install -m755 $$prog.wrapper $(dprefix)/bin/$$prog; \
+ done
+
+
Added: trunk/dports/science/xcrysden/files/patch-Tcl-Viewer.tcl.diff
===================================================================
--- trunk/dports/science/xcrysden/files/patch-Tcl-Viewer.tcl.diff (rev 0)
+++ trunk/dports/science/xcrysden/files/patch-Tcl-Viewer.tcl.diff 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,11 @@
+--- Tcl/Viewer.tcl.orig 2015-10-01 13:46:22.000000000 -0400
++++ Tcl/Viewer.tcl 2015-10-01 13:47:26.000000000 -0400
+@@ -480,7 +480,7 @@
+ -double true \
+ -depth true \
+ -depthsize 1 \
+- -accum true \
++ -accum false \
+ -accumredsize 1 \
+ -accumgreensize 1 \
+ -accumbluesize 1 \
Added: trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Main.tcl.diff
===================================================================
--- trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Main.tcl.diff (rev 0)
+++ trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Main.tcl.diff 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,18 @@
+--- Tcl/fs/FS_Main.tcl.orig 2015-10-01 13:47:51.000000000 -0400
++++ Tcl/fs/FS_Main.tcl 2015-10-01 13:48:10.000000000 -0400
+@@ -111,7 +111,7 @@
+ -double true \
+ -depth true \
+ -depthsize 1 \
+- -accum true \
++ -accum false \
+ -accumredsize 1 \
+ -accumgreensize 1 \
+ -accumbluesize 1 \
+@@ -1356,4 +1356,4 @@
+ FS_fsConfig $i $spin
+ }
+ }
+-}
+\ No newline at end of file
++}
Added: trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Multi.tcl.diff
===================================================================
--- trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Multi.tcl.diff (rev 0)
+++ trunk/dports/science/xcrysden/files/patch-Tcl-fs-FS_Multi.tcl.diff 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,11 @@
+--- Tcl/fs/FS_Multi.tcl.orig 2015-10-01 13:48:01.000000000 -0400
++++ Tcl/fs/FS_Multi.tcl 2015-10-01 13:48:21.000000000 -0400
+@@ -57,7 +57,7 @@
+ -double true \
+ -depth true \
+ -depthsize 1 \
+- -accum true \
++ -accum false \
+ -accumredsize 1 \
+ -accumgreensize 1 \
+ -accumbluesize 1 \
Added: trunk/dports/science/xcrysden/files/patch-Tcl-wnOpen.tcl.diff
===================================================================
--- trunk/dports/science/xcrysden/files/patch-Tcl-wnOpen.tcl.diff (rev 0)
+++ trunk/dports/science/xcrysden/files/patch-Tcl-wnOpen.tcl.diff 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,23 @@
+--- Tcl/wnOpen.tcl.orig 2013-11-10 23:19:33.000000000 -0500
++++ Tcl/wnOpen.tcl 2013-11-10 23:54:15.000000000 -0500
+@@ -76,14 +76,16 @@
+ #########################################################
+ # get the filehead out of filename (case.struct --> case)
+ set pwd [pwd]
+- cd [file dirname $file]
++ file copy $file $system(SCRDIR)
++ cd $system(SCRDIR)
+ set filehead [file tail [FileHead $file]]
+ if { [catch {exec $system(FORDIR)/str2xcr $filehead}] } {
+- ErrorDialog "error while executing \"str2xcr\" program"
++ set mypwd [pwd]
++ ErrorDialog "error while executing $system(FORDIR)/str2xcr $filehead in $mypwd"
+ return
+ }
+- # now copy $filehead.xcr to $system(SCRDIR)/xc_str2xcr.$$
+- file rename -force ${filehead}.xcr $system(SCRDIR)/xc_str2xcr.$system(PID)
++ # now copy $filehead.xcr to xc_str2xcr.$$
++ file rename -force ${filehead}.xcr xc_str2xcr.$system(PID)
+ cd $pwd
+
+ #
Added: trunk/dports/science/xcrysden/files/patch-tests-crystals.tcl.diff
===================================================================
--- trunk/dports/science/xcrysden/files/patch-tests-crystals.tcl.diff (rev 0)
+++ trunk/dports/science/xcrysden/files/patch-tests-crystals.tcl.diff 2015-10-01 19:52:13 UTC (rev 140738)
@@ -0,0 +1,30 @@
+--- tests/crystals.tcl.orig 2013-11-11 00:23:27.000000000 -0500
++++ tests/crystals.tcl 2013-11-11 00:17:15.000000000 -0500
+@@ -6,10 +6,6 @@
+
+ {scripting::filter::pwscfOutput -oc $env(XCRYSDEN_TOPDIR)/examples/PWSCF_files/EthAl001-2x2.out 2 {1 13 2 6 3 1}}
+
+- {scripting::filter::crystalInput $env(XCRYSDEN_TOPDIR)/examples/CRYSTALxx_input_files/argonite.r1}
+- {scripting::filter::crystalInput $env(XCRYSDEN_TOPDIR)/examples/CRYSTALxx_input_files/Pt322.r1}
+- {scripting::filter::crystalInput $env(XCRYSDEN_TOPDIR)/examples/CRYSTALxx_input_files/polymer.r1}
+-
+ {scripting::filter::fhiInpini $env(XCRYSDEN_TOPDIR)/examples/FHI98MD_files/GaAs_inp.ini 3 {Gallium 31 Arsenic 33}}
+ {scripting::filter::fhiCoord $env(XCRYSDEN_TOPDIR)/examples/FHI98MD_files/GaAsSurface_coord.out 2 {
+ Gallium 31 Arsenic 33 hy_1.25 1 hy_0.75 1}
+@@ -21,6 +17,16 @@
+ } {
+ eval scripting::exec $job
+ }
++
++ if { $system(c95_exist) != 0 } {
++ foreach job {
++ {scripting::filter::crystalInput $env(XCRYSDEN_TOPDIR)/examples/CRYSTALxx_input_files/argonite.r1}
++ {scripting::filter::crystalInput $env(XCRYSDEN_TOPDIR)/examples/CRYSTALxx_input_files/Pt322.r1}
++ {scripting::filter::crystalInput $env(XCRYSDEN_TOPDIR)/examples/CRYSTALxx_input_files/polymer.r1}
++ } {
++ eval scripting::exec $job
++ }
++ }
+ } {
+
+ #if { [xcIsActive c95] } {
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20151001/3900ef91/attachment.html>
More information about the macports-changes
mailing list