Merge pull request #70452 from joachifm/feat/tinycc
Tinycc packaging improvements
This commit is contained in:
commit
c35ebfcb04
@ -1,13 +1,14 @@
|
||||
{ stdenv, fetchFromRepoOrCz, perl, texinfo }:
|
||||
with stdenv.lib;
|
||||
{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }:
|
||||
with lib;
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "tcc";
|
||||
version = "0.9.27";
|
||||
upstreamVersion = "release_${concatStringsSep "_" (builtins.splitVersion version)}";
|
||||
|
||||
src = fetchFromRepoOrCz {
|
||||
repo = "tinycc";
|
||||
rev = "release_0_9_27";
|
||||
rev = upstreamVersion;
|
||||
sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
|
||||
};
|
||||
|
||||
@ -15,6 +16,8 @@ stdenv.mkDerivation rec {
|
||||
|
||||
hardeningDisable = [ "fortify" ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace "texi2pod.pl" \
|
||||
--replace "/usr/bin/perl" "${perl}/bin/perl"
|
||||
@ -30,6 +33,17 @@ stdenv.mkDerivation rec {
|
||||
configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib")
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
cat >libtcc.pc <<EOF
|
||||
Name: libtcc
|
||||
Description: Tiny C compiler backend
|
||||
Version: ${version}
|
||||
Libs: -L$out/lib -Wl,--rpath $out/lib -ltcc -ldl
|
||||
Cflags: -I$out/include
|
||||
EOF
|
||||
install -Dt $out/lib/pkgconfig libtcc.pc
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
checkTarget = "test";
|
||||
|
||||
@ -60,7 +74,7 @@ stdenv.mkDerivation rec {
|
||||
generation.
|
||||
'';
|
||||
|
||||
homepage = http://www.tinycc.org/;
|
||||
homepage = "http://www.tinycc.org/";
|
||||
license = licenses.mit;
|
||||
|
||||
platforms = [ "x86_64-linux" ];
|
||||
|
Loading…
Reference in New Issue
Block a user