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 }:
|
{ stdenv, lib, fetchFromRepoOrCz, perl, texinfo }:
|
||||||
with stdenv.lib;
|
with lib;
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tcc";
|
pname = "tcc";
|
||||||
version = "0.9.27";
|
version = "0.9.27";
|
||||||
|
upstreamVersion = "release_${concatStringsSep "_" (builtins.splitVersion version)}";
|
||||||
|
|
||||||
src = fetchFromRepoOrCz {
|
src = fetchFromRepoOrCz {
|
||||||
repo = "tinycc";
|
repo = "tinycc";
|
||||||
rev = "release_0_9_27";
|
rev = upstreamVersion;
|
||||||
sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
|
sha256 = "12mm1lqywz0akr2yb2axjfbw8lwv57nh395vzsk534riz03ml977";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -15,6 +16,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
hardeningDisable = [ "fortify" ];
|
hardeningDisable = [ "fortify" ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace "texi2pod.pl" \
|
substituteInPlace "texi2pod.pl" \
|
||||||
--replace "/usr/bin/perl" "${perl}/bin/perl"
|
--replace "/usr/bin/perl" "${perl}/bin/perl"
|
||||||
@ -30,6 +33,17 @@ stdenv.mkDerivation rec {
|
|||||||
configureFlagsArray+=("--libpaths=${getLib stdenv.cc.libc}/lib")
|
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;
|
doCheck = true;
|
||||||
checkTarget = "test";
|
checkTarget = "test";
|
||||||
|
|
||||||
@ -60,7 +74,7 @@ stdenv.mkDerivation rec {
|
|||||||
generation.
|
generation.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
homepage = http://www.tinycc.org/;
|
homepage = "http://www.tinycc.org/";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
|
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = [ "x86_64-linux" ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user