From 618424924d74043e04a7bb7609851d28db131bd3 Mon Sep 17 00:00:00 2001 From: fbrosson Date: Fri, 22 Jul 2016 06:04:12 +0000 Subject: [PATCH] uchardet: create recipe. (#452) --- .../uchardet/patches/uchardet-0.0.6.patchset | 19 +++++ dev-libs/uchardet/uchardet-0.0.6.recipe | 84 +++++++++++++++++++ 2 files changed, 103 insertions(+) create mode 100644 dev-libs/uchardet/patches/uchardet-0.0.6.patchset create mode 100644 dev-libs/uchardet/uchardet-0.0.6.recipe diff --git a/dev-libs/uchardet/patches/uchardet-0.0.6.patchset b/dev-libs/uchardet/patches/uchardet-0.0.6.patchset new file mode 100644 index 000000000..116daa0d5 --- /dev/null +++ b/dev-libs/uchardet/patches/uchardet-0.0.6.patchset @@ -0,0 +1,19 @@ +From 63d9eeb76747d6afda3f23cfb80eee99e021c973 Mon Sep 17 00:00:00 2001 +From: fbrosson +Date: Wed, 20 Jul 2016 00:02:46 +0000 +Subject: Add missing prefix and exec_prefix in uchardet.pc.in. + + +diff --git a/uchardet.pc.in b/uchardet.pc.in +index 24fdd01..9c5a4d0 100644 +--- a/uchardet.pc.in ++++ b/uchardet.pc.in +@@ -1,3 +1,5 @@ ++prefix=@CMAKE_INSTALL_PREFIX@ ++exec_prefix=${prefix} + libdir=@CMAKE_INSTALL_FULL_LIBDIR@ + includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ + +-- +2.9.2 + diff --git a/dev-libs/uchardet/uchardet-0.0.6.recipe b/dev-libs/uchardet/uchardet-0.0.6.recipe new file mode 100644 index 000000000..b5cf3f05f --- /dev/null +++ b/dev-libs/uchardet/uchardet-0.0.6.recipe @@ -0,0 +1,84 @@ +SUMMARY="An encoding detector library ported from Mozilla" +DESCRIPTION="uchardet is an encoding detector library, which takes a sequence \ +of bytes in an unknown character encoding without any additional information, \ +and attempts to determine the encoding of the text. Returned encoding names \ +are iconv-compatible. +uchardet started as a C language binding of the original C++ implementation of \ +the universal charset detection library by Mozilla. It can now detect more \ +charsets, and more reliably than the original implementation." +HOMEPAGE="https://www.freedesktop.org/wiki/Software/uchardet/" +COPYRIGHT="2015-2016 BYVoid, Jehan" +LICENSE="MPL v1.1" +REVISION="1" +SOURCE_URI="https://www.freedesktop.org/software/uchardet/releases/uchardet-$portVersion.tar.xz" +CHECKSUM_SHA256="8351328cdfbcb2432e63938721dd781eb8c11ebc56e3a89d0f84576b96002c61" +PATCHES="uchardet-$portVersion.patchset" + +ARCHITECTURES="x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +PROVIDES=" + uchardet$secondaryArchSuffix = $portVersion + lib:libuchardet$secondaryArchSuffix = $portVersion + " +if [ -z "$secondaryArchSuffix" ]; then + PROVIDES="$PROVIDES + cmd:uchardet + " +fi + +REQUIRES=" + haiku$secondaryArchSuffix + " + +PROVIDES_devel=" + uchardet${secondaryArchSuffix}_devel = $portVersion + devel:libuchardet$secondaryArchSuffix = $portVersion + " +REQUIRES_devel=" + uchardet$secondaryArchSuffix == $portVersion base + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + " +BUILD_PREREQUIRES=" + cmd:cmake + cmd:g++$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:make + " + +BUILD() +{ + cmake . \ + -DCMAKE_INSTALL_PREFIX=$prefix \ + -DCMAKE_INSTALL_BINDIR=$binDir \ + -DCMAKE_INSTALL_INCLUDEDIR=$includeDir \ + -DCMAKE_INSTALL_LIBDIR=$libDir \ + -DCMAKE_INSTALL_MANDIR=$manDir \ + -DCMAKE_BUILD_TYPE=Release + make $jobArgs +} + +INSTALL() +{ + make install + + prepareInstalledDevelLibs libuchardet + fixPkgconfig + + if [ -n "$secondaryArchSuffix" ]; then + rm -rf $binDir + rm -rf $documentationDir + fi + + # devel package + packageEntries devel \ + $developDir +} + +TEST() +{ + make test +}