peclのoauthは、oauthを扱うためのインターフェースを提供してくれます。
http://pecl.php.net/package/oauth/
% sudo portinstall pecl-oauth
Password:
[Gathering depends for net/pecl-oauth ............................ done]
---> Installing 'pecl-oauth-0.99.5' from a port (net/pecl-oauth)
---> Building '/usr/ports/net/pecl-oauth'
===> Cleaning for php5-5.2.11_1
===> Cleaning for pecl-oauth-0.99.5
===> Vulnerability check disabled, database not found
=> oauth-0.99.5.tgz doesn't seem to exist in /usr/ports/distfiles/PECL.
=> Attempting to fetch from ftp://ftp.meisei-u.ac.jp/pub/FreeBSD/ports/distfiles/PECL/.
Initializing download: ftp://ftp.meisei-u.ac.jp/pub/FreeBSD/ports/distfiles/PECL/oauth-0.99.5.tgz
File size: 21642 bytes
Opening output file oauth-0.99.5.tgz
Starting download
Connection 0 finished ]
Connection 1 finished
Connection 2 finished
Downloaded 21.1 kilobytes in 0 seconds. (208.82 KB/s)
===> Extracting for pecl-oauth-0.99.5
=> MD5 Checksum OK for PECL/oauth-0.99.5.tgz.
=> SHA256 Checksum OK for PECL/oauth-0.99.5.tgz.
===> Patching for pecl-oauth-0.99.5
===> pecl-oauth-0.99.5 depends on file: /usr/local/include/curl/curl.h - found
===> pecl-oauth-0.99.5 depends on file: /usr/local/bin/phpize - found
===> pecl-oauth-0.99.5 depends on file: /usr/local/bin/autoconf-2.62 - found
===> PHPizing for pecl-oauth-0.99.5
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
----------------------------------------------------------------------
Libraries have been installed in:
/usr/ports/net/pecl-oauth/work/oauth-0.99.5/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Build complete.
Don't forget to run 'make test'.
---> Installing the new version via the port
===> Installing for pecl-oauth-0.99.5
===> pecl-oauth-0.99.5 depends on file: /usr/local/include/php/main/php.h - found
===> Generating temporary packing list
===> Checking if net/pecl-oauth already installed
===> Registering installation for pecl-oauth-0.99.5
****************************************************************************
The following line has been added to your /usr/local/etc/php/extensions.ini
configuration file to automatically load the installed extension:
extension=oauth.so
****************************************************************************
===> Cleaning for pecl-oauth-0.99.5
2009年11月23日月曜日
pecl-oauthをインストールする
2009年9月19日土曜日
/usr/ports/emulators/linux_base-fc4
アップデートに失敗。
---> Installing the new version via the port
===> Installing for linux_base-fc-4_15
===> Generating temporary packing list
Linux mode is not enabled.
Loading linux kernel module now...
kldload: can't load linux: No such file or directory
The linux kernel module could not be loaded.
Please enable linux mode manually and retry.
*** Error code 1
Stop in /usr/ports/emulators/linux_base-fc4.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade14705.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=linux_base-fc-4_6 UPGRADE_PORT_VER=4_6 make -DFORCE_PKG_REGISTER reinstall
---> Restoring the old version
Linux mode is not enabled.
Loading linux kernel module now...
kldload: can't load linux: No such file or directory
The linux kernel module could not be loaded.
Please enable linux mode manually and retry.
pkg_add: install script returned error status
2009年7月24日金曜日
FreeBSD libstdc++ doc ドキュメント
libstdc++のドキュメントのインストール方法
% sudo portinstall /usr/ports/lang/libstdc++_stldoc_3.4.0 0:26[foo /usr/ports/devel]
Password:
[Gathering depends for lang/libstdc++_stldoc_3.4.0 done]
---> Installing 'libstdc++_stldoc_3.4.0-20040609_1' from a port (lang/libstdc++_stldoc_3.4.0)
---> Building '/usr/ports/lang/libstdc++_stldoc_3.4.0'
===> Cleaning for libstdc++_stldoc_3.4.0-20040609_1
===> Vulnerability check disabled, database not found
=> libstdc++-html-USERS-3.4.0.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.funet.fi/pub/mirrors/sources.redhat.com/pub/gcc/libstdc++/doxygen/.
libstdc++-html-USERS-3.4.0.tar.bz2 100% of 2418 kB 157 kBps 00m00s
===> Extracting for libstdc++_stldoc_3.4.0-20040609_1
=> MD5 Checksum OK for libstdc++-html-USERS-3.4.0.tar.bz2.
=> SHA256 Checksum OK for libstdc++-html-USERS-3.4.0.tar.bz2.
===> Patching for libstdc++_stldoc_3.4.0-20040609_1
===> Configuring for libstdc++_stldoc_3.4.0-20040609_1
---> Installing the new version via the port
===> Installing for libstdc++_stldoc_3.4.0-20040609_1
===> Generating temporary packing list
===> Checking if lang/libstdc++_stldoc_3.4.0 already installed
/bin/mkdir -p /usr/local/share/doc/libstdc++_stldoc_3.4.0 && cd /usr/ports/lang/libstdc++_stldoc_3.4.0/work/html_user && /bin/sh -c '(/usr/bin/find -d $0 $2 | /usr/bin/cpio -dumpl $1 >/dev/null 2>&1) && /usr/sbin/chown -R root:wheel $1 && /usr/bin/find -d $0 $2 -type d -exec chmod 755 $1/{} \; && /usr/bin/find -d $0 $2 -type f -exec chmod 444 $1/{} \;' -- \* /usr/local/share/doc/libstdc++_stldoc_3.4.0 && /bin/chmod 755 /usr/local/share/doc/libstdc++_stldoc_3.4.0
===> Registering installation for libstdc++_stldoc_3.4.0-20040609_1
===> Cleaning for libstdc++_stldoc_3.4.0-20040609_1
Firefoxやw3mでhtmlのマニュアルが見られます。
w3m /usr/local/share/doc/libstdc++_stldoc_3.4.0/index.html
2009年6月13日土曜日
Perl日本語ドキュメント p5-manual
Perlの日本語ドキュメントをインストールして、使う方法について。
インストール
FreeBSDのportsからインストールします。
% sudo portinstall /usr/ports/japanese/p5-manual/
Password:
[Gathering depends for japanese/p5-manual done]
---> Installing 'ja-p5-man-5.000' from a port (japanese/p5-manual)
---> Building '/usr/ports/japanese/p5-manual'
===> Cleaning for ja-p5-man-5.000
===> Vulnerability check disabled, database not found
=> perl5.000man-j.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/sada/.
perl5.000man-j.tar.gz 100% of 210 kB 92 kBps
===> Extracting for ja-p5-man-5.000
===> Vulnerability check disabled, database not found
=> MD5 Checksum OK for perl5.000man-j.tar.gz.
=> SHA256 Checksum OK for perl5.000man-j.tar.gz.
===> Patching for ja-p5-man-5.000
===> Configuring for ja-p5-man-5.000
---> Installing the new version via the port
===> Installing for ja-p5-man-5.000
===> Generating temporary packing list
===> Checking if japanese/p5-manual already installed
===> Registering installation for ja-p5-man-5.000
===> Cleaning for ja-p5-man-5.000
使い方
jmanコマンドで参照します。
jman subs
2009年6月9日火曜日
ipアドレス計算コマンド ipcalc
ipcalcコマンドは、ipアドレスとネットマスクの計算を行うことができます。
インストール方法
% sudo portinstall /usr/ports/net-mgmt/ipcalc
~/tools]
[Updating the pkgdb
(-0 +1) . done]
[Gathering depends for net-mgmt/ipcalc . done]
---> Installing 'ipcalc-0.41' from a port (net-mgmt/ipcalc)
---> Building '/usr/ports/net-mgmt/ipcalc'
===> Cleaning for ipcalc-0.41
===> Vulnerability check disabled, database not found
=> ipcalc-0.41.tar.gz doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch from http://jodies.de/ipcalc-archive/.
ipcalc-0.41.tar.gz 100% of 21 kB 23 kBps
===> Extracting for ipcalc-0.41
=> MD5 Checksum OK for ipcalc-0.41.tar.gz.
=> SHA256 Checksum OK for ipcalc-0.41.tar.gz.
===> ipcalc-0.41 depends on file: /usr/local/bin/perl5.8.9 - found
===> Patching for ipcalc-0.41
===> ipcalc-0.41 depends on file: /usr/local/bin/perl5.8.9 - found
===> ipcalc-0.41 depends on file: /usr/local/bin/perl5.8.9 - found
===> Configuring for ipcalc-0.41
---> Installing the new version via the port
===> Installing for ipcalc-0.41
===> ipcalc-0.41 depends on file: /usr/local/bin/perl5.8.9 - found
===> Generating temporary packing list
===> Checking if net-mgmt/ipcalc already installed
install -o root -g wheel -m 555
/usr/ports/net-mgmt/ipcalc/work/ipcalc-0.41/ipcalc /usr/local/bin/ipcalc
===> Registering installation for ipcalc-0.41
===> Cleaning for ipcalc-0.41
[Updating the pkgdb
(-0 +1) . done]
使い方
ipcalc 203.216.235.154/24
Address: 203.216.235.154 11001011.11011000.11101011. 10011010
Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000
Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111
=>
Network: 203.216.235.0/24 11001011.11011000.11101011. 00000000
HostMin: 203.216.235.1 11001011.11011000.11101011. 00000001
HostMax: 203.216.235.254 11001011.11011000.11101011. 11111110
Broadcast: 203.216.235.255 11001011.11011000.11101011. 11111111
Hosts/Net: 254 Class C
2009年5月17日日曜日
PerlでSQLiteを操作するp5-Class-DBI-SQLiteをインストールする
p5-Class-DBI-SQLite を ports からインストールします。
cd /usr/ports/databases/p5-Class-DBI-SQLite
sudo make install clean
こんなカンジで接続します。
#!/usr/local/bin/perl -w
use strict;
use DBI;
my $dbh = DBI->connect("dbi:SQLite:dbname=dbfile.sqlite","","");
if (! $dbh) {
die "$dbfile: [$!]";
}
my $sth;
$sth = $dbh->prepare(
qq {
SELECT * FROM sqlite
}
) or die $dbh->errstr;
my $rv = $sth->execute() or die $dbh->errstr;
$sth->finish();
undef $sth;
$dbh->disconnect();
ラベル: perl dbi sqlite