summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAbdelfattahToulaoui2021-06-11 17:52:56 +0100
committerAbdelfattahToulaoui2021-06-11 20:46:06 +0100
commit68f62b3dc1e37d6fbc6537afd6e7488467b14022 (patch)
tree63aeb5413be33de8f1811d3a8eb82e839614950d
downloadaur-68f62b3dc1e37d6fbc6537afd6e7488467b14022.tar.gz
Initial commit
-rw-r--r--.SRCINFO41
-rw-r--r--PKGBUILD70
-rw-r--r--examples.patch24
-rw-r--r--freefem-cs7
-rw-r--r--freefem-cs.desktop10
-rw-r--r--vtk_gcc.patch24
6 files changed, 176 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..8d1c29b2aba
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,41 @@
+pkgbase = freefem-cs
+ pkgdesc = An integrated environment for FreeFEM
+ pkgver = 21.1
+ pkgrel = 1
+ url = https://www.ljll.math.upmc.fr/lehyaric/ffcs/
+ arch = x86_64
+ license = LGPL
+ makedepends = fakeroot
+ makedepends = gcc
+ makedepends = patch
+ makedepends = cmake
+ makedepends = make
+ makedepends = libglvnd
+ makedepends = libxt
+ makedepends = glu
+ makedepends = libxpm
+ makedepends = autoconf
+ makedepends = fltk
+ makedepends = bison
+ makedepends = suitesparse
+ makedepends = arpack
+ makedepends = rsync
+ depends = libglvnd
+ depends = suitesparse
+ depends = arpack
+ depends = libxpm
+ options = staticlibs
+ source = https://www.ljll.math.upmc.fr/lehyaric/ffcs/packs/ffcs-21.1-source.tgz
+ source = https://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz
+ source = vtk_gcc.patch
+ source = examples.patch
+ source = freefem-cs
+ source = freefem-cs.desktop
+ sha512sums = 8dea4cd99b02d8e5cef18cb21e8a96e12acb3afb8a029651f22db6c5de4d41aed811340f94395ffba42f8597bf5f70d7c7378c185b3a13c0be9108ac02f15d86
+ sha512sums = a05598ed2a70fae9f07a8d9172cb963194cf75d0fcd995c9ebb614a488d4272988212494b1e9aa87272c0ed732161bba8ff97a0cf6874391c1c5fcf7dc22c309
+ sha512sums = 3ef8abc42d4b111bb507fd41dd8e889027be18a67665596f9852d02504310c67534b0a1d1be24b34aa68ed3d4354633008b7e2e9f49ce8397fc06c9d60d309ca
+ sha512sums = f98c6124e782726c39b8ecac4ee9849484c761f18add6928e9e172f1b31306883291f53a8c29ad30ea5430906f66d44beb2e6149a71c170f332a6b1e9d79f0fb
+ sha512sums = c5cb8979ef96d8b1759f99f19863f5d47b91a310cf50d88e2282ec2b16801408441925d29d409e779b2995993e7c95a2234a69545a1a8b42bd8be50da537394b
+ sha512sums = 4ebbfb0ca1957f9f5ed01b3b40c0aa9fb5bd70cf4b47ad1dc55f8ab7394fe7e2120aec8839bc2146861ef021f62f340b3f028ba39bf7f57bd0ce4f1c6b59394f
+
+pkgname = freefem-cs
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..98ce660c3ff
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,70 @@
+# Maintainer: AFT <aft.power.2014@gmail.com>
+pkgname=freefem-cs
+pkgver=21.1
+pkgrel=1
+pkgdesc='An integrated environment for FreeFEM'
+arch=('x86_64')
+url='https://www.ljll.math.upmc.fr/lehyaric/ffcs/'
+license=('LGPL')
+makedepends=( 'fakeroot' 'gcc' 'patch' 'cmake'
+ 'make' 'libglvnd' 'libxt' 'glu' 'libxpm' 'autoconf'
+ 'fltk' 'bison' 'suitesparse' 'arpack' 'rsync' )
+depends=( 'libglvnd' 'suitesparse' 'arpack' 'libxpm' )
+source=("https://www.ljll.math.upmc.fr/lehyaric/ffcs/packs/ffcs-21.1-source.tgz"
+ "https://www.vtk.org/files/release/6.3/VTK-6.3.0.tar.gz"
+ "vtk_gcc.patch"
+ "examples.patch"
+ "freefem-cs"
+ "freefem-cs.desktop")
+options=(staticlibs)
+sha512sums=( '8dea4cd99b02d8e5cef18cb21e8a96e12acb3afb8a029651f22db6c5de4d41aed811340f94395ffba42f8597bf5f70d7c7378c185b3a13c0be9108ac02f15d86'
+ 'a05598ed2a70fae9f07a8d9172cb963194cf75d0fcd995c9ebb614a488d4272988212494b1e9aa87272c0ed732161bba8ff97a0cf6874391c1c5fcf7dc22c309'
+ '3ef8abc42d4b111bb507fd41dd8e889027be18a67665596f9852d02504310c67534b0a1d1be24b34aa68ed3d4354633008b7e2e9f49ce8397fc06c9d60d309ca'
+ 'f98c6124e782726c39b8ecac4ee9849484c761f18add6928e9e172f1b31306883291f53a8c29ad30ea5430906f66d44beb2e6149a71c170f332a6b1e9d79f0fb'
+ 'c5cb8979ef96d8b1759f99f19863f5d47b91a310cf50d88e2282ec2b16801408441925d29d409e779b2995993e7c95a2234a69545a1a8b42bd8be50da537394b'
+ '4ebbfb0ca1957f9f5ed01b3b40c0aa9fb5bd70cf4b47ad1dc55f8ab7394fe7e2120aec8839bc2146861ef021f62f340b3f028ba39bf7f57bd0ce4f1c6b59394f')
+
+prepare() {
+ # Patch VTK6 to work with newwer versions of GCC
+ cd "${srcdir}"/VTK-6.3.0
+ patch -Np1 -i "${srcdir}"/vtk_gcc.patch
+
+ # Patch the examples installation script as it causes problems
+ # for when it tries to delete directories that aren't there
+ cd "${srcdir}"/ffcs
+ patch -Np1 -i "${srcdir}"/examples.patch
+
+}
+
+build() {
+ mkdir -p "${srcdir}"/vtk-build
+ cd "${srcdir}"/vtk-build
+
+ # Build VTK6 with c++11 because newer standards raise errors
+ cmake -Wno-dev -DCMAKE_CXX_STANDARD=11 "${srcdir}"/VTK-6.3.0
+ make -j8
+
+ # Install VTK6 to a temporary directory to be used by FF-cs
+ make DESTDIR="${srcdir}"/vtk-install -j8 install
+
+ # Configure and build FF-cs
+ cd "${srcdir}"/ffcs
+ ./configure --with-vtk-libdir="${srcdir}/vtk-install/usr/local/lib" --with-vtk-includedir="${srcdir}/vtk-install/usr/local/include/vtk-6.3/" --with-vtk-major="6.3"
+ make -j8
+
+}
+
+
+package() {
+ # Install the package files to /opt
+ install -dv "${pkgdir}/opt"
+ cp -r "${srcdir}/ffcs/pack/work" "${pkgdir}/opt/ffcs"
+ install -Dm755 "${srcdir}/freefem-cs" "${pkgdir}/usr/bin/freefem-cs"
+
+ # Install license
+ install -Dm644 "${srcdir}/ffcs/COPYING" "${pkgdir}/usr/share/licenses/FreeFem-cs/COPYING"
+
+ # Install the desktop entry
+ install -Dm644 "${srcdir}/freefem-cs.desktop" "${pkgdir}/usr/share/applications/freefem-cs.desktop"
+
+}
diff --git a/examples.patch b/examples.patch
new file mode 100644
index 00000000000..79afc15550e
--- /dev/null
+++ b/examples.patch
@@ -0,0 +1,24 @@
+diff -Naur a/pack/Makefile.am b/pack/Makefile.am
+--- a/pack/Makefile.am 2021-01-12 09:48:09.000000000 +0100
++++ b/pack/Makefile.am 2021-06-11 12:16:11.119922290 +0100
+@@ -304,7 +304,7 @@
+
+ examples:work/examples/.dirok work/guitest.edp
+ rsync -avq --exclude freefem++.pref --exclude '*.@SHAREDLIB@' --exclude '*.@OBJEXT@' --exclude ff-c++ --exclude '*-ffcsref.edp' \
+- --exclude .deps --delete --delete-excluded ~/ffalh/ff/examples/* work/examples
++ --exclude .deps work/examples
+ work/guitest.edp:work/.dirok ../tests/guitest.edp
+ cp ../tests/guitest.edp $@
+
+diff -Naur a/pack/Makefile.in b/pack/Makefile.in
+--- a/pack/Makefile.in 2021-01-12 09:48:13.000000000 +0100
++++ b/pack/Makefile.in 2021-06-11 13:23:17.859894235 +0100
+@@ -1391,7 +1391,7 @@
+
+ examples:work/examples/.dirok work/guitest.edp
+ rsync -avq --exclude freefem++.pref --exclude '*.@SHAREDLIB@' --exclude '*.@OBJEXT@' --exclude ff-c++ --exclude '*-ffcsref.edp' \
+- --exclude .deps --delete --delete-excluded ~/ffalh/ff/examples/* work/examples
++ --exclude .deps work/examples
+ work/guitest.edp:work/.dirok ../tests/guitest.edp
+ cp ../tests/guitest.edp $@
+
diff --git a/freefem-cs b/freefem-cs
new file mode 100644
index 00000000000..fb73d462f72
--- /dev/null
+++ b/freefem-cs
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+export LD_LIBRARY_PATH=/opt/ffcs/libs
+
+cd /opt/ffcs
+
+bin/ffcsgui
diff --git a/freefem-cs.desktop b/freefem-cs.desktop
new file mode 100644
index 00000000000..de21e3aea0f
--- /dev/null
+++ b/freefem-cs.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Encoding=UTF-8
+Version=21.1
+Type=Application
+Categories=Development;Science;Graphics;
+Comment=An integrated environment for FreeFEM
+Terminal=false
+Exec=/usr/bin/freefem-cs
+Name=FreeFem-cs
+Icon=/opt/ffcs/logo.xpm
diff --git a/vtk_gcc.patch b/vtk_gcc.patch
new file mode 100644
index 00000000000..f82edb91590
--- /dev/null
+++ b/vtk_gcc.patch
@@ -0,0 +1,24 @@
+diff -Naur a/CMake/GenerateExportHeader.cmake b/CMake/GenerateExportHeader.cmake
+--- a/CMake/GenerateExportHeader.cmake 2015-09-01 22:41:26.000000000 +0100
++++ b/CMake/GenerateExportHeader.cmake 2021-06-11 17:35:00.539789015 +0100
+@@ -166,7 +166,7 @@
+ execute_process(COMMAND ${CMAKE_C_COMPILER} ARGS --version
+ OUTPUT_VARIABLE _gcc_version_info
+ ERROR_VARIABLE _gcc_version_info)
+- string(REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
++ string(REGEX MATCH "([3-9]|1[0-9])\\.[0-9]\\.[0-9]*"
+ _gcc_version "${_gcc_version_info}")
+ # gcc on mac just reports: "gcc (GCC) 3.3 20030304 ..." without the
+ # patch level, handle this here:
+diff -Naur a/CMake/vtkCompilerExtras.cmake b/CMake/vtkCompilerExtras.cmake
+--- a/CMake/vtkCompilerExtras.cmake 2015-09-01 22:41:26.000000000 +0100
++++ b/CMake/vtkCompilerExtras.cmake 2021-06-11 17:35:00.539789015 +0100
+@@ -32,7 +32,7 @@
+ OUTPUT_VARIABLE _gcc_version_info
+ ERROR_VARIABLE _gcc_version_info)
+
+- string (REGEX MATCH "[345]\\.[0-9]\\.[0-9]*"
++ string (REGEX MATCH "([3-9]|1[0-9])\\.[0-9]\\.[0-9]*"
+ _gcc_version "${_gcc_version_info}")
+ if(NOT _gcc_version)
+ string (REGEX REPLACE ".*\\(GCC\\).*([34]\\.[0-9]).*" "\\1.0"