Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
About the software that cannot be opened after the ebuild fi
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
wlmosv
n00b
n00b


Joined: 19 Apr 2024
Posts: 38

PostPosted: Fri Jun 21, 2024 12:42 am    Post subject: About the software that cannot be opened after the ebuild fi Reply with quote

Hello everyone, I recently saw that AUR has a pkg file about wps-office365, I tried to modify it by imitating the ebuild file of wps, but I had some problems, he would throw some danger tips and icon problems from time to time, I have a version here that can be installed but can't be opened, and there is a version that I modified but can't install at all First of all, this is the version of the ebuild file that can be installed normally:
Code:
 # Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit unpacker xdg desktop optfeature
# 设置版本号和衍生变量
MY_PV="12.8.2.16969"
MY_P="${PN}_${PV}"

DESCRIPTION="WPS Office is an office productivity suite"
HOMEPAGE="https://www.wps.com/office/linux/"

KEYWORDS="~amd64"

SRC_URI="
amd64? ( https://ks3.wpsplus.wpscdn.cn/img/${PN}_${PV}.AK.preload.sw._integration_xiezuo4.24_amd64.deb )
"

SLOT="0"
RESTRICT="bindist strip mirror" # mirror as explained at bug #547372
QA_PREBUILT="*"
LICENSE="WPS-EULA"
IUSE="systemd"

# Deps got from this (listed in order):
# rpm -qpR wps-office-10.1.0.5707-1.a21.x86_64.rpm
# ldd /opt/kingsoft/wps-office/office6/wps
# ldd /opt/kingsoft/wps-office/office6/wpp
RDEPEND="
   app-arch/bzip2:0
   app-arch/lz4
   app-arch/xz-utils
   dev-libs/expat
   dev-libs/glib:2
   dev-libs/libbsd
   dev-libs/libffi:0/8
   dev-libs/libgcrypt:0
   dev-libs/libgpg-error
   dev-libs/libpcre:3
   media-libs/freetype:2
   dev-qt/qtnetwork:5
   dev-qt/qtwidgets:5

   media-libs/fontconfig:1.0
   media-libs/flac:0/10-12
   media-libs/libogg
   media-libs/libpulse
   media-libs/libsndfile
   media-libs/libvorbis
   media-libs/tiff-compat:4
   net-libs/libasyncns
   net-print/cups
   sys-apps/attr
   sys-apps/tcp-wrappers
   sys-apps/util-linux
   sys-libs/libcap
   sys-libs/libcxx
   sys-libs/zlib:0
   virtual/glu
   x11-libs/gtk+:2
   x11-libs/libICE
   x11-libs/libSM
   x11-libs/libX11
   x11-libs/libXau
   x11-libs/libxcb
   x11-libs/libXext
   x11-libs/libXrender
   x11-libs/libXtst
   x11-libs/libXdmcp

"

S="${WORKDIR}"

src_install() {
   # https://bugs.gentoo.org/878451
   rm "${S}"/opt/kingsoft/wps-office/office6/libstdc++.so* || die

   # https://bugs.gentoo.org/813138
   use systemd || { rm "${S}"/opt/kingsoft/wps-office/office6/libdbus-1.so* || die ; }

   exeinto /usr/bin
   exeopts -m0755
   doexe "${S}"/usr/bin/*

   insinto /usr/share
   # Skip mime subdir to not get selected over rest of office suites
   doins -r "${S}"/usr/share/{applications,desktop-directories,icons,templates}

   insinto /opt/kingsoft/wps-office
   doins -r "${S}"/opt/kingsoft/wps-office/{office6,templates}


   fperms 0755 /opt/kingsoft/wps-office/office6/{wps,wpp,et,wpspdf,wpsoffice,promecefpluginhost,transerr,ksolaunch,wpscloudsvr}
}



The following are the versions that do not install properly:
Code:
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8
inherit unpacker xdg desktop optfeature
# 设置版本号和衍生变量
MY_PV="12.8.2.16969"
MY_P="${PN}_${PV}"

DESCRIPTION="WPS Office is an office productivity suite"
HOMEPAGE="https://www.wps.com/office/linux/"

KEYWORDS="~amd64"

SRC_URI="
amd64? ( https://ks3.wpsplus.wpscdn.cn/img/${PN}_${PV}.AK.preload.sw._integration_xiezuo4.24_amd64.deb )
"

SLOT="0"
RESTRICT="bindist strip mirror" # mirror as explained at bug #547372
QA_PREBUILT="*"
LICENSE="WPS-EULA"
IUSE="systemd"

# Deps got from this (listed in order):
# rpm -qpR wps-office-10.1.0.5707-1.a21.x86_64.rpm
# ldd /opt/kingsoft/wps-office/office6/wps
# ldd /opt/kingsoft/wps-office/office6/wpp
RDEPEND="
   app-arch/bzip2:0
   app-arch/lz4
   app-arch/xz-utils
   dev-libs/expat
   dev-libs/glib:2
   dev-libs/libbsd
   dev-libs/libffi:0/8
   dev-libs/libgcrypt:0
   dev-libs/libgpg-error
   dev-libs/libpcre:3
   media-libs/freetype:2
   dev-qt/qtnetwork:5
   dev-qt/qtwidgets:5

   media-libs/fontconfig:1.0
   media-libs/flac:0/10-12
   media-libs/libogg
   media-libs/libpulse
   media-libs/libsndfile
   media-libs/libvorbis
   media-libs/tiff-compat:4
   net-libs/libasyncns
   net-print/cups
   sys-apps/attr
   sys-apps/tcp-wrappers
   sys-apps/util-linux
   sys-libs/libcap
   sys-libs/libcxx
   sys-libs/zlib:0
   virtual/glu
   x11-libs/gtk+:2
   x11-libs/libICE
   x11-libs/libSM
   x11-libs/libX11
   x11-libs/libXau
   x11-libs/libxcb
   x11-libs/libXext
   x11-libs/libXrender
   x11-libs/libXtst
   x11-libs/libXdmcp

"
S="${WORKDIR}"

src_install() {
   # Use patchelf to fix DT_RPATH issues
   find "${D}" -type f \( -name '*.so' -o -name '*.so.*' \) -exec \
      patchelf --set-rpath '$ORIGIN' {} \; || die "Failed to patch DT_RPATH"

   # Remove unwanted files
   rm "${D}"/opt/kingsoft/wps-office/office6/libstdc++.so* || die "Failed to remove libstdc++.so*"

   # Optionally remove libdbus-1.so if systemd USE flag is not enabled
   use systemd || rm "${D}"/opt/kingsoft/wps-office/office6/libdbus-1.so* || die "Failed to remove libdbus-1.so"

   # Install binaries to /usr/bin
   exeinto /usr/bin
   doexe "${S}"/opt/kingsoft/wps-office/office6/{wps,wpp,et,wpspdf,wpsoffice,promecefpluginhost,transerr,ksolaunch,wpscloudsvr}

   # Install data to /opt/kingsoft/wps-office
   insinto /opt/kingsoft/wps-office
   doins -r "${S}"/opt/kingsoft/wps-office/{office6,templates}

   # Set permissions for specific files
   fperms 0755 /opt/kingsoft/wps-office/office6/{wps,wpp,et,wpspdf,wpsoffice,promecefpluginhost,transerr,ksolaunch,wpscloudsvr}
}


My file structure is as follows:
Code:
wlmosv$ pwd
/var/db/repos/example_repository/app-office/wps-office
wlmosv$ cd /var/db/repos/example_repository/
wlmosv$ tree
.
├── app-office
│   ├── wps-office
│   │   ├── Manifest
│   │   └── wps-office-12.8.2.16969.ebuild
│   └── wps-office-12.8.2.16969.ebuild
├── metadata
│   └── layout.conf
└── profiles
    ├── eapi
    └── repo_name

5 directories, 6 files
wlmosv$


If you don't mind, you can take a look at the pkg address of AUR I really don't know how to modify it Ask for help!
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=wps-office-365
_________________
学习他,成为他,超越他:Embrace the journey of learning from him, becoming like him, and ultimately surpassing him.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum