blob: a2230cb80ae3819a14b4482382948f8b336ae95f (
plain) (
blame)
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
|
#!/bin/bash
name=pkgconf
version=1.6.3
revision=0
sources=(
"https://github.com/${name}/${name}/archive/${name}-${version}.tar.gz"
)
build_depends=(
"automake"
"autoconf"
"m4"
"libtool"
)
depends=()
function prepare() {
tar xf ${name}-${version}.tar.gz
# an ugly release tag makes for an ugly directory, fyi
cd ${name}-${name}-${version}
if [[ $(uname -s) == Darwin ]]; then
# extra -rpath kills the build
LDFLAGS="-L${_runtime}/lib"
fi
}
function build() {
./autogen.sh
./configure --prefix="${_prefix}" \
--sysconfdir="${_prefix}/etc" \
--with-pkg-config-dir="${_prefix}/lib/pkgconfig:${prefix}/share/pkgconfig:/usr/lib64/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig" \
--with-system-libdir="${_prefix}/lib" \
--with-system-includedir="${_prefix}/include"
make -j${_maxjobs}
}
function package() {
target="$(./config.guess)"
make install DESTDIR="${_pkgdir}"
ln -s pkgconf "${_pkgdir}${_prefix}/bin/pkg-config"
ln -s pkgconf "${_pkgdir}${_prefix}/bin/${target%%.*}-pkg-config"
ln -s pkgconf.1 "${_pkgdir}${_prefix}/share/man/man1/pkg-config.1"
}
|