recipe 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Build recipe for imake.
  2. #
  3. # Copyright (c) 2019 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. program=imake
  17. version=1.0.8
  18. release=1
  19. # Set 'outdir' for a nice and well-organized output directory
  20. outdir="${outdir}/${arch}/xorg/util"
  21. tarname=${program}-${version}.tar.bz2
  22. # Remote source(s)
  23. fetch=http://www.x.org/releases/individual/util/$tarname
  24. description="
  25. C preprocessor interface to the make utility.
  26. The imake package contains the imake utility, plus the following
  27. support programs:
  28. - ccmakedep
  29. - mergelib
  30. - revpath
  31. - mkdirhier
  32. - makeg
  33. - cleanlinks
  34. - mkhtmlindex
  35. - xmkmf
  36. Most usage will also require installing the Xorg util/cf files which
  37. contain the platform-specific configuration data for known platforms.
  38. The X Window System used imake extensively up through the X11R6.9
  39. release, for both full builds within the source tree and external
  40. software. X moved to GNU autoconf and automake for its build system
  41. in 2005 for X11R7.0 and later releases, but still provides imake for
  42. building existing external software programs that have not yet
  43. converted, though we are not actively maintaining it for new OS or
  44. platform releases.
  45. For more information, see README.md at ${docsdir}.
  46. "
  47. homepage=http://www.x.org
  48. license="MIT X Consortium"
  49. # Source documentation
  50. docs="COPYING ChangeLog README.md"
  51. docsdir="${docdir}/${program}-${version}"
  52. build()
  53. {
  54. set -e
  55. unpack "${tardir}/$tarname"
  56. cd "$srcdir"
  57. # Set sane permissions
  58. chmod -R u+w,go-w,a+rX-s .
  59. ./configure CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" $configure_args \
  60. --mandir=$mandir --docdir=$docsdir --build="$(cc -dumpmachine)"
  61. make -j${jobs} V=1
  62. make -j${jobs} DESTDIR="$destdir" install
  63. # Compress and link man pages (if needed)
  64. if test -d "${destdir}/$mandir"
  65. then
  66. (
  67. cd "${destdir}/$mandir"
  68. find . -type f -exec lzip -9 '{}' +
  69. find . -type l | while read -r file
  70. do
  71. ln -sf "$(readlink -- "$file").lz" "${file}.lz"
  72. rm -- "$file"
  73. done
  74. )
  75. fi
  76. # Copy documentation
  77. mkdir -p "${destdir}${docsdir}"
  78. cp -p $docs "${destdir}${docsdir}"
  79. }