2012-07-31 :-(
_ [pkgsrc][quickml]pkgsrc mail/quickml ruby 1.9 対応作業ログ
CVS log for pkgsrc/mail/quickml/Makefile
Limit this package to ruby18 for just now. It could be modified about handling of character encoding, but it might take some more time.
ということで作業してみる。
移動
% cd /usr/pkgsrc/mail/quickml
Makefile を RUBY_VERSION_SUPPORTED をコメントにしてみる。
#RUBY_VERSION_SUPPORTED= 18
おもむろに make 。エラーになる
rin@mogu[/usr/pkgsrc/mail/quickml]% sudo make => Bootstrap dependency digest>=20010302: found digest-20111104 ===> Building for ruby193-quickml-0.7nb1 Making all in lib Making all in quickml Making all in . for i in messages.ja; do /usr/pkg/bin/ruby193 lib/quickml/gettext.rb $i quickml.in lib/quickml/*.rb; done lib/quickml/gettext.rb:55:in `load': messages.ja:4: invalid multibyte char (US-ASCII) (SyntaxError) messages.ja:4: invalid multibyte char (US-ASCII) messages.ja:4: syntax error, unexpected $end, expecting '}' "<%s> は\nメーリングリスト <%s> から削除されました。\n", ^ from lib/quickml/gettext.rb:55:in `initialize' from lib/quickml/gettext.rb:122:in `new' from lib/quickml/gettext.rb:122:in `<main>' *** Error code 1 Stop. make: stopped in /usr/pkgsrc/mail/quickml/work/quickml-0.7 *** Error code 1 Stop. make: stopped in /usr/pkgsrc/mail/quickml/work/quickml-0.7 *** Error code 1 Stop. make: stopped in /usr/pkgsrc/mail/quickml *** Error code 1 Stop. make: stopped in /usr/pkgsrc/mail/quickml
work/quickml-0.7/config.log を眺めてどういう configure を指定したか確認する。
./configure --datadir=/usr/pkg/share/quickml --sysconfdir=/usr/pkg/etc --with-user=quickml --with-group=quickml --with-pidfile=/var/run/quickml.pid --with-logfile=/var/log/quickml.log --with-rubydir=/usr/pkg/lib/ruby/vendor_ruby/1.9.3 --localstatedir=/var --prefix=/usr/pkg --build=i386--netbsdelf --host=i386--netbsdelf --mandir=/usr/pkg/man
work/quickml-0.7/Makefile.in を FreeBSD ports quickml のパッチ と同じように変更する。
work/quickml-0.7 で再度 configure
rin@mogu[/usr/pkgsrc/mail/quickml/work/quickml-0.7]% ./configure --datadir=/usr/pkg/share/quickml --sysconfdir=/usr/pkg/etc --with-user=quickml --with-group=quickml --with-pidfile=/var/run/quickml.pid --with-logfile=/var/log/quickml.log --with-rubydir=/usr/pkg/lib/ruby/vendor_ruby/1.9.3 --localstatedir=/var --prefix=/usr/pkg --build=i386--netbsdelf --host=i386--netbsdelf --mandir=/usr/pkg/man
mail/quickml で再度 make
rin@mogu[/usr/pkgsrc/mail/quickml]% sudo make Making all in lib Making all in quickml Making all in . for i in messages.ja; do /usr/pkg/bin/ruby -E Shift_JIS:UTF-16LE lib/quickml/gettext.rb $i quickml.in lib/quickml/*.rb; done rm -f quickml sed -e 's!%RUBY%!/usr/pkg/bin/ruby!g' -e 's!%SYSCONFDIR%!/usr/pkg/etc!g' quickml.in >quickml chmod +x quickml chmod -w quickml rm -f quickml-ctl sed -e 's!%SBINDIR%!/usr/pkg/sbin!g' -e 's!%PIDFILE%!/var/run/quickml.pid!g' quickml-ctl.in > quickml-ctl chmod +x quickml-ctl chmod -w quickml-ctl rm -f quickmlrc.sample sed -e 's!%LOCALSTATEDIR%!/var/quickml!g' -e 's!%DATADIR%!/usr/pkg/share/quickml!g' -e 's!%USER%!quickml!g' -e 's!%GROUP%!quickml!g' -e 's!%PIDFILE%!/var/run/quickml.pid!g' -e 's!%LOGFILE%!/var/log/quickml.log!g' quickmlrc.sample.in > quickmlrc.sample
ok
quickml/Makefile に追加
.if ${RUBY_VER} == 1.9 PATCHFILES+= extra-patch-ruby19-Makefile.in .endif
extra-patch-ruby19-Makefile.in を paches に設置
make 。extra-patch-ruby19-Makefile.in をダウンロードしようとする。なぜ
rin@mogu[/usr/pkgsrc/mail/quickml]% sudo make => Bootstrap dependency digest>=20010302: found digest-20111104 => Fetching patch-ruby19-Makefile.in : local: extra-patch-ruby19-Makefile.in remote: extra-patch-ruby19-Makefile.in 229 Entering Extended Passive Mode (|||55386|) 550 extra-patch-ruby19-Makefile.in: No such file or directory. 221- Data traffic for this session was 0 bytes in 0 files. Total traffic for this session was 2140 bytes in 0 transfers. 221 Thank you for using the FTP service on lala. fetch: Unable to fetch expected file extra-patch-ruby19-Makefile.in *** Error code 1 Stop. make: stopped in /usr/pkgsrc/mail/quickml
Chapter 11. Package components - files, directories and contents
PATCHFILES: Name(s) of additional files that contain distribution patches. There is no default. pkgsrc will look for them at PATCH_SITES. They will automatically be uncompressed before patching if the names end with .gz or .Z.
PATCH_SITES: Primary location(s) for distribution patch files (see PATCHFILES below) if not found locally.
PATCHFILES じゃないらしい。
quickml/Makefile をこんなふうにしてみた。
post-patch: . if ${RUBY_VER} == "19" || ${RUBY_VER} == "192" || ${RUBY_VER} == "193" cd ${WRKSRC}; \ ${PATCH} < ${PATCHDIR}/extra-patch-ruby19-Makefile.in . endif
to be continued....