# Contributor: Jakub Jirutka # Maintainer: Jakub Jirutka pkgname=ruby-pkg-config _gemname=pkg-config pkgver=1.5.2 pkgrel=0 pkgdesc="pkg-config implemented by pure Ruby" url="https://github.com/ruby-gnome/pkg-config" arch="noarch" license="LGPL-2.0-or-later" depends="ruby" checkdepends=" cairo-dev ruby-dev ruby-test-unit " source="https://github.com/ruby-gnome/pkg-config/archive/$pkgver/ruby-pkg-config-$pkgver.tar.gz gemspec.patch " builddir="$srcdir/$_gemname-$pkgver" # fail with pkgconf ordering: # <"-I/usr/include/cairo -I/usr/include/freetype2 -I/usr/include/pixman-1 -I/usr/include/libpng16">(UTF-8) expected but was # <"-I/usr/include/cairo -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/pixman-1">(ASCII-8BIT) options="!check" build() { gem build $_gemname.gemspec } check() { # test_cflags*: pkg-config returns -I flags in a different order. ruby test/run-test.rb \ --ignore-name test_cflags \ --ignore-name test_cflags_only_I } package() { local gemdir="$pkgdir/$(ruby -e 'puts Gem.default_dir')" gem install \ --local \ --install-dir "$gemdir" \ --ignore-dependencies \ --no-document \ --verbose \ $_gemname # Remove unnecessary files and rubbish... cd "$gemdir" rm -r cache build_info doc } sha512sums=" 5c41593cc1d80549fac6fda4453841944a2d69ca922aeff44b0955839435014a824084cf4f03f24fbc6f61f70c7214d0a2446e421969508d42016728d986ebb8 ruby-pkg-config-1.5.2.tar.gz d3dc12c47ca186ae0cde00788272a71d2a9256df280e9164a9a3c54ca8f27a681cc7808ce16546c15ae7af19d379da7ca0dd48f72ba740aa0fa0b8b5d7a8e650 gemspec.patch "