SHA256
1
0
forked from pool/ccx

Accepting request 751703 from home:StefanBruens:branches:science

- update to 2.16:
  Too many changes to list, a full list of changes is
  available in the included LOGFILE.
  (boo#1146243).
- Examples/tests are now packages in the ccx-examples package
- Move docs to separate source package
- Update patches:
  * Drop (not applied) ccx-2.8-no-local-compare.patch
  * Drop ccx-1.2-doc-Makefile.patch
  * ccx-2.8-build.patch -> ccx-2.16-build.patch, foo.patch
  * ccx-2.5-abaqus-shell-heat-transfer-elements-read.patch ->
    ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch
  * ccx-2.8-spooles-dynamic.patch -> ccx-2.16-spooles-dynamic.patch

OBS-URL: https://build.opensuse.org/request/show/751703
OBS-URL: https://build.opensuse.org/package/show/science/ccx?expand=0&rev=10
This commit is contained in:
Stefan Brüns 2019-11-29 00:02:37 +00:00 committed by Git OBS Bridge
parent c6908d2fde
commit 37139b91e8
14 changed files with 102 additions and 199 deletions

View File

@ -1,27 +0,0 @@
--- 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}

View File

@ -1,8 +1,8 @@
Index: ccx-2.12/CalculiX/ccx_2.12/src/elements.f
===================================================================
--- ccx-2.12.orig/CalculiX/ccx_2.12/src/elements.f
+++ ccx-2.12/CalculiX/ccx_2.12/src/elements.f
@@ -120,7 +120,8 @@
--- a/src/elements.f
+++ b/src/elements.f
@@ -128,7 +128,8 @@
!
! removing the ABAQUS label for heat transfer elements
!
@ -11,4 +11,4 @@ Index: ccx-2.12/CalculiX/ccx_2.12/src/elements.f
+ & (label(1:7).ne.'DCOUP3D')) then
label(1:7)=label(2:8)
label(8:8)=' '
endif
!

24
ccx-2.16-build.patch Normal file
View File

@ -0,0 +1,24 @@
Index: ccx-2.12/CalculiX/ccx_2.12/src/Makefile
===================================================================
--- a/src/Makefile
+++ b/src/Makefile
@@ -1,6 +1,6 @@
-CFLAGS = -Wall -O2 -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT
-FFLAGS = -Wall -O2
+CFLAGS += -DARCH="Linux" -DUSE_MT -DSPOOLES -DARPACK -DMATRIXSTORAGE -Wno-unused
+FFLAGS += -Wno-unused
CC=cc
FC=gfortran
@@ -21,8 +21,8 @@ OCCXMAIN = $(SCCXMAIN:.c=.o)
DIR=../../../SPOOLES.2.2
LIBS = \
- $(DIR)/spooles.a \
- ../../../ARPACK/libarpack_INTEL.a \
+ -lspooles \
+ -larpack -llapack -lblas \
-lpthread -lm -lc
ccx_2.16: $(OCCXMAIN) ccx_2.16.a $(LIBS)

View File

@ -1,7 +1,7 @@
Index: ccx-2.12/CalculiX/ccx_2.12/src/cascade.c
Index: b/src/cascade.c
===================================================================
--- ccx-2.12.orig/CalculiX/ccx_2.12/src/cascade.c
+++ ccx-2.12/CalculiX/ccx_2.12/src/cascade.c
--- a/src/cascade.c
+++ b/src/cascade.c
@@ -21,9 +21,9 @@
#include <string.h>
@ -15,10 +15,10 @@ Index: ccx-2.12/CalculiX/ccx_2.12/src/cascade.c
#endif
#include "CalculiX.h"
Index: ccx-2.12/CalculiX/ccx_2.12/src/spooles.h
Index: b/src/spooles.h
===================================================================
--- ccx-2.12.orig/CalculiX/ccx_2.12/src/spooles.h
+++ ccx-2.12/CalculiX/ccx_2.12/src/spooles.h
--- a/src/spooles.h
+++ b/src/spooles.h
@@ -23,11 +23,11 @@
*/

View File

@ -1,59 +0,0 @@
Index: ccx-2.12/CalculiX/ccx_2.12/src/Makefile
===================================================================
--- ccx-2.12.orig/CalculiX/ccx_2.12/src/Makefile
+++ ccx-2.12/CalculiX/ccx_2.12/src/Makefile
@@ -1,6 +1,6 @@
-CFLAGS = -Wall -O3 -fopenmp -I ../../../SPOOLES.2.2 -DARCH="Linux" -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT
-FFLAGS = -Wall -O3 -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
@@ -21,8 +21,8 @@ OCCXMAIN = $(SCCXMAIN:.c=.o)
DIR=../../../SPOOLES.2.2
LIBS = \
- $(DIR)/spooles.a \
- ../../../ARPACK/libarpack_INTEL.a \
+ -lspooles \
+ -larpack -llapack -lblas \
-lpthread -lm -lc
ccx_2.12: $(OCCXMAIN) ccx_2.12.a $(LIBS)
--- ccx-2.12/CalculiX/ccx_2.12/src/mafilltcompmain.c.orig 2017-07-20 01:40:53.300552079 +0200
+++ ccx-2.12/CalculiX/ccx_2.12/src/mafilltcompmain.c 2017-07-20 01:42:31.516556093 +0200
@@ -150,7 +150,7 @@
body1,volume1,ielfa1,lakonf1,ifabou1,
nbody1,neq1,dtimef1,velo1,veloo1,cvfa1,hcfa1,cvel1,
gradvel1,xload1,gammat1,xrlfa1,xxj1,nactdohinv1,
- a11,a21,a31,flux1,&nefa,&nefb,iau61,xxni1,xxnj1));
+ a11,a21,a31,flux1,&nefa,&nefb,(void*)iau61,xxni1,xxnj1));
return NULL;
}
--- ccx-2.12/CalculiX/ccx_2.12/src/steadystate.c.orig 2017-07-20 01:45:15.689465570 +0200
+++ ccx-2.12/CalculiX/ccx_2.12/src/steadystate.c 2017-07-20 01:46:12.869467908 +0200
@@ -1777,8 +1777,8 @@
xforc,nforc,thicke,shcon,nshcon,
sideload,xload,xloadold,&icfd,inomat,pslavsurf,pmastsurf,
&mortar,islavact,cdn,islavnode,nslavnode,&ntie,clearini,
- islavsurf,ielprop,prop,energyini,energy,&iit,iponoel,
- inoel,nener,orname,network);}
+ islavsurf,ielprop,prop,energyini,energy,&iit,iponoel,
+ inoel,nener,orname,(void*)network);}
else{
/* calculating displacements/temperatures */
@@ -2808,8 +2808,8 @@
thicke,shcon,nshcon,
sideload,xload,xloadold,&icfd,inomat,pslavsurf,pmastsurf,
&mortar,islavact,cdn,islavnode,nslavnode,&ntie,clearini,
- islavsurf,ielprop,prop,energyini,energy,&iit,iponoel,
- inoel,nener,orname,network);
+ islavsurf,ielprop,prop,energyini,energy,&iit,iponoel,
+ inoel,nener,orname,(void*)network);
(*kode)++;
mode=-1;

View File

@ -1,25 +0,0 @@
--- ccx_2.6/test/compare.orig 2013-07-09 18:35:53.000000000 +0200
+++ ccx_2.6/test/compare 2013-07-11 21:54:30.000000000 +0200
@@ -19,11 +19,21 @@
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.5 -i beamwrite
+ mv beamwrite.rout beamread.rin
+ fi
+
+#
# executing CalculiX and generating the .dat and
# the .frd file
#
- /usr/local/bin/ccx_2.8p2 ${i%.inp} >> $tempfile 2>&1
+ /usr/bin/ccx_2.8p2 ${i%.inp} >> $tempfile 2>&1
#
# check whether the .dat and .dat.ref files exist

2
ccx-rpmlintrc Normal file
View File

@ -0,0 +1,2 @@
# Zero length reference files
addFilter("ccx-examples.noarch: W: zero-length /usr/share/ccx-examples-.*/.*.ref")

View File

@ -1,3 +1,20 @@
-------------------------------------------------------------------
Thu Nov 28 13:07:58 UTC 2019 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- update to 2.16:
Too many changes to list, a full list of changes is
available in the included LOGFILE.
(boo#1146243).
- Examples/tests are now packages in the ccx-examples package
- Move docs to separate source package
- Update patches:
* Drop (not applied) ccx-2.8-no-local-compare.patch
* Drop ccx-1.2-doc-Makefile.patch
* ccx-2.8-build.patch -> ccx-2.16-build.patch, foo.patch
* ccx-2.5-abaqus-shell-heat-transfer-elements-read.patch ->
ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch
* ccx-2.8-spooles-dynamic.patch -> ccx-2.16-spooles-dynamic.patch
-------------------------------------------------------------------
Wed Jul 19 23:23:47 UTC 2017 - adrian@suse.de

112
ccx.spec
View File

@ -1,7 +1,7 @@
#
# spec file for package ccx
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2019 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,37 +12,31 @@
# 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/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: ccx
Version: 2.12
Version: 2.16
Release: 0
Summary: An open source finite element package
License: GPL-2.0 and BSD-3-Clause and SUSE-Public-Domain
License: GPL-2.0-only AND BSD-3-Clause AND SUSE-Public-Domain
Group: Productivity/Scientific/Other
Url: http://www.calculix.de/
URL: http://www.dhondt.de/
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: ccx-2.8-build.patch
Patch1: ccx-1.2-doc-Makefile.patch
Patch3: ccx-2.8-spooles-dynamic.patch
Patch4: ccx-2.5-abaqus-shell-heat-transfer-elements-read.patch
Source1: http://www.dhondt.de/ccx_%{version}.test.tar.bz2
Source2: ccx-rpmlintrc
# PATCH-FIX-OPENSUSE -- pass global optflags
Patch0: ccx-2.16-build.patch
Patch1: ccx-2.16-spooles-dynamic.patch
Patch2: ccx-2.16-abaqus-shell-heat-transfer-elements-read.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: arpack-ng-devel
BuildRequires: fdupes
BuildRequires: gcc-fortran
BuildRequires: lapack-devel
BuildRequires: latex2html
BuildRequires: sed
BuildRequires: spooles-devel
%if 0%{?suse_version} > 1220
BuildRequires: tex(pst-tools.tex)
BuildRequires: texlive-pstricks
BuildRequires: texlive-dvips
%endif
%description
CalculiX is a package designed to solve field problems.
@ -50,14 +44,14 @@ 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
%package examples
Summary: Example problems for CalculiX
Group: Productivity/Scientific/Other
%if 0%{?suse_version} > 1130
BuildArch: noarch
%endif
Conflicts: ccx-doc < 2.16
Provides: ccx-doc:%{_datadir}/%{name}-examples-2.12/achtel2.inp
%description doc
%description examples
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
@ -65,74 +59,54 @@ to check your installation.
%prep
%setup -c -q
%patch0 -p1
%setup -D -T -a 1 -q
%setup -D -T -a 2 -q
%patch1 -p1
%patch3 -p1
%patch4 -p1
# fixup dirs: very deep directory structure, not suitable for patching
cd ${RPM_BUILD_DIR}/%{name}-%{version}
mv CalculiX/ccx_%{version}/doc/* doc/
mv CalculiX/ccx_%{version}/src .
mv CalculiX/ccx_%{version}/test .
rmdir CalculiX/ccx_%{version}/doc
rmdir CalculiX/ccx_%{version}
rmdir CalculiX
mv CalculiX/ccx_%{version}/{src,test} ./
rmdir -p CalculiX/ccx_%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
%build
cd ${RPM_BUILD_DIR}/%{name}-%{version}
# use rpm's proposal for CFLAGS
export GLOBAL_OFLAGS="$RPM_OPT_FLAGS -pthread"
export GLOBAL_OFLAGS="%{optflags} -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 %{buildroot}/%{_bindir}
cp src/ccx_%{version} %{buildroot}/%{_bindir}
chmod 755 %{buildroot}/%{_bindir}/ccx_%{version}
# symlink needed or apps like FreeCAD won't find it
ln -s ccx_%{version} $RPM_BUILD_ROOT/%{_bindir}/ccx
ln -s ccx_%{version} %{buildroot}/%{_bindir}/ccx
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
mkdir -p %{buildroot}/%{_datadir}/%{name}-examples-%{version}
cp test/* %{buildroot}/%{_datadir}/%{name}-examples-%{version}
chmod 644 %{buildroot}/%{_datadir}/%{name}-examples-%{version}/*
chmod 755 %{buildroot}/%{_datadir}/%{name}-examples-%{version}/compare
chmod 755 %{buildroot}/%{_datadir}/%{name}-examples-%{version}/datcheck.pl
chmod 755 %{buildroot}/%{_datadir}/%{name}-examples-%{version}/frdcheck.pl
chmod 755 %{buildroot}/%{_datadir}/%{name}-examples-%{version}/compare_valgrind_leaks
%fdupes $RPM_BUILD_ROOT/%{_datadir}/%{name}-examples-%{version}
chmod 444 src/BUGS src/LOGBOOK src/README.INSTALL src/TODO
%fdupes %{buildroot}/%{_datadir}/%{name}-examples-%{version}
%check
# TODO
%files
%defattr(-,root,root)
%{_bindir}/ccx
%{_bindir}/ccx_%{version}
%doc BUGS
%doc LOGBOOK
%doc README.INSTALL
%doc TODO
%doc src/BUGS src/LOGBOOK src/README.INSTALL src/TODO
%files doc
%files examples
%defattr(-,root,root)
%doc *.pdf
%{_datadir}/%{name}-examples-%{version}
%changelog

View File

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

View File

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

View File

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

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

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

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

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