summaryrefslogtreecommitdiff
path: root/app-i18n/uchardet
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-11-20 18:45:28 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-11-20 18:45:28 +0000
commit796cae72cf9ed18ba01256ac1f83a686a2a76036 (patch)
tree5ca737a2562d8c0a09fcfacd81d1f9004df37b00 /app-i18n/uchardet
parent20d8e9cfb95a9f054d654ab6405e848807186aa0 (diff)
gentoo resync : 20.11.2017
Diffstat (limited to 'app-i18n/uchardet')
-rw-r--r--app-i18n/uchardet/Manifest4
-rw-r--r--app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision.patch53
-rw-r--r--app-i18n/uchardet/uchardet-0.0.6-r1.ebuild30
-rw-r--r--app-i18n/uchardet/uchardet-9999.ebuild3
4 files changed, 88 insertions, 2 deletions
diff --git a/app-i18n/uchardet/Manifest b/app-i18n/uchardet/Manifest
index 00648d5f1755..747223ca10e6 100644
--- a/app-i18n/uchardet/Manifest
+++ b/app-i18n/uchardet/Manifest
@@ -1,4 +1,6 @@
+AUX uchardet-0.0.6-enforce-IEEE-float-precision.patch 2126 SHA256 d2101eefb023eceb431a115ad24d5fde74b11e5f005def0b3b11b76357971d47 SHA512 13384690ca74320ddb1972703b238367b07fd9aea5f3ff1b12ccbc05c9c0eadf545ab517437cac5a0dac8b16ac9399b9dfd4b8b27071dbc996637101e4e5766a WHIRLPOOL c8fd4b166bec1c9b134503b23d2ea0f40889d0b00d056026f6630d93468d52d354db831039e44e11fb043a24621fffdb1c93ac96e8c3e3c1ad94fed61ccf8e79
DIST uchardet-0.0.6.tar.xz 169192 SHA256 8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61 SHA512 eceeadae060bf277e298d709856609dde32921271140dc1fb0a33c7b6e1381033fc2960d616ebbd82c92815936864d2c0743b1b5ea1b7d4a200df87df80d6de5 WHIRLPOOL 3fa915fa768be9cb4002e0a1b84c120db017f59fd0011df36a4853c53b403d5f3839647ab7aff8d8691a43ef0ecc90714475ef6a46a85d20abbd57fba7d90a13
+EBUILD uchardet-0.0.6-r1.ebuild 779 SHA256 f8b93829f4292231c387d59123512ff3d901a429f353387fa69eff25da2b8089 SHA512 4052ebcd312b7b0bfcbc738360caf554d794c90eafbc93da405120a2a57f9a872f88c0ac079f851fb2f618a42b0466894e4574e4d9cfe0443647f63aac9b3c94 WHIRLPOOL 26a599abfeeb5f2e6c6f082b298374572ca3157414f611097c8e4afe2845faafd44354e91728c22495e328ecbd80c710988586898cb9754a9bc5853ab06d240e
EBUILD uchardet-0.0.6.ebuild 783 SHA256 5204e50aa9c8500c93b4b1dfac4f4c1d1f4b032aad621461988ce569f90c8b37 SHA512 ead9165ebd16fd687de82e8650541a7656cc03bb8ef6702edd6169d05d0781e2b381d6e447884a9aaac44b9b977b70699e7bc9a5b7a5f78b0df2bc5be1810d10 WHIRLPOOL 59e7e86a609ac00179734de390532f7f02089e89096876dd609b5078bdf77872439d86cf164a1f3a067d12ab8f27b6451e4e970bcc7882571d532ac4f371392c
-EBUILD uchardet-9999.ebuild 614 SHA256 f4f7b032ea896d4473153c5ba523bad11976f4db9612d5bf3deb748d25cc4381 SHA512 bd7ad0e7c6f2579f88cf66c49bdc5a40ae8b7d0bc0cd05d435c0ab1f844f7bb2dae2d8fa21a4e9f80921ad19a1a98d777b6751ea332291da8f22ce461b5291b9 WHIRLPOOL 950d9d4c0a4a3e7fc1c73e4f5cf3a951d9d3b43483d80ac396938b63d234f41bf89ccd3227ab17bfc8e8bf77e7c7a9179a02b9a57e45ec8d29e86f066955c41d
+EBUILD uchardet-9999.ebuild 675 SHA256 618f762d26e15608c991a6809ed7123d26725159bb9b46c96e10ac4b7298fa82 SHA512 03cc70a615cb016220dab9988d7cfbb76d9af0f176974f213108f083f3f27ea510850764435f54395b5d77e12e38ef86f685509340775f6101f51ae65dbe9abd WHIRLPOOL 735364545674a3c8c51ef894f1a005502e61b529638744332ed6a619341e3f1543b90caa233e74ff828648473338183cafddb21b34929b3172dbb82ced602e0e
MISC metadata.xml 472 SHA256 a71aa88e9a24e6e01d47776ec56baeb3170d3638ca483f0088869344b161d340 SHA512 3cc702714648db5605638ba28364caa1e0ad0be1b9fb519b434f34fa993f76ba29a9ccdef0e8dea8f4b0fd89514c7196328a1f77efbb9aece30adce5063f7536 WHIRLPOOL dd6598374a41ccdf46867e65a5c02fccab9a505e3129eb95c8ca5f74a69b6cd307c08aadae40fa26d44bf3852d69d95ca78bd3f310f1a772361ce828d7eab63b
diff --git a/app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision.patch b/app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision.patch
new file mode 100644
index 000000000000..010fe6a31407
--- /dev/null
+++ b/app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision.patch
@@ -0,0 +1,53 @@
+Add configuration option to enable SSE2.
+Add -ffloat-store flag on x86 without SSE2.
+
+Gentoo bug: https://bugs.gentoo.org/631852
+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
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 84270e3..e212b4a 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()
+@@ -35,13 +36,27 @@ 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)
+
+ if (BUILD_SHARED_LIBS)
+ option(BUILD_STATIC "Build static library" ON)
+ endif (BUILD_SHARED_LIBS)
+
++string(TOLOWER ${CMAKE_SYSTEM_PROCESSOR} TARGET_ARCHITECTURE)
++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-r1.ebuild b/app-i18n/uchardet/uchardet-0.0.6-r1.ebuild
new file mode 100644
index 000000000000..134abc5684e1
--- /dev/null
+++ b/app-i18n/uchardet/uchardet-0.0.6-r1.ebuild
@@ -0,0 +1,30 @@
+# Copyright 1999-2017 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.patch" )
+
+src_prepare() {
+ cmake-utils_src_prepare
+ use test || cmake_comment_add_subdirectory test
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DBUILD_STATIC=$(usex static-libs)
+ -DCHECK_SSE2=$(usex cpu_flags_x86_sse2)
+ )
+ cmake-utils_src_configure
+}
diff --git a/app-i18n/uchardet/uchardet-9999.ebuild b/app-i18n/uchardet/uchardet-9999.ebuild
index c268f955e469..6031e5859e4b 100644
--- a/app-i18n/uchardet/uchardet-9999.ebuild
+++ b/app-i18n/uchardet/uchardet-9999.ebuild
@@ -12,7 +12,7 @@ EGIT_REPO_URI="https://anongit.freedesktop.org/git/uchardet/uchardet.git"
LICENSE="|| ( MPL-1.1 GPL-2+ LGPL-2.1+ )"
SLOT="0"
KEYWORDS=""
-IUSE="static-libs test"
+IUSE="cpu_flags_x86_sse2 static-libs test"
src_prepare() {
cmake-utils_src_prepare
@@ -22,6 +22,7 @@ src_prepare() {
src_configure() {
local mycmakeargs=(
-DBUILD_STATIC=$(usex static-libs)
+ -DCHECK_SSE2=$(usex cpu_flags_x86_sse2)
)
cmake-utils_src_configure
}