diff options
author | Maxim Moseychuk | 2018-06-04 00:07:32 +0300 |
---|---|---|
committer | Maxim Moseychuk | 2018-06-04 00:07:32 +0300 |
commit | b0fe3ada0ded3fc6ba012166b8b4fbc01d4898b2 (patch) | |
tree | ccdc8e6ce69229620c29f93a95a88951fca877ac | |
parent | b12aaacc439f4d4d8c279b947f866031eb6e5bf2 (diff) | |
download | aur-b0fe3ada0ded3fc6ba012166b8b4fbc01d4898b2.tar.gz |
Fix export non-square minimaps
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731486
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 31 | ||||
-rw-r--r-- | non_square_mipmaps.patch | 23 |
3 files changed, 47 insertions, 12 deletions
@@ -1,7 +1,7 @@ pkgbase = gimp-dds pkgdesc = A plugin for the GIMP version 2.8. It allows you to load and save images in the Direct Draw Surface (DDS) format pkgver = 3.0.1 - pkgrel = 5 + pkgrel = 6 url = https://code.google.com/archive/p/gimp-dds arch = any license = GPL2 @@ -12,8 +12,9 @@ pkgbase = gimp-dds depends = pango depends = atk source = https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/gimp-dds/gimp-dds-3.0.1.tar.bz2 - md5sums = 19a0310e97b93d836beb3239fa0cbd63 + source = non_square_mipmaps.patch sha256sums = 6e53df3b8b98c55f22fa7ea2c3ed17478626c924b24c69d499f5d813c3c2788a + sha256sums = 6963e30890e668a8bd75b7d8fcff9ba160eb7306c3760459b706ff119b76bbe0 pkgname = gimp-dds @@ -2,25 +2,36 @@ # Maintainer: fshp (Maxim Moseychuk) <franchesko.salias.hudro.pedros@gmail.com> pkgname=gimp-dds pkgver=3.0.1 -pkgrel=5 +pkgrel=6 pkgdesc="A plugin for the GIMP version 2.8. It allows you to load and save images in the Direct Draw Surface (DDS) format" arch=('any') url=https://code.google.com/archive/p/gimp-dds license=('GPL2') depends=('gimp>=2.8.x' 'glib2' 'gtk2' 'pango' 'atk') makedepends=('pkg-config') -source=(https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/gimp-dds/gimp-dds-3.0.1.tar.bz2) -md5sums=('19a0310e97b93d836beb3239fa0cbd63') -sha256sums=('6e53df3b8b98c55f22fa7ea2c3ed17478626c924b24c69d499f5d813c3c2788a') +source=( + https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/gimp-dds/gimp-dds-3.0.1.tar.bz2 + non_square_mipmaps.patch) +sha256sums=( + '6e53df3b8b98c55f22fa7ea2c3ed17478626c924b24c69d499f5d813c3c2788a' + '6963e30890e668a8bd75b7d8fcff9ba160eb7306c3760459b706ff119b76bbe0') + +prepare() { + cd "$srcdir"/gimp-dds-$pkgver + + # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731486 + patch -p1 -i ../non_square_mipmaps.patch +} build() { - cd gimp-dds-$pkgver - make + cd "$srcdir"/gimp-dds-$pkgver + + make } package() { - cd "$srcdir"/gimp-dds-"$pkgver" - install -dm755 "$pkgdir"/usr/lib/gimp/2.0/plug-ins/ - cp dds "$pkgdir"/usr/lib/gimp/2.0/plug-ins - chmod 755 "$pkgdir"/usr/lib/gimp/2.0/plug-ins/dds + cd "$srcdir"/gimp-dds-"$pkgver" + install -dm755 "$pkgdir"/usr/lib/gimp/2.0/plug-ins/ + cp dds "$pkgdir"/usr/lib/gimp/2.0/plug-ins + chmod 755 "$pkgdir"/usr/lib/gimp/2.0/plug-ins/dds } diff --git a/non_square_mipmaps.patch b/non_square_mipmaps.patch new file mode 100644 index 000000000000..c239a3403764 --- /dev/null +++ b/non_square_mipmaps.patch @@ -0,0 +1,23 @@ +Description: Fix size chain for non-square mipmaps +Author: Tony Houghton <h@realh.co.uk> +Forwarded: No +Last-Update: 2016-11-20 +Index: gimp-dds-3.0.1/mipmap.c +=================================================================== +--- gimp-dds-3.0.1.orig/mipmap.c ++++ gimp-dds-3.0.1/mipmap.c +@@ -143,11 +143,11 @@ unsigned int get_volume_mipmapped_size(i + int get_next_mipmap_dimensions(int *next_w, int *next_h, + int curr_w, int curr_h) + { +- if(curr_w == 1 || curr_h == 1) ++ if(curr_w == 1 && curr_h == 1) + return(0); + +- if(next_w) *next_w = curr_w >> 1; +- if(next_h) *next_h = curr_h >> 1; ++ if(next_w) *next_w = curr_w == 1 ? 1 : curr_w >> 1; ++ if(next_h) *next_h = curr_h == 1 ? 1 : curr_h >> 1; + + return(1); + } |