PKGBUILD 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Maintainer(Arch): Robin Broda <robin@broda.me>
  2. # Contributor: Pierre Neidhardt <ambrevar@gmail.com>
  3. # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
  4. # Contributor: Gergely Imreh <imrehgATgmailDOTcom>
  5. # Contributor: dschauer <dschauerATgmailDOTcom>
  6. # Contributor: Stefan Husmann <stefan-husmann@t-online.de>
  7. # Contributor: Jeremy Cowgar <jeremy@cowgar.com>
  8. # Maintainer: Sagar Acharya <sagaracharya@tutanota.com>
  9. pkgname=tcc
  10. pkgver=0.9.27
  11. pkgrel=1
  12. pkgdesc="Tiny C Compiler"
  13. arch=('x86_64' 'i686')
  14. url="https://bellard.org/tcc/"
  15. license=('LGPL-2.1')
  16. depends=('glibc')
  17. options=('docs' 'staticlibs')
  18. source=("https://download.savannah.nongnu.org/releases/tinycc/${pkgname}-${pkgver}.tar.bz2"
  19. "series"
  20. "0001-Disable-test-not-working-on-i386.patch"
  21. "0002-Disable-stack-protector-in-runtime-library.patch"
  22. "0003-Prevent-dead-code-on-x86-in-prepare_dynamic_rel.patch")
  23. sha512sums=('835184292d97c07f0ff7b36ec550e855e649b04e23c7e2a1c706d223409eb60708dc1ae969f28eba45e56c8b96ae56936b93caf9d8a13ac5adf119014d5367a7'
  24. '431435befa6010d485dbfd4890f5c3fee7331993738c5d71d1cd2ee333fee24bc85f387df2faed02cb78841b019434ad3a7af20541346d45e731eb022d896a9c'
  25. 'e81367441b536d0d072ff8bab92ffb961a23ee5377e138be89cd64c79d152b9a2ceb1785daa10e0d3e25ea33496f30e4dd265b73ad90efd72fead2b767c85c2c'
  26. '14ec408523ddd8238c1e1b84c597d831d9f5b2454ce44c3c4d1eebfe4ecea5c4acc6909977ea40d9665bd3699c6c3a92efd27352a349b75d4190e33e392b794c'
  27. '8b0f9e8aa013110b2d5a5aec72b017aca124e12952135f280c74649debb52f505427cb40cb95ef9cef8904fda23ca7a3ff9b706c853ee493f2b0a105abdca4f1')
  28. prepare() {
  29. cd ${pkgname}-${pkgver}
  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. }
  38. build() {
  39. cd ${pkgname}-${pkgver}
  40. unset CFLAGS
  41. unset LDFLAGS
  42. ./configure --prefix=/usr
  43. make
  44. }
  45. package() {
  46. cd ${pkgname}-${pkgver}
  47. make DESTDIR="$pkgdir" docdir="$pkgdir"/usr/share/doc/tcc install
  48. make clean
  49. make CFLAGS="-fPIC"
  50. gcc -shared -o libtcc.so *.o
  51. install -Dm755 libtcc.so -t "${pkgdir}/usr/lib/"
  52. }