diff --git a/libtomcrypt-big-endian.patch b/libtomcrypt-big-endian.patch deleted file mode 100644 index d5deea0..0000000 --- a/libtomcrypt-big-endian.patch +++ /dev/null @@ -1,36 +0,0 @@ -diff -up libtomcrypt-912eff4949f46c0b426d2180429a6fa4c1144f1d/src/headers/tomcrypt_cfg.h.than libtomcrypt-912eff4949f46c0b426d2180429a6fa4c1144f1d/src/headers/tomcrypt_cfg.h ---- libtomcrypt-912eff4949f46c0b426d2180429a6fa4c1144f1d/src/headers/tomcrypt_cfg.h.than 2016-01-23 13:11:30.000000000 -0500 -+++ libtomcrypt-912eff4949f46c0b426d2180429a6fa4c1144f1d/src/headers/tomcrypt_cfg.h 2016-03-09 10:16:36.520161395 -0500 -@@ -55,6 +55,23 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const - * use the portable [slower] macros. - */ - -+#if defined(__powerpc64__) -+#define ENDIAN_64BITWORD -+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ -+#define ENDIAN_BIG -+#else -+#define ENDIAN_LITTLE -+#endif -+#endif -+ -+#if defined(__s390x__) -+#define ENDIAN_64BITWORD -+#define ENDIAN_BIG -+#elif defined(__s390__) -+#define ENDIAN_32BITWORD -+#define ENDIAN_BIG -+#endif -+ - /* detect x86-32 machines somewhat */ - #if !defined(__STRICT_ANSI__) && !defined(__x86_64__) && !defined(_WIN64) && ((defined(_MSC_VER) && defined(WIN32)) || (defined(__GNUC__) && (defined(__DJGPP__) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__i386__)))) - #define ENDIAN_LITTLE -@@ -94,7 +111,7 @@ LTC_EXPORT int LTC_CALL XSTRCMP(const - /* this is the "32-bit at least" data type - * Re-define it to suit your platform but it must be at least 32-bits - */ --#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) -+#if defined(__x86_64__) || defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__)) - typedef unsigned ulong32; - #else - typedef unsigned long ulong32; diff --git a/libtomcrypt-gcc-flags.patch b/libtomcrypt-gcc-flags.patch new file mode 100644 index 0000000..ac26d60 --- /dev/null +++ b/libtomcrypt-gcc-flags.patch @@ -0,0 +1,59 @@ +--- makefile.include.old 2017-03-27 10:38:30.918322484 +0200 ++++ makefile.include 2017-03-27 10:43:24.076216593 +0200 +@@ -21,55 +21,8 @@ + MAKE:=make + endif + +- + # Compilation flags. Note the += does not write over the user's CFLAGS! +-CFLAGS += -I./testprof/ -I./src/headers/ -Wall -Wsign-compare -Wshadow -DLTC_SOURCE +- +-ifdef OLD_GCC +-CFLAGS += -W +-# older GCCs can't handle the "rotate with immediate" ROLc/RORc/etc macros +-# define this to help +-CFLAGS += -DLTC_NO_ROLC +-else +-CFLAGS += -Wextra +-# additional warnings +-CFLAGS += -Wsystem-headers -Wbad-function-cast -Wcast-align +-CFLAGS += -Wstrict-prototypes -Wpointer-arith +-CFLAGS += -Wdeclaration-after-statement +-endif +- +-CFLAGS += -Wno-type-limits +- +-ifdef LTC_DEBUG +-# compile for DEBUGGING (required for ccmalloc checking!!!) +-ifneq (,$(strip $(LTC_DEBUG))) +-CFLAGS += -g3 -DLTC_NO_ASM -DLTC_TEST_DBG=$(LTC_DEBUG) +-else +-CFLAGS += -g3 -DLTC_NO_ASM -DLTC_TEST_DBG +-endif +-else +- +-ifdef LTC_SMALL +-# optimize for SIZE +-CFLAGS += -Os -DLTC_SMALL_CODE +-else +- +-ifndef IGNORE_SPEED +-# optimize for SPEED +-CFLAGS += -O3 -funroll-loops +- +-# add -fomit-frame-pointer. hinders debugging! +-CFLAGS += -fomit-frame-pointer +-endif +- +-endif # COMPILE_SMALL +-endif # COMPILE_DEBUG +- +- +-ifneq ($(findstring clang,$(CC)),) +-CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare +-endif +- ++CFLAGS += -I./testprof/ -I./src/headers/ -DLTC_SOURCE + + HASH=hashsum + CRYPT=encrypt diff --git a/libtomcrypt.spec b/libtomcrypt.spec index 0f62413..2391af9 100644 --- a/libtomcrypt.spec +++ b/libtomcrypt.spec @@ -1,15 +1,16 @@ -%global commit0 912eff4949f46c0b426d2180429a6fa4c1144f1d +%global commit0 7532b89a6d0687f4e564f20fad256dbbdd844d2b +%global date 20170327 %global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) Name: libtomcrypt Version: 1.17 -Release: 30%{?dist} +Release: 31%{?shortcommit0:.%{date}git%{shortcommit0}}%{?dist} Summary: A comprehensive, portable cryptographic toolkit License: Public Domain URL: http://www.libtom.org/ Source0: https://github.com/libtom/%{name}/archive/%{commit0}/%{name}-%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz -Patch0: libtomcrypt-big-endian.patch +Patch0: %{name}-gcc-flags.patch BuildRequires: ghostscript BuildRequires: libtommath-devel >= 1.0 @@ -23,8 +24,6 @@ BuildRequires: tetex-dvips BuildRequires: tetex-latex %endif -#Requires: libtommath >= 1.0 - %description A comprehensive, modular and portable cryptographic toolkit that provides developers with a vast array of well known published block ciphers, one-way hash @@ -56,7 +55,7 @@ The %{name}-doc package contains documentation for use with %{name}. %prep %setup -qn %{name}-%{commit0} -%patch0 -p1 -b .endian +%patch0 # Be verbose when calling latex so we can see what's breaking sed -i -e 's|> /dev/null||g' makefile @@ -65,15 +64,11 @@ sed -i \ -e 's|\[here\]|\[ht\]|g' \ -e 's|\[here!\]|\[h!\]|g' \ -e 's|\[!here\]|\[!ht\]|g' \ - *.{pl,tex} + *.tex # Remove spurious permissions find . -name '*.c' -exec chmod 644 {} \; -# To be removed once it's fixed. See comments at: -# https://github.com/libtom/libtomcrypt/commit/14272976d0615b546e9e0215ec4e2f01854a2dc9 -sed -i -e 's/ -release $(RELEASE)//g' makefile.shared - %build export CFLAGS="%{optflags} -DLTM_DESC" make %{?_smp_mflags} LIBPATH=%{_libdir} EXTRALIBS="-ltommath" -f makefile.shared @@ -97,15 +92,11 @@ export CFLAGS="%{optflags} -DLTM_DESC -DUSE_LTM" find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete -# Remove spurious permissions -find %{buildroot} -name '*.h' -exec chmod 644 {} \; - %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files -%{!?_licensedir:%global license %%doc} %license LICENSE %{_libdir}/*.so.* @@ -118,6 +109,11 @@ find %{buildroot} -name '*.h' -exec chmod 644 {} \; %doc doc/crypt.pdf %changelog +* Mon Mar 27 2017 Simone Caronni - 1.17-31.20170327git7532b89 +- Update to latest snapshot. +- Use correct format for snapshots as per packaging guidelines. +- Use default compiler flags. + * Fri Feb 10 2017 Fedora Release Engineering - 1.17-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild