[arch-commits] Commit in ruby-rugged/repos (3 files)
David Runge
dvzrv at gemini.archlinux.org
Tue Aug 16 14:57:24 UTC 2022
Date: Tuesday, August 16, 2022 @ 14:57:23
Author: dvzrv
Revision: 1266633
archrelease: copy trunk to community-staging-x86_64
Added:
ruby-rugged/repos/community-staging-x86_64/
ruby-rugged/repos/community-staging-x86_64/PKGBUILD
(from rev 1266632, ruby-rugged/trunk/PKGBUILD)
ruby-rugged/repos/community-staging-x86_64/ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch
(from rev 1266632, ruby-rugged/trunk/ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch)
------------------------------------------------------+
PKGBUILD | 106 +++++++++++++++++
ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch | 36 +++++
2 files changed, 142 insertions(+)
Copied: ruby-rugged/repos/community-staging-x86_64/PKGBUILD (from rev 1266632, ruby-rugged/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2022-08-16 14:57:23 UTC (rev 1266633)
@@ -0,0 +1,106 @@
+# Maintainer: David Runge <dvzrv at archlinux.org>
+# Contributor: ChaosKid42 <christoph.scholz at gmail.com>
+# Contributor: Andy Weidenbaum <archbaum at gmail.com>
+
+_name=rugged
+# ideally this should match $pkgver, as package() might fail otherwise. thanks, github
+_libgit2_pkgver=1.5.0
+pkgname=ruby-rugged
+pkgver=1.5.0.1
+pkgrel=1
+pkgdesc="A Ruby binding to the libgit2 linkable library"
+arch=(x86_64)
+url="https://github.com/libgit2/rugged"
+license=(MIT)
+depends=(glibc ruby)
+makedepends=(libgit2 ruby-rdoc)
+checkdepends=(git ruby-minitest ruby-rake ruby-rake-compiler)
+options=(!emptydirs)
+source=(
+ $_name-$pkgver.tar.gz::https://github.com/libgit2/$_name/archive/v$pkgver.tar.gz
+ libgit2-$_libgit2_pkgver.tar.gz::https://github.com/libgit2/libgit2/archive/v$_libgit2_pkgver.tar.gz
+ $pkgname-1.5.0.1-remove_broken_libgit2_test.patch
+)
+sha512sums=('ae7cac3cf86c1889efb72e32e5fdbde15a31abf7ebf19c9c9b01a63b633fd4bfb3fef809c6003a9e6a2043dadad219eceb562447e2b0cd9ea06c52784bec12b7'
+ '7a32b27cd32bd03ce7be6c127317f82a4ac6f16615c3234699676781f4858d057edb0410b2fe36fd2e634b00748a8b0be17f23809e09a7602ba48185134300f7'
+ '7cf8c8f5ad361e8a88633d3ee75f15f5ece14c4d68471c7724b9b2752e2833efb4b01dbc50535b4a0b5a7c8cf36b4b610bc6c3f773cea8cea9a452d8f991bc40')
+b2sums=('e8a89a8b47a6b3165ac4eaccb9ba4f8b4b204bc1f40dc7b2d705b73e9bebc91ee1230dbddea487af8d5ea25cc84932eb6cf428adb638bcdecf867de59c154aa4'
+ '4108de0e8fc6a02e4172f47cb69cdfe8c85a0a72235432ca58b02d94e0bcb8390caf0c710060772551cc3a392291778ae14b561256c6d88058d0ae5a277f2fbf'
+ '28e7d1d61402dbedf19343013ead01175d7353b9c0bf965530662f0182a4942717889552479c8f145512c5ebae93425a74c3fe4060b91bbe5d30917f0d9ac5c0')
+
+prepare() {
+ # remove broken and useless libgit2 "version check":
+ # https://github.com/libgit2/rugged/issues/698
+ patch -Np1 -d $_name-$pkgver -i ../$pkgname-1.5.0.1-remove_broken_libgit2_test.patch
+
+ cd $_name-$pkgver
+ # we don't do version pinning
+ sed -r 's|~>|>=|g' -i $_name.gemspec
+ # source tarball doesn't include vendored libgit2 version, which is only
+ # needed for test fixtures (resources): https://github.com/libgit2/rugged/issues/801
+ mv -v ../libgit2-$_libgit2_pkgver/* vendor/libgit2
+ # remove all tests requiring an internet connection
+ rm -rv test/online/*
+}
+
+build() {
+ cd $_name-$pkgver
+ export CI_BUILD=true
+ export RUGGED_USE_SYSTEM_LIBRARIES=true
+ export CMAKE_FLAGS=" --use-system-libraries"
+ rake compile
+ rake gem
+}
+
+check(){
+ cd $_name-$pkgver
+ # ConfigTest#test_read_global_config_file fails, if no gitconfig is set for
+ # user...
+ # https://github.com/libgit2/rugged/issues/432
+ git config --global user.name "Foo Bar"
+ rake test --trace --verbose TESTOPTS="--verbose"
+}
+
+package() {
+ local _gemdir="$(gem env gemdir)"
+ depends+=(libgit2.so)
+
+ cd $_name-$pkgver
+ gem install \
+ --local \
+ --verbose \
+ --ignore-dependencies \
+ --no-user-install \
+ --install-dir "$pkgdir/$_gemdir" \
+ --bindir "$pkgdir/usr/bin" \
+ "pkg/$_name-$pkgver.gem"
+
+ # remove unrepreducible files
+ rm -frv \
+ "$pkgdir/$_gemdir/cache/" \
+ "$pkgdir/$_gemdir/gems/$_name-$pkgver/vendor/" \
+ "$pkgdir/$_gemdir/doc/$_name-$pkgver/ri/ext/"
+
+ find "$pkgdir/$_gemdir/gems/" \
+ -type f \
+ \( \
+ -iname "*.o" -o \
+ -iname "*.c" -o \
+ -iname "*.so" -o \
+ -iname "*.time" -o \
+ -iname "gem.build_complete" -o \
+ -iname "Makefile" \
+ \) \
+ -delete
+
+ find "$pkgdir/$_gemdir/extensions/" \
+ -type f \
+ \( \
+ -iname "mkmf.log" -o \
+ -iname "gem_make.out" \
+ \) \
+ -delete
+
+ install -vDm 644 "$pkgdir/$_gemdir/gems/$_name-$pkgver/LICENSE" -t "$pkgdir/usr/share/licenses/$pkgname/"
+ install -vDm 644 README.md CHANGELOG.md -t "$pkgdir/usr/share/doc/$pkgname"
+}
Copied: ruby-rugged/repos/community-staging-x86_64/ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch (from rev 1266632, ruby-rugged/trunk/ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch)
===================================================================
--- community-staging-x86_64/ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch (rev 0)
+++ community-staging-x86_64/ruby-rugged-1.5.0.1-remove_broken_libgit2_test.patch 2022-08-16 14:57:23 UTC (rev 1266633)
@@ -0,0 +1,36 @@
+diff -ruN a/ext/rugged/extconf.rb b/ext/rugged/extconf.rb
+--- a/ext/rugged/extconf.rb 2022-07-27 14:36:43.000000000 +0200
++++ b/ext/rugged/extconf.rb 2022-08-16 16:50:55.253886438 +0200
+@@ -65,32 +65,6 @@
+
+ if arg_config("--use-system-libraries", !!ENV['RUGGED_USE_SYSTEM_LIBRARIES'])
+ puts "Building Rugged using system libraries.\n"
+-
+- dir_config('git2').any? or pkg_config('libgit2')
+-
+- major = minor = nil
+-
+- File.readlines(File.join(LIBGIT2_DIR, "include", "git2", "version.h")).each do |line|
+- if !major && (matches = line.match(/^#define LIBGIT2_VER_MAJOR ([0-9]+)$/))
+- major = matches[1]
+- next
+- end
+-
+- if !minor && (matches = line.match(/^#define LIBGIT2_VER_MINOR ([0-9]+)$/))
+- minor = matches[1]
+- next
+- end
+-
+- break if major && minor
+- end
+-
+- try_compile(<<-SRC) or abort "libgit2 version is not compatible, expected ~> #{major}.#{minor}.0"
+-#include <git2/version.h>
+-
+-#if LIBGIT2_VER_MAJOR != #{major} || LIBGIT2_VER_MINOR != #{minor}
+-#error libgit2 version is not compatible
+-#endif
+- SRC
+ else
+ if !find_executable('cmake')
+ abort "ERROR: CMake is required to build Rugged."
More information about the arch-commits
mailing list