mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
fix folly (#3496)
* fix folly * wip * wip * instead of moving the build directory, let's just sanitize facebook's regexes * lols in apfs --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
parent
4826ea0aa8
commit
6503b1b827
|
@ -26,23 +26,28 @@ build:
|
|||
dependencies:
|
||||
cmake.org: ^3.0.2
|
||||
freedesktop.org/pkg-config: ^0.29
|
||||
working-directory:
|
||||
/tmp/xyz.tea.folly
|
||||
# ^^ facebook use a shitty custom regex function to remove sources that
|
||||
# shouldn’t be compiled from the library target. They start with *all sources*
|
||||
# our default build directory has a `+` in it which breaks facebook’s
|
||||
# piss awful code.
|
||||
#TODO don’t use exotic characters in our build directories
|
||||
script:
|
||||
- test -d xyz.tea.srcs && rm -rf xyz.tea.srcs
|
||||
- mv $SRCROOT xyz.tea.srcs
|
||||
- cmake $ARGS -DBUILD_SHARED_LIBS=ON -S xyz.tea.srcs -B shared
|
||||
# folly uses the path to build as part of a regex, but out paths have "+"s in them.
|
||||
# don't mess up the intentional newline
|
||||
- run: |
|
||||
sed -i.bak -E -f $PROP CMakeLists.txt
|
||||
rm CMakeLists.txt.bak
|
||||
prop: |
|
||||
/^REMOVE_MATCHES_FROM_LISTS\(files hfiles/ {
|
||||
i\\
|
||||
string(REPLACE "+" "\\\\\\\\+" ESCAPED_FOLLY_DIR "\\\${FOLLY_DIR}")
|
||||
}
|
||||
|
||||
s/\^\\\$\{FOLLY_DIR\}/^\\\$\{ESCAPED_FOLLY_DIR\}/g
|
||||
|
||||
- cmake $ARGS -DBUILD_SHARED_LIBS=ON -S . -B shared
|
||||
- cmake --build shared
|
||||
- cmake --install shared
|
||||
|
||||
- cmake $ARGS -DBUILD_SHARED_LIBS=OFF -S xyz.tea.srcs -B static
|
||||
- cmake $ARGS -DBUILD_SHARED_LIBS=OFF -S . -B static
|
||||
- cmake --build static
|
||||
- run: cp /tmp/xyz.tea.folly/static/libfolly.a libfollybenchmark.a
|
||||
|
||||
- run: cp $SRCROOT/static/libfolly.a libfollybenchmark.a
|
||||
working-directory: ${{prefix}}/static/folly
|
||||
|
||||
- run: |
|
||||
|
|
Loading…
Reference in a new issue