From 36a460f41a8eee5aad753d78d6332e73ee23cd0d352d34544b4e26836be26d40 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 6 Aug 2014 05:22:43 +0000 Subject: [PATCH] Strip __DATE__ OBS-URL: https://build.opensuse.org/package/show/science/pari?expand=0&rev=13 --- pari-nodate.diff | 30 ++++++++++++------------------ pari.spec | 2 ++ 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/pari-nodate.diff b/pari-nodate.diff index ebbeeaa..577ecd1 100644 --- a/pari-nodate.diff +++ b/pari-nodate.diff @@ -4,23 +4,17 @@ Date: 2014-02-05 03:01:02.110857012 +0100 Kill __DATE__ from source, it's pointless and can cause rebuilds. --- - src/gp/gp.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) + src/language/paricfg.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -Index: pari-2.5.5/src/gp/gp.c +Index: pari-2.7.1/src/language/paricfg.c =================================================================== ---- pari-2.5.5.orig/src/gp/gp.c -+++ pari-2.5.5/src/gp/gp.c -@@ -823,9 +823,9 @@ print_version(void) - - center(paricfg_version); - center(paricfg_buildinfo); -- buf = stackmalloc(strlen(__DATE__) + 32 + (ver? strlen(ver): 0)); -- if (ver) (void)sprintf(buf, "compiled: %s, %s", __DATE__, ver); -- else (void)sprintf(buf, "compiled: %s", __DATE__); -+ buf = stackmalloc(strlen("yes") + 32 + (ver? strlen(ver): 0)); -+ if (ver) (void)sprintf(buf, "compiled: %s, %s", "yes", ver); -+ else (void)sprintf(buf, "compiled: %s", "yes"); - center(buf); - ver = what_readline(); - buf = stackmalloc(strlen(ver) + 64); +--- pari-2.7.1.orig/src/language/paricfg.c ++++ pari-2.7.1/src/language/paricfg.c +@@ -17,5 +17,5 @@ const char *paricfg_version = PARIVERSIO + const char *paricfg_buildinfo = PARIINFO; + const long paricfg_version_code = PARI_VERSION_CODE; + const char *paricfg_vcsversion = PARI_VCSVERSION; +-const char *paricfg_compiledate = __DATE__; ++const char *paricfg_compiledate = "openSUSE"; + const char *paricfg_mt_engine = PARI_MT_ENGINE; diff --git a/pari.spec b/pari.spec index 190f61e..ed5347e 100644 --- a/pari.spec +++ b/pari.spec @@ -30,6 +30,7 @@ Url: http://pari.math.u-bordeaux.fr/ Source: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%version.tar.gz Source2: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%version.tar.gz.asc Source3: http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-%version.changelog +Patch1: pari-nodate.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: fltk-devel BuildRequires: gmp-devel @@ -87,6 +88,7 @@ functions. %prep %setup -q +%patch -p 1 -P 1 %build ./Configure --prefix="%_prefix" \