l_template.orig 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. # Template file for 'netpbm'
  2. pkgname=netpbm
  3. # from http://svn.code.sf.net/p/netpbm/code/advanced/doc/HISTORY
  4. version=10.92.00
  5. revision=1
  6. _githash=4c361c0a7638b4f068e8b524e4ff43374a286018
  7. _githash_guide=2ab5fffd17f1e979ce63db9212331e51f53811fc
  8. create_wrksrc=yes
  9. build_wrksrc="netpbm-mirror-${_githash}"
  10. hostmakedepends="pkg-config perl python flex"
  11. makedepends="libX11-devel libjpeg-turbo-devel libpng-devel libxml2-devel
  12. tiff-devel zlib-devel"
  13. short_desc="Toolkit for manipulation of graphic images"
  14. maintainer="Leah Neukirchen <leah@vuxu.org>"
  15. license="BSD-3-Clause,GPL-2.0-only,custom:netpbm"
  16. homepage="http://netpbm.sourceforge.net/"
  17. distfiles="https://github.com/leahneukirchen/netpbm-mirror/archive/${_githash}.tar.gz
  18. https://github.com/leahneukirchen/netpbm-mirror/archive/${_githash_guide}.tar.gz"
  19. checksum="fec87c54b7ff7aeb78f9e2bd48f658821c58b86a41332d9c547b31f2ea8f2593
  20. 542a9532d5c0a81ff47b3a65529670f51f45da4939150a8545e2f3a4af5b120b"
  21. post_extract() {
  22. cd $build_wrksrc
  23. for p in ${FILESDIR}/*.patch; do
  24. patch -Np1 -i $p
  25. done
  26. cd ../netpbm-mirror-${_githash_guide}
  27. sed -i 's/ id="pammixmulti"//g' pammixmulti.html
  28. }
  29. do_configure() {
  30. local endian bitsperlong
  31. cat config.mk.in ${FILESDIR}/config.mk >config.mk
  32. if [ "$XBPS_TARGET_MACHINE" = "i686" -o "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
  33. echo "WANT_SSE = Y" >>config.mk
  34. fi
  35. sed -i 's|misc|share/netpbm|' common.mk
  36. sed -i 's|/link|/lib|' lib/Makefile
  37. sed -i 's|/sharedlink|/lib|' lib/Makefile
  38. sed -i 's|install.manwebmain install.manweb install.man|install.man|' GNUmakefile
  39. if [ "$CROSS_BUILD" ]; then
  40. # Patch buildutils/endiangen.c to return the endianess
  41. # and word size for the target architecture
  42. # XXX: perhaps add XBPS_ENDIAN to common/cross-profiles/*.sh
  43. case "$XBPS_TARGET_MACHINE" in
  44. ppc|ppc-musl|ppc64|ppc64-musl) endian="ENDIAN_BIG";;
  45. *) endian="ENDIAN_LITTLE";;
  46. esac
  47. # XXX: perhaps add XBPS_BITSPERLONG to common/cross-files/*.sh
  48. case "$XBPS_TARGET_MACHINE" in
  49. aarch64*|x86_64*|ppc64*) bitsperlong="64";;
  50. *) bitsperlong="32";;
  51. esac
  52. vsed -i buildtools/endiangen.c \
  53. -e "s;byteOrder();$endian;" \
  54. -e "s;bitsPerLong();$bitsperlong;"
  55. # ... now build the tools for the host
  56. CC=$CC_host CFLAGS="$CFLAGS_host" \
  57. LD=$LD_host LDFLAGS="$LDFLAGS_host" \
  58. make -C buildtools
  59. fi
  60. }
  61. do_build() {
  62. make ${makejobs} CC=$CC CFLAGS="$CFLAGS" LDFLAGS_FOR_BUILD=
  63. make MAKEMAN="${PWD}/buildtools/makeman" USERGUIDE=. \
  64. -C ../netpbm-mirror-${_githash_guide} \
  65. -f "${PWD}/buildtools/manpage.mk" manpages
  66. }
  67. do_install() {
  68. make pkgdir=$DESTDIR/usr PKGMANDIR=share/man install-run install-dev
  69. vmkdir usr/share/man/man1
  70. vmkdir usr/share/man/man3
  71. vmkdir usr/share/man/man5
  72. make MAKEMAN="${PWD}/buildtools/makeman" MANDIR="$DESTDIR/usr/share/man" USERGUIDE=. \
  73. -C ../netpbm-mirror-${_githash_guide} \
  74. -f "${PWD}/buildtools/manpage.mk" installman
  75. vlicense doc/copyright_summary LICENSE
  76. }
  77. libnetpbm_package() {
  78. replaces="${sourcepkg}<10.66.03_2"
  79. short_desc+=" - runtime libraries"
  80. pkg_install() {
  81. vmove usr/lib/*.so.*
  82. }
  83. }
  84. libnetpbm-devel_package() {
  85. replaces="${sourcepkg}<10.66.03_2"
  86. depends="libnetpbm>=${version}_${revision}"
  87. short_desc+=" - development files"
  88. pkg_install() {
  89. vmove usr/include
  90. vmove usr/lib/*.so
  91. }
  92. }