SHA256
1
0
forked from pool/ccx

Accepting request 110513 from home:scorot

Calculix is a finite elements calculation software

OBS-URL: https://build.opensuse.org/request/show/110513
OBS-URL: https://build.opensuse.org/package/show/science/ccx?expand=0&rev=1
This commit is contained in:
Corot Sebastien 2012-03-21 22:43:06 +00:00 committed by Git OBS Bridge
commit 2941e32ce7
13 changed files with 473 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

18
ccx.changes Normal file
View File

@ -0,0 +1,18 @@
-------------------------------------------------------------------
Wed Mar 21 21:50:49 UTC 2012 - scorot@free.fr
- version 2.4
- fix documentation build on recent texlive
- change package group
- doc package is noarch for 11.3 and higher
-------------------------------------------------------------------
Fri Mar 16 22:20:23 UTC 2012 - scorot@free.fr
- update patch0 to use openblas
-------------------------------------------------------------------
Mon Mar 12 21:24:57 UTC 2012 - scorot@free.fr
- use arpack-ng instead of arpack

294
ccx.spec Normal file
View File

@ -0,0 +1,294 @@
#
# spec file for package ccx (Version 2.4)
#
#
# Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: ccx
Version: 2.4
Release: 1
Summary: An open source finite element package
License: GPLv2 and BSD and Public Domain
URL: http://www.calculix.de/
Group: Productivity/Scientific/Other
Source0: http://www.dhondt.de/ccx_%{version}.src.tar.bz2
Source1: http://www.dhondt.de/ccx_%{version}.doc.tar.bz2
Source2: http://www.dhondt.de/ccx_%{version}.test.tar.bz2
Patch0: patch-ccx-build
Patch1: patch-ccx-doc-Makefile
Patch2: patch-ccx-beamread
Patch3: patch-ccx-bufferoverrun
Patch4: patch-ccx-no-local
Patch5: patch-ccx-spooles-dynamic
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: gcc-fortran
BuildRequires: latex2html sed
BuildRequires: arpack-ng-devel openblas-devel spooles-devel
BuildRequires: fdupes
%description
CalculiX is a package designed to solve field problems.
The method used is the finite element method. So far only
structural problems can be solved but it is planned to
extend the capabilities.
%package doc
Summary: Example problems and documentation for CalculiX
Group: Productivity/Scientific/Other
%if 0%{?suse_version} > 1130
Buildarch: noarch
%endif
%description doc
CalculiX is a package designed to solve field problems.
The method used is the finite element method. %{name}-examples
contains examples problems, together with reference data
to check your installation.
%prep
%setup -c -q
%setup -D -T -a 1 -q
%setup -D -T -a 2 -q
# fixup dirs: very deep directory structure, not suitable for patching
cd ${RPM_BUILD_DIR}/%{name}-%{version}
mv CalculiX/ccx_%{version}/doc .
mv CalculiX/ccx_%{version}/src .
mv CalculiX/ccx_%{version}/test .
rmdir CalculiX/ccx_%{version}
rmdir CalculiX
cd ${RPM_BUILD_DIR}/%{name}-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%build
cd ${RPM_BUILD_DIR}/%{name}-%{version}
# use rpm's proposal for CFLAGS
export GLOBAL_OFLAGS="$RPM_OPT_FLAGS -pthread"
# and now build calculix
cd src
make %{?_smp_mflags}
# build the documentation:
cd ../doc
# This hack fixes the documentation build which fails on recent
# texlive
ln -s %{_datadir}/texmf/fonts/enc/dvips/tex-gyre/q-texnansi.enc ./texnansi.enc
make %{?_smp_mflags}
# copy central descriptions to topmost folder, for %doc directive
cd ${RPM_BUILD_DIR}/%{name}-%{version}
cp src/{BUGS,LOGBOOK,README.INSTALL,TODO} .
cp doc/*.pdf .
chmod 644 {BUGS,LOGBOOK,README.INSTALL,TODO} *.pdf
%install
cd ${RPM_BUILD_DIR}/%{name}-%{version}
rm -rf $RPM_BUILD_ROOT/*
mkdir -p $RPM_BUILD_ROOT/%{_bindir}
cp src/ccx_%{version} $RPM_BUILD_ROOT/%{_bindir}
chmod 755 $RPM_BUILD_ROOT/%{_bindir}/ccx_%{version}
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}
cp test/* $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}
chmod 644 $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}/*
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}/compare
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}/datcheck.pl
chmod 755 $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}/frdcheck.pl
# Pass rpm filelist check
rm $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}/compare.orig
%if %suse_version >= 1030
%fdupes $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}
%endif
%clean
rm -Rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%{_bindir}/ccx_%{version}
%doc BUGS
%doc LOGBOOK
%doc README.INSTALL
%doc TODO
%files doc
%defattr(-,root,root)
%doc *.pdf
%{_datadir}/%{name}-examples-%{version}
%changelog
* Thu Sep 15 2011 scorot@gtt.fr
- version 2.3
* Thu Dec 16 2010 scorot@gtt.fr
- version 2.2
* Thu Sep 07 2010 Sebastien Corot <scorot@gtt.fr> - 2.1-5
- rename package example to doc
- move pdf documentation files to package doc
- Changed package group to Productivity/Scientific/Engineering
* Tue Feb 16 2010 Manfred Spraul: <manfred@colorfullife.com>
- Switch to debian compatible spooles library layout
- 2.0-5
* Thu Feb 11 2010 Manfred Spraul: <manfred@colorfullife.com>
- use spooles from separate package
- 2.0-4
* Sat Nov 26 2009 Manfred Spraul: <manfred@colorfullife.com>
- merge I2Ohash fix from debian
* Sat Nov 26 2009 Manfred Spraul: <manfred@colorfullife.com>
- merge thermmodel bugfix from upstream
- 2.0-3
* Fri Nov 06 2009 Manfred Spraul: <manfred@colorfullife.com>
- merge frequency bugfix from upstream
- 2.0-2
* Sun Aug 16 2009 Manfred Spraul: <manfred@colorfullife.com>
- 2.0-1
- merge upstream
- remove seperate .doc package
* Sun Jul 05 2009 Manfred Spraul: <manfred@colorfullife.com>
- 1.8-5
- enable SMP for spooles
* Sun Jul 05 2009 Manfred Spraul: <manfred@colorfullife.com>
- 1.8-4
- mark examples and doc as noarch
- move README, COPYING into main package
* Sat Jul 04 2009 Manfred Spraul: <manfred@colorfullife.com>
- switch to dynamically linked ARPACK
- remove perfarch
* Mon Jun 29 2009 Manfred Spraul: <manfred@colorfullife.com>
- update to ccx 1.8
- remove sse2 arch
- ccx moved to /usr/bin
* Sun Mar 4 2007 Manfred Spraul: <manfred@colorfullife.com>
- update to ccx 1.6
* Sun Sep 4 2005 Manfred Spraul: <manfred@colorfullife.com>
- further buffer overrun fixes
* Sun Aug 14 2005 Manfred Spraul: <manfred@colorfullife.com>
- update to ccx 1.4
* Mon Aug 01 2005 Manfred Spraul <manfred@colorfullife.com>
- updates for gfortran support: no -mtune for gfortran
* Mon Mar 01 2005 Manfred Spraul <manfred@colorfullife.com>
- update 1.3 tarball: Apply fix from Guido
* Sat Feb 26 2005 Manfred Spraul <manfred@colorfullife.com>
- update to final 1.3
* Thu Feb 24 2005 Manfred Spraul <manfred@colorfullife.com>
- 1.3 test suite added
* Mon Feb 21 2005 Manfred Spraul <manfred@colorfullife.com>
- initial drop of 1.3
* Mon Aug 09 2004 Manfred Spraul <manfred@colorfullife.com>
- bugfix for calinput.f merged.
- support for special sse2 build added
* Sun Jul 25 2004 Manfred Spraul <manfred@colorfullife.com>
- support for special sse2 build added
* Sun Jul 25 2004 Manfred Spraul <manfred@colorfullife.com>
- Final 1.2 merged, tagged as ccx-1.2-1
* Mon Jul 19 2004 Manfred Spraul <manfred@colorfullife.com>
- Beta of next release merged
* Fri Jun 18 2004 Manfred Spraul <manfred@colorfullife.com>
- Beta of next release merged
- taucs removed for now - needs license cleanup
- helper function for 'SOLVER=' parsing disabled.
* Tue Sep 23 2003 Manfred Spraul <manfred@colorfullife.com>
- MODAL DYNAMIC fix with body forces from Guido merged.
* Sat Aug 30 2003 Manfred Spraul <manfred@colorfullife.com>
- taucs 2.0 sources added. It depends on other packages.
- helper function for parsing 'SOLVER=' line added.
* Sat Aug 09 2003 Manfred Spraul <manfred@colorfullife.com>
- arpack & arpackbu converted to parallel spooles
- bugfix: cpus array is 11 entries long, not 10 entries.
* Thu Aug 07 2003 Manfred Spraul <manfred@colorfullife.com>
- upgraded to ccx-1.1.
* Tue May 06 2003 Manfred Spraul <manfred@colorfullife.com>
- switched to dynamic linking. With dynamic linking enabled,
the linker detects at runtime the supported threading
library and uses the best one.
- doc package added
* Sat May 03 2003 Manfred Spraul <manfred@colorfullife.com>
- switched to nptl: locking overheat without NPTL is
nearly 20%
* Wed Mar 23 2003 Manfred Spraul <manfred@colorfullife.com>
- new glibc version
- debug symbols enabled
-* Wed Mar 05 2003 Manfred Spraul <manfred@colorfullife.com>
- prototype cleanup reenabled
- fix boundary violation
- initialize neq
* Sun Mar 01 2003 Manfred Spraul <manfred@colorfullife.com>
- Forward ported to ccx-1.0
* Sat Feb 15 2003 Manfred Spraul <manfred@colorfullife.com>
- prototype cleanup for Fortran to C interface
- ARPACK fixes that permit -ffortran-boundary-checks
* Sat Feb 08 2003 Manfred Spraul <manfred@colorfullife.com>
- parallel spooles, dynamic linking disabled.
* Fri Feb 07 2003 Manfred Spraul <manfred@colorfullife.com>
- cleanup of the spooles interface, first step towards
using parallel spooles.
* Sun Nov 24 2002 Manfred Spraul <manfred@colorfullife.com>
- add missing initialization for maxrmeminset into
allocation.f
* Wed Sep 06 2002 Manfred Spraul <manfred@colorfullife.com>
- sources & examples added into source set.
- second binary rpm for examples added
- support for cpu optimized builds
* Wed Sep 04 2002 Manfred Spraul <manfred@colorfullife.com>
- initial test version

3
ccx_2.4.doc.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:9f5c2fb6689c8d8e71a3a0c4776992da20803f5307085086337aa2b834ad598c
size 3282853

3
ccx_2.4.src.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:cadcd0d71bb54c6d61c83ce3aaa7a3fb8c8517d40db3909778797fd05e25e7a4
size 830747

3
ccx_2.4.test.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5eca6a56cd2a9a500317fe45579e92d70222f68681dbb76a58eef5b58bd83c05
size 6589894

18
patch-ccx-beamread Normal file
View File

@ -0,0 +1,18 @@
--- ccx-2.2/test/compare.orig 2010-08-01 18:27:39.000000000 +0200
+++ ccx-2.2/test/compare 2010-11-07 11:46:41.000000000 +0100
@@ -19,6 +19,15 @@
rm -f ${i%.inp}.frd
#
+# beamread test? This one is special
+#
+ if [ "$i" == "beamread.inp" ]; then
+ rm -f beamread.rin
+ rm -f beamwrite.rout
+ /usr/bin/ccx_2.4 -i beamwrite
+ mv beamwrite.rout beamread.rin
+ fi
+#
# executing CalculiX and generating the .dat and
# the .frd file
#

14
patch-ccx-bufferoverrun Normal file
View File

@ -0,0 +1,14 @@
--- ccx-orig/src/ccx_2.4.c 2005-08-12 22:39:08.000000000 +0200
+++ ccx-1.4/src/ccx_2.4.c 2005-09-04 08:26:27.000000000 +0200
@@ -103,7 +103,10 @@ else{
for(i=1;i<argc;i++){
if(strcmp1(argv[i],"-o")==0) {
- strcpy(output,argv[i+1]);break;}
+ strncpy(output,argv[i+1],sizeof(output));
+ output[sizeof(output)-1] = '\0';
+ break;
+ }
}
}

25
patch-ccx-build Normal file
View File

@ -0,0 +1,25 @@
--- ccx-2.1/src/Makefile.orig 2010-02-21 15:46:55.000000000 +0100
+++ ccx-2.1/src/Makefile 2010-03-08 21:01:00.000000000 +0100
@@ -1,6 +1,6 @@
-CFLAGS = -Wall -O -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE
-FFLAGS = -Wall -O -fopenmp
+CFLAGS = -Wall $(GLOBAL_OFLAGS) -g -DARCH="Linux" -DUSE_MT -DSPOOLES -DARPACK -DMATRIXSTORAGE -Wno-unused
+FFLAGS = -Wall $(GLOBAL_OFLAGS) -g -Wno-unused -fopenmp
CC=cc
FC=gfortran
@@ -18,11 +18,9 @@
OCCXC = $(SCCXC:.c=.o)
OCCXMAIN = $(SCCXMAIN:.c=.o)
-DIR=../../../SPOOLES.2.2
-
LIBS = \
- $(DIR)/spooles.a \
- ../../../ARPACK/libarpack_INTEL.a \
+ -lspooles \
+ -larpack -lopenblas \
-lm -lc
ccx_2.4: $(OCCXMAIN) ccx_2.4.a $(LIBS)

27
patch-ccx-doc-Makefile Normal file
View File

@ -0,0 +1,27 @@
--- ccx-1.2/doc/Makefile.old 1970-01-01 01:00:00.000000000 +0100
+++ ccx-1.2/doc/Makefile 2004-07-25 11:43:46.847888536 +0200
@@ -0,0 +1,24 @@
+#
+# Makefile for building the documentation.
+#
+
+all: ccx.pdf
+
+%.pdf: %.ps
+ ps2pdf - - < $< > $@
+
+%.ps: %.dvi
+ dvips -o $@ $<
+
+# Run latex three times: first to generate the aux & toc files
+# at the end of the 2nd run latex complains about incorrect
+# references, and after the 3rd run it's happy.
+%.dvi: %.tex
+ latex $<
+ echo "XXXX 2nd run XXXX"
+ latex $<
+ echo "XXXX 3nd run XXXX"
+ latex $<
+
+clean:
+ rm -f ccx.{pdf,dvi,ps}

11
patch-ccx-no-local Normal file
View File

@ -0,0 +1,11 @@
--- ccx-1.8/test/compare.orig 2009-06-29 22:50:57.000000000 +0200
+++ ccx-1.8/test/compare 2009-06-29 22:51:06.000000000 +0200
@@ -30,7 +30,7 @@
# the .frd file
#
- /usr/local/bin/ccx_2.4 ${i%.inp} >> $tempfile 2>&1
+ /usr/bin/ccx_2.4 ${i%.inp} >> $tempfile 2>&1
#
# check whether the .dat and .dat.ref files exist

33
patch-ccx-spooles-dynamic Normal file
View File

@ -0,0 +1,33 @@
--- ccx-2.0/src/cascade.c 2009-08-12 21:54:16.000000000 +0200
+++ sav/src/cascade.c 2010-02-11 20:02:25.000000000 +0100
@@ -21,9 +21,9 @@
#include <string.h>
#ifdef SPOOLES
-#include <misc.h>
-#include <FrontMtx.h>
-#include <SymbFac.h>
+#include <spooles/misc.h>
+#include <spooles/FrontMtx.h>
+#include <spooles/SymbFac.h>
#endif
#include "CalculiX.h"
--- ccx-2.0/src/spooles.h 2009-08-12 21:54:17.000000000 +0200
+++ sav/src/spooles.h 2010-02-11 20:01:18.000000000 +0100
@@ -21,11 +21,11 @@
* seperated from CalculiX.h: otherwise everyone would have to include
* the spooles header files
*/
-#include <misc.h>
-#include <FrontMtx.h>
-#include <SymbFac.h>
+#include <spooles/misc.h>
+#include <spooles/FrontMtx.h>
+#include <spooles/SymbFac.h>
#if USE_MT
-#include <MT/spoolesMT.h>
+#include <spooles/MT/spoolesMT.h>
#endif
/* increase this for debugging */