mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 19:50:05 +02:00
cjson, bump version (#11561)
This commit is contained in:
@@ -1,74 +0,0 @@
|
||||
SUMMARY="Ultralightweight JSON parser in ANSI C"
|
||||
DESCRIPTION="cJSON is an ultralightweight json parser."
|
||||
HOMEPAGE="https://github.com/DaveGamble/cJSON"
|
||||
COPYRIGHT="2009-2017, Dave Gamble and cJSON contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/DaveGamble/cJSON/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="5308fd4bd90cef7aa060558514de6a1a4a0819974a26e6ed13973c5f624c24b2"
|
||||
SOURCE_DIR="cJSON-$portVersion"
|
||||
PATCHES="cjson-$portVersion-pc.patch"
|
||||
|
||||
ARCHITECTURES="all ?x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="1.7.15"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
cjson$secondaryArchSuffix = $portVersion
|
||||
lib:libcjson$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcjson_utils$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
cjson${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcjson$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcjson_utils$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
cjson$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:cmp
|
||||
"
|
||||
|
||||
defineDebugInfoPackage cjson$secondaryArchSuffix \
|
||||
$libDir/libcjson.so.$libVersion
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs . \
|
||||
-DENABLE_CJSON_UTILS=ON
|
||||
|
||||
cmake --build build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cmake --build build --target install
|
||||
|
||||
prepareInstalledDevelLib libcjson
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel $developDir $libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cmake --build build --target test
|
||||
}
|
||||
90
dev-libs/cjson/cjson-1.7.18.recipe
Normal file
90
dev-libs/cjson/cjson-1.7.18.recipe
Normal file
@@ -0,0 +1,90 @@
|
||||
SUMMARY="Ultralightweight JSON parser in ANSI C"
|
||||
DESCRIPTION="cJSON aims to be the dumbest possible parser that you can get your job done with. \
|
||||
It's a single file of C, and a single header file.
|
||||
|
||||
JSON is described best here: http://www.json.org/
|
||||
It's like XML, but fat-free. You use it to move data around, store things, or just generally \
|
||||
represent your program's state.
|
||||
|
||||
As a library, cJSON exists to take away as much legwork as it can, but not get in your way. As a \
|
||||
point of pragmatism (i.e. ignoring the truth), I'm going to say that you can use it in one of \
|
||||
two modes: Auto and Manual. Let's have a quick run-through.
|
||||
|
||||
I lifted some JSON from this page: http://www.json.org/fatfree.html That page inspired me to \
|
||||
write cJSON, which is a parser that tries to share the same philosophy as JSON itself. Simple, \
|
||||
dumb, out of the way."
|
||||
HOMEPAGE="https://github.com/DaveGamble/cJSON"
|
||||
COPYRIGHT="2009-2017 Dave Gamble and cJSON contributors"
|
||||
LICENSE="MIT"
|
||||
REVISION="1"
|
||||
SOURCE_URI="https://github.com/DaveGamble/cJSON/archive/v$portVersion.tar.gz"
|
||||
CHECKSUM_SHA256="3aa806844a03442c00769b83e99970be70fbef03735ff898f4811dd03b9f5ee5"
|
||||
SOURCE_DIR="cJSON-$portVersion"
|
||||
PATCHES="cjson-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="all !x86_gcc2"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
cjson$secondaryArchSuffix = $portVersion
|
||||
lib:libcjson$secondaryArchSuffix = $libVersionCompat
|
||||
lib:libcjson_utils$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
cjson${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libcjson$secondaryArchSuffix = $libVersionCompat
|
||||
devel:libcjson_utils$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
cjson$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
gcc_syslibs${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:gcc$secondaryArchSuffix
|
||||
cmd:make
|
||||
"
|
||||
|
||||
TEST_REQUIRES="
|
||||
cmd:cmp
|
||||
"
|
||||
|
||||
BUILD()
|
||||
{
|
||||
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release \
|
||||
$cmakeDirArgs . \
|
||||
-DENABLE_CJSON_UTILS=ON \
|
||||
-DENABLE_CJSON_TEST=OFF
|
||||
|
||||
cmake --build build $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cmake --build build --target install
|
||||
|
||||
prepareInstalledDevelLibs \
|
||||
libcjson \
|
||||
libcjson_utils
|
||||
fixPkgconfig
|
||||
|
||||
packageEntries devel \
|
||||
$developDir \
|
||||
$libDir/cmake
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cmake --build build --target test
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
diff -ur cJSON-1.7.15/library_config/libcjson_utils.pc.in cJSON-1.7.15-pc/library_config/libcjson_utils.pc.in
|
||||
--- cJSON-1.7.15/library_config/libcjson_utils.pc.in 2021-08-25 11:15:09.062390272 +0000
|
||||
+++ cJSON-1.7.15-pc/library_config/libcjson_utils.pc.in 2023-01-16 21:01:48.867958784 +0000
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
diff -ur cJSON-1.7.15/library_config/libcjson.pc.in cJSON-1.7.15-pc/library_config/libcjson.pc.in
|
||||
--- cJSON-1.7.15/library_config/libcjson.pc.in 2021-08-25 11:15:09.062390272 +0000
|
||||
+++ cJSON-1.7.15-pc/library_config/libcjson.pc.in 2023-01-16 21:01:50.018612224 +0000
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
27
dev-libs/cjson/patches/cjson-1.7.18.patchset
Normal file
27
dev-libs/cjson/patches/cjson-1.7.18.patchset
Normal file
@@ -0,0 +1,27 @@
|
||||
From bdf9e8cd7b28e864ca49ba333736ab94e00c13bf Mon Sep 17 00:00:00 2001
|
||||
From: Stian Sebastian Skjelstad <stian.skjelstad@gmail.com>
|
||||
Date: Mon, 16 Jan 2023 19:55:52 +0100
|
||||
Subject: applying patch cjson-1.7.15-pc.patch
|
||||
|
||||
|
||||
diff --git a/library_config/libcjson.pc.in b/library_config/libcjson.pc.in
|
||||
index de48fe0..01fd4ec 100644
|
||||
--- a/library_config/libcjson.pc.in
|
||||
+++ b/library_config/libcjson.pc.in
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
diff --git a/library_config/libcjson_utils.pc.in b/library_config/libcjson_utils.pc.in
|
||||
index df2b4e5..6ee2177 100644
|
||||
--- a/library_config/libcjson_utils.pc.in
|
||||
+++ b/library_config/libcjson_utils.pc.in
|
||||
@@ -1,3 +1,4 @@
|
||||
+prefix=@CMAKE_INSTALL_PREFIX@
|
||||
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
|
||||
--
|
||||
2.45.2
|
||||
|
||||
Reference in New Issue
Block a user