porst: Add json-glib port
This commit is contained in:
Executable
+23
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash ../install.sh
|
||||
|
||||
NAME='json-c'
|
||||
VERSION='0.18-20240915'
|
||||
DOWNLOAD_URL="https://github.com/json-c/json-c/archive/refs/tags/json-c-$VERSION.tar.gz#3112c1f25d39eca661fe3fc663431e130cc6e2f900c081738317fba49d29e298"
|
||||
TAR_CONTENT="json-c-json-c-$VERSION"
|
||||
|
||||
configure() {
|
||||
cmake --fresh -B build -S . -G Ninja \
|
||||
--toolchain="$BANAN_TOOLCHAIN_DIR/Toolchain.txt" \
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DBUILD_STATIC_LIBS=OFF \
|
||||
|| exit 1
|
||||
}
|
||||
|
||||
build() {
|
||||
cmake --build build || exit 1
|
||||
}
|
||||
|
||||
install() {
|
||||
DESTDIR="$DESTDIR" cmake --install build || exit 1
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
diff -ruN json-c-0.18-20240915/CMakeLists.txt json-c-0.18-20240915-banan_os/CMakeLists.txt
|
||||
--- json-c-0.18-20240915/CMakeLists.txt 2024-09-15 19:22:45.000000000 +0300
|
||||
+++ json-c-0.18-20240915-banan_os/CMakeLists.txt 2026-03-25 02:59:13.104155305 +0200
|
||||
@@ -571,7 +571,7 @@
|
||||
set(INSTALL_PKGCONFIG_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig" CACHE PATH "Installation directory for pkgconfig (.pc) files")
|
||||
install(FILES ${PROJECT_BINARY_DIR}/json-c.pc DESTINATION "${INSTALL_PKGCONFIG_DIR}")
|
||||
|
||||
-install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR}/json-c)
|
||||
+install(FILES ${JSON_C_PUBLIC_HEADERS} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/json-c)
|
||||
|
||||
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME AND BUILD_TESTING AND
|
||||
(NOT MSVC OR NOT (MSVC_VERSION LESS 1800)) # Tests need at least VS2013
|
||||
Executable
+29
@@ -0,0 +1,29 @@
|
||||
#!/bin/bash ../install.sh
|
||||
|
||||
NAME='json-glib'
|
||||
VERSION='1.10.8'
|
||||
DOWNLOAD_URL="https://github.com/GNOME/json-glib/archive/refs/tags/$VERSION.tar.gz#7a114bdac0b2611a7207e981c37fa9b1e70d9cb642470cd9e967b135428cec52"
|
||||
DEPENDENCIES=('glib' 'json-c')
|
||||
CONFIGURE_OPTIONS=(
|
||||
'-Dprefix=/usr'
|
||||
'-Dbuildtype=release'
|
||||
'-Dintrospection=disabled'
|
||||
'-Dnls=disabled'
|
||||
'-Dtests=false'
|
||||
)
|
||||
|
||||
configure() {
|
||||
meson setup \
|
||||
--reconfigure \
|
||||
--cross-file "$MESON_CROSS_FILE" \
|
||||
"${CONFIGURE_OPTIONS[@]}" \
|
||||
build || exit 1
|
||||
}
|
||||
|
||||
build() {
|
||||
meson compile -C build || exit 1
|
||||
}
|
||||
|
||||
install() {
|
||||
meson install --destdir="$DESTDIR" -C build || exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user