Accepting request 110852 from home:rudi_m
- bump version 0.1.10, this is a bug fix release. * account for big-endian machines * GNUisms (mempcpy() and getline()) are removed * inf-loop in tseq is fixed (bug #6) * nanoseconds are preserved upon time zone conversion - add byteswap.patch to fix build for old distros - use xz compressed sources OBS-URL: https://build.opensuse.org/request/show/110852 OBS-URL: https://build.opensuse.org/package/show/utilities/dateutils?expand=0&rev=14
This commit is contained in:
parent
e58ed5525c
commit
ac22167d69
200
dateutils-0.1.10-byteswap.patch
Normal file
200
dateutils-0.1.10-byteswap.patch
Normal file
@ -0,0 +1,200 @@
|
||||
From 6b518194c2508e3118c2bb9866c8fed946da7968 Mon Sep 17 00:00:00 2001
|
||||
From: Ruediger Meier <ruediger.meier@ga-group.nl>
|
||||
Date: Fri, 23 Mar 2012 19:32:32 +0100
|
||||
Subject: [PATCH] minor, if byteswap.h is there, swap the bytes ourselves
|
||||
|
||||
Squashed commit of the following:
|
||||
|
||||
commit 2b9cee2e2b972a74c44e223d292ca9204a94160a
|
||||
Author: Ruediger Meier <ruediger.meier@ga-group.nl>
|
||||
Date: Fri Mar 23 19:21:19 2012 +0100
|
||||
|
||||
fix, unterminated #if (followup e9b87b14)
|
||||
|
||||
commit e2ffa392167b4be744e64bd49f382507ef0dde42
|
||||
Merge: 03ee571 6c912e8
|
||||
Author: Sebastian Freundt <freundt@ga-group.nl>
|
||||
Date: Fri Mar 23 17:30:45 2012 +0000
|
||||
|
||||
Merge branch 'next'
|
||||
|
||||
* next:
|
||||
cosmetics, change guard of boobs.h
|
||||
minor, if byteswap.h is there, swap the bytes ourselves
|
||||
|
||||
commit 6c912e8309347334bbd9b0e29b8e165bb8481ce1
|
||||
Merge: 03ee571 4a3c9eb
|
||||
Author: Sebastian Freundt <freundt@ga-group.nl>
|
||||
Date: Fri Mar 23 17:27:31 2012 +0000
|
||||
|
||||
Merge branch 'fix/big-endian' into next
|
||||
|
||||
* fix/big-endian:
|
||||
cosmetics, change guard of boobs.h
|
||||
minor, if byteswap.h is there, swap the bytes ourselves
|
||||
|
||||
commit 4a3c9eb8deb113eb920777a8351e2cc22c15b622
|
||||
Author: Sebastian Freundt <freundt@ga-group.nl>
|
||||
Date: Fri Mar 23 17:18:57 2012 +0000
|
||||
|
||||
cosmetics, change guard of boobs.h
|
||||
|
||||
Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
|
||||
|
||||
commit e9b87b142625340405fbbbcb4219adfba0e89678
|
||||
Author: Sebastian Freundt <freundt@ga-group.nl>
|
||||
Date: Fri Mar 23 17:18:27 2012 +0000
|
||||
|
||||
minor, if byteswap.h is there, swap the bytes ourselves
|
||||
|
||||
Signed-off-by: Sebastian Freundt <freundt@ga-group.nl>
|
||||
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
|
||||
---
|
||||
configure.ac | 2 +-
|
||||
lib/boobs.h | 41 ++++++++++++++++++++++-------------------
|
||||
2 files changed, 23 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index f57fb53..952bb6c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -39,7 +39,7 @@ AC_C_BIGENDIAN
|
||||
SXE_CHECK_CFLAGS
|
||||
|
||||
## check for byteorder utils
|
||||
-AC_CHECK_HEADERS([endian.h sys/endian.h byteorder.h arpa/inet.h netinet/in.h])
|
||||
+AC_CHECK_HEADERS([endian.h sys/endian.h byteorder.h byteswap.h])
|
||||
|
||||
## check for strptime
|
||||
AC_CHECK_FUNCS([strptime])
|
||||
diff --git a/lib/boobs.h b/lib/boobs.h
|
||||
index 8276503..a1f7349 100644
|
||||
--- a/lib/boobs.h
|
||||
+++ b/lib/boobs.h
|
||||
@@ -35,8 +35,8 @@
|
||||
*
|
||||
***/
|
||||
|
||||
-#if !defined INCLUDED_byteorder_h_
|
||||
-#define INCLUDED_byteorder_h_
|
||||
+#if !defined INCLUDED_boobs_h_
|
||||
+#define INCLUDED_boobs_h_
|
||||
|
||||
#if defined HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
@@ -46,51 +46,54 @@
|
||||
# include <endian.h>
|
||||
#elif defined HAVE_SYS_ENDIAN_H
|
||||
# include <sys/endian.h>
|
||||
-#elif defined HAVE_BYTEORDER_H
|
||||
+#elif defined HAVE_BOOBS_H
|
||||
# include <byteorder.h>
|
||||
-#elif defined HAVE_ARPA_INET_H
|
||||
-# include <arpa/inet.h>
|
||||
-#elif defined NETINET_IN_H
|
||||
-# include <netinet/in.h>
|
||||
-#else
|
||||
-/* FUCK!!! */
|
||||
-#endif /* HAVE_ENDIAN_H */
|
||||
+#endif /* ENDIAN_H || SYS/ENDIAN_H || BOOBS_H */
|
||||
+
|
||||
+/* check for byteswap to do the swapping ourselves if need be */
|
||||
+#if defined HAVE_BYTESWAP_H
|
||||
+# include <byteswap.h>
|
||||
+#endif /* BYTESWAP_H */
|
||||
|
||||
/* and even now we may be out of luck */
|
||||
#if !defined be32toh
|
||||
# if defined betoh32
|
||||
# define be32toh betoh32
|
||||
-# elif defined ntohl
|
||||
-# define be32toh ntohl
|
||||
# elif defined WORDS_BIGENDIAN || __BYTE_ORDER == __BIG_ENDIAN
|
||||
# define be32toh(x) (x)
|
||||
+# elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# define be32toh(x) __bswap_32(x)
|
||||
# endif
|
||||
#endif /* !be32toh */
|
||||
|
||||
#if !defined le32toh
|
||||
# if defined letoh32
|
||||
# define le32toh letoh32
|
||||
-# elif !defined WORDS_BIGENDIAN || __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# elif defined WORDS_BIGENDIAN || __BYTE_ORDER == __BIG_ENDIAN
|
||||
+# define le32toh(x) __bswap_32(x)
|
||||
+# elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define le32toh(x) (x)
|
||||
# endif /* letoh32 */
|
||||
#endif /* !le32toh */
|
||||
|
||||
#if !defined htobe32
|
||||
-# if defined htonl
|
||||
-# define htobe32 htonl
|
||||
-# elif defined WORDS_BIGENDIAN || __BYTE_ORDER == __BIG_ENDIAN
|
||||
+# if defined WORDS_BIGENDIAN || __BYTE_ORDER == __BIG_ENDIAN
|
||||
# define htobe32(x) (x)
|
||||
+# elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# define htobe32(x) __bswap_32(x)
|
||||
# endif
|
||||
#endif /* !be32toh */
|
||||
|
||||
#if !defined htole32
|
||||
-# if !defined WORDS_BIGENDIAN || __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+# if defined WORDS_BIGENDIAN || __BYTE_ORDER == __BIG_ENDIAN
|
||||
+# define htole32(x) __bswap_32(x)
|
||||
+# elif __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
# define htole32(x) (x)
|
||||
# endif
|
||||
-#endif /* !le32toh */
|
||||
+#endif /* !htole32 */
|
||||
|
||||
/* we could technically include byteswap.h and to the swap ourselves
|
||||
* in the missing cases. Instead we'll just leave it as is and wait
|
||||
* for bug reports. */
|
||||
|
||||
-#endif /* INCLUDED_byteorder_h_ */
|
||||
+#endif /* INCLUDED_boobs_h_ */
|
||||
--
|
||||
1.7.6.1
|
||||
|
||||
diff -rupN -x boobs.h -x configure.ac dateutils-0.1.10/configure release_obs_openSUSE_12.1/dateutils-0.1.10/configure
|
||||
--- dateutils-0.1.10/configure 2012-03-23 14:58:06.000000000 +0100
|
||||
+++ release_obs_openSUSE_12.1/dateutils-0.1.10/configure 2012-03-23 19:32:57.000000000 +0100
|
||||
@@ -9074,7 +9074,7 @@ $as_echo "${LDFLAGS}" >&6; }
|
||||
|
||||
|
||||
## check for byteorder utils
|
||||
-for ac_header in endian.h sys/endian.h byteorder.h arpa/inet.h netinet/in.h
|
||||
+for ac_header in endian.h sys/endian.h byteorder.h byteswap.h
|
||||
do :
|
||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||
diff -rupN -x boobs.h -x configure.ac dateutils-0.1.10/src/config.h.in release_obs_openSUSE_12.1/dateutils-0.1.10/src/config.h.in
|
||||
--- dateutils-0.1.10/src/config.h.in 2012-03-23 14:58:07.000000000 +0100
|
||||
+++ release_obs_openSUSE_12.1/dateutils-0.1.10/src/config.h.in 2012-03-23 19:32:59.000000000 +0100
|
||||
@@ -6,12 +6,12 @@
|
||||
/* Whether c1x anon structs work */
|
||||
#undef HAVE_ANON_STRUCTS
|
||||
|
||||
-/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
-#undef HAVE_ARPA_INET_H
|
||||
-
|
||||
/* Define to 1 if you have the <byteorder.h> header file. */
|
||||
#undef HAVE_BYTEORDER_H
|
||||
|
||||
+/* Define to 1 if you have the <byteswap.h> header file. */
|
||||
+#undef HAVE_BYTESWAP_H
|
||||
+
|
||||
/* Define to 1 if you have the <endian.h> header file. */
|
||||
#undef HAVE_ENDIAN_H
|
||||
|
||||
@@ -21,9 +21,6 @@
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#undef HAVE_MEMORY_H
|
||||
|
||||
-/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
-#undef HAVE_NETINET_IN_H
|
||||
-
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#undef HAVE_STDINT_H
|
||||
|
3
dateutils-0.1.10.tar.xz
Normal file
3
dateutils-0.1.10.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ae847549f36e74fa46f44de8f4a41685c5ac93738d5f14ee86052b81f00b42d4
|
||||
size 263292
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a1badc3207f1ab515a5f9036729f72ef0f00ec17162df51f3860e2bf3877fce0
|
||||
size 437168
|
@ -1,7 +1,17 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 23 16:04:17 UTC 2012 - sweet_f_a@gmx.de
|
||||
|
||||
- bump version 0.1.10, this is a bug fix release.
|
||||
* account for big-endian machines
|
||||
* GNUisms (mempcpy() and getline()) are removed
|
||||
* inf-loop in tseq is fixed (bug #6)
|
||||
* nanoseconds are preserved upon time zone conversion
|
||||
- add byteswap.patch to fix build for old distros
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 1 09:43:01 UTC 2012 - sweet_f_a@gmx.de
|
||||
|
||||
- bump version 0.1.9, this is a bug fix release.
|
||||
- bump version 0.1.9, this is a bug fix release.
|
||||
* The code for date addition is refactored, with it a new
|
||||
duration type is introduced, DT_MD, to capture larger month and
|
||||
day summands.
|
||||
|
@ -17,14 +17,17 @@
|
||||
#
|
||||
|
||||
Name: dateutils
|
||||
Version: 0.1.9
|
||||
Version: 0.1.10
|
||||
Release: 0
|
||||
Summary: Nifty command line date and time utilities
|
||||
License: BSD-3-Clause
|
||||
Group: Productivity/Text/Utilities
|
||||
Url: https://github.com/hroptatyr/dateutils
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
Url: https://github.com/hroptatyr/dateutils/
|
||||
Source: %{name}-%{version}.tar.xz
|
||||
# is upstream merged
|
||||
Patch1: dateutils-0.1.10-byteswap.patch
|
||||
BuildRequires: pkgconfig
|
||||
BuildRequires: xz
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
Requires(pre): info
|
||||
|
||||
@ -47,6 +50,7 @@ compiling programs using the %{name} libraries.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure --docdir=%{_docdir}/%{name}
|
||||
|
Loading…
Reference in New Issue
Block a user