[arch-commits] Commit in tellico/trunk (PKGBUILD compilefix.diff)

Jan Steffens heftig at archlinux.org
Fri Apr 19 21:13:43 UTC 2019


    Date: Friday, April 19, 2019 @ 21:13:43
  Author: heftig
Revision: 452067

3.1.4-3

Added:
  tellico/trunk/compilefix.diff
Modified:
  tellico/trunk/PKGBUILD

-----------------+
 PKGBUILD        |   26 ++++++----
 compilefix.diff |  128 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 143 insertions(+), 11 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-04-19 20:58:36 UTC (rev 452066)
+++ PKGBUILD	2019-04-19 21:13:43 UTC (rev 452067)
@@ -5,7 +5,7 @@
 
 pkgname=tellico
 pkgver=3.1.4
-pkgrel=2
+pkgrel=3
 pkgdesc="A collection manager for KDE"
 arch=('x86_64')
 url="http://tellico-project.org/"
@@ -15,25 +15,29 @@
          'python2' 'solid' 'khtml' 'yaz' 'taglib' 'poppler-qt5' 'qt5-base')
 makedepends=('cmake' 'extra-cmake-modules' 'kdoctools' 'libkcddb')
 changelog=$pkgname.changelog
-source=(http://tellico-project.org/files/$pkgname-$pkgver.tar.xz)
-sha256sums=('8f611e3be8be095de38fe27d76f3ddeae09962c9aec00298031cc3e71eae95f9')
+source=(http://tellico-project.org/files/$pkgname-$pkgver.tar.xz
+        compilefix.diff)
+sha256sums=('8f611e3be8be095de38fe27d76f3ddeae09962c9aec00298031cc3e71eae95f9'
+            '7f0a13e2047b61b104dfc38e456e6d51808d3f5080e0aff97e75d6a161327069')
 
-build() {
-  cd "${srcdir}"
+prepare() {
+  cd $pkgname-$pkgver
 
-  mkdir build && cd build
+  # Fix "error: template with C linkage"
+  patch -Np1 -i ../compilefix.diff
+}
 
-  cmake ../$pkgname-$pkgver \
+build() {
+  cmake -H$pkgname-$pkgver -Bbuild \
         -DCMAKE_BUILD_TYPE=Release \
         -DCMAKE_INSTALL_PREFIX=/usr \
         -DWITH_Nepomuk=OFF
-  make
+  cmake --build build
 }
 
 package() {
-  cd "${srcdir}"/build
+  DESTDIR="${pkgdir}" cmake --build build --target install
 
-  make DESTDIR="${pkgdir}" install
-# fix python 2.7 path
+  # fix python 2.7 path
   find "${pkgdir}" -iname "*.py" | xargs sed -i 's|#!/usr/bin/env python|#!/usr/bin/env python2|'
 }

Added: compilefix.diff
===================================================================
--- compilefix.diff	                        (rev 0)
+++ compilefix.diff	2019-04-19 21:13:43 UTC (rev 452067)
@@ -0,0 +1,128 @@
+diff -u -r tellico-3.1.4/src/barcode/barcode_v4l.cpp tellico-3.1.4-compilefix/src/barcode/barcode_v4l.cpp
+--- tellico-3.1.4/src/barcode/barcode_v4l.cpp	2018-12-19 01:27:45.878263787 +0000
++++ tellico-3.1.4-compilefix/src/barcode/barcode_v4l.cpp	2019-04-19 21:00:33.821249938 +0000
+@@ -31,9 +31,7 @@
+ #include <errno.h>
+ #include <sys/ioctl.h>
+ 
+-extern "C" {
+ #include <libv4l1.h>
+-}
+ 
+ using barcodeRecognition::barcode_v4l;
+ 
+diff -u -r tellico-3.1.4/src/fetch/z3950connection.cpp tellico-3.1.4-compilefix/src/fetch/z3950connection.cpp
+--- tellico-3.1.4/src/fetch/z3950connection.cpp	2018-12-19 01:27:45.898264238 +0000
++++ tellico-3.1.4-compilefix/src/fetch/z3950connection.cpp	2019-04-19 21:00:07.934520303 +0000
+@@ -38,11 +38,9 @@
+ #include <QApplication>
+ 
+ #ifdef HAVE_YAZ
+-extern "C" {
+ #include <yaz/zoom.h>
+ #include <yaz/marcdisp.h>
+ #include <yaz/yaz-version.h>
+-}
+ #endif
+ 
+ namespace {
+diff -u -r tellico-3.1.4/src/translators/bibteximporter.h tellico-3.1.4-compilefix/src/translators/bibteximporter.h
+--- tellico-3.1.4/src/translators/bibteximporter.h	2018-12-19 01:27:45.930264959 +0000
++++ tellico-3.1.4-compilefix/src/translators/bibteximporter.h	2019-04-19 20:57:10.950756820 +0000
+@@ -29,7 +29,6 @@
+ #include "../datavectors.h"
+ 
+ #include <config.h>
+-extern "C" {
+ #ifdef HAVE_LIBBTPARSE
+ /* btparse has a struct member 'class' */
+ #define class errclass
+@@ -38,7 +37,6 @@
+ #else
+ #include "btparse/btparse.h"
+ #endif
+-}
+ 
+ #include <QList>
+ #include <QHash>
+diff -u -r tellico-3.1.4/src/translators/csvparser.cpp tellico-3.1.4-compilefix/src/translators/csvparser.cpp
+--- tellico-3.1.4/src/translators/csvparser.cpp	2018-12-19 01:27:45.930264959 +0000
++++ tellico-3.1.4-compilefix/src/translators/csvparser.cpp	2019-04-19 20:55:35.283857957 +0000
+@@ -29,13 +29,11 @@
+ 
+ #include <config.h>
+ 
+-extern "C" {
+ #ifdef HAVE_LIBCSV
+ #include <csv.h>
+ #else
+ #include "libcsv/libcsv.h"
+ #endif
+-}
+ 
+ typedef int(*SpaceFunc)(char);
+ 
+diff -u -r tellico-3.1.4/src/translators/freedb_util.cpp tellico-3.1.4-compilefix/src/translators/freedb_util.cpp
+--- tellico-3.1.4/src/translators/freedb_util.cpp	2018-12-19 01:27:45.930264959 +0000
++++ tellico-3.1.4-compilefix/src/translators/freedb_util.cpp	2019-04-19 20:54:32.787039744 +0000
+@@ -29,12 +29,10 @@
+ 
+ #include <QList>
+ 
+-extern "C" {
+ #ifdef HAVE_CDIO
+ #include <cdio/cdio.h>
+ #include <cdio/cdtext.h>
+ #endif
+-}
+ 
+ namespace {
+ #ifdef HAVE_CDIO
+diff -u -r tellico-3.1.4/src/translators/htmlexporter.cpp tellico-3.1.4-compilefix/src/translators/htmlexporter.cpp
+--- tellico-3.1.4/src/translators/htmlexporter.cpp	2018-12-19 01:27:45.934265049 +0000
++++ tellico-3.1.4-compilefix/src/translators/htmlexporter.cpp	2019-04-19 20:53:32.223559678 +0000
+@@ -61,10 +61,8 @@
+ #include <QApplication>
+ #include <QLocale>
+ 
+-extern "C" {
+ #include <libxml/HTMLparser.h>
+ #include <libxml/HTMLtree.h>
+-}
+ 
+ using Tellico::Export::HTMLExporter;
+ 
+diff -u -r tellico-3.1.4/src/translators/xslthandler.cpp tellico-3.1.4-compilefix/src/translators/xslthandler.cpp
+--- tellico-3.1.4/src/translators/xslthandler.cpp	2018-12-19 01:27:45.934265049 +0000
++++ tellico-3.1.4-compilefix/src/translators/xslthandler.cpp	2019-04-19 20:56:02.820591433 +0000
+@@ -32,14 +32,12 @@
+ #include <QTextCodec>
+ #include <QVector>
+ 
+-extern "C" {
+ #include <libxslt/xslt.h>
+ #include <libxslt/transform.h>
+ #include <libxslt/xsltutils.h>
+ #include <libxslt/extensions.h>
+ 
+ #include <libexslt/exslt.h>
+-}
+ 
+ // I don't want any network I/O at all
+ static const int xml_options = XML_PARSE_NOENT | XML_PARSE_NONET | XML_PARSE_NOCDATA;
+diff -u -r tellico-3.1.4/src/translators/xslthandler.h tellico-3.1.4-compilefix/src/translators/xslthandler.h
+--- tellico-3.1.4/src/translators/xslthandler.h	2018-12-19 01:27:45.934265049 +0000
++++ tellico-3.1.4-compilefix/src/translators/xslthandler.h	2019-04-19 20:52:38.586763182 +0000
+@@ -29,12 +29,10 @@
+ #include <QHash>
+ #include <QString>
+ 
+-extern "C" {
+ // for xmlDocPtr
+ #include <libxml/tree.h>
+ // for xsltStyleSheetPtr
+ #include <libxslt/xsltInternals.h>
+-}
+ 
+ class QUrl;
+ class QDomDocument;


More information about the arch-commits mailing list