diff options
author | Félix Piédallu | 2017-08-18 12:34:35 +0200 |
---|---|---|
committer | Félix Piédallu | 2017-08-18 12:34:35 +0200 |
commit | c3423f8518aa1aeafe2557e2d2c85021e030592d (patch) | |
tree | befc50c935916d39d18c6ed9ea732dfb5151a803 | |
parent | 22448af8f265b85e2ab3965b62b04866a11725c2 (diff) | |
download | aur-c3423f8518aa1aeafe2557e2d2c85021e030592d.tar.gz |
refactoring pkgbuild ; use patch file ; fix ref()
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 41 | ||||
-rw-r--r-- | livewallpaper.patch | 53 |
3 files changed, 80 insertions, 20 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Fri Aug 18 10:09:19 UTC 2017 +# Fri Aug 18 10:34:08 UTC 2017 pkgbase = livewallpaper pkgdesc = OpenGL powered animated wallpapers with configuration utility, autostart, and application indicator. pkgver = 0.5.0 - pkgrel = 2 + pkgrel = 3 url = https://launchpad.net/livewallpaper arch = x86_64 arch = i686 @@ -21,7 +21,9 @@ pkgbase = livewallpaper depends = python-opengl depends = glew source = https://launchpad.net/livewallpaper/0.5/0.5.0/+download/livewallpaper-0.5.0.tar.gz + source = livewallpaper.patch sha256sums = f4ce97a721015b135eb675915eb306c1fb256e680d480fe13e4fe6ca81c7e04e + sha256sums = a7e2c63c98f574fc0a64dcffd478e3ba534a7805d5416c9089a2fdf8f869c694 pkgname = livewallpaper @@ -6,7 +6,7 @@ url="https://launchpad.net/livewallpaper" license=('GPL3') pkgver=0.5.0 -pkgrel=2 +pkgrel=3 arch=('x86_64' 'i686') makedepends=('intltool' 'xcftools' 'cmake' 'vala') @@ -17,34 +17,39 @@ depends=( source=( 'https://launchpad.net/livewallpaper/0.5/0.5.0/+download/livewallpaper-0.5.0.tar.gz' + 'livewallpaper.patch' ) sha256sums=( 'f4ce97a721015b135eb675915eb306c1fb256e680d480fe13e4fe6ca81c7e04e' + 'a7e2c63c98f574fc0a64dcffd478e3ba534a7805d5416c9089a2fdf8f869c694' ) prepare() { - cd "$srcdir/$pkgname-$pkgver" - - # Add inexisting folder - sed -i '/add_subdirectory(debian)/d' CMakeLists.txt - # Disable doc generation (needs gtk-doc) - sed -i '/add_subdirectory(doc)/d' CMakeLists.txt - # Please use python3 - sed -i '1i #!/usr/bin/python3' plugins/circles/circles.py - sed -i '1i #!/usr/bin/python3' plugins/photoslide/photoslide.py - # Fix old API - sed -i -e 's/fromstring/frombytes/g' plugins/photoslide/photoslide.py - sed -i -e 's/tostring/tobytes/g' plugins/photoslide/photoslide.py + cd "${srcdir}/${pkgname}-${pkgver}" + + # Patches: + # * Please use python3 + # * Fix ref + # * Fix old API (fromstring/tostring to frombytes/tobytes) + # * CMake : remove debian dir + # * CMake : disable doc generation (needs gtk-doc) + patch -p2 -i "${srcdir}/livewallpaper.patch" } build() { - cd "$srcdir/$pkgname-$pkgver/cmake" - cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr ../ - make DESTDIR="$pkgdir/" + cd "${srcdir}/${pkgname}-${pkgver}" + rm -rf "build" + mkdir "build" + pushd "build" + + cmake -DCMAKE_INSTALL_PREFIX=/usr .. + make DESTDIR="${pkgdir}" } package() { - cd "$srcdir/$pkgname-$pkgver/cmake" - make DESTDIR="$pkgdir/" install + cd "${srcdir}/${pkgname}-${pkgver}" + pushd "build" + + make DESTDIR="${pkgdir}" install } diff --git a/livewallpaper.patch b/livewallpaper.patch new file mode 100644 index 000000000000..436b319d7fe0 --- /dev/null +++ b/livewallpaper.patch @@ -0,0 +1,53 @@ +diff --git a/livewallpaper-0.5.0/CMakeLists.txt b/livewallpaper-0.5.0/CMakeLists.txt +--- a/livewallpaper-0.5.0/CMakeLists.txt ++++ b/livewallpaper-0.5.0/CMakeLists.txt +@@ -66,10 +66,8 @@ add_subdirectory(cmake) + add_subdirectory(ui) + add_subdirectory(po) + add_subdirectory(plugins) +-add_subdirectory(doc) + add_subdirectory(tools) + +-add_subdirectory(debian) + + livewallpaper_plugin_post_install() + +diff --git a/livewallpaper-0.5.0/plugins/circles/circles.py b/livewallpaper-0.5.0/plugins/circles/circles.py +--- a/livewallpaper-0.5.0/plugins/circles/circles.py ++++ b/livewallpaper-0.5.0/plugins/circles/circles.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/python3 + # + # + # Livewallpaper +diff --git a/livewallpaper-0.5.0/plugins/photoslide/photoslide.py b/livewallpaper-0.5.0/plugins/photoslide/photoslide.py +--- a/livewallpaper-0.5.0/plugins/photoslide/photoslide.py ++++ b/livewallpaper-0.5.0/plugins/photoslide/photoslide.py +@@ -1,3 +1,4 @@ ++#!/usr/bin/python3 + # + # + # Livewallpaper Photoslide Plugins +@@ -205,8 +206,8 @@ class PhotoslidePlugin(GObject.Object, LW.Wallpaper): + if pixbuf: + width = pixbuf.get_width() + height = pixbuf.get_height() +- img = Image.fromstring("RGBA", (width, height), pixbuf.get_pixels()) +- imgarr = array.array("B", img.convert("RGBA").tostring("raw", "BGRA")) ++ img = Image.frombytes("RGBA", (width, height), pixbuf.get_pixels()) ++ imgarr = array.array("B", img.convert("RGBA").tobytes("raw", "BGRA")) + imgsurface = cairo.ImageSurface.create_for_data(imgarr, cairo.FORMAT_ARGB32, width, height, width * 4) + cr.set_source_surface(imgsurface, (self.img_width - width) / 2, (self.img_height - height) / 2) + cr.paint() +diff --git a/livewallpaper-0.5.0/ui/config/files-selector.vala b/livewallpaper-0.5.0/ui/config/files-selector.vala +--- a/livewallpaper-0.5.0/ui/config/files-selector.vala ++++ b/livewallpaper-0.5.0/ui/config/files-selector.vala +@@ -55,7 +55,7 @@ public class FilesSelector : Box { + if (ts.count_selected_rows () > 0) { + TreeIter it; + ts.get_selected (null, out it); +- model.remove (it); ++ model.remove(ref it); + value_changed (this.get_values()); + } + } |