pth.spec 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. ##
  2. ## pth.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2005 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2005 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2005 Cable & Wireless <http://www.cw.com/>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # package information
  26. Name: pth
  27. Summary: GNU Portable Threads
  28. URL: http://www.gnu.org/software/pth/
  29. Vendor: Ralf S. Engelschall
  30. Packager: The OpenPKG Project
  31. Distribution: OpenPKG
  32. Class: BASE
  33. Group: System
  34. License: GPL
  35. Version: 2.0.4
  36. Release: 20050218
  37. # package options
  38. %option with_optimize no
  39. %option with_pthread no
  40. # list of sources
  41. Source0: ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz
  42. # build information
  43. Prefix: %{l_prefix}
  44. BuildRoot: %{l_buildroot}
  45. BuildPreReq: OpenPKG, openpkg >= 20040130
  46. PreReq: OpenPKG, openpkg >= 20040130
  47. AutoReq: no
  48. AutoReqProv: no
  49. %description
  50. Pth is a very portable POSIX/ANSI-C based library for Unix platforms
  51. which provides non-preemptive priority-based scheduling for multiple
  52. threads of execution (aka `multithreading') inside event-driven
  53. applications. All threads run in the same address space of the
  54. application process, but each thread has its own individual program
  55. counter, run-time stack, signal mask and errno variable.
  56. %track
  57. prog pth = {
  58. version = %{version}
  59. url = ftp://ftp.gnu.org/gnu/pth/
  60. regex = pth-(__VER__)\.tar\.gz
  61. }
  62. %prep
  63. %setup -q
  64. %build
  65. touch config.cache
  66. case "%{l_platform -t}" in
  67. alpha-freebsd5.[01] )
  68. # FIXME: FreeBSD 5.0/5.1 makecontext(3) is broken on Alpha
  69. ( echo "ac_cv_func_makecontext=no"
  70. echo "ac_cv_func_getcontext=no"
  71. echo "ac_cv_func_setcontext=no"
  72. echo "ac_cv_func_swapcontext=no"
  73. echo "ac_cv_stacksetup_makecontext=no"
  74. echo "ac_cv_check_mcsc=no"
  75. ) >config.cache
  76. ;;
  77. esac
  78. CC="%{l_cc}" \
  79. CFLAGS="%{l_cflags -O}" \
  80. ./configure \
  81. --cache-file=./config.cache \
  82. --prefix=%{l_prefix} \
  83. --includedir="%{l_prefix}/include/pth" \
  84. --libdir="%{l_prefix}/lib/pth" \
  85. %if "%{with_pthread}" == "yes"
  86. --enable-pthread \
  87. %endif
  88. --disable-tests \
  89. --enable-batch \
  90. --enable-syscall-soft \
  91. %if "%{with_optimize}" == "yes"
  92. --enable-optimize \
  93. %endif
  94. --disable-shared
  95. %{l_make} %{l_mflags}
  96. %install
  97. rm -rf $RPM_BUILD_ROOT
  98. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  99. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  100. %{l_files_std} \
  101. '%not %dir %{l_prefix}/share/aclocal'
  102. %files -f files
  103. %clean
  104. rm -rf $RPM_BUILD_ROOT