Github messages for voidlinux
 help / color / mirror / Atom feed
From: Phicem <Phicem@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] [WIP] CalculiX-2.20
Date: Mon, 31 Oct 2022 15:17:08 +0100	[thread overview]
Message-ID: <20221031141708.YdU8OhFQ8JR6aAE4tohV4UMMBHRwaei1I0uQIdhR9K0@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-39984@inbox.vuxu.org>

[-- Attachment #1: Type: text/plain, Size: 1736 bytes --]

There is an updated pull request by Phicem against master on the void-packages repository

https://github.com/Phicem/void-packages CalculiX-2.20
https://github.com/void-linux/void-packages/pull/39984

[WIP] CalculiX-2.20
### NEW PACKAGE - CalculiX

This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**

CalculiX is a 3D finite element program. It is an optional but important dependency of FreeCAD (for mechanical and thermal calculations). This PR is related to issue https://github.com/void-linux/void-packages/issues/5603.

CalculiX is split in two parts: the solver (CalculiX-ccx) and the graphical interface and pre/post-processing (CalculiX-cgx).

This PR includes 4 packages, each in a separate commit:
- spooles (build dependency for CalculiX-ccx)
- CalculiX-ccx
- CalculiX-cgx (including tetgen binary)
- CalculiX meta-package (which brings CalculiX-ccx and CalculiX-cgx)


### Tests
#### Local build testing
- Native x86_64 (glibc and musl): **OK**
- Native i686 (glibc) (from an x86_64 machine) : **OK**
- Native armv7l (glibc): **OK TBC**

#### Cross build testing (from x86_64 machine)
- Cross-compiling to armv7l: **OK** (requires using `./xbps-src binary-boostrap i686` on an x86_64 system, otherwise it fails)
- Cross-compiling to aarch64: **OK**

#### Runtime testing
- On x86_64 (glibc): **OK** (for CalculiX-ccx: some calculation tests differ from the official reference results files)
- On armv7l: **OK TBC** (for CalculiX-ccx: only basic tests have been run)
- On i686: **NOT TESTED** 



A patch file from https://github.com/void-linux/void-packages/pull/39984.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-CalculiX-2.20-39984.patch --]
[-- Type: text/x-diff, Size: 7673 bytes --]

From 0394931310004016b7275480b50765f416fbdcc7 Mon Sep 17 00:00:00 2001
From: Phicem <phicem@gmx.com>
Date: Sun, 16 Oct 2022 13:55:37 +0200
Subject: [PATCH 1/5] New package: spooles-2.2

---
 srcpkgs/spooles/template | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 srcpkgs/spooles/template

diff --git a/srcpkgs/spooles/template b/srcpkgs/spooles/template
new file mode 100644
index 000000000000..65ea946085e5
--- /dev/null
+++ b/srcpkgs/spooles/template
@@ -0,0 +1,24 @@
+# Template file for 'spooles'
+pkgname=spooles
+version=2.2
+revision=1
+create_wrksrc=yes
+build_style="gnu-makefile"
+make_build_target="lib"
+hostmakedepends="perl"
+short_desc="SParse Object Oriented Linear Equations Solver"
+maintainer="Phicem <phicem@gmx.com>"
+license="Public Domain"
+homepage="https://netlib.org/linalg/spooles/spooles.2.2.html"
+distfiles="https://netlib.org/linalg/spooles/spooles.${version}.tgz"
+checksum=a84559a0e987a1e423055ef4fdf3035d55b65bbe4bf915efaa1a35bef7f8c5dd
+
+do_install() {
+	vinstall spooles.a 644 usr/lib
+	for file in *.h; do
+		vinstall ${file} 644 usr/include/$pkgname
+	done
+	for file in */*.h; do
+		vinstall ${file} 644 "usr/include/$pkgname/$(dirname $file)"
+	done
+}

From 58afeb43d1ac13bbe38801e64eafb3e89b389c67 Mon Sep 17 00:00:00 2001
From: Phicem <phicem@gmx.com>
Date: Sun, 30 Oct 2022 09:43:44 +0100
Subject: [PATCH 2/5] New package: CalculiX-ccx-2.20

---
 srcpkgs/CalculiX-ccx/template | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
 create mode 100644 srcpkgs/CalculiX-ccx/template

diff --git a/srcpkgs/CalculiX-ccx/template b/srcpkgs/CalculiX-ccx/template
new file mode 100644
index 000000000000..93f90b9fd7a0
--- /dev/null
+++ b/srcpkgs/CalculiX-ccx/template
@@ -0,0 +1,35 @@
+# Template file for 'CalculiX-ccx'
+pkgname=CalculiX-ccx
+version=2.20
+revision=1
+wrksrc=CalculiX
+build_wrksrc="ccx_${version}/src"
+hostmakedepends="gcc-fortran"
+makedepends="spooles arpack-ng-devel libgomp-devel openblas-devel"
+short_desc="3D Structural Finite Element Program - Solver"
+maintainer="Phicem <phicem@gmx.com>"
+license="GPL-2.0-or-later"
+homepage="http://www.dhondt.de/"
+distfiles="http://www.dhondt.de/ccx_${version}.src.tar.bz2"
+checksum=63bf6ea09e7edcae93e0145b1bb0579ea7ae82e046f6075a27c8145b72761bcf
+
+_FFLAGS=" -O2 -fallow-argument-mismatch"
+CFLAGS="-I${XBPS_CROSS_BASE}/usr/include/spooles -DARCH=Linux -DSPOOLES -DARPACK -DMATRIXSTORAGE -DNETWORKOUT"
+
+post_patch() {
+	vsed -e 's,./date.pl; ,,' -i Makefile
+	# taken from date.pl, changed for reproducibility
+	vsed -e 's/You are using an executable made on.*/You are using an executable made on '"$(date --utc --date @$SOURCE_DATE_EPOCH +%Y-%m-%d)"'\\n");/g' \
+		-i ccx_$version.c -i CalculiXstep.c
+	vsed -e 's/COMPILETIME.*/COMPILETIME       '"$(date --utc --date @$SOURCE_DATE_EPOCH +%Y-%m-%d)"'\\n",p1);/g' \
+		-i frd.c
+}
+
+do_build() {
+	make CC="$CC" FC="$FC" CFLAGS="$CFLAGS" FFLAGS="$_FFLAGS" \
+		LIBS="${XBPS_CROSS_BASE}/usr/lib/spooles.a ${XBPS_CROSS_BASE}/usr/lib/libarpack.so ${XBPS_CROSS_BASE}/usr/lib/libopenblas.so -lpthread -lm -lc"
+}
+
+do_install() {
+	vbin ccx_${version} ccx
+}

From bbc86306ed8fe56ffef15728ef1e7466d41d11ac Mon Sep 17 00:00:00 2001
From: Phicem <phicem@gmx.com>
Date: Sun, 30 Oct 2022 09:44:13 +0100
Subject: [PATCH 3/5] New package: CalculiX-cgx-2.20

---
 srcpkgs/CalculiX-cgx/patches/Makefile.patch | 12 +++++++
 srcpkgs/CalculiX-cgx/template               | 36 +++++++++++++++++++++
 2 files changed, 48 insertions(+)
 create mode 100644 srcpkgs/CalculiX-cgx/patches/Makefile.patch
 create mode 100644 srcpkgs/CalculiX-cgx/template

diff --git a/srcpkgs/CalculiX-cgx/patches/Makefile.patch b/srcpkgs/CalculiX-cgx/patches/Makefile.patch
new file mode 100644
index 000000000000..dd2975a78dea
--- /dev/null
+++ b/srcpkgs/CalculiX-cgx/patches/Makefile.patch
@@ -0,0 +1,12 @@
+--- a/CalculiX/cgx_2.20/src/Makefile
++++ b/CalculiX/cgx_2.20/src/Makefile
+@@ -67,7 +67,7 @@
+ OUTIL = $(SUTIL:.c=.o)
+ 
+ cgx: $(OLIB) $(OUTIL) $(OULIB)
+-	g++  $(OULIB)  $(OLIB) $(OUTIL)  $(CFLAGS) $(LFLAGS) -o  $@
++	$(CXX)  $(OULIB)  $(OLIB) $(OUTIL)  $(CFLAGS) $(LFLAGS) -o  $@
+ 
+ 
+ 
+
diff --git a/srcpkgs/CalculiX-cgx/template b/srcpkgs/CalculiX-cgx/template
new file mode 100644
index 000000000000..6ae05ff5241e
--- /dev/null
+++ b/srcpkgs/CalculiX-cgx/template
@@ -0,0 +1,36 @@
+# Template file for 'CalculiX-cgx'
+pkgname=CalculiX-cgx
+version=2.20
+revision=1
+wrksrc="${pkgname}-${version}"
+create_wrksrc=yes
+build_wrksrc="CalculiX/cgx_${version}/src"
+build_style="gnu-makefile"
+makedepends="glu-devel libglvnd-devel libXmu-devel libXi-devel"
+short_desc="3D Structural Finite Element Program - Graphical interface"
+maintainer="Phicem <phicem@gmx.com>"
+license="GPL-2.0-or-later, custom:GLUT"
+homepage="http://www.dhondt.de/"
+distfiles="http://www.dhondt.de/cgx_${version}.all.tar.bz2"
+checksum=f4c840c3633718547e33f86b2d7bc6b35608dd8d6cbf9fa192cecef34f2dc908
+CFLAGS="-DSEMINIT -I. -I${XBPS_CROSS_BASE}/usr/include/GL -I${XBPS_CROSS_BASE}/usr/X11/include -I../../libSNL/src -I../../glut-3.5/src"
+_tetgen_version=1.5.1
+_tetgen_dir=${XBPS_BUILDDIR}/${wrksrc}/tetgen${_tetgen_version}
+
+post_build() {
+	make -C ${_tetgen_dir}  CC=$CC CXX=$CXX CFLAGS="$CFLAGS" tetgen tetlib
+}
+
+do_install() {
+	vbin cgx
+	vlicense ../README CGX_LICENSE
+	vlicense ../../glut-3.5/NOTICE GLUT_LICENSE
+	vbin ${_tetgen_dir}/tetgen
+	vinstall ${_tetgen_dir}/libtet.a 644 usr/lib
+	vlicense ${_tetgen_dir}/LICENSE TETGEN_LICENSE
+}
+
+post_extract() {
+	bsdtar -xvf tetgen${_tetgen_version}.tar
+	rm tetgen${_tetgen_version}.tar
+}

From bd86adddf74a4238d6e83b74af530a93c9aa57a2 Mon Sep 17 00:00:00 2001
From: Phicem <phicem@gmx.com>
Date: Sun, 30 Oct 2022 09:44:36 +0100
Subject: [PATCH 4/5] New package: CalculiX-2.20 (meta-package)

---
 srcpkgs/CalculiX/template | 10 ++++++++++
 1 file changed, 10 insertions(+)
 create mode 100644 srcpkgs/CalculiX/template

diff --git a/srcpkgs/CalculiX/template b/srcpkgs/CalculiX/template
new file mode 100644
index 000000000000..b807d972e945
--- /dev/null
+++ b/srcpkgs/CalculiX/template
@@ -0,0 +1,10 @@
+# Template file for 'CalculiX'
+pkgname=CalculiX
+version=2.20
+revision=1
+build_style=meta
+depends="CalculiX-cgx-${version}_${revision} CalculiX-ccx-${version}_${revision}"
+short_desc="3D Structural Finite Element Program"
+maintainer="Phicem <phicem@gmx.com>"
+license="GPL-2.0-only"
+homepage="http://www.dhondt.de/"

From 6a3009d923292dc435f40b39cfda55145a633d71 Mon Sep 17 00:00:00 2001
From: Phicem <phicem@gmx.com>
Date: Mon, 31 Oct 2022 14:33:18 +0100
Subject: [PATCH 5/5] Removed online xlint warning

---
 srcpkgs/CalculiX-cgx/template | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/srcpkgs/CalculiX-cgx/template b/srcpkgs/CalculiX-cgx/template
index 6ae05ff5241e..2806520f6914 100644
--- a/srcpkgs/CalculiX-cgx/template
+++ b/srcpkgs/CalculiX-cgx/template
@@ -2,7 +2,6 @@
 pkgname=CalculiX-cgx
 version=2.20
 revision=1
-wrksrc="${pkgname}-${version}"
 create_wrksrc=yes
 build_wrksrc="CalculiX/cgx_${version}/src"
 build_style="gnu-makefile"
@@ -15,7 +14,7 @@ distfiles="http://www.dhondt.de/cgx_${version}.all.tar.bz2"
 checksum=f4c840c3633718547e33f86b2d7bc6b35608dd8d6cbf9fa192cecef34f2dc908
 CFLAGS="-DSEMINIT -I. -I${XBPS_CROSS_BASE}/usr/include/GL -I${XBPS_CROSS_BASE}/usr/X11/include -I../../libSNL/src -I../../glut-3.5/src"
 _tetgen_version=1.5.1
-_tetgen_dir=${XBPS_BUILDDIR}/${wrksrc}/tetgen${_tetgen_version}
+_tetgen_dir=${XBPS_BUILDDIR}/${pkgname}-${version}/tetgen${_tetgen_version}
 
 post_build() {
 	make -C ${_tetgen_dir}  CC=$CC CXX=$CXX CFLAGS="$CFLAGS" tetgen tetlib

  parent reply	other threads:[~2022-10-31 14:17 UTC|newest]

Thread overview: 105+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-16 10:05 [PR PATCH] CalculiX-2.20 Phicem
2022-10-16 10:21 ` [PR REVIEW] CalculiX-2.20 classabbyamp
2022-10-16 10:21 ` classabbyamp
2022-10-16 11:22 ` Phicem
2022-10-16 11:23 ` paper42
2022-10-16 11:23 ` paper42
2022-10-16 11:37 ` Phicem
2022-10-16 11:46 ` Phicem
2022-10-16 18:27 ` [PR PATCH] [Updated] CalculiX-2.20 Phicem
2022-10-16 18:30 ` [PR REVIEW] CalculiX-2.20 Phicem
2022-10-16 18:33 ` CalculiX-2.20 Phicem
2022-10-16 19:38 ` [PR PATCH] [Updated] CalculiX-2.20 Phicem
2022-10-16 19:40 ` CalculiX-2.20 Phicem
2022-10-16 20:41 ` CalculiX-2.20 Phicem
2022-10-17 23:56 ` [PR REVIEW] CalculiX-2.20 classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-17 23:56 ` classabbyamp
2022-10-18  2:34 ` ahesford
2022-10-18  2:34 ` ahesford
2022-10-18  6:38 ` 0x5c
2022-10-18  6:42 ` classabbyamp
2022-10-22  7:49 ` CalculiX-2.20 Phicem
2022-10-22  8:07 ` [PR REVIEW] [WIP] CalculiX-2.20 Phicem
2022-10-22  8:10 ` Phicem
2022-10-22  8:48 ` Phicem
2022-10-22  8:50 ` [PR PATCH] [Updated] " Phicem
2022-10-22  9:03 ` [PR REVIEW] " Phicem
2022-10-22 11:55 ` 0x5c
2022-10-22 11:55 ` 0x5c
2022-10-22 19:17 ` Phicem
2022-10-23  7:11 ` 0x5c
2022-10-23  9:35 ` Phicem
2022-10-23  9:35 ` [PR PATCH] [Updated] " Phicem
2022-10-23  9:59 ` [PR REVIEW] " Phicem
2022-10-23 10:00 ` [PR PATCH] [Updated] " Phicem
2022-10-23 10:00 ` Phicem
2022-10-23 11:20 ` Phicem
2022-10-23 11:39 ` Phicem
2022-10-23 11:42 ` Phicem
2022-10-23 13:14 ` [PR REVIEW] " ahesford
2022-10-23 13:15 ` ahesford
2022-10-23 13:25 ` ahesford
2022-10-23 16:50 ` [PR PATCH] [Updated] " Phicem
2022-10-23 16:52 ` [PR REVIEW] " Phicem
2022-10-23 18:25 ` [PR PATCH] [Updated] " Phicem
2022-10-23 18:29 ` [PR REVIEW] " Phicem
2022-10-23 18:49 ` Phicem
2022-10-23 18:51 ` [PR PATCH] [Updated] " Phicem
2022-10-23 19:56 ` [PR REVIEW] " Phicem
2022-10-23 20:02 ` classabbyamp
2022-10-26  6:37 ` Phicem
2022-10-26  7:45 ` [PR PATCH] [Updated] " Phicem
2022-10-26  7:47 ` Phicem
2022-10-26  7:55 ` Phicem
2022-10-26  7:56 ` Phicem
2022-10-26  8:02 ` Phicem
2022-10-26  8:03 ` Phicem
2022-10-26  8:13 ` Phicem
2022-10-26  8:13 ` Phicem
2022-10-26  9:35 ` [PR REVIEW] " Phicem
2022-10-26  9:37 ` [PR PATCH] [Updated] " Phicem
2022-10-26  9:41 ` Phicem
2022-10-26 10:01 ` Phicem
2022-10-26 10:46 ` Phicem
2022-10-26 16:42 ` Phicem
2022-10-26 19:18 ` Phicem
2022-10-26 19:25 ` [PR REVIEW] " Phicem
2022-10-30 20:31 ` [PR PATCH] [Updated] " Phicem
2022-10-31 14:17 ` Phicem [this message]
2022-10-31 14:25 ` Phicem
2022-10-31 16:45 ` Phicem
2022-11-04 21:44 ` New package: CalculiX-2.20 classabbyamp
2022-11-04 21:44 ` classabbyamp
2022-11-05 15:38 ` Phicem
2022-11-05 15:38 ` [PR PATCH] [Updated] " Phicem
2022-11-05 17:48 ` Phicem
2023-02-04  1:58 ` github-actions
2023-02-05 18:21 ` [PR PATCH] [Updated] " Phicem
2023-05-08  1:52 ` github-actions
2023-05-22  1:57 ` [PR PATCH] [Closed]: " github-actions

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221031141708.YdU8OhFQ8JR6aAE4tohV4UMMBHRwaei1I0uQIdhR9K0@z \
    --to=phicem@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).