Commit 2f4392bc authored by James Larrowe's avatar James Larrowe Committed by Ed Reel

Update nethack package (#2831)

Fixes #2240

Tested on:
- [x] x86_64
parent 11142178
...@@ -3,22 +3,15 @@ require 'package' ...@@ -3,22 +3,15 @@ require 'package'
class Nethack4 < Package class Nethack4 < Package
description 'NetHack is a \'roguelike\' game following in the same tradition; the player controls an adventurer delving into a randomly generated dungeon to retrieve the Amulet of Yendor from its depths.' description 'NetHack is a \'roguelike\' game following in the same tradition; the player controls an adventurer delving into a randomly generated dungeon to retrieve the Amulet of Yendor from its depths.'
homepage 'http://nethack4.org/' homepage 'http://nethack4.org/'
# "nethack4" fork of nethack with a few patches and a modern build system version '4.3.0-beta2-1'
version '4.3.0-beta2'
source_url 'http://nethack4.org/media/releases/nethack4-4.3-beta2.tar.gz' source_url 'http://nethack4.org/media/releases/nethack4-4.3-beta2.tar.gz'
source_sha256 'b143a86b5e1baf55c663ae09c2663b169d265e95ac43154982296a1887d05f15' source_sha256 'b143a86b5e1baf55c663ae09c2663b169d265e95ac43154982296a1887d05f15'
binary_url ({ binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/nethack4-4.3.0-beta2-chromeos-armv7l.tar.xz', x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/nethack4-4.3.0-beta2-1-chromeos-x86_64.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/nethack4-4.3.0-beta2-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/nethack4-4.3.0-beta2-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/nethack4-4.3.0-beta2-chromeos-x86_64.tar.xz',
}) })
binary_sha256 ({ binary_sha256 ({
aarch64: 'b7c8e1b4bad569b52dfb8fbba4c4fb3b4c00aba47271ddd1ead52b5a772f720a', x86_64: '76fead3fb952f1b03b6bc11350657e91d975325dd48c8f3063dca35d53b836bf',
armv7l: 'b7c8e1b4bad569b52dfb8fbba4c4fb3b4c00aba47271ddd1ead52b5a772f720a',
i686: 'fb5a00964bb65c957b72830ee228228fceae21051a6512a6b139529fb1dd9673',
x86_64: '1bf25169c0040001e2d3c4b0a9fedd5bd3d38c47735f7e3a5c2587e117e95b70',
}) })
depends_on 'buildessential' depends_on 'buildessential'
...@@ -28,20 +21,36 @@ class Nethack4 < Package ...@@ -28,20 +21,36 @@ class Nethack4 < Package
depends_on 'perl' depends_on 'perl'
def self.build def self.build
target="build" FileUtils.mkdir("build")
system "mkdir -p " + target Dir.chdir("build") do
Dir.chdir target do system "#{CREW_PREFIX}/bin/perl",
#build with rpath pointing at #{CREW_PREFIX} "../aimake",
system "#{CREW_PREFIX}/bin/perl ../aimake --config-only -i #{CREW_PREFIX}/ --directory-layout=prefix --without=gui" "--config-only",
system "#{CREW_PREFIX}/bin/perl ../aimake" "--override-directory", "libdir=#{CREW_LIB_PREFIX}",
"--override-directory", "specificlibdir=#{CREW_LIB_PREFIX}",
"--override-directory", "staterootdir=#{CREW_PREFIX}/var",
"--override-directory", "gamesstatedir=#{CREW_PREFIX}/var/games/nethack4",
"--directory-layout=prefix",
"--destdir=#{CREW_DEST_DIR}",
"-i", "#{CREW_PREFIX}/",
"--without=gui"
system "#{CREW_PREFIX}/bin/perl",
"../aimake"
end end
end end
def self.install def self.install
target="build" Dir.chdir("build") do
Dir.chdir target do system "#{CREW_PREFIX}/bin/perl",
#install in destdir so package manager can keep track "../aimake",
system "#{CREW_PREFIX}/bin/perl ../aimake --install-only -i #{CREW_DEST_PREFIX}/ --directory-layout=prefix --without=gui" "--install-only",
"--override-directory", "libdir=#{CREW_LIB_PREFIX}",
"--override-directory", "specificlibdir=#{CREW_LIB_PREFIX}",
"--override-directory", "staterootdir=#{CREW_PREFIX}/var",
"--override-directory", "gamesstatedir=#{CREW_PREFIX}/var/games/nethack4",
"--directory-layout=prefix",
"--destdir=#{CREW_DEST_DIR}",
"-i", "#{CREW_PREFIX}/",
"--without=gui"
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment