🔒 Repository is read-only – file editing is disabled.

recipes/utils/protobuf-c/PAGBUILD.yaml main

48 linii Raw ← Powrót
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
pkgname: 'protobuf-c'
pkgver: '1.5.2'
pkgrel: '9'
pkgdesc: 'Protocol Buffers implementation in C'
url: 'https://github.com/protobuf-c/protobuf-c'
arch: x86_64
license:
- BSD-2-Clause

depends:
- protobuf
- abseil-cpp

makedepends:
- protobuf
- abseil-cpp

source:
- "https://github.com/protobuf-c/protobuf-c/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.gz"
- 'protobuf-c-1.5.2-protobuf34_fix-1.patch'

sha256sums:
- SKIP
- SKIP

build: |
  cd ${pkgname}-${pkgver}

  if [ -f ../protobuf-c-1.5.2-protobuf34_fix-1.patch ]; then
      patch -Np1 -i ../protobuf-c-1.5.2-protobuf34_fix-1.patch
  fi

  # Wymuszenie C++20 dla nagłówków protobuf oraz flagi tolerancji dla GCC
  export CXXFLAGS="${CXXFLAGS} -std=c++20"
  export CFLAGS="${CFLAGS} -Wno-implicit-function-declaration -Wno-error=incompatible-pointer-types"

  ./configure --prefix=/usr \
              --sysconfdir=/etc \
              --localstatedir=/var \
              --disable-static

  make
  make DESTDIR="${PKGDIR}" install

  install -Dm644 LICENSE "${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE"

package: |
  true