Linux运维_Bash脚本_编译安装Wayland-1.22.0
Linux运维_Bash脚本_编译安装Wayland-1.22.0
Bash (Bourne Again Shell) 是一个解释器,负责处理 Unix 系统命令行上的命令。它是由 Brian Fox 编写的免费软件,并于 1989 年发布的免费软件,作为 Sh (Bourne Shell) 的替代品。
您可以在 Linux 和 MacOS 机器上使用 Bash,甚至可以通过适用于 Linux 的 Windows 子系统在 Windows 10 机器上使用。
使用方法
- 下载源码包:
libffi-3.4.4.tar.gz
libxml2-2.9.1.tar.gz
expat-2.5.0.tar.gz
libxslt-1.1.28.tar.gz
xmlto-0.0.28.tar.bz2
docbook-xsl-1.79.1.tar.bz2
docbook-xsl-doc-1.79.1.tar.bz2
pixman-0.43.4.tar.gz
cairo-1.18.0.tar.xz
fribidi-1.0.13.tar.xz
graphite2-1.3.14.tgz
harfbuzz-8.3.0.tar.xz
freetype-2.12.0.tar.gz -> Recompile and Reinstall
fontconfig-2.15.0.tar.xz -> Recompile and Reinstall
pango-1.51.2.tar.xz
gts-0.7.6.tar.gz
graphviz-8.1.0.tar.gz
doxygen-1.10.0.src.tar.gz
wayland-1.22.0.tar.gz
wayland-protocols-1.32.tar.gz
- 放于指定路径:
这里 Bash Shell 脚本的全局变量 STORAGE 指定的存放源码包的路径 /home/goufeng 可进行修改。
- 执行 Bash Shell 脚本:
输入 /[路径名]/[脚本名].sh 即可进行自动编译部署,过程中提示输入 (y/n) 输入 y 则进行下一步,这样分阶段确认的原因是为了确保能够看到上一个源码编译结果中可能的错误和提示。
完整脚本
#! /bin/bash
# Create By GF 2024-02-29 00:06# --------------------------------------------------
# Install First:
# * GNU-Tools (Contains: pkg-config, m4, autoconf, automake, libtool, gettext, flex, bison, libiconv, make)
# * CMake >= 3.14.x
# * Python >= 3.x
# * Meson
# * Ninja
# * X11
# * libGD >= 2.3.3 (Compiled by: freetype, libpng, jpeg)# ------------------- Dependency -------------------
# Need File: libffi-3.4.4.tar.gz
# ------------------- XML Tools --------------------
# Need File: libxml2-2.9.1.tar.gz
# Need File: expat-2.5.0.tar.gz
# Need File: libxslt-1.1.28.tar.gz
# Need File: xmlto-0.0.28.tar.bz2
# ----- XML Tools (XSL Stylesheets) DocBook-XSL ----
# Need File: docbook-xsl-1.79.1.tar.bz2
# Need File: docbook-xsl-doc-1.79.1.tar.bz2
# --------- Graphviz Dep: Cairo (Optional) ---------
# Need File: pixman-0.43.4.tar.gz
# Need File: cairo-1.18.0.tar.xz
# --------- Graphviz Dep: Pango (Optional) ---------
# Need File: fribidi-1.0.13.tar.xz
# Need File: graphite2-1.3.14.tgz
# Need File: harfbuzz-8.3.0.tar.xz
# Need File: freetype-2.12.0.tar.gz -> Recompile and Reinstall
# Need File: fontconfig-2.15.0.tar.xz -> Recompile and Reinstall
# Need File: pango-1.51.2.tar.xz
# ---------- Graphviz Dep: GTS (Optional) ----------
# Need File: gts-0.7.6.tar.gz
# -------------------- Graphviz --------------------
# Need File: graphviz-8.1.0.tar.gz
# -------------------- Doxygen ---------------------
# Need File: doxygen-1.10.0.src.tar.gz
# -------------------- Wayland ---------------------
# Need File: wayland-1.22.0.tar.gz
# -------------- Wayland - Protocols ---------------
# Need File: wayland-protocols-1.32.tar.gz# ##################################################
STORAGE=/home/goufeng# ############################################ Dependency ############################################# Function: 编译安装(Compile Install) libffi-3.4.4 (for Linux)
# ##################################################
function Compile_Install_libffi_3_4_4_for_Linux() {if [[ ! -d "/opt/libffi-3.4.4" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------echo "[Confirm] Compile and Install ( libffi-3.4.4 )? (y/n)"# ..........................................read VERIFY# ..........................................if [[ $VERIFY != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/libffi-3.4.4.tar.gz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/libffi-3.4.4 && ./configure --prefix=/opt/libffi-3.4.4 && STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................rsync -av /opt/libffi-3.4.4/include/ /usr/local/include/rsync -av /opt/libffi-3.4.4/lib/ /usr/local/lib/# ......................................cp -f /opt/libffi-3.4.4/lib/pkgconfig/libffi.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/libffi-3.4.4 && return 0elseecho "[Caution] Path: ( /opt/libffi-3.4.4 ) Already Exists."# ------------------------------------------return 0fi
}# ############################################ XML Tools ############################################## Function: 编译安装(Compile Install) libxml2-2.9.1
# ##################################################
function Compile_Install_libxml2_2_9_1() {if [[ ! -d "/opt/libxml2-2.9.1" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------echo "[Confirm] Compile and Install ( libxml2-2.9.1 )? (y/n)"# ..........................................read VERIFY# ..........................................if [[ $VERIFY != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/libxml2-2.9.1.tar.gz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/libxml2-2.9.1 && ./configure --prefix=/opt/libxml2-2.9.1 && STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/libxml2-2.9.1/bin/xml2-config /usr/local/bin/ln -sf /opt/libxml2-2.9.1/bin/xmlcatalog /usr/local/bin/ln -sf /opt/libxml2-2.9.1/bin/xmllint /usr/local/bin/# ......................................rsync -av /opt/libxml2-2.9.1/include/ /usr/local/include/rsync -av /opt/libxml2-2.9.1/lib/ /usr/local/lib/# ......................................cp -f /opt/libxml2-2.9.1/lib/pkgconfig/libxml-2.0.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/libxml2-2.9.1 && return 0elseecho "[Caution] Path: ( /opt/libxml2-2.9.1 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 编译安装(Compile Install) expat-2.5.0
# ##################################################
function Compile_Install_expat_2_5_0() {if [[ ! -d "/opt/expat-2.5.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Compile and Install ( expat-2.5.0 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/expat-2.5.0.tar.gz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/expat-2.5.0 && ./configure --prefix=/opt/expat-2.5.0 && STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/expat-2.5.0/bin/xmlwf /usr/local/bin/# ......................................rsync -av /opt/expat-2.5.0/include/ /usr/local/include/rsync -av /opt/expat-2.5.0/lib/ /usr/local/lib/# ......................................cp -f /opt/expat-2.5.0/lib/pkgconfig/expat.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/expat-2.5.0 && return 0elseecho "[Caution] Path: ( /opt/expat-2.5.0 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 编译安装(Compile Install) libxslt-1.1.28
# ##################################################
function Compile_Install_libxslt_1_1_28() {if [[ ! -d "/opt/libxslt-1.1.28" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Compile and Install ( libxslt-1.1.28 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/libxslt-1.1.28.tar.gz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/libxslt-1.1.28 && ./configure --prefix=/opt/libxslt-1.1.28 && STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/libxslt-1.1.28/bin/xslt-config /usr/local/bin/ln -sf /opt/libxslt-1.1.28/bin/xsltproc /usr/local/bin/# ......................................rsync -av /opt/libxslt-1.1.28/include/ /usr/local/include/rsync -av /opt/libxslt-1.1.28/lib/ /usr/local/lib/# ......................................cp -f /opt/libxslt-1.1.28/lib/pkgconfig/libexslt.pc /opt/lib/pkgconfig/cp -f /opt/libxslt-1.1.28/lib/pkgconfig/libxslt.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/libxslt-1.1.28 && return 0elseecho "[Caution] Path: ( /opt/libxslt-1.1.28 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 编译安装(Compile Install) xmlto-0.0.28
# ##################################################
function Compile_Install_xmlto_0_0_28() {if [[ ! -d "/opt/xmlto-0.0.28" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Compile and Install ( xmlto-0.0.28 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -jxvf $STORAGE/xmlto-0.0.28.tar.bz2 && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/xmlto-0.0.28 && ./configure --prefix=/opt/xmlto-0.0.28 && STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenln -sf /opt/xmlto-0.0.28/bin/xmlif /usr/local/bin/ln -sf /opt/xmlto-0.0.28/bin/xmlto /usr/local/bin/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/xmlto-0.0.28 && return 0elseecho "[Caution] Path: ( /opt/xmlto-0.0.28 ) Already Exists."# ------------------------------------------return 0fi
}# ############################## XML Tools (XSL Stylesheets) DocBook-XSL ############################## Function: 部署安装(Deploy Install) XSL-Stylesheets: DocBook-XSL-1.79.1
# ##################################################
function Deploy_Install_XSL_Stylesheets_DocBook_XSL_1_79_1() {if [[ ! -d "/usr/share/xml/docbook/xsl-stylesheets-1.79.1" ]]; then# 安装目录: /usr/share/xml/docbook/xsl-stylesheets-1.79.1 和 /usr/share/doc/docbook-xsl-1.79.1# Installed Directories: /usr/share/xml/docbook/xsl-stylesheets-1.79.1 and /usr/share/doc/docbook-xsl-1.79.1local VERIFYlocal STEP_UNZIPPED=0local STEP_INSTALLED=0local STEP_CONFIGURED=0# ------------------------------------------read -p "[Confirm] Deploy and Install ( XSL-Stylesheets: DocBook-XSL-1.79.1 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -jxvf $STORAGE/docbook-xsl-1.79.1.tar.bz2 && \tar -jxvf $STORAGE/docbook-xsl-doc-1.79.1.tar.bz2 && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/docbook-xsl-1.79.1# ------------------------------------------# 安装 DocBook XSL 样式表# Installation of DocBook XSL Stylesheetsinstall -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-1.79.1 &&cp -v -R VERSION assembly common eclipse epub epub3 extensions fo \highlighting html htmlhelp images javahelp lib manpages params \profiling roundtrip slides template tests tools webhelp website \xhtml xhtml-1_1 xhtml5 \/usr/share/xml/docbook/xsl-stylesheets-1.79.1 &&ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-1.79.1/VERSION.xsl &&install -v -m644 -D README \/usr/share/doc/docbook-xsl-1.79.1/README.txt &&install -v -m644 RELEASE-NOTES* NEWS* \/usr/share/doc/docbook-xsl-1.79.1# ------------------------------------------cd $STORAGE/docbook-xsl-doc-1.79.1# ------------------------------------------# 如果下载了可选的源码文档 tarball, 请以 root 用户身份发出以下命令来安装源码文档: # If you downloaded the optional documentation tarball, install the documentation by issuing the following command as the root user:cp -v -R doc/* /usr/share/doc/docbook-xsl-1.79.1# ------------------------------------------# 配置 DocBook XSL 样式表# Configuring DocBook XSL Stylesheetsif [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi &&if [ ! -f /etc/xml/catalog ]; thenxmlcatalog --noout --create /etc/xml/catalogfi &&xmlcatalog --noout --add "rewriteSystem" \"http://docbook.sourceforge.net/release/xsl/1.79.1" \"/usr/share/xml/docbook/xsl-stylesheets-1.79.1" \/etc/xml/catalog &&xmlcatalog --noout --add "rewriteURI" \"http://docbook.sourceforge.net/release/xsl/1.79.1" \"/usr/share/xml/docbook/xsl-stylesheets-1.79.1" \/etc/xml/catalog &&xmlcatalog --noout --add "rewriteSystem" \"http://docbook.sourceforge.net/release/xsl/current" \"/usr/share/xml/docbook/xsl-stylesheets-1.79.1" \/etc/xml/catalog &&xmlcatalog --noout --add "rewriteURI" \"http://docbook.sourceforge.net/release/xsl/current" \"/usr/share/xml/docbook/xsl-stylesheets-1.79.1" \/etc/xml/catalog# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/docbook-xsl-1.79.1 && \cd $STORAGE && rm -rf $STORAGE/docbook-xsl-doc-1.79.1 && return 0elseecho "[Caution] Path: ( /usr/share/xml/docbook/xsl-stylesheets-1.79.1 ) Already Exists."# ------------------------------------------return 0fi
}# ################################## Graphviz Dep: Cairo (Optional) ################################### Function: 构建安装(Build Install) Pixman-0.43.4
# ##################################################
function Build_Install_Pixman_0_43_4() {# Pixman 是由三星工程师开发的像素操作库, 广泛应用于矢量图形 Cario 和 X 服务器等。# Pixman 能够提供低级像素处理能力, 同时具备图像合成、图形变化以及光栅化等功能。if [[ ! -d "/opt/pixman-0.43.4" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( pixman-0.43.4 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/pixman-0.43.4.tar.gz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/pixman-0.43.4 && meson build/ --prefix=/opt/pixman-0.43.4 \--pkg-config-path=/opt/lib/pkgconfig && \STEP_BUILDED=1# ------------------------------------------cd $STORAGE/pixman-0.43.4 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................rsync -av /opt/pixman-0.43.4/include/ /usr/local/include/rsync -av /opt/pixman-0.43.4/lib/ /usr/local/lib/# ......................................cp -f /opt/pixman-0.43.4/lib/pkgconfig/pixman-1.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/pixman-0.43.4 && return 0elseecho "[Caution] Path: ( /opt/pixman-0.43.4 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 构建安装(Build Install) Cairo-1.18.0
# ##################################################
function Build_Install_Cairo_1_18_0() {# Attention: may conflict with the original "Cairo" in the system. Especially Ubuntu.# 注意: 可能与系统原有的 "Cairo" 冲突。尤其是 Ubuntu。if [[ ! -d "/opt/cairo-1.18.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( cairo-1.18.0 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -xvJf $STORAGE/cairo-1.18.0.tar.xz && STEP_UNZIPPED=1# ------------------------------------------# * Problem: Run-time dependency gobject-2.0 found: NO (tried pkgconfig and cmake)# Looking for a fallback subproject for the dependency gobject-2.0# Downloading glib source from https://download.gnome.org/sources/glib/2.74/glib-2.74.0.tar.xz# - Solve: 方法 A. 编译 Glib 库。# 方法 B. meson Build 添加 -Dglib=disabled 选项, 此选项禁用了 Glib, 因为特别是含有 Gnome 的发行版 Linux 中 Glib 是 Gnome 的基础, glib 已集成到系统, 没有完整的 Glib 供调用。# ..........................................# * Option: -Dxlib-xcb=enabled: This switch enables several experimental Xlib/XCB functions used by some window managers.# 此选项启用了一些窗口管理器使用的几个实验性 Xlib/XCB 函数。cd $STORAGE/cairo-1.18.0 && meson build/ --prefix=/opt/cairo-1.18.0 \--buildtype=release \--pkg-config-path=/opt/lib/pkgconfig && \STEP_BUILDED=1# ------------------------------------------cd $STORAGE/cairo-1.18.0 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/cairo-1.18.0/bin/cairo-trace /usr/local/bin/# ......................................# Skip # rsync -av /opt/cairo-1.18.0/include/ /usr/local/include/# Skip # rsync -av /opt/cairo-1.18.0/lib/ /usr/local/lib/# ......................................cp -f /opt/cairo-1.18.0/lib/pkgconfig/*.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/cairo-1.18.0 && return 0elseecho "[Caution] Path: ( /opt/cairo-1.18.0 ) Already Exists."# ------------------------------------------return 0fi
}# ################################## Graphviz Dep: Pango (Optional) ################################### Function: 构建安装(Build Install) FriBidi-1.0.13
# ##################################################
function Build_Install_FriBidi_1_0_13() {# Attention: may conflict with the original "FriBidi" in the system. Especially Ubuntu.# 注意: 可能与系统原有的 "FriBidi" 冲突。尤其是 Ubuntu。if [[ ! -d "/opt/fribidi-1.0.13" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( fribidi-1.0.13 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -xvJf $STORAGE/fribidi-1.0.13.tar.xz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/fribidi-1.0.13 && meson build/ --prefix=/opt/fribidi-1.0.13 \--buildtype=release \--pkg-config-path=/opt/lib/pkgconfig && \STEP_BUILDED=1# ------------------------------------------cd $STORAGE/fribidi-1.0.13 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................# Skip # ln -sf /opt/fribidi-1.0.13/bin/fribidi /usr/local/bin/# ......................................# Skip # rsync -av /opt/fribidi-1.0.13/include/ /usr/local/include/# Skip # rsync -av /opt/fribidi-1.0.13/lib/ /usr/local/lib/# ......................................cp -f /opt/fribidi-1.0.13/lib/pkgconfig/fribidi.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/fribidi-1.0.13 && return 0elseecho "[Caution] Path: ( /opt/fribidi-1.0.13 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 构建安装(Build Install) Graphite2-1.3.14
# ##################################################
function Build_Install_Graphite2_1_3_14() {if [[ ! -d "/opt/graphite2-1.3.14" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CREATED=0local STEP_BUILDED=0local STEP_MADE=0local STEP_DOCUMENTED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( graphite2-1.3.14 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/graphite2-1.3.14.tgz && STEP_UNZIPPED=1# ------------------------------------------# Some tests fail if FontTools (Python 3 module) is not installed. These tests can be removed with:# 如果未安装 FontTools (Python3 模块), 某些测试将失败。这些测试可以通过以下方式删除:if [[ $STEP_UNZIPPED == 1 ]]; thensed -i '/cmptest/d' $STORAGE/graphite2-1.3.14/tests/CMakeLists.txtfi# ------------------------------------------mkdir $STORAGE/graphite2-1.3.14/build && STEP_CREATED=1# ------------------------------------------# * Option: -DCMAKE_VERBOSE_MAKEFILE=ON: This switch turns on build verbose mode.# 此选项打开将生成详细模式。cd $STORAGE/graphite2-1.3.14/build && cmake ../ -G "Unix Makefiles" \-DCMAKE_INSTALL_PREFIX=/opt/graphite2-1.3.14 \-DCMAKE_BUILD_TYPE=Release && \STEP_BUILDED=1# ------------------------------------------make && STEP_MADE=1# ------------------------------------------# If you wish to build the documentation, issue: make docs# 如果您希望构建文档, 请使用指令: make docs# Skip # make docs && STEP_DOCUMENTED=1# ------------------------------------------# To test the results, issue: make test. One test named nametabletest is known to fail.# 要测试结果, 请使用指令: 进行测试。已知有一个名为 nametabletest 的测试失败。make install && STEP_INSTALLED=1# ------------------------------------------# If you built the documentation, install, as the root user:# 如果您构建了文档, 请以 root 用户身份安装:if [[ $STEP_DOCUMENTED == 1 ]]; theninstall -v -d -m755 /usr/share/doc/graphite2-1.3.14 &&cp -v -f doc/{GTF,manual}.html \/usr/share/doc/graphite2-1.3.14 &&cp -v -f doc/{GTF,manual}.pdf \/usr/share/doc/graphite2-1.3.14fi# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/graphite2-1.3.14/bin/gr2fonttest /usr/local/bin/# ......................................# Skip # rsync -av /opt/graphite2-1.3.14/include/ /usr/local/include/# Skip # rsync -av /opt/graphite2-1.3.14/lib/ /usr/local/lib/# ......................................cp -f /opt/graphite2-1.3.14/lib/pkgconfig/graphite2.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/graphite2-1.3.14 && return 0elseecho "[Caution] Path: ( /opt/graphite2-1.3.14 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 构建安装(Build Install) HarfBuzz-8.3.0
# ##################################################
function Build_Install_HarfBuzz_8_3_0() {# Attention: may conflict with the original "HarfBuzz" in the system. Especially Ubuntu.# 注意: 可能与系统原有的 "HarfBuzz" 冲突。尤其是 Ubuntu。if [[ ! -d "/opt/harfbuzz-8.3.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( harfbuzz-8.3.0 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -xvJf $STORAGE/harfbuzz-8.3.0.tar.xz && STEP_UNZIPPED=1# ------------------------------------------# Skip # export PATH=$PATH:/opt/glib-2.78.4/bin# Skip # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/pcre2-10.43/lib# ------------------------------------------# * Option: --buildtype=release: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.# 指定一个适用于包的稳定版本的构建类型, 因为默认情况下可能会生成未优化的二进制文件。# ...............................# -Dgraphite2=enabled: This switch enables Graphite2 support, which is required for building texlive-20230313 or LibreOffice-24.2.1.2 with system harfbuzz.# 此选项启用 Graphite2 支持, 这是使用系统 harfbuzz 构建 texlive-20230313 或 LibreOffice-24.1.2 所必需的。# ...............................# -Ddocs=disabled: If GTK-Doc-1.34.0 is installed, the documentation is built and installed. This switch prevents that.# 如果安装了GTK-Doc-1.34.0, 则生成并安装文档。这个选项可以防止这种情况发生。# ...............................# * Problem: Program glib-mkenums mkenums found: NO# src/meson.build:902:2: ERROR: Program 'glib-mkenums mkenums' not found or not executable# - Solve: 找不到可执行文件 glib-mkenums (由于 glib 可执行文件和库文件加载进系统可能造成内核崩溃, 只在需要时调用)。# 编译前使用指令: export PATH=$PATH:/opt/glib-2.78.4/bin# ..........................................# * Problem: /usr/bin/ld: warning: libpcre2-8.so.0, needed by /opt/glib-2.78.4/lib/libglib-2.0.so, not found (try using -rpath or -rpath-link)# /opt/glib-2.78.4/lib/libglib-2.0.so:对‘pcre2_get_ovector_count_8’未定义的引用# - Solve: 找不到 PCRE2 的 libpcre2-8.so.0 库文件 (由于 PCRE2 库文件加载进系统可能造成内核崩溃, 只在需要时调用)。# 编译前使用指令: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/pcre2-10.43/libcd $STORAGE/harfbuzz-8.3.0 && meson setup build/ --prefix=/opt/harfbuzz-8.3.0 \--buildtype=release \--pkg-config-path=/opt/lib/pkgconfig \-Dgraphite2=enabled && \STEP_BUILDED=1# ------------------------------------------cd $STORAGE/harfbuzz-8.3.0 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................# Skip # ln -sf /opt/harfbuzz-8.3.0/bin/* /usr/local/bin/# ......................................# Skip # rsync -av /opt/harfbuzz-8.3.0/include/ /usr/local/include/# Skip # rsync -av /opt/harfbuzz-8.3.0/lib/ /usr/local/lib/# ......................................cp -f /opt/harfbuzz-8.3.0/lib/pkgconfig/*.pc /opt/lib/pkgconfig/# ......................................# 重新编译安装 (Recompile Reinstall) 第 1 步: 重新编译安装 FreeType-2.12.0。# After HarfBuzz-8.3.0 is installed, reinstall FreeType-2.12.0# 安装 HarfBuzz-8.3.0 后, 重新安装 FreeType-2.12.0。if [[ -d "/opt/freetype-2.12.0" ]]; then rm -rf /opt/freetype-2.12.0; fi# ......................................# 重新编译安装 (Recompile Reinstall) 第 2 步: 重新编译安装 Fontconfig-2.15.0。# Fontconfig-2.15.0 must be built with FreeType-2.12.0 using HarfBuzz-8.3.0# Fontconfig-2.15.0 必须使用 HarfBuzz-8.3.0 构建的 FreeType-2.12.0。if [[ -d "/opt/fontconfig-2.15.0" ]]; then rm -rf /opt/fontconfig-2.15.0; fifi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/harfbuzz-8.3.0 && return 0elseecho "[Caution] Path: ( /opt/harfbuzz-8.3.0 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 编译安装(Compile Install) freetype-2.12.0
# ##################################################
function Compile_Install_freetype_2_12_0() {if [[ ! -d "/opt/freetype-2.12.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------echo "[Confirm] Compile and Install ( freetype-2.12.0 )? (y/n)"# ..........................................read VERIFY# ..........................................if [[ $VERIFY != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/freetype-2.12.0.tar.gz && STEP_UNZIPPED=1# ------------------------------------------# * Problem: /usr/bin/ld: //usr/local/lib/libbz2.a(blocksort.o): relocation R_X86_64_PC32 against symbol `stderr@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC# /usr/bin/ld: final link failed: Bad value# collect2: error: ld returned 1 exit status# config.mk:55: recipe for target '/home/goufeng/freetype-2.12.0/objs/libfreetype.la' failed# - Solve: 在对 bzip2 执行 make 前, 修改 Makefile。# # To assist in cross-compiling# CC=gcc -fPIC # -> 第 1 处修改, 加上 -fPIC。# AR=ar# RANLIB=ranlib# LDFLAGS=# # BIGFILES=-D_FILE_OFFSET_BITS=64# CFLAGS=-Wall -Winline -O2 -fPIC -g $(BIGFILES) # -> 第 2 处修改, 加上 -fPIC。# (第 1 处貌似是外层, 我先是在第 2 处修改后依旧不起作用的时候, 在第 1 处也添加了)# 然后进行 make -f Makefile-libbz2_so (在当前目录生成 Shared Library libbz2.so) 或者 make install。cd $STORAGE/freetype-2.12.0 && ./configure --prefix=/opt/freetype-2.12.0 && STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................rsync -av /opt/freetype-2.12.0/include/ /usr/local/include/rsync -av /opt/freetype-2.12.0/lib/ /usr/local/lib/# ......................................cp -f /opt/freetype-2.12.0/lib/pkgconfig/freetype2.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/freetype-2.12.0 && return 0elseecho "[Caution] Path: ( /opt/freetype-2.12.0 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 编译安装(Compile Install) fontconfig-2.15.0
# ##################################################
function Compile_Install_fontconfig_2_15_0() {if [[ ! -d "/opt/fontconfig-2.15.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------echo "[Confirm] Compile and Install ( fontconfig-2.15.0 )? (y/n)"# ..........................................read VERIFY# ..........................................if [[ $VERIFY != "y" ]]; then exit 1; fi# ------------------------------------------tar -xvJf $STORAGE/fontconfig-2.15.0.tar.xz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/fontconfig-2.15.0 && ./configure --prefix=/opt/fontconfig-2.15.0 \PKG_CONFIG_PATH="/opt/lib/pkgconfig" && \STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/fontconfig-2.15.0/bin/* /usr/local/bin/# ......................................rsync -av /opt/fontconfig-2.15.0/include/ /usr/local/include/rsync -av /opt/fontconfig-2.15.0/lib/ /usr/local/lib/# ......................................cp -f /opt/fontconfig-2.15.0/lib/pkgconfig/fontconfig.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/fontconfig-2.15.0 && return 0elseecho "[Caution] Path: ( /opt/fontconfig-2.15.0 ) Already Exists."# ------------------------------------------return 0fi
}# Function: 构建安装(Build Install) Pango-1.51.2
# ##################################################
function Build_Install_Pango_1_51_2() {# Attention: may conflict with the original "Pango" in the system. Especially Ubuntu.# 注意: 可能与系统原有的 "Pango" 冲突。尤其是 Ubuntu。if [[ ! -d "/opt/pango-1.51.2" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( pango-1.51.2 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -xvJf $STORAGE/pango-1.51.2.tar.xz && STEP_UNZIPPED=1# ------------------------------------------# Skip # export PATH=$PATH:/opt/glib-2.78.4/bin# Skip # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/pcre2-10.43/lib# ------------------------------------------# * Option: --wrap-mode=nofallback: This switch prevents meson from using subproject fallbacks for any dependency declarations in the build files,# stopping it downloading any optional dependency which is not installed on the system.# 这个选项防止 Meson 对构建文件中的任何依赖项声明使用子项目回退, 从而阻止它下载任何未安装在系统上的可选依赖项。cd $STORAGE/pango-1.51.2 && meson build/ --prefix=/opt/pango-1.51.2 \--buildtype=release \--wrap-mode=nofallback \--pkg-config-path=/opt/lib/pkgconfig && \STEP_BUILDED=1# ------------------------------------------cd $STORAGE/pango-1.51.2 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................# Skip # ln -sf /opt/pango-1.51.2/bin/* /usr/local/bin/# ......................................# Skip # rsync -av /opt/pango-1.51.2/include/ /usr/local/include/# Skip # rsync -av /opt/pango-1.51.2/lib/ /usr/local/lib/# ......................................cp -f /opt/pango-1.51.2/lib/pkgconfig/*.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/pango-1.51.2 && return 0elseecho "[Caution] Path: ( /opt/pango-1.51.2 ) Already Exists."# ------------------------------------------return 0fi
}# ################################### Graphviz Dep: GTS (Optional) #################################### Function: 编译安装(Compile Install) GTS-0.7.6
# ##################################################
function Compile_Install_GTS_0_7_6() {if [[ ! -d "/opt/gts-0.7.6" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------echo "[Confirm] Compile and Install ( gts-0.7.6 )? (y/n)"# ..........................................read VERIFY# ..........................................if [[ $VERIFY != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/gts-0.7.6.tar.gz && STEP_UNZIPPED=1# ------------------------------------------
# checking for glib-config... /usr/bin/glib-config
# checking for GLIB - version >= 1.2.8... ./configure: line 21356: /usr/bin/glib-config: No such file or directorycd $STORAGE/gts-0.7.6 && ./configure --prefix=/opt/gts-0.7.6 \PKG_CONFIG_PATH="/opt/lib/pkgconfig" && \STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/gts-0.7.6 && return 0elseecho "[Caution] Path: ( /opt/gts-0.7.6 ) Already Exists."# ------------------------------------------return 0fi
}# ############################################# Graphviz ############################################## Function: 编译安装(Compile Install) Graphviz-8.1.0
# ##################################################
function Compile_Install_Graphviz_8_1_0() {# Graphviz 默认不能识别 .png 和 .jpeg 格式, 需要安装编译有 libpng 和 jpeg 支持的 libGD 库。# Graphviz does not recognize .png and .jpeg formats by default, and requires the installation and compilation of libGD libraries supported by libpng and jpeg.if [[ ! -d "/opt/graphviz-8.1.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CONFIGURED=0local STEP_INSTALLED=0# ------------------------------------------echo "[Confirm] Compile and Install ( graphviz-8.1.0 )? (y/n)"# ..........................................read VERIFY# ..........................................if [[ $VERIFY != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/graphviz-8.1.0.tar.gz && STEP_UNZIPPED=1# ------------------------------------------# Skip # export PATH=$PATH:/opt/glib-2.78.4/bin# Skip # export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/pcre2-10.43/lib# ------------------------------------------cd $STORAGE/graphviz-8.1.0 && ./configure --prefix=/opt/graphviz-8.1.0 \PKG_CONFIG_PATH="/opt/lib/pkgconfig" && \STEP_CONFIGURED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/graphviz-8.1.0/bin/* /usr/local/bin/# ......................................# Skip # rsync -av /opt/graphviz-8.1.0/lib/ /usr/local/lib/# ......................................cp -f /opt/graphviz-8.1.0/lib/pkgconfig/*.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/graphviz-8.1.0 && return 0elseecho "[Caution] Path: ( /opt/graphviz-8.1.0 ) Already Exists."# ------------------------------------------return 0fi
}# ############################################# Doxygen ############################################### Function: 构建安装(Build Install) Doxygen-1.10.0
# ##################################################
function Build_Install_Doxygen_1_10_0() {if [[ ! -d "/opt/doxygen-1.10.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_CREATED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( doxygen-1.10.0 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/doxygen-1.10.0.src.tar.gz && STEP_UNZIPPED=1# ------------------------------------------mkdir $STORAGE/doxygen-1.10.0/build && STEP_CREATED=1# ------------------------------------------# * Problem: [ 15%] Built target xml# [ 16%] Generating ../generated_src/configvalues.h# No module named 'pyexpat'# - Solve: 查找路径问题, cp -r /usr/local/Python-3.8.0/lib/python3.8 /usr/local/lib/# ..........................................# * Problem: CMake Error at /opt/cmake-3.28.3/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):# Could NOT find Iconv (missing: ICONV_COMPILES)# - Solve: 回溯有关 iconv 的配置信息:# ......# -- Looking for iconv_open# -- Looking for iconv_open - found# -- Found Iconv: In glibc# -- Performing Test ICONV_COMPILES# -- Performing Test ICONV_COMPILES - Failed# ......# 如果其中有 "-- Found Iconv: In glibc" 后面还出现 "Could NOT find Iconv (missing: ICONV_COMPILES)", 则说明系统原有的 iconv 和新装的 iconv 冲突了。# 系统调用的是包含在 glibc 中的 iconv (iconv 是 glibc 中的内容) 却被新装的 iconv 的 include 或 library 抢占了加载优先级, 导致 iconv 测试失败。# 相关资料 (http://en.wikipedia.org/wiki/Iconv):# All recent Linux distributions contain a free implementation of iconv() as part of the GNU C Library which is the C library for current Linux systems.# To use it, the GNU glibc locales need to be installed, which are provided as a separate package (usually named glibc-locale) normally installed by default.# 移除新装的 iconv 后问题解决。cd $STORAGE/doxygen-1.10.0/build && cmake ../ -G "Unix Makefiles" \-DCMAKE_BUILD_TYPE=Release \-DCMAKE_INSTALL_PREFIX=/opt/doxygen-1.10.0 && \STEP_BUILDED=1# ------------------------------------------make && make install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenln -sf /opt/doxygen-1.10.0/bin/doxygen /usr/local/bin/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/doxygen-1.10.0 && return 0elseecho "[Caution] Path: ( /opt/doxygen-1.10.0 ) Already Exists."# ------------------------------------------return 0fi
}# ############################################# Wayland ############################################### Function: 构建安装(Build Install) Wayland-1.22.0
# ##################################################
function Build_Install_Wayland_1_22_0() {if [[ ! -d "/opt/wayland-1.22.0" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( wayland-1.22.0 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/wayland-1.22.0.tar.gz && STEP_UNZIPPED=1# ------------------------------------------# * Problem: Program dot found: NO# doc/meson.build:5:0: ERROR: Program 'dot' not found or not executable# - Solve: Install Graphviz, 或者如果您不需要构建文档, 构建时添加 -Ddocumentation=false 选项就会关闭文档, 则不需要 dot。# ..........................................# * Problem: Message: doxygen: 1.10.0 (GIT-NOTFOUND)# Message: dot: dot - graphviz version 8.1.0 (20230707.0739)# doc/meson.build:27:1: ERROR: Problem encountered: The style sheet for man pages providing "http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl" was not found.# - Solve: Install DocBook-XSL.cd $STORAGE/wayland-1.22.0 && meson build/ --prefix=/opt/wayland-1.22.0 \--pkg-config-path=/opt/lib/pkgconfig && \STEP_BUILDED=1# ------------------------------------------# * Problem: [16/108] Generating doc/doxygen/xml/wayland-architecture.png with a custom command# FAILED: doc/doxygen/xml/wayland-architecture.png# /usr/local/bin/dot -Tpng -odoc/doxygen/xml/wayland-architecture.png ../doc/doxygen/dot/wayland-architecture.gv# Format: "png" not recognized. Use one of: canon cmap cmapx cmapx_np dot dot_json eps fig gv imap imap_np ismap json json0 mp pic plain plain-ext pov ps ps2 svg svgz tk xdot xdot1.2 xdot1.4 xdot_json# - Solve: Install libGD.cd $STORAGE/wayland-1.22.0 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................ln -sf /opt/wayland-1.22.0/bin/* /usr/local/bin/# ......................................rsync -av /opt/wayland-1.22.0/include/ /usr/local/include/rsync -av /opt/wayland-1.22.0/lib/ /usr/local/lib/# ......................................cp -f /opt/wayland-1.22.0/lib/pkgconfig/*.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/wayland-1.22.0 && return 0elseecho "[Caution] Path: ( /opt/wayland-1.22.0 ) Already Exists."# ------------------------------------------return 0fi
}# ####################################### Wayland - Protocols ######################################### Function: 构建安装(Build Install) Wayland-Protocols-1.32
# ##################################################
function Build_Install_Wayland_Protocols_1_32() {if [[ ! -d "/opt/wayland-protocols-1.32" ]]; thenlocal VERIFYlocal STEP_UNZIPPED=0local STEP_BUILDED=0local STEP_INSTALLED=0# ------------------------------------------read -p "[Confirm] Build and Install ( wayland-protocols-1.32 )? (y/n)>" VERIFYif [[ "$VERIFY" != "y" ]]; then exit 1; fi# ------------------------------------------tar -zxvf $STORAGE/wayland-protocols-1.32.tar.gz && STEP_UNZIPPED=1# ------------------------------------------cd $STORAGE/wayland-protocols-1.32 && meson build/ --prefix=/opt/wayland-protocols-1.32 \--pkg-config-path=/opt/lib/pkgconfig && \STEP_BUILDED=1# ------------------------------------------cd $STORAGE/wayland-protocols-1.32 && ninja -C build/ install && STEP_INSTALLED=1# ------------------------------------------if [[ $STEP_INSTALLED == 1 ]]; thenif [[ ! -d "/opt/lib" ]]; then mkdir /opt/lib; fiif [[ ! -d "/opt/lib/pkgconfig" ]]; then mkdir /opt/lib/pkgconfig; fi# ......................................cp -f /opt/wayland-protocols-1.32/share/pkgconfig/wayland-protocols.pc /opt/lib/pkgconfig/fi# ------------------------------------------cd $STORAGE && rm -rf $STORAGE/wayland-protocols-1.32 && return 0elseecho "[Caution] Path: ( /opt/wayland-protocols-1.32 ) Already Exists."# ------------------------------------------return 0fi
}function main() {# ----------------- Dependency -----------------Compile_Install_libffi_3_4_4# ----------------- XML Tools ------------------Compile_Install_libxml2_2_9_1Compile_Install_expat_2_5_0Compile_Install_libxslt_1_1_28Compile_Install_xmlto_0_0_28# --- XML Tools (XSL Stylesheets) DocBook-XSL --Deploy_Install_XSL_Stylesheets_DocBook_XSL_1_79_1# ------- Graphviz Dep: Cairo (Optional) -------Build_Install_Pixman_0_43_4Build_Install_Cairo_1_18_0# ------- Graphviz Dep: Pango (Optional) -------Build_Install_FriBidi_1_0_13Build_Install_Graphite2_1_3_14Build_Install_HarfBuzz_8_3_0Compile_Install_freetype_2_12_0Compile_Install_fontconfig_2_15_0Build_Install_Pango_1_51_2# -------- Graphviz Dep: GTS (Optional) --------#Compile_Install_GTS_0_7_6# ------------------ Graphviz ------------------Compile_Install_Graphviz_8_1_0# ------------------ Doxygen -------------------Build_Install_Doxygen_1_10_0# ------------------ Wayland -------------------Build_Install_Wayland_1_22_0# ------------ Wayland - Protocols -------------Build_Install_Wayland_Protocols_1_32
}main
总结
以上就是关于 Linux运维 Bash脚本 编译安装Wayland-1.22.0 的全部内容。
更多内容可以访问我的代码仓库:
https://gitee.com/goufeng928/public
https://github.com/goufeng928/public
相关文章:
Linux运维_Bash脚本_编译安装Wayland-1.22.0
Linux运维_Bash脚本_编译安装Wayland-1.22.0 Bash (Bourne Again Shell) 是一个解释器,负责处理 Unix 系统命令行上的命令。它是由 Brian Fox 编写的免费软件,并于 1989 年发布的免费软件,作为 Sh (Bourne Shell) 的替代品。 您可以在 Linu…...
Python数字类型
文章目录 Python数字类型1. 数字类型1.1 数字类型概述1.2 整数类型1.3 浮点数类型1.4 复数 2. 数字类型的操作2.1 内置的数值运算操作符2.2 内置的数值运算函数2.3 内置的数字类型转换函数 思考与练习 Python数字类型 1. 数字类型 1.1 数字类型概述 数字是自然界计数活动的抽…...
每天一个数据分析题(一百九十六)
在多元线性回归模型的自变量选择方法中,关于向后回归法和逐步回归法的描述,以下哪些是正确的? A. 向后回归法开始时包含所有自变量,并逐步剔除每个不显著的变量。 B. 逐步回归法结合了向前回归法和向后回归法,可以在…...
华为北向网管NCE开发教程(1)闭坑选接口协议
华为北向网管NCE开发教程(1)闭坑选接口协议 华为北向网管NCE开发教程(2)REST接口开发 华为北向网管NCE开发教程(3)CORBA协议开发 本文一是记录自己开发华为北向网管遇到的坑,二是给需要的人&…...
JavaScript极速入门-综合案例(3)
综合案例 猜数字 预期效果 代码实现 <button type"button" id"reset">重新开始一局游戏</button><br>请输入要猜的数字:<input type"text" id"number"><button type"button" id"button&q…...
RabbitMQ架构详解
文章目录 概述架构详解核心组件虚拟主机(Virtual Host)RabbitMQ 有几种广播类型 概述 RabbitMQ是⼀个高可用的消息中间件,支持多种协议和集群扩展。并且支持消息持久化和镜像队列,适用于对消息可靠性较高的场合 官网https://www.…...
编译内核错误 multiple definition of `yylloc‘
编译内核错误 # make ARCHarm CROSS_COMPILEarm-mix410-linux- uImageHOSTLD scripts/dtc/dtc /usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss0x10): multiple definition of yylloc; scripts/dtc/dtc-lexer.lex.o:(.bss0x0): first defined here collect2: error: ld ret…...
深度学习模型部署(四)常用模型及推理平台评估指标
判断选择什么模型,什么量化方案,什么推理框架,最基础的知识就是如何评估自己的模型以及推理平台。 模型衡量标准 衡量一个模型的最直接标准就是运算速度,但是运算速度是无法计算的,所以定义了一些间接标准来推测模型的…...
【控制台警告】npm WARN EBADENGINE Unsupported engine
今天用webpack下载几个loader依赖,爆出了三个警告,大概的意思就是本地安装的node和npm的版本不是很匹配? 我的解决思路是: 先检查node和npm版本 然后去官网查找版本的对应 靠,官网404 Node.js (nodejs.org) 就找到…...
ArmSoM Rockchip系列产品 通用教程 之 GPIO 使用
1. GPIO简介 GPIO,全称 General-Purpose Input/Output(通用输入输出),是一种在计算机和嵌入式系统中常见的数字输入输出接口。它允许软件控制硬件的数字输入和输出,例如开关、传感器、LED灯等。GPIO通常由一个芯片或…...
npm镜像源地址
镜像源地址替换问题(重要) 2024 年 1 月 22 日 ,registry.npm.taobao.org 的 SSL 证书正式过期。 2022 年 5 月 淘宝源发布了公告: (大家应该没有太多关注哦,也包括我,哈哈) &am…...
Java的Writer类详解
咦咦咦,各位小可爱,我是你们的好伙伴——bug菌,今天又来给大家普及Java SE相关知识点了,别躲起来啊,听我讲干货还不快点赞,赞多了我就有动力讲得更嗨啦!所以呀,养成先点赞后阅读的好…...
R语言基础的代码语法解译笔记
1、双冒号,即:“::” 要使用某个包里的函数,通常做法是先加载(library)包,再调用函数。最新加载的包的namespace会成为最新的enviroment,某些情况下可能影响函数的结果。而package name::funct…...
【蓝桥杯】蓝桥杯算法复习(一)
😀大家好,我是白晨,一个不是很能熬夜😫,但是也想日更的人✈。如果喜欢这篇文章,点个赞👍,关注一下👀白晨吧!你的支持就是我最大的动力!Ǵ…...
移动端精准测试简介
在测试领域每隔一段时间,就会有一些主流的测试技术,比如说:接口自动化,WebUI, AppUI自动化,然后就是测试平台的开发,各类专项测试(性能,安全),再到前几年的手机集群云测平…...
CCProxy代理服务器地址的设置步骤
目录 前言 一、下载和安装CCProxy 二、启动CCProxy并设置代理服务器地址 三、验证代理服务器设置是否生效 四、使用CCProxy进行代理设置的代码示例 总结 前言 CCProxy是一款常用的代理服务器软件,可以帮助用户实现网络共享和上网代理。本文将详细介绍CCProxy…...
探秘分布式神器RMI:原理、应用与前景分析(二)
本系列文章简介: 本系列文章将深入探究RMI远程调用的原理、应用及未来的发展趋势。首先,我们会详细介绍RMI的工作原理和基本流程,解析其在分布式系统中的核心技术。随后,我们将探讨RMI在各个领域的应用,包括分布式计算…...
[项目设计] 从零实现的高并发内存池(三)
🌈 博客个人主页:Chris在Coding 🎥 本文所属专栏:[高并发内存池] ❤️ 前置学习专栏:[Linux学习] ⏰ 我们仍在旅途 目录 4.CentralCache实现 4.1 CentralCache整体架构 4.2 围绕Span的相关设计…...
将Q算法和D算法结合应用到llm解码上之人在回路
将Q算法和D算法结合应用到llm解码上之人在回路 参考地址代码解释 参考地址 https://dongfangyou.blog.csdn.net/article/details/136466609 代码 import numpy as np from tqdm import tqdmfrom sample import net, char2id_dict, get_real_p# 假设的词汇表 VOCABULARY lis…...
el-table-column嵌套el-form-item不能进行校验问题解决
项目为vue3elementPlus开发的项目 业务要求:table表格展示数据,其中有一行是ip地址可展示可修改,此处要求增加自定义校验规则 先看一下效果: 此处先描述一下,问题出在了哪里,我将el-table的data,使用一个…...
Golang 面试经典题:map 的 key 可以是什么类型?哪些不可以?
Golang 面试经典题:map 的 key 可以是什么类型?哪些不可以? 在 Golang 的面试中,map 类型的使用是一个常见的考点,其中对 key 类型的合法性 是一道常被提及的基础却很容易被忽视的问题。本文将带你深入理解 Golang 中…...
练习(含atoi的模拟实现,自定义类型等练习)
一、结构体大小的计算及位段 (结构体大小计算及位段 详解请看:自定义类型:结构体进阶-CSDN博客) 1.在32位系统环境,编译选项为4字节对齐,那么sizeof(A)和sizeof(B)是多少? #pragma pack(4)st…...
Neo4j 集群管理:原理、技术与最佳实践深度解析
Neo4j 的集群技术是其企业级高可用性、可扩展性和容错能力的核心。通过深入分析官方文档,本文将系统阐述其集群管理的核心原理、关键技术、实用技巧和行业最佳实践。 Neo4j 的 Causal Clustering 架构提供了一个强大而灵活的基石,用于构建高可用、可扩展且一致的图数据库服务…...
【开发技术】.Net使用FFmpeg视频特定帧上绘制内容
目录 一、目的 二、解决方案 2.1 什么是FFmpeg 2.2 FFmpeg主要功能 2.3 使用Xabe.FFmpeg调用FFmpeg功能 2.4 使用 FFmpeg 的 drawbox 滤镜来绘制 ROI 三、总结 一、目的 当前市场上有很多目标检测智能识别的相关算法,当前调用一个医疗行业的AI识别算法后返回…...
今日学习:Spring线程池|并发修改异常|链路丢失|登录续期|VIP过期策略|数值类缓存
文章目录 优雅版线程池ThreadPoolTaskExecutor和ThreadPoolTaskExecutor的装饰器并发修改异常并发修改异常简介实现机制设计原因及意义 使用线程池造成的链路丢失问题线程池导致的链路丢失问题发生原因 常见解决方法更好的解决方法设计精妙之处 登录续期登录续期常见实现方式特…...
深度学习习题2
1.如果增加神经网络的宽度,精确度会增加到一个特定阈值后,便开始降低。造成这一现象的可能原因是什么? A、即使增加卷积核的数量,只有少部分的核会被用作预测 B、当卷积核数量增加时,神经网络的预测能力会降低 C、当卷…...
HashMap中的put方法执行流程(流程图)
1 put操作整体流程 HashMap 的 put 操作是其最核心的功能之一。在 JDK 1.8 及以后版本中,其主要逻辑封装在 putVal 这个内部方法中。整个过程大致如下: 初始判断与哈希计算: 首先,putVal 方法会检查当前的 table(也就…...
C++.OpenGL (14/64)多光源(Multiple Lights)
多光源(Multiple Lights) 多光源渲染技术概览 #mermaid-svg-3L5e5gGn76TNh7Lq {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-3L5e5gGn76TNh7Lq .error-icon{fill:#552222;}#mermaid-svg-3L5e5gGn76TNh7Lq .erro…...
C++课设:简易日历程序(支持传统节假日 + 二十四节气 + 个人纪念日管理)
名人说:路漫漫其修远兮,吾将上下而求索。—— 屈原《离骚》 创作者:Code_流苏(CSDN)(一个喜欢古诗词和编程的Coder😊) 专栏介绍:《编程项目实战》 目录 一、为什么要开发一个日历程序?1. 深入理解时间算法2. 练习面向对象设计3. 学习数据结构应用二、核心算法深度解析…...
STM32HAL库USART源代码解析及应用
STM32HAL库USART源代码解析 前言STM32CubeIDE配置串口USART和UART的选择使用模式参数设置GPIO配置DMA配置中断配置硬件流控制使能生成代码解析和使用方法串口初始化__UART_HandleTypeDef结构体浅析HAL库代码实际使用方法使用轮询方式发送使用轮询方式接收使用中断方式发送使用中…...
