FS#77902 - [re2] build with cmake instead makefile

Attached to Project: Arch Linux
Opened by Gustavo Alvarez (sl1pkn07) - Saturday, 18 March 2023, 21:51 GMT
Last edited by Buggy McBugFace (bugbot) - Saturday, 25 November 2023, 20:18 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Evangelos Foutras (foutrelis)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

re2 can be build with cmake, and if use this method, the installation provide the necessary .cmake file for integrate with other cmake projects. makefile method lack this one


makefile: https://github.com/google/re2/blob/b059ae85c83ca6b1f29dba20e92e4acb85cb5b29/Makefile#L322-L330
cmake: https://github.com/google/re2/blob/b059ae85c83ca6b1f29dba20e92e4acb85cb5b29/CMakeLists.txt#L202-L218

greetings
This task depends upon

Closed by  Buggy McBugFace (bugbot)
Saturday, 25 November 2023, 20:18 GMT
Reason for closing:  Moved
Additional comments about closing:  https://gitlab.archlinux.org/archlinux/p ackaging/packages/re2/issues/1
Comment by Toolybird (Toolybird) - Saturday, 18 March 2023, 21:56 GMT
Have you looked at  FS#67739 ?
Comment by Gustavo Alvarez (sl1pkn07) - Saturday, 18 March 2023, 22:21 GMT Comment by Gustavo Alvarez (sl1pkn07) - Saturday, 18 March 2023, 22:56 GMT
Hi

modified pkgbuild
~~~
# Maintainer: Evangelos Foutras <evangelos@foutrelis.com>
# Contributor: Anatol Pomozov <anatol.pomozov@gmail.com>
# Contributor: Gustavo Alvarez <sl1pkn07@gmail.com>
# Contributor: Alexandre Bique <bique.alexandre@gmail.com>

pkgname=re2
_re2ver=2023-03-01
pkgrel=1
epoch=1
pkgver=${_re2ver//-}
pkgdesc="Fast, safe, thread-friendly regular expression engine"
arch=('x86_64')
url="https://github.com/google/re2"
license=('BSD')
depends=('gcc-libs')
makedepends=(cmake)
provides=('libre2.so')
source=(re2-$pkgver.tar.gz::https://github.com/google/re2/archive/$_re2ver.tar.gz)
sha256sums=('7a9a4824958586980926a300b4717202485c4b4115ac031822e29aa4ef207e48')

build() {
cmake -S $pkgname-$_re2ver -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=ON

cmake --build build
}

check() {
cmake --build build --target test
}

package() {
DESTDIR="$pkgdir" cmake --install build
install -Dm644 $pkgname-$_re2ver/LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
~~~

tested in local with onnxruntime and now re2 is catched and configure by cmake

greetings

Loading...