2024-02-29 20:09:43 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
|
|
|
, cmake
|
|
|
|
, unzip
|
|
|
|
, pkg-config
|
|
|
|
, libXpm
|
|
|
|
, fltk13
|
|
|
|
, freeimage
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "posterazor";
|
|
|
|
version = "1.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-12-06 16:07:01 +00:00
|
|
|
url = "mirror://sourceforge/posterazor/${version}/PosteRazor-${version}-Source.zip";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-BbujA2ASyqQelb3iFAwgeJC0OhzXqufIa1UD+tFsF7c=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config unzip ];
|
|
|
|
buildInputs = [ libXpm fltk13 freeimage ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
unzip $src -d posterazor
|
|
|
|
cd posterazor/src
|
|
|
|
'';
|
|
|
|
|
|
|
|
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=667328
|
|
|
|
patchPhase = ''
|
|
|
|
sed "s/\(#define CASESENSITIVESTRCMP strcasecmp\)/#include <unistd.h>\n\1/" -i FlPosteRazorDialog.cpp
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp PosteRazor $out/bin
|
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "http://posterazor.sourceforge.net/";
|
|
|
|
description = "Cuts a raster image into pieces which can afterwards be printed out and assembled to a poster";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
2024-02-29 20:09:43 +00:00
|
|
|
maintainers = [ maintainers.madjar ];
|
|
|
|
mainProgram = "PosteRazor";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|