mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
net-libs/libpsl: add recipe (#2052)
Builds and works fine on all architectures, including x86_gcc2. On that arch, however, it uses libidn instead of libidn2. All tests are OK on all architectures, except x86_gcc2, where TEST actually fails to build.
This commit is contained in:
95
net-libs/libpsl/libpsl-0.19.1.recipe
Normal file
95
net-libs/libpsl/libpsl-0.19.1.recipe
Normal file
@@ -0,0 +1,95 @@
|
||||
SUMMARY="A library to handle the Public Suffix List"
|
||||
DESCRIPTION="A Public Suffix List is a collection of Top Level Domains (TLDs) \
|
||||
suffixes. libpsl can be used by browsers and other web clients to avoid \
|
||||
privacy-leaking \"supercookies\" or \"super domain\" certificates, highlight \
|
||||
parts of the domain in a user interface, and sort domain lists by site."
|
||||
HOMEPAGE="https://rockdaboot.github.io/libpsl/"
|
||||
COPYRIGHT="2014-2017 Tim Rühsen"
|
||||
LICENSE="libpsl"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/rockdaboot/libpsl/releases/download/libpsl-$portVersion/libpsl-$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="735146b51bbd3dcb6b0f87819c64bf3115f7fb9fa2e3a7fe9966e3346a8abc79"
|
||||
|
||||
ARCHITECTURES="?x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
IDNA=libidn2
|
||||
if [ "$effectiveTargetArchitecture" = x86_gcc2 ]; then
|
||||
IDNA=libidn
|
||||
fi
|
||||
|
||||
libVersion="5.2.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
libpsl$secondaryArchSuffix = $portVersion
|
||||
cmd:psl$secondaryArchSuffix = $portVersion
|
||||
cmd:psl_make_dafsa$secondaryArchSuffix = $portVersion
|
||||
lib:libpsl$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libunistring$secondaryArchSuffix
|
||||
lib:$IDNA$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
libpsl${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libpsl$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
libpsl$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
devel:libintl$secondaryArchSuffix
|
||||
devel:libunistring$secondaryArchSuffix
|
||||
devel:$IDNA$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoconf
|
||||
cmd:automake
|
||||
cmd:autoheader
|
||||
cmd:autopoint
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
cmd:python
|
||||
"
|
||||
|
||||
defineDebugInfoPackage libpsl$secondaryArchSuffix \
|
||||
"$binDir"/psl \
|
||||
"$libDir"/libpsl.so.$libVersion
|
||||
|
||||
PATCH()
|
||||
{
|
||||
sed -i -e "s/\<_UNUSED/_&/g" src/psl.c
|
||||
}
|
||||
|
||||
BUILD()
|
||||
{
|
||||
runConfigure ./configure --enable-runtime=$IDNA --enable-builtin=$IDNA
|
||||
make $jobArgs LIBS="-lnetwork"
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
install -t "$binDir" src/psl-make-dafsa
|
||||
|
||||
rm -f "$libDir"/libpsl.la
|
||||
|
||||
prepareInstalledDevelLib libpsl
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
"$developDir"
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
19
net-libs/libpsl/licenses/libpsl
Normal file
19
net-libs/libpsl/licenses/libpsl
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (C) 2014-2015 Tim Rühsen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
to deal in the Software without restriction, including without limitation
|
||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
DEALINGS IN THE SOFTWARE.
|
||||
Reference in New Issue
Block a user