Commit 1e00aa6
0
plików
+0
dodanych
-0
usuniętych
@@ -9,20 +9,38 @@ license:
9
9
depends:
10
10
- python
11
11
- protobuf
12
+- abseil-cpp
12
13
makedepends:
14
+- git
15
+- cmake
16
+- ninja
13
17
- python-setuptools
14
18
- python-build
15
19
- python-installer
16
20
- python-wheel
17
21
source:
18
-- 'https://files.pythonhosted.org/packages/4a/1c/6ddf4a56a6ee018ef6ed3d2db73b6aa856db746b1bc3000676451610cf0c/protobuf-${pkgver}.tar.gz'
22
+- 'git+https://github.com/protocolbuffers/protobuf.git#tag=v${pkgver}'
19
23
sha256sums:
20
-- 7a7baff8207a57f3fe5c233d432a09eba67bdfb55a3145839d0817cae8e807a4
24
+- SKIP
21
25
build: |
22
- cd protobuf-${pkgver}
26
+ cd protobuf
27
+
28
+ # 1. Konfiguracja CMake tak jak w Archu (użycie systemowych abseil i protobuf)
29
+ cmake -B build -G Ninja \
30
+ -DCMAKE_BUILD_TYPE=Release \
31
+ -DCMAKE_INSTALL_PREFIX=/usr \
32
+ -Dprotobuf_BUILD_TESTS=OFF \
33
+ -Dprotobuf_ABSL_PROVIDER=package \
34
+ -Dprotobuf_BUILD_PROTOC_BINARIES=OFF
35
+
36
+ cmake --build build
37
+
38
+ # 2. Budowanie paczki Pythonowej ze skompilowanymi modułami C++
39
+ cd python
40
+ export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=cpp
23
41
python -m build --wheel --no-isolation
24
42
python -m installer --destdir="${PKGDIR}" dist/*.whl
25
43
26
- install -Dm644 LICENSE ${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE
44
+ install -Dm644 ../LICENSE ${PKGDIR}/usr/share/licenses/${pkgname}/LICENSE
27
45
package: |
28
46
true