Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

About the software that cannot be opened after the ebuild fi

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
1 post • Page 1 of 1
Author
Message
wlmosv
n00b
n00b
User avatar
Posts: 48
Joined: Fri Apr 19, 2024 11:01 am

About the software that cannot be opened after the ebuild fi

  • Quote

Post by wlmosv » Fri Jun 21, 2024 12:42 am

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: Select all

 # 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: Select all

# 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: Select all

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/ ... office-365
学习他,成为他,超越他:Embrace the journey of learning from him, becoming like him, and ultimately surpassing him.
Top
Post Reply
1 post • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic