PKGBUILD 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Maintainer(Arch): Felix Yan <felixonmars@archlinux.org>
  2. # Maintainer: Sagar Acharya <sagaracharya@tutanota.com>
  3. pkgname=abc
  4. pkgver=0.0.0.20191006
  5. _commit=52a8ebb451b060673e68319c43a0e499700c7212
  6. pkgrel=1
  7. pkgdesc="System for Sequential Logic Synthesis and Formal Verification"
  8. arch=("x86_64")
  9. license=("Expat")
  10. url="https://github.com/berkeley-abc/abc"
  11. depends=('readline')
  12. source=("https://github.com/berkeley-abc/abc/archive/$_commit/abc-$_commit.tar.gz"
  13. "series"
  14. "0006-Fix-spelling-errors.patch"
  15. "cflags_ldflags.patch"
  16. "remove_bzlib_convenience.patch"
  17. "remove_zlib_convenience.patch"
  18. "reproducibility.patch"
  19. "writepla.patch")
  20. sha512sums=('d8005c66e1682aed1e371ab927ff23ce2d92d286b22d2c06bf1c78b8250850183df269f3d5949fb36fa7e142c2377c7e2065eeefbc0754f7ee7ba17b8e300ec1'
  21. '9eb3c9b4a578871c18d386f14937557842b5be8f9a864042a8b4948fd9806d519b948da5c42715fe8c1c607c002db7e2683a21805403a125edfb8a8f85d207e9'
  22. '2a42c11916aaf7c479bae9904878392059a1bd0aeff436c06e1b6ad82f15afaeda039625729ce695aadb53c5a3cd94b26ff8321d62245f327d8d48a5d6e3baca'
  23. '11d0b68a5f2ca1830667f1a0b4f7fb3c61035af47a1b42e805f61c4c36d649bbed62df0cb815d28cc3197eb768bbf57213f33596681beba16f8d58c7fe656b25'
  24. 'a505df37df8ee0acb80deacf03699a010e7d73201f1250a893e46c8e59ba0ec514490eadac2bad630a20dbcc7e6844bf124d9425a6c26330dead3cbebfebe95e'
  25. 'a2e744058f5916b6a33e581ff1a7dbbccfa8341c63a209107da7891b95a7a37da5e30966dc97c09281f1b4a5c0d8a4707c6653cbba10cdf36c59615fec8b240c'
  26. '8ff28afb4daa77a11ef6e428cab1f25e38e25bf60d2d95640ee87dbb4cf8127817570cce7d118dca6f306b06a5c3b0bcfb53b396155d8e6eb4f5bec5cb8ab8ea'
  27. '2f246f65d6ce9e58f0d98e4756634dd398e490e60794e85c796c0eec5364cde89acec7964a99902009a7c397abb84362ff5377f932f5d5d1961afdb02e6b8aa8')
  28. prepare() {
  29. cd $pkgname-$_commit
  30. mkdir ./patches
  31. cp ${srcdir}/series ./patches
  32. cp ${srcdir}/*.patch ./patches
  33. export QUILT_PATCHES=patches
  34. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  35. export QUILT_DIFF_ARGS='--no-timestamps'
  36. quilt push -av
  37. # - Make abc link to libabc, so the result is 50% smaller
  38. # - Fix LDFLAGS for shared library
  39. sed -i -e 's|-o \$@ \$\^ \$(LDFLAGS)|-o $@ src/base/main/main.o $(LDFLAGS) -L. -labc|;s|\$(PROG):|$(PROG): lib$(PROG).so|' \
  40. -e 's|-o \$@ \$\^ $(LIBS)|-o $@ $^ $(LIBS) $(LDFLAGS)|' Makefile
  41. }
  42. build() {
  43. cd $pkgname-$_commit
  44. make ABC_USE_PIC=1 LDFLAGS="$LDFLAGS" libabc.so abc
  45. }
  46. package() {
  47. cd $pkgname-$_commit
  48. install -Dm755 libabc.so -t "$pkgdir"/usr/lib/
  49. install -Dm755 abc -t "$pkgdir"/usr/bin/
  50. install -Dm644 copyright.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
  51. }