mirror of
https://github.com/void-linux/void-packages.git
synced 2025-04-16 14:17:02 +02:00
parent
b48366d085
commit
519a81a54f
8 changed files with 149 additions and 0 deletions
|
@ -4159,3 +4159,4 @@ libsyncthingmodel.so.1.2.2 syncthingtray-1.2.2_1
|
|||
libsyncthingconnector.so.1.2.2 syncthingtray-1.2.2_1
|
||||
libglibutil.so.1 libglibutil-1.0.64_1
|
||||
libgbinder.so.1 libgbinder-1.1.20_1
|
||||
libsunpinyin.so.3 libsunpinyin-3.0.0rc2_1
|
||||
|
|
1
srcpkgs/ibus-sunpinyin
Symbolic link
1
srcpkgs/ibus-sunpinyin
Symbolic link
|
@ -0,0 +1 @@
|
|||
sunpinyin
|
1
srcpkgs/libsunpinyin
Symbolic link
1
srcpkgs/libsunpinyin
Symbolic link
|
@ -0,0 +1 @@
|
|||
sunpinyin
|
1
srcpkgs/libsunpinyin-devel
Symbolic link
1
srcpkgs/libsunpinyin-devel
Symbolic link
|
@ -0,0 +1 @@
|
|||
sunpinyin
|
11
srcpkgs/sunpinyin/patches/libexecdir.patch
Normal file
11
srcpkgs/sunpinyin/patches/libexecdir.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- a/wrapper/ibus/SConstruct
|
||||
+++ b/wrapper/ibus/SConstruct
|
||||
@@ -71,7 +71,7 @@ PassVariables(envvar, env)
|
||||
|
||||
data_dir = env['DATADIR'] + '/ibus-sunpinyin'
|
||||
icons_dir = env['DATADIR'] + '/ibus-sunpinyin/icons'
|
||||
-bin_dir = env['LIBEXECDIR'] + '/ibus-sunpinyin'
|
||||
+bin_dir = env['LIBEXECDIR']
|
||||
gettext_package = 'ibus-sunpinyin'
|
||||
|
||||
extra_cflags = ' -DIBUS_SUNPINYIN_LOCALEDIR=\'"%s"\'' % (env['DATADIR'] + '/locale')
|
10
srcpkgs/sunpinyin/patches/pkg-config.patch
Normal file
10
srcpkgs/sunpinyin/patches/pkg-config.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- a/sunpinyin-2.0.pc.in
|
||||
+++ b/sunpinyin-2.0.pc.in
|
||||
@@ -1,6 +1,6 @@
|
||||
prefix=@PREFIX@
|
||||
exec_prefix=${prefix}
|
||||
-libdir=@LIBDIR@
|
||||
+libdir=${exec_prefix}/lib
|
||||
includedir=${exec_prefix}/include/sunpinyin-2.0
|
||||
|
||||
Name: libsunpinyin
|
22
srcpkgs/sunpinyin/patches/version.patch
Normal file
22
srcpkgs/sunpinyin/patches/version.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
--- a/SConstruct
|
||||
+++ b/SConstruct
|
||||
@@ -7,7 +7,7 @@ import sys
|
||||
|
||||
import SCons.Errors
|
||||
|
||||
-version = "2.0.4"
|
||||
+version = "3.0.0-rc2"
|
||||
abi_major = 3
|
||||
abi_minor = 0
|
||||
|
||||
--- a/wrapper/ibus/SConstruct
|
||||
+++ b/wrapper/ibus/SConstruct
|
||||
@@ -14,7 +14,7 @@ sources = ['src/debug.cpp',
|
||||
locales = ['zh_CN']
|
||||
|
||||
cflags = '-O2 -g -pipe '
|
||||
-version = '2.0.3'
|
||||
+version = '3.0.0-rc2'
|
||||
|
||||
AddOption('--prefix', dest='prefix', metavar='DIR',
|
||||
help='installation prefix')
|
102
srcpkgs/sunpinyin/template
Normal file
102
srcpkgs/sunpinyin/template
Normal file
|
@ -0,0 +1,102 @@
|
|||
# Template file for 'sunpinyin'
|
||||
pkgname=sunpinyin
|
||||
version=3.0.0rc2
|
||||
revision=1
|
||||
wrksrc="sunpinyin-${version/rc/-rc}"
|
||||
build_style=scons
|
||||
hostmakedepends="pkg-config python3 perl gettext"
|
||||
makedepends="python3-devel sqlite-devel ibus-devel"
|
||||
short_desc="Statistical language model based Chinese input method"
|
||||
maintainer="Đoàn Trần Công Danh <congdanhqx@gmail.com>"
|
||||
license="LGPL-2.1-or-later, CDDL-1.0"
|
||||
homepage="https://github.com/sunpinyin/sunpinyin"
|
||||
# fcitx has this archive, too
|
||||
_lm_sc=lm_sc.3gm.arpa-20140820.tar.bz2
|
||||
_dict=dict.utf8-20131214.tar.bz2
|
||||
distfiles="https://github.com/sunpinyin/sunpinyin/archive/refs/tags/v${version/rc/-rc}.tar.gz
|
||||
https://downloads.sourceforge.net/project/open-gram/$_lm_sc
|
||||
https://downloads.sourceforge.net/project/open-gram/$_dict"
|
||||
checksum="6722bd41e58b0a42bf41b7c1cb7707e6adfce810ab35597f938c5df8aa5a0af0
|
||||
751bab7c55ea93a2cedfb0fbb7eb09f67d4da9c2c55496e5f31eb8580f1d1e2f
|
||||
af70bc2bcd7af7468495774fed9e3a2de434650119fbc3d3388c2bcf7e0acb01"
|
||||
skip_extraction="$_lm_sc $_dict"
|
||||
CXXFLAGS="-I../../src"
|
||||
LDFLAGS="-L."
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
hostmakedepends+=" sunpinyin"
|
||||
fi
|
||||
|
||||
do_configure() {
|
||||
cat <<-EOF >configure.conf
|
||||
PREFIX = '/usr'
|
||||
LIBDIR = '/usr/lib'
|
||||
DATADIR = '/usr/share'
|
||||
ENABLE_PLUGINS = True
|
||||
PYTHON = '/usr/bin/python3'
|
||||
EOF
|
||||
cat <<-EOF >wrapper/ibus/configure.conf
|
||||
PREFIX = '/usr'
|
||||
LIBDIR = '/usr/lib'
|
||||
LIBEXECDIR = '/usr/libexec'
|
||||
DATADIR = '/usr/share'
|
||||
EOF
|
||||
}
|
||||
|
||||
post_extract() {
|
||||
local _f
|
||||
mkdir -p dict
|
||||
for _f in $skip_extraction; do
|
||||
bsdtar -C dict -xf "$XBPS_SRCDISTDIR/sunpinyin-$version/$_f"
|
||||
done
|
||||
ln -s ../doc/SLM-inst.mk dict/Makefile
|
||||
}
|
||||
|
||||
post_build() {
|
||||
PATH="$PATH:$wrksrc/src"
|
||||
make -C dict ${makejobs} ENDIANESS="${XBPS_TARGET_ENDIAN}"
|
||||
PKG_CONFIG_PATH="$wrksrc:/usr/lib/pkgconfig:/usr/share/pkgconfig"
|
||||
PKG_CONFIG_LIBDIR="$wrksrc:/usr/lib/pkgconfig"
|
||||
# LDFLAGS+=" -Wl,-rpath-link=$wrksrc"
|
||||
export PKG_CONFIG_PATH PKG_CONFIG_LIBDIR
|
||||
cd wrapper/ibus
|
||||
ln -s ../../libsunpinyin.so.*.* libsunpinyin.so
|
||||
do_build
|
||||
}
|
||||
|
||||
post_install() {
|
||||
PKG_CONFIG_PATH="$wrksrc:/usr/lib/pkgconfig:/usr/share/pkgconfig"
|
||||
PKG_CONFIG_LIBDIR="$wrksrc:/usr/lib/pkgconfig"
|
||||
# LDFLAGS+=" -Wl,-rpath-link=$wrksrc"
|
||||
export PKG_CONFIG_PATH PKG_CONFIG_LIBDIR
|
||||
cd wrapper/ibus
|
||||
do_install
|
||||
}
|
||||
|
||||
libsunpinyin_package() {
|
||||
short_desc+=" - libraries"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/*.so.*"
|
||||
make -C dict install \
|
||||
DESTDIR=${PKGDESTDIR} \
|
||||
ENDIANESS="${XBPS_TARGET_ENDIAN}"
|
||||
}
|
||||
}
|
||||
|
||||
libsunpinyin-devel_package() {
|
||||
short_desc+=" - development files"
|
||||
pkg_install() {
|
||||
vmove usr/include
|
||||
vmove "usr/lib/*.so"
|
||||
vmove usr/lib/pkgconfig
|
||||
}
|
||||
}
|
||||
|
||||
ibus-sunpinyin_package() {
|
||||
short_desc+=" - IBus plugin"
|
||||
pkg_install() {
|
||||
vmove usr/libexec
|
||||
vmove "usr/share/ibus*"
|
||||
vmove usr/share/locale
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue