From 00efaa785db0abba65dedad5ed3f35c752b6de13 Mon Sep 17 00:00:00 2001 From: Ilya Tumaykin Date: Fri, 16 Sep 2016 10:56:19 +0300 Subject: [PATCH] app-i18n/enca: verbump to 1.19 Major ebuild overhaul: - EAPI=6, migrate away from deprecated eclasses; - fix 404 HOMEPAGE; - do not enable recode by default as its upstream is dead; - introduce iconv USE to avoid iconv automagic dependency; - introduce static-libs USE; - add missing gtk-doc dep for doc USE; - make build system respect doc USE; - avoid ugly cross compilation and multilib hacks by doing things right. Gentoo-Bug: https://bugs.gentoo.org/593220 Closes: https://github.com/gentoo/gentoo/pull/2340 Package-Manager: portage-2.3.0 Signed-off-by: Yixun Lan --- app-i18n/enca/Manifest | 1 + app-i18n/enca/enca-1.19.ebuild | 82 ++++++++++++++++++++++++++++++++++ 2 files changed, 83 insertions(+) create mode 100644 app-i18n/enca/enca-1.19.ebuild diff --git a/app-i18n/enca/Manifest b/app-i18n/enca/Manifest index ad9d5759e53b..1cd01ad51d23 100644 --- a/app-i18n/enca/Manifest +++ b/app-i18n/enca/Manifest @@ -1,3 +1,4 @@ DIST enca-1.13.tar.bz2 532000 SHA256 6c091455d524b3ddae3533fe9bb375092f60ad6fe252e0777c873bd7869c7432 SHA512 7c5cb7b28eea271c4c94135082c1aa3f312bf790aaa4f51c954fd87ed734fae04ec07be99b20e7dfa3a668349c17d97f1eeea1ee553f9b841e74bfafc5a5906a WHIRLPOOL 0080ce92c22c5ad8b34eea767133602d73e3ebcbcb5084794e5e5da37edceab1bba9785f3884aa5c84749be89116eecf7bc59faa0ebb7118e97411f97e97e4a8 DIST enca-1.14.tar.bz2 560982 SHA256 7f33e3953fbbdac8ed144b31bbab1bb3bf181150db6ba4cd812fd958ce5f4b58 SHA512 9d0582cc8187f3e868339c3e13ca2c654359b240dd564b64a31615aeffb0ec7ae025659576cc72f6cab73b0bfa22286060f665f2c952f8dfe702cf97a39d2245 WHIRLPOOL 921038e3c6a612b38820d7314a7afe83c231e48396cd801dcbeb3f64afe157b0b5009ada00ae59f35ee4a882c4a40f46ac3346139c99da00611b073b561cfbee DIST enca-1.18.tar.xz 453512 SHA256 019995e9324510f0667b73e88753bc496c744f93bff48bbfb114165f8875326c SHA512 4b2d91efd023b4ed964dc4ef01bbacba7dd4866e727b1e3652c283978c75687b7502be41865f6d6e251bf1c5c7de20a40b51ffeab7c5db7776a3361bab651d08 WHIRLPOOL cc0646091e6f6726057741a86315368a31c1313b2840c4c6b4bd954d8ef26d01729c422e1d181ec566b99eb9d4577400504be7cdc1deaa2d756f320719c574da +DIST enca-1.19.tar.xz 465412 SHA256 3a487eca40b41021e2e4b7a6440b97d822e6532db5464471f572ecf77295e8b8 SHA512 6678639992685180457bbef7b0da6e475071ec6935dfd672188fc242ef80b906e75eff9a206e07989893d0ef4ae5eb500f1d0bbd6b4d58146c94bb143b5fb296 WHIRLPOOL 56a4ed0027ae2f68d769f1bf3201b57127be5b7e42ca35fa2e92dd755cf0691163ec0fbc7cdee57e6a2b528b36d0471bdd1666a42224e82e1d157b4f92598c1d diff --git a/app-i18n/enca/enca-1.19.ebuild b/app-i18n/enca/enca-1.19.ebuild new file mode 100644 index 000000000000..7003cbb6c90f --- /dev/null +++ b/app-i18n/enca/enca-1.19.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +inherit autotools eutils flag-o-matic multilib-minimal toolchain-funcs + +DESCRIPTION="Detect and convert encoding of text files" +HOMEPAGE="https://cihar.com/software/enca/" +SRC_URI="https://dl.cihar.com/${PN}/${P}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x86-solaris" +IUSE="doc +iconv recode static-libs" + +RDEPEND=" + iconv? ( virtual/libiconv[${MULTILIB_USEDEP}] ) + recode? ( app-text/recode[${MULTILIB_USEDEP}] ) +" +DEPEND="${RDEPEND} + sys-devel/gettext + doc? ( dev-util/gtk-doc ) +" + +pkg_pretend() { + if tc-is-cross-compiler && use iconv; then + die "${PN} can't be cross built with iconv USE enabled. See Gentoo bug 593220." + fi +} + +src_prepare() { + default_src_prepare + + # Disable unconditional documentation build. + sed -i -e '/SUBDIRS/s/ devel-docs//g' Makefile.am || die + + eautoreconf +} + +multilib_src_configure() { + # Workaround GCC-4.8 brokenness. See Gentoo bug 501386. + if tc-is-gcc && [[ $(gcc-version) = '4.8' ]]; then + replace-flags -O[3-9] -O2 + fi + + local myeconfargs=( + --enable-external + $(use_enable doc gtk-doc) + $(use_enable static-libs static) + $(use_with iconv libiconv-prefix "${EPREFIX}/usr") + $(use_with recode librecode "${EPREFIX}/usr") + ) + + # Workaround automagic virtual/libiconv dependency. + use iconv || export am_cv_func_iconv=no + + ECONF_SOURCE="${S}" econf "${myeconfargs[@]}" +} + +multilib_src_compile() { + # Workaround cross compilation issues. See Gentoo bug 424473. + tc-is-cross-compiler && tc-env_build emake -e -C tools + + if ! multilib_is_native_abi; then + emake -C lib + else + emake + use doc && emake -C devel-docs docs + fi +} + +multilib_src_install() { + if ! multilib_is_native_abi; then + emake -C lib DESTDIR="${D}" install + else + emake DESTDIR="${D}" install + use doc && emake -C devel-docs DESTDIR="${D}" install + fi + prune_libtool_files +} -- 2.26.2