shrub/nix/nixcrpkgs/pkgs/libusb/builder.sh
benjamin-tlon edd57d380d
Finish cc-release cross-compilation. (#1202)
- Fixes the IPC bug
- Fixes the terminfo bug
- Moves the OSX SDK out of our nixcrpkgs fork.
- Vendor nixcrpkgs instead of having it be a submodule.
2019-04-23 19:50:38 -07:00

28 lines
470 B
Bash

source $setup
tar -xf $src
mv libusb-* libusb
mkdir build
cd build
if [ -n "$libudev" ]; then
export CFLAGS="${CFLAGS:=} -isystem $libudev/include"
export LDFLAGS="${LDFLAGS:=} -L$libudev/lib"
fi
../libusb/configure \
--prefix=$out \
--host=$host \
--enable-static \
--disable-shared
make
make install
if [ -n "$libudev" ]; then
ln -s $libudev/lib/pkgconfig/*.pc $out/lib/pkgconfig/
echo "Requires: libudev" >> $out/lib/pkgconfig/libusb-1.0.pc
fi