|
8 | 8 | all:
|
9 | 9 | type: git
|
10 | 10 | git_url: https://github.com/phpredis/phpredis
|
11 |
| - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) |
| 11 | + git_ref: $(git tag | grep -E '^[.0-9]+$' | sort -V | tail -1) |
| 12 | + pre: | |
| 13 | + if [ -f /usr/include/liblzf/lzf.h ]; then \ |
| 14 | + ln -s /usr/include/liblzf/lzf.h /usr/include/; \ |
| 15 | + fi \ |
12 | 16 | command: |
|
13 | 17 | REDIS_ARGS=""; \
|
14 |
| - if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ |
| 18 | + if php -m | grep -q "igbinary"; then \ |
15 | 19 | REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
|
16 | 20 | fi; \
|
17 |
| - if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ |
| 21 | + if php -m | grep -q "lz4"; then \ |
| 22 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-lz4 --with-liblz4=/usr"; \ |
| 23 | + fi; \ |
| 24 | + if php -m | grep -q "lzf"; then \ |
| 25 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-lzf --with-liblzf=/usr"; \ |
| 26 | + fi; \ |
| 27 | + if php -m | grep -q "msgpack"; then \ |
18 | 28 | REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
|
19 | 29 | fi; \
|
| 30 | + if php -m | grep -q "zstd"; then \ |
| 31 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-zstd"; \ |
| 32 | + fi; \ |
20 | 33 | phpize \
|
21 | 34 | && ./configure --enable-redis ${REDIS_ARGS} \
|
22 | 35 | && make -j$(getconf _NPROCESSORS_ONLN) \
|
23 | 36 | && make install \
|
| 37 | + build_dep: |
| 38 | + - liblz4-dev |
| 39 | + - liblzf-dev |
| 40 | + - libzstd-dev |
| 41 | + run_dep: |
| 42 | + - liblz4-1 |
| 43 | + - liblzf1 |
| 44 | + - libzstd1 |
24 | 45 |
|
25 |
| -8.2: |
| 46 | +# system liblzf not available |
| 47 | +# lzf.h: No such file or directory |
| 48 | +7.2: |
26 | 49 | type: git
|
27 | 50 | git_url: https://github.com/phpredis/phpredis
|
28 |
| - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) |
| 51 | + git_ref: $(git tag | grep -E '^[.0-9]+$' | sort -V | tail -1) |
29 | 52 | command: |
|
30 | 53 | REDIS_ARGS=""; \
|
31 |
| - if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ |
| 54 | + if php -m | grep -q "igbinary"; then \ |
32 | 55 | REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
|
33 | 56 | fi; \
|
34 |
| - if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ |
| 57 | + if php -m | grep -q "lz4"; then \ |
| 58 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-lz4 --with-liblz4=/usr"; \ |
| 59 | + fi; \ |
| 60 | + if php -m | grep -q "msgpack"; then \ |
35 | 61 | REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
|
36 | 62 | fi; \
|
| 63 | + if php -m | grep -q "zstd"; then \ |
| 64 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-zstd"; \ |
| 65 | + fi; \ |
37 | 66 | phpize \
|
38 | 67 | && ./configure --enable-redis ${REDIS_ARGS} \
|
39 |
| - && sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' library.c \ |
40 |
| - && sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' redis_array_impl.c \ |
41 | 68 | && make -j$(getconf _NPROCESSORS_ONLN) \
|
42 | 69 | && make install \
|
| 70 | + build_dep: |
| 71 | + - liblz4-dev |
| 72 | + - libzstd-dev |
| 73 | + run_dep: |
| 74 | + - liblz4-1 |
| 75 | + - libzstd1 |
43 | 76 |
|
44 |
| -8.1: |
| 77 | +# system liblzf not available |
| 78 | +# lzf.h: No such file or directory |
| 79 | +7.1: |
45 | 80 | type: git
|
46 | 81 | git_url: https://github.com/phpredis/phpredis
|
47 |
| - git_ref: $(git for-each-ref --format='%(refname)' refs/tags | grep -E 'tags/[.0-9]+$' | sed 's|.*tags/||g' | sort -V | tail -1) |
| 82 | + git_ref: $(git tag | grep -E '^[.0-9]+$' | sort -V | tail -1) |
48 | 83 | command: |
|
49 | 84 | REDIS_ARGS=""; \
|
50 |
| - if [ -d "/usr/local/include/php/ext/igbinary" ]; then \ |
| 85 | + if php -m | grep -q "igbinary"; then \ |
51 | 86 | REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \
|
52 | 87 | fi; \
|
53 |
| - if [ -d "/usr/local/include/php/ext/msgpack" ]; then \ |
| 88 | + if php -m | grep -q "lz4"; then \ |
| 89 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-lz4 --with-liblz4=/usr"; \ |
| 90 | + fi; \ |
| 91 | + if php -m | grep -q "msgpack"; then \ |
| 92 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \ |
| 93 | + fi; \ |
| 94 | + if php -m | grep -q "zstd"; then \ |
| 95 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-zstd"; \ |
| 96 | + fi; \ |
| 97 | + phpize \ |
| 98 | + && ./configure --enable-redis ${REDIS_ARGS} \ |
| 99 | + && make -j$(getconf _NPROCESSORS_ONLN) \ |
| 100 | + && make install \ |
| 101 | + build_dep: |
| 102 | + - liblz4-dev |
| 103 | + - libzstd-dev |
| 104 | + run_dep: |
| 105 | + - liblz4-1 |
| 106 | + - libzstd1 |
| 107 | + |
| 108 | +# system liblzf not available |
| 109 | +# libzstd is 1.1.2, but >=1.3.0 is required |
| 110 | +# lzf.h: No such file or directory |
| 111 | +7.0: |
| 112 | + type: git |
| 113 | + git_url: https://github.com/phpredis/phpredis |
| 114 | + git_ref: $(git tag | grep -E '^[.0-9]+$' | sort -V | tail -1) |
| 115 | + command: | |
| 116 | + REDIS_ARGS=""; \ |
| 117 | + if php -m | grep -q "igbinary"; then \ |
| 118 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-igbinary"; \ |
| 119 | + fi; \ |
| 120 | + if php -m | grep -q "lz4"; then \ |
| 121 | + REDIS_ARGS="${REDIS_ARGS} --enable-redis-lz4 --with-liblz4=/usr"; \ |
| 122 | + fi; \ |
| 123 | + if php -m | grep -q "msgpack"; then \ |
54 | 124 | REDIS_ARGS="${REDIS_ARGS} --enable-redis-msgpack"; \
|
55 | 125 | fi; \
|
56 | 126 | phpize \
|
57 | 127 | && ./configure --enable-redis ${REDIS_ARGS} \
|
58 |
| - && sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' library.c \ |
59 |
| - && sed -i'' 's/ops->hash_init(ctx);/ops->hash_init(ctx, NULL);/g' redis_array_impl.c \ |
60 | 128 | && make -j$(getconf _NPROCESSORS_ONLN) \
|
61 | 129 | && make install \
|
| 130 | + build_dep: |
| 131 | + - liblz4-dev |
| 132 | + run_dep: |
| 133 | + - liblz4-1 |
62 | 134 |
|
63 | 135 | 5.6:
|
64 | 136 | type: pecl
|
|
0 commit comments