欢迎光临散文网 会员登陆 & 注册

尝试构建基于LoongArch64架构Linux系统桌面办公软件libreoffice

2023-01-29 16:33 作者:gracefeld  | 我要投稿


1 设置环境变量
```shexport LDFLAGS="-Wl,-rpath-link=${SYSDIR}/sysroot/usr/lib64"export PKG_CONFIG_SYSROOT_DIR=${SYSDIR}/sysrootexport PKG_CONFIG_PATH="${SYSDIR}/sysroot/usr/lib64/pkgconfig:${SYSDIR}/sysroot/usr/share/pkgconfig"export COMMON_CONFIG="--prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 \                      --build=${CROSS_HOST} --host=${CROSS_TARGET}"export JOBS="-j8"```


LibreOffice
获取软件代码。
```shgit clone https://git.libreoffice.org/core --depth 1pushd coregit submodule initgit submodule update --depth 1popdmv core libreoffice-7.5-gittar -czf ${DOWNLOADDIR}/libreoffice-7.5-git.tar.gz libreoffice-7.5-git```
编译和安装。
```tar xvf ${DOWNLOADDIR}/libreoffice-7.5-git.tar.gz -C ${BUILDDIR}pushd ${BUILDDIR}/libreoffice-7.5-git   

 cp ${SYSDIR}/cross-tools/share/automake-1.16/config.* ./    aclocal    

patch -Np1 -i ${DOWNLOADDIR}/libreoffice-7.5-for-clfs.patch    

patch -Np1 -i ${DOWNLOADDIR}/libreoffice-7.5-libgpg-error-add-loongarch64.patch    

patch -Np1 -i ${DOWNLOADDIR}/libreoffice-7.5-postgresql-disable_spinlock.patch    

PKG_CONFIG_FOR_BUILD=/bin/pkg-config \    

perl ./autogen.sh CC=${CROSS_TARGET}-gcc CXX=${CROSS_TARGET}-g++ \                     

 --build=${CROSS_HOST} --host=${CROSS_TARGET} \                      

--prefix=/opt/libreoffice \                      

--with-lang="zh-CN" --with-vendor=Sunhaiyong \                     

 --with-help --with-myspell-dicts \                     

 --without-junit --without-system-dicts --disable-dconf --disable-odk \                      

--enable-release-build=yes --without-java \                      

--with-system-boost --with-system-curl --with-system-epoxy \                     

 --with-system-expat --with-system-graphite --with-system-harfbuzz \                      

--with-system-icu --with-system-jpeg --with-system-lcms2 \                      

--with-system-libatomic_ops --with-system-libpng --with-system-libxml \                     

 --with-system-nss --with-system-openssl \                     

--with-system-zlib --with-system-openjpeg \                     

 LIBS="-lstdc++" \                      

--with-boost-libdir=${SYSDIR}/sysroot/usr/lib64 \                      

--disable-coinmp --enable-python=no    

ZIC=/usr/sbin/zic make build ${JOBS}    

make DESTDIR=${PWD}/dest distro-pack-install    

cp -a ${PWD}/dest/opt/libreoffice ${SYSDIR}/sysroot/opt/    

mkdir -pv ${SYSDIR}/sysroot/usr/share/bash-completion/completions/    

cp -a ${PWD}/dest/usr/share/bash-completion/completions/* ${SYSDIR}/sysroot/usr/share/bash-completion/completions/    cp -a ${PWD}/dest/opt/libreoffice/share/applications/*.desktop \           

${SYSDIR}/sysroot/usr/share/applications/    

mkdir -pv ${SYSDIR}/sysroot/usr/share/xdg/    

cp -a ${PWD}/dest/opt/libreoffice/lib/libreoffice/share/xdg/*.desktop \           

${SYSDIR}/sysroot/usr/share/xdg/popd```




尝试构建基于LoongArch64架构Linux系统桌面办公软件libreoffice的评论 (共 条)

分享到微博请遵守国家法律