Skip to content

Commit

Permalink
turn into multi-output recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
h-vetinari committed Aug 8, 2022
1 parent aa0a47c commit 313c553
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 30 deletions.
File renamed without changes.
File renamed without changes.
69 changes: 39 additions & 30 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
{% set version = "20220623.0" %}

{% set absl_libs = [
"base", "civil_time", "cord", "cordz_functions", "cordz_handle", "cordz_info",
"cordz_sample_token", "examine_stack", "exponential_biased", "failure_signal_handler",
"flags", "flags_commandlineflag", "flags_config", "flags_marshalling", "flags_parse",
"flags_private_handle_accessor", "flags_program_name", "flags_reflection", "flags_usage",
"hash", "hashtablez_sampler", "int128", "log_severity", "low_level_hash", "periodic_sampler",
"random_distributions", "random_seed_gen_exception", "random_seed_sequences", "raw_hash_set",
"scoped_set_env", "spinlock_wait", "stacktrace", "status", "statusor", "strerror", "strings",
"symbolize", "synchronization", "time", "time_zone"
] %}

package:
name: abseil-cpp
version: {{ version }}
Expand All @@ -18,38 +29,36 @@ build:
run_exports:
- {{ pin_subpackage("abseil-cpp", max_pin="x.x") }}

requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja
outputs:
- name: abseil-cpp
script: build-abseil.sh # [unix]
script: build-abseil.bat # [win]
build:
run_exports:
- {{ pin_subpackage("abseil-cpp", max_pin="x.x") }}

{% set absl_libs = [
"base", "civil_time", "cord", "cordz_functions", "cordz_handle", "cordz_info",
"cordz_sample_token", "examine_stack", "exponential_biased", "failure_signal_handler",
"flags", "flags_commandlineflag", "flags_config", "flags_marshalling", "flags_parse",
"flags_private_handle_accessor", "flags_program_name", "flags_reflection", "flags_usage",
"hash", "hashtablez_sampler", "int128", "log_severity", "low_level_hash", "periodic_sampler",
"random_distributions", "random_seed_gen_exception", "random_seed_sequences", "raw_hash_set",
"scoped_set_env", "spinlock_wait", "stacktrace", "status", "statusor", "strerror", "strings",
"symbolize", "synchronization", "time", "time_zone"
] %}
test:
commands:
# windows (DLL + import library)
- if not exist %LIBRARY_BIN%\\abseil_dll.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\\abseil_dll.lib exit 1 # [win]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- cmake
- ninja

test:
commands:
# windows-only (almost-)all-in-one DLL + import library
- if not exist %LIBRARY_BIN%\\abseil_dll.dll exit 1 # [win]
- if not exist %LIBRARY_LIB%\\abseil_dll.lib exit 1 # [win]

# absl_libs
{% for each_lib in absl_libs %}
# presence of shared libs
- test -f $PREFIX/lib/libabsl_{{ each_lib }}${SHLIB_EXT} # [unix]
# absence of static libs
- test ! -f $PREFIX/lib/libabsl_{{ each_lib }}.a # [unix]
# TODO: do we want to get rid of the static windows libs?
# - if exist %LIBRARY_LIB%\\absl_{{ each_lib }}.lib exit 1 # [win]
{% endfor %}
# absl_* libraries
{% for each_lib in absl_libs %}
# presence of shared libs
- test -f $PREFIX/lib/libabsl_{{ each_lib }}${SHLIB_EXT} # [unix]
# absence of static libs
- test ! -f $PREFIX/lib/libabsl_{{ each_lib }}.a # [unix]
# TODO: do we want to get rid of the static windows libs?
# - if exist %LIBRARY_LIB%\\absl_{{ each_lib }}.lib exit 1 # [win]
{% endfor %}

about:
home: https://github.com/abseil/abseil-cpp
Expand Down

0 comments on commit 313c553

Please sign in to comment.