summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchala2015-06-08 18:42:57 -0700
committerSchala2015-06-08 18:42:57 -0700
commitd5e0cd77863b65d2d5032a20e99fa1cc91749640 (patch)
treeca155e1104ae96567a2562388467f0e8c21d0d87
downloadaur-d5e0cd77863b65d2d5032a20e99fa1cc91749640.tar.gz
init
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD49
-rw-r--r--config22
-rw-r--r--gcc440.patch11
4 files changed, 105 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..1c010c2618a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+pkgbase = mingw-w64-libsquish
+ pkgdesc = DXT compression library (mingw-w64)
+ pkgver = 1.11
+ pkgrel = 2
+ url = http://code.google.com/p/libsquish
+ arch = any
+ license = MIT
+ makedepends = mingw-w64-gcc
+ makedepends = dos2unix
+ depends = mingw-w64-crt
+ options = !libtool
+ options = !strip
+ options = !buildflags
+ options = staticlibs
+ source = http://libsquish.googlecode.com/files/squish-1.11.zip
+ source = config
+ source = gcc440.patch
+ sha1sums = 1fdff1ba72a002900c877baebcf0aeab9af4922b
+ sha1sums = f01a5391337cc5461b3d6361b0453f1f31c6019a
+ sha1sums = 51bcc11eafbf79d9cde24769397c7a42f886154a
+
+pkgname = mingw-w64-libsquish
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..342651da732
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,49 @@
+pkgname=mingw-w64-libsquish
+pkgver=1.11
+pkgrel=2
+pkgdesc="DXT compression library (mingw-w64)"
+arch=(any)
+url="http://code.google.com/p/libsquish"
+license=("MIT")
+makedepends=(mingw-w64-gcc dos2unix)
+depends=(mingw-w64-crt)
+options=(!libtool !strip !buildflags staticlibs)
+source=("http://libsquish.googlecode.com/files/squish-$pkgver.zip"
+"config" "gcc440.patch")
+sha1sums=('1fdff1ba72a002900c877baebcf0aeab9af4922b'
+ 'f01a5391337cc5461b3d6361b0453f1f31c6019a'
+ '51bcc11eafbf79d9cde24769397c7a42f886154a')
+
+_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
+
+prepare() {
+ cd "$srcdir/squish-$pkgver"
+ find . -type f -exec dos2unix {} \;
+ patch -Np0 -i ../gcc440.patch
+}
+
+build() {
+ for _arch in ${_architectures}; do
+ unset LDFLAGS
+ mkdir -p "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ cp -r "${srcdir}/squish-${pkgver}/"* "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ rm config
+ cp "$srcdir/config" .
+ sed -i "s,@DESTDIR@,$pkgdir/usr/${_arch}," config
+ AR=${_arch}-ar CXX=${_arch}-g++ make
+ ${_arch}-g++ -shared *.o -o libsquish.dll -Xlinker --out-implib -Xlinker libsquish.dll.a
+ done
+}
+
+package() {
+ for _arch in ${_architectures}; do
+ cd "${srcdir}/${pkgname}-${pkgver}-build-${_arch}"
+ mkdir -p "$pkgdir/usr/${_arch}/"{include,lib}
+ make install
+ install -Dm644 libsquish.dll "$pkgdir/usr/${_arch}/bin/libsquish.dll"
+ install -m644 libsquish.dll.a "$pkgdir/usr/${_arch}/lib/"
+ find "$pkgdir/usr/${_arch}" -name '*.dll' -exec ${_arch}-strip --strip-unneeded {} \;
+ find "$pkgdir/usr/${_arch}" -name '*.a' -o -name '*.dll' | xargs ${_arch}-strip -g
+ done
+}
diff --git a/config b/config
new file mode 100644
index 00000000000..16dca84c0b6
--- /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 ?= 0
+
+# default flags
+CXXFLAGS ?= -O2
+ifeq ($(USE_ALTIVEC),1)
+CPPFLAGS += -DSQUISH_USE_ALTIVEC=1
+CXXFLAGS += -maltivec
+endif
+ifeq ($(USE_SSE),1)
+CPPFLAGS += -DSQUISH_USE_SSE=2
+CXXFLAGS += -msse
+endif
+
+# where should we install to
+INSTALL_DIR ?= @DESTDIR@
+
diff --git a/gcc440.patch b/gcc440.patch
new file mode 100644
index 00000000000..48f52242aaa
--- /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 {
+