Files
haikuports/dev-libs/libutf8proc/libutf8proc2-2.4.0.2.recipe
Jerome Duval 52c38393a3 libutf8proc: restore JuliaStrings upstream.
add a pkg-config file.
2019-11-20 19:41:43 +01:00

90 lines
2.1 KiB
Bash

SUMMARY="A library for processing UTF-8 encoded Unicode strings"
DESCRIPTION="utf8proc is a small, clean C library that provides Unicode \
normalization, case-folding, and other operations for data in the UTF-8 \
encoding, supporting Unicode version 7.0."
HOMEPAGE="https://julialang.org/utf8proc/"
COPYRIGHT="2006-2019 Public Software Group
2014-2019 Steven G. Johnson, Jiahao Chen, Tony Kelman, Jonas Fonseca, \
and other contributors listed in the git history"
LICENSE="MIT"
REVISION="1"
SOURCE_URI="https://github.com/JuliaStrings/utf8proc/archive/v2.4.0.tar.gz"
CHECKSUM_SHA256="b2e5d547c1d94762a6d03a7e05cea46092aab68636460ff8648f1295e2cdfbd7"
SOURCE_FILENAME="utf8proc-2.4.0.tar.gz"
SOURCE_DIR="utf8proc-2.4.0"
PATCHES="libutf8proc2-2.4.0.patchset"
ARCHITECTURES="?x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="2.3.1"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libutf8proc2$secondaryArchSuffix = $portVersion
lib:libutf8proc$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
libutf8proc2${secondaryArchSuffix}_devel = $portVersion
devel:libutf8proc$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
libutf8proc2$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
libutf8proc${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:make
"
defineDebugInfoPackage libutf8proc2$secondaryArchSuffix \
$libDir/libutf8proc.so.$libVersion
BUILD()
{
mkdir -p build_haiku && cd build_haiku
cmake .. \
-DBUILD_SHARED_LIBS=ON \
$cmakeDirArgs
}
INSTALL()
{
cd build_haiku
make install
prepareInstalledDevelLib libutf8proc
mkdir -p $developLibDir/pkgconfig
cat > $developLibDir/pkgconfig/libutf8proc.pc << EOF
prefix=${prefix}
exec_prefix=${prefix}
libdir=${libDir}
includedir=${includeDir}
Name: libutf8proc
Description: UTF8 processing
Version: $portVersion
Libs: -L${developLibDir} -lutf8proc
Cflags: -I${includeDir} -DUTF8PROC_EXPORTS
EOF
packageEntries devel $developDir
}
TEST()
{
cd build_haiku
# make check # test cases not supported yet with cmake
}