kakasi: fix build with gcc15, modernize (#476841)
This commit is contained in:
@@ -7,13 +7,39 @@
|
||||
libiconv,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "kakasi";
|
||||
version = "2.3.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://kakasi.namazu.org/stable/kakasi-${finalAttrs.version}.tar.xz";
|
||||
hash = "sha256-LuV7GwPHT9V2bnQcOBICjvxzvA4L+Tpuf/IOtHAfPuM=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://src.fedoraproject.org/rpms/kakasi/raw/4756771/f/kakasi-configure-c99.patch";
|
||||
hash = "sha256-XPIp/+AR6K84lv606aRHPQwia/1K3rt/7KSo0V0ZQ5o=";
|
||||
})
|
||||
./gettext-0.25.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
|
||||
|
||||
env = lib.optionalAttrs (!stdenv.cc.isClang) {
|
||||
NIX_CFLAGS_COMPILE = "-std=gnu17";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
for a in tests/kakasi-* ; do
|
||||
substituteInPlace $a \
|
||||
--replace-quiet "/bin/echo" echo
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = false; # fails 1 of 6 tests
|
||||
|
||||
meta = {
|
||||
description = "Kanji Kana Simple Inverter";
|
||||
longDescription = ''
|
||||
@@ -25,27 +51,4 @@ stdenv.mkDerivation rec {
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.unix;
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://kakasi.namazu.org/stable/kakasi-${version}.tar.xz";
|
||||
sha256 = "1qry3xqb83pjgxp3my8b1sy77z4f0893h73ldrvdaky70cdppr9f";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
url = "https://src.fedoraproject.org/rpms/kakasi/raw/4756771/f/kakasi-configure-c99.patch";
|
||||
hash = "sha256-XPIp/+AR6K84lv606aRHPQwia/1K3rt/7KSo0V0ZQ5o=";
|
||||
})
|
||||
./gettext-0.25.patch
|
||||
];
|
||||
|
||||
postPatch = ''
|
||||
for a in tests/kakasi-* ; do
|
||||
substituteInPlace $a \
|
||||
--replace-quiet "/bin/echo" echo
|
||||
done
|
||||
'';
|
||||
|
||||
doCheck = false; # fails 1 of 6 tests
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user