Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions SLATEC/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cmake_minimum_required(VERSION 3.16)
project(slatec Fortran)

file(GLOB LIBRARY_SOURCES "${PROJECT_SOURCE_DIR}/src/*.f")

add_library(slatec SHARED ${LIBRARY_SOURCES})

include(GNUInstallDirs)
install(
TARGETS ${PROJECT_NAME}
EXPORT ${PROJECT_NAME}Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${BINDIR}
)
60 changes: 60 additions & 0 deletions SLATEC/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# SLATEC

These files are from the SLATEC Common Mathematical Library, Version 4.1, July 1993.

### Installation using Conda

The most direct way to install the code is through the conda package manager.
If you have conda installed,
(1) activate an environment in you wish to use to install SLATEC, and
(2) run the install command:
```
conda install -c auto-mech slatec
```

If you do not have a preferred Conda environment set up, an empty environment with no packages can be created and activated with the following commands
```
conda create --name myenv
conda activate myenv
```
where `myenv` should be replaced with your preferred name for the environment.

Alternatively, we also recommend building our own pre-set Auto-Mech environment, which includes SLATEC and the codes which use it. This environment can be created and activated with the commands:
```
conda env create auto-mech/amech-env
conda activate amech-env
```

If your Conda commands are not functioning, you may need to iniliatize Conda via the command
```
. /path/to/conda.sh
```
which places Conda executables in your PATH. The specific location of conda.sh depends on the Conda install.


If you do not have conda, it can be installed using the shell script
`debug/install-conda.sh`.

### Building from source without Conda

Run build.sh, which uses cmake to compile SLATEC:
```
bash build.sh
```

Note that the results of the `make install` in build.sh will depend on your system setup.


## Notice

Author:
Giuseppe Borzi'
e-mail: etana@tiscalinet.it
http://web.tiscalinet.it/gborzi
fax: +39 1782235968
Assistant Professor at the Univ. of Messina - Italia

License:
General Public License. Slatec is 'Freely distributable' as they say.

For further details, see <http://www.netlib.org/slatec/>.
13 changes: 13 additions & 0 deletions SLATEC/pixi.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[workspace]
channels = ["https://prefix.dev/conda-forge"]
platforms = ["osx-arm64", "osx-64", "linux-64", "win-64"]
preview = ["pixi-build"]

[dependencies]
slatec = { path = "." }

[package]
name = "slatec"

[package.build]
backend = { name = "pixi-build-rattler-build", version = "0.3.*" }
26 changes: 26 additions & 0 deletions SLATEC/recipe.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package:
name: slatec
version: 4.3.0

source:
path: .
use_gitignore: true

build:
number: 0
script: |
cmake $CMAKE_ARGS \
-GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$PREFIX \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-B $SRC_DIR/../build \
-S .

cmake --build $SRC_DIR/../build --target install

requirements:
build:
- ${{ compiler('fortran') }}
- cmake
- ninja
Loading