summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorSchala2017-02-02 15:26:59 -0800
committerSchala2017-02-02 15:26:59 -0800
commit3bd34364fcd477206c57ea5ec8e555f25773b531 (patch)
tree4b8d091f99d067ae8e1144707fa70b0b721e66a6
parentcb50fb56a286f82a56e02ebe2fb0c46bd09947cc (diff)
downloadaur-3bd34364fcd477206c57ea5ec8e555f25773b531.tar.gz
build squishpng.exe
-rw-r--r--.SRCINFO8
-rw-r--r--.gitignore1
-rw-r--r--0001-fix-install.patch21
-rw-r--r--PKGBUILD34
4 files changed, 50 insertions, 14 deletions
diff --git a/.SRCINFO b/.SRCINFO
index eb6311ddafc..d713bb353dc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,22 +1,26 @@
# Generated by mksrcinfo v8
-# Wed Sep 28 07:42:57 UTC 2016
+# Thu Feb 2 23:26:37 UTC 2017
pkgbase = mingw-w64-libsquish
pkgdesc = DXT compression library (mingw-w64)
pkgver = 1.14
- pkgrel = 1
+ pkgrel = 2
url = http://sourceforge.net/projects/libsquish
arch = any
license = MIT
makedepends = mingw-w64-cmake
+ makedepends = mingw-w64-libpng
depends = mingw-w64-crt
+ optdepends = mingw-w64-libpng
options = !libtool
options = !strip
options = !buildflags
options = staticlibs
source = http://downloads.sourceforge.net/libsquish/libsquish-1.14.tgz
source = gcc440.patch
+ source = 0001-fix-install.patch
sha1sums = 6a395d8ffa01b201794499dd1affc8c67f92cad3
sha1sums = 51bcc11eafbf79d9cde24769397c7a42f886154a
+ sha1sums = f533643fb9c15d89a9e8f89eb5b722099b9d7aa1
pkgname = mingw-w64-libsquish
diff --git a/.gitignore b/.gitignore
index 7cf63e18388..077cd91117e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
pkg/
src/
+*.log
*.tar
*.tgz
*.xz
diff --git a/0001-fix-install.patch b/0001-fix-install.patch
new file mode 100644
index 00000000000..9b5495906a3
--- /dev/null
+++ b/0001-fix-install.patch
@@ -0,0 +1,21 @@
+--- libsquish-1.14/CMakeLists.txt.orig 2017-02-02 08:34:05.400385200 +0300
++++ libsquish-1.14/CMakeLists.txt 2017-02-02 08:36:07.932436600 +0300
+@@ -98,7 +98,17 @@
+
+ INSTALL(
+ TARGETS squish
++ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION lib
+ PUBLIC_HEADER DESTINATION include
+ )
++
++IF (BUILD_SQUISH_EXTRA)
++ IF (PNG_FOUND)
++ INSTALL(
++ TARGETS squishpng
++ DESTINATION bin
++ )
++ ENDIF (PNG_FOUND)
++ENDIF (BUILD_SQUISH_EXTRA)
+\ В конце файла нет новой строки
diff --git a/PKGBUILD b/PKGBUILD
index 4142283d923..cf31121736b 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,43 @@
pkgname=mingw-w64-libsquish
pkgver=1.14
-pkgrel=1
+pkgrel=2
pkgdesc="DXT compression library (mingw-w64)"
arch=(any)
url="http://sourceforge.net/projects/libsquish"
license=("MIT")
-makedepends=(mingw-w64-cmake)
+makedepends=(mingw-w64-cmake mingw-w64-libpng)
depends=(mingw-w64-crt)
options=(!libtool !strip !buildflags staticlibs)
+optdepends=(mingw-w64-libpng)
source=("http://downloads.sourceforge.net/libsquish/libsquish-$pkgver.tgz"
-"gcc440.patch")
+"gcc440.patch"
+"0001-fix-install.patch")
sha1sums=('6a395d8ffa01b201794499dd1affc8c67f92cad3'
- '51bcc11eafbf79d9cde24769397c7a42f886154a')
+ '51bcc11eafbf79d9cde24769397c7a42f886154a'
+ 'f533643fb9c15d89a9e8f89eb5b722099b9d7aa1')
_architectures="i686-w64-mingw32 x86_64-w64-mingw32"
prepare() {
- patch -Np0 -i ../gcc440.patch
+ patch -Np0 -i ${srcdir}/gcc440.patch
+ patch -p1 -i ${srcdir}/0001-fix-install.patch
}
build() {
for _arch in ${_architectures}; do
unset LDFLAGS
- mkdir "build-${_arch}-shared" && pushd "build-${_arch}-shared"
- ${_arch}-cmake -DCMAKE_BUILD_TYPE=Release ..
+ mkdir "build-${_arch}-static" && pushd "build-${_arch}-static"
+ ${_arch}-cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_SHARED_LIBS=OFF \
+ ..
make
popd
- mkdir "build-${_arch}-static" && pushd "build-${_arch}-static"
- ${_arch}-cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=OFF ..
+ mkdir "build-${_arch}-shared" && pushd "build-${_arch}-shared"
+ ${_arch}-cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DBUILD_SQUISH_EXTRA=ON \
+ ..
make
popd
done
@@ -35,11 +45,11 @@ build() {
package() {
for _arch in ${_architectures}; do
- cd "${srcdir}/build-${_arch}-shared"
+ cd "${srcdir}/build-${_arch}-static"
make DESTDIR="$pkgdir" install
- install -Dm644 libsquish.dll "$pkgdir/usr/${_arch}/bin/libsquish.dll"
- cd "${srcdir}/build-${_arch}-static"
+ cd "${srcdir}/build-${_arch}-shared"
make DESTDIR="$pkgdir" install
+ find "$pkgdir/usr/${_arch}" -name '*.exe' -exec ${_arch}-strip {} \;
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