mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-09 05:10:05 +02:00
htmlcxx, new recipe (#9661)
This commit is contained in:
113
dev-cpp/htmlcxx/htmlcxx-0.87.recipe
Normal file
113
dev-cpp/htmlcxx/htmlcxx-0.87.recipe
Normal file
@@ -0,0 +1,113 @@
|
||||
SUMMARY="A simple non-validating CSS 1 and HTML parser for C++"
|
||||
DESCRIPTION="htmlcxx is the name of both the library and the utility application that comes with \
|
||||
this package. Although the htmlcxx (the application) is mostly useless for programming, you can \
|
||||
use it to easily see how htmlcxx (the library) would parse your html code.
|
||||
Just install and try htmlcxx -h."
|
||||
HOMEPAGE="https://sourceforge.net/projects/htmlcxx/"
|
||||
COPYRIGHT="Davi de Castro Reis
|
||||
Robson Braga Ara˙jo"
|
||||
LICENSE="Apache v2
|
||||
GNU LGPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="$HOMEPAGE/files/v0.87/htmlcxx-0.87.tar.gz"
|
||||
CHECKSUM_SHA256="5d38f938cf4df9a298a5346af27195fffabfef9f460fc2a02233cbcfa8fc75c8"
|
||||
PATCHES="htmlcxx-$portVersion-c++17.patch"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
# On x86_gcc2 we don't want to install the commands in bin/<arch>/, but in bin/.
|
||||
commandBinDir=$binDir
|
||||
commandSuffix=$secondaryArchSuffix
|
||||
if [ "$targetArchitecture" = x86_gcc2 ]; then
|
||||
commandSuffix=
|
||||
commandBinDir=$prefix/bin
|
||||
fi
|
||||
|
||||
libVersion="3.1.0"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
libCssVersion="0.0.0"
|
||||
libCssVersionCompat="$libCssVersion compat >= ${libCssVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
htmlcxx$secondaryArchSuffix = $portVersion
|
||||
cmd:htmlcxx$commandSuffix
|
||||
lib:libhtmlcxx$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcss_parser$secondaryArchSuffix = $libCssVersionCompat
|
||||
lib:libcss_parser_pp$secondaryArchSuffix = $libCssVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_tools="
|
||||
htmlcxx${secondaryArchSuffix}_tools = $portVersion
|
||||
cmd:htmlcxx$commandSuffix
|
||||
"
|
||||
REQUIRES_tools="
|
||||
htmlcxx$secondaryArchSuffix == $portVersion
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
htmlcxx${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libhtmlcxx$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcss_parser$secondaryArchSuffix = $libCssVersionCompat
|
||||
devel:libcss_parser_pp$secondaryArchSuffix = $libCssVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
htmlcxx$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
devel:libiconv$secondaryArchSuffix
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:aclocal
|
||||
cmd:autoreconf
|
||||
cmd:flex
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:libtoolize$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:yacc
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
autoreconf -fi
|
||||
runConfigure --omit-dirs binDir ./configure \
|
||||
--bindir=$commandBinDir \
|
||||
--disable-static
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
make install
|
||||
|
||||
# remove libtool files
|
||||
rm -rf $libDir/*.la
|
||||
|
||||
# move includedir
|
||||
mkdir -p $includeDir
|
||||
mv $prefix/include/* $includeDir
|
||||
rm -rf $prefix/include
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libhtmlcxx \
|
||||
libcss_parser \
|
||||
libcss_parser_pp
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
|
||||
packageEntries tools \
|
||||
$commandBinDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
make check
|
||||
}
|
||||
26
dev-cpp/htmlcxx/patches/htmlcxx-0.87-c++17.patch
Normal file
26
dev-cpp/htmlcxx/patches/htmlcxx-0.87-c++17.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
https://sourceforge.net/p/htmlcxx/patches/8/
|
||||
|
||||
diff --color -Naur a/html/CharsetConverter.cc b/html/CharsetConverter.cc
|
||||
--- a/html/CharsetConverter.cc 2018-12-29 03:13:56.000000000 +0000
|
||||
+++ b/html/CharsetConverter.cc 2021-05-31 23:03:10.705334580 +0100
|
||||
@@ -7,7 +7,7 @@
|
||||
using namespace std;
|
||||
using namespace htmlcxx;
|
||||
|
||||
-CharsetConverter::CharsetConverter(const string &from, const string &to) throw (Exception)
|
||||
+CharsetConverter::CharsetConverter(const string &from, const string &to)
|
||||
{
|
||||
mIconvDescriptor = iconv_open(to.c_str(), from.c_str());
|
||||
if (mIconvDescriptor == (iconv_t)(-1))
|
||||
diff --color -Naur a/html/CharsetConverter.h b/html/CharsetConverter.h
|
||||
--- a/html/CharsetConverter.h 2018-12-29 03:13:56.000000000 +0000
|
||||
+++ b/html/CharsetConverter.h 2021-05-31 23:03:19.042574598 +0100
|
||||
@@ -17,7 +17,7 @@
|
||||
: std::runtime_error(arg) {}
|
||||
};
|
||||
|
||||
- CharsetConverter(const std::string &from, const std::string &to) throw (Exception);
|
||||
+ CharsetConverter(const std::string &from, const std::string &to);
|
||||
~CharsetConverter();
|
||||
|
||||
std::string convert(const std::string &input);
|
||||
Reference in New Issue
Block a user