[packages/psensor] - fix building on x32 - json-c pkgconfig and include dir names changed - disable Werror duo to use o

baggins baggins at pld-linux.org
Thu Dec 31 12:27:34 CET 2015


commit ba6485c525fbfeb5312bd2071b0150e9f2d4a9f9
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Thu Dec 31 12:26:45 2015 +0100

    - fix building on x32
    - json-c pkgconfig and include dir names changed
    - disable Werror duo to use of deprecated functions from json-c
    - rel 5

 ac.patch     | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 json-c.patch | 33 +++++++++++++++++++++++++++++++++
 psensor.spec | 15 +++++++++++++--
 x32.patch    | 26 ++++++++++++++++++++++++++
 4 files changed, 124 insertions(+), 2 deletions(-)
---
diff --git a/psensor.spec b/psensor.spec
index d0f02c8..36ab6d8 100644
--- a/psensor.spec
+++ b/psensor.spec
@@ -1,12 +1,15 @@
 Summary:	A Graphical Temperature Monitor
 Name:		psensor
 Version:	0.6.2.19
-Release:	4
+Release:	5
 License:	GPL v2
 Group:		X11/Applications
 URL:		http://wpitchoune.net/psensor
 Source0:	http://wpitchoune.net/psensor/files/%{name}-%{version}.tar.gz
 # Source0-md5:	ddc21cbb36c6c622f7b5c1c7eb277374
+Patch0:		x32.patch
+Patch1:		json-c.patch
+Patch2:		ac.patch
 BuildRequires:	GConf2-devel
 BuildRequires:	cairo-devel
 BuildRequires:	curl-devel
@@ -38,10 +41,18 @@ It is based on:
 
 %prep
 %setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
 
 %build
+%{__libtoolize}
+%{__aclocal}
+%{__autoconf}
+%{__autoheader}
+%{__automake}
 %configure
-%{__make}
+%{__make} -j1
 
 %install
 rm -rf $RPM_BUILD_ROOT
diff --git a/ac.patch b/ac.patch
new file mode 100644
index 0000000..be1e269
--- /dev/null
+++ b/ac.patch
@@ -0,0 +1,52 @@
+--- psensor-0.6.2.19/configure.ac~	2015-12-31 12:20:05.000000000 +0100
++++ psensor-0.6.2.19/configure.ac	2015-12-31 12:20:38.767654738 +0100
+@@ -4,7 +4,7 @@
+ AC_PREREQ([2.64])
+ AC_INIT([psensor], [0.6.2.19],[jeanfi at gmail.com],[psensor],[http://wpitchoune.net/psensor])
+ 
+-AM_INIT_AUTOMAKE([-Wall -Werror gnu])
++AM_INIT_AUTOMAKE([-Wall])
+ 
+ AC_CONFIG_SRCDIR([src/compat.h])
+ AC_CONFIG_HEADERS([config.h])
+@@ -15,6 +15,7 @@
+ 
+ # Checks lib build
+ AC_PROG_RANLIB
++AM_PROG_AR
+ 
+ # Checks for header files.
+ AC_PATH_X
+--- psensor-0.6.2.19/src/lib/Makefile.am~	2012-08-11 10:47:20.000000000 +0200
++++ psensor-0.6.2.19/src/lib/Makefile.am	2015-12-31 12:23:20.733150672 +0100
+@@ -13,7 +13,7 @@
+ 	p_io.h p_io.c \
+ 	url.c url.h
+ 
+-AM_CPPFLAGS = -Wall -Werror
++AM_CPPFLAGS = -Wall
+ 
+ if NVIDIA
+ libpsensor_a_SOURCES += nvidia.c
+--- psensor-0.6.2.19/src/Makefile.am~	2012-08-11 10:47:21.000000000 +0200
++++ psensor-0.6.2.19/src/Makefile.am	2015-12-31 12:23:51.160221404 +0100
+@@ -8,7 +8,7 @@
+ endif
+ endif
+ 
+-AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
++AM_CPPFLAGS = -Wno-deprecated-declarations -Wall -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
+ 	-I$(top_srcdir)/src/lib \
+ 	-I$(top_srcdir)/src/unity \
+ 	$(GTK_CFLAGS)\
+--- psensor-0.6.2.19/src/server/Makefile.am~	2012-08-11 10:47:21.000000000 +0200
++++ psensor-0.6.2.19/src/server/Makefile.am	2015-12-31 12:24:04.713734531 +0100
+@@ -1,7 +1,7 @@
+ bin_PROGRAMS =  psensor-server
+ psensor_server_SOURCES = server.c server.h
+ 
+-AM_CPPFLAGS = -Wall -Werror -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
++AM_CPPFLAGS = -Wall -DDEFAULT_WWW_DIR=\""$(pkgdatadir)/www"\"\
+ 	-I$(top_srcdir)/src \
+ 	-I$(top_srcdir)/src/lib \
+ 	$(SENSORS_CFLAGS)\
diff --git a/json-c.patch b/json-c.patch
new file mode 100644
index 0000000..560e1ac
--- /dev/null
+++ b/json-c.patch
@@ -0,0 +1,33 @@
+--- psensor-0.6.2.19/configure.ac~	2012-08-11 10:47:38.000000000 +0200
++++ psensor-0.6.2.19/configure.ac	2015-12-31 12:19:13.663175576 +0100
+@@ -125,7 +125,7 @@
+ # Check JSON, needed for remote monitoring
+ JSON_LIBS=
+ PKG_CHECK_MODULES(JSON, 
+-  json, 
++  json-c, 
+   [AC_DEFINE([HAVE_JSON],[1],[Use JSON])], 
+   [AC_MSG_WARN("Remote monitoring disabled, json missing")])
+ AM_CONDITIONAL(JSON, test -n "$JSON_LIBS")
+--- psensor-0.6.2.19/src/lib/psensor_json.h~	2012-08-11 10:47:20.000000000 +0200
++++ psensor-0.6.2.19/src/lib/psensor_json.h	2015-12-31 12:21:46.345226316 +0100
+@@ -19,7 +19,7 @@
+ #ifndef _PSENSOR_PSENSOR_JSON_H_
+ #define _PSENSOR_PSENSOR_JSON_H_
+ 
+-#include <json/json.h>
++#include <json-c/json.h>
+ 
+ #include "psensor.h"
+ 
+--- psensor-0.6.2.19/src/server/sysinfo.c~	2012-08-11 10:47:21.000000000 +0200
++++ psensor-0.6.2.19/src/server/sysinfo.c	2015-12-31 12:25:00.497806672 +0100
+@@ -21,7 +21,7 @@
+ #include <glibtop/netlist.h>
+ #include <glibtop/netload.h>
+ 
+-#include <json/json.h>
++#include <json-c/json.h>
+ 
+ #include "sysinfo.h"
+ 
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..e7b8203
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,26 @@
+--- psensor-0.6.2.19/src/lib/log.c~	2012-08-11 10:47:20.000000000 +0200
++++ psensor-0.6.2.19/src/lib/log.c	2015-12-31 12:16:32.744319007 +0100
+@@ -83,7 +83,11 @@
+ 	}
+ 
+ 	if (file && lvl <= log_level) {
++#if defined(__ILP32__)
++		fprintf(file, "[%lld] %s %s\n", tv.tv_sec, lvl_str, buffer);
++#else
+ 		fprintf(file, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
++#endif
+ 		fflush(file);
+ 	}
+ 
+@@ -93,7 +97,11 @@
+ 		else
+ 			stdf = stdout;
+ 
++#if defined(__ILP32__)
++		fprintf(stdf, "[%lld] %s %s\n", tv.tv_sec, lvl_str, buffer);
++#else
+ 		fprintf(stdf, "[%ld] %s %s\n", tv.tv_sec, lvl_str, buffer);
++#endif
+ 	}
+ }
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/psensor.git/commitdiff/ba6485c525fbfeb5312bd2071b0150e9f2d4a9f9



More information about the pld-cvs-commit mailing list