hemamu版でapt-buildしようかと思ったら

最低限リプレイスするものだけでもビルドする必要がある。
apt-buildは入っているので動くのかな?

The following packages have unmet dependencies:
  apt-build: Depends: g++ but it is not going to be installed
             Depends: dpkg-dev (>= 1.9) but it is not going to be installed
             Depends: devscripts but it is not installable

g++がないのね。やっぱ、ビルドで詰まるのかな?
dpkg-devはいるのに、依存しているpatchはいないのか。
devscriptsもいない。これはallかな? 違った。Etchだと2.9.26かな。でもパッケージプールにはi386/amd64しか置いてないな。


kogiidena版からpatch, devscriptsを入れておこう。

# mkdir kogiidena
# cd kogiidena/
# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/patch/patch_2.5.9-2_sh4.deb
# dpkg -i patch_2.5.9-2_sh4.deb
Selecting previously deselected package patch.
(Reading database ... 6543 files and directories currently installed.)
Unpacking patch (from patch_2.5.9-2_sh4.deb) ...
Setting up patch (2.5.9-2) ...
# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/devscripts/devscripts_2.8.14_sh4.deb
# dpkg -i devscripts_2.8.14_sh4.deb
Selecting previously deselected package devscripts.
(Reading database ... 7439 files and directories currently installed.)
Unpacking devscripts (from devscripts_2.8.14_sh4.deb) ...
Setting up devscripts (2.8.14) ...

dpkg-devを入れる。binutils make perl perl-modulesも入った。

# apt-get install dpkg-dev
Reading package lists... Done
Building dependency tree... Done
The following extra packages will be installed:
  binutils make perl perl-modules
Suggested packages:
  binutils-doc debian-keyring make-doc libterm-readline-gnu-perl
  libterm-readline-perl-perl
Recommended packages:
  gcc c-compiler bzip2 perl-doc
The following NEW packages will be installed:
  binutils dpkg-dev make perl perl-modules
0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded.
Need to get 0B/9601kB of archives.
After unpacking 34.0MB of additional disk space will be used.
Do you want to continue [Y/n]?
WARNING: The following packages cannot be authenticated!
  perl-modules perl make binutils dpkg-dev
Authentication warning overridden.
Selecting previously deselected package perl-modules.
(Reading database ... 6552 files and directories currently installed.)
Unpacking perl-modules (from .../perl-modules_5.8.7-10_all.deb) ...
Selecting previously deselected package perl.
Unpacking perl (from ..././perl_5.8.7-10_sh4.deb) ...
Selecting previously deselected package make.
Unpacking make (from ..././make_3.81-3_sh4.deb) ...
Selecting previously deselected package binutils.
Unpacking binutils (from .../binutils_2.17cvs20070426-3_sh4.deb) ...
Selecting previously deselected package dpkg-dev.
Unpacking dpkg-dev (from ..././dpkg-dev_1.13.26_all.deb) ...
Setting up make (3.81-3) ...
Setting up binutils (2.17cvs20070426-3) ...

Setting up perl-modules (5.8.7-10) ...
Setting up perl (5.8.7-10) ...

Setting up dpkg-dev (1.13.26) ...

どうせ必要になるので、SuggestedとRecommendedも入るものはとか、後で必要そうなものは入れておこう。
# apt-get install binutils-doc gcc cpp cpp-4.0 gcc-4.0 bzip2 perl-doc autoconf automake1.9 libtool bison libc6-dev autotools-dev
うむ。flex file m4 もない。
autoconf bison libc6-dev libtoolあたりは素直には入らない。まいったな。
まだまだ最低限じゃないってことね。
flex file m4はkogiidena版を持って来る。linux-kernel-headersもやや古いが入れる。

# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/file/file_4.12-1_sh4.deb
# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/file/libmagic1_4.12-1_sh4.deb
# dpkg -i libmagic1_4.12-1_sh4.deb
# dpkg -i file_4.12-1_sh4.deb
# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/m4/m4_1.4.2-1_sh4.deb
# dpkg -i m4_1.4.2-1_sh4.deb
# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/flex/flex_2.5.31-31_sh4.deb
# dpkg -i flex_2.5.31-31_sh4.deb
# wget http://iohack.sourceforge.jp/kogiidena/debian26/binary-sh4/linux-kernel-headers/linux-kernel-headers_2.6.13+0rc3-1.1_sh4.deb
# dpkg -i linux-kernel-headers_2.6.13+0rc3-1.1_sh4.deb


これで一応のビルド環境が整備された模様。

# vi /etc/apt/sources.list
deb-src http://ftp.debian.org/debian/ etch main non-free contrib
# apt-get update
# mkdir hemamu_plus
# cd hemamu_plus/
# apt-get source patch
# cd patch-2.5.9/

ビルドには、debhelperが必要だ。パッケージはある。しかし、これはhtml2text po-debconf debconf-utilsに依存していて、それらのパッケージはhemamu版にはまだない。
po-debconfはgettext intltool-debianに依存している。この2つはhemamu版にあるので入れる。
po-debconfはkogiidena版のpo-debconf_0.8.22_all.debを使う。
html2textも、kogiidena版のhtml2text_1.3.2a-1_sh4.debを使う。
で、debhelperを入れる。
html2text po-debconfの2つがkogiidena版から入ったので、これをアップグレードする。
# apt-get source html2text
# cd html2text-1.3.2a/
# dpkg-buildpackage -uc -us -d
Checking C++ compiler... Error: Could not find a working C++ compiler.
これで手詰まりかな...


g++がないのは、パッケージビルドには深刻な問題で、これは前にも経験している。
このへんをhemamu氏が突破してくれるのを待つほうがいいのだろうか。


http://www.nigauri.org/~iwamatsu/debian/superh/packages/ あたりにある4.0.2あたりであれば、g++もパッケージ化できているようだ。
こっちを土台でやるか?
Etchを確認したら、4:4.1.1-15とか4.1.1-21が出てくる。つらいところだ。
それとも、3.4系でまとめるか...
と考えているとめんどくさくなってしまうのだな。
今回はこれまででしょう。

><