2021-10-28 06:52:43 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, pkg-config, autoreconfHook, libXaw, freetype }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-10-28 06:52:43 +00:00
|
|
|
pname = "libotf";
|
|
|
|
version = "0.9.16";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-10-28 06:52:43 +00:00
|
|
|
url = "https://download.savannah.gnu.org/releases/m17n/${pname}-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0sq6g3xaxw388akws6qrllp3kp2sxgk2dv4j79k6mm52rnihrnv8";
|
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
patches = [
|
|
|
|
# https://salsa.debian.org/debian/libotf/-/tree/master/debian/patches
|
|
|
|
# Fix cross-compilation
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0002-use-pkg-config-not-freetype-config.patch";
|
|
|
|
sha256 = "sha256-VV9iGoNWIEie6UiLLTJBD+zxpvj0acgqkcBeAN1V6Kc=";
|
|
|
|
})
|
|
|
|
# these 2 are required by the above patch
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-do-not-add-flags-for-required-packages-to-pc-file.patch";
|
|
|
|
sha256 = "sha256-3kzqNPAHNVJQ1F4fyifq3AqLdChWli/k7wOq+ha+iDs=";
|
|
|
|
})
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://salsa.debian.org/debian/libotf/-/raw/1be04cedf887720eb8f5efb3594dc2cefd96b1f1/debian/patches/0001-libotf-config-modify-to-support-multi-arch.patch";
|
|
|
|
sha256 = "sha256-SUlI87h+MtYWWtrAegzAnSds8JhxZwTJltDcj/se/Qc=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
strictDeps = true;
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pkg-config autoreconfHook ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildInputs = [ libXaw freetype ];
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
outputs = [ "out" "dev" ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $dev/bin
|
|
|
|
mv $out/bin/libotf-config $dev/bin/
|
|
|
|
substituteInPlace $dev/bin/libotf-config \
|
|
|
|
--replace "pkg-config" "${pkg-config}/bin/pkg-config"
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
homepage = "https://www.nongnu.org/m17n/";
|
|
|
|
description = "Multilingual text processing library (libotf)";
|
2021-01-15 22:18:51 +00:00
|
|
|
license = lib.licenses.lgpl21Plus;
|
|
|
|
platforms = lib.platforms.linux;
|
|
|
|
maintainers = with lib.maintainers; [ bendlas ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|