diff --git a/buildenv/1.3.x/centos-ermine/benchmark.build b/buildenv/1.3.x/centos-ermine/benchmark.build new file mode 100755 index 00000000..2b527ad1 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/benchmark.build @@ -0,0 +1,28 @@ +#!/usr/bin/env mumble-build +# Copyright 2013-2015 The 'mumble-releng' Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file in the source tree or at +# . + +urls=( + "http://releng-distfiles.mumble.info/releng-distfiles/benchmark-1.2.0.tar.gz" + "https://github.com/google/benchmark/archive/v1.2.0.tar.gz#fn=benchmark-1.2.0.tar.gz" +) + +digests=( +) + +function extract { + tar -zxf benchmark-1.2.0.tar.gz + cd benchmark-1.2.0 +} + +function build { + BUILD_TYPE="RelWithDebInfo" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} -DCMAKE_INSTALL_RPATH=${MUMBLE_PREFIX}/lib + make +} + +function install { + make install +} diff --git a/buildenv/1.3.x/centos-ermine/build-all.bash b/buildenv/1.3.x/centos-ermine/build-all.bash index 338d58e5..27acf55f 100755 --- a/buildenv/1.3.x/centos-ermine/build-all.bash +++ b/buildenv/1.3.x/centos-ermine/build-all.bash @@ -33,6 +33,12 @@ ./patchelf.build ./linuxdeployqt.build +# gRPC +./c-ares.build +./benchmark.build +./gflags.build +./grpc.build + if [ -n "${MUMBLE_BUILD_FETCHMODE}" ]; then exit 0 fi diff --git a/buildenv/1.3.x/centos-ermine/c-ares.build b/buildenv/1.3.x/centos-ermine/c-ares.build new file mode 100755 index 00000000..9ea26d66 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/c-ares.build @@ -0,0 +1,36 @@ +#!/usr/bin/env mumble-build +# Copyright 2013-2017 The 'mumble-releng' Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file in the source tree or at +# . + +function fetch { + if [ -d c-ares ]; then + cd c-ares + git reset --hard cares-1_13_0 + git clean -dfx + else + git clone https://github.com/c-ares/c-ares.git + cd c-ares + git fetch origin + git checkout cares-1_13_0 + fi +} + +function extract { + : +} + +function verify { + : +} + +function build { + BUILD_TYPE="RelWithDebInfo" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} -DCMAKE_INSTALL_RPATH=${MUMBLE_PREFIX}/lib + make +} + +function install { + make install +} diff --git a/buildenv/1.3.x/centos-ermine/gflags.build b/buildenv/1.3.x/centos-ermine/gflags.build new file mode 100755 index 00000000..01cf207f --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/gflags.build @@ -0,0 +1,28 @@ +#!/usr/bin/env mumble-build +# Copyright 2013-2015 The 'mumble-releng' Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file in the source tree or at +# . + +urls=( + "http://releng-distfiles.mumble.info/releng-distfiles/gflags-2.2.1.tar.gz" + "https://github.com/gflags/gflags/archive/v2.2.1.tar.gz#fn=gflags-2.2.1.tar.gz" +) + +digests=( +) + +function extract { + tar -zxf gflags-2.2.1.tar.gz + cd gflags-2.2.1 +} + +function build { + BUILD_TYPE="RelWithDebInfo" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} -DCMAKE_INSTALL_RPATH=${MUMBLE_PREFIX}/lib + make +} + +function install { + make install +} diff --git a/buildenv/1.3.x/centos-ermine/googletest.build b/buildenv/1.3.x/centos-ermine/googletest.build new file mode 100755 index 00000000..f0683a94 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/googletest.build @@ -0,0 +1,28 @@ +#!/usr/bin/env mumble-build +# Copyright 2013-2015 The 'mumble-releng' Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file in the source tree or at +# . + +urls=( + "http://releng-distfiles.mumble.info/releng-distfiles/googletest-1.8.0.tar.gz" + "https://github.com/google/googletest/archive/release-1.8.0.tar.gz#fn=googletest-1.8.0.tar.gz" +) + +digests=( +) + +function extract { + tar -zxf googletest-1.8.0.tar.gz + cd googletest-release-1.8.0 # yuck +} + +function build { + BUILD_TYPE="RelWithDebInfo" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} -DCMAKE_INSTALL_RPATH=${MUMBLE_PREFIX}/lib + make +} + +function install { + make install +} diff --git a/buildenv/1.3.x/centos-ermine/grpc.build b/buildenv/1.3.x/centos-ermine/grpc.build new file mode 100755 index 00000000..bf468b36 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/grpc.build @@ -0,0 +1,32 @@ +#!/usr/bin/env mumble-build +# Copyright 2013-2015 The 'mumble-releng' Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file in the source tree or at +# . + +urls=( + "http://releng-distfiles.mumble.info/releng-distfiles/grpc-1.4.2.tar.gz" + "https://github.com/grpc/grpc/archive/v1.4.2.tar.gz#fn=grpc-1.4.2.tar.gz" +) + +digests=( +) + +function extract { + tar -zxf grpc-1.4.2.tar.gz + cd grpc-1.4.2 +} + +function prepare { + patch -p1 < ${MUMBLE_BUILDENV_ROOT}/patches/grpc-1.4.2-work-with-upstream-cares.patch +} + +function build { + BUILD_TYPE="RelWithDebInfo" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_PREFIX_PATH=${MUMBLE_PREFIX} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} -DCMAKE_INSTALL_RPATH=${MUMBLE_PREFIX}/lib -DgRPC_ZLIB_PROVIDER=package -DgRPC_CARES_PROVIDER=package -DgRPC_SSL_PROVIDER=package -DgRPC_PROTOBUF_PROVIDER=package -DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG -DgRPC_GFLAGS_PROVIDER=package -DgRPC_BENCHMARK_PROVIDER=package -DgRPC_USE_PROTO_LITE=1 + make +} + +function install { + make install +} diff --git a/buildenv/1.3.x/centos-ermine/gtest.build b/buildenv/1.3.x/centos-ermine/gtest.build new file mode 100755 index 00000000..2b527ad1 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/gtest.build @@ -0,0 +1,28 @@ +#!/usr/bin/env mumble-build +# Copyright 2013-2015 The 'mumble-releng' Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that +# can be found in the LICENSE file in the source tree or at +# . + +urls=( + "http://releng-distfiles.mumble.info/releng-distfiles/benchmark-1.2.0.tar.gz" + "https://github.com/google/benchmark/archive/v1.2.0.tar.gz#fn=benchmark-1.2.0.tar.gz" +) + +digests=( +) + +function extract { + tar -zxf benchmark-1.2.0.tar.gz + cd benchmark-1.2.0 +} + +function build { + BUILD_TYPE="RelWithDebInfo" + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} -DCMAKE_INSTALL_RPATH=${MUMBLE_PREFIX}/lib + make +} + +function install { + make install +} diff --git a/buildenv/1.3.x/centos-ermine/patches/grpc-1.4.2-work-with-upstream-cares.patch b/buildenv/1.3.x/centos-ermine/patches/grpc-1.4.2-work-with-upstream-cares.patch new file mode 100644 index 00000000..35622510 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/patches/grpc-1.4.2-work-with-upstream-cares.patch @@ -0,0 +1,17 @@ +--- ./CMakeLists.txt ++++ ./CMakeLists.txt +@@ -150,11 +150,10 @@ if("${gRPC_CARES_PROVIDER}" STREQUAL "mo + message(WARNING "gRPC_CARES_PROVIDER is \"module\" but CARES_ROOT_DIR is wrong") + endif() + elseif("${gRPC_CARES_PROVIDER}" STREQUAL "package") +- find_package(CARES) +- if(TARGET CARES::CARES) +- set(_gRPC_CARES_LIBRARIES CARES::CARES) ++ find_package(c-ares) ++ if(TARGET c-ares::cares) ++ set(_gRPC_CARES_LIBRARIES c-ares::cares) + endif() +- set(_gRPC_FIND_CARES "if(NOT CARES_FOUND)\n find_package(CARES)\nendif()") + endif() + + if("${gRPC_PROTOBUF_PROVIDER}" STREQUAL "module") diff --git a/buildenv/1.3.x/centos-ermine/patches/protobuf-3.2.0-install-pkg-config-files-for-cmake-build.patch b/buildenv/1.3.x/centos-ermine/patches/protobuf-3.2.0-install-pkg-config-files-for-cmake-build.patch new file mode 100644 index 00000000..12b6abf9 --- /dev/null +++ b/buildenv/1.3.x/centos-ermine/patches/protobuf-3.2.0-install-pkg-config-files-for-cmake-build.patch @@ -0,0 +1,73 @@ +From 668712c58fe518fdc997cc2103b848b043adceb6 Mon Sep 17 00:00:00 2001 +From: Axel Huebl +Date: Fri, 21 Jul 2017 18:57:07 +0200 +Subject: [PATCH 1/2] CMake: Install .pc Files + +Adds pkg-config (`.pc`) files for CMake based installs. +--- + cmake/install.cmake | 7 +++++++ + cmake/protobuf-lite.pc.cmake | 11 +++++++++++ + cmake/protobuf.pc.cmake | 11 +++++++++++ + 3 files changed, 29 insertions(+) + create mode 100644 cmake/protobuf-lite.pc.cmake + create mode 100644 cmake/protobuf.pc.cmake + +diff --git a/cmake/install.cmake b/cmake/install.cmake +index 28dc90dc3f..441bf5532a 100644 +--- a/cmake/install.cmake ++++ b/cmake/install.cmake +@@ -1,5 +1,10 @@ + include(GNUInstallDirs) + ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf.pc.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc @ONLY) ++configure_file(${CMAKE_CURRENT_SOURCE_DIR}/protobuf-lite.pc.cmake ++ ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc @ONLY) ++ + foreach(_library + libprotobuf-lite + libprotobuf +@@ -17,6 +22,8 @@ endforeach() + install(TARGETS protoc EXPORT protobuf-targets + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc) + ++install(FILES ${CMAKE_CURRENT_BINARY_DIR}/protobuf.pc ${CMAKE_CURRENT_BINARY_DIR}/protobuf-lite.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") ++ + file(STRINGS extract_includes.bat.in _extract_strings + REGEX "^copy") + foreach(_extract_string ${_extract_strings}) +diff --git a/cmake/protobuf-lite.pc.cmake b/cmake/protobuf-lite.pc.cmake +new file mode 100644 +index 0000000000..cbe5426afa +--- /dev/null ++++ b/cmake/protobuf-lite.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ ++ ++Name: Protocol Buffers ++Description: Google's Data Interchange Format ++Version: @protobuf_VERSION@ ++Libs: -L${libdir} -lprotobuf-lite @CMAKE_THREAD_LIBS_INIT@ ++Cflags: -I${includedir} @CMAKE_THREAD_LIBS_INIT@ ++Conflicts: protobuf +diff --git a/cmake/protobuf.pc.cmake b/cmake/protobuf.pc.cmake +new file mode 100644 +index 0000000000..d33e98cca8 +--- /dev/null ++++ b/cmake/protobuf.pc.cmake +@@ -0,0 +1,11 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=@CMAKE_INSTALL_PREFIX@ ++libdir=@CMAKE_INSTALL_FULL_LIBDIR@ ++includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ ++ ++Name: Protocol Buffers ++Description: Google's Data Interchange Format ++Version: @protobuf_VERSION@ ++Libs: -L${libdir} -lprotobuf @CMAKE_THREAD_LIBS_INIT@ ++Cflags: -I${includedir} @CMAKE_THREAD_LIBS_INIT@ ++Conflicts: protobuf-lite + diff --git a/buildenv/1.3.x/centos-ermine/protobuf.build b/buildenv/1.3.x/centos-ermine/protobuf.build index eab18f7b..1cc21d3f 100755 --- a/buildenv/1.3.x/centos-ermine/protobuf.build +++ b/buildenv/1.3.x/centos-ermine/protobuf.build @@ -5,25 +5,35 @@ # . urls=( - "http://releng-distfiles.mumble.info/releng-distfiles/protobuf-2.6.1.tar.bz2" - "https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.bz2" + "http://releng-distfiles.mumble.info/releng-distfiles/protobuf-cpp-3.2.0.tar.gz" + "https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz" ) digests=( - "sha1:6421ee86d8fb4e39f21f56991daa892a3e8d314b" - "sha256:ee445612d544d885ae240ffbcbf9267faa9f593b7b101f21d58beceb92661910" + "sha1:7518aef2471e7398ebd0d85a53836d6a076222d5" + "sha256:51d773e4297238b282eaa4c1dd317099675b12eef2b414732b851c00459225c6" ) function extract { - tar -jxf protobuf-2.6.1.tar.bz2 - cd protobuf-2.6.1 + tar -zxf protobuf-cpp-3.2.0.tar.gz + cd protobuf-3.2.0 +} + +function prepare { + patch -p1 < ${MUMBLE_BUILDENV_ROOT}/patches/protobuf-3.2.0-install-pkg-config-files-for-cmake-build.patch } function build { - ./configure --prefix=${MUMBLE_PREFIX} + BUILD_TYPE="RelWithDebInfo" + cd cmake + cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=${BUILD_TYPE} -DCMAKE_INSTALL_PREFIX=${MUMBLE_PREFIX} make } +function testsuite { + make check +} + function install { make install }