インストール: util-macros (xorg-macros) | Autoconf内で使用されるXのマクロ

util-macrosをソースコードからインストールする。
util-macrosはパッケージをインストールする際にときどき要求されるautogen.sh
で使用される。具体的には,xcb-utilのautogen.sh
に要求された。
なお,util-macrosはpkg-configなどではxorg-macrosという名前で参照されることもある。これは,xorg-util-macrosのを省略した形だろう。
util-macrosとxorg-macrosのどちらがパッケージ名なのか紛らわしいが,リポジトリーのタグ名やxorg-macros.pc
内のPACKAGE=util-macros
の記述を信じ,util-macrosがパッケージ名だとみなすことにする。
種類 | パッケージ名 |
---|---|
APT | xutils-dev |
RPM | xorg-x11-util-macros |
項目 | 説明 |
---|---|
配布元 | |
リポジトリー | |
手順 | |
依存情報 | |
依存先 |
|
依存元 |
sh -eux <<-"EOT"
PKG=util-macros VER=1.19.2 TAG=$PKG-$VER PKG_VER=$PKG${VER:+-$VER}
LOCAL=$([ $(id -u) = 0 ] && echo /usr/ || echo ~/.)local
J=$(grep -cs '^processor' /proc/cpuinfo || echo 2)
mkdir -p "$LOCAL/src/"
cd "$LOCAL/src/"
if command -v git >/dev/null; then
[ -e $PKG ] || git clone --depth 1 https://gitlab.freedesktop.org/xorg/util/macros.git $PKG
cd $PKG
git fetch --depth 1 ${TAG:+origin tag $TAG}
git checkout -f ${TAG:-master}
git clean -dfX
else
[ -e $PKG_VER ] || wget https://www.x.org/pub/individual/util/$PKG_VER.tar.bz2
tar -xf $PKG_VER.*
cd $PKG_VER
fi
make -kj $J distclean clean || :
[ -e configure ] || [ -e configure.ac ] && autoreconf -is
./configure --prefix=$LOCAL/stow/$PKG_VER
make -j $J
make -j $J check
make -j $J install
cd "$LOCAL/stow"
echo $PKG${VER:+-}[0-9]* | xargs -n 1 stow -D
stow $PKG_VER
EOT
日付 | バージョン | OS | 依存関係 |
---|---|---|---|
2018-10-20 | 1.19.2 | Ubuntu 16.04 | GNU Make 4.2.1, GCC 8.1.0 |
2019-03-24 | 1.19.2 | Ubuntu 18.04 | GNU Make 4.2.1, GCC 7.4.0 |
2020-09-01 | 1.19.2 | Ubuntu 20.04 | GNU Make 4.2.1, GCC 9.3.0 |
なお,util-macrosをローカル環境にインストールして使用する場合は,以下の内容を~/.profile
や~/.bashrc
に記述してサーチパスを設定しておく必要があるので注意する。
export ACLOCAL_PATH="$LOCAL/share/aclocal"