summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/applications/misc/goldendict/default.nix28
-rw-r--r--pkgs/applications/misc/goldendict/gcc47.patch40
-rw-r--r--pkgs/applications/misc/goldendict/goldendict-paths.diff10
-rw-r--r--pkgs/development/libraries/libeb/default.nix24
-rw-r--r--pkgs/top-level/all-packages.nix2
5 files changed, 36 insertions, 68 deletions
diff --git a/pkgs/applications/misc/goldendict/default.nix b/pkgs/applications/misc/goldendict/default.nix
index 717d0a012a2..32a16e79c21 100644
--- a/pkgs/applications/misc/goldendict/default.nix
+++ b/pkgs/applications/misc/goldendict/default.nix
@@ -1,24 +1,16 @@
-{ stdenv, fetchurl, pkgconfig, qt4, libXtst, libvorbis, phonon, hunspell }:
+{ stdenv, fetchFromGitHub, pkgconfig, qt4, libXtst, libvorbis, hunspell, libao, ffmpeg, libeb, lzo, xz, libtiff }:
 stdenv.mkDerivation rec {
-  name = "goldendict-1.0.1";
-  src = fetchurl {
-    url = "mirror://sourceforge/goldendict/${name}-src.tar.bz2";
-    sha256 = "19p99dd5jgs0k66sy30vck7ymqj6dv1lh6w8xw18zczdll2h9yxk";
+  name = "goldendict-1.5.0.20150801";
+  src = fetchFromGitHub {
+    owner = "goldendict";
+    repo = "goldendict";
+    rev = "b4bb1e9635c764aa602fbeaeee661f35e461d062";
+    sha256 = "0dhaa0nii226541al3i2d8x8h7cfh96w5vkw3pa3l74llgrj7yx2";
   };
-  buildInputs = [ pkgconfig qt4 libXtst libvorbis phonon hunspell ];
-  unpackPhase = ''
-    mkdir ${name}-src
-    cd ${name}-src
-    tar xf ${src}
-  '';
-  patches = [ ./goldendict-paths.diff ./gcc47.patch ];
-  patchFlags = "-p 0";
+
+  buildInputs = [ pkgconfig qt4 libXtst libvorbis hunspell libao ffmpeg libeb lzo xz libtiff ];
   configurePhase = ''
-    qmake
-  '';
-  installPhase = ''
-    make INSTALL_ROOT="$out" install
-    rm -rf "$out/share/app-install"
+    qmake PREFIX=$out 'CONFIG+=zim_support'
   '';
 
   meta = {
diff --git a/pkgs/applications/misc/goldendict/gcc47.patch b/pkgs/applications/misc/goldendict/gcc47.patch
deleted file mode 100644
index 311dad4f648..00000000000
--- a/pkgs/applications/misc/goldendict/gcc47.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From b00d081da20b9a6b257573c6b23a6bc640c4dab1 Mon Sep 17 00:00:00 2001
-From: Michael Palimaka <kensington@gentoo.org>
-Date: Fri, 20 Jul 2012 03:27:38 +1000
-Subject: [PATCH] Fix build with GCC 4.7 by adding missing includes.
-
----
- processwrapper.cc                       | 4 ++++
- qtsingleapplication/src/qtlocalpeer.cpp | 1 +
- 2 files changed, 5 insertions(+)
-
-diff --git processwrapper.cc processwrapper.cc
-index f7f3f19..86b985d 100644
---- processwrapper.cc
-+++ processwrapper.cc
-@@ -2,6 +2,10 @@
- 

- #include <QtCore>

- 

-+#if defined(Q_OS_UNIX)

-+#include <unistd.h>

-+#endif

-+

- #ifdef Q_OS_WIN32

- 

- #include <windows.h>

-diff --git qtsingleapplication/src/qtlocalpeer.cpp qtsingleapplication/src/qtlocalpeer.cpp
-index 382d182..506c142 100644
---- qtsingleapplication/src/qtlocalpeer.cpp
-+++ qtsingleapplication/src/qtlocalpeer.cpp
-@@ -50,6 +50,7 @@ static PProcessIdToSessionId pProcessIdToSessionId = 0;
- #endif
- #if defined(Q_OS_UNIX)
- #include <time.h>
-+#include <unistd.h>
- #endif
- 
- namespace QtLP_Private {
--- 
-1.7.11.1
-
diff --git a/pkgs/applications/misc/goldendict/goldendict-paths.diff b/pkgs/applications/misc/goldendict/goldendict-paths.diff
deleted file mode 100644
index 6682911dbe4..00000000000
--- a/pkgs/applications/misc/goldendict/goldendict-paths.diff
+++ /dev/null
@@ -1,10 +0,0 @@
---- goldendict.pro~	2010-12-27 22:52:21.000000000 +0100
-+++ goldendict.pro	2010-12-27 22:52:21.000000000 +0100
-@@ -63,2 +63,2 @@
--    isEmpty( PREFIX ):PREFIX = /usr/local
--    DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/apps/goldendict/\\\"
-+    isEmpty( PREFIX ):PREFIX = /
-+    DEFINES += PROGRAM_DATA_DIR=\\\"$$PREFIX/share/goldendict/\\\"
-@@ -66 +66 @@
--    locale.path = $$PREFIX/share/apps/goldendict/locale/
-+    locale.path = $$PREFIX/share/goldendict/locale/
diff --git a/pkgs/development/libraries/libeb/default.nix b/pkgs/development/libraries/libeb/default.nix
new file mode 100644
index 00000000000..9315a8f12b5
--- /dev/null
+++ b/pkgs/development/libraries/libeb/default.nix
@@ -0,0 +1,24 @@
+{ stdenv, fetchurl, perl, zlib }:
+stdenv.mkDerivation rec {
+  name = "libeb-${version}";
+  version = "4.4.3";
+
+  src = fetchurl {
+    url = "ftp://ftp.sra.co.jp/pub/misc/eb/eb-${version}.tar.bz2";
+    sha256 = "0psbdzirazfnn02hp3gsx7xxss9f1brv4ywp6a15ihvggjki1rxb";
+  };
+
+  nativeBuildInputs = [ perl ];
+  buildInputs = [ zlib ];
+
+  meta = with stdenv.lib; {
+    description = "C library for accessing Japanese CD-ROM books";
+    longDescription = ''
+      The EB library is a library for accessing CD-ROM books, which are a
+      common way to distribute electronic dictionaries in Japan.  It supports
+      the EB, EBG, EBXA, EBXA-C, S-EBXA and EPWING formats.
+    '';
+    licence = licenses.bsd3;
+    maintainers = with maintainers; [ gebner ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 88f3a035f06..f535ee5e0f5 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -6839,6 +6839,8 @@ let
 
   libeatmydata = callPackage ../development/libraries/libeatmydata { };
 
+  libeb = callPackage ../development/libraries/libeb { };
+
   libebml = callPackage ../development/libraries/libebml { };
 
   libebur128 = callPackage ../development/libraries/libebur128 { };