diff --git a/dev-libs/libxo/libxo-1.6.0.recipe b/dev-libs/libxo/libxo-1.6.0.recipe new file mode 100644 index 000000000..1c776624b --- /dev/null +++ b/dev-libs/libxo/libxo-1.6.0.recipe @@ -0,0 +1,86 @@ +SUMMARY="A Library for generating Text, XML, JSON, and HTML Output" +DESCRIPTION="The libxo library allows an application to generate text, XML, \ +JSON, and HTML output using a common set of function calls. The application \ +decides at run time which output style should be produced." +HOMEPAGE="https://github.com/Juniper/libxo" +COPYRIGHT="2014 Juniper Networks, Inc." +LICENSE="BSD (2-clause)" +REVISION="1" +SOURCE_URI="https://github.com/Juniper/libxo/releases/download/$portVersion/libxo-$portVersion.tar.gz" +CHECKSUM_SHA256="9f2f276d7a5f25ff6fbfc0f38773d854c9356e7f985501627d0c0ee336c19006" +PATCHES="libxo-$portVersion.patchset" + +ARCHITECTURES="all" +SECONDARY_ARCHITECTURES="x86_gcc2 x86" + +libVersion="0.0.0" +libVersionCompat="$libVersion compat >= ${libVersion%%.*}" + +PROVIDES=" + libxo$secondaryArchSuffix = $portVersion + cmd:libxo_config = $libVersionCompat + cmd:xo = $libVersionCompat + cmd:xohtml = $libVersionCompat + cmd:xolint = $libVersionCompat + cmd:xopo = $libVersionCompat + lib:libxo$secondaryArchSuffix = $libVersionCompat + " +REQUIRES=" + haiku${secondaryArchSuffix} + lib:libcrypto$secondaryArchSuffix + lib:libintl$secondaryArchSuffix + " + +PROVIDES_devel=" + libxo${secondaryArchSuffix}_devel = $portVersion + devel:libxo$secondaryArchSuffix = $libVersionCompat + " +REQUIRES_devel=" + libxo$secondaryArchSuffix == $portVersion base + devel:libcrypto$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + " + +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel + devel:libcrypto$secondaryArchSuffix + devel:libintl$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:msgfmt + cmd:gawk + cmd:gcc$secondaryArchSuffix + cmd:libtoolize$secondaryArchSuffix + cmd:make + cmd:pkg_config$secondaryArchSuffix + cmd:sed + " + +defineDebugInfoPackage libxo$secondaryArchSuffix \ + $libDir/libxo.so.$libVersion + +BUILD() +{ + LDFLAGS="-lbsd -lnetwork" CFLAGS="-D_DEFAULT_SOURCE" runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install + + rm -rf $libDir/libxo.la + + prepareInstalledDevelLibs \ + libxo + fixPkgconfig + + packageEntries devel \ + $developDir \ + $manDir +} + +TEST() +{ + make check +} diff --git a/dev-libs/libxo/patches/libxo-1.6.0.patchset b/dev-libs/libxo/patches/libxo-1.6.0.patchset new file mode 100644 index 000000000..e3834723f --- /dev/null +++ b/dev-libs/libxo/patches/libxo-1.6.0.patchset @@ -0,0 +1,48 @@ +From 34add293e316a2b8a7104666fe764be6adcc1b8a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= +Date: Sun, 24 Oct 2021 10:54:21 +0200 +Subject: Haiku patches + + +diff --git a/libxo/libxo.c b/libxo/libxo.c +index 916a111..b794d21 100644 +--- a/libxo/libxo.c ++++ b/libxo/libxo.c +@@ -336,6 +336,8 @@ struct xo_handle_s { + #define XF_ENC_UTF8 2 /* UTF-8 */ + #define XF_ENC_LOCALE 3 /* Current locale */ + ++typedef int64_t quad_t; ++ + /* + * A place to parse printf-style format flags for each field + */ +diff --git a/libxo/xo_syslog.c b/libxo/xo_syslog.c +index 62da181..2d8212a 100644 +--- a/libxo/xo_syslog.c ++++ b/libxo/xo_syslog.c +@@ -41,7 +41,11 @@ + #include + #include + #include ++#ifdef _HAVE_SYS_SYSLOG + #include ++#else ++#include ++#endif + #include + #include + #include +@@ -58,7 +62,9 @@ + #include + #include + #include ++#ifdef _HAVE_SYS_SYSCTL + #include ++#endif + + #include "xo_config.h" + #include "xo.h" +-- +2.30.2 +