Mountain Lion用のMac ports、ImageMagick、kindai.rbをインストール（解決済）

MacOSX 10.8.5
OpenSSL 1.0.2o  27 Mar 2018
ruby 2.4.4p296 (2018-03-28 revision 63013) [x86_64-darwin12.6.0]
curl 7.59.0 (x86_64-apple-darwin12.6.0) libcurl/7.59.0 OpenSSL/1.0.2o zlib/1.2.11 Release-Date: 2018-03-14

HomeBrewをインストール不可能なMacOSX 10.8.5マシンがある。
目的はkindai.rbのインストールと、これに伴いImageMagickの
インストールが必要。ImageMagick@6は筆者にはやや難しい為、HomeBrewに拘った。

過去に、HomeBrew環境でSSLの更新ができない投稿をした。
解決出来ないので、HomeBrewを諦め、Mac portsをインストールした。


#１. Mountain Lion用のMac portsをインストール

<a href="https://www.macports.org/">The MacPorts Project -- Home</a>

#２. ImageMagickのインストール。

```
$ port info ImageMagick @6.9.9-26_1
ImageMagick @6.9.9-26_1 (graphics, devel)
（省略）

$ sudo port install ImageMagick
Password:
--->  Computing dependencies for ImageMagick
The following dependencies will be installed: 
 autoconf
 automake
 bzip2
 db48
 djvulibre
 expat
 fftw-3
 fontconfig
 freetype
 gdbm
 gettext
 ghostscript
 giflib
 ilmbase
 jasper
 jbig2dec
 jbigkit
 jpeg
 lcms2
 libedit
 libffi
 libiconv
 libidn
 libpaper
 libpng
 libraw
 libtool
 libxml2
 ncurses
 openexr
 openjpeg
 openssl
 perl5
 perl5.26
 pkgconfig
 python27
 python2_select
 python_select
 readline
 sqlite3
 tiff
 urw-fonts
 webp
 xorg-kbproto
 xorg-libX11
 xorg-libXau
 xorg-libXdmcp
 xorg-libXext
 xorg-libXt
 xorg-libice
 xorg-libpthread-stubs
 xorg-libsm
 xorg-libxcb
 xorg-xcb-proto
 xorg-xextproto
 xorg-xproto
 xz
 zlib
Continue? [Y/n]: y
（中略）
--->  Installing ImageMagick @6.9.9-26_1+x11
--->  Activating ImageMagick @6.9.9-26_1+x11
--->  Cleaning ImageMagick
--->  Updating database of binaries
--->  Scanning binaries for linking errors               
--->  No broken files found.
--->  Some of the ports you installed have notes:
  libidn has the following notes:
    Please be aware that GNU libidn2 is the successor of GNU libidn. It comes with IDNA 2008  
    and TR46 implementations and also provides a compatibility layer for GNU libidn.
  python27 has the following notes:
    To make this the default Python or Python 2 (i.e., the version run by the 'python' or 'python2' commands), run
    one or both of:
    
        sudo port select --set python python27
        sudo port select --set python2 python27
$

```

#３. 各種のgem install


```
$ sudo gem install rmagick
Password:
Fetching: rmagick-2.16.0.gem (100%)
Building native extensions.  This could take a while...
Successfully installed rmagick-2.16.0
Parsing documentation for rmagick-2.16.0
Installing ri documentation for rmagick-2.16.0
Done installing documentation for rmagick after 2 seconds
1 gem installed

$ sudo port install libxml2
--->  Computing dependencies for libxml2
--->  Cleaning libxml2
--->  Scanning binaries for linking errors
--->  No broken files found.

$ sudo gem install nokogiri -- --use-system-libraries
Building native extensions with: '--use-system-libraries'
This could take a while...
Successfully installed nokogiri-1.8.2
Parsing documentation for nokogiri-1.8.2
Installing ri documentation for nokogiri-1.8.2
Done installing documentation for nokogiri after 14 seconds
1 gem installed
$

$ sudo gem install kindai
Fetching: zipruby-0.3.6.gem (100%)
Building native extensions.  This could take a while...
Successfully installed zipruby-0.3.6
Fetching: kindai-2.8.0.gem (100%)
Successfully installed kindai-2.8.0
Parsing documentation for zipruby-0.3.6
Installing ri documentation for zipruby-0.3.6
Parsing documentation for kindai-2.8.0
Installing ri documentation for kindai-2.8.0
Done installing documentation for zipruby, kindai after 1 seconds
2 gems installed
$ kindai.rb
kindai.rb - the kindai digital library downloader

download:
    by url:     kindai.rb http://kindai.ndl.go.jp/info:ndljp/pid/922693
    by keyword: kindai.rb 調理法

publish:
    auto:       kindai.rb publish '~/Desktop/石川，一口；丸山，平次郎 - 講談幽霊の片袖'
    manual:     kindai.rb publish --position 2850x2450+320+380 '~/Desktop/石川，一口；丸山，平次郎 - 講談幽霊の片袖'

options:
    -o, --output OUTPUT_DIRECTORY    specify output directory
        --debug                      enable debug mode
        --retry TIMES                retry times (default is 30)
        --publish_iphone             publish for iphone
        --publish_ipad               publish for ipad
        --publish_kindle             publish for kindle
        --no_trimming                don't trimming
$
```

MacOSX 10.8.5マシンにMacPortsインストールすることで、kindai.rbをインストール出来た。

以上