mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
sdcv: 0.4.2 -> 0.5.2
This commit is contained in:
parent
0fddfcdd4d
commit
46336b6961
@ -1,35 +1,32 @@
|
||||
{ stdenv, fetchurl, pkgconfig, glib, gettext }:
|
||||
{ stdenv, fetchFromGitHub, cmake, pkgconfig, glib, gettext, readline }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name= "sdcv-0.4.2";
|
||||
name = "sdcv-${version}";
|
||||
version = "0.5.2";
|
||||
|
||||
meta = {
|
||||
homepage = http://sdcv.sourceforge.net/;
|
||||
description = "Console version of StarDict program";
|
||||
maintainers = with stdenv.lib.maintainers; [ lovek323 ];
|
||||
license = stdenv.lib.licenses.gpl2;
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sdcv/${name}.tar.bz2";
|
||||
sha256 = "1cnyv7gd1qvz8ma8545d3aq726wxrx4km7ykl97831irx5wz0r51";
|
||||
src = fetchFromGitHub {
|
||||
owner = "Dushistov";
|
||||
repo = "sdcv";
|
||||
rev = "v${version}";
|
||||
sha256 = "1b67s4nj0s5fh3cjk7858qvhiisc557xx72xwzrb8hq6ijpwx5k0";
|
||||
};
|
||||
|
||||
hardeningDisable = [ "format" ];
|
||||
nativeBuildInputs = [ cmake pkgconfig ];
|
||||
buildInputs = [ glib gettext readline ];
|
||||
|
||||
patches = ( if stdenv.isDarwin
|
||||
then [ ./sdcv.cpp.patch-darwin ./utils.hpp.patch ]
|
||||
else [ ./sdcv.cpp.patch ] );
|
||||
|
||||
nativeBuildInputs = [ pkgconfig ];
|
||||
buildInputs = [ glib gettext ];
|
||||
|
||||
preBuild = ''
|
||||
sed -i 's/guint32 page_size/size_t page_size/' src/lib/lib.cpp
|
||||
preInstall = ''
|
||||
touch locale
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-D__GNU_LIBRARY__"
|
||||
+ stdenv.lib.optionalString stdenv.isDarwin " -lintl";
|
||||
}
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://dushistov.github.io/sdcv/;
|
||||
description = "Console version of StarDict";
|
||||
maintainers = with maintainers; [ lovek323 ];
|
||||
license = licenses.gpl2;
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- a/src/utils.hpp
|
||||
+++ b/src/utils.hpp
|
||||
@@ -2,6 +2,9 @@
|
||||
#define _UTILS_HPP_
|
||||
|
||||
#include <string>
|
||||
+#include <stdio.h>
|
||||
+#include <cstdlib>
|
||||
+
|
||||
using std::string;
|
||||
|
||||
extern bool stdio_getline(FILE *in, string &str);
|
@ -1,19 +0,0 @@
|
||||
--- a/src/sdcv.cpp
|
||||
+++ b/src/sdcv.cpp
|
||||
@@ -27,13 +27,13 @@
|
||||
#include <cstdlib>
|
||||
#include <cstdio>
|
||||
#include <clocale>
|
||||
+#include <string>
|
||||
+#include <vector>
|
||||
+#include <memory>
|
||||
#include <glib.h>
|
||||
#include <glib/gi18n.h>
|
||||
#include <glib/gstdio.h>
|
||||
#include <getopt.h>
|
||||
-#include <string>
|
||||
-#include <vector>
|
||||
-#include <memory>
|
||||
|
||||
#include "libwrapper.hpp"
|
||||
#include "readline.hpp"
|
@ -1,10 +0,0 @@
|
||||
--- a/src/utils.hpp
|
||||
+++ b/src/utils.hpp
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _UTILS_HPP_
|
||||
|
||||
#include <string>
|
||||
+#include <cstdlib>
|
||||
using std::string;
|
||||
|
||||
extern bool stdio_getline(FILE *in, string &str);
|
Loading…
Reference in New Issue
Block a user