Created
January 16, 2024 08:15
-
-
Save minrk/c0ebc71817be1064483ac572c43936c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
// #include <zlib.h> | |
#include "libfoo.h" | |
int main() { | |
// printf("libz version: %s\n", zlibVersion()); | |
printf("libz version via libfoo: %s\n", zlibv()); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <zlib.h> | |
const char * zlibv(void) { | |
return zlibVersion(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
char * zlibv(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package: | |
name: test-pkg | |
version: 1.0 | |
outputs: | |
- name: libfoo | |
build: | |
script: | |
- env | sort | |
- mkdir -p $PREFIX/lib | |
- mkdir -p $PREFIX/include | |
- $CC $CFLAGS $LDFLAGS -lz -shared -o $PREFIX/lib/libfoo${SHLIB_EXT} ${RECIPE_DIR}/libfoo.c | |
requirements: | |
build: | |
- {{ compiler('c') }} | |
host: | |
- zlib | |
test: | |
commands: | |
- test -f $PREFIX/lib/libfoo${SHLIB_EXT} | |
- name: foo_exe | |
build: | |
script: | |
- mkdir -p $PREFIX/bin | |
- $CC $CFLAGS $LDFLAGS -lfoo ${RECIPE_DIR}/foo_exe.c -o $PREFIX/bin/foo | |
requirements: | |
build: | |
- {{ compiler('c') }} | |
host: | |
- {{ pin_subpackage('libfoo', exact=True) }} | |
run: | |
- {{ pin_subpackage('libfoo', exact=True) }} | |
test: | |
commands: | |
- test -f $PREFIX/lib/libfoo${SHLIB_EXT} | |
- test -f $PREFIX/bin/foo | |
- foo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment