[squeak-dev] International text input on X11
Yoshiki Ohshima
Yoshiki.Ohshima at acm.org
Tue May 17 01:27:06 UTC 2016
Okay. I think dist-upgrade did it and here is a new patch that is
against the latest /usr/bin/scratch:
On Mon, May 16, 2016 at 5:07 PM, tim Rowledge <tim at rowledge.org> wrote:
>
>> On 16-05-2016, at 5:01 PM, Yoshiki Ohshima <Yoshiki.Ohshima at acm.org> wrote:
>>
>> Oh, shoot. Are you talking about "May-10" version? I am just now
>> trying apt-get dist-upgrade but would it update /usr/bin/scratch?
>
> Yup. upgrade etc *ought* to work but I too often read of problems, so I just fetch a full release and so on. I guess you might try specifically updating nuscratch (can you do that? I dunno, probably too logical for unix), though you ought to get the pigpio libraries/daemon as well or the gpio server will not work.
>
>>
>> In any case, at least the patch attached to my last email captures the
>> change that is needed and get rid of the need to call /usr/bin/squeak.
>> So adapting this should not be hard.
>>
>>
>>
>> --
>> -- Yoshiki
>>
>>
>
>
> tim
> --
> tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
> "Both.." said Pooh, as the guillotine came down
>
>
>
--
-- Yoshiki
-------------- next part --------------
*** /usr/bin/scratch 2016-05-02 18:38:55.000000000 +0000
--- scratch 2016-05-17 01:24:53.503234451 +0000
***************
*** 5,13 ****
# Adapted by: Miriam Ruiz, Alex Bradbury, tim at Rowledge.org
# tim - trying to simplify a bit but good grief, shell script is incomprehensible
! VM="/usr/bin/squeak"
! IMAGE="/usr/share/scratch/NuScratch02052016.image"
IMOPTIONS=""
DOCUMENT=""
WRAPPER=""
#set to 1 to work around OLPC bug #8008
--- 5,14 ----
# Adapted by: Miriam Ruiz, Alex Bradbury, tim at Rowledge.org
# tim - trying to simplify a bit but good grief, shell script is incomprehensible
! VM=`echo /usr/lib/squeak/5.0-*/squeak|sort -r | head -1`
! IMAGE="/usr/share/scratch/NuScratch15012016.image"
IMOPTIONS=""
+ DISPLAYMODULE=-vm-display-X11
DOCUMENT=""
WRAPPER=""
#set to 1 to work around OLPC bug #8008
***************
*** 26,32 ****
{
echo "Usage: scratch [--param value] [-vmopt value] [arg value]"
echo " where --param is --vm, --image, or --document;"
! echo " -vmopt is an option passed to the Squeak VM;"
echo " and args are passed to the Squeak image."
}
--- 27,34 ----
{
echo "Usage: scratch [--param value] [-vmopt value] [arg value]"
echo " where --param is --vm, --image, or --document;"
! echo " -display-module is an option to specify a vm display module;"
! echo " -displayopt is an option passed to the display module;"
echo " and args are passed to the Squeak image."
}
***************
*** 56,62 ****
*) DOCUMENT="$PWD/$2"
;;
esac
! shift
;;
--image)
case "$2" in
--- 58,64 ----
*) DOCUMENT="$PWD/$2"
;;
esac
! shift
;;
--image)
case "$2" in
***************
*** 65,71 ****
*) IMAGE="$PWD/$2"
;;
esac
! shift
;;
--vm)
case "$2" in
--- 67,77 ----
*) IMAGE="$PWD/$2"
;;
esac
! shift
! ;;
! -vmopt)
! VMOPTIONS="$VMOPTIONS $2"
! shift
;;
--vm)
case "$2" in
***************
*** 76,82 ****
esac
shift
;;
! -*) VMOPTIONS="$VMOPTIONS $1 $2"
shift
;;
*) IMOPTIONS="$IMOPTIONS $1 $2"
--- 82,91 ----
esac
shift
;;
! -display-module) DISPLAYMODULE="$2"
! shift
! ;;
! -displayopt) DISPLAYOPTIONS="$DISPLAYOPTIONS $2"
shift
;;
*) IMOPTIONS="$IMOPTIONS $1 $2"
***************
*** 101,112 ****
PIGPIOD_ACTIVE=$?
sudo systemctl start pigpiod
# VM, Image, and Document are non-optional
# Document has to be present even if empty for IMOPTIONS to work
! echo Executing: $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS
! $WRAPPER "$VM" "$IMAGE" "$DOCUMENT" $IMOPTIONS
if [ $PIGPIOD_ACTIVE -ne 0 ]; then
sudo systemctl stop pigpiod
fi
-
--- 110,148 ----
PIGPIOD_ACTIVE=$?
sudo systemctl start pigpiod
+
+ BIN=`/usr/bin/dirname $VM`
+ # At least on linux LD_LIBRARY_PATH's components must be absolute path names
+ case "$BIN" in
+ /*) PLUGINS="$BIN";;
+ *) PLUGINS="`pwd`/$BIN"
+ esac
+
+ # On some linuxes there multiple versions of the C library. If the image uses
+ # libc (e.g. through the FFI) then it must use the same version that the VM uses
+ # and so it should take precedence over /lib libc. This is done by setting
+ # LD_LIBRARY_PATH appropriately, based on ldd's idea of the libc use by the VM.
+ LIBC_SO="`/usr/bin/ldd "$BIN/squeak" | /bin/fgrep /libc. | sed 's/^.*=> \([^ ]*\).*/\1/'`"
+ case "$LIBC_SO" in
+ /lib/arm-linux-gnueabihf/libc*) \
+ SVMLLP="/lib/arm-linux-gnueabihf:/lib:/usr/lib/arm-linux-gnueabihf:/usr/lib";;
+ "") case `/bin/uname -m || /usr/bin/uname -m` in
+ *) echo "/usr/bin/ldd didn't produce any output. Can't infer base LD_LIBRARY_PATH. Aborting." 1>&2
+ esac
+ exit 1;;
+ *) echo "Can't infer base LD_LIBRARY_PATH. Aborting. Try adding a line for $LIBC_SO to $0. Please report your edit to squeak vm-dev." 1>&2
+ exit 1
+ esac
+
+ if echo $XMODIFIERS | grep '@im='; then
+ DISPLAYOPTIONS="$DISPLAYOPTIONS -compositioninput"
+ fi
+
# VM, Image, and Document are non-optional
# Document has to be present even if empty for IMOPTIONS to work
! echo Executing: env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER $VM $VMOPTIONS $DISPLAYMODULE $DISPLAYOPTIONS $IMAGE $DOCUMENT $IMOPTIONS
! env LD_LIBRARY_PATH="$PLUGINS:$SVMLLP:${LD_LIBRARY_PATH}" $WRAPPER "$VM" $VMOPTIONS $DISPLAYMODULE $DISPLAYOPTIONS "$IMAGE" "$DOCUMENT" $IMOPTIONS
if [ $PIGPIOD_ACTIVE -ne 0 ]; then
sudo systemctl stop pigpiod
fi
More information about the Squeak-dev
mailing list
|