Skip to content
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

Added static lib packaging #8

Merged
merged 4 commits into from Aug 26, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion recipe/build.sh
Expand Up @@ -5,4 +5,3 @@ cp $BUILD_PREFIX/share/libtool/build-aux/config.* .
./configure --prefix=${PREFIX} --enable-python-bindings=no

make -j${CPU_COUNT} ${VERBOSE_AT}
make install
9 changes: 9 additions & 0 deletions recipe/install.sh
@@ -0,0 +1,9 @@
make install

if [[ "$PKG_NAME" == *static ]]
then
# relying on conda to dedup package
echo "Keeping all files, conda will dedupe"
Copy link
Member

Choose a reason for hiding this comment

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

How do we know that libnghttp2 will be the one getting the shared objects etc? Is it because it is built first?

Copy link
Member

Choose a reason for hiding this comment

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

The static package should pin exactly the non static one . Then it will be installed into host and deduped by conda build

else
rm -rf ${PREFIX}/lib/*.a
fi
29 changes: 27 additions & 2 deletions recipe/meta.yaml
Expand Up @@ -10,7 +10,7 @@ source:
sha256: eacc6f0f8543583ecd659faf0a3f906ed03826f1d4157b536b4b385fe47c5bb8

build:
number: 1
number: 2
skip: true # [not unix]

requirements:
Expand All @@ -35,9 +35,12 @@ requirements:

outputs:
- name: libnghttp2
script: install.sh # [unix]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make
host:
- zlib
- openssl # [unix]
Expand All @@ -59,7 +62,29 @@ outputs:
- lib/pkgconfig/libnghttp2* # [unix]
- bin/nghttp* # [unix]
test:
commands: nghttp -nv https://nghttp2.org
commands:
- nghttp -nv https://nghttp2.org
- test ! -f ${PREFIX}/lib/lib{{ name }}.a # [unix]
- test -f ${PREFIX}/lib/lib{{ name }}.so # [linux]

- name: libnghttp2-static
script: install.sh # [unix]
build:
skip: true # [not unix]
requirements:
build:
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- make
host:
- {{ pin_subpackage('libnghttp2', exact=True) }}
run:
- {{ pin_subpackage('libnghttp2', exact=True) }}
isuruf marked this conversation as resolved.
Show resolved Hide resolved
- libev-static
- c-ares-static
test:
commands:
- test -f ${PREFIX}/lib/lib{{ name }}.a # [unix]

about:
home: http://github.com/nghttp2/nghttp2
Expand Down