From 3335fee67ab3b07d7556bbd3ec00b55cbb775266 Mon Sep 17 00:00:00 2001 From: Diego Sogari Date: Wed, 9 Mar 2016 10:54:26 -0300 Subject: [PATCH] xxhash version 0.5.1 (package release 1) --- mingw-w64-xxhash/Makefile | 69 ----------------------------- mingw-w64-xxhash/PKGBUILD | 38 ++++++++-------- mingw-w64-xxhash/xxHash-0.5.1.patch | 18 ++++++++ 3 files changed, 38 insertions(+), 87 deletions(-) delete mode 100644 mingw-w64-xxhash/Makefile create mode 100644 mingw-w64-xxhash/xxHash-0.5.1.patch diff --git a/mingw-w64-xxhash/Makefile b/mingw-w64-xxhash/Makefile deleted file mode 100644 index c30582dc3d..0000000000 --- a/mingw-w64-xxhash/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -# ################################################################ -# xxHash Makefile -# Copyright (C) Yann Collet 2012-2014 -# GPL v2 License -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# -# You can contact the author at : -# - xxHash source repository : http://code.google.com/p/xxhash/ -# ################################################################ -# xxHash.exe : benchmark program, to demonstrate xxHash speed -# ################################################################ - -CC=gcc -AR=ar -CFLAGS+= -I. -std=c99 -O3 -Wall -Wextra -Wundef -Wshadow -Wstrict-prototypes - - -# Define *.exe as extension for Windows systems -ifneq (,$(filter Windows%,$(OS))) -EXT =.exe -else -EXT = -endif - -default: xxhsum - -all: xxhash xxhsum xxhsum32 - -xxhash: - $(CC) $(CFLAGS) -c -o xxhash.o xxhash.c - $(AR) rcsv libxxhash.a xxhash.o - -xxhsum: xxhash.c bench.c - $(CC) $(CFLAGS) $^ -o $@$(EXT) - ln -sf $@ xxh32sum - ln -sf $@ xxh64sum - -xxhsum32: xxhash.c bench.c - $(CC) -m32 $(CFLAGS) $^ -o $@$(EXT) - -test: $(TEST_TARGETS) - -test: xxhsum - ./xxhsum -b bench.c - valgrind ./xxhsum -bi1 bench.c - valgrind ./xxhsum -H0 bench.c - valgrind ./xxhsum -H1 bench.c - -test-all: test xxhsum32 - ./xxhsum32 -b bench.c - -clean: - @rm -f core *.o xxhsum$(EXT) xxhsum32$(EXT) xxh32sum xxh64sum libxxhash.a - @echo cleaning completed - - diff --git a/mingw-w64-xxhash/PKGBUILD b/mingw-w64-xxhash/PKGBUILD index 2005c68a89..d36a9460f8 100644 --- a/mingw-w64-xxhash/PKGBUILD +++ b/mingw-w64-xxhash/PKGBUILD @@ -1,36 +1,38 @@ -# Maintainer: Martell Malone +# Maintainer: Diego Sogari _realname=xxhash pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" -pkgver=r40 +pkgver=0.5.1 pkgrel=1 pkgdesc="Extremely fast non-cryptographic hash algorithm (mingw-w64)" arch=('any') url="https://github.com/Cyan4973/xxHash" license=("LGPL") -replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}-svn") -makedepends=("${MINGW_PACKAGE_PREFIX}-gcc") -source=(${_realname}-${pkgver}.tar.gz::https://github.com/Cyan4973/xxHash/archive/${pkgver}.tar.gz - "Makefile") -sha256sums=('9743539ed787ea9bd5bb348265cebdd5adcbf820ad329bf44c28bc69ab4c7cd8' - '875c68d0495527e31acea79a533d1a807449bebdd172d7c74425662d5b46d337') +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-cmake") +source=("${_realname}-${pkgver}.tar.gz::https://codeload.github.com/Cyan4973/xxHash/tar.gz/v${pkgver}" + "${_realname}-${pkgver}.patch") +sha256sums=('0171af39eefa06be1e616bc43b250d13bba417e4741135ec85c1fe8dc391997d' + '6d11588390e9d5810fb4d90219fe1b9ec06baee5db7754a098eac84cc5979edf') prepare() { - cd "${srcdir}/xxHash-${pkgver}" - rm -f Makefile - cp ${srcdir}/Makefile ${srcdir}/xxHash-${pkgver}/ + cd "${srcdir}/${_realname}-${pkgver}" + patch -Np1 -i "../${_realname}-${pkgver}.patch" } build() { - cd "${srcdir}/xxHash-${pkgver}" - make xxhash + rm -rf "${srcdir}/build-${MINGW_CHOST}" + mkdir "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + + cmake "../xxHash-${pkgver}/cmake_unofficial" \ + -G"MSYS Makefiles" \ + -DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} + + make } package() { - cd "${srcdir}/xxHash-${pkgver}" - mkdir -p ${pkgdir}${MINGW_PREFIX}/include - mkdir -p ${pkgdir}${MINGW_PREFIX}/lib - mv libxxhash.a ${pkgdir}${MINGW_PREFIX}/lib - cp xxhash.h ${pkgdir}${MINGW_PREFIX}/include + cd "${srcdir}/build-${MINGW_CHOST}" + make DESTDIR="${pkgdir}" install } diff --git a/mingw-w64-xxhash/xxHash-0.5.1.patch b/mingw-w64-xxhash/xxHash-0.5.1.patch new file mode 100644 index 0000000000..413f00c14d --- /dev/null +++ b/mingw-w64-xxhash/xxHash-0.5.1.patch @@ -0,0 +1,18 @@ +diff -c -r xxHash-0.5.1.orig/cmake_unofficial/CMakeLists.txt xxHash-0.5.1/cmake_unofficial/CMakeLists.txt +*** xxHash-0.5.1.orig/cmake_unofficial/CMakeLists.txt 2016-03-01 09:22:23.000000000 -0300 +--- xxHash-0.5.1/cmake_unofficial/CMakeLists.txt 2016-02-11 08:37:24.000000000 -0200 +*************** +*** 21,24 **** + + + INSTALL(FILES ../xxhash.h DESTINATION include) +! INSTALL(TARGETS ${install_libs} DESTINATION lib) +--- 21,27 ---- + + + INSTALL(FILES ../xxhash.h DESTINATION include) +! INSTALL(TARGETS ${install_libs} +! RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin +! LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib +! ARCHIVE DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) +\ Falta o caracter nova linha no final do arquivo