diff options
author | Julian Sanin | 2016-07-09 19:42:45 +0200 |
---|---|---|
committer | Julian Sanin | 2016-07-09 19:42:45 +0200 |
commit | c7f45a48cff472c995deee410a294c6f3dda3d5f (patch) | |
tree | a9c11c89f372a5de845ff6ce6dea2da4f63782ba | |
download | aur-c7f45a48cff472c995deee410a294c6f3dda3d5f.tar.gz |
Initial commit
-rw-r--r-- | .SRCINFO | 22 | ||||
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | PKGBUILD | 38 | ||||
-rw-r--r-- | disable-sse.patch | 91 |
4 files changed, 154 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..0660383abe06 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,22 @@ +# Generated by mksrcinfo v8 +# Sat Jul 9 17:23:14 UTC 2016 +pkgbase = liberasurecode + pkgdesc = Erasure Code API library written in C with pluggable Erasure Code backends + pkgver = 1.1.0 + pkgrel = 1 + url = https://github.com/openstack/liberasurecode + arch = i686 + arch = x86_64 + arch = arm + arch = armv6h + arch = armv7h + arch = aarch64 + license = BSD + makedepends = doxygen + source = https://github.com/openstack/liberasurecode/archive/v1.1.0.tar.gz + source = disable-sse.patch + md5sums = 04f9d15cd5e645392811dd5e96e68c98 + md5sums = a088b148c73df00f8aa72e3edd1e2818 + +pkgname = liberasurecode + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..625246820cf4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +pkg/ +src/ +*.tar.gz diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..0cac5ce14411 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,38 @@ +# Maintainer: Julian Sanin <sanin89julian@gmail.com> + +pkgname=liberasurecode +pkgver=1.1.0 +pkgrel=1 +pkgdesc="Erasure Code API library written in C with pluggable Erasure Code backends" +arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64') +license=('BSD') +url="https://github.com/openstack/liberasurecode" +makedepends=('doxygen') +source=("${url}/archive/v${pkgver}.tar.gz" + "disable-sse.patch") +md5sums=('04f9d15cd5e645392811dd5e96e68c98' + 'a088b148c73df00f8aa72e3edd1e2818') + +prepare() { + cd ${pkgname}-${pkgver} + patch -p1 <../disable-sse.patch +} + +build() { + cd ${pkgname}-${pkgver} + ./autogen.sh + ./configure --prefix=/usr + make +} + +check() { + cd ${pkgname}-${pkgver} + make test +} + +package() { + cd ${pkgname}-${pkgver} + mkdir -p ${pkgdir}/usr/include + make DESTDIR=${pkgdir} install + install -Dm644 COPYING ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE +} diff --git a/disable-sse.patch b/disable-sse.patch new file mode 100644 index 000000000000..bfd308c76696 --- /dev/null +++ b/disable-sse.patch @@ -0,0 +1,91 @@ +Description: Disable SSE flags + In Debian, we don't know which type of CPU the package will be run on, and if + it has support for SSE or not. Therefore, we have to disable SSE completely. + . + Note that it should be possible to have a specific build of the lib with SSE + support within a specific directory, but I haven't investigated how to do that + yet. Patches to do exactly that would be welcome! +Author: Thomas Goirand <zigo@debian.org> +Forwarded: no +Last-Update: 2014-11-14 + +--- a/configure.ac ++++ b/configure.ac +@@ -23,8 +23,6 @@ AC_PROG_CXX + AC_PROG_INSTALL + AC_PROG_MAKE_SET + +-AX_EXT() +- + ################################################################################ + # System Headers + ################################################################################ +@@ -94,68 +92,6 @@ dnl Expand the sources and objects neede + AC_SUBST(ac_aux_dir) + AC_SUBST(OBJECTS) + +-dnl Do CPUID and associated compiler flag checks +- +-SUPPORTED_FLAGS="" +-$CC - -E -mmmx </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="-mmmx" +- AC_MSG_RESULT([$CC supports -mmmx]) +-fi +-$CC - -E -msse </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse" +- AC_MSG_RESULT([$CC supports -msse]) +-fi +-$CC - -E -msse2 </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse2" +- AC_MSG_RESULT([$CC supports -msse2]) +-fi +-$CC - -E -msse3 </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse3" +- AC_MSG_RESULT([$CC supports -msse3]) +-fi +-$CC - -E -mssse3 </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mssse3" +- AC_MSG_RESULT([$CC supports -mssse3]) +-fi +-$CC - -E -msse4.1 </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.1" +- AC_MSG_RESULT([$CC supports -msse4.1]) +-fi +-$CC - -E -msse4.2 </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -msse4.2" +- AC_MSG_RESULT([$CC supports -msse4.2]) +-fi +-$CC - -E -mavx </dev/null >/dev/null 2>&1 +-if [[ $? == "0" ]]; then +- SUPPORTED_FLAGS="$SUPPORTED_FLAGS -mavx" +- AC_MSG_RESULT([$CC supports -mavx]) +-fi +- +-# Detect the SIMD features supported by both the compiler and the CPU +-SIMD_FLAGS="" +-cat get_flags_from_cpuid.c | sed "s/FLAGSFROMAUTOCONF/${SUPPORTED_FLAGS}/" | $CC -x c -g - -o get_flags_from_cpuid +-if [[ -e ./get_flags_from_cpuid ]]; then +- chmod 755 get_flags_from_cpuid; ./get_flags_from_cpuid; rm ./get_flags_from_cpuid +- if [[ -e compiler_flags ]]; then +- SIMD_FLAGS=`cat compiler_flags` +- rm -f compiler_flags +- else +- AC_MSG_WARN([Could not run the CPUID detection program]) +- fi +-else +- AC_MSG_WARN([Could not compile the CPUID detection program]) +-fi +- +-AC_MSG_RESULT([Generating with SIMD flags: $SIMD_FLAGS]) +-CFLAGS="$CFLAGS $SIMD_FLAGS" +- + # Certain code may be dependent on 32 vs. 64-bit arch, so add a + # flag for 64-bit + AC_CHECK_SIZEOF([long]) |