Skip to content

Prepare recipe for xmlf90 #20733

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open
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
20 changes: 20 additions & 0 deletions recipes/xmlf90/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set -ex

cmake --version

cmake_options=(
"-DBUILD_SHARED_LIBS=ON"
"-GNinja"
)

mkdir _build
pushd _build
cmake ${CMAKE_ARGS} "${cmake_options[@]}" ..
ninja all install
popd

if [[ "${CONDA_BUILD_CROSS_COMPILATION:-0}" == "1" ]]; then
exit 0
fi

50 changes: 50 additions & 0 deletions recipes/xmlf90/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{% set name = "xmlf90" %}
{% set version = "1.5.6" %}

package:
name: {{ name|lower }}
version: {{ version }}

source:
url: https://gitlab.com/siesta-project/libraries/{{ name }}/-/archive/{{ version }}/{{ name }}-{{ version }}.tar.gz
sha256: c4492596c911b668b94fee40a53453f06aef3bc41014b9e2f4b51e640ad20528

build:
number: 0
skip: true # [win]
Comment on lines +12 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
build:
number: 0
skip: true # [win]
build:
run_exports:
- {{ pin_subpackage('xmlf90', max_pin='x.x.x') }}
number: 0
skip: true # [win]

You package needs a run export to ensure that downstream packages depend on a version of this package with a compatible ABI. Please adjust max_pin according to the ABI guarantees of your library.


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

test:
commands:
- test -f $PREFIX/lib/libxmlf90${SHLIB_EXT}

Comment on lines +22 to +25
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
test:
commands:
- test -f $PREFIX/lib/libxmlf90${SHLIB_EXT}
test:
commands:
- test -f $PREFIX/lib/libxmlf90${SHLIB_EXT}
- test -f $PREFIX/lib/cmake/xmlf90/xmlf90-config.cmake
- test -f $PREFIX/lib/pkgconfig/xmlf90.pc
- test -f $PREFIX/include/xmlf90/GNU-12.3.0/m_sax_charset.mod

about:
home: https://gitlab.com/siesta-project/libraries/xmlf90
license: BSD-2-Clause
license_family: BSD
license_file: COPYING
summary: 'A lightweight XML parser and generator in Fortran'
description: |
xmlf90 is a suite of libraries to handle XML in Fortran. A
first component is a XML parsing library, designed to be a
useful tool in the extraction and analysis of data in the
context of scientific computing. The priorities were
efficiency and the ability to deal with very large XML files
while maintaining a small memory footprint. The most complete
programming interface is based on the very successful SAX
(Simple API for XML) model, although a partial DOM interface
and a very experimental XPATH interface are also present. Also
included is a library (xmlf90-wxml) that facilitates the
writing of well-formed XML, including such features as
automatic start-tag completion, attribute pretty-printing, and
element indentation. There are also helper routines to handle
the output of numerical arrays.

extra:
recipe-maintainers:
- albgar