summaryrefslogtreecommitdiff
path: root/app-i18n/uchardet
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-i18n/uchardet
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-i18n/uchardet')
-rw-r--r--app-i18n/uchardet/Manifest5
-rw-r--r--app-i18n/uchardet/files/uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch59
-rw-r--r--app-i18n/uchardet/metadata.xml15
-rw-r--r--app-i18n/uchardet/uchardet-0.0.6-r2.ebuild31
-rw-r--r--app-i18n/uchardet/uchardet-9999.ebuild29
5 files changed, 139 insertions, 0 deletions
diff --git a/app-i18n/uchardet/Manifest b/app-i18n/uchardet/Manifest
new file mode 100644
index 000000000000..6b103c21f985
--- /dev/null
+++ b/app-i18n/uchardet/Manifest
@@ -0,0 +1,5 @@
+AUX uchardet-0.0.6-enforce-IEEE-float-precision-r1.patch 2401 BLAKE2B 3f0cf425385d333488c7eeb37c37f3ec6a224e0a96d2c1bbcaded770c8ab6b5bd8277808fbce2bbc960cb3838e0e9de8d889ef9fe2af2e3b44ec4a81031d43f1 SHA512 fb684a362095810bb462609859018dd22987704ab9def0d0ea9ab6afc076fddcf338c622b9f587649d6f561a216b8bc234d3499c499ce3d4589113e908037972
+DIST uchardet-0.0.6.tar.xz 169192 BLAKE2B a0bc80ecd12565c1459b8136e3dc0530250571b5adbe4a7013c561f846f64f58482b9fd9cc5aa7493f20e913f59504a6e08c26571bf33ff34b4823f55d857b8c SHA512 eceeadae060bf277e298d709856609dde32921271140dc1fb0a33c7b6e1381033fc2960d616ebbd82c92815936864d2c0743b1b5ea1b7d4a200df87df80d6de5
+EBUILD uchardet-0.0.6-r2.ebuild 823 BLAKE2B d3a291c1dc983135f549fff78942472ef409dcad3db18f7e602ea555ffa1efea5472b4bc70de98822c61ea70aa4a671495eb95de1d06a6dbe15ce462d6dd2231 SHA512 17b2dab20ed3dc8176e435689d0d9624b70f68719a9f253af93209e6414a0bcc62cc6508b337006f99b55b463d6b980e00b02a380eee708291b7635c80a9a475
+EBUILD uchardet-9999.ebuild 709 BLAKE2B ee0157c9893a0f32f9a1ae4239ca45ffa55bd8f2ec65a3733b95374d32c242ad4da69979a31927942ca2eb1d75dc6be23e8acbe38645b82878a1204ea2c9d6d5 SHA512 78900bf42f2d6050df74789fac4bd03259dbf76adad2f0310e285dfc0a58bd66eff606e6f66455d688e93430544e11553130a679b7bf1ca0cab4575057ff3e46
+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/metadata.xml b/app-i18n/uchardet/metadata.xml
new file mode 100644
index 000000000000..fea82382a727
--- /dev/null
+++ b/app-i18n/uchardet/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>itumaykin+gentoo@gmail.com</email>
+ <name>Coacher</name>
+ </maintainer>
+ <maintainer type="project">
+ <email>proxy-maint@gentoo.org</email>
+ <name>Proxy Maintainers</name>
+ </maintainer>
+ <upstream>
+ <bugs-to>https://bugs.freedesktop.org/enter_bug.cgi?product=uchardet</bugs-to>
+ </upstream>
+</pkgmetadata>
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..5c0b29761a4b
--- /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 ~arm64 hppa ppc ppc64 sparc 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
+}
diff --git a/app-i18n/uchardet/uchardet-9999.ebuild b/app-i18n/uchardet/uchardet-9999.ebuild
new file mode 100644
index 000000000000..d694e455f2fe
--- /dev/null
+++ b/app-i18n/uchardet/uchardet-9999.ebuild
@@ -0,0 +1,29 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils git-r3
+
+DESCRIPTION="An encoding detector library"
+HOMEPAGE="https://www.freedesktop.org/wiki/Software/uchardet/"
+EGIT_REPO_URI="https://anongit.freedesktop.org/git/uchardet/uchardet.git"
+
+LICENSE="|| ( MPL-1.1 GPL-2+ LGPL-2.1+ )"
+SLOT="0"
+KEYWORDS=""
+IUSE="cpu_flags_x86_sse2 static-libs test"
+
+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
+}