Skip to content

Commit

Permalink
Reformat to create looptools-static output
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewfeickert committed Nov 20, 2024
1 parent fa84830 commit adddb97
Showing 1 changed file with 51 additions and 50 deletions.
101 changes: 51 additions & 50 deletions recipes/looptools/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,66 +2,67 @@
{% set version = "2.16" %}

package:
# FIXME: c.f. comment below in 'build' on dynamic linking
# c.f. https://github.com/conda-forge/cfep/blob/383bb3026c9a06c12df3c74eeb59ce1f6d53e07d/cfep-18.md
name: {{ name }}-static
name: {{ name }}
version: {{ version }}

source:
url: https://feynarts.de/looptools/LoopTools-{{ version }}.tar.gz
sha256: 4113467575db3a14405d62d9e516b3b90410b73ea8d20c8eb8d70a30fc5cc9cb

build:
skip: true # [win]
number: 0
run_exports:
- {{ pin_subpackage('looptools-static', max_pin='x.x') }}
ignore_run_exports_from:
- {{ compiler('cxx') }}
script:
# FIXME: Avoid error from trying to create directories that exist
- sed -i 's/mkdir /mkdir -p /g' makefile.in
- ./configure --help
# FIXME: Author has disabled builds with dynamic linking
# c.f. https://github.com/hep-packaging-coordination/packaging-hep-simulation-stack/issues/4#issuecomment-2489198926
# - ./configure --prefix=$PREFIX --dynamic --64 --native
- ./configure --prefix=$PREFIX --64 # [build_platform != target_platform]
- ./configure --prefix=$PREFIX --64 --native # [build_platform == target_platform]
- make
- make install
- ln -s -f $PREFIX/lib64/libooptools.a $PREFIX/lib/libooptools.a
- rm -rf build
outputs:
- name: {{ name }}-static

requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }}
- make
- sed
- gawk
build:
skip: true # [win]
number: 0
run_exports:
- {{ pin_subpackage('looptools-static', max_pin='x.x') }}
ignore_run_exports_from:
- {{ compiler('cxx') }}
script:
# FIXME: Avoid error from trying to create directories that exist
- sed -i 's/mkdir /mkdir -p /g' makefile.in
- ./configure --help
# FIXME: Author has disabled builds with dynamic linking
# c.f. https://github.com/hep-packaging-coordination/packaging-hep-simulation-stack/issues/4#issuecomment-2489198926
# - ./configure --prefix=$PREFIX --dynamic --64 --native
- ./configure --prefix=$PREFIX --64 # [build_platform != target_platform]
- ./configure --prefix=$PREFIX --64 --native # [build_platform == target_platform]
- make
- make install
- ln -s -f $PREFIX/lib64/libooptools.a $PREFIX/lib/libooptools.a # [linux]
- rm -rf build

test:
files:
- examples/
requires:
- {{ compiler('cxx') }}
- gfortran
commands:
- test -f $PREFIX/lib64/libooptools.a
- test -f $PREFIX/lib/libooptools.a # [linux]
- test -f $PREFIX/include/looptools.h
- test -f $PREFIX/include/clooptools.h
- test -f $PREFIX/bin/lt
- test -f $PREFIX/bin/fcc
- test -f $PREFIX/bin/f++ # [linux]
requirements:
build:
- {{ stdlib('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }}
- make
- sed
- gawk

- fcc --help
- f++ --help
test:
files:
- examples/
requires:
- {{ compiler('cxx') }}
- gfortran
commands:
- test -f $PREFIX/lib64/libooptools.a
- test -f $PREFIX/lib/libooptools.a # [linux]
- test -f $PREFIX/include/looptools.h
- test -f $PREFIX/include/clooptools.h
- test -f $PREFIX/bin/lt
- test -f $PREFIX/bin/fcc
- test -f $PREFIX/bin/f++ # [linux]

- cd examples
- $CXX example01.cpp -o example01 $CXXFLAGS $LDFLAGS -looptools -lgfortran
- ./example01
- fcc --help
- f++ --help

- cd examples
- $CXX example01.cpp -o example01 $CXXFLAGS $LDFLAGS -looptools -lgfortran
- ./example01

about:
home: https://feynarts.de/looptools/
Expand Down

0 comments on commit adddb97

Please sign in to comment.