# gunzip パッケージのファイル名.gz # pkgadd -d 展開したパッケージのファイル名 The following packages are available: 1 <パッケージ名> Select package(s) you wish to process (or 'all' to process all packages). (default: all) [?,??,q]: <--[ENTER]を押す
Solaris 10のパッケージになっているperlはithreadsに対応していないため、ithreads対応にビルドしたperlを別ディレクトリにインストールします。(以下の手順では/opt/local以下にインストールしています。パッケージに影響を及ぼさないディレクトリであればどこでも良いと思います)
# /usr/local/bin/wget http://www.cpan.org/src/perl-5.10.0.tar.gz
# export PATH="/usr/sbin:/usr/bin:/usr/sfw/bin"
# mkdir -p /opt/local/bin
# gzcat perl-5.10.0.tar.gz |tar xvf -
# cd perl-5.10.0
# sh Configure
(以下は[ENTER]キー以外のタイプをする箇所を抜粋しています)
Installation prefix to use? (~name ok) [/usr/local] /opt/local
Build a threading Perl? [n] y
Use which C compiler? [cc] gcc
# gmake
# gmake test
testの最中にエラーが出て終了しますがそのままインストールします
(多分よくないことですが、gnviewの動作自体には問題がないようです。気になる方は
D_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl harness
としてどこがfailするのか確認します。)
# gmake install
# /opt/local/bin/perl -V
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
(中略)
useithreads=define, usemultiplicity=define
^^^^^^^^^^^^^^^^^^<-これを確認
# PKG_CONFIG_PATH="/usr/lib/pkgconfig:/usr/sfw/lib/pkgconfig" # export PKG_CONFIG_PATH # env PKG_CONFIG_PATH /usr/lib/pkgconfig:/usr/sfw/lib/pkgconfig
# /opt/local/bin/cpan cpan> o conf make /usr/sfw/bin/gmake cpan> o conf commit cpan> install Bundle::CPAN
prefix=/usr/openwin
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
xthreadlib=
Name: X11
Description: X Library
Version: 0.0
Requires: xproto kbproto inputproto
Requires.private: xau xdmcp
Cflags: -I${includedir} -I/usr/X11/share/include -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DXTHREADS -DXUSE_MTSAFE_API
Libs: -L${libdir} -R${libdir} -lX11
Libs.private:
# /opt/local/bin/cpan
Always commit changes to config variables to disk? [no] yes
(モジュールを順番にインストールします)
cpan[2]> install ExtUtils::Depends
cpan[3]> install HTML::TokeParser
(以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします)
----- Unsatisfied dependencirs detected during -----
----- GAAS/HTML-Parser-3.56.tar.gz -----
HTML::Tagset [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER]
cpan[4]> install ExtUtils::PkgConfig
cpan[5]> install Glib
cpan[6]> install Cairo
(以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします)
----- Unsatisfied dependencirs detected during -----
----- TSCH/Cairo-1.044.tar.gz -----
Test::Number::Delta [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER]
cpan[7]> install Gtk2
(test時にエラーが出てインストールできないことがあります。(私の場合は必ずエラーになりました)
force install Gtk2 で無理矢理インストールできますがgnviewが動かない場合が
あります。自己責任でどうぞ)
cpan[8]> install Gtk2::GladeXML
cpan[9]> install HTTP::Date
(以下の表示(依存性解決)が出ますので、yesをタイプして依存するモジュールをインストールします)
----- Unsatisfied dependencirs detected during -----
----- GAAS/libwww-perl-5.808.tar.gz -----
URI [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] <-- [ENTER]もしくはyes[ENTER]
cpan[10]> q
#
# gzcat gnview-0.7.tar.gz | tar xvf - # cd gnview-0.7 # mkdir -p /usr/share/gnview # cp -p gnview.glade 1pix* gnview_*.pl /usr/share/gnview # cp -p gnview /usr/bin # chmod 755 /usr/bin/gnview (以下は必要に応じて) # cp -p gnview.desktop /usr/share/applications
(変更前) #!/usr/bin/perl -w (変更後) #!/opt/local/bin/perl -w