summary refs log tree commit diff
path: root/pkgs/development/libraries/libextractor
diff options
context:
space:
mode:
authorJohannes Rosenberger <johannes@jorsn.eu>2020-09-04 19:15:35 +0200
committerJohannes Rosenberger <johannes@jorsn.eu>2021-02-09 13:15:12 +0100
commitabc2349740d33ab4bfb8064efb4da2e41f602ff5 (patch)
treed8bcdc55e7f46197ae5cd8e2a5813a6d2562de80 /pkgs/development/libraries/libextractor
parent648d5623ba2a398b99b50913153859373cbe0bd6 (diff)
downloadnixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.tar
nixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.tar.gz
nixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.tar.bz2
nixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.tar.lz
nixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.tar.xz
nixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.tar.zst
nixpkgs-abc2349740d33ab4bfb8064efb4da2e41f602ff5.zip
libextractor: 1.9 -> 1.11
* removed upstreamed patches
* enabled installCheckPhase (they work, now!)
* bumped version
* updated license (gpl2+ -> gpl3+): according to the libextractor docs,
  it was licensed under gpl3+ since version 0.7!
* added myself as maintainer
Diffstat (limited to 'pkgs/development/libraries/libextractor')
-rw-r--r--pkgs/development/libraries/libextractor/default.nix38
-rw-r--r--pkgs/development/libraries/libextractor/fix-gcc8-build.patch16
2 files changed, 12 insertions, 42 deletions
diff --git a/pkgs/development/libraries/libextractor/default.nix b/pkgs/development/libraries/libextractor/default.nix
index 59916bfb33f..d99cf6ef621 100644
--- a/pkgs/development/libraries/libextractor/default.nix
+++ b/pkgs/development/libraries/libextractor/default.nix
@@ -1,6 +1,6 @@
 { fetchurl, lib, stdenv, substituteAll
 , libtool, gettext, zlib, bzip2, flac, libvorbis
-, exiv2, libgsf, rpm, pkg-config, fetchpatch
+, exiv2, libgsf, rpm, pkg-config
 , gstreamerSupport ? true, gst_all_1 ? null
 # ^ Needed e.g. for proper id3 and FLAC support.
 #   Set to `false` to decrease package closure size by about 87 MB (53%).
@@ -20,28 +20,15 @@ assert gtkSupport -> glib != null && gtk3 != null;
 assert videoSupport -> ffmpeg_3 != null && libmpeg2 != null;
 
 stdenv.mkDerivation rec {
-  name = "libextractor-1.9";
+  pname = "libextractor";
+  version = "1.11";
 
   src = fetchurl {
-    url = "mirror://gnu/libextractor/${name}.tar.gz";
-    sha256 = "1zz2zvikvfibxnk1va3kgzs7djsmiqy7bmk8y01vbsf54ryjb3zh";
+    url = "mirror://gnu/libextractor/${pname}-${version}.tar.gz";
+    sha256 = "sha256-FvYzq4dGo4VHxKHaP0WRGSsIJa2DxDNvBXW4WEPYvY8=";
   };
 
-  patches = [
-    ./fix-gcc8-build.patch
-    # Fixes build with exiv2 0.27
-    (fetchpatch {
-      name = "libextractor-exiv2-0.27.patch";
-      url = "https://git.archlinux.org/svntogit/community.git/plain/trunk/libextractor-exiv2-0.27.patch?h=packages/libextractor&id=4dc53f7fc69210ae571285dface108ed65d8ee53";
-      sha256 = "0w4gc1q1m1yxsd4hv105nblmif465nw3g5nxzldy0x2rl9mdncg6";
-    })
-    (fetchpatch {
-      name = "CVE-2019-15531.patch";
-      url = "https://git.gnunet.org/libextractor.git/patch/?id=d2b032452241708bee68d02aa02092cfbfba951a";
-      sha256 = "01xhcjbzv6p53wz7y2ii76kb8m9iwvnm4ip9w4a0bpgaxqz4b9fw";
-      excludes = [ "ChangeLog" ];
-    })
-  ] ++ lib.optionals gstreamerSupport [
+  patches = lib.optionals gstreamerSupport [
 
     # Libraries cannot be wrapped so we need to hardcode the plug-in paths.
     (substituteAll {
@@ -76,12 +63,11 @@ stdenv.mkDerivation rec {
 
   # Checks need to be run after "make install", otherwise plug-ins are not in
   # the search path, etc.
-  # FIXME: Tests currently fail and the test framework appears to be deeply
-  # broken anyway.
   doCheck = false;
-  #postInstall = "make check";
+  doInstallCheck = true;
+  installCheckPhase = "make check";
 
-  meta = {
+  meta = with lib; {
     description = "Simple library for keyword extraction";
 
     longDescription =
@@ -105,9 +91,9 @@ stdenv.mkDerivation rec {
          additional MIME types are detected.
       '';
 
-    license = lib.licenses.gpl2Plus;
+    license = licenses.gpl3Plus;
 
-    maintainers = [ ];
-    platforms = lib.platforms.linux;
+    maintainers = [ maintainers.jorsn ];
+    platforms = platforms.linux;
   };
 }
diff --git a/pkgs/development/libraries/libextractor/fix-gcc8-build.patch b/pkgs/development/libraries/libextractor/fix-gcc8-build.patch
deleted file mode 100644
index e04d09be899..00000000000
--- a/pkgs/development/libraries/libextractor/fix-gcc8-build.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/src/plugins/ole2_extractor.c b/src/plugins/ole2_extractor.c
-index 072ffc5..a105840 100644
---- a/src/plugins/ole2_extractor.c
-+++ b/src/plugins/ole2_extractor.c
-@@ -345,9 +345,8 @@ process_star_office (GsfInput *src,
-     gsf_input_read (src, size, (unsigned char*) buf);
-     if ( (buf[0] != 0x0F) ||
- 	 (buf[1] != 0x0) ||
--	 (0 != strncmp (&buf[2],
--			"SfxDocumentInfo",
--			strlen ("SfxDocumentInfo"))) ||
-+	 (0 != strcmp (&buf[2],
-+			"SfxDocumentInfo")) ||
- 	 (buf[0x11] != 0x0B) ||
- 	 (buf[0x13] != 0x00) || /* pw protected! */
- 	 (buf[0x12] != 0x00) )