github.com/metux/go-metabuild@v0.0.0-20240118143255-d9ed5ab697f9/examples/pkg/zlib/metabuild.yaml (about) 1 # TODO 2 # --> the current one will be linked to a fixed place, where it can be referenced anywhere else 3 # --> add c/defines@host / c/defines@build (FeaturedStrList ?) 4 # --> target: cflags, ldflags, ... automatically load for host/build 5 6 package: zlib1g 7 version: 1.3.0.1 8 maintainer: Enrico Weigelt, metux IT consult <info@metux.net> 9 homepage: http://www.zlib.net 10 section: libs 11 name: Zlib compression library 12 description: | 13 zlib is a library implementing the deflate 14 compression method found in gzip and PKZIP. 15 16 # srcdir: ../zlib 17 18 configure: 19 checks: 20 # using list instead of struct, so we can define the order 21 - type: target-distro 22 - type: c/compiler 23 mandatory: true 24 - c/header: unistd.h 25 mandatory: false 26 yes/c/defines: HAVE_UNISTD_H 27 - c/function: fseeko 28 yes/c/defines: HAVE_FSEEKO 29 mandatory: true 30 - c/type: size_t 31 c/header: [stdio.h, stdlib.h] 32 yes/c/defines: HAVE_SIZE_T 33 - c/type: off64_t 34 c/header: sys/types.h 35 - c/function: strerror 36 yes/c/defines: HAVE_STRERROR 37 - c/function: vsnprintf 38 c/header: [stdio.h, stdarg.h] 39 yes/c/defines: HAVE_VSNPRINTF 40 - c/type: size_t 41 c/header: [stdio.h, stdlib.h] 42 yes/c/defines: HAVE_SIZE_T 43 44 targets: 45 zlib{c/library}: 46 version: 1 47 library/name: z 48 library/mapfile: zlib.map 49 c/defines: ${buildconf::host::flags::c/defines} 50 pkgconf: 51 name: zlib 52 description: ZLib compression library 53 54 source: 55 - adler32.c 56 - crc32.c 57 - deflate.c 58 - infback.c 59 - inffast.c 60 - inflate.c 61 - inftrees.c 62 - trees.c 63 - zutil.c 64 65 source@feature/gz=y: 66 - compress.c 67 - uncompr.c 68 - gzclose.c 69 - gzlib.c 70 - gzread.c 71 - gzwrite.c 72 73 source@platform=mingw32: zlib1.rc 74 75 headers: 76 pub: 77 # directly into /usr/include 78 source: 79 - zlib.h 80 - zconf.h 81 priv: 82 install: false 83 source: 84 - crc32.h 85 - deflate.h 86 - gzguts.h 87 - inffast.h 88 - inffixed.h 89 - inflate.h 90 - inftrees.h 91 - trees.h 92 - zutil.h 93 94 example{c/executable}: 95 c/defines: ${buildconf::host::flags::c/defines} 96 source: test/example.c 97 link/static: zlib 98 install: false 99 100 minizip.1{doc/man}: 101 c/defines: ${buildconf::host::flags::c/defines} 102 source/dir: contrib/minizip 103 104 miniunzip.1{doc/man}: 105 source/dir: contrib/minizip 106 107 minigzip{c/executable}: 108 c/defines: ${buildconf::host::flags::c/defines} 109 source: test/minigzip.c 110 link/static: zlib 111 112 example64{c/executable}: 113 c/defines: ["${buildconf::host::flags::c/defines}", _FILE_OFFSET_BITS=64] 114 source: test/example.c 115 link/static: zlib 116 install: false 117 118 minigzip64{c/executable}: 119 source: test/minigzip.c 120 c/defines: ["${buildconf::host::flags::c/defines}", _FILE_OFFSET_BITS=64] 121 link/static: zlib 122 123 examplesh{c/executable}: 124 source: test/example.c 125 c/defines: ${buildconf::host::flags::c/defines} 126 link/shared: zlib 127 install: false 128 129 minigzipsh{c/executable}: 130 source: test/minigzip.c 131 c/defines: ${buildconf::host::flags::c/defines} 132 link/static: zlib 133 134 example64sh{c/executable}: 135 source: test/example.c 136 c/defines: ["${buildconf::host::flags::c/defines}", _FILE_OFFSET_BITS=64] 137 link/shared: zlib 138 install: false 139 140 minigzip64sh{c/executable}: 141 source: test/minigzip.c 142 c/defines: ["${buildconf::host::flags::c/defines}", _FILE_OFFSET_BITS=64] 143 link/shared: zlib 144 145 features: 146 pedantic: 147 type: bool 148 description: be very pedantic (eg. make many things const) 149 default: y 150 set@y: 151 ## should also support host/build 152 c/defines: ZLIB_CONST 153 c/flags: pedantic 154 debug: 155 type: bool 156 default: n 157 set@y: 158 ## should also support host/build 159 c/defines: ZLIB_DEBUG 160 161 # FIXME: make it possible to build w/o it 162 gz: 163 type: bool 164 default: y 165 166 distro: 167 _default_: 168 packages: 169 data: 170 skip: true