Last active
December 23, 2015 14:19
-
-
Save drinkcat/6647577 to your computer and use it in GitHub Desktop.
ruby-rmagick new PKGBUILD.
Patch from https://github.com/bricef/rmagick/commit/689271fbb439dbf735f120811ac3b2dc79ba95a2
It seems to work for simple cases (at least we can compile and use rmagick), no idea how badly HDR images handling is broken.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 689271fbb439dbf735f120811ac3b2dc79ba95a2 Mon Sep 17 00:00:00 2001 | |
From: Brice Fernandes <[email protected]> | |
Date: Mon, 19 Aug 2013 03:02:54 +0100 | |
Subject: [PATCH] Attempt to fix bug #18 in original repo. (to enable Ruby | |
bundling on Arch Linux) | |
--- | |
ext/RMagick/extconf.rb | 8 -------- | |
ext/RMagick/rmimage.c | 2 +- | |
2 files changed, 1 insertion(+), 9 deletions(-) | |
diff --git a/ext/RMagick/extconf.rb b/ext/RMagick/extconf.rb | |
index d3228dd..b6a1f04 100644 | |
--- a/ext/RMagick/extconf.rb | |
+++ b/ext/RMagick/extconf.rb | |
@@ -152,14 +152,6 @@ def check_partial_imagemagick_versions() | |
$magick_version = `Magick-config --version`.chomp | |
- # Ensure ImageMagick is not configured for HDRI | |
- unless checking_for("HDRI disabled version of ImageMagick") do | |
- not (`Magick-config --version`["HDRI"]) | |
- end | |
- exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+ | |
- "\nRMagick does not work when ImageMagick is configured for High Dynamic Range Images."+ | |
- "\nDon't use the --enable-hdri option when configuring ImageMagick.\n" | |
- end | |
# Save flags | |
$CFLAGS = ENV["CFLAGS"].to_s + " " + `Magick-config --cflags`.chomp | |
diff --git a/ext/RMagick/rmimage.c b/ext/RMagick/rmimage.c | |
index 64de23a..4ecd117 100644 | |
--- a/ext/RMagick/rmimage.c | |
+++ b/ext/RMagick/rmimage.c | |
@@ -9819,7 +9819,7 @@ VALUE Image_filesize(VALUE self) | |
#else | |
IndexPacket *indexes = GetIndexes(image); | |
#endif | |
- old_color = image->colormap[*indexes]; | |
+ old_color = image->colormap[(unsigned long)*indexes]; | |
} | |
if (!image->matte) | |
{ | |
-- | |
1.8.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Contributor: Alexsandr Pavlov <kidoz at mail dot ru> | |
pkgname=ruby-rmagick | |
_gemname=${pkgname#ruby-} | |
pkgver=2.13.2 | |
pkgrel=2 | |
pkgdesc="Interface between the Ruby programming language and the ImageMagick" | |
arch=('i686' 'x86_64') | |
url="http://rmagick.rubyforge.org" | |
license=(MIT) | |
depends=('ruby' 'imagemagick' 'rubygems') | |
source=(http://rubygems.org/downloads/${_gemname}-${pkgver}.gem | |
hdri.patch) | |
noextract=(${_gemname}-${pkgver}.gem) | |
sha256sums=('e4f3b4c6ef6d6e89d8183080ee17093f42860c960f854608f4aa44ec8bce85bb' | |
'a44d1572249fefb3c0c10f22c1a259e16d502bf5ade7c456e88008acce906cc0') | |
build() { | |
cd "${srcdir}" | |
gem unpack --target="${srcdir}" ${_gemname}-${pkgver}.gem | |
cd "${srcdir}/${_gemname}-${pkgver}" | |
patch -p1 < "${srcdir}/hdri.patch" | |
gem build rmagick.gemspec | |
} | |
package() { | |
cd "${srcdir}" | |
export HOME=/tmp | |
local _gemdir="$(ruby -rubygems -e'puts Gem.default_dir')" | |
gem install --no-user-install --ignore-dependencies -i "${pkgdir}${_gemdir}" \ | |
"${srcdir}/${_gemname}-${pkgver}/${_gemname}-${pkgver}.gem" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think the checksum for hdri.patch needs to be updated in the PKGBUILD. It's conceivable something is weird on my end but I'm getting: 6a72973fe20d42abca8fde027d29982fe80f6e57b9b5c8d892f88d17078423d2 as the sha256sum