kobapan@wiLiki
Login
Gauche

Gauche:さくらインターネットにportsからGaucheをインストール

最初に書いとくけど、やろうとして断念しました。

目次

FreeBSD ports をユーザ権限で使えるようにする

ports treeの取得

ports用のディレクトリの作成

mkdir ~/ports
mkdir -p ~/local/var/db/portsnap
mkdir -p ~/ports/distfiles

portsnap.conf/ports/portsnap.conf

ユーザ を適宜変える

# Default directory where compressed snapshots are stored.
WORKDIR=/home/ユーザ/local/var/db/portsnap

# Default location of the ports tree (target for "update" and  "extract").
PORTSDIR=/home/ユーザ/ports

# Server or server pool from which to fetch updates.  You can change
# this to point at a specific server if you want, but in most cases
# using a "nearby" server won't provide a measurable improvement in
# performance.
SERVERNAME=portsnap.FreeBSD.org

# Trusted keyprint.  Changing this is a Bad Idea unless you've received
# a PGP-signed email from <security-officer@FreeBSD.org> telling you to
# change it and explaining why.
KEYPRINT=9b5feee6d69f170e3dd0a2c8e469ddbd64f13f978f2f3aede40c98633216c330

# Example of ignoring parts of the ports tree.  If you know that you
# absolutely will not need certain parts of the tree, this will save
# some bandwidth and disk space.  See the manual page for more details.
#
# WARNING: Working with an incomplete ports tree is not supported and
# can cause problems due to missing dependencies.  If you have REFUSE
# directives and experience problems, remove them and update your tree
# before asking for help on the mailing lists.
#
REFUSE arabic chinese french german hebrew hungarian
REFUSE korean polish portuguese russian ukrainian vietnamese
REFUSE x11 x11-clocks x11-drivers x11-fm x11-fonts x11-servers x11-themes x11-toolkits x11-wm
REFUSE palm cad astro

portsnap

portsnap -f ~/ports/portsnap.conf fetch extract update

時間かかる

portsツリーは400MB程度

インストールの準備

インストール用ディレクトリの作成

mkdir ~/local
cd ~/local
mkdir -p bin sbin etc lib tmp/dist tmp/work var/db/pkg var/db/ports var/run

環境変数の設定/.bashrc

# ports begin

export INSTALL_AS_USER=yes
export PREFIX=${HOME}/local
export LOCALBASE=${HOME}/local
export PKG_DBDIR=${LOCALBASE}/var/db/pkg
export PKG_TMPDIR=${LOCALBASE}/tmp/
export PORT_DBDIR=${LOCALBASE}/var/db/pkg
export DISTDIR=${LOCALBASE}/tmp/dist
export WRKDIRPREFIX=${LOCALBASE}/tmp/work
export PORTSDIR=${HOME}/ports
export PKGTOOLS_CONF=${LOCALBASE}/etc/pkgtools.conf
export DEPENDS_TARGET='install clean'

export X11BASE=${LOCALBASE}

export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig:$HOME/local/libdata/pkgconfig:/usr/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/local/libdata/pkgconfig:/usr/libdata/pkgconfig"

# Set user and group variables to ourself
export BINOWN=`whoami`
export BINGRP=`id -G -n ${BINOWN}`
export SHAREOWN=${BINOWN}
export SHAREGRP=${BINGRP}
export MANOWN=${BINOWN}
export MANGRP=${BINGRP}

# Make sure files are installed with correct default permissions
export BINMODE=744
export SHAREMODE=644
export MANMODE=644

# Make sure we don't really try to become root, but just execute everything as ourselves
export SU_CMD="sh -c"

# Make sure the systemdefault make.conf is not read
export __MAKE_CONF=${LOCALBASE}/etc/make.conf

# Keep our own version of ldconfig hints
export LDCONFIG="/sbin/ldconfig -i -f ${LOCALBASE}/var/run/ld-elf.so.hints"
#export LDCONFIG="/sbin/ldconfig -f ${LOCALBASE}/var/run/ld-elf.so.hints -i -R ${LOCALBASE}/etc/ld-elf.so.conf "

export LD_LIBRARY_PATH=${LOCALBASE}/lib
export LD_RUN_PATH=${LOCALBASE}/lib

export PATH=${LOCALBASE}/bin:${LOCALBASE}/sbin:${PATH}
export MANPATH_MAP=${LOCALBASE}/bin:${LOCALBASE}/man

# Set application specific variables to make sure it doesn't pick up things from the main system
export MAKESYSPATH=${PORTSDIR}/Mk.fix:/usr/share/mk:${PORTSDIR}/Mk.fix:/usr/share/mk:${PORTSDIR}/Mk
export ALLOW_UNSUPPORTED_SYSTEM=yes
export APXS=${LOCALBASE}/sbin/apxs
export PERL=${LOCALBASE}/bin/perl
export PERL5=${PERL}
export SITE_PERL=${LOCALBASE}/lib/perl5/site_perl/5.8.8
export SITE_PERL5=${SITE_PERL}
export PERL_VERSION=5.8.8
export PERL_VER=${PERL_VERSION}

# port ends
source ~/.bashrc

ライブラリパスの設定

ldconfig -rコマンドを使って整形し、ld-elf.so.confを生成。ローカルのライブラリパスも追記。

ldconfig -r | awk '/search/ {print $3}' | tr ":" "\n" > ~/local/etc/ld-elf.so.conf
echo ~/local/lib >> ~/local/etc/ld-elf.so.conf

security/mbedtls インストール

$ cd ~/ports/security/mbedtls
$ make install
"/home/hogehoge/ports/Mk/bsd.port.mk", line 1017: Unknown directive
Unknown modifier 't'

Variable .CURDIR is recursive.

結局エラーで解決せず

インストールのエラーが解決しない。FreeBSD9系のportsは終わってる?とか、gmakeのバージョンが古いとか。

さくらインターネット、止めるかな。

参考

Debian
Emacs
Firefox
Gauche
JavaScript
Linux
Scheme
org-mode/latex

More ...