libreoffice: move GTK and Qt out-of common

This commit is contained in:
Đoàn Trần Công Danh 2024-09-03 18:34:33 +07:00
parent 5561460efe
commit 8258c01214
2 changed files with 31 additions and 2 deletions

1
srcpkgs/libreoffice-libgtk Symbolic link
View File

@ -0,0 +1 @@
libreoffice

View File

@ -1,7 +1,7 @@
# Template file for 'libreoffice'
pkgname=libreoffice
version=24.8.0.3
revision=1
revision=2
build_style=meta
build_helper="gir"
make_build_target="build"
@ -178,7 +178,7 @@ _split() {
list=${wrksrc}/file-lists/${1}_list.txt
# skip non-existing file lists
[ -f ${list} ] || msg_error "There is no ${1}_list.txt file!\n"
grep -v '^%dir' "$list" | sort -u |
grep -v -e '^%dir' -e '^$' "$list" | sort -u |
while read file; do
dir="${file%/*}"
[ -d "${PKGDESTDIR}/${dir}" ] || vmkdir "${dir}"
@ -525,6 +525,12 @@ do_install() {
# Remove useless directory usr/lib32
rm -rf ${DESTDIR}/usr/lib32
grep libreoffice.program.libavmediagtk file-lists/common_list.txt \
>>file-lists/gnome_list.txt
vsed -i -e '/libavmediaqt6/d' \
-e '/libavmediagtk/d' \
-e '/liblibreofficekitgtk/d' \
file-lists/common_list.txt
}
libreoffice-common_package() {
@ -615,6 +621,7 @@ libreoffice-qt6_package() {
cat > ${wrksrc}/file-lists/qt6_list.txt <<-EOF
%dir /usr/lib/libreoffice/program
/usr/lib/libreoffice/program/libvclplug_qt6lo.so
/usr/lib/libreoffice/program/libavmediaqt6.so
EOF
_split qt6
}
@ -634,6 +641,27 @@ libreoffice-kde_package() {
}
}
libreoffice-libgtk_package() {
short_desc="GTK+3 widget wrapping LibreOffice functionality"
pkg_install() {
local _gir_wrkdir
cat > ${wrksrc}/file-lists/libgtk_list.txt <<-EOF
%dir /usr/lib/libreoffice/program
/usr/lib/libreoffice/program/liblibreofficekitgtk.so
EOF
_split libgtk
ln -sf libreoffice/program/liblibreofficekitgtk.so \
"${PKGDESTDIR}/usr/lib/liblibreofficekitgtk.so"
vmkdir usr/share/gir-1.0
vmkdir usr/lib/girepository-1.0
_gir_wrkdir=workdir/CustomTarget/sysui/share/libreoffice
vinstall "${_gir_wrkdir}/LOKDocView-0.1.typelib" 644 \
usr/lib/girepository-1.0
vinstall "${_gir_wrkdir}/LOKDocView-0.1.gir" 644 \
usr/share/gir-1.0
}
}
libreoffice-kit_package() {
short_desc+=" - development files"
pkg_install() {