| 1 | package=protobuf |
| 2 | $(package)_version=$(native_$(package)_version) |
| 3 | $(package)_download_path=$(native_$(package)_download_path) |
| 4 | $(package)_file_name=$(native_$(package)_file_name) |
| 5 | $(package)_sha256_hash=$(native_$(package)_sha256_hash) |
| 6 | $(package)_dependencies=native_$(package) |
| 7 | $(package)_cxxflags=-std=c++11 |
| 8 | $(package)_patches=visibility.patch |
| 9 | |
| 10 | define $(package)_set_vars |
| 11 | $(package)_config_opts=--disable-shared --with-protoc=$(build_prefix)/bin/protoc |
| 12 | $(package)_config_opts_linux=--with-pic |
| 13 | endef |
| 14 | |
| 15 | define $(package)_preprocess_cmds |
| 16 | patch -p0 < $($(package)_patch_dir)/visibility.patch |
| 17 | endef |
| 18 | |
| 19 | define $(package)_config_cmds |
| 20 | $($(package)_autoconf) AR_FLAGS=$($(package)_arflags) |
| 21 | endef |
| 22 | |
| 23 | define $(package)_build_cmds |
| 24 | $(MAKE) -C src libprotobuf.la |
| 25 | endef |
| 26 | |
| 27 | define $(package)_stage_cmds |
| 28 | $(MAKE) DESTDIR=$($(package)_staging_dir) -C src install-libLTLIBRARIES install-nobase_includeHEADERS &&\ |
| 29 | $(MAKE) DESTDIR=$($(package)_staging_dir) install-pkgconfigDATA |
| 30 | endef |
| 31 | |
| 32 | define $(package)_postprocess_cmds |
| 33 | rm lib/libprotoc.a &&\ |
| 34 | rm lib/*.la |
| 35 | endef |
| 36 |