mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-23 12:10:06 +02:00
86
dev-libs/libxo/libxo-1.6.0.recipe
Normal file
86
dev-libs/libxo/libxo-1.6.0.recipe
Normal file
@@ -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
|
||||
}
|
||||
48
dev-libs/libxo/patches/libxo-1.6.0.patchset
Normal file
48
dev-libs/libxo/patches/libxo-1.6.0.patchset
Normal file
@@ -0,0 +1,48 @@
|
||||
From 34add293e316a2b8a7104666fe764be6adcc1b8a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
|
||||
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 <sys/cdefs.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
+#ifdef _HAVE_SYS_SYSLOG
|
||||
#include <sys/syslog.h>
|
||||
+#else
|
||||
+#include <syslog.h>
|
||||
+#endif
|
||||
#include <sys/uio.h>
|
||||
#include <sys/un.h>
|
||||
#include <netdb.h>
|
||||
@@ -58,7 +62,9 @@
|
||||
#include <stdarg.h>
|
||||
#include <sys/time.h>
|
||||
#include <sys/types.h>
|
||||
+#ifdef _HAVE_SYS_SYSCTL
|
||||
#include <sys/sysctl.h>
|
||||
+#endif
|
||||
|
||||
#include "xo_config.h"
|
||||
#include "xo.h"
|
||||
--
|
||||
2.30.2
|
||||
|
||||
Reference in New Issue
Block a user