diff options
author | Jiří Klimeš | 2017-08-21 15:34:09 +0200 |
---|---|---|
committer | Jiří Klimeš | 2017-09-05 11:15:48 +0200 |
commit | 9598eba7faf9cbb0f2029556eb98a18b0d1a741b (patch) | |
tree | ad92491d324219b4d8bf435d992cd550b9b6aacb | |
parent | 2d0e1890c0e8a44b8e0a6299bb6c07830b87b01a (diff) | |
download | aur-9598eba7faf9cbb0f2029556eb98a18b0d1a741b.tar.gz |
Fix libim package and also build Lua bindings as split packages
- build Lua bindings for Lua 5.3, 5.2 and 5.1 as separate packages
- create symbolic links required for lua modules to work properly
- move extracting command to prepare()
- adjust dependencies
-rw-r--r-- | .SRCINFO | 32 | ||||
-rw-r--r-- | LICENSE | 22 | ||||
-rw-r--r-- | PKGBUILD | 106 |
3 files changed, 106 insertions, 54 deletions
@@ -1,24 +1,34 @@ pkgbase = libim - pkgdesc = Toolkit for Digital Imaging + pkgdesc = Toolkit for digital imaging pkgver = 3.12 - pkgrel = 5 + pkgrel = 6 url = http://www.tecgraf.puc-rio.br/im/ arch = i686 arch = x86_64 - license = custom - depends = gcc-libs - depends = zlib - depends = libpng - optdepends = lua51: bindings for Lua are available - optdepends = fftw: for fft support + license = MIT + makedepends = lua + makedepends = lua51 + makedepends = lua52 noextract = im-3.12_Sources.tar.gz - options = staticlibs source = http://downloads.sourceforge.net/project/imtoolkit/3.12/Docs%20and%20Sources/im-3.12_Sources.tar.gz source = http://downloads.sourceforge.net/project/imtoolkit/3.12/Docs%20and%20Sources/im-3.12_Docs.pdf - source = LICENSE md5sums = 50d6a03bb1e73fcc62633f2535494733 md5sums = 4e5ba38f84cb7a107110318764707d87 - md5sums = 214b5ab19962418fa755a45b35504219 pkgname = libim + pkgdesc = Imaging toolkit library + depends = zlib + depends = libpng + +pkgname = lua-im + pkgdesc = Lua (5.3) bindings for IM toolkit + depends = libim + +pkgname = lua51-im + pkgdesc = Lua (5.1) bindings for IM toolkit + depends = libim + +pkgname = lua52-im + pkgdesc = Lua (5.2) bindings for IM toolkit + depends = libim diff --git a/LICENSE b/LICENSE deleted file mode 100644 index b3be89a849fc..000000000000 --- a/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -**************************************************************************** -Copyright (C) 1994-2010 Tecgraf, PUC-Rio. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -**************************************************************************** @@ -1,43 +1,107 @@ -# Original contributor: Karro <karolina.lindqvist@kramnet.se> -# -# Maintainer: Stefan Husmann <stefan-husmann@t-online.de> +# Maintainer: Jiří Klimeš <blueowl@centrum.cz> +# Contributor: Stefan Husmann <stefan-husmann@t-online.de> # Contributor: SneakySnake <radiantstatue@gmail.com> +# Contributor: Karro <karolina.lindqvist@kramnet.se> -pkgname=libim +pkgbase=libim +pkgname=('libim' 'lua-im' 'lua51-im' 'lua52-im') pkgver=3.12 -pkgrel=5 -pkgdesc="Toolkit for Digital Imaging" +pkgrel=6 +pkgdesc="Toolkit for digital imaging" arch=('i686' 'x86_64') url="http://www.tecgraf.puc-rio.br/im/" -depends=('gcc-libs' 'zlib' 'libpng') -optdepends=('lua51: bindings for Lua are available' - 'fftw: for fft support') -license=('custom') +makedepends=('lua' 'lua51' 'lua52') +license=('MIT') source=( "http://downloads.sourceforge.net/project/imtoolkit/${pkgver}/Docs%20and%20Sources/im-${pkgver}_Sources.tar.gz" "http://downloads.sourceforge.net/project/imtoolkit/${pkgver}/Docs%20and%20Sources/im-${pkgver}_Docs.pdf" - LICENSE ) md5sums=('50d6a03bb1e73fcc62633f2535494733' - '4e5ba38f84cb7a107110318764707d87' - '214b5ab19962418fa755a45b35504219') + '4e5ba38f84cb7a107110318764707d87') noextract=(im-${pkgver}_Sources.tar.gz) -options=('staticlibs') -build() { +prepare() { tar xf im-${pkgver}_Sources.tar.gz # sources have a problem with bsdtar, use gnutar instead - cd im - make -k || true } -package() { +build() { + cd "$srcdir"/im/src + msg2 'Building libim without Lua' + make -k im im_jp2 im_process im_process_omp im_fftw im_lzo + + msg2 'Building Lua 5.3 bindings' + make -k imlua5 imlua_jp25 imlua_process5 imlua_process_omp5 imlua_fftw5 \ + STDLDFLAGS="-shared -Wl,-rpath=/usr/lib/lua/5.3,--enable-new-dtags,--as-needed" \ + USE_LUA53=Yes LUA_SFX=5.3 + + msg2 'Building Lua 5.2 bindings' + make -k imlua5 imlua_jp25 imlua_process5 imlua_process_omp5 imlua_fftw5 \ + STDLDFLAGS="-shared -Wl,-rpath=/usr/lib/lua/5.2,--enable-new-dtags,--as-needed" \ + LUA_INC=/usr/include/lua5.2 \ + USE_LUA52=Yes LUA_SFX=5.2 + + msg2 'Building Lua 5.1 bindings' + make -k imlua5 imlua_jp25 imlua_process5 imlua_process_omp5 imlua_fftw5 \ + STDLDFLAGS="-shared -Wl,-rpath=/usr/lib/lua/5.1,--enable-new-dtags,--as-needed" \ + LUA_INC=/usr/include/lua5.1 \ + USE_LUA51=Yes LUA_SFX=5.1 +} + +package_libim() { + pkgdesc="Imaging toolkit library" + depends=('zlib' 'libpng') + install -m755 -d "$pkgdir"/usr/lib install -m644 "$srcdir"/im/lib/Linux*/libim* "$pkgdir"/usr/lib install -m755 -d "$pkgdir"/usr/share/$pkgname install -m644 "$srcdir"/im-${pkgver}_Docs.pdf "$pkgdir"/usr/share/$pkgname install -m755 -d "$pkgdir"/usr/include/im install -m644 "$srcdir"/im/include/* "$pkgdir"/usr/include/im - install -Dm644 "$srcdir"/LICENSE "$pkgdir"/usr/share/licenses/libim/LICENSE - install -d "$pkgdir"/usr/lib/lua/5.1/ - install -Dm644 "$srcdir"/im/lib/Linux*_??/Lua51/*.so "$pkgdir"/usr/lib/lua/5.1/ + install -Dm644 "$srcdir"/im/COPYRIGHT "$pkgdir"/usr/share/licenses/libim/LICENSE } + +_lua_im_package_helper() { + # $1 ... Lua version ("5.1", "5.2" or "5.3") + + _lua_ver=$1 + _lua_ver_nodot=`echo $1 | cut -c1,3` + + mkdir -p "$pkgdir"/usr/share/licenses/$pkgname + install -Dm644 "$srcdir"/im/COPYRIGHT "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -d "$pkgdir"/usr/lib/lua/${_lua_ver} + install -Dm644 "$srcdir"/im/lib/Linux*_??/Lua${_lua_ver_nodot}/*.so "$pkgdir"/usr/lib/lua/${_lua_ver} + + # create symlinks required for Lua modules + for name in \ + imlua \ + imlua_process \ + imlua_process_omp \ + imlua_jp2 \ + imlua_fftw ; do + _lib=lib${name}${_lua_ver_nodot}.so + ln -s /usr/lib/lua/${_lua_ver}/${_lib} "${pkgdir}"/usr/lib/lua/${_lua_ver}/${name}.so + done +} + +package_lua-im() { + pkgdesc="Lua (5.3) bindings for IM toolkit" + depends=('libim') + + _lua_im_package_helper "5.3" +} + +package_lua52-im() { + pkgdesc="Lua (5.2) bindings for IM toolkit" + depends=('libim') + + _lua_im_package_helper "5.2" +} + +package_lua51-im() { + pkgdesc="Lua (5.1) bindings for IM toolkit" + depends=('libim') + + _lua_im_package_helper "5.1" +} + +# vim:set ts=2 sw=2 et: |