summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 590e5b261e62133606ff2a5bdcddb0463a0990f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Maintainer: Emma Tebibyte <emma@tebibyte.media>
# Contributor: Robin Broda <robin@broda.me>
# Contributor: Pierre Neidhardt <ambrevar@gmail.com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Gergely Imreh <imrehgATgmailDOTcom>
# Contributor: dschauer <dschauerATgmailDOTcom>
# Contributor: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Jeremy Cowgar <jeremy@cowgar.com>

_pkgbase=tcc
pkgname=tcc-musl
pkgver=0.9.27
pkgrel=1
pkgdesc="Tiny C Compiler"
arch=('x86_64')
url="https://bellard.org/tcc/"
license=('LGPL')
depends=('musl')
conflicts=('tcc')
makedepends=('texi2html')
options=('docs' 'staticlibs')
source=("https://download.savannah.nongnu.org/releases/tinycc/${_pkgbase}-${pkgver}.tar.bz2")
sha256sums=('de23af78fca90ce32dff2dd45b3432b2334740bb9bb7b05bf60fdbfc396ceb9c')

build() {
  cd ${_pkgbase}-${pkgver}
  unset CFLAGS
  unset LDFLAGS
  ./configure --prefix=/usr --config-musl
  make
}

check() {
  cd ${_pkgbase}-${pkgver}
  make test
}

package() {
  cd ${_pkgbase}-${pkgver}

 make DESTDIR="$pkgdir" docdir="$pkgdir"/usr/share/doc/tcc install

 make clean
 make CFLAGS="-fPIC"
 gcc -shared -o libtcc.so *.o
 install -Dm755 libtcc.so -t "${pkgdir}/usr/lib/"
}