memo: app-text/poppler0.68.0 のビルド失敗 (gentoo)

gentoo にて、app-text/poppler-0.68.0のビルドを行うと以下のように失敗するようになった。
 6%] Building CXX object CMakeFiles/poppler.dir/goo/JpegWriter.cc.o
/usr/lib/ccache/bin/i686-pc-linux-gnu-g++ -Dpoppler_EXPORTS -I/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0 -I/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0/fofi -I/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0/goo -I/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0/poppler -I/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0_build -I/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0_build/poppler -I/usr/include/freetype2 -I/usr/include/openjpeg-2.3   -DNDEBUG -Wall -Wextra -Wpedantic -Wno-unused-parameter -Wcast-align -Wformat-security -Wframe-larger-than=65536 -Wlogical-op -Wmissing-format-attribute -Wnon-virtual-dtor -Woverloaded-virtual -Wmissing-declarations -Wundef -Wzero-as-null-pointer-constant -Wsuggest-override -march=pentium3 -O2 -pipe -std=c++11 -Wnon-virtual-dtor -Woverloaded-virtual -fPIC   -pthread -std=c++11 -o CMakeFiles/poppler.dir/goo/JpegWriter.cc.o -c /var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0/goo/JpegWriter.cc
/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0/goo/JpegWriter.cc: メンバ関数 ‘virtual bool JpegWriter::init(FILE*, int, int, int, int)’ 内:
/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0/goo/JpegWriter.cc:146:39: エラー: cannot convert ‘bool’ to ‘boolean’ in assignment
   priv->cinfo.optimize_coding = priv->optimize;
                                       ^~~~~~~~
make[2]: *** [CMakeFiles/poppler.dir/build.make:303: CMakeFiles/poppler.dir/goo/JpegWriter.cc.o] エラー 1
make[2]: ディレクトリ '/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0_build' から出ます
make[1]: *** [CMakeFiles/Makefile2:100: CMakeFiles/poppler.dir/all] エラー 2
make[1]: ディレクトリ '/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0_build' から出ます
make: *** [Makefile:141: all] エラー 2
 * ERROR: app-text/poppler-0.68.0::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=app-text/poppler-0.68.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=app-text/poppler-0.68.0::gentoo'`.
 * The complete build log is located at '/var/log/portage/app-text:poppler-0.68.0:20190110-041935.log'.
 * For convenience, a symlink to the build log is located at '/var/tmp/portage/app-text/poppler-0.68.0/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-text/poppler-0.68.0/temp/environment'.
 * Working directory: '/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0_build'
 * S: '/var/tmp/portage/app-text/poppler-0.68.0/work/poppler-0.68.0'
他に失敗してる人いるだろうかと調べたが見あたらなかったので、パッチを当てることにした。

gentooでは任意のパッチを当てる仕組みがあるようだ。

しかし、popplerのebuildではepatch_userを呼んでいないようだったため、以下のbashrcを用意し、/etc/portage/bashrcとして設置した。
if [ "${EBUILD_PHASE}" == "src_prepare" ] && [ "${PN}" == "app-text/poppler" ]; then
epatch_user
fi
そして、/etc/portage/patches/app-text/poppler ディレクトリを作成し、その中に

https://gitlab.freedesktop.org/poppler/poppler/commit/de34900993bff73c8da651319027b2fa8c490172.patch

を設置してbuildしたところ、無事パッチがあたってビルドに成功した。