recipe 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # Build recipe for imlib2.
  2. #
  3. # Copyright (c) 2018 Markus Tornow, <tornow@riseup.net>.
  4. # Copyright (c) 2018-2022 Matias Fonzo, <selk@dragora.org>.
  5. #
  6. # Licensed under the Apache License, Version 2.0 (the "License");
  7. # you may not use this file except in compliance with the License.
  8. # You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. # Exit immediately on any error
  18. set -e
  19. program=imlib2
  20. version=1.7.5
  21. release=1
  22. # Define a category for the output of the package name
  23. pkgcategory=x-libs
  24. tarname=${program}-${version}.tar.gz
  25. # Remote source(s)
  26. fetch=https://sourceforge.net/projects/enlightenment/files/imlib2-src/${version}/$tarname
  27. description="
  28. Imlib2 is the (intended) successor to Imlib.
  29. Imlib2 can load image files from disk in one of many formats, save
  30. images to disk in one of many formats, render image data onto other
  31. images, render images to an X-Windows drawable, produce pixmaps and
  32. pixmap masks of images, apply filters to images, rotate images,
  33. accept RGBA data for images, scale images, and more.
  34. "
  35. homepage=https://www.enlightenment.org/
  36. license=BSD
  37. # Source documentation
  38. docs="AUTHORS COPYING COPYING-PLAIN ChangeLog README TODO"
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. case $arch in
  45. i?86)
  46. assembly_opts=--enable-mmx
  47. ;;
  48. amd64 | x32 )
  49. assembly_opts=--enable-amd64
  50. ;;
  51. esac
  52. ./configure CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  53. $configure_args --libdir=/usr/lib${libSuffix} \
  54. --with-id3 --with-x --build="$(gcc -dumpmachine)" \
  55. $assembly_opts
  56. unset -v assembly_opts
  57. make -j${jobs} V=1
  58. make -j${jobs} DESTDIR="$destdir" install-strip
  59. # Copy documentation
  60. mkdir -p "${destdir}/$docsdir"
  61. cp -p $docs "${destdir}/$docsdir"
  62. }