Files
gentoo-zh/app-i18n/zh-autoconvert/zh-autoconvert-0.3.16_p10.ebuild
T
Zakk dcd5752fc6 */*: correct LICENSE declarations that did not match upstream
因为对全部软件包逐一核对上游后发现 42 个的 `LICENSE=` 与上游实际授权不符,所以按上游的授权文件与源码文件头改正,并为其中被误标为开源、实为专有的软件补上
`RESTRICT`。

最严重的一类是专有软件被标成开源:`deepin-wine-helper` 与 `deepin-wine-plugin` 的 deb 内 copyright 写着
`All rights reserved by Wuhan Deepin Technology Co., Ltd.`,`app-misc/z-library` 的 deb
control 写 `License: unknown`,`media-sound/qqmusic` 用的 `CC0-1.0` 是公共领域捐弃、与腾讯的服务协议完全相反。

`net-proxy/clash-rs` 此前只有 `LICENSE+=`、没有基底 `LICENSE=`,主程序的 Apache-2.0 完全没有声明。

`sys-kernel/xanmod-sources` 的 `LICENSE+=" CDDL"` 在 xanmod patch 与 genpatches
中都找不到依据,一并删除。

Signed-off-by: Zakk <zakk@gentoozh.org>
2026-08-02 04:20:36 +10:00

62 lines
1.9 KiB
Bash

# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
MY_PV="${PV/_p/-}"
DESCRIPTION="Chinese HZ/GB/BIG5/UNI/UTF7/UTF8 encodings auto-converter"
HOMEPAGE="https://packages.debian.org/stable/source/zh-autoconvert"
SRC_URI="
https://salsa.debian.org/chinese-team/zh-autoconvert/-/archive/debian/${MY_PV}/zh-autoconvert-debian-${MY_PV}.tar.gz
"
S="${WORKDIR}/${PN}-debian-${MY_PV}"
LICENSE="GPL-2+"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="static-libs"
PATCHES=(
"${S}/debian/patches/001-build-static-library.patch"
"${S}/debian/patches/002-chdir-before-symlink.patch"
"${S}/debian/patches/003-strip-binaries.patch"
"${S}/debian/patches/004-delete-empty-default-label-for-gcc-3.4.patch"
"${S}/debian/patches/005-move-plugins-to-usr-lib.patch"
"${S}/debian/patches/006-add-exit.patch"
"${S}/debian/patches/007-migrate-xchat-plugins-to-gtk2.patch"
"${S}/debian/patches/008-add-missing-includes.patch"
"${S}/debian/patches/009-add-placeholder-README-for-lib.patch"
"${S}/debian/patches/010-create-destination-directories-in-Makefile.patch"
"${S}/debian/patches/011-do-not-strip-binaries.patch"
"${S}/debian/patches/012-hardening.patch"
"${S}/debian/patches/013-fix-xchat-plugin-compile-warnings.patch"
"${S}/debian/patches/014-convert-comments-to-utf8.patch"
"${S}/debian/patches/015-convert-docs-to-utf8.patch"
"${S}/debian/patches/016-not-compile-xchat-plugin.patch"
"${S}/debian/patches/0017-Make-function-definition-explicit.patch"
)
src_prepare() {
default
# respect user flags
find "${S}" -name 'Makefile' -exec sed -i \
-e 's|-O2||g' \
-e 's|-g||g' \
{} +
if use !static-libs; then
# static libs .a
sed -i \
-e 's|install -m 755 lib/libhz.a $(DESTDIR)/usr/lib|# \0|' \
"${S}/Makefile" || die "Failed to remove static-libs"
fi
# install to /usr/$(get_libdir)
sed -i \
-e "s|/usr/lib|/usr/$(get_libdir)|g" \
"${S}/Makefile" || die "Failed to patch Makefile"
}