ドキュメントビルド手順(Mac版) - pgsql-jp/jpug-doc GitHub Wiki

関連項目

Dockerでのビルド

ドキュメントビルド手順


必要な パッケージ のインストール

homebrew http://brew.sh/index_ja.html を利用しますので、homebrewはインストールしておいてください。 xcode も必要となると思います。

https://github.com/petere/homebrew-sgml を利用して、必要なパッケージをインストールします

$:~/jpug-doc/doc/src/sgml (doc_ja_9_4_work1)$ brew tap petere/sgml
Cloning into '/usr/local/Library/Taps/petere/homebrew-sgml'...
〜〜略〜〜
Tapped 3 formulae
$:~/jpug-doc/doc/src/sgml (doc_ja_9_4_work1)$ brew install docbook docbook-dsssl docbook-sgml docbook-xsl openjade
==> Downloading https://homebrew.bintray.com/bottles/docbook-5.0.mavericks.bottle.1.tar.gz
〜〜略〜〜
/usr/local/Cellar/openjade/1.3.2: 21 files, 6.8M

パスの設定

インストールログのなかで、

you need to add the following to your ~/.bashrc:
export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"
you need to add the following to your ~/.bashrc:
export SGML_CATALOG_FILES="/usr/local/etc/sgml/catalog"

といわれてるとおもいますので、上記の2つのパスを設定します。

$:echo 'export XML_CATALOG_FILES="/usr/local/etc/xml/catalog"' >> ~/.bash_profile
$:echo 'export SGML_CATALOG_FILES="/usr/local/etc/sgml/catalog"' >> ~/.bash_profile

設定後はsourceする事をお忘れ無く

$:source ~/.bash_profile

gettextをインストール

http://ochien.seesaa.net/article/271988608.html を参照してgettextをインストールします。 --force オプションをつけないとはいらないため--forceをつけて入れます。

$:~/jpug-doc (doc_ja_9_4_work1)$ brew install gettext
$:~/jpug-doc (doc_ja_9_4_work1)$ brew link gettext
Warning: gettext is keg-only and must be linked with --force
Note that doing so can interfere with building software.
$:~/jpug-doc (doc_ja_9_4_work1)$ brew link gettext --force

collateindex.pl

・ドキュメントビルド手順を参照

日本語用索引

・ドキュメントビルド手順を参照

configure

  • トップディレクトリで ./configure します。
  • 通常のオプション(--enable-nls --with-libxml --with-libxslt )だけでなく、gettextのパスを認識させておきます。

gettextが認識されて無い場合のエラー

checking for library containing bind_textdomain_codeset... no
configure: error: a {no} gettext implementation is required for NLS

LDFLAGS,CPPFLAGSに、gettextのpassを追加しつつconfigreを行う

$:~/jpug-doc (doc_ja_9_4_work1)$ LDFLAGS="-L/usr/local/opt/gettext/lib" CPPFLAGS="-I/usr/local/opt/gettext/include" ./configure --enable-nls --with-libxml --with-libxslt 

ドキュメントビルド

・ドキュメントビルド手順を参照

ドキュメントビルドでエラーが起きた場合

・catalog等へのパスをうたがってみる、catalogファイルを作成して、必要な情報を記載

$:vi /usr/local/share/sgml/catalog

(参考)下記内容を記載、バージョンによってはパスが代わるのでファイルがあるか確認すること

PUBLIC "-//James Clark//DTD DSSSL Flow Object Tree//EN" "/usr/local/Cellar/openjade/1.3.2/share/sgml/openjade/fot.dtd"
PUBLIC "ISO/IEC 10179:1996//DTD DSSSL Architecture//EN" "/usr/local/Cellar/openjade/1.3.2/share/sgml/openjade/dsssl.dtd"
PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN" "/usr/local/Cellar/openjade/1.3.2/share/sgml/openjade/style-sheet.dtd"
PUBLIC "-//OpenJade//DTD DSSSL Style Sheet//EN" "/usr/local/Cellar/openjade/1.3.2/share/sgml/openjade/style-sheet.dtd"
SYSTEM "/usr/local/Cellar/openjade/1.3.2/share/sgml/openjade/builtins.dsl" "/usr/local/Cellar/openjade/1.3.2/share/sgml/openjade/builtins.dsl"
CATALOG "/usr/local/Cellar/docbook/5.0/docbook/xml/4.2/docbook.cat"
CATALOG "/usr/local/Cellar/docbook-sgml/4.2/docbook/sgml/4.2/docbook.cat"
CATALOG "/usr/local/Cellar/docbook-dsssl/1.79/docbook-dsssl/catalog"

恐らく、パスの設定をしておけばここの問題はおきないと思います。