From f5f4bf1a25464e03441c852c791f7ee8780536a1 Mon Sep 17 00:00:00 2001 From: AndersonTorres Date: Sun, 31 Aug 2014 09:45:44 -0300 Subject: [PATCH] Higan: Updating builder.sh script Now builder.sh will install a higan-config.sh script to write auxiliary stuff on $HOME/.config/higan directory. That way, higan searches locally and runs cleanly. Obviously it's a hack, but the only other way is to do a huge patch on upstream sources; personally I think it is better to work that type of thing directly on higan sources. --- pkgs/misc/emulators/higan/builder.sh | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/pkgs/misc/emulators/higan/builder.sh b/pkgs/misc/emulators/higan/builder.sh index a99ccf26dbb..0d01f7dc971 100644 --- a/pkgs/misc/emulators/higan/builder.sh +++ b/pkgs/misc/emulators/higan/builder.sh @@ -20,23 +20,16 @@ oldRPath=$(patchelf --print-rpath $out/bin/higan) patchelf --set-rpath $oldRPath:$out/lib $out/bin/higan # A dirty workaround, suggested by @cpages: -# we create a wrapper script to set up -# $HOME local configuration before higan runs +# we create a first-run script to populate +# the local $HOME with all the auxiliary +# stuff needed by higan at runtime -mv $out/bin/higan $out/bin/.higan-wrapped -cat < $out/bin/higan +cat < $out/bin/higan-config.sh +#!${shell} -#!/bin/bash -if [ ! -e \$HOME/.config/higan/.was_configured ] -then - cp --update --recursive $out/share/higan \$HOME/.config - chmod --recursive u+w \$HOME/.config/higan - touch \$HOME/.config/higan/.was_configured -fi -# LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$out/lib -$out/bin/.higan-wrapped "\$@" +cp --update --recursive $out/share/higan \$HOME/.config +chmod --recursive u+w \$HOME/.config/higan EOF -patchShebangs $out/bin/higan -chmod +x $out/bin/higan +chmod +x $out/bin/higan-config.sh