summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavorin Učakar2015-06-08 22:54:14 +0200
committerDavorin Učakar2015-06-08 22:54:14 +0200
commit83489905dc5f35ee52c064e2f6ba0c4868272add (patch)
treeade449cd6881c5d2a41bf54410b2acab2f0be3d7
downloadaur-83489905dc5f35ee52c064e2f6ba0c4868272add.tar.gz
Initial import
-rw-r--r--.SRCINFO20
-rw-r--r--LICENSE24
-rw-r--r--PKGBUILD44
-rw-r--r--config22
-rw-r--r--gcc440.patch11
5 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..0ee0897b5e6b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = libsquish
+ pkgdesc = DXT compression library
+ pkgver = 1.11
+ pkgrel = 2
+ url = http://code.google.com/p/libsquish
+ arch = i686
+ arch = x86_64
+ license = MIT
+ options = staticlibs
+ source = http://libsquish.googlecode.com/files/squish-1.11.zip
+ source = gcc440.patch
+ source = config
+ source = LICENSE
+ sha1sums = 1fdff1ba72a002900c877baebcf0aeab9af4922b
+ sha1sums = 51bcc11eafbf79d9cde24769397c7a42f886154a
+ sha1sums = db587e6251b850820d7ce6edaf8eccb180c24b99
+ sha1sums = e285c60d401f91f282de6ad6b6f549e9f5e9ff1d
+
+pkgname = libsquish
+
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000000..dd0f22eb9435
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,24 @@
+/* -----------------------------------------------------------------------------
+
+ Copyright (c) 2006 Simon Brown si@sjbrown.co.uk
+
+ Permission is hereby granted, free of charge, to any person obtaining
+ a copy of this software and associated documentation files (the
+ "Software"), to deal in the Software without restriction, including
+ without limitation the rights to use, copy, modify, merge, publish,
+ distribute, sublicense, and/or sell copies of the Software, and to
+ permit persons to whom the Software is furnished to do so, subject to
+ the following conditions:
+
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+ -------------------------------------------------------------------------- */
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..de58b5515b33
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Davorin Učakar <davorin.ucakar@gmail.com>
+
+pkgname=libsquish
+pkgver=1.11
+pkgrel=2
+pkgdesc="DXT compression library"
+arch=('i686' 'x86_64')
+url="http://code.google.com/p/libsquish"
+license=('MIT')
+options=(staticlibs)
+source=(http://libsquish.googlecode.com/files/squish-$pkgver.zip
+ gcc440.patch
+ config
+ LICENSE)
+sha1sums=('1fdff1ba72a002900c877baebcf0aeab9af4922b'
+ '51bcc11eafbf79d9cde24769397c7a42f886154a'
+ 'db587e6251b850820d7ce6edaf8eccb180c24b99'
+ 'e285c60d401f91f282de6ad6b6f549e9f5e9ff1d')
+
+prepare() {
+ cd "$srcdir/squish-$pkgver"
+ cp $srcdir/config .
+
+ patch -Np0 -i $srcdir/gcc440.patch
+}
+
+build() {
+ cd "$srcdir/squish-$pkgver"
+
+ make || return 1
+}
+
+package() {
+ cd "$srcdir/squish-$pkgver"
+
+ mkdir -p $pkgdir/usr/{include,lib}
+
+ install -Dm 644 squish.h $pkgdir/usr/include/squish.h
+ install -Dm 644 libsquish.a $pkgdir/usr/lib/libsquish.a
+
+ install -Dm 644 $srcdir/LICENSE $pkgdir/usr/share/licenses/$pkgname/LICENSE
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/config b/config
new file mode 100644
index 000000000000..715ef6492e1c
--- /dev/null
+++ b/config
@@ -0,0 +1,22 @@
+# config file used for the Makefile only
+
+# define to 1 to use Altivec instructions
+USE_ALTIVEC ?= 0
+
+# define to 1 to use SSE2 instructions
+USE_SSE ?= 1
+
+# default flags
+CXXFLAGS = -Ofast -fPIC
+ifeq ($(USE_ALTIVEC),1)
+CPPFLAGS += -DSQUISH_USE_ALTIVEC=1
+CXXFLAGS += -maltivec
+endif
+ifeq ($(USE_SSE),1)
+CPPFLAGS += -DSQUISH_USE_SSE=2
+CXXFLAGS += -msse2
+endif
+
+# where should we install to
+INSTALL_DIR ?= /usr/local
+
diff --git a/gcc440.patch b/gcc440.patch
new file mode 100644
index 000000000000..48f52242aaa3
--- /dev/null
+++ b/gcc440.patch
@@ -0,0 +1,11 @@
+--- squish.h 2009-09-02 21:25:02.586265731 +0200
++++ squish.h 2009-09-02 21:24:47.922933766 +0200
+@@ -26,6 +26,8 @@
+ #ifndef SQUISH_H
+ #define SQUISH_H
+
++#include <limits.h>
++
+ //! All squish API functions live in this namespace.
+ namespace squish {
+