summaryrefslogtreecommitdiff
path: root/app-i18n/uchardet
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-01-26 15:48:02 +0000
committerV3n3RiX <venerix@redcorelinux.org>2018-01-26 15:48:02 +0000
commit38b7258d086dd5e263c3bbe3880c8c956676bc71 (patch)
tree6fce284d5bfddaf597a490ac66069d16c6a485db /app-i18n/uchardet
parent0ebf740b9c9bc7c10ac41bea315ecc6c01c79166 (diff)
gentoo resync : 25.01.2018
Diffstat (limited to 'app-i18n/uchardet')
-rw-r--r--app-i18n/uchardet/Manifest2
-rw-r--r--app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch59
-rw-r--r--app-i18n/uchardet/uchardet-0.0.6-r2.ebuild31
3 files changed, 92 insertions, 0 deletions
diff --git a/app-i18n/uchardet/Manifest b/app-i18n/uchardet/Manifest
index 863c5bb96280..5c633a477cba 100644
--- a/app-i18n/uchardet/Manifest
+++ b/app-i18n/uchardet/Manifest
@@ -1,6 +1,8 @@
+AUX uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch 2401 BLAKE2B 3f0cf425385d333488c7eeb37c37f3ec6a224e0a96d2c1bbcaded770c8ab6b5bd8277808fbce2bbc960cb3838e0e9de8d889ef9fe2af2e3b44ec4a81031d43f1 SHA512 fb684a362095810bb462609859018dd22987704ab9def0d0ea9ab6afc076fddcf338c622b9f587649d6f561a216b8bc234d3499c499ce3d4589113e908037972
AUX uchardet-0.0.6-enforce-IEEE-float-precision.patch 2126 BLAKE2B d21617c868050dae26328529d14d4a0ebff4c3662f5844d6b3d237d2ba7cd86c804f52709746487b0e56e448c32ae257562a93fd5f546abc4bc1dcfcc27c023e SHA512 13384690ca74320ddb1972703b238367b07fd9aea5f3ff1b12ccbc05c9c0eadf545ab517437cac5a0dac8b16ac9399b9dfd4b8b27071dbc996637101e4e5766a
DIST uchardet-0.0.6.tar.xz 169192 BLAKE2B a0bc80ecd12565c1459b8136e3dc0530250571b5adbe4a7013c561f846f64f58482b9fd9cc5aa7493f20e913f59504a6e08c26571bf33ff34b4823f55d857b8c SHA512 eceeadae060bf277e298d709856609dde32921271140dc1fb0a33c7b6e1381033fc2960d616ebbd82c92815936864d2c0743b1b5ea1b7d4a200df87df80d6de5
EBUILD uchardet-0.0.6-r1.ebuild 776 BLAKE2B 699f07cb86619bf0936e2dc3386ed0bb67441800d9ec5ded75979db482e19f9b9be0de8b524bd727503ebdb726b6881f5eb7e0036b8c33afc327198117e9aa4d SHA512 284034bb4e4a3187444d8c1154cf2baf5cd5cf59b6bff01d4262236b7ecb5d76e710c1b7494ab02860b80df68710472ef005e3bc6275b83d5a94edc658d83b8b
+EBUILD uchardet-0.0.6-r2.ebuild 812 BLAKE2B 2bf8702803c194a125d348928ee8a772b52d89280caa07730c1b4b72de914ac75fa704d2fa7608081dc7a738979aac95d9068c7236321b1e844bea35a28e038b SHA512 e453c18c1aaa8c8b61b35718911abe489559df4780b091288a830f4da9ee714fb69c9542408e39d5d9d5d9917e6650eee68192510f7196a24f180f39fcedb0f1
EBUILD uchardet-0.0.6.ebuild 783 BLAKE2B 947e2267fe823edcf3f1f905257a0f89b38761faabfc71adf62e2c3359d8e7f8ffbd1b911387261567f010b2d3fe35c427beed2ae828657619872cfb7685e72c SHA512 ead9165ebd16fd687de82e8650541a7656cc03bb8ef6702edd6169d05d0781e2b381d6e447884a9aaac44b9b977b70699e7bc9a5b7a5f78b0df2bc5be1810d10
EBUILD uchardet-9999.ebuild 675 BLAKE2B d0c43896bf44a7600447060eb482d1a75e9f139726adfbfc28a8725c2b7c8785b9f0c938701ffdd9fe174dfc8f904b21f09b8f323ffa1627acfac2478e57b818 SHA512 03cc70a615cb016220dab9988d7cfbb76d9af0f176974f213108f083f3f27ea510850764435f54395b5d77e12e38ef86f685509340775f6101f51ae65dbe9abd
MISC metadata.xml 472 BLAKE2B d9ef3c52d66ba665481312bd5f99c8be7ada8ea593c851d103451b388c3d37972762a33c9f7d2552ace1dfcaed4bf907145985c081eef0ffd29ffdb6d1c26108 SHA512 3cc702714648db5605638ba28364caa1e0ad0be1b9fb519b434f34fa993f76ba29a9ccdef0e8dea8f4b0fd89514c7196328a1f77efbb9aece30adce5063f7536
diff --git a/app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch b/app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch
new file mode 100644
index 000000000000..2bc4977a5f00
--- /dev/null
+++ b/app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch
@@ -0,0 +1,59 @@
+Add configuration option to enable SSE2.
+Add -ffloat-store flag on x86 without SSE2.
+
+Gentoo bug: https://bugs.gentoo.org/631852
+Gentoo bug: https://bugs.gentoo.org/641716
+Upstream bug: https://bugs.freedesktop.org/show_bug.cgi?id=101033
+
+This patch is an aggregation of the following upstream commits:
+5996bbd995aed5045cc22e4d1fab08c989377983
+77bf71ea365a19ac55c59cf10399b566a02d82c1
+939482ab2b5a6585bdd2e5251f3f2f113d64686f
+cd617d181de03a7a13c2020e6c73cd14585e24b6
+f136d434f0809e064ac195b5bc4e0b50484a474c
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e9a699e..d140a24 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,5 +1,6 @@
+ ######## Project settings
+ cmake_minimum_required(VERSION 2.8.5)
++include(CheckCCompilerFlag)
+ set (PACKAGE_NAME uchardet)
+ project (${PACKAGE_NAME} CXX C)
+ enable_testing()
+@@ -33,13 +34,31 @@ include(GNUInstallDirs)
+
+ ######## Configuration
+
+-option(BUILD_BINARY "Build executable" ON)
+-option(BUILD_SHARED_LIBS "Build shared library and link executable to it" ON)
++option(BUILD_BINARY "Build the CLI tool." ON)
++option(BUILD_SHARED_LIBS "Build shared library and link executable to it." ON)
++option(CHECK_SSE2 "Check and enable SSE2 extensions if supported. Disabling SSE on platforms which support it may decrease performances." ON)
++set(TARGET_ARCHITECTURE "" CACHE STRING "Target CPU architecture. It is autodetected if not specified.")
+
+ if (BUILD_SHARED_LIBS)
+ option(BUILD_STATIC "Build static library" ON)
+ endif (BUILD_SHARED_LIBS)
+
++if (TARGET_ARCHITECTURE STREQUAL "")
++ string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)
++endif (TARGET_ARCHITECTURE STREQUAL "")
++
++if (TARGET_ARCHITECTURE MATCHES ".*(x86)|(amd).*")
++ CHECK_C_COMPILER_FLAG(-msse2 SUPPORTS_CFLAG_SSE2)
++ CHECK_C_COMPILER_FLAG(-mfpmath=sse SUPPORTS_CFLAG_SSE_MATH)
++ if (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse2 -mfpmath=sse")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
++ else (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
++ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -ffloat-store")
++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ffloat-store")
++ endif (CHECK_SSE2 AND SUPPORTS_CFLAG_SSE2 AND SUPPORTS_CFLAG_SSE_MATH)
++endif (TARGET_ARCHITECTURE MATCHES ".*(x86)|(amd).*")
++
+ configure_file(
+ uchardet.pc.in
+ uchardet.pc
diff --git a/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild b/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild
new file mode 100644
index 000000000000..72c9db158092
--- /dev/null
+++ b/app-i18n/uchardet/uchardet-0.0.6-r2.ebuild
@@ -0,0 +1,31 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils
+
+DESCRIPTION="An encoding detector library"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/uchardet/"
+SRC_URI="https://www.freedesktop.org/software/uchardet/releases/${P}.tar.xz"
+
+LICENSE="|| ( MPL-1.1 GPL-2+ LGPL-2.1+ )"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~arm ~hppa ppc ppc64 x86"
+IUSE="cpu_flags_x86_sse2 static-libs test"
+
+PATCHES=( "${FILESDIR}/${P}-enforce-IEEE-float-precision-r1.patch" )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ use test || cmake_comment_add_subdirectory test
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DTARGET_ARCHITECTURE="${ARCH}"
+ -DBUILD_STATIC=$(usex static-libs)
+ -DCHECK_SSE2=$(usex cpu_flags_x86_sse2)
+ )
+ cmake-utils_src_configure
+}