pth.spec 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. ##
  2. ## pth.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2003 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2003 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2003 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 [BASE]
  32. Group: System
  33. License: GPL
  34. Version: 2.0.0
  35. Release: 20030731
  36. # package options
  37. %option with_optimize no
  38. %option with_pthread no
  39. # list of sources
  40. Source0: ftp://ftp.gnu.org/gnu/pth/pth-%{version}.tar.gz
  41. # build information
  42. Prefix: %{l_prefix}
  43. BuildRoot: %{l_buildroot}
  44. BuildPreReq: OpenPKG, openpkg >= 20020206
  45. PreReq: OpenPKG, openpkg >= 20020206
  46. AutoReq: no
  47. AutoReqProv: no
  48. %description
  49. Pth is a very portable POSIX/ANSI-C based library for Unix platforms
  50. which provides non-preemptive priority-based scheduling for multiple
  51. threads of execution (aka `multithreading') inside event-driven
  52. applications. All threads run in the same address space of the
  53. application process, but each thread has its own individual program
  54. counter, run-time stack, signal mask and errno variable.
  55. %prep
  56. %setup -q
  57. %build
  58. touch config.cache
  59. case "%{l_target}" in
  60. alpha-freebsd5.[01] )
  61. # FIXME: FreeBSD 5.0/5.1 makecontext(3) is broken on Alpha
  62. ( echo "ac_cv_func_makecontext=no"
  63. echo "ac_cv_func_getcontext=no"
  64. echo "ac_cv_func_setcontext=no"
  65. echo "ac_cv_func_swapcontext=no"
  66. echo "ac_cv_stacksetup_makecontext=no"
  67. echo "ac_cv_check_mcsc=no"
  68. ) >config.cache
  69. ;;
  70. esac
  71. CC="%{l_cc}" \
  72. CFLAGS="%{l_cflags -O}" \
  73. ./configure \
  74. --cache-file=./config.cache \
  75. --prefix=%{l_prefix} \
  76. --includedir="%{l_prefix}/include/pth" \
  77. --libdir="%{l_prefix}/lib/pth" \
  78. %if "%{with_pthread}" == "yes"
  79. --enable-pthread \
  80. %endif
  81. --disable-tests \
  82. --enable-batch \
  83. --enable-syscall-soft \
  84. %if "%{with_optimize}" == "yes"
  85. --enable-optimize \
  86. %endif
  87. --disable-shared
  88. %{l_make} %{l_mflags}
  89. %install
  90. rm -rf $RPM_BUILD_ROOT
  91. %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
  92. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
  93. %files -f files
  94. %clean
  95. rm -rf $RPM_BUILD_ROOT