トップ 最新 追記

Masa's blog

検索キーワード:

2017年03月20日 SlackwareARM 13.37 with chroot on rooted android smart phone(Sony Xperia SO-03D) [長年日記]

_ Equipments

_ Applications on android side

Required

Recommended

_ Extract Slackware file tree into MicroSD (by Slackware 14.2 x86)

Get SlackwareARM 13.37

Format MicroSD

# fdisk -l /dev/sdb
Disk /dev/sdb: 31.9 GB, 31914983424 bytes
4 heads, 16 sectors/track, 973968 cylinders
Units = cylinders of 64 * 512 = 32768 bytes

              Device Boot      Start         End      Blocks  Id System
/dev/sdb1              33       32800     1048576   b Win95 FAT32
Partition 1 does not end on cylinder boundary
/dev/sdb2           32801      163872     4194304  82 Linux swap
Partition 2 does not end on cylinder boundary
/dev/sdb3          163873      973968    25923072  83 Linux
Partition 3 does not end on cylinder boundary
  • mkfs -t vfat /dev/sdb1
  • mkswap /dev/sdb2
  • mkfs -t ext4 /dev/sdb3

Extract

  • mount /dev/sdb3 /mnt/tmp
  • mkdir /mnt/tmp/slackware
  • cd ~/ftp.arm.slackware.com/slackwarearm/armedslack-13.37/slackware/
  • find . -name '*.tgz' | xargs -I '{}' installpkg --root /mnt/tmp/slackware '{}'

make symbolic links in /lib, /usr/lib.

  • cd /mnt/tmp/slackware/lib
  • ldconfig.sh
for i in `file * | egrep 'shared object' | cut -d: -f1 | sort | uniq`
do
	soname=`objdump -p $i | egrep SONAME | sed -e 's/^  *SONAME  *//'`
	if [ $i != ${soname} ]
	then
		ln -sf $i ${soname}
	fi
	linkername=`echo ${soname}|sed -e 's/\.so\..*$/.so/'`
	if [ ${soname} != ${linkername} ]
	then
		ln -sf ${soname} ${linkername}
	fi
done
  • cd /mnt/tmp/slackware/usr/lib
  • ldconfig.sh
  • sync;sync;sync
  • cd ~
  • umount /mnt/tmp

_ Android smart phone side

create mount point for Slackware's partition

  • Put MicroSD into SD slot in phone
  • start Terminal emulator
  • su -
  • cd /mnt/sdcard
  • mkdir chroot

Create scripts to start Slackware

  • mount /dev/block/mmcblk1p3 /mnt/sdcard/chroot
  • mkdir chroot/slackware/system
  • mkdir chroot/slackware/external_sd
  • /mnt/sdcard/slackware.sh
#! /system/bin/sh
(
	export CHROOT=/mnt/sdcard/chroot
	export ROOT=${CHROOT}/slackware
	/system/xbin/mount -t ext4 -o noatime,data=writeback /dev/block/mmcblk1p3 ${CHROOT}
	/system/xbin/mount -t proc none ${ROOT}/proc
	/system/xbin/mount -t sysfs none ${ROOT}/sys
	/system/xbin/mount -o bind /dev ${ROOT}/dev
	/system/xbin/mount -o bind /dev/pts ${ROOT}/dev/pts
	/system/xbin/mount -o bind /dev/socket ${ROOT}/dev/socket
	/system/xbin/mkdir ${ROOT}/dev/shm
	/system/xbin/mount -t tmpfs none ${ROOT}/dev/shm
	/system/xbin/mount -o bind /system ${ROOT}/system
	/system/xbin/mount -o bind /mnt/sdcard/external_sd ${ROOT}/external_sd
	export HOME=/root
	export SHELL=/bin/bash
	export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:/usr/arm-slackware-linux-gnueabi/lib:${LD_LIBRARY_PATH}

	/system/xbin/swapon /dev/block/mmcblk1p2

	/system/xbin/cp /sys/module/lowmemorykiller/parameters/adj ${CHROOT}/adj.ORG
	/system/xbin/cp /sys/module/lowmemorykiller/parameters/minfree ${CHROOT}/minfree.ORG
	echo 9999 >/sys/module/lowmemorykiller/parameters/adj
	echo 1 >/sys/module/lowmemorykiller/parameters/minfree

#	/system/xbin/chroot ${ROOT} /bin/bash -l
	/system/xbin/chroot ${ROOT} /bin/su -c /etc/rc.d/rc.local

	for i in `/system/xbin/lsof | /system/xbin/egrep /mnt/sdcard/chroot/ | /system/xbin/cut -f 1 | /system/xbin/sort | /system/xbin/uniq`
	do
		/system/xbin/kill $i
	done

	/system/xbin/sync;/system/xbin/sync;/system/xbin/sync

	/system/xbin/cp ${CHROOT}/adj.ORG /sys/module/lowmemorykiller/parameters/adj
	/system/xbin/cp ${CHROOT}/minfree.ORG /sys/module/lowmemorykiller/parameters/minfree

	/system/xbin/swapoff /dev/block/mmcblk1p2

	/system/xbin/umount ${ROOT}/external_sd
	/system/xbin/umount ${ROOT}/system
	/system/xbin/umount ${ROOT}/dev/shm
	/system/xbin/umount ${ROOT}/dev/socket
	/system/xbin/umount ${ROOT}/dev/pts
	/system/xbin/umount ${ROOT}/dev
	/system/xbin/umount ${ROOT}/sys
	/system/xbin/umount ${ROOT}/proc
	/system/xbin/umount ${CHROOT}
)

_ Start slackware

start Slackware with next commands from Terminal emulator.

  • su -
  • cd /mnt/sdcard
  • sh slackware.sh
  • su - m-ito
  • sh .xinitrc

Change application to XSDL, then you will see terminal and window manager running in it.

_ inside of chrooted Slackware-13.37

/root/setdns.sh

#! /bin/sh
ns=`/usr/bin/expect -c "
	set timeout 5
	spawn env LANG=C /usr/bin/ssh -p 22 root@127.0.0.1
	expect \"password:\"
	send \"_your_password_\n\"
	expect \"#\"
	send \"getprop net.dns1\n\"
	expect \"#\"
	send \"exit\n\"
	exit 0" |\
	tr -d "\r" |\
	egrep "^[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*$"`
cat /etc/resolv.conf.setdns.ORG |
sed -e "s/_nameserver_/$ns/g" >/etc/resolv.conf.setdns
ln -sf /etc/resolv.conf.setdns /etc/resolv.conf

/etc/resolv.conf.setdns.ORG

search artie.or.jp
nameserver _nameserver_

/root/killxorg.sh

#! /bin/sh
killall -9 x.org.server

/etc/X11/app-defaults/Kinput2

*Font: -*-fixed-medium-r-normal--16-*-*-*-c-*-iso8859-1
*KanjiFont: -*-fixed-medium-r-normal--16-*-*-*-c-*-jisx0208.1983-0
*KanaFont: -*-fixed-medium-r-normal--16-*-*-*-c-*-jisx0201.1976-0

*IMProtocol.locales: ja_JP.UTF-8, ja_JP.SJIS, ja_JP.EUC, ja_JP, japanese, japan, ja
*defaultFontList: -*-fixed-medium-r-normal--16-*-*-*-c-*

/etc/rsyncd.conf

uid = root
gid = root
[root_partition]
      comment = so03d root partition
      path = /
      read only = true
      hosts allow = 192.168.0.100
      hosts deny = *

/etc/ld.so.conf

/usr/local/canna/lib

/etc/termcap

rxvt-unicode|rxvt-unicode terminal (X Window System):\
      :am:bw:eo:hs:km:mi:ms:xn:xo:\
      :co#80:it#8:li#24:lm#0:\
      :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\
      :K1=\EOw:K2=\EOu:K3=\EOy:K4=\EOq:K5=\EOs:LE=\E[%dD:\
      :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\
      :as=\E(0:bl=^G:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\
      :cm=\E[%i%d;%dH:cr=^M:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\
      :dl=\E[M:do=^J:ds=\E]2;\007:ec=\E[%dX:ei=\E[4l:fs=^G:\
      :ho=\E[H:i1=\E[!p:ic=\E[@:im=\E[4h:\
      :is=\E[r\E[m\E[2J\E[?7;25h\E[?1;3;4;5;6;9;66;1000;1001;1049l\E[4l:\
      :k1=\E[11~:k2=\E[12~:k3=\E[13~:k4=\E[14~:k5=\E[15~:\
      :k6=\E[17~:k7=\E[18~:k8=\E[19~:k9=\E[20~:kD=\E[3~:\
      :kI=\E[2~:kN=\E[6~:kP=\E[5~:kb=\177:kd=\E[B:ke=\E>:\
      :kh=\E[7~:kl=\E[D:kr=\E[C:ks=\E=:ku=\E[A:le=^H:mb=\E[5m:\
      :md=\E[1m:me=\E[m:mr=\E[7m:nd=\E[C:rc=\E8:sc=\E7:se=\E[27m:\
      :sf=^J:so=\E[7m:sr=\EM:st=\EH:ta=^I:te=\E[r\E[?1049l:\
      :ti=\E[?1049h:ts=\E]2;:ue=\E[24m:up=\E[A:us=\E[4m:\
      :vb=\E[?5h\E[?5l:ve=\E[?12l\E[?25h:vi=\E[?25l:\
      :vs=\E[?12;25h:

rxvt-unicode-256color|rxvt-unicode terminal with 256 colors (X Window System):\
      :Co#256:pa#32767:tc=rxvt-unicode:
SC|screen|VT 100/ANSI X3.64 virtual terminal:\
      :am:xn:ms:mi:G0:km:\
      :DO=\E[%dB:LE=\E[%dD:RI=\E[%dC:UP=\E[%dA:bs:bt=\E[Z:\
      :cb=\E[1K:cd=\E[J:ce=\E[K:cl=\E[H\E[J:cm=\E[%i%d;%dH:ct=\E[3g:\
      :do=^J:nd=\E[C:pt:rc=\E8:rs=\Ec:sc=\E7:st=\EH:up=\EM:\
      :le=^H:bl=^G:cr=^M:it#8:ho=\E[H:nw=\EE:ta=^I:is=\E)0:\
      :li#24:co#80:us=\E[4m:ue=\E[24m:so=\E[3m:se=\E[23m:\
      :mb=\E[5m:md=\E[1m:mr=\E[7m:me=\E[m:sr=\EM:al=\E[L:\
      :AL=\E[%dL:dl=\E[M:DL=\E[%dM:cs=\E[%i%d;%dr:dc=\E[P:\
      :DC=\E[%dP:im=\E[4h:ei=\E[4l:IC=\E[%d@:\
      :ks=\E[?1h\E=:ke=\E[?1l\E>:vb=\Eg:\
      :ku=\EOA:kd=\EOB:kr=\EOC:kl=\EOD:\
      :k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:k5=\E[15~:k6=\E[17~:\
      :k7=\E[18~:k8=\E[19~:k9=\E[20~:k;=\E[21~:F1=\E[23~:F2=\E[24~:\
      :kh=\E[1~:kI=\E[2~:kD=\E[3~:kH=\E[4~:@7=\E[4~:kP=\E[5~:\
      :kN=\E[6~:eA=\E(B\E)0:as=^N:ae=^O:ti=\E[?1049h:te=\E[?1049l:\
      :vi=\E[?25l:ve=\E[34h\E[?25h:vs=\E[34l:\
      :Co#8:pa#64:AF=\E[3%dm:AB=\E[4%dm:op=\E[39;49m:AX:\
      :ac=``aaffggjjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~..--++,,hhII00:
SB|screen-bce|VT 100/ANSI X3.64 virtual terminal with bce:\
      :ut:tc=screen:
SH|screen-s|VT 100/ANSI X3.64 virtual terminal with hardstatus line:\
      :ts=\E_:fs=\E\\:ds=\E_\E\\:tc=screen:

/etc/HOSTNAME

so03d.artie.or.jp

/etc/gtk-2.0/gtkrc

gtk-theme-name="GTK+"
gtk-print-backends="file,lpr,cups"

/etc/group

wheel:x:10:root,m-ito
audio:x:17:root,pulse,m-ito
pulse:x:65:
m-ito:x:503:
openpobox:x:504:
aid_system:x:1000:root,m-ito,bin,pulse
aid_radio:x:1001:root,m-ito,bin,pulse
aid_bluetooth:x:1002:root,m-ito,bin,pulse
aid_graphics:x:1003:root,m-ito,bin,pulse
aid_input:x:1004:root,m-ito,bin,pulse
aid_audio:x:1005:root,m-ito,bin,pulse
aid_camera:x:1006:root,m-ito,bin,pulse
aid_log:x:1007:root,m-ito,bin,pulse
aid_compass:x:1008:root,m-ito,bin,pulse
aid_mount:x:1009:root,m-ito,bin,pulse
aid_wifi:x:1010:root,m-ito,bin,pulse
aid_adb:x:1011:root,m-ito,bin,pulse
aid_install:x:1012:root,m-ito,bin,pulse
aid_media:x:1013:root,m-ito,bin,pulse
aid_dhcp:x:1014:root,m-ito,bin,pulse
aid_sdcard_rw:x:1015:root,m-ito,bin,pulse
aid_media_rw:x:1023:root,m-ito,bin,pulse
aid_shell:x:2000:root,m-ito,bin,pulse
aid_cache:x:2001:root,m-ito,bin,pulse
aid_diag:x:2002:root,m-ito,bin,pulse
aid_net_bt_admin:x:3001:root,m-ito,bin,pulse
aid_net_bt:x:3002:root,m-ito,bin,pulse
aid_inet:x:3003:root,m-ito,bin,pulse
aid_net_raw:x:3004:root,m-ito,bin,pulse
aid_misc:x:9998:root,m-ito,bin,pulse
aid_nobody:x:9999:root,m-ito,bin,pulse
aid_app:x:10000:root,m-ito,bin,pulse

/etc/ssh/sshd_config

#Port 22
Port 8022

/etc/hosts

#127.0.0.1    darkstar.example.net darkstar
192.168.0.5   so03d.artie.or.jp       so03d

/etc/passwd

pulse:x:65:65:User for PulseAudio:/var/run/pulse:/bin/false
m-ito:x:503:503::/home/m-ito:/bin/bash
openpobox:x:504:504::/usr/local/OpenPOBox:/bin/bash
aid_system:x:1000:1000::/:/bin/false
aid_radio:x:1001:1001::/:/bin/false
aid_bluetooth:x:1002:1002::/:/bin/false
aid_graphics:x:1003:1003::/:/bin/false
aid_input:x:1004:1004::/:/bin/false
aid_audio:x:1005:1005::/:/bin/false
aid_camera:x:1006:1006::/:/bin/false
aid_log:x:1007:1007::/:/bin/false
aid_compass:x:1008:1008::/:/bin/false
aid_mount:x:1009:1009::/:/bin/false
aid_wifi:x:1010:1010::/:/bin/false
aid_adb:x:1011:1011::/:/bin/false
aid_install:x:1012:1012::/:/bin/false
aid_media:x:1013:1013::/:/bin/false
aid_dhcp:x:1014:1014::/:/bin/false
aid_sdcard_rw:x:1015:1015::/:/bin/false
aid_media_rw:x:1023:1023::/:/bin/false
aid_shell:x:2000:2000::/:/bin/false
aid_cache:x:2001:2001::/:/bin/false
aid_diag:x:2002:2002::/:/bin/false
aid_net_bt_admin:x:3001:3001::/:/bin/false
aid_net_bt:x:3002:3002::/:/bin/false
aid_inet:x:3003:3003::/:/bin/false
aid_net_raw:x:3004:3004::/:/bin/false
aid_misc:x:9998:9998::/:/bin/false
aid_nobody:x:9999:9999::/:/bin/false
aid_app:x:10000:10000::/:/bin/false

/etc/rc.d/rc.local

#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

if [ -e /dev/graphics/fb0 ]
then
	(cd /dev && ln -sf graphics/fb0 .)
fi

if [ -x /sbin/ldconfig ]
then
	/sbin/ldconfig
fi

if [ -r /etc/HOSTNAME ]
then
	/bin/hostname $(cat /etc/HOSTNAME | cut -f1 -d .)
fi

if [ -x /usr/bin/dbus-uuidgen ]
then
	/usr/bin/dbus-uuidgen --ensure
fi

# These GTK+/pango files need to be kept up to date for
# proper input method, pixbuf loaders, and font support.
if [ -x /usr/bin/update-gtk-immodules ]
then
	/usr/bin/update-gtk-immodules --verbose
fi
if [ -x /usr/bin/update-gdk-pixbuf-loaders ]
then
	/usr/bin/update-gdk-pixbuf-loaders --verbose
fi
if [ -x /usr/bin/update-pango-querymodules ]
then
	/usr/bin/update-pango-querymodules --verbose
fi

if [ -x /usr/bin/rsync ]
then
	/usr/bin/rsync --daemon --config=/etc/rsyncd.conf
fi

if [ -x /etc/rc.d/rc.sshd ]
then
	/etc/rc.d/rc.sshd start
fi

if [ -x /etc/rc.d/rc.pulseaudio ]
then
	/etc/rc.d/rc.pulseaudio start
fi

if [ -x /usr/local/canna/sbin/cannaserver ]
then
	rm -f /tmp/.iroha_unix/IROHA
	/usr/local/canna/sbin/cannaserver -inet -u bin
	echo "Starting cannaserver."
fi

if [ -x /usr/local/OpenPOBox/server/pbserver.sh ]
then
	/usr/local/OpenPOBox/server/pbserver.sh
fi

/bin/bash -l

/etc/pulse/system.pa

load-module module-simple-protocol-tcp rate=44100 format=s16le channels=2 source=auto_null.monitor record=true port=8000

/etc/mtab

cd /etc && ln -sf ../proc/mounts mtab

/etc/sudoers

%wheel ALL=(ALL) NOPASSWD: ALL

/etc/profile

export LD_PRELOAD="/LD_PRELOAD/libandroid-shmem.so /LD_PRELOAD/libdisableselinux.so /LD_PRELOAD/libpty.so"
alias df='df 2>/dev/null'

/home/m-ito/.gtkrc-2.0

gtk-icon-theme-name = "Tango"

/home/m-ito/.xinitrc

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

DISPLAY=127.0.0.1:0.0; export DISPLAY

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then
    /usr/bin/xrdb -merge $sysresources
fi

if [ -f $sysmodmap ]; then
    /usr/bin/xmodmap $sysmodmap
fi

if [ -f $userresources ]; then
    /usr/bin/xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    /usr/bin/xmodmap $usermodmap
fi

# start some nice programs

xset fp default
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/100dpi
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/75dpi
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/OTF
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/Speedo
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/TTF
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/Type1
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/cyrillic
xset fp+ /mnt/sdcard/chroot/slackware/usr/share/fonts/misc
xset fp rehash

/usr/bin/xkbset m
/usr/bin/xkbset exp m

/usr/bin/kinput2 -kinput +ximp -xim -canna &
#/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=12" -imfont "-misc-fixed-medium-r-normal--12-*-*-*-c-*" -geometry 104x25+0+0 &
#/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=14" -imfont "-misc-fixed-medium-r-normal--14-*-*-*-c-*" -geometry 89x21+0+0 &
/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=16" -imfont "-misc-fixed-medium-r-normal--16-*-*-*-c-*" -geometry 78x19+0+0 &
#/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=18" -imfont "-misc-fixed-medium-r-normal--18-*-*-*-c-*" -geometry 69x17+0+0 &
#/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=20" -imfont "-misc-fixed-medium-r-normal--20-*-*-*-c-*" -geometry 62x15+0+0 &
#/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=22" -imfont "-misc-fixed-medium-r-normal--22-*-*-*-c-*" -geometry 57x14+0+0 &
#/usr/local/bin/urxvt -ls -fn "xft:Sazanami Mincho:size=24" -imfont "-misc-fixed-medium-r-normal--24-*-*-*-c-*" -geometry 52x13+0+0 &
exec /usr/local/fvwm1/bin/fvwm

/home/m-ito/.Xresource

! F1 for Button1, F2 for Button2, F3 for Button3 of Rii RT-MWK02(bluetooth mini keyboard)
keycode 67 = Pointer_Button1
keycode 68 = Pointer_Button2
keycode 69 = Pointer_Button3
remove Shift = Shift_L
remove Control = Control_L
keysym Control_L = Shift_L
keysym Shift_L = Control_L
add Shift = Shift_L
add Control = Control_L

_ Some applications to add

fvwm-1.24r

*** modules/FvwmAudio/Imakefile.ORG     2015-12-02 10:46:14.031822333 +0900
--- modules/FvwmAudio/Imakefile 2015-12-02 10:46:34.219569951 +0900
***************
*** 10,17 ****
   * are correct for your rplay installation.
   */

  #define HAVE_RPLAY
!

  #ifdef HAVE_RPLAY
  AUDIO_DEFINES = -DHAVE_RPLAY
--- 10,18 ----
   * are correct for your rplay installation.
   */

+ #if 0
  #define HAVE_RPLAY
! #endif

  #ifdef HAVE_RPLAY
  AUDIO_DEFINES = -DHAVE_RPLAY
  • cat ../fvwm1_1.24r-56-2.diff | patch -p0
*** configure.h.ORG     2015-12-02 10:59:17.825023569 +0900
--- configure.h 2015-12-02 10:59:31.210856224 +0900
***************
*** 64,69 ****
--- 64,70 ----
   *   If you want to use i18n feature, specify #define I18N
   ***************************************************************************/
  /* #define I18N */
+ #define I18N

  /***************************************************************************
   *#define M4
  • cat ../fvwm1_1.24r-56-3.diff | patch -p0
*** ./modules/FvwmIconBox/FvwmIconBox.c.ORG     2015-12-09 15:24:04.410373438 +0900
--- ./modules/FvwmIconBox/FvwmIconBox.c 2015-12-09 15:24:22.327149447 +0900
***************
*** 1056,1062 ****
    gcv.background = icon_back_pix;
    IconShadowGC = XCreateGC(dpy, Root, gcm, &gcv);

!   gcm = GCForeground|GCBackground|GCFont;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;
    gcv.font =  font->fid;
--- 1056,1062 ----
    gcv.background = icon_back_pix;
    IconShadowGC = XCreateGC(dpy, Root, gcm, &gcv);

!   gcm = GCForeground|GCBackground/* |GCFont */;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;
    gcv.font =  font->fid;
*** ./modules/FvwmIdent/FvwmIdent.c.ORG 2015-12-09 15:24:32.972016368 +0900
--- ./modules/FvwmIdent/FvwmIdent.c     2015-12-09 15:24:48.383823694 +0900
***************
*** 456,462 ****
    XSelectInput(dpy,main_win,MW_EVENTS);
    change_window_name(&MyName[1]);

!   gcm = GCForeground|GCBackground|GCFont;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;
    gcv.font =  font->fid;
--- 456,462 ----
    XSelectInput(dpy,main_win,MW_EVENTS);
    change_window_name(&MyName[1]);

!   gcm = GCForeground|GCBackground/* |GCFont */;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;
    gcv.font =  font->fid;
*** ./modules/FvwmPager/x_pager.c.ORG   2015-12-09 15:24:59.594683539 +0900
--- ./modules/FvwmPager/x_pager.c       2015-12-09 15:25:18.115451998 +0900
***************
*** 393,399 ****
      }
    XMapRaised(dpy,Scr.Pager_w);

!   gcm = GCForeground|GCBackground|GCFont;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;

--- 393,399 ----
      }
    XMapRaised(dpy,Scr.Pager_w);

!   gcm = GCForeground|GCBackground/* |GCFont */;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;

*** ./modules/FvwmWinList/FvwmWinList.c.ORG     2015-12-09 15:25:31.115289477 +0900
--- ./modules/FvwmWinList/FvwmWinList.c 2015-12-09 15:25:45.232112993 +0900
***************
*** 689,695 ****
    gcval.foreground=fore;
    gcval.background=back;
    gcval.font=ButtonFont->fid;
!   gcmask=GCForeground|GCBackground|GCFont;
    graph=XCreateGC(dpy,Root,gcmask,&gcval);

    if(d_depth < 2)
--- 689,695 ----
    gcval.foreground=fore;
    gcval.background=back;
    gcval.font=ButtonFont->fid;
!   gcmask=GCForeground|GCBackground/* |GCFont */;
    graph=XCreateGC(dpy,Root,gcmask,&gcval);

    if(d_depth < 2)
*** ./modules/GoodStuff/GoodStuff.c.ORG 2015-12-09 15:25:57.129964249 +0900
--- ./modules/GoodStuff/GoodStuff.c     2015-12-09 15:26:10.506797016 +0900
***************
*** 834,840 ****
    gcv.background = back_pix;
    ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);

!   gcm = GCForeground|GCBackground|GCFont;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;
    gcv.font =  font->fid;
--- 834,840 ----
    gcv.background = back_pix;
    ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);

!   gcm = GCForeground|GCBackground/* |GCFont */;
    gcv.foreground = fore_pix;
    gcv.background = back_pix;
    gcv.font =  font->fid;
*** ./fvwm/configure.c.ORG      2015-12-09 15:21:08.980566612 +0900
--- ./fvwm/configure.c  2015-12-09 15:23:12.215025970 +0900
***************
*** 1833,1839 ****
    Scr.DrawGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);

    gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!     GCBackground|GCFont;
    gcv.line_width = 0;
    gcv.function = GXcopy;
    gcv.plane_mask = AllPlanes;
--- 1833,1839 ----
    Scr.DrawGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);

    gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!     GCBackground/* |GCFont */;
    gcv.line_width = 0;
    gcv.function = GXcopy;
    gcv.plane_mask = AllPlanes;
***************
*** 1854,1865 ****
    gcv.fill_style = FillStippled;
    gcv.stipple = Scr.gray_bitmap;
    gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!     GCBackground|GCFont|GCStipple|GCFillStyle;

    Scr.StippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);

    gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!     GCBackground|GCFont;
    gcv.foreground = Scr.HiRelief.fore;
    gcv.background = Scr.HiRelief.back;
    gcv.fill_style = FillSolid;
--- 1854,1865 ----
    gcv.fill_style = FillStippled;
    gcv.stipple = Scr.gray_bitmap;
    gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!     GCBackground/* |GCFont */|GCStipple|GCFillStyle;

    Scr.StippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);

    gcm = GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!     GCBackground/* |GCFont */;
    gcv.foreground = Scr.HiRelief.fore;
    gcv.background = Scr.HiRelief.back;
    gcv.fill_style = FillSolid;
***************
*** 1877,1887 ****
        gcv.fill_style = FillStippled;
        gcv.stipple = Scr.gray_bitmap;
        gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!       GCBackground|GCFont|GCStipple|GCFillStyle;
        Scr.MenuStippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);

        gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!       GCBackground|GCFont;
        gcv.fill_style = FillSolid;
      }
    else
--- 1877,1887 ----
        gcv.fill_style = FillStippled;
        gcv.stipple = Scr.gray_bitmap;
        gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!       GCBackground/* |GCFont */|GCStipple|GCFillStyle;
        Scr.MenuStippleGC = XCreateGC(dpy, Scr.Root, gcm, &gcv);

        gcm=GCFunction|GCPlaneMask|GCGraphicsExposures|GCLineWidth|GCForeground|
!       GCBackground/* |GCFont */;
        gcv.fill_style = FillSolid;
      }
    else
*** ./fvwm/misc.h.ORG   2015-12-09 15:23:23.833880714 +0900
--- ./fvwm/misc.h       2015-12-09 15:23:50.353549172 +0900
***************
*** 96,102 ****
     Globalgcv.font = newfont;\
     Globalgcv.foreground = color;\
     Globalgcv.background = backcolor;\
!    Globalgcm = GCFont | GCForeground | GCBackground; \
     XChangeGC(dpy,Scr.FontGC,Globalgcm,&Globalgcv); \
  }
  #ifdef I18N
--- 96,102 ----
     Globalgcv.font = newfont;\
     Globalgcv.foreground = color;\
     Globalgcv.background = backcolor;\
!    Globalgcm = /* GCFont | */GCForeground | GCBackground; \
     XChangeGC(dpy,Scr.FontGC,Globalgcm,&Globalgcv); \
  }
  #ifdef I18N
  • cat ../fvwm1_1.24r-56-4.diff | patch -p0
*** ./fvwm/resize.c.ORG 2015-12-10 01:24:12.408041411 +0900
--- ./fvwm/resize.c     2015-12-10 01:25:18.327419423 +0900
***************
*** 457,465 ****

  #undef FONTSET
  #define FONTSET Scr.StdFont.fontset
    XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
               offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, 13);
!
  }

  /***********************************************************************
--- 457,469 ----

  #undef FONTSET
  #define FONTSET Scr.StdFont.fontset
+ #if 0
    XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
               offset, Scr.StdFont.font->ascent + SIZE_VINDENT, str, 13);
! #else
!   XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
!              offset, Scr.StdFont.y + SIZE_VINDENT, str, 13);
! #endif
  }

  /***********************************************************************
*** ./fvwm/move.c.ORG   2015-12-10 01:20:49.885301811 +0900
--- ./fvwm/move.c       2015-12-10 01:21:05.863332536 +0900
***************
*** 337,346 ****
--- 337,353 ----
            - XTextWidth(Scr.StdFont.font,str,strlen(str)))/2;
  #undef FONTSET
  #define FONTSET Scr.StdFont.fontset
+ #if 0
    XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
               offset,
               Scr.StdFont.font->ascent + SIZE_VINDENT,
               str, strlen(str));
+ #else
+   XDrawString (dpy, Scr.SizeWindow, Scr.NormalGC,
+              offset,
+              Scr.StdFont.y + SIZE_VINDENT,
+              str, strlen(str));
+ #endif
  }
  • cat ../fvwm1.diff | patch -p0
*** ./configure.h.ORG   2017-01-02 03:40:40.280993705 +0900
--- ./configure.h       2017-01-02 03:47:14.560992599 +0900
***************
*** 1,7 ****
! #define FVWMDIR     "/usr/X11R6/lib/X11/fvwm"
  /* #define FVWMDIR        "/local/homes/dsp/nation/modules"*/
! #define FVWM_ICONDIR   "/usr/local/share/images:/usr/local/share/icons:/usr/share/images:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/X11R6/include/bitmaps"
! #define FVWMRC         "/etc/X11/fvwm/system.fvwmrc"

  /* Imake command needed to put modules in desired target location */
  /* Use the second version if it causes grief */
--- 1,10 ----
! /* #define FVWMDIR     "/usr/X11R6/lib/X11/fvwm" */
  /* #define FVWMDIR        "/local/homes/dsp/nation/modules"*/
! #define FVWMDIR     "/usr/local/fvwm1"
! /* #define FVWM_ICONDIR   "/usr/local/share/images:/usr/local/share/icons:/usr/share/images:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/X11R6/include/bitmaps" */
! #define FVWM_ICONDIR   "/usr/local/fvwm1/pixmaps:/usr/local/fvwm1/bitmaps:/usr/local/share/images:/usr/local/share/icons:/usr/share/images:/usr/share/icons:/usr/share/pixmaps:/usr/include/X11/pixmaps:/usr/include/X11/bitmaps:/usr/X11R6/include/bitmaps"
! /* #define FVWMRC         "/etc/X11/fvwm/system.fvwmrc" */
! #define FVWMRC         "/usr/local/fvwm1/system.fvwmrc"

  /* Imake command needed to put modules in desired target location */
  /* Use the second version if it causes grief */
***************
*** 14,20 ****
   * If you want to install it in a different directory, uncomment and
   * edit the first line */
  /* #define FVWM_BIN_DIR BINDIR=/local/homes/dsp/nation/bin/4.1.3*/
! #define FVWM_BIN_DIR BINDIR=/usr/X11R6/bin
  /*#define FVWM_BIN_DIR*/

  /* Compiler over-ride for Imakefiles */
--- 17,24 ----
   * If you want to install it in a different directory, uncomment and
   * edit the first line */
  /* #define FVWM_BIN_DIR BINDIR=/local/homes/dsp/nation/bin/4.1.3*/
! /* #define FVWM_BIN_DIR BINDIR=/usr/X11R6/bin */
! #define FVWM_BIN_DIR BINDIR=/usr/local/fvwm1/bin
  /*#define FVWM_BIN_DIR*/

  /* Compiler over-ride for Imakefiles */
  • xmkmf
  • make Makefiles && make all
  • make install
  • make install.man
  • mkdir /usr/local/fvwm1/pixmaps
  • mkdir /usr/local/fvwm1/bitmaps
  • cp fvwm_icons/*.xpm /usr/local/fvwm1/pixmaps/
  • cp fvwm_icons/*.xbm /usr/local/fvwm1/bitmaps/
  • cp fvwm_icons/*.bitmap /usr/local/fvwm1/bitmaps/
  • cp fvwm_icons/*.icon /usr/local/fvwm1/bitmaps/

less-382-iso262

gc-7.2g

  • tar xvf gc-7.2g.tar.gz
  • cd gc-7.2g
  • ./configure && make && make install

w3m-0.5.3

*** ./istream.h.ORG     2012-11-28 12:23:44.903821617 +0900
--- ./istream.h 2012-11-28 12:24:31.368727065 +0900
***************
*** 20,26 ****

  typedef struct stream_buffer *StreamBuffer;

! struct file_handle {
      FILE *f;
      void (*close) ();
  };
--- 20,26 ----

  typedef struct stream_buffer *StreamBuffer;

! struct File_handle {
      FILE *f;
      void (*close) ();
  };
***************
*** 53,59 ****

  struct file_stream {
      struct stream_buffer stream;
!     struct file_handle *handle;
      char type;
      char iseos;
      int (*read) ();
--- 53,59 ----

  struct file_stream {
      struct stream_buffer stream;
!     struct File_handle *handle;
      char type;
      char iseos;
      int (*read) ();
*** ./istream.c.ORG     2012-11-28 12:23:39.465130387 +0900
--- ./istream.c 2012-11-28 12:24:16.455831711 +0900
***************
*** 22,29 ****
  static void basic_close(int *handle);
  static int basic_read(int *handle, char *buf, int len);

! static void file_close(struct file_handle *handle);
! static int file_read(struct file_handle *handle, char *buf, int len);

  static int str_read(Str handle, char *buf, int len);

--- 22,29 ----
  static void basic_close(int *handle);
  static int basic_read(int *handle, char *buf, int len);

! static void file_close(struct File_handle *handle);
! static int file_read(struct File_handle *handle, char *buf, int len);

  static int str_read(Str handle, char *buf, int len);

***************
*** 114,120 ****
      stream = New(union input_stream);
      init_base_stream(&stream->base, STREAM_BUF_SIZE);
      stream->file.type = IST_FILE;
!     stream->file.handle = New(struct file_handle);
      stream->file.handle->f = f;
      if (closep)
        stream->file.handle->close = closep;
--- 114,120 ----
      stream = New(union input_stream);
      init_base_stream(&stream->base, STREAM_BUF_SIZE);
      stream->file.type = IST_FILE;
!     stream->file.handle = New(struct File_handle);
      stream->file.handle->f = f;
      if (closep)
        stream->file.handle->close = closep;
***************
*** 638,650 ****
  }

  static void
! file_close(struct file_handle *handle)
  {
      handle->close(handle->f);
  }

  static int
! file_read(struct file_handle *handle, char *buf, int len)
  {
      return fread(buf, 1, len, handle->f);
  }
--- 638,650 ----
  }

  static void
! file_close(struct File_handle *handle)
  {
      handle->close(handle->f);
  }

  static int
! file_read(struct File_handle *handle, char *buf, int len)
  {
      return fread(buf, 1, len, handle->f);
  }
*** ./main.c.ORG        2016-08-01 21:43:32.714706108 +0900
--- ./main.c    2016-08-01 21:45:27.569705061 +0900
***************
*** 833,839 ****
--- 833,844 ----
      mySignal(SIGPIPE, SigPipe);
  #endif

+ #if 0
      orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+ #else
+     orig_GC_warn_proc = GC_get_warn_proc();
+     GC_set_warn_proc(wrap_GC_warn_proc);
+ #endif
      err_msg = Strnew();
      if (load_argc == 0) {
        /* no URL specified */
  • LIBS="-lX11" ./configure --disable-mouse && make && make install

libandroid-shmem.so

  • git clone https://github.com/pelya/android-shmem.git
  • cd android-shmem
  • git submodule update --init libancillary
  • gcc -shared -fpic -std=gnu99 -Wall *.c -I . -I libancillary -o libandroid-shmem.so -Wl,--version-script=exports.txt -lc -lpthread && strip libandroid-shmem.so
  • cp libandroid-shmem.so /LD_PRELOAD/

libdisableselinux.so

  • git clone https://github.com/pelya/debian-noroot.git
  • cd debian-noroot
  • gcc -shared -fpic disableselinux/*.c -o dist/libdisableselinux.so && strip dist/libdisableselinux.so
  • cp dist/libdisableselinux.so /LD_PRELOAD/

libpty.so

See detail in http://qiita.com/z80oolong/items/d3585cd5542d3d60ce12#chap02

nkf-2.1.1

  • tar xvf nkf-2.1.1.tar.gz
  • cd nkf-2.1.1
  • make && make install
  • cd NKF.mod/
  • perl Makefile.PL
  • make && make install

FD-3.00j

  • tar xvf FD-3.00j.tar.gz
  • cd FD-3.00j
  • vi machine.h
  • vi fd.h
  • make && make install

Canna37p3

  • tar xvf Canna37p3.tar.bz2
  • cd Canna37p3
  • xmkmf
  • make canna
  • make install
  • make install.man
  • touch /var/log/CANNA0msgs
  • chown bin.bin /var/log/CANNA0msgs
  • mkdir ~/.cannax
  • touch ~/.cannax/rkc.conf

rxvt-unicode-9.22

  • tar xvf rxvt-unicode-9.22.tar.gz
  • cd rxvt-unicode-9.22
  • ./configure --enable-unicode3 --enable-iso14755
  • make && make install

kinput2-v3.1

  • tar xvf kinput2-v3.1.tar.gz
  • cd kinput2-v3.1
  • xmkmf
  • make Makefiles
  • make depend
  • make
  • make install

xkbset

screen-4.4.0

pobox-1.2.6

*** configure.ORG       2012-10-30 20:03:59.100019311 +0900
--- configure   2012-10-30 20:04:21.540036701 +0900
***************
*** 665,671 ****
  fi
  if test "x$enable_sary" = "xyes"; then
    CFLAGS="$CFLAGS -DUSESARY"
!   LDFLAGS="$LDFLAGS -lsary -lglib"
  fi
  if test "x$enable_lookup" = "xyes"; then
    CFLAGS="$CFLAGS -DUSELOOKUP"
--- 665,671 ----
  fi
  if test "x$enable_sary" = "xyes"; then
    CFLAGS="$CFLAGS -DUSESARY"
!   LDFLAGS="$LDFLAGS -lsary -lglib -lpthread"
  fi
  if test "x$enable_lookup" = "xyes"; then
    CFLAGS="$CFLAGS -DUSELOOKUP"
*** server/Makefile.in.ORG      2012-10-30 16:51:30.170021724 +0900
--- server/Makefile.in  2012-10-30 16:55:12.940017212 +0900
***************
*** 13,18 ****
--- 13,19 ----
  CC = gcc
  CFLAGS = -DUNIX @CFLAGS@ \
        -I/usr/local/include -I/usr/local/lib/glib/include \
+       -I/usr/include/glib-1.2 -I/usr/lib/glib/include \
        -I@prefix@/include \
        -I../asearch -I../romakana -I../include -g

*** asearch/Makefile.ORG        2012-10-26 16:52:28.690006915 +0900
--- asearch/Makefile    2012-10-26 16:52:28.690006915 +0900
***************
*** 3,9 ****
  #     $Revision: 1.2 $
  #
  CC = gcc
! CFLAGS = -Xcpluscomm
  WTANGLE = perl ../wtangle/wtangle

  libasearch.a: asearch.o
--- 3,10 ----
  #     $Revision: 1.2 $
  #
  CC = gcc
! ##CFLAGS = -Xcpluscomm
! CFLAGS =
  WTANGLE = perl ../wtangle/wtangle

  libasearch.a: asearch.o
*** romakana/rklist.ORG 2012-10-31 00:14:04.790034744 +0900
--- romakana/rklist     2012-10-31 00:14:31.380030341 +0900
***************
*** 123,129 ****
  myi   ミィ
  myo   ミョ
  myu   ミュ
! n'    ン
  na    ナ
  ne    ネ
  ni    ニ
--- 123,129 ----
  myi   ミィ
  myo   ミョ
  myu   ミュ
! nn    ン
  na    ナ
  ne    ネ
  ni    ニ
  • patch -p0 <../pobox-1.2.6-2.diff
*** server/poboxlib.html.ORG    2014-08-09 10:44:42.128742576 +0900
--- server/poboxlib.html        2014-08-09 11:12:57.518742555 +0900
***************
*** 574,580 ****
  //
  /////////////////////////////////////////////////////////////////

! #define MAXCANDS 40
  static UCHAR *cands[MAXCANDS];
  static UCHAR *candspat[MAXCANDS];
  static int ncands = 0;
--- 574,580 ----
  //
  /////////////////////////////////////////////////////////////////

! #define MAXCANDS 256
  static UCHAR *cands[MAXCANDS];
  static UCHAR *candspat[MAXCANDS];
  static int ncands = 0;
*** server/pbserver.html.ORG    2014-08-09 11:11:47.318743457 +0900
--- server/pbserver.html        2015-12-27 01:17:18.561114232 +0900
***************
*** 67,73 ****

  #define POBOXSERVERPORT 1178

! #define MAXCANDS 100
  #define MAXWORDLEN 100
  unsigned char *cands[MAXCANDS],*candspat[MAXCANDS];

--- 67,73 ----

  #define POBOXSERVERPORT 1178

! #define MAXCANDS 256
  #define MAXWORDLEN 100
  unsigned char *cands[MAXCANDS],*candspat[MAXCANDS];

***************
*** 137,143 ****

  process(int sock)
  {
!       unsigned char buf[1000],combuf[BUFSIZE];

        unsigned char w[100],p[100];
        int i,n;
--- 137,143 ----

  process(int sock)
  {
!       unsigned char buf[65536],combuf[BUFSIZE];

        unsigned char w[100],p[100];
        int i,n;
***************
*** 178,187 ****
                else {
                        strcpy(buf,"1\t");
                        for(i=0;i< n;i++){
!                               strcat(buf,cands[i]);
!                               strcat(buf,"\t");
                        }
-                       strcat(buf,"\n");
                }
                if(send(sock, buf, strlen(buf), 0) < 0) return -1;
                return 0;
--- 178,192 ----
                else {
                        strcpy(buf,"1\t");
                        for(i=0;i< n;i++){
!                               strncat(buf,cands[i],sizeof(buf) - strlen(buf) - 1);
!                               strncat(buf,"\t",sizeof(buf) - strlen(buf) - 1);
!                       }
!                       if ((sizeof(buf) - strlen(buf)) < 2){
!                               buf[sizeof(buf) - 2] = '\n';
!                               buf[sizeof(buf) - 1] = '\0';
!                       }else{
!                               strncat(buf,"\n",sizeof(buf) - strlen(buf) - 1);
                        }
                }
                if(send(sock, buf, strlen(buf), 0) < 0) return -1;
                return 0;
  • patch -p0 <../pobox-1.2.6-3.diff
*** server/pbserver.html.ORG    2015-12-28 23:34:45.403055697 +0900
--- server/pbserver.html        2015-12-28 23:34:51.003055322 +0900
***************
*** 45,53 ****
--- 45,57 ----
  #else
  #include <strings.h>
  #endif
+ #include <signal.h>
+ #include <sys/signal.h>
  #include "server.h"
  #include "poboxlib.h"

+ void sigtrap(int);
+
  #ifdef USE_PROFILER
  #include <sys/time.h>
  struct timeval ts,te;
***************
*** 121,126 ****
--- 125,133 ----
  #else
  main(int argc, char **argv)
  {
+       signal(SIGINT, sigtrap);
+       signal(SIGTERM, sigtrap);
+
        if(argc > 1) poboxdebug = 1;
  #endif
        if(pobox_init() < 0) exit(0);
***************
*** 239,244 ****
--- 246,257 ----
                return -1;
        }
  }
+
+ void sigtrap(int signum)
+ {
+       pobox_save(&learndic);
+       exit(1);
+ }
  </pre>
  • ./configure --enable-lookup && make
  • cd server
  • nkf -e ../dict/data/fugodic | sort | uniq >staticdic.tmp
  • perl ../fugodicnn.pl <staticdic.tmp | sort | uniq >staticdic
  • rm staticdic.tmp
  • touch learndic
  • cd ../..
  • cp -r OpenPOBox /usr/local/
  • chown -R openpobox.openpobox /usr/local/OpenPOBox
  • chmod u+s /usr/local/OpenPOBox/server/pbserver
server/pbserver.sh
#! /bin/sh
cd /usr/local/OpenPOBox/server/ || exit 1
exec ./pbserver &
fugodicnn.pl
## POBox fugodic change ん'n' -> ん'nn'
## Time-stamp: <Nov 25 2002>

while(<>){
#    my $orig = $_;

    #konna -> konnna
    if(/nn[aiueo]/){
        s/nn([aiueo])/nnn$1/g;
    }

    #an'i -> anni  (konna->konnna yori atoni oku)
    if(/n\'/){
        s/n\'/nn/g;
    }

    #ten -> tenn
    if(/[^n]n\t/){
        s/n\t/nn\t/;
    }

    #ronsi -> ronnsi
    if(/[aiouo]n[^naiueo]/){
        s/([aiouo])n([^naiueo])/$1nn$2/g;
    }

    #output
    print $_;    #put a new modified entry
#    if($orig ne $_){
#        print $orig; #leave original entry
#    }
}

pefop-0.4.5

  • tar xvf pefop-0.4.5.tar.gz
  • cd pefop-0.4.5
  • make && make install
  • alias scon='PEFOP_HS=no PEFOP_EXACT=no exec pefop-utf8 sh -c "exec screen -U -R"'

htop-2.0.2

pulseaudio-8.0

json-c-json-c-0.11-20130402
pulseaudio-8.0
  • tar xvf pulseaudio-8.0.tar.xz
  • cd pulseaudio-8.0
  • ./bootstrap.sh --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --mandir=/usr/man --disable-tcpwrap --disable-static --disable-hal-compat --disable-bluez4 --with-system-user=pulse --with-system-group=pulse --with-access-group=audio --with-bash-completion-dir=/usr/share/bash-completion/completions --host=arm-slackware-linux-gnueabi --target=arm-slackware-linux-gnueabi --build=arm-slackware-linux-gnueabi
  • make && make install

ffmpeg-3.2.2

lame-3.99.5
opencore-amr-0.1.4
openh264-1.6.0
x264-snapshot-20170114-2245
  • tar xvf x264-snapshot-20170114-2245.tar.bz2
  • cd x264-snapshot-20170114-2245
  • ./configure --enable-shared --extra-cflags="-march=armv7-a -mfpu=vfp -mfpu=vfpv3 -mfpu=neon -mthumb -mfloat-abi=softfp"
  • make
  • install-cli install-lib-dev install-lib-static install-lib-shared
ffmpeg-3.2.2
  • tar xvf ffmpeg-3.2.2.tar.bz2
  • cd ffmpeg-3.2.2
  • export CPPFLAGS="-I/usr/local/include"
  • export CFLAGS="-I/usr/local/include"
  • export LDFLAGS="-L/usr/local/lib"
  • ./configure --enable-shared --enable-libopencore-amrnb --enable-version3 --enable-libopencore-amrwb --enable-libmp3lame --enable-nonfree --enable-libx264 --enable-gpl --enable-libopenh264 --enable-libpulse --extra-cflags="-march=armv7-a -mfpu=vfp -mfpu=vfpv3 -mfpu=neon -mthumb -mfloat-abi=softfp -D__ARM_PCS"
  • make && make install

MPlayer-1.3.0

MPlayer-1.3.0
  • tar xvf MPlayer-1.3.0.tar.xz
  • cd MPlayer-1.3.0
  • export CFLAGS="-I/usr/local/include"
  • export CPPFLAGS="-I/usr/local/include"
  • export LDFLAGS="-L/usr/local/lib"
  • ./configure --enable-gui --disable-ffmpeg_a --extra-libs=-lgcrypt --extra-cflags="-march=armv7-a -mfpu=vfp -mfpu=vfpv3 -mfpu=neon -mthumb -mfloat-abi=softfp -D__ARM_PCS"
  • make && make install
essential-20071007
all-20110131
Blue-1.12
  • cd /usr/local/share/mplayer/
  • mkdir skins
  • cd skins
  • tar xvf Blue-1.12.tar.bz2
  • ln -s Blue default
font
  • cd /usr/local/share/mplayer/
  • ln -s /usr/share/fonts/TTF/sazanami-mincho.ttf subfont.ttf

alsa-1.1.1

sdl-1.2.14
  • tar xvvf SDL_image-1.2.10.tar.xz
  • cd SDL_image-1.2.10
  • CFLAGS="-O2" ./configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/man --enable-shared=yes --enable-static=no --enable-jpg-shared=no --enable-png-shared=no --enable-tif-shared=no
  • make
  • make install
  • sed -i -e "s/ -lmikmod//g" /usr/lib/libSDL_mixer.la
  • tar xvvf SDL_mixer-1.2.11.tar.xz
  • cd SDL_mixer-1.2.11
  • zcat ../SDL_mixer.usrlocal.diff.gz | patch -p1
  • CFLAGS="-O2" ./configure --prefix=/usr --mandir=/usr/man --libdir=/usr/lib --enable-shared=yes --enable-music-mod --enable-static=no
  • make
  • make install
  • tar xvvf SDL_net-1.2.7.tar.xz
  • cd SDL_net-1.2.7
  • CFLAGS="-O2" ./configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/man --enable-shared=yes --enable-static=no
  • make
  • make install
  • tar xvvf SDL_ttf-2.0.10.tar.xz
  • cd SDL_ttf-2.0.10
  • CFLAGS="-O2" ./configure --prefix=/usr --mandir=/usr/man --libdir=/usr/lib --enable-shared=yes --enable-static=no
  • make
  • make install
speexdsp-1.2rc3
speex-1.2.0
  • tar xvf speex-1.2.0
  • cd speex-1.2.0
  • ./configure && make && make install
alsa-1.1.1
alsa-lib-1.1.1
/etc/asound.conf
pcm.default pulse
ctl.default pulse
alsa-oss-1.0.28
  • tar xvvf alsa-oss-1.0.28.tar.xz
  • cd alsa-oss-1.0.28
  • ./configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/man --disable-static --build=arm-slackware-linux-gnueabi
  • make
  • make install
alsa-plugins-1.1.1
  • tar xvvf alsa-plugins-1.1.1.tar.xz
  • cd alsa-plugins-1.1.1
  • CFLAGS="-DHAVE_STDINT_H -DUSE_LIBSPEEX" CXXFLAGS="-DHAVE_STDINT_H -DUSE_LIBSPEEX" ./configure --prefix=/usr --libdir=/usr/lib --sysconfdir=/etc --localstatedir=/var --with-speex=lib --enable-maemo-plugin --mandir=/usr/man --docdir=/usr/doc/alsa-plugins-1.1.1 --host=arm-slackware-linux-gnueabi --target=arm-slackware-linux-gnueabi --build=arm-slackware-linux-gnueabi
  • make
  • make install
alsa-utils-1.1.1
  • tar xvvf alsa-utils-1.1.1.tar.xz
  • cd alsa-utils-1.1.1
  • ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --mandir=/usr/man --disable-alsaconf --host=arm-slackware-linux-gnueabi --build=arm-slackware-linux-gnueabi
  • make
  • make install
  • zcat ../rc.alsa.gz > /etc/rc.d/rc.alsa
  • chmod 644 /etc/rc.d/rc.alsa
  • zcat ../rc.alsa-oss.gz > /etc/rc.d/rc.alsa-oss
  • chmod 644 /etc/rc.d/rc.alsa-oss
  • ( cd /usr/man/man1 && rm -f arecord.1 && ln -sf aplay.1 arecord.1 )

firefox-36.0.4

autoconf-2.13
  • tar xvf autoconf-2.13.tar.gz
  • cd autoconf-2.13
  • ./configure --prefix=/usr/local/autoconf-2.13
  • make && make install
  • cd /usr/local/autoconf-2.13/bin/ && ln -s autoconf autoconf-2.13
Python-2.7.13
  • tar xvf Python-2.7.13.tar.xz
  • cd Python-2.7.13
  • ./configure && make && make install
binutils-2.27
oprofile-1.1.0
  • tar xvf oprofile-1.1.0.tar.gz
  • cd oprofile-1.1.0
  • ./autogen.sh
  • ./configure --prefix=/usr --libdir=/usr/lib --mandir=/usr/man --infodir=/usr/info --with-kernel-support
  • make
  • make install
  • mv /usr/share/mangled-name /usr/share/oprofile/mangled-name
make-3.82
  • export ARCH=arm
  • SLKCFLAGS="-O2"
  • LIBDIRSUFFIX=""
  • tar xvf make-3.82.tar.bz2
  • cd make-3.82
  • zcat ../make-3.82-android-build-fix.diff.gz | patch -p1
  • zcat ../make-3.82-bugfixes.patch.gz | patch -p1
  • CFLAGS="$SLKCFLAGS" ./configure --prefix=/usr --libdir=/usr/lib${LIBDIRSUFFIX} --mandir=/usr/man --infodir=/usr/info --build=$ARCH-slackware-linux
  • make -j6 || make
  • make install
  • cd /usr/bin; rm gmake; ln -s make gmake
firefox-36.0.4
*** ./js/src/jit/arm/Architecture-arm.cpp.ORG   2017-03-08 01:28:06.126964957 +0900
--- ./js/src/jit/arm/Architecture-arm.cpp       2017-03-08 01:28:31.826964953 +0900
***************
*** 30,41 ****
--- 30,53 ----
  # define AT_HWCAP 16
  #else
  # include <asm/hwcap.h>
+ # if !defined(HWCAP_VFPv4)
+ #  define HWCAP_VFPv4     (1 << 16)
+ # endif
  # if !defined(HWCAP_IDIVA)
  #  define HWCAP_IDIVA     (1 << 17)
  # endif
+ # if !defined(HWCAP_IDIVT)
+ #  define HWCAP_IDIVT     (1 << 18)
+ # endif
  # if !defined(HWCAP_VFPD32)
  #  define HWCAP_VFPD32    (1 << 19) /* set if VFP has 32 regs (not 16) */
  # endif
+ # if !defined(HWCAP_IDIV)
+ #  define HWCAP_IDIV      (HWCAP_IDIVA | HWCAP_IDIVT)
+ # endif
+ # if !defined(HWCAP_ARMv7)
+ #  define HWCAP_ARMv7     (1 << 29)
+ # endif
  #endif

  namespace js {
*** ./security/nss/cmd/lowhashtest/Makefile.ORG 2017-03-08 12:10:24.990247306 +0900
--- ./security/nss/cmd/lowhashtest/Makefile     2017-03-08 12:12:24.520247283 +0900
***************
*** 56,61 ****
--- 56,62 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  #######################################################################
*** ./security/nss/cmd/pk11mode/Makefile.ORG    2017-03-08 12:10:25.010247306 +0900
--- ./security/nss/cmd/pk11mode/Makefile        2017-03-08 12:12:49.330247278 +0900
***************
*** 41,46 ****
--- 41,47 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
*** ./security/nss/cmd/platlibs.mk.ORG  2017-03-08 12:10:25.030247306 +0900
--- ./security/nss/cmd/platlibs.mk      2017-03-08 12:13:34.940247268 +0900
***************
*** 143,148 ****
--- 143,149 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif

***************
*** 191,196 ****
--- 192,198 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif

*** ./security/nss/cmd/shlibsign/mangle/Makefile.ORG    2017-03-08 12:10:25.070247306 +0900
--- ./security/nss/cmd/shlibsign/mangle/Makefile        2017-03-08 12:14:19.250247260 +0900
***************
*** 39,44 ****
--- 39,45 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
*** ./security/nss/cmd/shlibsign/Makefile.ORG   2017-03-08 12:10:25.050247306 +0900
--- ./security/nss/cmd/shlibsign/Makefile       2017-03-08 12:13:58.890247264 +0900
***************
*** 39,44 ****
--- 39,45 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
*** ./security/nss/lib/nss/config.mk.ORG        2017-03-08 12:10:25.190247306 +0900
--- ./security/nss/lib/nss/config.mk    2017-03-08 12:18:18.900247213 +0900
***************
*** 22,27 ****
--- 22,28 ----
        -lplc4 \
        -lplds4 \
        -lnspr4\
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC
  EXTRA_SHARED_LIBS += \
***************
*** 44,49 ****
--- 45,51 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
*** ./security/nss/lib/smime/config.mk.ORG      2017-03-08 12:10:25.210247306 +0900
--- ./security/nss/lib/smime/config.mk  2017-03-08 12:18:53.530247207 +0900
***************
*** 24,29 ****
--- 24,30 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC
  EXTRA_SHARED_LIBS += \
***************
*** 46,51 ****
--- 47,53 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
*** ./security/nss/lib/freebl/config.mk.ORG     2017-03-08 12:10:25.170247306 +0900
--- ./security/nss/lib/freebl/config.mk 2017-03-08 12:17:38.980247220 +0900
***************
*** 66,71 ****
--- 66,72 ----
        -lnssutil3 \
        -L$(NSPR_LIB_DIR) \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC
  EXTRA_SHARED_LIBS += \
***************
*** 86,91 ****
--- 87,93 ----
        -lnssutil3 \
        -L$(NSPR_LIB_DIR) \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif
  endif
*** ./security/nss/lib/softoken/config.mk.ORG   2017-03-08 12:10:25.230247306 +0900
--- ./security/nss/lib/softoken/config.mk       2017-03-08 12:19:35.430247198 +0900
***************
*** 30,35 ****
--- 30,36 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC

***************
*** 55,60 ****
--- 56,62 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif

*** ./security/nss/lib/softoken/legacydb/config.mk.ORG  2017-03-08 12:10:25.250247306 +0900
--- ./security/nss/lib/softoken/legacydb/config.mk      2017-03-08 12:20:09.730247192 +0900
***************
*** 30,35 ****
--- 30,36 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC

***************
*** 53,57 ****
--- 54,59 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif
*** ./security/nss/lib/ckfw/nssmkey/Makefile.ORG        2017-03-08 12:10:25.150247306 +0900
--- ./security/nss/lib/ckfw/nssmkey/Makefile    2017-03-08 12:17:05.940247227 +0900
***************
*** 22,27 ****
--- 22,28 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else
  EXTRA_SHARED_LIBS += \
***************
*** 37,42 ****
--- 38,44 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        -framework Security \
        -framework CoreServices \
        $(NULL)
*** ./security/nss/lib/ckfw/capi/Makefile.ORG   2017-03-08 12:10:25.120247306 +0900
--- ./security/nss/lib/ckfw/capi/Makefile       2017-03-08 12:15:45.390247243 +0900
***************
*** 24,29 ****
--- 24,30 ----
        -lcrypt32 \
        -ladvapi32 \
        -lrpcrt4 \
+       -lrt \
        $(NULL)
  else
  EXTRA_SHARED_LIBS += \
***************
*** 42,47 ****
--- 43,49 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif

*** ./security/nss/lib/ckfw/builtins/Makefile.ORG       2017-03-08 12:10:25.100247306 +0900
--- ./security/nss/lib/ckfw/builtins/Makefile   2017-03-08 12:15:02.370247251 +0900
***************
*** 21,26 ****
--- 21,27 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else
  EXTRA_SHARED_LIBS += \
***************
*** 36,41 ****
--- 37,43 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  endif

*** ./security/nss/lib/ssl/config.mk.ORG        2017-03-08 12:10:25.270247306 +0900
--- ./security/nss/lib/ssl/config.mk    2017-03-08 12:20:43.920247186 +0900
***************
*** 41,46 ****
--- 41,47 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC
  EXTRA_SHARED_LIBS += \
***************
*** 64,69 ****
--- 65,71 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  ifeq ($(OS_ARCH), BeOS)
*** ./security/nss/lib/util/config.mk.ORG       2017-03-08 12:10:25.300247306 +0900
--- ./security/nss/lib/util/config.mk   2017-03-08 12:21:49.680247173 +0900
***************
*** 20,25 ****
--- 20,26 ----
        -lplc4 \
        -lplds4 \
        -lnspr4\
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC
  EXTRA_SHARED_LIBS += \
***************
*** 39,44 ****
--- 40,46 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
*** ./security/nss/lib/sysinit/config.mk.ORG    2017-03-08 12:10:25.280247306 +0900
--- ./security/nss/lib/sysinit/config.mk        2017-03-08 12:21:17.100247179 +0900
***************
*** 27,32 ****
--- 27,33 ----
        -lplc4 \
        -lplds4 \
        -lnspr4\
+       -lrt \
        $(NULL)
  else # ! NS_USE_GCC
  EXTRA_SHARED_LIBS += \
***************
*** 49,54 ****
--- 50,56 ----
        -lplc4 \
        -lplds4 \
        -lnspr4 \
+       -lrt \
        $(NULL)

  endif
  • .mozconfig
export LIBS="-lrt"
export CFLAGS="-D__ARM_PCS -Dnullptr=0"
export CXXFLAGS="-D__ARM_PCS -Dnullptr=0"
export MOZ_DEBUG_FLAGS="-v"
. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_MAKE_FLAGS=-j1
ac_add_options --enable-optimize
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --disable-debug
ac_add_options --disable-tests
ac_add_options --enable-gold
ac_add_options --enable-skia
  • PATH=/usr/local/autoconf-2.13/bin:${PATH}; export PATH
  • export LANG=C; export LC_ALL=C
  • nice make -f client.mk build && cd obj-armv7l-unknown-linux-gnueabi/ && nice make package
  • mkdir /usr/local/firefox-36.0.4
  • cd /usr/local/firefox-36.0.4
  • tar xvvf /home/m-ito/tmp/mozilla-release/obj-armv7l-unknown-linux-gnueabi/dist/firefox-36.0.4.en-US.linux-gnueabi-armv7l.tar.bz2
  • mkdir /usr/local/gecko-sdk-36.0.4
  • cd /usr/local/gecko-sdk-36.0.4
  • cp -rL /home/m-ito/tmp/mozilla-release/obj-armv7l-unknown-linux-gnueabi/dist/sdk .
  • cd sdk
  • cp -rL /home/m-ito/tmp/mozilla-release/obj-armv7l-unknown-linux-gnueabi/dist/idl .
  • cp -rL /home/m-ito/tmp/mozilla-release/obj-armv7l-unknown-linux-gnueabi/dist/include .
  • dbus-uuidgen > /var/lib/dbus/machine-id
  • export ARMHWCAP=`cat /proc/cpuinfo |egrep '^Features'|sed -e 's/^Features.*: *//;s/ *$//'|tr -s ' '|tr ' ' ','`

update just im-xim.so from gtk+2-2.24.4

thunar

Error message

Thunar-ERROR **: Failed to load fallback icon from "/usr/share/pixmaps/Thunar/Thunar-fallback-icon.png" (Unrecognized image file format). Check your installation!
aborting...
Aborted

How to fix

update-mime-database /usr/share/mime/

calligra-2.5.5

calligra-2.5.5
  • tar xvf calligra-2.5.5.tar.bz2
  • cd calligra-2.5.5
  • mkdir build
  • cd build
  • cmake -DKDE4_BUILD_TESTS=OFF -DSITE="slackware.com" -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE -DCMAKE_C_FLAGS:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_C_FLAGS_RELEASE:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_CXX_FLAGS:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_CXX_FLAGS_RELEASE:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DMAN_INSTALL_DIR=/usr/man -DSYSCONF_INSTALL_DIR=/etc/kde -DLIB_SUFFIX= ..
  • make && make install
calligra-l10n-ja-2.5.5
  • tar xvf calligra-l10n-ja-2.5.5.tar.bz2
  • cd calligra-l10n-ja-2.5.5
  • mkdir build
  • cd build
  • cmake -DKDE4_BUILD_TESTS=OFF -DSITE="slackware.com" -DKDE_PLATFORM_FEATURE_DISABLE_DEPRECATED=TRUE -DCMAKE_C_FLAGS:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_C_FLAGS_RELEASE:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_CXX_FLAGS:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_CXX_FLAGS_RELEASE:STRING=-O2 -march=armv7-a -mtune=arm7 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DMAN_INSTALL_DIR=/usr/man -DSYSCONF_INSTALL_DIR=/etc/kde -DLIB_SUFFIX= ..
  • make && make install
Rebuilds the system configuration cache
  • kbuildsycoca4

lha-master

  • unzip -x lha-master.zip
  • cd lha-master
  • aclocal
  • autoheader
  • automake -a
  • autoconf
  • ./configure && make && make install

unzip60 + cp932 patch