Skip to content

Commit

Permalink
Bump third-party json-c to 0.16
Browse files Browse the repository at this point in the history
Recent json-c versions solved calloc-transposed-args related warnings
which started showing in Fedora 40.

Note that the latest json-c version is 0.17 and requires cmake 3.9 or
higher for building, which complicates the CentOS 7 support.
  • Loading branch information
danrodrig authored and StykMartin committed Jan 25, 2024
1 parent 3e4eef4 commit d5d7b8a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
/third-party/zlib-1.2.13/
/third-party/autoconf-2.69.tar.gz
/third-party/autoconf-2.69/
/third-party/json-c-0.13.1.tar.gz
/third-party/json-c-0.13.1/
/third-party/json-c-0.16.tar.gz
/third-party/json-c-0.16/
/third-party/openssl-1.1.1w.tar.gz
/third-party/openssl-1.1.1w
/third-party/m4-1.4.19.tar.xz
Expand Down
2 changes: 1 addition & 1 deletion docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ versions are listed):
- intltool-0.51.0
- selinux-2.7
- curl-7.68.0
- json-c-0.13.1
- json-c-0.16
- openssl-1.1.1w


Expand Down
4 changes: 3 additions & 1 deletion restraint.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Source108: xz-5.2.4.tar.gz
Source109: sqlite-autoconf-3310100.tar.gz
Source110: intltool-0.51.0.tar.gz
Source111: libsoup-2.52.2.tar.xz
Source112: json-c-0.13.1.tar.gz
Source112: json-c-0.16.tar.gz
Source114: openssl-1.1.1w.tar.gz
Source115: autoconf-2.69.tar.gz
Source116: m4-1.4.19.tar.xz
Expand Down Expand Up @@ -111,6 +111,8 @@ BuildRequires: tar
%{?with_static:BuildRequires: meson}
# OpenSSL
%{?with_static:BuildRequires: perl(FindBin), perl(lib)}
# json-c
%{?with_static:BuildRequires: cmake}
# libselinux Requires.private
%{?with_static:BuildRequires: libsepol-static}
%if 0%{?rhel} < 8 || 0%{?centos}
Expand Down
9 changes: 5 additions & 4 deletions third-party/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ LIBSOUP = libsoup-2.52.2
OPENSSL = openssl-1.1.1w
SQLITE = sqlite-autoconf-3310100
INTLTOOL = intltool-0.51.0
LIBJSONC = json-c-0.13.1
LIBJSONC = json-c-0.16
AUTOCONF = autoconf-2.69
M4 = m4-1.4.19

Expand Down Expand Up @@ -64,9 +64,10 @@ tree/bin/autoheader: tree/bin/m4 $(AUTOCONF) $(AUTOCONF)/.patches-done
$(MAKE) -C $(AUTOCONF) install

tree/lib/pkgconfig/libjson-c.pc: tree/bin/autoheader $(LIBJSONC)
( cd $(LIBJSONC) && ./configure --prefix=$(CURDIR)/tree --enable-shared=no )
( PATH=$(CURDIR)/tree/bin:$(PATH) $(MAKE) -C $(LIBJSONC) )
$(MAKE) -C $(LIBJSONC) install
( mkdir -p $(LIBJSONC)/build && cd $(LIBJSONC)/build && cmake ../ -DCMAKE_INSTALL_PREFIX=$(CURDIR)/tree -DBUILD_SHARED_LIBS=OFF \
-DBUILD_TESTING=OFF -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_LIBDIR=lib )
( PATH=$(CURDIR)/tree/bin:$(PATH) $(MAKE) -C $(LIBJSONC)/build )
$(MAKE) -C $(LIBJSONC)/build install

tree/lib/pkgconfig/openssl.pc: $(OPENSSL)
ifeq ("$(arch)", "ppc64")
Expand Down

0 comments on commit d5d7b8a

Please sign in to comment.