#------------------------------
# ソース tarball 入手と伸長
#------------------------------
$ cd ~/src
$ wget -N https://www.freedesktop.org/software/fontconfig/release/fontconfig-2.14.0.tar.xz
$ tar xf fontconfig-2.14.0.tar.xz
$ ls
fontconfig-2.14.0

#------------------------------
# man ページ生成
#------------------------------
$ cd ~/src/fontconfig-2.14.0
$ ./configure --prefix=/usr
$ for d in doc fc-cache fc-cat fc-conflist fc-list \
      fc-match fc-pattern fc-query fc-scan fc-validate; do
    LANG=C make DESTDIR=.. -C $d install-man
  done

#------------------------------
# 当プロジェクトへの man ページのコピー
#------------------------------

$ cd $(JMTOP)/manual/fontconfig/original
$ cat > getfiles.sh <<"EOF"
#!/bin/sh

SRCDIR=~/src/fontconfig-2.14.0

rm -fr man{1,3,5}
mkdir  man{1,3,5}

for n in 1 3 5; do
  cp -d $SRCDIR/usr/share/man/man$n/* man$n
done

# 処理日付をリリース日付に
THISDATE=`LANG=C date +"%d %B %Y"`
for f in `ls man{3,5}/*`; do
  sed -i "s|$THISDATE|2022/03/31|" $f
done
EOF

$ sh getfiles.sh
