]> git.pld-linux.org Git - packages/libextractor.git/commitdiff
- updated to 1.10 auto/th/libextractor-1.10-1
authorJakub Bogusz <qboosh@pld-linux.org>
Sat, 4 Jul 2020 18:30:21 +0000 (20:30 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Sat, 4 Jul 2020 18:30:21 +0000 (20:30 +0200)
- updated rpm5 patch
- removed obsolete pl.po-update,exiv2-0.27 patches
- added soname patch (revert accidental soname decrease)

exiv2-0.27.patch [deleted file]
libextractor-pl.po-update.patch [deleted file]
libextractor-rpm5.patch
libextractor-soname.patch [new file with mode: 0644]
libextractor.spec

diff --git a/exiv2-0.27.patch b/exiv2-0.27.patch
deleted file mode 100644 (file)
index cfdb642..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-From bbe21db4bf8face03adf0efd2eb18540582cb5ba Mon Sep 17 00:00:00 2001
-From: Andreas Sturmlechner <andreas.sturmlechner@gmail.com>
-Date: Sun, 30 Dec 2018 00:46:57 +0100
-Subject: [PATCH] Fix build with exiv2-0.27
-
----
- src/plugins/exiv2_extractor.cc | 35 +++++++++++++++++++++++++++-------
- 1 file changed, 28 insertions(+), 7 deletions(-)
-
-diff --git a/src/plugins/exiv2_extractor.cc b/src/plugins/exiv2_extractor.cc
-index 8741d40..ef402a8 100644
---- a/src/plugins/exiv2_extractor.cc
-+++ b/src/plugins/exiv2_extractor.cc
-@@ -27,10 +27,7 @@
- #include <cassert>
- #include <cstring>
- #include <math.h>
--#include <exiv2/exif.hpp>
--#include <exiv2/error.hpp>
--#include <exiv2/image.hpp>
--#include <exiv2/futils.hpp>
-+#include <exiv2/exiv2.hpp>
- /**
-  * Enable debugging to get error messages.
-@@ -180,7 +177,7 @@ public:
-    *
-    * @return -1 on error
-    */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
-   virtual size_t size (void) const;
- #else
-   virtual long int size (void) const;
-@@ -316,7 +313,11 @@ ExtractorIO::getb ()
-   const unsigned char *r;
-   if (1 != ec->read (ec->cls, &data, 1))
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-     throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
-   r = (const unsigned char *) data;
-   return *r;
- }
-@@ -371,7 +372,11 @@ ExtractorIO::putb (Exiv2::byte data)
- void
- ExtractorIO::transfer (Exiv2::BasicIo& src)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
-@@ -416,7 +421,11 @@ ExtractorIO::seek (long offset,
- Exiv2::byte *
- ExtractorIO::mmap (bool isWritable)
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
-@@ -449,7 +458,7 @@ ExtractorIO::tell (void) const
-  *
-  * @return -1 on error
-  */
--#if EXIV2_VERSION >= EXIV2_MAKE_VERSION(0,26,0)
-+#if EXIV2_TEST_VERSION(0,26,0)
- size_t
- #else
- long int
-@@ -504,7 +513,11 @@ ExtractorIO::eof () const
- std::string
- ExtractorIO::path () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
-@@ -517,7 +530,11 @@ ExtractorIO::path () const
- std::wstring
- ExtractorIO::wpath () const
- {
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
- #endif
-@@ -531,7 +548,11 @@ Exiv2::BasicIo::AutoPtr
- ExtractorIO::temporary () const
- {
-   fprintf (stderr, "throwing temporary error\n");
-+#if EXIV2_TEST_VERSION(0,27,0)
-+    throw Exiv2::BasicError<char> (Exiv2::kerDecodeLangAltQualifierFailed);
-+#else
-   throw Exiv2::BasicError<char> (42 /* error code */);
-+#endif
- }
-@@ -697,7 +718,7 @@ EXTRACTOR_exiv2_extract_method (struct EXTRACTOR_ExtractContext *ec)
- {
-   try
-     {
--#if EXIV2_MAKE_VERSION(0,23,0) <= EXIV2_VERSION
-+#if !EXIV2_TEST_VERSION(0,24,0)
-       Exiv2::LogMsg::setLevel (Exiv2::LogMsg::mute);
- #endif
-       std::auto_ptr<Exiv2::BasicIo> eio(new ExtractorIO (ec));
--- 
-2.20.1
-
diff --git a/libextractor-pl.po-update.patch b/libextractor-pl.po-update.patch
deleted file mode 100644 (file)
index 42809b5..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
---- libextractor-1.6/po/pl.po.orig     2017-10-15 21:38:52.000000000 +0200
-+++ libextractor-1.6/po/pl.po  2017-12-07 18:33:43.479681961 +0100
-@@ -5,10 +5,10 @@
- #
- msgid ""
- msgstr ""
--"Project-Id-Version: libextractor 1.0.0-pre1\n"
-+"Project-Id-Version: libextractor 1.9\n"
- "Report-Msgid-Bugs-To: libextractor@gnu.org\n"
- "POT-Creation-Date: 2019-02-10 17:43+0100\n"
--"PO-Revision-Date: 2012-12-01 15:45+0100\n"
-+"PO-Revision-Date: 2018-11-28 10:09+0100\n"
- "Last-Translator: Jakub Bogusz <qboosh@pld-linux.org>\n"
- "Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
- "Language: pl\n"
-@@ -129,9 +129,8 @@
- msgstr "Opcja --help pozwala uzyskać listę opcji.\n"
- #: src/main/extract.c:970
--#, fuzzy
- msgid "% BiBTeX file\n"
--msgstr "%% plik BiBTeX\n"
-+msgstr "% plik BiBTeX\n"
- #: src/main/extract.c:978
- #, c-format
-@@ -1693,7 +1692,6 @@
- msgstr "numer sezonu przestawienia/serialu"
- #: src/main/extractor_metatypes.c:504
--#, fuzzy
- msgid "grouping"
- msgstr "grupowanie"
-@@ -1854,32 +1852,29 @@
- msgstr "czas trwania strumienia napisów"
- #: src/main/extractor_metatypes.c:551
--#, fuzzy
- msgid "audio preview"
--msgstr "prędkosć transmisji dźwięku"
-+msgstr "podgląd dźwięku"
- #: src/main/extractor_metatypes.c:552
--#, fuzzy
- msgid "a preview of the file audio stream"
--msgstr "częstotliwość próbkowania ścieżki dźwiękowej"
-+msgstr "podgląd strumienia dźwięku z pliku"
- #: src/main/extractor_metatypes.c:554
- msgid "narinfo"
--msgstr ""
-+msgstr "narinfo"
- #: src/main/extractor_metatypes.c:555
- msgid ""
- "file containing information about contents of a normalized archive (nar)"
--msgstr ""
-+msgstr "plik zawierający informacje o zawartości archiwum znormalizowanego (nar)"
- #: src/main/extractor_metatypes.c:557
--#, fuzzy
- msgid "nar"
--msgstr "zarządca"
-+msgstr "nar"
- #: src/main/extractor_metatypes.c:558
- msgid "normalized archive"
--msgstr ""
-+msgstr "archiwum znormalizowane"
- #: src/main/extractor_metatypes.c:560 src/main/extractor_metatypes.c:561
- msgid "last"
index 91a2bb1b154a453e5adae0f79b562e75baf622e9..e3f6731608ee9b82c55297e8dcf75c12fc3c5ec6 100644 (file)
@@ -32,8 +32,8 @@ index 192a838..4ddd127 100644
  
  
  # install plugins under:
---- libextractor-1.6/src/plugins/rpm_extractor.c.orig  2017-10-15 20:44:15.000000000 +0200
-+++ libextractor-1.6/src/plugins/rpm_extractor.c       2017-12-07 18:29:10.923018408 +0100
+--- libextractor-1.10/src/plugins/rpm_extractor.c.orig 2020-03-03 12:54:56.000000000 +0100
++++ libextractor-1.10/src/plugins/rpm_extractor.c      2020-07-04 18:52:32.521839942 +0200
 @@ -25,9 +25,10 @@
  #include "platform.h"
  #include "extractor.h"
@@ -48,14 +48,14 @@ index 192a838..4ddd127 100644
  #if SOMEBSD
  #include <pthread_np.h>
  #else
-@@ -128,6 +129,7 @@ pipe_feeder (void * args)
+@@ -128,6 +129,7 @@ pipe_feeder (void *args)
   * LOG callback called by librpm.  Does nothing, we
   * just need this to override the default behavior.
   */
 +#ifdef RPMLOG_DEFAULT
  static int
  discard_log_callback (rpmlogRec rec,
-                     void *ctx)
+                       void *ctx)
 @@ -135,6 +137,9 @@ discard_log_callback (rpmlogRec rec,
    /* do nothing! */
    return 0;
@@ -89,101 +89,96 @@ index 192a838..4ddd127 100644
    FD_t fdi;
    rpmRC rc;
 @@ -286,7 +297,11 @@ EXTRACTOR_rpm_extract_method (struct EXT
-       CLOSE (parg.pi[1]);
-       return;
-     }
+     CLOSE (parg.pi[1]);
+     return;
+   }
 +#ifdef RPMLOG_DEFAULT
    rpmlogSetCallback (&discard_log_callback, NULL);
 +#else
 +  rpmlogSetCallback (&discard_log_callback);
 +#endif
    fdi = fdDup (parg.pi[0]);
-   ts = rpmtsCreate();
+   ts = rpmtsCreate ();
    rc = rpmReadPackageFile (ts, fdi, "GNU libextractor", &hdr);
-@@ -314,19 +329,38 @@ EXTRACTOR_rpm_extract_method (struct EXT
-       goto END;
-     }
+@@ -314,19 +329,35 @@ EXTRACTOR_rpm_extract_method (struct EXT
+     goto END;
+   }
    pthread_mutex_unlock (&parg.lock);
 +#ifdef H_RPMTAG
 +  hi = headerInit (hdr);
++  p = (HE_t)memset(alloca(sizeof(*p)), 0, sizeof(*p));
++  while (1 == headerNext (hi, p, 0))
 +#else
    hi = headerInitIterator (hdr);
--  p = rpmtdNew ();
--  while (1 == headerNext (hi, p))
+   p = rpmtdNew ();
+   while (1 == headerNext (hi, p))
 +#endif
-+  p = (HE_t)memset(alloca(sizeof(*p)), 0, sizeof(*p));
-+  while (1 == headerNext (hi, p, 0))
      for (i = 0; 0 != tests[i].rtype; i++)
+     {
+       if (tests[i].rtype != p->tag)
+         continue;
+-      switch (p->type)
++      switch (p->t)
        {
-       if (tests[i].rtype != p->tag)
-         continue;
--      switch (p->type)
-+      switch (p->t)
-         {
-+        case RPM_STRING_TYPE:
-+          {
-+              pthread_mutex_lock (&parg.lock);
-+              if (0 != ec->proc (ec->cls, 
-+                                "rpm",
-+                                tests[i].type,
-+                                EXTRACTOR_METAFORMAT_UTF8,
-+                                "text/plain",
-+                                p->p.str,
-+                                strlen (p->p.str) +1)) {
-+                pthread_mutex_unlock (&parg.lock);
-+                return;
-+              }
-+              pthread_mutex_unlock (&parg.lock);
-+          }
-+          break;
-         case RPM_STRING_ARRAY_TYPE:
-         case RPM_I18NSTRING_TYPE:
--        case RPM_STRING_TYPE:
--          while (NULL != (str = rpmtdNextString (p)))
-+          for(p->ix = 0; p->ix < p->c; p->ix++) 
-             {
-               pthread_mutex_lock (&parg.lock);
-               if (0 != ec->proc (ec->cls,
-@@ -334,8 +368,8 @@ EXTRACTOR_rpm_extract_method (struct EXT
-                                  tests[i].type,
-                                  EXTRACTOR_METAFORMAT_UTF8,
-                                  "text/plain",
--                                 str,
--                                 strlen (str) + 1))
-+                                 p->p.argv[p->ix],
-+                                 strlen (p->p.argv[p->ix]) + 1))
++      case RPM_STRING_TYPE:
++        {
++          pthread_mutex_lock (&parg.lock);
++          if (0 != ec->proc (ec->cls, "rpm", tests[i].type, EXTRACTOR_METAFORMAT_UTF8,
++                             "text/plain", p->p.str, strlen (p->p.str) +1)) {
++            pthread_mutex_unlock (&parg.lock);
++            return;
++          }
++          pthread_mutex_unlock (&parg.lock);
++        }
++        break;
+       case RPM_STRING_ARRAY_TYPE:
+       case RPM_I18NSTRING_TYPE:
+-      case RPM_STRING_TYPE:
+-        while (NULL != (str = rpmtdNextString (p)))
++        for(p->ix = 0; p->ix < p->c; p->ix++) 
+         {
+           pthread_mutex_lock (&parg.lock);
+           if (0 != ec->proc (ec->cls,
+@@ -334,8 +365,8 @@ EXTRACTOR_rpm_extract_method (struct EXT
+                              tests[i].type,
+                              EXTRACTOR_METAFORMAT_UTF8,
+                              "text/plain",
+-                             str,
+-                             strlen (str) + 1))
++                             p->p.argv[p->ix],
++                             strlen (p->p.argv[p->ix]) + 1))
  
-                 {
-                   pthread_mutex_unlock (&parg.lock);
-@@ -344,12 +378,12 @@ EXTRACTOR_rpm_extract_method (struct EXT
-               pthread_mutex_unlock (&parg.lock);
-             }
-           break;
--        case RPM_INT32_TYPE:
-+        case RPM_UINT32_TYPE:
-           {
-             if (p->tag == RPMTAG_BUILDTIME)
-               {
-                 char tmp[80];
--                uint32_t *v = rpmtdNextUint32 (p);
-+                uint32_t *v = p->p.ui32p;
-                 time_t tp = (time_t) *v;
+           {
+             pthread_mutex_unlock (&parg.lock);
+@@ -344,12 +375,12 @@ EXTRACTOR_rpm_extract_method (struct EXT
+           pthread_mutex_unlock (&parg.lock);
+         }
+         break;
+-      case RPM_INT32_TYPE:
++      case RPM_UINT32_TYPE:
+         {
+           if (p->tag == RPMTAG_BUILDTIME)
+           {
+             char tmp[80];
+-            uint32_t *v = rpmtdNextUint32 (p);
++            uint32_t *v = p->p.ui32p;
+             time_t tp = (time_t) *v;
  
-                   if (NULL == ctime_r (&tp, tmp))
-@@ -374,7 +408,7 @@ EXTRACTOR_rpm_extract_method (struct EXT
-             else
-               {
-                 char tmp[14];
--                uint32_t *s = rpmtdNextUint32 (p);
-+                uint32_t *s = p->p.ui32p;
+             if (NULL == ctime_r (&tp, tmp))
+@@ -374,7 +405,7 @@ EXTRACTOR_rpm_extract_method (struct EXT
+           else
+           {
+             char tmp[14];
+-            uint32_t *s = rpmtdNextUint32 (p);
++            uint32_t *s = p->p.ui32p;
  
-                 snprintf (tmp,
-                           sizeof (tmp),
-@@ -401,7 +435,6 @@ EXTRACTOR_rpm_extract_method (struct EXT
-         }
+             snprintf (tmp,
+                       sizeof (tmp),
+@@ -401,7 +432,6 @@ EXTRACTOR_rpm_extract_method (struct EXT
        }
-  CLEANUP:
+     }
+ CLEANUP:
 -  rpmtdFree (p);
    headerFreeIterator (hi);
  
 END:
+ END:
diff --git a/libextractor-soname.patch b/libextractor-soname.patch
new file mode 100644 (file)
index 0000000..c54c816
--- /dev/null
@@ -0,0 +1,13 @@
+--- libextractor-1.10/configure.ac.orig        2020-07-04 19:01:57.912110293 +0200
++++ libextractor-1.10/configure.ac     2020-07-04 19:52:13.522439997 +0200
+@@ -26,8 +26,8 @@
+ AC_CANONICAL_SYSTEM
+ LIB_VERSION_CURRENT=4
+-LIB_VERSION_REVISION=7
+-LIB_VERSION_AGE=2
++LIB_VERSION_REVISION=8
++LIB_VERSION_AGE=1
+ AC_SUBST(LIB_VERSION_CURRENT)
+ AC_SUBST(LIB_VERSION_REVISION)
+ AC_SUBST(LIB_VERSION_AGE)
index 530e0fe6fec411c9b4b6467e306aab84dbc19411..dcb71e8c93bb415f9e42eac3893d01b9920e4f7c 100644 (file)
@@ -9,16 +9,15 @@
 Summary:       Meta-data extraction library
 Summary(pl.UTF-8):     Biblioteka do ekstrakcji metadanych
 Name:          libextractor
-Version:       1.9
+Version:       1.10
 Release:       1
 License:       GPL v3+
 Group:         Libraries
-Source0:       http://ftp.gnu.org/gnu/libextractor/%{name}-%{version}.tar.gz
-# Source0-md5: abe03c652d0daf3bb9d2b6d477c4c33a
+Source0:       https://ftp.gnu.org/gnu/libextractor/%{name}-%{version}.tar.gz
+# Source0-md5: e937a97e0d34a7344af0e3a63e421e4b
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-rpm5.patch
-Patch2:                %{name}-pl.po-update.patch
-Patch3:                exiv2-0.27.patch
+Patch2:                %{name}-soname.patch
 URL:           http://www.gnu.org/software/libextractor/
 BuildRequires: autoconf >= 2.61
 BuildRequires: automake >= 1:1.11
@@ -167,7 +166,6 @@ Statyczna wersja bibliotek libextractor.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
-%patch3 -p1
 
 %{__rm} po/stamp-po
 
This page took 0.083803 seconds and 4 git commands to generate.