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