mirror of
https://github.com/ivabus/pantry
synced 2024-11-22 08:25:07 +03:00
+facebook.com/fb303 (#4379)
* new file: projects/facebook.com/fb303/package.yml new file: projects/facebook.com/fb303/test.cpp * -fPIC * cxx flags in cmake args * lets try more flags * wip * wip * oops * maybe gcc for linux aarch64 * modified: projects/facebook.com/fb303/package.yml * add boost * looks like it wants a specific version * 1.84 is loaded * zlib * add -fPIC for linux * boost.org: ^1.84 * fbthrift ver * fbthrift => runtime dep --------- Co-authored-by: Jacob Heider <jacob@pkgx.dev>
This commit is contained in:
parent
f02fd21719
commit
f238471639
2 changed files with 53 additions and 0 deletions
46
projects/facebook.com/fb303/package.yml
Normal file
46
projects/facebook.com/fb303/package.yml
Normal file
|
@ -0,0 +1,46 @@
|
|||
distributable:
|
||||
url: https://github.com/facebook/fb303/archive/v{{version.raw}}.tar.gz
|
||||
strip-components: 1
|
||||
versions:
|
||||
github: facebook/fb303/tags
|
||||
dependencies:
|
||||
# these need to version match, but we don't have a method for that
|
||||
github.com/facebookincubator/fizz: '*'
|
||||
facebook.com/wangle: '*'
|
||||
facebook.com/folly: '*'
|
||||
facebook.com/fbthrift: '>=2023.12.18.0'
|
||||
fmt.dev: ^9
|
||||
gflags.github.io: ^2.2.2
|
||||
google.com/glog: ^0.6
|
||||
libsodium.org: ^1.0.19
|
||||
openssl.org: ^1.1
|
||||
linux:
|
||||
zlib.net: ^1
|
||||
build:
|
||||
dependencies:
|
||||
cmake.org: '*'
|
||||
facebook.com/mvfst: '*'
|
||||
boost.org: ^1.84
|
||||
script:
|
||||
- cmake -S . -B build $CMAKE_ARGS
|
||||
- cmake --build build
|
||||
- cmake --install build
|
||||
env:
|
||||
CMAKE_ARGS:
|
||||
- -DCMAKE_INSTALL_PREFIX="{{prefix}}
|
||||
- -DCMAKE_INSTALL_LIBDIR=lib
|
||||
- -DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_FIND_FRAMEWORK=LAST
|
||||
- -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
- -Wno-dev
|
||||
- -DBUILD_TESTING=OFF
|
||||
- -DPYTHON_EXTENSIONS=OFF
|
||||
- -DBUILD_SHARED_LIBS=ON
|
||||
linux:
|
||||
CMAKE_ARGS:
|
||||
- -DCMAKE_C_FLAGS=-fPIC
|
||||
- -DCMAKE_CXX_FLAGS=-fPIC
|
||||
- -DCMAKE_EXE_LINKER_FLAGS=-pie
|
||||
test:
|
||||
- c++ -std=c++17 test.cpp -o test -lfb303_thrift_cpp -lfolly -lglog -lthriftprotocol -lthriftcpp2 -ldl
|
||||
- ./test | grep 'BaseService'
|
7
projects/facebook.com/fb303/test.cpp
Normal file
7
projects/facebook.com/fb303/test.cpp
Normal file
|
@ -0,0 +1,7 @@
|
|||
#include "fb303/thrift/gen-cpp2/BaseService.h"
|
||||
#include <iostream>
|
||||
int main() {
|
||||
auto service = facebook::fb303::cpp2::BaseServiceSvIf();
|
||||
std::cout << service.getGeneratedName() << std::endl;
|
||||
return 0;
|
||||
}
|
Loading…
Reference in a new issue