recipe 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Build recipe for libatomic_ops.
  2. #
  3. # Copyright (c) 2018-2019, 2021 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=libatomic_ops
  19. version=7.6.12
  20. release=1
  21. # Define a category for the output of the package name
  22. pkgcategory=libs
  23. tarname=${program}-${version}.tar.gz
  24. # Remote source(s)
  25. fetch=https://github.com/ivmai/libatomic_ops/releases/download/v${version}/$tarname
  26. description="
  27. Implementations for atomic memory.
  28. libatomic_ops provides implementations for atomic memory update
  29. operations on a number of architectures. This allows direct use of
  30. these in reasonably portable code. Unlike earlier similar packages,
  31. this one explicitly considers memory barrier semantics, and allows
  32. the construction of code that involves minimum overhead across a
  33. variety of architectures.
  34. "
  35. homepage=https://github.com/ivmai/libatomic_ops
  36. license=GPLv2+
  37. # Source documentation
  38. docs="AUTHORS ChangeLog"; # To complement installed documentation.
  39. docsdir="${docdir}/${program}-${version}"
  40. build()
  41. {
  42. unpack "${tardir}/$tarname"
  43. cd "$srcdir"
  44. # Set sane permissions
  45. chmod -R u+w,go-w,a+rX-s .
  46. ./configure \
  47. CPPFLAGS="$QICPPFLAGS" CFLAGS="$QICFLAGS" LDFLAGS="$QILDFLAGS" \
  48. $configure_args \
  49. --libdir=/usr/lib${libSuffix} \
  50. --docdir=$docsdir \
  51. --enable-static=no \
  52. --enable-shared=yes \
  53. --build="$(gcc -dumpmachine)"
  54. make -j${jobs} V=1
  55. make -j${jobs} DESTDIR="$destdir" install-strip
  56. # Copy documentation
  57. mkdir -p "${destdir}/$docsdir"
  58. cp -p $docs "${destdir}/$docsdir"
  59. }