summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD42
-rw-r--r--config22
4 files changed, 32 insertions, 53 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 1c010c2618ac..02c60853aeda 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,21 @@
+# Generated by mksrcinfo v8
+# Thu Dec 24 20:27:24 UTC 2015
pkgbase = mingw-w64-libsquish
pkgdesc = DXT compression library (mingw-w64)
- pkgver = 1.11
- pkgrel = 2
- url = http://code.google.com/p/libsquish
+ pkgver = 1.13
+ pkgrel = 1
+ url = http://sourceforge.net/projects/libsquish
arch = any
license = MIT
- makedepends = mingw-w64-gcc
- makedepends = dos2unix
+ makedepends = mingw-w64-cmake
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 = http://downloads.sourceforge.net/libsquish/libsquish-1.13.tgz
source = gcc440.patch
- sha1sums = 1fdff1ba72a002900c877baebcf0aeab9af4922b
- sha1sums = f01a5391337cc5461b3d6361b0453f1f31c6019a
+ sha1sums = 7bcdd7d0f0460a29e25dcdab8dc41a30e58bb366
sha1sums = 51bcc11eafbf79d9cde24769397c7a42f886154a
pkgname = mingw-w64-libsquish
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..200217578e54
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+pkg/
+src/
+*.tgz
+*.xz
diff --git a/PKGBUILD b/PKGBUILD
index 342651da732d..33898b56a179 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,21 @@
pkgname=mingw-w64-libsquish
-pkgver=1.11
-pkgrel=2
+pkgver=1.13
+pkgrel=1
pkgdesc="DXT compression library (mingw-w64)"
arch=(any)
-url="http://code.google.com/p/libsquish"
+url="http://sourceforge.net/projects/libsquish"
license=("MIT")
-makedepends=(mingw-w64-gcc dos2unix)
+makedepends=(mingw-w64-cmake)
depends=(mingw-w64-crt)
options=(!libtool !strip !buildflags staticlibs)
-source=("http://libsquish.googlecode.com/files/squish-$pkgver.zip"
-"config" "gcc440.patch")
-sha1sums=('1fdff1ba72a002900c877baebcf0aeab9af4922b'
- 'f01a5391337cc5461b3d6361b0453f1f31c6019a'
+source=("http://downloads.sourceforge.net/libsquish/libsquish-$pkgver.tgz"
+"gcc440.patch")
+sha1sums=('7bcdd7d0f0460a29e25dcdab8dc41a30e58bb366'
'51bcc11eafbf79d9cde24769397c7a42f886154a')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
- cd "$srcdir/squish-$pkgver"
find . -type f -exec dos2unix {} \;
patch -Np0 -i ../gcc440.patch
}
@@ -25,24 +23,24 @@ prepare() {
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
+ mkdir "build-${_arch}-shared" && pushd "build-${_arch}-shared"
+ ${_arch}-cmake -DCMAKE_BUILD_TYPE=Release ..
+ make
+ popd
+ mkdir "build-${_arch}-static" && pushd "build-${_arch}-static"
+ ${_arch}-cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ..
+ make
+ popd
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/"
+ cd "${srcdir}/build-${_arch}-shared"
+ make DESTDIR="$pkgdir" install
+ install -Dm644 libsquish.dll "$pkgdir/usr/${_arch}/bin/libsquish.dll"
+ cd "${srcdir}/build-${_arch}-static"
+ make DESTDIR="$pkgdir" install
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
deleted file mode 100644
index 16dca84c0b66..000000000000
--- a/config
+++ /dev/null
@@ -1,22 +0,0 @@
-# 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@
-