recipe 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. # Build recipe for gegl.
  2. #
  3. # Copyright (c) 2022 Matias Fonzo, <selk@dragora.org>.
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. # Exit immediately on any error
  17. set -e
  18. program=gegl
  19. version=0.4.40
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=x-libs
  23. tarname=${program}-${version}.tar.xz
  24. # Remote source(s)
  25. fetch=https://download.gimp.org/pub/gegl/"${version%.*}"/$tarname
  26. description="
  27. Generic graphics library.
  28. GEGL (Generic Graphics Library) is a data flow based image processing
  29. framework, providing floating point processing and non-destructive
  30. image processing capabilities to GNU Image Manipulation Program and
  31. other projects.
  32. "
  33. homepage=https://gegl.org/
  34. license="GPLv3+, LGPLv3+"
  35. # Source documentation
  36. docs="AUTHORS COPYING* MAINTAINERS NEWS README"
  37. docsdir="${docdir}/${program}-${version}"
  38. build()
  39. {
  40. unpack "${tardir}/$tarname"
  41. cd "$srcdir"
  42. # Set sane permissions
  43. chmod -R u+w,go-w,a+rX-s .
  44. rm -rf BUILD
  45. mkdir BUILD
  46. cd BUILD
  47. CPPFLAGS="$QICPPFLAGS" \
  48. CFLAGS="$QICFLAGS" \
  49. CXXFLAGS="$QICXXFLAGS" \
  50. LDFLAGS="$QILDFLAGS" \
  51. meson setup $configure_args \
  52. --libdir /usr/lib${libSuffix} \
  53. --buildtype=release \
  54. --strip \
  55. -Dsdl1=enabled \
  56. -Dintrospection=true \
  57. ..
  58. ninja -j${jobs}
  59. DESTDIR="$destdir" ninja -j${jobs} install
  60. cd ..
  61. # Compress and link man pages (if needed)
  62. if test -d "${destdir}/$mandir"
  63. then
  64. (
  65. cd "${destdir}/$mandir"
  66. find . -type f -exec lzip -9 {} +
  67. find . -type l | while read -r file
  68. do
  69. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  70. rm -- "$file"
  71. done
  72. )
  73. fi
  74. # Copy documentation
  75. mkdir -p "${destdir}/$docsdir"
  76. cp -p $docs "${destdir}/$docsdir"
  77. }