Qt6 stuff

This commit is contained in:
Raven 2024-03-14 17:51:42 +06:00
parent 511cacb0b5
commit 102f78f6e4
29 changed files with 5871 additions and 0 deletions

View File

@ -0,0 +1,279 @@
From 0ab1f29d4ce315b0fca260c0e0f3007024d00342 Mon Sep 17 00:00:00 2001
From: Marek Kasik <mkasik@redhat.com>
Date: Tue, 28 Jan 2014 15:13:24 +0100
Subject: [PATCH] TextOutputDev: Respect orientation when selecting words
Take rotation into account when visiting selection.
This doesn't fix all problems (there are still problems
on line and block levels).
https://bugs.freedesktop.org/show_bug.cgi?id=16619
---
poppler/TextOutputDev.cc | 193 ++++++++++++++++++++++++++++++++++++-----------
1 file changed, 150 insertions(+), 43 deletions(-)
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 7c2ca78..e93908c 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -178,6 +178,12 @@
// to read the underlying image. Issue #157
#define glyphlessSelectionOpacity 0.4
+// Returns whether x is between a and b or equal to a or b.
+// a and b don't need to be sorted.
+#define XBetweenAB(x,a,b) (!(((x) > (a) && (x) > (b)) || \
+ ((x) < (a) && (x) < (b))) ? \
+ true : false)
+
namespace {
inline bool isAscii7(Unicode uchar)
@@ -4411,11 +4417,37 @@ void TextSelectionSizer::visitLine (TextLine *line,
PDFRectangle *rect;
double x1, y1, x2, y2, margin;
- margin = (line->yMax - line->yMin) / 8;
- x1 = line->edge[edge_begin];
- y1 = line->yMin - margin;
- x2 = line->edge[edge_end];
- y2 = line->yMax + margin;
+ switch (line->rot) {
+ default:
+ case 0:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ x2 = line->edge[edge_end];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 1:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_begin];
+ y2 = line->edge[edge_end];
+ break;
+ case 2:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_end];
+ x2 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 3:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_end];
+ y2 = line->edge[edge_begin];
+ break;
+ }
rect = new PDFRectangle(floor(x1 * scale), floor(y1 * scale), ceil(x2 * scale), ceil(y2 * scale));
list->push_back(rect);
@@ -4499,19 +4531,56 @@ void TextSelectionPainter::visitLine (TextLine *line,
{
double x1, y1, x2, y2, margin;
- margin = (line->yMax - line->yMin) / 8;
- x1 = floor(line->edge[edge_begin]);
- y1 = floor(line->yMin - margin);
- x2 = ceil(line->edge[edge_end]);
- y2 = ceil(line->yMax + margin);
+ switch (line->rot) {
+ default:
+ case 0:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_begin];
+ x2 = line->edge[edge_end];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 1:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_begin];
+ y2 = line->edge[edge_end];
+ break;
+ case 2:
+ margin = (line->yMax - line->yMin) / 8;
+ x1 = line->edge[edge_end];
+ x2 = line->edge[edge_begin];
+ y1 = line->yMin - margin;
+ y2 = line->yMax + margin;
+ break;
+ case 3:
+ margin = (line->xMax - line->xMin) / 8;
+ x1 = line->xMin - margin;
+ x2 = line->xMax + margin;
+ y1 = line->edge[edge_end];
+ y2 = line->edge[edge_begin];
+ break;
+ }
+
+ ctm.transform(x1, y1, &x1, &y1);
+ ctm.transform(x2, y2, &x2, &y2);
- ctm.transform(line->edge[edge_begin], line->yMin - margin, &x1, &y1);
- ctm.transform(line->edge[edge_end], line->yMax + margin, &x2, &y2);
+ if (x1 < x2) {
+ x1 = floor(x1);
+ x2 = ceil(x2);
+ } else {
+ x1 = ceil(x1);
+ x2 = floor(x2);
+ }
- x1 = floor(x1);
- y1 = floor(y1);
- x2 = ceil(x2);
- y2 = ceil(y2);
+ if (y1 < y2) {
+ y1 = floor(y1);
+ y2 = ceil(y2);
+ } else {
+ y1 = ceil(y1);
+ y2 = floor(y2);
+ }
ictm.transform(x1, y1, &x1, &y1);
ictm.transform(x2, y2, &x2, &y2);
@@ -4589,17 +4658,26 @@ void TextWord::visitSelection(TextSelectionVisitor *visitor,
void TextWord::visitSelection(TextSelectionVisitor *visitor, const PDFRectangle *selection, SelectionStyle style)
{
int i, begin, end;
- double mid;
+ double mid, s1, s2;
+
+ if (rot == 0 || rot == 2) {
+ s1 = selection->x1;
+ s2 = selection->x2;
+ } else {
+ s1 = selection->y1;
+ s2 = selection->y2;
+ }
begin = len;
end = 0;
for (i = 0; i < len; i++) {
mid = (edge[i] + edge[i + 1]) / 2;
- if (selection->x1 < mid || selection->x2 < mid)
- if (i < begin)
- begin = i;
- if (mid < selection->x1 || mid < selection->x2)
- end = i + 1;
+ if (XBetweenAB (mid, s1, s2)) {
+ if (i < begin)
+ begin = i;
+
+ end = i + 1;
+ }
}
/* Skip empty selection. */
@@ -4615,26 +4694,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
TextWord *p, *begin, *end, *current;
int i, edge_begin, edge_end;
PDFRectangle child_selection;
+ double s1, s2, p_min, p_max;
+
+ if (rot == 0 || rot == 2) {
+ s1 = selection->x1;
+ s2 = selection->x2;
+ } else {
+ s1 = selection->y1;
+ s2 = selection->y2;
+ }
begin = nullptr;
end = nullptr;
current = nullptr;
for (p = words; p != nullptr; p = p->next) {
+ if (rot == 0 || rot == 2) {
+ p_min = p->xMin;
+ p_max = p->xMax;
+ } else {
+ p_min = p->yMin;
+ p_max = p->yMax;
+ }
+
if (blk->page->primaryLR) {
- if ((selection->x1 < p->xMax) || (selection->x2 < p->xMax))
- if (begin == nullptr)
- begin = p;
+ if (((s1 < p_max) || (s2 < p_max)) && begin == nullptr)
+ begin = p;
- if (((selection->x1 > p->xMin) || (selection->x2 > p->xMin)) && (begin != nullptr)) {
+ if (((s1 > p_min) || (s2 > p_min)) && begin != nullptr) {
end = p->next;
current = p;
}
} else {
- if ((selection->x1 > p->xMin) || (selection->x2 > p->xMin))
- if (begin == nullptr)
- begin = p;
+ if (((s1 > p_min) || (s2 > p_min)) && begin == nullptr)
+ begin = p;
- if (((selection->x1 < p->xMax) || (selection->x2 < p->xMax)) && (begin != nullptr)) {
+ if (((s1 < p_max) || (s2 < p_max)) && begin != nullptr) {
end = p->next;
current = p;
}
@@ -4650,23 +4740,41 @@ void TextLine::visitSelection(TextSelectionVisitor *visitor,
child_selection = *selection;
if (style == selectionStyleWord) {
- child_selection.x1 = begin ? begin->xMin : xMin;
- if (end && end->xMax != -1) {
- child_selection.x2 = current->xMax;
+ if (rot == 0 || rot == 2) {
+ child_selection.x1 = begin ? begin->xMin : xMin;
+ if (end && end->xMax != -1) {
+ child_selection.x2 = current->xMax;
+ } else {
+ child_selection.x2 = xMax;
+ }
} else {
- child_selection.x2 = xMax;
+ child_selection.y1 = begin ? begin->yMin : yMin;
+ if (end && end->yMax != -1) {
+ child_selection.y2 = current->yMax;
+ } else {
+ child_selection.y2 = yMax;
+ }
}
}
+ if (rot == 0 || rot == 2) {
+ s1 = child_selection.x1;
+ s2 = child_selection.x2;
+ } else {
+ s1 = child_selection.y1;
+ s2 = child_selection.y2;
+ }
+
edge_begin = len;
edge_end = 0;
for (i = 0; i < len; i++) {
double mid = (edge[i] + edge[i + 1]) / 2;
- if (child_selection.x1 < mid || child_selection.x2 < mid)
- if (i < edge_begin)
- edge_begin = i;
- if (mid < child_selection.x2 || mid < child_selection.x1)
- edge_end = i + 1;
+ if (XBetweenAB (mid, s1, s2)) {
+ if (i < edge_begin)
+ edge_begin = i;
+
+ edge_end = i + 1;
+ }
}
/* Skip empty selection. */
--
1.8.4.2

View File

@ -0,0 +1,205 @@
--- poppler/glib/poppler-document.cc
+++ poppler/glib/poppler-document.cc
@@ -3405,6 +3405,7 @@ PopplerFormField *poppler_document_get_f
unsigned fieldNum;
FormPageWidgets *widgets;
FormWidget *field;
+ PopplerFormField *formField;
FormWidget::decodeID(id, &pageNum, &fieldNum);
@@ -3417,8 +3418,14 @@ PopplerFormField *poppler_document_get_f
return nullptr;
field = widgets->getWidget(fieldNum);
- if (field)
- return _poppler_form_field_new(document, field);
+ if (field) {
+ formField = _poppler_form_field_new(document, field);
+ delete widgets;
+
+ return formField;
+ }
+
+ delete widgets;
return nullptr;
}
--- poppler/poppler/CairoOutputDev.cc
+++ poppler/poppler/CairoOutputDev.cc
@@ -2921,8 +2921,10 @@ void CairoOutputDev::setMimeData(GfxStat
// colorspace in stream dict may be different from colorspace in jpx
// data
- if (strKind == strJPX && colorSpace)
+ if (strKind == strJPX && colorSpace) {
+ delete colorSpace;
return;
+ }
// only embed mime data for gray, rgb, and cmyk colorspaces.
if (colorSpace) {
--- poppler/poppler/TextOutputDev.cc
+++ poppler/poppler/TextOutputDev.cc
@@ -1619,7 +1619,6 @@ TextBlock::~TextBlock()
void TextBlock::addWord(TextWord *word)
{
- pool->addWord(word);
if (xMin > xMax) {
xMin = word->xMin;
xMax = word->xMax;
@@ -1639,6 +1638,7 @@ void TextBlock::addWord(TextWord *word)
yMax = word->yMax;
}
}
+ pool->addWord(word);
}
void TextBlock::coalesce(const UnicodeMap *uMap, double fixedPitch)
@@ -3064,11 +3064,13 @@ void TextPage::coalesce(bool physLayout,
word0 = pool->getPool(startBaseIdx);
pool->setPool(startBaseIdx, word0->next);
word0->next = nullptr;
- blk = new TextBlock(this, rot);
- blk->addWord(word0);
fontSize = word0->fontSize;
minBase = maxBase = word0->base;
+
+ blk = new TextBlock(this, rot);
+ blk->addWord(word0);
+
colSpace1 = minColSpacing1 * fontSize;
colSpace2 = minColSpacing2 * fontSize;
lineSpace = maxLineSpacingDelta * fontSize;
@@ -3095,9 +3097,9 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
+ newMinBase = word2->base;
blk->addWord(word2);
found = true;
- newMinBase = word2->base;
} else {
word0 = word1;
word1 = word1->next;
@@ -3123,9 +3125,9 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
+ newMaxBase = word2->base;
blk->addWord(word2);
found = true;
- newMaxBase = word2->base;
} else {
word0 = word1;
word1 = word1->next;
@@ -3198,12 +3200,12 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
- blk->addWord(word2);
if (word2->base < minBase) {
minBase = word2->base;
} else if (word2->base > maxBase) {
maxBase = word2->base;
}
+ blk->addWord(word2);
found = true;
break;
} else {
@@ -3246,12 +3248,12 @@ void TextPage::coalesce(bool physLayout,
}
word1 = word1->next;
word2->next = nullptr;
- blk->addWord(word2);
if (word2->base < minBase) {
minBase = word2->base;
} else if (word2->base > maxBase) {
maxBase = word2->base;
}
+ blk->addWord(word2);
found = true;
break;
} else {
--- poppler/poppler/XRef.cc
+++ poppler/poppler/XRef.cc
@@ -402,6 +402,7 @@ int XRef::reserve(int newSize)
void *p = greallocn_checkoverflow(entries, realNewSize, sizeof(XRefEntry));
if (p == nullptr) {
+ entries = nullptr;
return 0;
}
@@ -835,7 +836,6 @@ bool XRef::constructXRef(bool *wasRecons
int offset = 0;
resize(0); // free entries properly
- gfree(entries);
capacity = 0;
size = 0;
entries = nullptr;
--- poppler/test/pdf-inspector.cc
+++ poppler/test/pdf-inspector.cc
@@ -43,6 +43,7 @@ class PdfInspector
{
public:
PdfInspector();
+ ~PdfInspector();
void set_file_name(const char *file_name);
void load(const char *file_name);
@@ -108,6 +109,11 @@ PdfInspector::PdfInspector()
load(nullptr);
}
+PdfInspector::~PdfInspector(void)
+{
+ delete output;
+}
+
void PdfInspector::set_file_name(const char *file_name)
{
GtkWidget *widget;
--- poppler/utils/HtmlOutputDev.cc
+++ poppler/utils/HtmlOutputDev.cc
@@ -1337,6 +1337,7 @@ void HtmlOutputDev::drawPngImage(GfxStat
// TODO can we calculate the resolution of the image?
if (!writer->init(f1, width, height, 72, 72)) {
error(errInternal, -1, "Can't init PNG for image '{0:t}'", fName);
+ delete fName;
delete writer;
fclose(f1);
return;
--- poppler/utils/pdftotext.cc
+++ poppler/utils/pdftotext.cc
@@ -329,6 +329,7 @@ int main(int argc, char *argv[])
fputs("<pre>\n", f);
if (f != stdout) {
fclose(f);
+ f = nullptr;
}
}
}
@@ -348,8 +349,9 @@ int main(int argc, char *argv[])
printWordBBox(f, doc, textOut, firstPage, lastPage);
}
}
- if (f != stdout) {
+ if (f != stdout && f != nullptr) {
fclose(f);
+ f = nullptr;
}
} else {
textOut = new TextOutputDev(textFileName->c_str(), physLayout, fixedPitch, rawOrder, htmlMeta, discardDiag);
@@ -390,7 +392,7 @@ int main(int argc, char *argv[])
fputs("</pre>\n", f);
fputs("</body>\n", f);
fputs("</html>\n", f);
- if (f != stdout) {
+ if (f != stdout && f != nullptr) {
fclose(f);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,21 @@
From dcd5bd8238ea448addd102ff045badd0aca1b990 Mon Sep 17 00:00:00 2001
From: crt <chluo@cse.cuhk.edu.hk>
Date: Wed, 27 Jul 2022 08:40:02 +0000
Subject: pdfseparate: Check XRef's Catalog for being a Dict
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 351140af..c26a41c4 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -886,6 +886,10 @@ int PDFDoc::savePageAs(const GooString &name, int pageNo)
// get and mark output intents etc.
Object catObj = getXRef()->getCatalog();
+ if (!catObj.isDict()) {
+ error(errSyntaxError, -1, "XRef's Catelog is not a dictionary");
+ return errOpenFile;
+ }
Dict *catDict = catObj.getDict();
Object pagesObj = catDict->lookup("Pages");
Object afObj = catDict->lookupNF("AcroForm").copy();

View File

@ -0,0 +1,27 @@
--- a/CMakeLists.txt 2020-11-02 00:32:52.000000000 +0600
+++ b/CMakeLists.txt 2024-02-29 14:50:11.536603635 +0600
@@ -780,6 +780,9 @@
if(ENABLE_QT5)
poppler_create_install_pkgconfig(poppler-qt5.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
+ if(ENABLE_QT6)
+ poppler_create_install_pkgconfig(poppler-qt6.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ endif()
if(ENABLE_GLIB)
poppler_create_install_pkgconfig(poppler-glib.pc ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
endif()
--- /dev/null 2024-02-29 11:08:23.708972384 +0600
+++ b/poppler-qt6.pc.cmake 2024-02-29 14:47:00.321779149 +0600
@@ -0,0 +1,12 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+libdir=@CMAKE_INSTALL_FULL_LIBDIR@
+includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
+
+Name: poppler-qt6
+Description: Qt6 bindings for poppler
+Version: @POPPLER_VERSION@
+Requires: @PC_REQUIRES@
+@PC_REQUIRES_PRIVATE@
+
+Libs: -L${libdir} -lpoppler-qt6
+Cflags: -I${includedir}/poppler/qt6

View File

@ -0,0 +1,35 @@
From 4f478daa6a9734b8f269a6586bdce2909844bb6f Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 23 Dec 2020 23:52:58 +0100
Subject: Fix opening files by some generators that are a bit broken
But Adobe opens it and it's easy to fix
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 66d3f04a..c36c747a 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -45,6 +45,7 @@
#include <cctype>
#include <climits>
#include <cfloat>
+#include <limits>
#include "goo/gfile.h"
#include "goo/gmem.h"
#include "Object.h"
@@ -793,8 +794,13 @@ bool XRef::readXRefStreamSection(Stream *xrefStr, const int *w, int first, int n
gen = (gen << 8) + c;
}
if (gen > INT_MAX) {
- error(errSyntaxError, -1, "Gen inside xref table too large (bigger than INT_MAX)");
- return false;
+ if (i == 0 && gen == std::numeric_limits<uint32_t>::max()) {
+ // workaround broken generators
+ gen = 65535;
+ } else {
+ error(errSyntaxError, -1, "Gen inside xref table too large (bigger than INT_MAX)");
+ return false;
+ }
}
if (entries[i].offset == -1) {
switch (type) {

View File

@ -0,0 +1,30 @@
--- poppler-20.11.0/glib/poppler-attachment.cc
+++ poppler-20.11.0/glib/poppler-attachment.cc
@@ -114,17 +114,21 @@ PopplerAttachment *_poppler_attachment_n
if (embFile->createDate()) {
priv->ctime = _poppler_convert_pdf_date_to_date_time(embFile->createDate());
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* This will overflow on dates from after 2038. This field is
- * deprecated, only kept for backward compatibility. */
- attachment->ctime = (GTime)g_date_time_to_unix(priv->ctime);
+ if (priv->ctime != NULL) {
+ /* This will overflow on dates from after 2038. This field is
+ * deprecated, only kept for backward compatibility. */
+ attachment->ctime = (GTime)g_date_time_to_unix(priv->ctime);
+ }
G_GNUC_END_IGNORE_DEPRECATIONS
}
if (embFile->modDate()) {
priv->mtime = _poppler_convert_pdf_date_to_date_time(embFile->modDate());
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
- /* This will overflow on dates from after 2038. This field is
- * deprecated, only kept for backward compatibility. */
- attachment->mtime = (GTime)g_date_time_to_unix(priv->mtime);
+ if (priv->mtime != NULL) {
+ /* This will overflow on dates from after 2038. This field is
+ * deprecated, only kept for backward compatibility. */
+ attachment->mtime = (GTime)g_date_time_to_unix(priv->mtime);
+ }
G_GNUC_END_IGNORE_DEPRECATIONS
}

View File

@ -0,0 +1,34 @@
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -1757,6 +1757,9 @@ void PDFDoc::replacePageDict(int pageNo,
{
Ref *refPage = getCatalog()->getPageRef(pageNo);
Object page = getXRef()->fetch(*refPage);
+ if (!page.isDict()) {
+ return;
+ }
Dict *pageDict = page.getDict();
pageDict->remove("MediaBoxssdf");
pageDict->remove("MediaBox");
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -293,9 +293,18 @@ int main(int argc, char *argv[])
const PDFRectangle *cropBox = nullptr;
if (docs[i]->getCatalog()->getPage(j)->isCropped())
cropBox = docs[i]->getCatalog()->getPage(j)->getCropBox();
- docs[i]->replacePageDict(j, docs[i]->getCatalog()->getPage(j)->getRotate(), docs[i]->getCatalog()->getPage(j)->getMediaBox(), cropBox);
Ref *refPage = docs[i]->getCatalog()->getPageRef(j);
Object page = docs[i]->getXRef()->fetch(*refPage);
+ if (!page.isDict()) {
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ error(errSyntaxError, -1, "PDFDoc::replacePageDict failed.");
+ return -1;
+ } else {
+ docs[i]->replacePageDict(j, docs[i]->getCatalog()->getPage(j)->getRotate(), docs[i]->getCatalog()->getPage(j)->getMediaBox(), cropBox);
+ }
Dict *pageDict = page.getDict();
Object *resDict = docs[i]->getCatalog()->getPage(j)->getResourceDictObject();
if (resDict->isDict()) {

View File

@ -0,0 +1,45 @@
From 3cc28b66132e66ed2dfe13a9a285ac41ac7267d5 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Wed, 23 Dec 2020 23:27:02 +0100
Subject: [PATCH] FoFiType1C: Fix crashes with broken files
---
fofi/FoFiType1C.cc | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/fofi/FoFiType1C.cc b/fofi/FoFiType1C.cc
index 0387b0a87..4c2e9a770 100644
--- a/fofi/FoFiType1C.cc
+++ b/fofi/FoFiType1C.cc
@@ -194,7 +194,6 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo
Type1CIndexVal val;
GooString *buf;
char buf2[256];
- const char **enc;
bool ok;
int i;
@@ -299,9 +298,9 @@ void FoFiType1C::convertToType1(const char *psName, const char **newEncoding, bo
} else {
(*outputFunc)(outputStream, "256 array\n", 10);
(*outputFunc)(outputStream, "0 1 255 {1 index exch /.notdef put} for\n", 40);
- enc = newEncoding ? newEncoding : (const char **)encoding;
+ const char **enc = newEncoding ? newEncoding : (const char **)encoding;
for (i = 0; i < 256; ++i) {
- if (enc[i]) {
+ if (enc && enc[i]) {
buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]);
(*outputFunc)(outputStream, buf->c_str(), buf->getLength());
delete buf;
@@ -1945,7 +1944,7 @@ bool FoFiType1C::parse()
readPrivateDict(0, 0, &privateDicts[0]);
} else {
getIndex(topDict.fdArrayOffset, &fdIdx, &parsedOk);
- if (!parsedOk) {
+ if (!parsedOk || fdIdx.len <= 0) {
return false;
}
nFDs = fdIdx.len;
--
GitLab

View File

@ -0,0 +1,58 @@
From 81044c64b9ed9a10ae82a28bac753060bdfdac74 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Tue, 15 Mar 2022 15:14:32 +0100
Subject: Hints::readTables: bail out if we run out of file when reading
Fixes #1230
diff --git a/poppler/Hints.cc b/poppler/Hints.cc
index 79f04088..4707e1c6 100644
--- a/poppler/Hints.cc
+++ b/poppler/Hints.cc
@@ -5,7 +5,7 @@
// This file is licensed under the GPLv2 or later
//
// Copyright 2010, 2012 Hib Eris <hib@hiberis.nl>
-// Copyright 2010, 2011, 2013, 2014, 2016-2019 Albert Astals Cid <aacid@kde.org>
+// Copyright 2010, 2011, 2013, 2014, 2016-2019, 2021, 2022 Albert Astals Cid <aacid@kde.org>
// Copyright 2010, 2013 Pino Toscano <pino@kde.org>
// Copyright 2013 Adrian Johnson <ajohnson@redneon.com>
// Copyright 2014 Fabio D'Urso <fabiodurso@hotmail.it>
@@ -189,21 +189,31 @@ void Hints::readTables(BaseStream *str, Linearization *linearization, XRef *xref
char *p = &buf[0];
if (hintsOffset && hintsLength) {
- Stream *s = str->makeSubStream(hintsOffset, false, hintsLength, Object(objNull));
+ std::unique_ptr<Stream> s(str->makeSubStream(hintsOffset, false, hintsLength, Object(objNull)));
s->reset();
for (unsigned int i = 0; i < hintsLength; i++) {
- *p++ = s->getChar();
+ const int c = s->getChar();
+ if (unlikely(c == EOF)) {
+ error(errSyntaxWarning, -1, "Found EOF while reading hints");
+ ok = false;
+ return;
+ }
+ *p++ = c;
}
- delete s;
}
if (hintsOffset2 && hintsLength2) {
- Stream *s = str->makeSubStream(hintsOffset2, false, hintsLength2, Object(objNull));
+ std::unique_ptr<Stream> s(str->makeSubStream(hintsOffset2, false, hintsLength2, Object(objNull)));
s->reset();
for (unsigned int i = 0; i < hintsLength2; i++) {
- *p++ = s->getChar();
+ const int c = s->getChar();
+ if (unlikely(c == EOF)) {
+ error(errSyntaxWarning, -1, "Found EOF while reading hints2");
+ ok = false;
+ return;
+ }
+ *p++ = c;
}
- delete s;
}
MemStream *memStream = new MemStream(&buf[0], 0, bufLength, Object(objNull));

View File

@ -0,0 +1,26 @@
From 27354e9d9696ee2bc063910a6c9a6b27c5184a52 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 25 Aug 2022 00:14:22 +0200
Subject: JBIG2Stream: Fix crash on broken file
https://github.com/jeffssh/CVE-2021-30860
Thanks to David Warren for the heads up
diff --git a/poppler/JBIG2Stream.cc b/poppler/JBIG2Stream.cc
index 662276e5..9f70431d 100644
--- a/poppler/JBIG2Stream.cc
+++ b/poppler/JBIG2Stream.cc
@@ -1976,7 +1976,11 @@ void JBIG2Stream::readTextRegionSeg(unsigned int segNum, bool imm, bool lossless
for (i = 0; i < nRefSegs; ++i) {
if ((seg = findSegment(refSegs[i]))) {
if (seg->getType() == jbig2SegSymbolDict) {
- numSyms += ((JBIG2SymbolDict *)seg)->getSize();
+ const unsigned int segSize = ((JBIG2SymbolDict *)seg)->getSize();
+ if (unlikely(checkedAdd(numSyms, segSize, &numSyms))) {
+ error(errSyntaxError, getPos(), "Too many symbols in JBIG2 text region");
+ return;
+ }
} else if (seg->getType() == jbig2SegCodeTable) {
codeTables->push_back(seg);
}

View File

@ -0,0 +1,48 @@
From efb68686784f0c58668b7ced990fd173e09346db Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Thu, 18 Aug 2022 23:41:24 +0200
Subject: pdfunite: Don't crash in broken documents
diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
index 86e75555..a154f40d 100644
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -106,16 +106,21 @@ static void doMergeNameDict(PDFDoc *doc, XRef *srcXRef, XRef *countRef, int oldR
}
}
-static void doMergeFormDict(Dict *srcFormDict, Dict *mergeFormDict, int numOffset)
+static bool doMergeFormDict(Dict *srcFormDict, Dict *mergeFormDict, int numOffset)
{
Object srcFields = srcFormDict->lookup("Fields");
Object mergeFields = mergeFormDict->lookup("Fields");
if (srcFields.isArray() && mergeFields.isArray()) {
for (int i = 0; i < mergeFields.arrayGetLength(); i++) {
const Object &value = mergeFields.arrayGetNF(i);
+ if (!value.isRef()) {
+ error(errSyntaxError, -1, "Fields object is not a Ref.");
+ return false;
+ }
srcFields.arrayAdd(Object({ value.getRef().num + numOffset, value.getRef().gen }));
}
}
+ return true;
}
///////////////////////////////////////////////////////////////////////////
@@ -332,7 +337,13 @@ int main(int argc, char *argv[])
if (afObj.isNull()) {
afObj = pageCatDict->lookupNF("AcroForm").copy();
} else if (afObj.isDict()) {
- doMergeFormDict(afObj.getDict(), pageForm.getDict(), numOffset);
+ if (!doMergeFormDict(afObj.getDict(), pageForm.getDict(), numOffset)) {
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ return -1;
+ }
}
}
objectsCount += docs[i]->writePageObjects(outStr, yRef, numOffset, true);

View File

@ -0,0 +1,41 @@
From 4631115647c1e4f0482ffe0491c2f38d2231337b Mon Sep 17 00:00:00 2001
From: crt <chluo@cse.cuhk.edu.hk>
Date: Fri, 29 Jul 2022 20:51:11 +0000
Subject: Check isDict before calling getDict
Issue #1276
diff --git a/utils/pdfunite.cc b/utils/pdfunite.cc
index b96b0378..050927d3 100644
--- a/utils/pdfunite.cc
+++ b/utils/pdfunite.cc
@@ -197,6 +197,14 @@ int main(int argc, char *argv[])
Object ocObj;
if (docs.size() >= 1) {
Object catObj = docs[0]->getXRef()->getCatalog();
+ if(!catObj.isDict()){
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ error(errSyntaxError, -1, "XRef's Catalog is not a dictionary.");
+ return -1;
+ }
Dict *catDict = catObj.getDict();
intents = catDict->lookup("OutputIntents");
afObj = catDict->lookupNF("AcroForm").copy();
@@ -295,6 +303,14 @@ int main(int argc, char *argv[])
}
}
Object pageCatObj = docs[i]->getXRef()->getCatalog();
+ if(!pageCatObj.isDict()){
+ fclose(f);
+ delete yRef;
+ delete countRef;
+ delete outStr;
+ error(errSyntaxError, -1, "XRef's Catalog is not a dictionary.");
+ return -1;
+ }
Dict *pageCatDict = pageCatObj.getDict();
Object pageNames = pageCatDict->lookup("Names");
if (!pageNames.isNull() && pageNames.isDict()) {

View File

@ -0,0 +1,12 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: poppler-qt6
Description: Qt6 bindings for poppler
Version: @POPPLER_VERSION@
Requires: @PC_REQUIRES@
@PC_REQUIRES_PRIVATE@
Libs: -L${libdir} -lpoppler-qt6
Cflags: -I${includedir}/poppler/qt6

1179
poppler/poppler.spec Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,367 @@
From fd1bc29594c6dee8b65c294c1c8595349f5cfdb2 Mon Sep 17 00:00:00 2001
From: Ahmad Samir <a.samirh78@gmail.com>
Date: Sun, 5 Dec 2021 20:41:08 +0200
Subject: [PATCH] Change CMake code to enable building against Qt 5 or 6
- forward declaring QStringList doesn't work with Qt6, instead #include it
(for Qt6 we could use 'using QStringList = QList<QString>' but that wouldn't
work with Qt5, and it's not worth an #ifdef, QStringList is common in Qt
and KDE code anyway)
- Add a copy constructor to PolkitQt1::Details, required because of QMetaType
and the QESDP d-pointer
By default this builds with Qt5, to build with Qt6 pass -DQT_MAJOR_VERSION=6
to cmake.
---
CMakeLists.txt | 28 ++++++++++++++++------------
agent/CMakeLists.txt | 4 ++--
core/CMakeLists.txt | 4 ++--
core/polkitqt1-authority.h | 2 +-
core/polkitqt1-details.cpp | 2 ++
core/polkitqt1-details.h | 5 +++++
examples/CMakeLists.txt | 14 +++++++-------
examples/agent/CMakeLists.txt | 4 ++--
gui/CMakeLists.txt | 6 +++---
polkit-qt5-agent-1.pc.cmake | 2 +-
polkit-qt5-core-1.pc.cmake | 2 +-
polkit-qt5-gui-1.pc.cmake | 2 +-
polkit-qt6-1.pc.cmake | 11 +++++++++++
polkit-qt6-agent-1.pc.cmake | 11 +++++++++++
polkit-qt6-core-1.pc.cmake | 11 +++++++++++
polkit-qt6-gui-1.pc.cmake | 11 +++++++++++
test/CMakeLists.txt | 8 ++++----
17 files changed, 91 insertions(+), 36 deletions(-)
create mode 100644 polkit-qt6-1.pc.cmake
create mode 100644 polkit-qt6-agent-1.pc.cmake
create mode 100644 polkit-qt6-core-1.pc.cmake
create mode 100644 polkit-qt6-gui-1.pc.cmake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd0977e..166c177 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,19 +24,23 @@ include(FeatureSummary)
set(REQUIRED_QT_VERSION 5.5.0)
set(CMAKE_CXX_STANDARD 11)
-find_package(Qt5 ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core DBus Widgets)
+if (NOT QT_MAJOR_VERSION)
+ set(QT_MAJOR_VERSION "5")
+endif()
+
+find_package(Qt${QT_MAJOR_VERSION} ${REQUIRED_QT_VERSION} REQUIRED COMPONENTS Core DBus Widgets)
find_package(PkgConfig REQUIRED)
-set(POLKITQT-1_PCNAME "polkit-qt5-1")
-set(POLKITQT-1_CORE_PCNAME "polkit-qt5-core-1")
-set(POLKITQT-1_GUI_PCNAME "polkit-qt5-gui-1")
-set(POLKITQT-1_AGENT_PCNAME "polkit-qt5-agent-1")
-set(POLKITQT-1_CAMEL_NAME "PolkitQt5-1")
-set(POLKITQT-1_EXAMPLE "polkit-example-qt5")
-set(POLKITQT-1_EXAMPLE_HELPER "polkit-example-helper-qt5")
-set(POLKITQT-1_AGENT_EXAMPLE "polkit-agent-example-qt5")
-set(POLKITQT-1_INCLUDE_PATH "polkit-qt5-1")
+set(POLKITQT-1_PCNAME "polkit-qt${QT_MAJOR_VERSION}-1")
+set(POLKITQT-1_CORE_PCNAME "polkit-qt${QT_MAJOR_VERSION}-core-1")
+set(POLKITQT-1_GUI_PCNAME "polkit-qt${QT_MAJOR_VERSION}-gui-1")
+set(POLKITQT-1_AGENT_PCNAME "polkit-qt${QT_MAJOR_VERSION}-agent-1")
+set(POLKITQT-1_CAMEL_NAME "PolkitQt${QT_MAJOR_VERSION}-1")
+set(POLKITQT-1_EXAMPLE "polkit-example-qt${QT_MAJOR_VERSION}")
+set(POLKITQT-1_EXAMPLE_HELPER "polkit-example-helper-qt${QT_MAJOR_VERSION}")
+set(POLKITQT-1_AGENT_EXAMPLE "polkit-agent-example-qt${QT_MAJOR_VERSION}")
+set(POLKITQT-1_INCLUDE_PATH "polkit-qt${QT_MAJOR_VERSION}-1")
pkg_check_modules(POLKIT_GOBJECT polkit-gobject-1 REQUIRED IMPORTED_TARGET)
pkg_check_modules(POLKIT_AGENT polkit-agent-1 REQUIRED IMPORTED_TARGET)
@@ -168,13 +172,13 @@ install(EXPORT ${POLKITQT-1_CAMEL_NAME}Export FILE ${POLKITQT-1_CAMEL_NAME}Targe
option(BUILD_EXAMPLES "Builds a set of examples for polkit-qt-1" OFF)
if (BUILD_EXAMPLES)
- find_package(Qt5Xml ${REQUIRED_QT_VERSION} REQUIRED)
+ find_package(Qt${QT_MAJOR_VERSION}Xml ${REQUIRED_QT_VERSION} REQUIRED)
add_subdirectory(examples)
endif (BUILD_EXAMPLES)
option(BUILD_TEST "Builds unit tests for polkit-qt-1" OFF)
if (BUILD_TEST)
- find_package(Qt5Test ${REQUIRED_QT_VERSION} REQUIRED)
+ find_package(Qt${QT_MAJOR_VERSION}Test ${REQUIRED_QT_VERSION} REQUIRED)
add_subdirectory(test)
endif (BUILD_TEST)
diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt
index 1a86cd8..ba95bfe 100644
--- a/agent/CMakeLists.txt
+++ b/agent/CMakeLists.txt
@@ -14,10 +14,10 @@ generate_export_header(${POLKITQT-1_AGENT_PCNAME}
target_link_libraries(${POLKITQT-1_AGENT_PCNAME}
PUBLIC
- Qt5::Core
+ Qt${QT_MAJOR_VERSION}::Core
${POLKITQT-1_CORE_PCNAME}
PRIVATE
- Qt5::Core
+ Qt${QT_MAJOR_VERSION}::Core
PkgConfig::POLKIT_AGENT
PkgConfig::GOBJECT
)
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 8225871..29bccc7 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -17,9 +17,9 @@ generate_export_header(${POLKITQT-1_CORE_PCNAME}
target_link_libraries(${POLKITQT-1_CORE_PCNAME}
PUBLIC
- Qt5::Core
+ Qt${QT_MAJOR_VERSION}::Core
PRIVATE
- Qt5::DBus
+ Qt${QT_MAJOR_VERSION}::DBus
PkgConfig::POLKIT_GOBJECT
PkgConfig::GLIB2
PkgConfig::GOBJECT
diff --git a/core/polkitqt1-authority.h b/core/polkitqt1-authority.h
index 43527b0..d2d66ba 100644
--- a/core/polkitqt1-authority.h
+++ b/core/polkitqt1-authority.h
@@ -19,9 +19,9 @@
#include <QObject>
#include <QMetaType>
+#include <QStringList>
typedef struct _PolkitAuthority PolkitAuthority;
-class QStringList;
/**
* \namespace PolkitQt1 PolkitQt
diff --git a/core/polkitqt1-details.cpp b/core/polkitqt1-details.cpp
index 50568ff..b5be7ee 100644
--- a/core/polkitqt1-details.cpp
+++ b/core/polkitqt1-details.cpp
@@ -56,6 +56,8 @@ Details::~Details()
{
}
+Details::Details(const Details &other) = default;
+
Details& Details::operator=(const PolkitQt1::Details& other)
{
d = other.d;
diff --git a/core/polkitqt1-details.h b/core/polkitqt1-details.h
index 7fb8448..59dfcb6 100644
--- a/core/polkitqt1-details.h
+++ b/core/polkitqt1-details.h
@@ -48,6 +48,11 @@ public:
*/
explicit Details(PolkitDetails *pkDetails);
+ /**
+ * Copy constructor.
+ */
+ Details(const Details &other);
+
~Details();
Details &operator=(const Details &other);
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 229e97a..32577af 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -11,9 +11,9 @@ target_sources(${POLKITQT-1_EXAMPLE} PRIVATE
)
target_link_libraries(${POLKITQT-1_EXAMPLE}
- Qt5::Core
- Qt5::DBus
- Qt5::Widgets
+ Qt${QT_MAJOR_VERSION}::Core
+ Qt${QT_MAJOR_VERSION}::DBus
+ Qt${QT_MAJOR_VERSION}::Widgets
${POLKITQT-1_GUI_PCNAME}
${POLKITQT-1_CORE_PCNAME}
)
@@ -34,7 +34,7 @@ endmacro(dbus_add_activation_system_service _sources)
add_executable(${POLKITQT-1_EXAMPLE_HELPER})
-qt5_add_dbus_adaptor(polkit_example_helper_dbus_SRCS
+qt_add_dbus_adaptor(polkit_example_helper_dbus_SRCS
org.qt.policykit.examples.xml
PkExampleHelper.h
PkExampleHelper
@@ -48,9 +48,9 @@ target_sources(${POLKITQT-1_EXAMPLE_HELPER} PRIVATE
# see our helper is pretty small :D
target_link_libraries(${POLKITQT-1_EXAMPLE_HELPER}
- Qt5::Core
- Qt5::Xml
- Qt5::DBus
+ Qt${QT_MAJOR_VERSION}::Core
+ Qt${QT_MAJOR_VERSION}::Xml
+ Qt${QT_MAJOR_VERSION}::DBus
${POLKITQT-1_GUI_PCNAME}
)
diff --git a/examples/agent/CMakeLists.txt b/examples/agent/CMakeLists.txt
index 020c686..130ac4e 100644
--- a/examples/agent/CMakeLists.txt
+++ b/examples/agent/CMakeLists.txt
@@ -7,8 +7,8 @@ target_sources(${POLKITQT-1_AGENT_EXAMPLE} PRIVATE
)
target_link_libraries(${POLKITQT-1_AGENT_EXAMPLE}
- Qt5::Core
- Qt5::Widgets
+ Qt${QT_MAJOR_VERSION}::Core
+ Qt${QT_MAJOR_VERSION}::Widgets
${POLKITQT-1_AGENT_PCNAME}
${POLKITQT-1_CORE_PCNAME}
PkgConfig::POLKIT_AGENT
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index c22deba..69ec1f6 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -15,10 +15,10 @@ generate_export_header(${POLKITQT-1_CORE_PCNAME}
target_link_libraries(${POLKITQT-1_GUI_PCNAME}
PUBLIC
${POLKITQT-1_CORE_PCNAME}
- Qt5::Widgets
+ Qt${QT_MAJOR_VERSION}::Widgets
PRIVATE
- Qt5::Core
- Qt5::DBus
+ Qt${QT_MAJOR_VERSION}::Core
+ Qt${QT_MAJOR_VERSION}::DBus
)
set_target_properties(${POLKITQT-1_GUI_PCNAME} PROPERTIES VERSION ${POLKITQT-1_LIBRARY_VERSION}
diff --git a/polkit-qt5-agent-1.pc.cmake b/polkit-qt5-agent-1.pc.cmake
index 709a24e..60b22d5 100644
--- a/polkit-qt5-agent-1.pc.cmake
+++ b/polkit-qt5-agent-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_AGENT_PCNAME@
Description: Convenience library for using polkit Agent with a Qt-styled API
Version: @POLKITQT-1_VERSION_STRING@
-Requires: Qt5Core Qt5Gui
+Requires: Qt@QT_MAJOR_VERSION@Core Qt@QT_MAJOR_VERSION@Gui
Libs: -L${libdir} -l@POLKITQT-1_AGENT_PCNAME@
Cflags: -I${includedir}
diff --git a/polkit-qt5-core-1.pc.cmake b/polkit-qt5-core-1.pc.cmake
index 588f267..2f5d562 100644
--- a/polkit-qt5-core-1.pc.cmake
+++ b/polkit-qt5-core-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_CORE_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: Qt5Core
+Requires: Qt@QT_MAJOR_VERSION@Core
Libs: -L${libdir} -l@POLKITQT-1_CORE_PCNAME@
Cflags: -I${includedir}
diff --git a/polkit-qt5-gui-1.pc.cmake b/polkit-qt5-gui-1.pc.cmake
index 1c012dd..1d208fb 100644
--- a/polkit-qt5-gui-1.pc.cmake
+++ b/polkit-qt5-gui-1.pc.cmake
@@ -6,6 +6,6 @@ includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_GUI_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API, GUI classes
Version: @POLKITQT-1_VERSION_STRING@
-Requires: Qt5Core Qt5Gui @POLKITQT-1_CORE_PCNAME@
+Requires: Qt@QT_MAJOR_VERSION@Core Qt@QT_MAJOR_VERSION@Gui @POLKITQT-1_CORE_PCNAME@
Libs: -L${libdir} -l@POLKITQT-1_GUI_PCNAME@
Cflags: -I${includedir}
diff --git a/polkit-qt6-1.pc.cmake b/polkit-qt6-1.pc.cmake
new file mode 100644
index 0000000..ba8e46e
--- /dev/null
+++ b/polkit-qt6-1.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
+
+Name: @POLKITQT-1_PCNAME@
+Description: Convenience library for using polkit with a Qt-styled API
+Version: @POLKITQT-1_VERSION_STRING@
+Requires: @POLKITQT-1_CORE_PCNAME@ @POLKITQT-1_GUI_PCNAME@ @POLKITQT-1_AGENT_PCNAME@
+Libs: -L${libdir} -l@POLKITQT-1_CORE_PCNAME@ -l@POLKITQT-1_GUI_PCNAME@ -l@POLKITQT-1_AGENT_PCNAME@
+Cflags: -I${includedir}
diff --git a/polkit-qt6-agent-1.pc.cmake b/polkit-qt6-agent-1.pc.cmake
new file mode 100644
index 0000000..60b22d5
--- /dev/null
+++ b/polkit-qt6-agent-1.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
+
+Name: @POLKITQT-1_AGENT_PCNAME@
+Description: Convenience library for using polkit Agent with a Qt-styled API
+Version: @POLKITQT-1_VERSION_STRING@
+Requires: Qt@QT_MAJOR_VERSION@Core Qt@QT_MAJOR_VERSION@Gui
+Libs: -L${libdir} -l@POLKITQT-1_AGENT_PCNAME@
+Cflags: -I${includedir}
diff --git a/polkit-qt6-core-1.pc.cmake b/polkit-qt6-core-1.pc.cmake
new file mode 100644
index 0000000..2f5d562
--- /dev/null
+++ b/polkit-qt6-core-1.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
+
+Name: @POLKITQT-1_CORE_PCNAME@
+Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes
+Version: @POLKITQT-1_VERSION_STRING@
+Requires: Qt@QT_MAJOR_VERSION@Core
+Libs: -L${libdir} -l@POLKITQT-1_CORE_PCNAME@
+Cflags: -I${includedir}
diff --git a/polkit-qt6-gui-1.pc.cmake b/polkit-qt6-gui-1.pc.cmake
new file mode 100644
index 0000000..1d208fb
--- /dev/null
+++ b/polkit-qt6-gui-1.pc.cmake
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=@CMAKE_INSTALL_PREFIX@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
+
+Name: @POLKITQT-1_GUI_PCNAME@
+Description: Convenience library for using polkit with a Qt-styled API, GUI classes
+Version: @POLKITQT-1_VERSION_STRING@
+Requires: Qt@QT_MAJOR_VERSION@Core Qt@QT_MAJOR_VERSION@Gui @POLKITQT-1_CORE_PCNAME@
+Libs: -L${libdir} -l@POLKITQT-1_GUI_PCNAME@
+Cflags: -I${includedir}
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 8403d7b..d587034 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -5,10 +5,10 @@ add_executable(polkit-qt-test
)
target_link_libraries(polkit-qt-test
- Qt5::Core
- Qt5::DBus
- Qt5::Test
- Qt5::Widgets
+ Qt${QT_MAJOR_VERSION}::Core
+ Qt${QT_MAJOR_VERSION}::DBus
+ Qt${QT_MAJOR_VERSION}::Test
+ Qt${QT_MAJOR_VERSION}::Widgets
${POLKITQT-1_CORE_PCNAME}
${POLKITQT-1_AGENT_PCNAME}
)
--
GitLab

View File

@ -0,0 +1,301 @@
From 1f151d81381106c15084280f1e11209d259ae45c Mon Sep 17 00:00:00 2001
From: John Zimmermann <me@johnnynator.dev>
Date: Sat, 19 Jun 2021 15:47:56 +0200
Subject: [PATCH] Change installed .cmake and .pc files to contain realtive
paths
The LIB_DESTINATION and INCLUDE_DESTIONATION variables do hold little
value, since one can just override the normal CMAKE variables as needed.
Furthermore using CMAKE_INSTALL_FULL_LIBDIR is harmful, since this
prevents CMake to use it's logic to install relocatable .cmake files.
Also libdir and includedir in pkgconfig files need to be prefixed by
either ${exec_prefix} or ${prefix} for the same relocation reasons.
---
CMakeLists.txt | 27 +++++++++++----------------
PolkitQt-1Config.cmake.in | 4 ++--
agent/CMakeLists.txt | 6 +++---
core/CMakeLists.txt | 6 +++---
gui/CMakeLists.txt | 6 +++---
polkit-qt-1.pc.cmake | 4 ++--
polkit-qt-agent-1.pc.cmake | 4 ++--
polkit-qt-core-1.pc.cmake | 4 ++--
polkit-qt-gui-1.pc.cmake | 4 ++--
polkit-qt5-1.pc.cmake | 4 ++--
polkit-qt5-agent-1.pc.cmake | 4 ++--
polkit-qt5-core-1.pc.cmake | 4 ++--
polkit-qt5-gui-1.pc.cmake | 4 ++--
13 files changed, 38 insertions(+), 43 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 32eb737..a82f8cb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -21,11 +21,6 @@ include(GNUInstallDirs)
include(FeatureSummary)
-# Set the different paths
-set(LIB_DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Library directory name")
-set(INCLUDE_DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}" CACHE PATH "The subdirectory to the header prefix")
-
-
set(REQUIRED_QT_VERSION 5.5.0)
set(CMAKE_CXX_STANDARD 11)
@@ -103,7 +98,7 @@ install(FILES
${CMAKE_CURRENT_BINARY_DIR}/agent/polkitqt1-agent-export.h
DESTINATION
- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH} COMPONENT Devel)
+ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH} COMPONENT Devel)
install(FILES
includes/PolkitQt1/Authority
@@ -113,40 +108,40 @@ install(FILES
includes/PolkitQt1/TemporaryAuthorization
includes/PolkitQt1/ActionDescription
DESTINATION
- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1 COMPONENT Devel)
+ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1 COMPONENT Devel)
install(FILES
includes/PolkitQt1/Gui/Action
includes/PolkitQt1/Gui/ActionButton
includes/PolkitQt1/Gui/ActionButtons
DESTINATION
- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Gui COMPONENT Devel)
+ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Gui COMPONENT Devel)
install(FILES
includes/PolkitQt1/Agent/Listener
includes/PolkitQt1/Agent/Session
DESTINATION
- ${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Agent COMPONENT Devel)
+ ${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}/PolkitQt1/Agent COMPONENT Devel)
if(NOT WIN32)
# Pkgconfig
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_PCNAME}.pc @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_CORE_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_CORE_PCNAME}.pc
@ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_CORE_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_CORE_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_GUI_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_GUI_PCNAME}.pc @ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_GUI_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_GUI_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc.cmake ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc
@ONLY)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc DESTINATION ${LIB_DESTINATION}/pkgconfig )
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${POLKITQT-1_AGENT_PCNAME}.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig )
endif(NOT WIN32)
if(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
- set(_PolkitQt-1Config_INSTALL_DIR ${LIB_DESTINATION}/cmake/${POLKITQT-1_CAMEL_NAME})
+ set(_PolkitQt-1Config_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/cmake/${POLKITQT-1_CAMEL_NAME})
else(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
- set(_PolkitQt-1Config_INSTALL_DIR ${LIB_DESTINATION}/${POLKITQT-1_CAMEL_NAME}/cmake)
+ set(_PolkitQt-1Config_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR}/${POLKITQT-1_CAMEL_NAME}/cmake)
endif(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
@@ -154,7 +149,7 @@ endif(USE_COMMON_CMAKE_PACKAGE_CONFIG_DIR)
configure_package_config_file(PolkitQt-1Config.cmake.in
${CMAKE_BINARY_DIR}/${POLKITQT-1_CAMEL_NAME}Config.cmake
INSTALL_DESTINATION ${_PolkitQt-1Config_INSTALL_DIR}
- PATH_VARS LIB_DESTINATION INCLUDE_DESTINATION
+ PATH_VARS CMAKE_INSTALL_LIBDIR CMAKE_INSTALL_INCLUDEDIR
)
write_basic_package_version_file(${CMAKE_BINARY_DIR}/${POLKITQT-1_CAMEL_NAME}ConfigVersion.cmake
diff --git a/PolkitQt-1Config.cmake.in b/PolkitQt-1Config.cmake.in
index f39480c..e09678c 100644
--- a/PolkitQt-1Config.cmake.in
+++ b/PolkitQt-1Config.cmake.in
@@ -20,9 +20,9 @@ if(NOT POLKITQT-1_INSTALL_DIR)
set(POLKITQT-1_INSTALL_DIR "@CMAKE_INSTALL_PREFIX@")
endif(NOT POLKITQT-1_INSTALL_DIR)
-set_and_check(POLKITQT-1_INCLUDE_DIR "@PACKAGE_INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@")
+set_and_check(POLKITQT-1_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@")
set_and_check(POLKITQT-1_INCLUDE_DIRS "${POLKITQT-1_INCLUDE_DIR}")
-set_and_check(POLKITQT-1_LIB_DIR "@PACKAGE_LIB_DESTINATION@")
+set_and_check(POLKITQT-1_LIB_DIR "@PACKAGE_CMAKE_INSTALL_LIBDIR@")
set(POLKITQT-1_POLICY_FILES_INSTALL_DIR "${POLKITQT-1_INSTALL_DIR}/share/polkit-1/actions")
##################################
diff --git a/agent/CMakeLists.txt b/agent/CMakeLists.txt
index ccf2711..1a86cd8 100644
--- a/agent/CMakeLists.txt
+++ b/agent/CMakeLists.txt
@@ -29,11 +29,11 @@ set_target_properties(${POLKITQT-1_AGENT_PCNAME} PROPERTIES VERSION ${POLKITQT-1
target_include_directories(${POLKITQT-1_AGENT_PCNAME}
INTERFACE
- $<INSTALL_INTERFACE:${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
-install(TARGETS ${POLKITQT-1_AGENT_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${LIB_DESTINATION}
- LIBRARY DESTINATION ${LIB_DESTINATION}
+install(TARGETS ${POLKITQT-1_AGENT_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION bin)
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
index 3a80adc..8225871 100644
--- a/core/CMakeLists.txt
+++ b/core/CMakeLists.txt
@@ -32,12 +32,12 @@ set_target_properties(${POLKITQT-1_CORE_PCNAME} PROPERTIES VERSION ${POLKITQT-1_
target_include_directories(${POLKITQT-1_CORE_PCNAME}
INTERFACE
- $<INSTALL_INTERFACE:${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
-install(TARGETS ${POLKITQT-1_CORE_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${LIB_DESTINATION}
- LIBRARY DESTINATION ${LIB_DESTINATION}
+install(TARGETS ${POLKITQT-1_CORE_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION bin)
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt
index d9d800d..c22deba 100644
--- a/gui/CMakeLists.txt
+++ b/gui/CMakeLists.txt
@@ -28,11 +28,11 @@ set_target_properties(${POLKITQT-1_GUI_PCNAME} PROPERTIES VERSION ${POLKITQT-1_L
target_include_directories(${POLKITQT-1_GUI_PCNAME}
INTERFACE
- $<INSTALL_INTERFACE:${INCLUDE_DESTINATION}/${POLKITQT-1_INCLUDE_PATH}>
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${POLKITQT-1_INCLUDE_PATH}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
)
-install(TARGETS ${POLKITQT-1_GUI_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${LIB_DESTINATION}
- LIBRARY DESTINATION ${LIB_DESTINATION}
+install(TARGETS ${POLKITQT-1_GUI_PCNAME} EXPORT ${POLKITQT-1_CAMEL_NAME}Export ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION bin)
diff --git a/polkit-qt-1.pc.cmake b/polkit-qt-1.pc.cmake
index 7cc55a9..ba8e46e 100644
--- a/polkit-qt-1.pc.cmake
+++ b/polkit-qt-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API
diff --git a/polkit-qt-agent-1.pc.cmake b/polkit-qt-agent-1.pc.cmake
index 001925d..23b2cae 100644
--- a/polkit-qt-agent-1.pc.cmake
+++ b/polkit-qt-agent-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_AGENT_PCNAME@
Description: Convenience library for using polkit Agent with a Qt-styled API
diff --git a/polkit-qt-core-1.pc.cmake b/polkit-qt-core-1.pc.cmake
index ca435a6..fa501f0 100644
--- a/polkit-qt-core-1.pc.cmake
+++ b/polkit-qt-core-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_CORE_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes
diff --git a/polkit-qt-gui-1.pc.cmake b/polkit-qt-gui-1.pc.cmake
index e7279d1..7261b0c 100644
--- a/polkit-qt-gui-1.pc.cmake
+++ b/polkit-qt-gui-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_GUI_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API, GUI classes
diff --git a/polkit-qt5-1.pc.cmake b/polkit-qt5-1.pc.cmake
index 7cc55a9..ba8e46e 100644
--- a/polkit-qt5-1.pc.cmake
+++ b/polkit-qt5-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API
diff --git a/polkit-qt5-agent-1.pc.cmake b/polkit-qt5-agent-1.pc.cmake
index fabc0db..709a24e 100644
--- a/polkit-qt5-agent-1.pc.cmake
+++ b/polkit-qt5-agent-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_AGENT_PCNAME@
Description: Convenience library for using polkit Agent with a Qt-styled API
diff --git a/polkit-qt5-core-1.pc.cmake b/polkit-qt5-core-1.pc.cmake
index 33687c2..588f267 100644
--- a/polkit-qt5-core-1.pc.cmake
+++ b/polkit-qt5-core-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_CORE_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API, non-GUI classes
diff --git a/polkit-qt5-gui-1.pc.cmake b/polkit-qt5-gui-1.pc.cmake
index 4280226..1c012dd 100644
--- a/polkit-qt5-gui-1.pc.cmake
+++ b/polkit-qt5-gui-1.pc.cmake
@@ -1,7 +1,7 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=@LIB_DESTINATION@
-includedir=@INCLUDE_DESTINATION@/@POLKITQT-1_INCLUDE_PATH@
+libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
+includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/@POLKITQT-1_INCLUDE_PATH@
Name: @POLKITQT-1_GUI_PCNAME@
Description: Convenience library for using polkit with a Qt-styled API, GUI classes
--
GitLab

View File

@ -0,0 +1,36 @@
From e6a3603b1f07cd85dbd84377afeda0777d6535e8 Mon Sep 17 00:00:00 2001
From: Zhang Dingyuan <justforlxz@gmail.com>
Date: Tue, 14 Jun 2022 11:37:40 +0800
Subject: [PATCH] fix: memory leak
agent listener does not reclaim private memory after destructing.
Use `QScopedPointer` to protect private pointers from being copied and to
reclaim memory properly.
---
agent/polkitqt1-agent-listener.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/agent/polkitqt1-agent-listener.h b/agent/polkitqt1-agent-listener.h
index 07fe03a..a40ff41 100644
--- a/agent/polkitqt1-agent-listener.h
+++ b/agent/polkitqt1-agent-listener.h
@@ -9,6 +9,7 @@
#define POLKITQT1_AGENT_LISTENER_H
#include <QObject>
+#include <QScopedPointer>
#include "polkitqt1-agent-session.h"
@@ -137,7 +138,7 @@ public Q_SLOTS:
virtual void cancelAuthentication() = 0;
private:
- ListenerPrivate * const d;
+ QScopedPointer<ListenerPrivate> d;
};
}
--
GitLab

View File

@ -0,0 +1,111 @@
From 05ccd34825b8fe1beb87012b7ff8f7fe5de6bfb9 Mon Sep 17 00:00:00 2001
From: Volker Krause <vkrause@kde.org>
Date: Sun, 26 Dec 2021 16:45:40 +0100
Subject: [PATCH] Unexport nested private classes
Nested classes follow the export specifiction of their outer class, which
isn't what was intended here.
---
core/polkitqt1-actiondescription.cpp | 2 +-
core/polkitqt1-authority.cpp | 2 +-
core/polkitqt1-details.cpp | 2 +-
core/polkitqt1-identity.cpp | 2 +-
core/polkitqt1-subject.cpp | 2 +-
core/polkitqt1-temporaryauthorization.cpp | 2 +-
gui/polkitqt1-gui-action.cpp | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/core/polkitqt1-actiondescription.cpp b/core/polkitqt1-actiondescription.cpp
index c08f5c4..198e1ac 100644
--- a/core/polkitqt1-actiondescription.cpp
+++ b/core/polkitqt1-actiondescription.cpp
@@ -15,7 +15,7 @@
namespace PolkitQt1
{
-class ActionDescription::Data : public QSharedData
+class Q_DECL_HIDDEN ActionDescription::Data : public QSharedData
{
public:
Data() {}
diff --git a/core/polkitqt1-authority.cpp b/core/polkitqt1-authority.cpp
index 73dd97e..24173e5 100644
--- a/core/polkitqt1-authority.cpp
+++ b/core/polkitqt1-authority.cpp
@@ -64,7 +64,7 @@ ActionDescription::List actionsToListAndFree(GList *glist)
return result;
}
-class Authority::Private
+class Q_DECL_HIDDEN Authority::Private
{
public:
// Polkit will return NULL on failures, hence we use it instead of 0
diff --git a/core/polkitqt1-details.cpp b/core/polkitqt1-details.cpp
index ba107b1..50568ff 100644
--- a/core/polkitqt1-details.cpp
+++ b/core/polkitqt1-details.cpp
@@ -14,7 +14,7 @@
namespace PolkitQt1
{
-class Details::Data : public QSharedData
+class Q_DECL_HIDDEN Details::Data : public QSharedData
{
public:
Data() {}
diff --git a/core/polkitqt1-identity.cpp b/core/polkitqt1-identity.cpp
index 0924c5a..24584b8 100644
--- a/core/polkitqt1-identity.cpp
+++ b/core/polkitqt1-identity.cpp
@@ -14,7 +14,7 @@
namespace PolkitQt1
{
-class Identity::Data : public QSharedData
+class Q_DECL_HIDDEN Identity::Data : public QSharedData
{
public:
Data() : identity(nullptr) {}
diff --git a/core/polkitqt1-subject.cpp b/core/polkitqt1-subject.cpp
index 3dae3bd..bed7c5e 100644
--- a/core/polkitqt1-subject.cpp
+++ b/core/polkitqt1-subject.cpp
@@ -15,7 +15,7 @@
namespace PolkitQt1
{
-class Subject::Data : public QSharedData
+class Q_DECL_HIDDEN Subject::Data : public QSharedData
{
public:
Data()
diff --git a/core/polkitqt1-temporaryauthorization.cpp b/core/polkitqt1-temporaryauthorization.cpp
index ae40f3b..a19841e 100644
--- a/core/polkitqt1-temporaryauthorization.cpp
+++ b/core/polkitqt1-temporaryauthorization.cpp
@@ -13,7 +13,7 @@
namespace PolkitQt1
{
-class TemporaryAuthorization::Data : public QSharedData
+class Q_DECL_HIDDEN TemporaryAuthorization::Data : public QSharedData
{
public:
Data() {}
diff --git a/gui/polkitqt1-gui-action.cpp b/gui/polkitqt1-gui-action.cpp
index 324ce56..38354b0 100644
--- a/gui/polkitqt1-gui-action.cpp
+++ b/gui/polkitqt1-gui-action.cpp
@@ -22,7 +22,7 @@ namespace Gui
/**
* \internal
*/
-class Action::Private
+class Q_DECL_HIDDEN Action::Private
{
public:
Private(Action *p);
--
GitLab

View File

@ -0,0 +1,165 @@
%bcond_with qt5
Name: polkit-qt-1
Version: 0.114.0
Release: 7%{?dist}
Summary: Qt bindings for PolicyKit
License: GPLv2+
URL: https://api.kde.org/kdesupport-api/polkit-qt-1-apidocs/
Source0: http://download.kde.org/stable/%{name}/polkit-qt-1-%{version}.tar.xz
Patch0: polkit-qt-1-change-installec-cmake-and-pc-files-to-contain-relatives.patch
Patch1: polkit-qt-1-unexport-nested-private-classes.patch
Patch2: polkit-qt-1-change-cmake-code-to-enable-buildint-against-qt6.patch
Patch3: polkit-qt-1-fix-memory-leak.patch
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: pkgconfig(polkit-agent-1)
BuildRequires: pkgconfig(polkit-gobject-1)
%description
Polkit-qt is a library that lets developers use the PolicyKit API
through a nice Qt-styled API.
%if %{with qt5}
%package -n polkit-qt5-1
Summary: PolicyKit Qt5 bindings
BuildRequires: pkgconfig(Qt5DBus)
BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Widgets)
Obsoletes: polkit-qt5 < 0.112.0-3
Provides: polkit-qt5 = %{version}-%{release}
%description -n polkit-qt5-1
Polkit-qt is a library that lets developers use the PolicyKit API
through a nice Qt-styled API.
%package -n polkit-qt5-1-devel
Summary: Development files for PolicyKit Qt5 bindings
Obsoletes: polkit-qt5-devel < 0.112.0-3
Provides: polkit-qt5-devel = %{version}-%{release}
Requires: polkit-qt5-1%{?_isa} = %{version}-%{release}
%description -n polkit-qt5-1-devel
%{summary}.
%endif
%package -n polkit-qt6-1
Summary: PolicyKit Qt6 bindings
BuildRequires: pkgconfig(Qt6DBus)
BuildRequires: pkgconfig(Qt6Gui)
BuildRequires: pkgconfig(Qt6Widgets)
%description -n polkit-qt6-1
Polkit-qt is a library that lets developers use the PolicyKit API
through a nice Qt-styled API.
%package -n polkit-qt6-1-devel
Summary: Development files for PolicyKit Qt5 bindings
Requires: polkit-qt6-1%{?_isa} = %{version}-%{release}
%description -n polkit-qt6-1-devel
%{summary}.
%prep
%autosetup -n %{name}-%{version} -p1
%build
%if %{with qt5}
%global _vpath_builddir %{_target_platform}-qt5
%cmake -DBUILD_EXAMPLES:BOOL=OFF -DQT_MAJOR_VERSION=5
%cmake_build
%endif
%global _vpath_builddir %{_target_platform}-qt6
%cmake -DBUILD_EXAMPLES:BOOL=OFF -DQT_MAJOR_VERSION=6
%cmake_build
%install
%if %{with qt5}
%global _vpath_builddir %{_target_platform}-qt5
%cmake_install
%endif
%global _vpath_builddir %{_target_platform}-qt6
%cmake_install
%if %{with qt5}
%files -n polkit-qt5-1
%doc AUTHORS README
%license LICENSES/*
%{_libdir}/libpolkit-qt5-core-1.so.1*
%{_libdir}/libpolkit-qt5-gui-1.so.1*
%{_libdir}/libpolkit-qt5-agent-1.so.1*
%files -n polkit-qt5-1-devel
%{_includedir}/polkit-qt5-1/
%{_libdir}/libpolkit-qt5-core-1.so
%{_libdir}/libpolkit-qt5-gui-1.so
%{_libdir}/libpolkit-qt5-agent-1.so
%{_libdir}/pkgconfig/polkit-qt5-1.pc
%{_libdir}/pkgconfig/polkit-qt5-core-1.pc
%{_libdir}/pkgconfig/polkit-qt5-gui-1.pc
%{_libdir}/pkgconfig/polkit-qt5-agent-1.pc
%{_libdir}/cmake/PolkitQt5-1/
%endif
%files -n polkit-qt6-1
%doc AUTHORS README
%license LICENSES/*
%{_libdir}/libpolkit-qt6-core-1.so.1*
%{_libdir}/libpolkit-qt6-gui-1.so.1*
%{_libdir}/libpolkit-qt6-agent-1.so.1*
%files -n polkit-qt6-1-devel
%{_includedir}/polkit-qt6-1/
%{_libdir}/libpolkit-qt6-core-1.so
%{_libdir}/libpolkit-qt6-gui-1.so
%{_libdir}/libpolkit-qt6-agent-1.so
%{_libdir}/pkgconfig/polkit-qt6-1.pc
%{_libdir}/pkgconfig/polkit-qt6-core-1.pc
%{_libdir}/pkgconfig/polkit-qt6-gui-1.pc
%{_libdir}/pkgconfig/polkit-qt6-agent-1.pc
%{_libdir}/cmake/PolkitQt6-1/
%changelog
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.114.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Mar 02 2023 Jan Grulich <jgrulich@redhat.com> - 0.114.0-6
- Add Qt6 support
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.114.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.114.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.114.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.114.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 21 2021 Rex Dieter <rdieter@fedoraproject.org> - 0.114.0-1
- polkit-qt-1-0.114.0
- .spec cleanup
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.113.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Aug 21 2020 Troy Dawson <tdawson@redhat.com> - 0.113.0-5
- Fix FTBFS - cmake issues (#1863703)
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.113.0-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.113.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.113.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Oct 31 2019 Rex Dieter <rdieter@fedoraproject.org> - 0.113.0-1
- new qt5-only polkit-qt-1 package, let polkit-qt remain for qt4 legacy

View File

@ -0,0 +1,20 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ec527c..1969afc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -252,13 +252,13 @@ if(NOT WIN32)
set(PKGCONFIG_LIBS "-L\${libdir} -l${QCA_LIB_NAME}")
endif()
- if(NOT BUILD_WITH_QT6)
+ # if(NOT BUILD_WITH_QT6)
# qca2.pc uses absolute paths. So it must be there. Don't rellocate this.
configure_file("qca2.pc.cmake" "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}" @ONLY)
if(NOT DEVELOPER_MODE)
install(FILES "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/pkgconfig/${QCA_PC_NAME}" DESTINATION ${PKGCONFIG_INSTALL_PREFIX})
endif()
- endif()
+ # endif()
endif()
# strip CMAKE_INSTALL_PREFIX in all paths

690
qt6/qca/qca.spec Normal file
View File

@ -0,0 +1,690 @@
%if 0%{?fedora} < 34 && 0%{?rhel} < 9
%global botan 1
%endif
%bcond_without qt5
%bcond_without qt6
#global doc 1
%global tests 1
Name: qca
Summary: Qt Cryptographic Architecture
Version: 2.3.7
Release: 3%{?dist}
License: LGPLv2+
URL: https://userbase.kde.org/QCA
Source0: http://download.kde.org/stable/qca/%{version}/qca-%{version}.tar.xz
# Also generate pkgconfig file for qt6
Patch0: qca-qt6-pkgconfig.patch
## upstream patches
## upstreamable patches
BuildRequires: cmake >= 2.8.12
BuildRequires: gcc-c++
BuildRequires: libgcrypt-devel
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(nss)
BuildRequires: pkgconfig(libpkcs11-helper-1)
BuildRequires: pkgconfig(libsasl2)
%if 0%{?doc}
# apidocs
# may need to add some tex-related ones too -- rex
BuildRequires: doxygen-latex
BuildRequires: graphviz
%endif
%description
Taking a hint from the similarly-named Java Cryptography Architecture,
QCA aims to provide a straightforward and cross-platform crypto API,
using Qt datatypes and conventions. QCA separates the API from the
implementation, using plugins known as Providers. The advantage of this
model is to allow applications to avoid linking to or explicitly depending
on any particular cryptographic library. This allows one to easily change
or upgrade crypto implementations without even needing to recompile the
application!
%if %{with qt5}
%package qt5
Summary: Qt5 Cryptographic Architecture
BuildRequires: pkgconfig(Qt5Core)
%if ! 0%{?botan}
Obsoletes: qca-qt5-botan < %{version}-%{release}
%endif
# most runtime consumers seem to assume the ossl plugin be present
Recommends: %{name}-qt5-ossl%{?_isa}
%description qt5
Taking a hint from the similarly-named Java Cryptography Architecture,
QCA aims to provide a straightforward and cross-platform crypto API,
using Qt datatypes and conventions. QCA separates the API from the
implementation, using plugins known as Providers. The advantage of this
model is to allow applications to avoid linking to or explicitly depending
on any particular cryptographic library. This allows one to easily change
or upgrade crypto implementations without even needing to recompile the
application!
%package qt5-devel
Summary: Qt5 Cryptographic Architecture development files
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-devel
%{summary}.
%if 0%{?botan}
%package qt5-botan
Summary: Botan plugin for the Qt5 Cryptographic Architecture
BuildRequires: pkgconfig(botan-2)
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-botan
%{summary}.
%endif
%package qt5-cyrus-sasl
Summary: Cyrus-SASL plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-cyrus-sasl
%{summary}.
%package qt5-gcrypt
Summary: Gcrypt plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-gcrypt
%{summary}.
%package qt5-gnupg
Summary: Gnupg plugin for the Qt Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
Requires: gnupg
%description qt5-gnupg
%{summary}.
%package qt5-logger
Summary: Logger plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-logger
%{summary}.
%package qt5-nss
Summary: Nss plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-nss
%{summary}.
%package qt5-ossl
Summary: Openssl plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-ossl
%{summary}.
%package qt5-pkcs11
Summary: Pkcs11 plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-pkcs11
%{summary}.
%package qt5-softstore
Summary: Pkcs11 plugin for the Qt5 Cryptographic Architecture
Requires: %{name}-qt5%{?_isa} = %{version}-%{release}
%description qt5-softstore
%{summary}.
%endif
%if %{with qt6}
%package qt6
BuildRequires: pkgconfig(Qt6Core)
BuildRequires: pkgconfig(Qt6Core5Compat)
Summary: Qt6 Cryptographic Architecture
# most runtime consumers seem to assume the ossl plugin be present
Recommends: %{name}-qt6-ossl%{?_isa}
%description qt6
Taking a hint from the similarly-named Java Cryptography Architecture,
QCA aims to provide a straightforward and cross-platform crypto API,
using Qt datatypes and conventions. QCA separates the API from the
implementation, using plugins known as Providers. The advantage of this
model is to allow applications to avoid linking to or explicitly depending
on any particular cryptographic library. This allows one to easily change
or upgrade crypto implementations without even needing to recompile the
application!
%package qt6-devel
Summary: Qt6 Cryptographic Architecture development files
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-devel
%{summary}.
%if 0%{?botan}
%package qt6-botan
Summary: Botan plugin for the Qt6 Cryptographic Architecture
BuildRequires: pkgconfig(botan-2)
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-botan
%{summary}.
%endif
%package qt6-cyrus-sasl
Summary: Cyrus-SASL plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-cyrus-sasl
%{summary}.
%package qt6-gcrypt
Summary: Gcrypt plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-gcrypt
%{summary}.
%package qt6-gnupg
Summary: Gnupg plugin for the Qt Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
Requires: gnupg
%description qt6-gnupg
%{summary}.
%package qt6-logger
Summary: Logger plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-logger
%{summary}.
%package qt6-nss
Summary: Nss plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-nss
%{summary}.
%package qt6-ossl
Summary: Openssl plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-ossl
%{summary}.
%package qt6-pkcs11
Summary: Pkcs11 plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-pkcs11
%{summary}.
%package qt6-softstore
Summary: Pkcs11 plugin for the Qt6 Cryptographic Architecture
Requires: %{name}-qt6%{?_isa} = %{version}-%{release}
%description qt6-softstore
%{summary}.
%endif
%prep
%autosetup -p1
%build
cmake_opts="-Wno-dev \
-DBUILD_TESTS:BOOL=%{?tests:ON}%{!?tests:OFF} \
-DQCA_INSTALL_IN_QT_PREFIX:BOOL=ON \
-DQCA_BINARY_INSTALL_DIR:STRING=%{_bindir} \
-DQCA_MAN_INSTALL_DIR:PATH=%{_mandir} \
-DWITH_botan_PLUGIN:BOOL=%{?botan:ON}%{?!botan:OFF}"
%if %{with qt5}
%define _vpath_builddir %{_target_platform}-qt5
%cmake $cmake_opts \
-DQCA_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir} \
-DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=%{_qt5_headerdir}
%cmake_build
%endif
%if %{with qt6}
%define _vpath_builddir %{_target_platform}-qt6
%cmake $cmake_opts \
-DQT6=ON \
-DQCA_INCLUDE_INSTALL_DIR:PATH=%{_qt6_headerdir} \
-DQCA_PRIVATE_INCLUDE_INSTALL_DIR:PATH=%{_qt6_headerdir}
%cmake_build
%endif
%if 0%{?doc}
%cmake_build --target doc
%endif
%install
%define _vpath_builddir %{_target_platform}-qt5
%cmake_install
%if %{with qt6}
%define _vpath_builddir %{_target_platform}-qt6
%cmake_install
%endif
%if 0%{?doc}
# no make install target for docs yet
mkdir -p %{buildroot}%{_docdir}/qca
cp -a %{_target_platform}/apidocs/html/ \
%{buildroot}%{_docdir}/qca/
%endif
%check
%if %{with qt5}
%if 0%{?test}
%define _vpath_builddir %{_target_platform}-qt5
export CTEST_OUTPUT_ON_FAILURE=1
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
# skip slow archs
%ifnarch %{arm} ppc64 s390x
test "$(pkg-config --modversion qca2-qt5)" = "%{version}"
%ctest --timeout 180
%endif
%endif
%endif
%if %{with qt6}
%if 0%{?test}
%define _vpath_builddir %{_target_platform}-qt6
export CTEST_OUTPUT_ON_FAILURE=1
export PKG_CONFIG_PATH=%{buildroot}%{_libdir}/pkgconfig
# skip slow archs
%ifnarch %{arm} ppc64 s390x
test "$(pkg-config --modversion qca2-qt6)" = "%{version}"
%ctest --timeout 180
%endif
%endif
%endif
%if 0%{?doc}
%files doc
%{_docdir}/qca/html/
%endif
%if %{with qt5}
%files qt5
%doc README TODO
%license COPYING
%{_bindir}/mozcerts-qt5
%{_bindir}/qcatool-qt5
%{_mandir}/man1/qcatool-qt5.1*
%{_qt5_libdir}/libqca-qt5.so.2*
%dir %{_qt5_plugindir}/crypto/
%files qt5-devel
%{_qt5_headerdir}/QtCrypto
%{_qt5_libdir}/libqca-qt5.so
%{_libdir}/pkgconfig/qca2-qt5.pc
%{_libdir}/cmake/Qca-qt5/
%{_qt5_archdatadir}/mkspecs/features/crypto.prf
%if 0%{?botan}
%files qt5-botan
%doc plugins/qca-botan/README
%{_qt5_plugindir}/crypto/libqca-botan.so
%endif
%files qt5-cyrus-sasl
%doc plugins/qca-gcrypt/README
%{_qt5_plugindir}/crypto/libqca-cyrus-sasl.so
%files qt5-gcrypt
%{_qt5_plugindir}/crypto/libqca-gcrypt.so
%files qt5-gnupg
%doc plugins/qca-cyrus-sasl/README
%{_qt5_plugindir}/crypto/libqca-gnupg.so
%files qt5-logger
%doc plugins/qca-logger/README
%{_qt5_plugindir}/crypto/libqca-logger.so
%files qt5-nss
%doc plugins/qca-nss/README
%{_qt5_plugindir}/crypto/libqca-nss.so
%files qt5-ossl
%doc plugins/qca-ossl/README
%{_qt5_plugindir}/crypto/libqca-ossl.so
%files qt5-pkcs11
%doc plugins/qca-pkcs11/README
%{_qt5_plugindir}/crypto/libqca-pkcs11.so
%files qt5-softstore
%doc plugins/qca-softstore/README
%{_qt5_plugindir}/crypto/libqca-softstore.so
%endif
%if %{with qt6}
%files qt6
%doc README TODO
%license COPYING
%{_bindir}/mozcerts-qt6
%{_bindir}/qcatool-qt6
%{_mandir}/man1/qcatool-qt6.1*
%{_qt6_libdir}/libqca-qt6.so.2*
%dir %{_qt6_plugindir}/crypto/
%files qt6-devel
%{_qt6_headerdir}/QtCrypto
%{_qt6_libdir}/libqca-qt6.so
%{_libdir}/pkgconfig/qca2-qt6.pc
%{_libdir}/cmake/Qca-qt6/
%if 0%{?botan}
%files qt6-botan
%doc plugins/qca-botan/README
%{_qt6_plugindir}/crypto/libqca-botan.so
%endif
%files qt6-cyrus-sasl
%doc plugins/qca-gcrypt/README
%{_qt6_plugindir}/crypto/libqca-cyrus-sasl.so
%files qt6-gcrypt
%{_qt6_plugindir}/crypto/libqca-gcrypt.so
%files qt6-gnupg
%doc plugins/qca-cyrus-sasl/README
%{_qt6_plugindir}/crypto/libqca-gnupg.so
%files qt6-logger
%doc plugins/qca-logger/README
%{_qt6_plugindir}/crypto/libqca-logger.so
%files qt6-nss
%doc plugins/qca-nss/README
%{_qt6_plugindir}/crypto/libqca-nss.so
%files qt6-ossl
%doc plugins/qca-ossl/README
%{_qt6_plugindir}/crypto/libqca-ossl.so
%files qt6-pkcs11
%doc plugins/qca-pkcs11/README
%{_qt6_plugindir}/crypto/libqca-pkcs11.so
%files qt6-softstore
%doc plugins/qca-softstore/README
%{_qt6_plugindir}/crypto/libqca-softstore.so
%endif
%changelog
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Wed Dec 13 2023 Steve Cossette <farchord@gmail.com> - 2.3.7-1
- 2.3.7
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed May 03 2023 Marie Loise Nolden <loise@kde.org> - 2.3.6-1
- 2.3.6
* Fri Mar 03 2023 Jan Grulich <jgrulich@redhat.com> - 2.3.5-1
- 2.3.5
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Nov 29 2022 Sandro Mani <manisandro@gmail.com> - 2.3.4-4
- Add qt6 build
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Wed Sep 29 2021 Rex Dieter <rdieter@fedoraproject.org> - 2.3.4-1
- 2.3.4
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 2.3.3-2
- Rebuilt with OpenSSL 3.0.0
* Sat Jul 31 2021 Rex Dieter <rdieter@fedoraproject.org> - 2.3.3-1
- 2.3.3
- disable apidocs for now, FTBFS on rawhide
- macro'ize docs, tests
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Dec 06 2020 Jeff Law <law@redhat.com> - 2.3.1-5
- Fix missing #include for gcc-11
* Tue Nov 03 2020 Rex Dieter <rdieter@fedoraproject.org> - 2.3.1-4
- drop botan for f34+ (#1892893)
* Wed Aug 26 2020 Rex Dieter <rdieter@fedoraproject.org> - 2.3.1-3
- rebuild (botan)
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 06 2020 Rex Dieter <rdieter@fedoraproject.org> - 2.3.1-1
- 2.3.1
* Mon Jun 29 2020 Rex Dieter <rdieter@fedoraproject.org> - 2.3.0-1
- 2.3.0
- -qt5 only
- .spec cleanup
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Apr 25 2019 Rex Dieter <rdieter@fedoraproject.org> - 2.2.1-1
- 2.2.1
* Mon Apr 22 2019 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-1
- 2.2.0 formal release
* Tue Feb 12 2019 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.10.20181017
- make qt4 tests non-fatal
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-0.9.20181017
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Oct 24 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.8.20181017
- 2.2.0-20181017 snapshot
* Wed Oct 24 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.7.20180619
- (re)enable botan support for real
* Mon Sep 10 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.6.20180619
- Recommends: qca(-qt5)-ossl
* Tue Jul 24 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.5.20180619
- 2.2.0-20180619 snapshot
- (re)enable botan support
- use %%_qt5_archdatadir/mkspecs
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-0.4.20180105
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Sun Mar 04 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.2.20180105
- use %%make_build %%ldconfig_scriptlets
- BR: gcc-c++
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0-0.2.20180105
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Jan 05 2018 Rex Dieter <rdieter@fedoraproject.org> - 2.2.0-0.1.20180105
- 2.2.0-20180105 snapshot
- support openssl-1.1 (f27+)
- disable botan backend (f27+, until supports openssl-1.1 too, see #1531569)
* Thu Aug 03 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.3-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue May 02 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-6
- re-enable pkcs11 support (#1423077)
* Mon Apr 24 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-5
- Obsoletes: qca-pkcs11 (when pkcs11 support is disabled)
* Mon Apr 24 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-4
- disable pkcs11 support on f26+ (#1423077)
* Fri Feb 17 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-3
- update URL (#1423876)
* Fri Feb 17 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-2
- use upstream tarball
* Mon Feb 06 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.3-1
- qca-2.1.3 (#1419662)
* Mon Feb 06 2017 Rex Dieter <rdieter@fedoraproject.org> - 2.1.1-9
- pull in upstream fixes (#1419662), update URL
* Thu Jul 07 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.1.1-8
- pull in some upstream fixes
* Sat Apr 30 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.1.1-7
- own plugindir/crypto
* Wed Apr 20 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.1.1-6
- rebuild (qt)
* Mon Apr 18 2016 Rex Dieter <rdieter@fedoraproject.org> - 2.1.1-5
- update URL
* Mon Feb 08 2016 Rex Dieter <rdieter@fedoraproject.org> 2.1.1-4
- rebuild (botan), %%check: make qt5 tests non-fatal (FIXME: BigInteger test fails on rawhide)
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.1.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Nov 19 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.1-2
- pull in latest upstream fixes, fix build (related to install paths)
* Sat Oct 17 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.1-1
- 2.1.1
* Mon Aug 03 2015 Helio Chissini de Castro <helio@kde.org> - 2.1.0-14
- Add missing header. Breaks compilation for upcoming okular on Qt5
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri May 01 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-12
- exclude -doc content from main pkg
* Thu Apr 23 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-11
- rebuild (gcc5)
* Thu Feb 19 2015 Rex Dieter <rdieter@fedoraproject.org> - 2.1.0-10
- rebuild (gcc5)
* Wed Jan 14 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-9
- drop no_ansi workaround
* Wed Jan 14 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-8
- workaround -gcrypt ftbfs (#1182200)
- BR: graphviz (docs use 'dot' apparently)
* Tue Jan 13 2015 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-7
- more upstream fixes (qt5 branch too)
* Tue Dec 02 2014 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-6
- pull in upstream patches (primarily for qt5 parallel-installability)
* Mon Dec 01 2014 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-5
- %%check: fix unittests
* Mon Dec 01 2014 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-4
- initial qt5 support
* Fri Nov 14 2014 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-3
- -doc: use %%_docdir instead, %%check: skip filewatch unittest
* Fri Nov 14 2014 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-2
- -botan, -doc subpkgs, add READMEs to plugin subpkgs
* Fri Nov 14 2014 Rex Dieter <rdieter@fedoraproject.org> 2.1.0-1
- 2.1.0
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Mar 08 2014 Kevin Kofler <Kevin@tigcc.ticalc.org> - 2.0.3-7
- Rebuild against fixed qt to fix -debuginfo (#1074041)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Sat Jan 07 2012 Sven Lankes <sven@lank.es> - 2.0.3-3
- Fix build with gcc 4.7.0
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Mon Nov 29 2010 Sven Lankes <sven@lank.es> - 2.0.3-1
- new upstream release
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue May 05 2009 Sven Lankes <sven@lank.es> - 2.0.2-1
- new upstream release - qt 4.5-compat-fixes
* Wed Apr 08 2009 Sven Lankes <sven@lank.es> - 2.0.1-1
- new upstream release
- removed 64bit patch - now upstream
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Fri May 30 2008 Dennis Gilmore <dennis@ausil.us> - 2.0.0-3
- crypto.prf is in libdir not datadir
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 2.0.0-2
- Autorebuild for GCC 4.3
* Sun Oct 21 2007 Aurelien Bompard <abompard@fedoraproject.org> 2.0.0-1
- version 2.0.0 final
* Sun Oct 21 2007 Aurelien Bompard <abompard@fedoraproject.org> 2.0.0-0.4.beta7
- fix build on x86_64
* Sun Oct 21 2007 Aurelien Bompard <abompard@fedoraproject.org> 2.0.0-0.3.beta7
- missing BR: openssl
* Thu Sep 13 2007 Aurelien Bompard <abompard@fedoraproject.org> 2.0.0-0.2.beta7
- review from bug 289681 (thanks Rex)
* Sun Sep 09 2007 Aurelien Bompard <abompard@fedoraproject.org> 2.0.0-0.1.beta7
- initial package

View File

@ -0,0 +1,60 @@
#!/bin/bash -x
QT_BRANCH=6.6.1
QT_VERSION=6.6.1
# Install fedora deps for qt6-qtbase, qt6-qttools
#sudo dnf builddep qt6-qtbase qt6-qttools qt6-qtwebengine -y
sudo dnf install qt6-qtbase qt6-doctools -y
# Clone full qt tree
#git clone -b $QT_BRANCH git://code.qt.io/qt/qt5.git qt6
git clone -b v$QT_VERSION git://code.qt.io/qt/qt5.git qt6
# Configure using fedora configure basic options
cd qt6 || return
#git submodule foreach "git checkout $QT_BRANCH"
git submodule foreach "git checkout v$QT_VERSION"
git submodule foreach "git fetch"
git submodule foreach "git pull"
# Init the base source
./init-repository
# hard-code docdir for now, rpm --eval %{_qt6_docdir} yields unexpanded %{_docdir}/qt6 , wtf -- rex
./configure -confirm-license -opensource -prefix $(rpm --eval "%{_qt6_prefix}") \
-archdatadir $(rpm --eval "%{_qt6_archdatadir}") -bindir $(rpm --eval "%{_qt6_bindir}") \
-libdir $(rpm --eval "%{_qt6_libdir}") -libexecdir $(rpm --eval "%{_qt6_libexecdir}") \
-datadir $(rpm --eval "%{_qt6_datadir}") -docdir /usr/share/doc/qt6 \
-examplesdir $(rpm --eval "%{_qt6_examplesdir}") -headerdir $(rpm --eval "%{_qt6_headerdir}") \
-plugindir $(rpm --eval "%{_qt6_plugindir}") \
-sysconfdir $(rpm --eval "%{_qt6_sysconfdir}") -translationdir $(rpm --eval "%{_qt6_translationdir}") \
-platform linux-g++ -release -shared -accessibility -dbus-runtime -fontconfig -glib -gtk \
-icu -journald -nomake examples -nomake tests -no-rpath -no-separate-debug-info -no-strip \
-system-libjpeg -system-libpng -system-zlib -no-directfb
mkdir -p qtbase/lib64/qt6/libexec
ln -s /usr/lib64/qt6/bin/qdoc qtbase/lib64/qt6/bin/qdoc
ln -s /usr/lib64/qt6/bin/qmake qtbase/lib64/qt6/bin/qmake
ln -s /usr/lib64/qt6/libexec/moc qtbase/lib64/qt6/libexec/moc
ln -s /usr/lib64/qt6/libexec/rcc qtbase/lib64/qt6/libexec/rcc
ln -s /usr/lib64/qt6/libexec/uic qtbase/lib64/qt6/libexec/uic
ln -s /usr/lib64/qt6/libexec/qtattributionsscanner qtbase/lib64/qt6/libexec/qtattributionsscanner
ln -s /usr/lib64/qt6/libexec/qhelpgenerator qtbase/lib64/qt6/libexec/qhelpgenerator
# export QT_PLUGIN_PATH to get compiled qhelpgenerator to run
export QT_PLUGIN_PATH=/usr/lib64/qt6/plugins
cmake --build . --target docs
#cmake --build . --target qch_docs
# Install docs on tmp directory
DEST=${PWD}/install
rm -rf $DEST/ && mkdir -p ${DEST}
DESTDIR=$DEST cmake --build . --target install_docs -k
XZ_OPT="-T 2"
tar -C $DEST -cJf ../qt-doc-opensource-src-${QT_VERSION}.tar.xz .

66
qt6/qt6-doc/qt6-doc.spec Normal file
View File

@ -0,0 +1,66 @@
Name: qt6-doc
Summary: Qt6 - Complete documentation
Version: 6.6.1
Release: 2%{?dist}
BuildArch: noarch
License: GFDL
# The tarball for this docs are self generated through provided script on SOURCES generate-qt-doc.sh
Url: http://qt-project.org/
Source0: qt-doc-opensource-src-%{version}.tar.xz
Source1: generate-qt6-doc.sh
# optimize build, skip unecessary steps
%global debug_package %{nil}
%global __spec_install_post %{nil}
BuildRequires: qt6-rpm-macros
%description
Documentation for Qt6 API in QCH format
%{summary}.
%package html
Summary: Qt API Documentation in HTML format
%description html
%{summary}.
%package devel
Summary: tags files for crosslinking to Qt QCH files
%description devel
%{summary}.
%prep
# intentionally left blank
# though could be used to initially unpack (rex)
%build
# intentionally left blank
%install
mkdir -p %{buildroot}
tar xf %{SOURCE0} -C %{buildroot}
%files
%{_qt6_docdir}/*.qch
%files html
%{_qt6_docdir}/*/*
%exclude %{_qt6_docdir}/*/*.tags
%files devel
%{_qt6_docdir}/*/*.tags
%changelog
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 6.6.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Tue Jan 02 2024 Marie Loise Nolden <loise@kde.org> - 6.6.1-1
- Initial import based on qt5-doc. Simplify and split into qt6-doc,
qt6-doc-devel (QCH) and qt6-doc-html (only HTML files)

View File

@ -0,0 +1,306 @@
%global _rxlibdir /opt/rx/%{_lib}
%global _rxincludedir /opt/rx/include
%global qt_module qtwayland
#global unstable 1
%if 0%{?unstable}
%global prerelease rc2
%endif
%global examples 1
Summary: Qt6 - Wayland platform support and QtCompositor module
Name: qt6-%{qt_module}
Version: 6.6.1
Release: 2%{?dist}
License: LGPL-3.0-only OR GPL-3.0-only WITH Qt-GPL-exception-1.0
Url: http://www.qt.io
%global majmin %(echo %{version} | cut -d. -f1-2)
%global qt_version %(echo %{version} | cut -d~ -f1)
%if 0%{?unstable}
Source0: https://download.qt.io/development_releases/qt/%{majmin}/%{qt_version}/submodules/%{qt_module}-everywhere-src-%{qt_version}-%{prerelease}.tar.xz
%else
Source0: https://download.qt.io/official_releases/qt/%{majmin}/%{version}/submodules/%{qt_module}-everywhere-src-%{version}.tar.xz
%endif
# Upstream patches
# Upstreamable patches
Patch0: qtwayland-use-adwaita-decorations-by-default.patch
# filter qml provides
%global __provides_exclude_from ^%{_qt6_archdatadir}/qml/.*\\.so$
BuildRequires: gcc-c++
BuildRequires: cmake
BuildRequires: ninja-build
BuildRequires: qt6-qtbase-devel >= %{version}
BuildRequires: qt6-qtbase-static
BuildRequires: qt6-qtbase-private-devel
%{?_qt6:Requires: %{_qt6}%{?_isa} = %{_qt6_version}}
BuildRequires: qt6-qtdeclarative-devel
BuildRequires: pkgconfig(xkbcommon)
BuildRequires: pkgconfig(wayland-scanner)
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-cursor)
BuildRequires: pkgconfig(wayland-egl) >= 1.22
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(xcomposite)
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(libinput) >= 1.22
BuildRequires: libXext-devel
Requires: rx-libwayland-egl
Requires: rx-libwayland-client
Requires: rx-libwayland-cursor
Requires: rx-libwayland-server
Requires: rx-libinput
%description
%{summary}.
%package devel
Summary: Development files for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: qt6-qtbase-devel%{?_isa}
Requires: qt6-qtdeclarative-devel%{?_isa}
%description devel
%{summary}.
%if 0%{?examples}
%package examples
Summary: Programming examples for %{name}
Requires: %{name}%{?_isa} = %{version}-%{release}
# BuildRequires: qt6-qtwayland-devel >= %{version}
%description examples
%{summary}.
%endif
%prep
%autosetup -n %{qt_module}-everywhere-src-%{qt_version}%{?unstable:-%{prerelease}} -p1
%build
export PKG_CONFIG_PATH=%{_rxlibdir}/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}}
export LDFLAGS="-L%{_rxlibdir} -Wl,-rpath=%{_rxlibdir} ${LDFLAGS:-%__global_ldflags}"
%cmake_qt6 -DQT_BUILD_EXAMPLES:BOOL=%{?examples:ON}%{!?examples:OFF}
%cmake_build
%install
%cmake_install
## .prl/.la file love
# nuke .prl reference(s) to %%buildroot, excessive (.la-like) libs
pushd %{buildroot}%{_qt6_libdir}
for prl_file in libQt6*.prl ; do
sed -i -e "/^QMAKE_PRL_BUILD_DIR/d" ${prl_file}
if [ -f "$(basename ${prl_file} .prl).so" ]; then
rm -fv "$(basename ${prl_file} .prl).la"
sed -i -e "/^QMAKE_PRL_LIBS/d" ${prl_file}
fi
done
popd
%ldconfig_scriptlets
%files
%doc README
%license LICENSES/*
%{_qt6_libdir}/libQt6WaylandCompositor.so.6*
%{_qt6_libdir}/libQt6WaylandClient.so.6*
%{_qt6_libdir}/libQt6WaylandCompositor.so.6*
%{_qt6_libdir}/libQt6WaylandClient.so.6*
%{_qt6_libdir}/libQt6WaylandEglClientHwIntegration.so.6*
%{_qt6_libdir}/libQt6WaylandEglCompositorHwIntegration.so.6*
%{_qt6_libdir}/libQt6WlShellIntegration.so.6*
%{_qt6_plugindir}/wayland-decoration-client/
%{_qt6_plugindir}/wayland-graphics-integration-server
%{_qt6_plugindir}/wayland-graphics-integration-client
%{_qt6_plugindir}/wayland-shell-integration
%{_qt6_plugindir}/platforms/libqwayland-egl.so
%{_qt6_plugindir}/platforms/libqwayland-generic.so
#{_qt6_plugindir}/platforms/libqwayland-xcomposite-egl.so
#{_qt6_plugindir}/platforms/libqwayland-xcomposite-glx.so
%{_qt6_qmldir}/QtWayland/
%files devel
%{_qt6_libexecdir}/qtwaylandscanner
%{_qt6_headerdir}/QtWaylandCompositor/
%{_qt6_headerdir}/QtWaylandClient/
%{_qt6_headerdir}/QtWaylandEglClientHwIntegration/
%{_qt6_headerdir}/QtWaylandEglCompositorHwIntegration/
%{_qt6_headerdir}/QtWlShellIntegration/
%{_qt6_headerdir}/QtWaylandGlobal/
%{_qt6_libdir}/libQt6WaylandCompositor.so
%{_qt6_libdir}/libQt6WaylandClient.so
%{_qt6_libdir}/libQt6WaylandEglClientHwIntegration.so
%{_qt6_libdir}/libQt6WaylandEglCompositorHwIntegration.so
%{_qt6_libdir}/libQt6WlShellIntegration.so
%{_qt6_libdir}/libQt6WaylandCompositor.prl
%{_qt6_libdir}/libQt6WaylandClient.prl
%{_qt6_libdir}/libQt6WaylandEglClientHwIntegration.prl
%{_qt6_libdir}/libQt6WaylandEglCompositorHwIntegration.prl
%{_qt6_libdir}/libQt6WlShellIntegration.prl
%{_qt6_libdir}/cmake/Qt6WaylandCompositor/Qt6WaylandCompositorConfig*.cmake
%{_qt6_archdatadir}/mkspecs/modules/*.pri
%{_qt6_libdir}/cmake/Qt6/*.cmake
%{_qt6_libdir}/cmake/Qt6BuildInternals/StandaloneTests/QtWaylandTestsConfig.cmake
%{_qt6_libdir}/cmake/Qt6Gui/*.cmake
%{_qt6_libdir}/cmake/Qt6Qml/QmlPlugins/*.cmake
%dir %{_qt6_libdir}/cmake/Qt6WaylandCompositor/
%{_qt6_libdir}/cmake/Qt6WaylandCompositor/
%dir %{_qt6_libdir}/cmake/Qt6WaylandClient/
%{_qt6_libdir}/cmake/Qt6WaylandClient/
%dir %{_qt6_libdir}/cmake/Qt6WaylandScannerTools/
%{_qt6_libdir}/cmake/Qt6WaylandScannerTools/
%dir %{_qt6_libdir}/cmake/Qt6WaylandEglClientHwIntegrationPrivate/
%{_qt6_libdir}/cmake/Qt6WaylandEglClientHwIntegrationPrivate/
%dir %{_qt6_libdir}/cmake/Qt6WaylandEglCompositorHwIntegrationPrivate/
%{_qt6_libdir}/cmake/Qt6WaylandEglCompositorHwIntegrationPrivate/
%dir %{_qt6_libdir}/cmake/Qt6WlShellIntegrationPrivate/
%{_qt6_libdir}/cmake/Qt6WlShellIntegrationPrivate/
%dir %{_qt6_libdir}/cmake/Qt6WaylandGlobalPrivate/
%{_qt6_libdir}/cmake/Qt6WaylandGlobalPrivate/
%{_qt6_libdir}/qt6/metatypes/qt6*_metatypes.json
%{_qt6_libdir}/qt6/modules/*.json
%{_qt6_libdir}/pkgconfig/*.pc
%if 0%{?examples}
%files examples
%{_qt6_examplesdir}/wayland/
%endif
%changelog
* Fri Mar 1 2024 Raven <raven@sysadmins.ws> - 6.6.1-2
- link with newer versions of libinput and libwayland
* Mon Nov 27 2023 Jan Grulich <jgrulich@redhat.com> - 6.6.1-1
- 6.6.1
* Wed Oct 11 2023 Jan Grulich <jgrulich@redhat.com> - 6.6.0-1
- 6.6.0
* Sun Oct 01 2023 Justin Zobel <justin.zobel@gmail.com> - 6.5.3-1
- new version
* Wed Aug 16 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.2-3
- Use QAdwaitaDecorations by default
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.5.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Fri Jul 21 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.2-1
- 6.5.2
* Wed Jul 12 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.1-3
- Rebuild for qtbase private API version change
* Wed Jul 12 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.1-2
- Rebuild for qtbase private API version change
* Mon May 22 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.1-1
- 6.5.1
* Tue Apr 04 2023 Jan Grulich <jgrulich@redhat.com> - 6.5.0-1
- 6.5.0
* Thu Mar 23 2023 Jan Grulich <jgrulich@redhat.com> - 6.4.3-1
- 6.4.3
* Tue Jan 31 2023 Jan Grulich <jgrulich@redhat.com> - 6.4.2-3
- migrated to SPDX license
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 6.4.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 16 2023 Jan Grulich <jgrulich@redhat.com> - 6.4.2-1
- 6.4.2
* Wed Nov 23 2022 Jan Grulich <jgrulich@redhat.com> - 6.4.1-1
- 6.4.1
* Mon Oct 31 2022 Jan Grulich <jgrulich@redhat.com> - 6.4.0-1
- 6.4.0
* Fri Jul 29 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.1-4
- Do not take decoration shadows into account when placing popups
* Tue Jul 26 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.1-3
- Keep toplevel windows in the top left corner of the screen
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Wed Jul 13 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.1-1
- 6.3.1
* Wed May 25 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.0-2
- Enable examples
* Wed Apr 13 2022 Jan Grulich <jgrulich@redhat.com> - 6.3.0-1
- 6.3.0
* Fri Feb 25 2022 Jan Grulich <jgrulich@redhat.com> - 6.2.3-2
- Enable s390x builds
* Mon Jan 31 2022 Jan Grulich <jgrulich@redhat.com> - 6.2.3-1
- 6.2.3
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 6.2.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Tue Dec 14 2021 Jan Grulich <jgrulich@redhat.com> - 6.2.2-1
- 6.2.2
* Fri Oct 29 2021 Jan Grulich <jgrulich@redhat.com> - 6.2.1-1
- 6.2.1
* Thu Sep 30 2021 Jan Grulich <jgrulich@redhat.com> - 6.2.0-1
- 6.2.0
* Mon Sep 27 2021 Jan Grulich <jgrulich@redhat.com> - 6.2.0~rc2-1
- 6.2.0 - rc2
* Sat Sep 18 2021 Jan Grulich <jgrulich@redhat.com> - 6.2.0~rc-1
- 6.2.0 - rc
* Mon Sep 13 2021 Jan Grulich <jgrulich@redhat.com> - 6.2.0~beta4-1
- 6.2.0 - beta4
* Thu Aug 12 2021 Jan Grulich <jgrulich@redhat.com> - 6.1.2-1
- 6.1.2
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.1.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Mon Jun 07 2021 Jan Grulich <jgrulich@redhat.com> - 6.1.1-1
- 6.1.1
* Thu May 06 2021 Jan Grulich <jgrulich@redhat.com> - 6.1.0-1
- 6.1.0
* Mon Apr 05 2021 Jan Grulich <jgrulich@redhat.com> - 6.0.3-1
- 6.0.3
* Thu Feb 04 2021 Jan Grulich <jgrulich@redhat.com> - 6.0.1-1
- 6.0.1
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 6.0.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jan 13 2021 Jan Grulich <jgrulich@redhat.com> - 6.0.0
- 6.0.0

View File

@ -0,0 +1,14 @@
diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp
index 06a1aec..bb387f1 100644
--- a/src/client/qwaylandintegration.cpp
+++ b/src/client/qwaylandintegration.cpp
@@ -87,6 +87,9 @@ QWaylandIntegration::QWaylandIntegration()
QWaylandWindow::fixedToplevelPositions =
!qEnvironmentVariableIsSet("QT_WAYLAND_DISABLE_FIXED_POSITIONS");
+ if (!qEnvironmentVariableIsSet("QT_WAYLAND_DECORATION"))
+ qputenv("QT_WAYLAND_DECORATION", "adwaita");
+
sInstance = this;
}

View File

@ -68,6 +68,12 @@ images more efficiently.
Summary: Development files for libwebp, a library for the WebP format
Requires: %{name}%{?_isa} = %{version}-%{release}
Conflicts: libwebp-devel
Provides: pkgconfig(libsharpyuv) = %{version}-%{release}
Provides: pkgconfig(libwebp) = %{version}-%{release}
Provides: pkgconfig(libwebpdecoder) = %{version}-%{release}
Provides: pkgconfig(libwebpdemux) = %{version}-%{release}
Provides: pkgconfig(libwebpmux) = %{version}-%{release}
%description devel
WebP is an image format that does lossy compression of digital

438
rx-wayland/wayland.spec Normal file
View File

@ -0,0 +1,438 @@
%global realname wayland
%global _sys_libdir %_libdir
%global _prefix /opt/rx
Name: rx-wayland
Version: 1.22.0
Release: 1%{?dist}
Summary: Wayland Compositor Infrastructure
License: MIT
URL: http://wayland.freedesktop.org/
Source0: https://gitlab.freedesktop.org/%{realname}/%{realname}/-/releases/%{version}/downloads/%{realname}-%{version}.tar.xz
Source1: https://gitlab.freedesktop.org/%{realname}/%{realname}/-/releases/%{version}/downloads/%{realname}-%{version}.tar.xz.sig
Source2: emersion-gpg-key.asc
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: docbook-style-xsl
BuildRequires: doxygen
BuildRequires: expat-devel
BuildRequires: graphviz
BuildRequires: libxml2-devel
BuildRequires: libxslt
BuildRequires: meson
BuildRequires: pkgconfig(libffi)
BuildRequires: xmlto
# For origin certification
BuildRequires: gnupg2
%description
Wayland is a protocol for a compositor to talk to its clients as well as a C
library implementation of that protocol. The compositor can be a standalone
display server running on Linux kernel modesetting and evdev input devices,
an X application, or a wayland client itself. The clients can be traditional
applications, X servers (rootless or fullscreen) or other display servers.
%package devel
Summary: Development files for %{name}
Requires: rx-libwayland-client%{?_isa} = %{version}-%{release}
Requires: rx-libwayland-cursor%{?_isa} = %{version}-%{release}
Requires: rx-libwayland-egl%{?_isa} = %{version}-%{release}
Requires: rx-libwayland-server%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package doc
Summary: Wayland development documentation
BuildArch: noarch
%description doc
Wayland development documentation
%package -n rx-libwayland-client
Summary: Wayland client library
%description -n rx-libwayland-client
Wayland client library
%package -n rx-libwayland-cursor
Summary: Wayland cursor library
Requires: rx-libwayland-client = %{version}-%{release}
%description -n rx-libwayland-cursor
Wayland cursor library
%package -n rx-libwayland-egl
Summary: Wayland egl library
%description -n rx-libwayland-egl
Wayland egl library
%package -n rx-libwayland-server
Summary: Wayland server library
%description -n rx-libwayland-server
Wayland server library
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1 -n %{realname}-%{version}
%build
%meson
%meson_build
%install
%meson_install
%check
%meson_test
%files devel
%{_bindir}/wayland-scanner
%{_includedir}/wayland-*.h
%{_libdir}/pkgconfig/wayland-*.pc
%{_libdir}/libwayland-*.so
%{_datadir}/aclocal/wayland-scanner.m4
%dir %{_datadir}/wayland
%{_datadir}/wayland/wayland-scanner.mk
%{_datadir}/wayland/wayland.xml
%{_datadir}/wayland/wayland.dtd
%{_mandir}/man3/*.3*
%files doc
%doc README.md
%{_datadir}/doc/wayland/
%files -n rx-libwayland-client
%license COPYING
%{_libdir}/libwayland-client.so.0*
%files -n rx-libwayland-cursor
%license COPYING
%{_libdir}/libwayland-cursor.so.0*
%files -n rx-libwayland-egl
%license COPYING
%{_libdir}/libwayland-egl.so.1*
%files -n rx-libwayland-server
%license COPYING
%{_libdir}/libwayland-server.so.0*
%changelog
* Tue Apr 04 2023 Kalev Lember <klember@redhat.com> - 1.22.0-1
- Update to 1.22.0
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.21.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Jul 26 2022 Mike Rochefort <mroche@redhat.com> - 1.21.0-1
- Update to 1.21.0
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Mar 21 2022 Olivier Fourdan <ofourdan@redhat.com> - 1.20.0-4
- Close file descriptors not needed
rhbz#2062030
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.20.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Jan 08 2022 Miro Hrončok <mhroncok@redhat.com> - 1.20.0-2
- Rebuilt for https://fedoraproject.org/wiki/Changes/LIBFFI34
* Thu Dec 16 2021 Kalev Lember <klember@redhat.com> - 1.20.0-1
- Update to 1.20.0
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.19.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jan 28 2021 Kalev Lember <klember@redhat.com> - 1.19.0-1
- Update to 1.19.0
- Switch to meson build system
- Drop old provides
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.18.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Wed Feb 12 2020 Kalev Lember <klember@redhat.com> - 1.18.0-1
- Update to 1.18.0
- Drop no longer needed obsoletes/provides
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.17.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Thu Mar 21 2019 Kalev Lember <klember@redhat.com> - 1.17.0-1
- Update to 1.17.0
* Thu Mar 07 2019 Kalev Lember <klember@redhat.com> - 1.16.92-1
- Update to 1.16.92
* Thu Feb 28 2019 Kalev Lember <klember@redhat.com> - 1.16.91-1
- Update to 1.16.91
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.16.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Tue Sep 11 2018 Kalev Lember <klember@redhat.com> - 1.16.0-1
- Update to 1.16.0
* Mon Aug 13 2018 Kalev Lember <klember@redhat.com> - 1.15.93-1
- Update to 1.15.93
* Tue Jul 31 2018 Florian Weimer <fweimer@redhat.com> - 1.15.92-2
- Rebuild with fixed binutils
* Sun Jul 29 2018 Kalev Lember <klember@redhat.com> - 1.15.92-1
- Update to 1.15.92
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Mon Apr 09 2018 Kalev Lember <klember@redhat.com> - 1.15.0-1
- Update to 1.15.0
* Wed Apr 04 2018 Kalev Lember <klember@redhat.com> - 1.14.93-2
- Make mesa-libwayland-egl obsoleting actually work
* Tue Apr 03 2018 Kalev Lember <klember@redhat.com> - 1.14.93-1
- Update to 1.14.93
* Tue Mar 20 2018 Kalev Lember <klember@redhat.com> - 1.14.92-1
- Update to 1.14.92
- Remove F22 upgrade path obsoletes
* Sat Mar 03 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.14.91-2
- Improve Obsoletes
* Tue Feb 27 2018 Kalev Lember <klember@redhat.com> - 1.14.91-1
- Update to 1.14.91
- Add new libwayland-egl subpackage and obsolete mesa-libwayland-egl
- Remove ldconfig scriptlets
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.14.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Tue Dec 12 2017 Kalev Lember <klember@redhat.com> - 1.14.0-2
- cursor: Fix heap overflows when parsing malicious files (#1522638)
* Wed Aug 09 2017 Kalev Lember <klember@redhat.com> - 1.14.0-1
- Update to 1.14.0
* Wed Aug 02 2017 Kalev Lember <klember@redhat.com> - 1.13.93-1
- Update to 1.13.93
* Sun Jul 30 2017 Florian Weimer <fweimer@redhat.com> - 1.13.92-2
- Rebuild with binutils fix for ppc64le (#1475636)
* Wed Jul 26 2017 Kalev Lember <klember@redhat.com> - 1.13.92-1
- Update to 1.13.92
* Wed Jul 19 2017 Kalev Lember <klember@redhat.com> - 1.13.91-1
- Update to 1.13.91
* Thu Jun 1 2017 Owen Taylor otaylor@redhat.com> - 1.13.0-2
- Add a patch fixing a build error with newer versions of graphviz
* Wed Feb 22 2017 Kalev Lember <klember@redhat.com> - 1.13.0-1
- Update to 1.13.0
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.12.91-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Jan 25 2017 Kalev Lember <klember@redhat.com> - 1.12.91-1
- Update to 1.12.91
* Wed Sep 21 2016 Kalev Lember <klember@redhat.com> - 1.12.0-1
- Update to 1.12.0
* Wed Sep 14 2016 Kalev Lember <klember@redhat.com> - 1.11.94-1
- Update to 1.11.94
* Thu Sep 08 2016 Kalev Lember <klember@redhat.com> - 1.11.93-1
- Update to 1.11.93
* Wed Aug 31 2016 Kalev Lember <klember@redhat.com> - 1.11.92-1
- Update to 1.11.92
* Wed Aug 17 2016 Kalev Lember <klember@redhat.com> - 1.11.91-1
- Update to 1.11.91
- Simplify -devel subpackage packaging
- Include license files in packaging
* Wed Jun 01 2016 Kalev Lember <klember@redhat.com> - 1.11.0-1
- Update to 1.11.0
* Wed May 25 2016 Kalev Lember <klember@redhat.com> - 1.10.93-1
- Update to 1.10.93
* Wed May 18 2016 Kalev Lember <klember@redhat.com> - 1.10.92-1
- Update to 1.10.92
* Sun May 08 2016 Kalev Lember <klember@redhat.com> - 1.10.91-1
- Update to 1.10.91
* Thu Feb 18 2016 Kalev Lember <klember@redhat.com> - 1.10.0-1
- Update to 1.10.0
* Thu Feb 04 2016 Kalev Lember <klember@redhat.com> - 1.9.92-1
- Update to 1.9.92
* Wed Jan 20 2016 Kalev Lember <klember@redhat.com> - 1.9.91-1
- Update to 1.9.91
* Tue Sep 22 2015 Kalev Lember <klember@redhat.com> - 1.9.0-1
- Update to 1.9.0
- Use make_install macro
* Wed Sep 16 2015 Kalev Lember <klember@redhat.com> - 1.8.93-1
- Update to 1.8.93
* Wed Sep 02 2015 Kalev Lember <klember@redhat.com> - 1.8.92-1
- Update to 1.8.92
* Fri Aug 21 2015 Kalev Lember <klember@redhat.com> - 1.8.91-2
- Split out wayland-doc subpackage for documentation
* Fri Aug 21 2015 Kalev Lember <klember@redhat.com> - 1.8.91-1
- Update to 1.8.91
* Mon Jul 20 2015 Adam Jackson <ajax@redhat.com> 1.8.0-1
- wayland 1.8.0
* Fri Jun 19 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.7.92-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Tue May 26 2015 Adam Jackson <ajax@redhat.com> 1.7.92-1
- wayland 1.7.92
* Sat Feb 21 2015 Till Maas <opensource@till.name> - 1.7.0-2
- Rebuilt for Fedora 23 Change
https://fedoraproject.org/wiki/Changes/Harden_all_packages_with_position-independent_code
* Tue Feb 17 2015 Richard Hughes <rhughes@redhat.com> - 1.7.0-1
- Wayland 1.7.0
* Fri Sep 19 2014 Kalev Lember <kalevlember@gmail.com> - 1.6.0-1
- Update to 1.6.0
- Remove lib64 rpaths
* Fri Aug 22 2014 Kevin Fenzi <kevin@scrye.com> 1.5.91-1
- Update to 1.5.90
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Jul 02 2014 Adam Jackson <ajax@redhat.com> 1.5.0-4
- Update protocol: new surface error enums
* Mon Jun 30 2014 Adam Jackson <ajax@redhat.com> 1.5.0-3
- Remove blocking flush patch as it actually introduces deadlocks now
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.5.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Wed May 21 2014 Richard Hughes <rhughes@redhat.com> - 1.5.0-1
- Wayland 1.5.0
* Tue May 13 2014 Richard Hughes <rhughes@redhat.com> - 1.4.93-1
- Wayland 1.4.93
* Fri Jan 24 2014 Richard Hughes <rhughes@redhat.com> - 1.4.0-1
- Wayland 1.4.0
* Mon Jan 20 2014 Richard Hughes <rhughes@redhat.com> - 1.3.93-1
- Wayland 1.3.93
* Sat Dec 21 2013 Ville Skyttä <ville.skytta@iki.fi> - 1.3.91-2
- Call ldconfig in libwayland-cursor %%post* scripts.
- Run test suite during build.
- Compress snapshot tarballs with xz.
* Tue Dec 17 2013 Richard Hughes <rhughes@redhat.com> - 1.3.91-1
- Wayland 1.3.91
* Mon Nov 25 2013 Lubomir Rintel <lkundrak@v3.sk> - 1.3.0-1
- Wayland 1.3.0
* Mon Oct 07 2013 Adam Jackson <ajax@redhat.com> 1.2.0-3
- Don't use MSG_DONTWAIT in wl_connection_flush.
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Mon Jul 15 2013 Richard Hughes <rhughes@redhat.com> - 1.2.0-1
- wayland 1.2.0
* Wed May 15 2013 Richard Hughes <rhughes@redhat.com> - 1.1.90-0.1.20130515
- Update to a git snapshot based on what will become 1.1.90
* Tue Apr 16 2013 Richard Hughes <rhughes@redhat.com> - 1.1.0-1
- wayland 1.1.0
* Wed Mar 27 2013 Richard Hughes <rhughes@redhat.com> - 1.0.6-1
- wayland 1.0.6
* Thu Feb 21 2013 Adam Jackson <ajax@redhat.com> 1.0.5-1
- wayland 1.0.5
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jan 02 2013 Adam Jackson <ajax@redhat.com> 1.0.3-1
- wayland 1.0.3
* Tue Oct 23 2012 Adam Jackson <ajax@redhat.com> 1.0.0-1
- wayland 1.0
* Thu Oct 18 2012 Adam Jackson <ajax@redhat.com> 0.99.0-1
- wayland 0.99.0
* Tue Sep 04 2012 Adam Jackson <ajax@redhat.com> 0.95.0-1
- wayland 0.95.0 (#843738)
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.89.0-2.20120424
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Apr 24 2012 Richard Hughes <rhughes@redhat.com> - 0.89.0-1
- Update to a git snapshot based on 0.89.0
* Sat Feb 18 2012 Thorsten Leemhuis <fedora@leemhuis.info> - 0.85.0-1
- update to 0.85.0
- adjust license, as upstream changed it to MIT
- update make-git-snapshot.sh to current locations and scheme
- drop common package, not needed anymore
- compositor is now in a separate package, hence reduce BuildRequires to what
is actually needed (a lot less) and adjust summary
- make usage of a git checkout in spec file optional
- a %%{?_isa} to requires where it makes sense
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.6.20101221
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Dec 06 2011 Adam Jackson <ajax@redhat.com> - 0.1-0.5.20101221
- Rebuild for new libpng
* Wed Jun 15 2011 Lubomir Rintel <lkundrak@v3.sk> - 0.1-0.4.20101221
- Install real compositor binary instead of a libtool wrapper
* Mon Feb 07 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1-0.3.20101221
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Dec 21 2010 Adam Jackson <ajax@redhat.com> 0.1-0.2.20101221
- Today's git snap
* Tue Nov 23 2010 Adam Jackson <ajax@redhat.com> 0.1-0.2.20101123
- Today's git snap
- Fix udev rule install (#653353)
* Mon Nov 15 2010 Adam Jackson <ajax@redhat.com> 0.1-0.1.20101111
- Initial packaging

View File

@ -0,0 +1,196 @@
Name: wayland-protocols
Version: 1.32
Release: 2%{?dist}
Summary: Wayland protocols that adds functionality not available in the core protocol
License: MIT
URL: https://wayland.freedesktop.org/
Source0: https://gitlab.freedesktop.org/wayland/%{name}/-/releases/%{version}/downloads/%{name}-%{version}.tar.xz
BuildArch: noarch
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: meson
BuildRequires: wayland-devel
%description
wayland-protocols contains Wayland protocols that adds functionality not
available in the Wayland core protocol. Such protocols either adds
completely new functionality, or extends the functionality of some other
protocol either in Wayland core, or some other protocol in
wayland-protocols.
%package devel
Summary: Wayland protocols that adds functionality not available in the core protocol
%description devel
wayland-protocols contains Wayland protocols that adds functionality not
available in the Wayland core protocol. Such protocols either adds
completely new functionality, or extends the functionality of some other
protocol either in Wayland core, or some other protocol in
wayland-protocols.
%prep
%autosetup
%build
%meson
%meson_build
%install
%meson_install
%files devel
%license COPYING
%doc README.md
%{_datadir}/pkgconfig/%{name}.pc
%{_datadir}/%{name}/
%changelog
* Sat Jul 22 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.32-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Mon Jul 03 2023 Kalev Lember <klember@redhat.com> - 1.32-1
- Update to 1.32 (rhbz#2219369)
* Sat Jan 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 1.31-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Nov 29 2022 Kalev Lember <klember@redhat.com> - 1.31-1
- Update to 1.31
* Mon Nov 21 2022 Kalev Lember <klember@redhat.com> - 1.30-1
- Update to 1.30
* Tue Nov 15 2022 Kalev Lember <klember@redhat.com> - 1.29-1
- Update to 1.29
* Sat Nov 05 2022 Kalev Lember <klember@redhat.com> - 1.28-1
- Update to 1.28
* Wed Oct 12 2022 Neal Gompa <ngompa@fedoraproject.org> - 1.27-1
- Update to 1.27
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Jul 8 2022 Olivier Fourdan <ofourdan@redhat.com> - 1.26-1
- Update to 1.26
* Sat Feb 19 2022 Neal Gompa <ngompa@fedoraproject.org> - 1.25-1
- Update to 1.25
* Sat Jan 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.24-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Sat Nov 27 2021 Neal Gompa <ngompa@fedoraproject.org> - 1.24-1
- Update to 1.24
* Mon Sep 20 2021 Neal Gompa <ngompa@fedoraproject.org> - 1.23-1
- Update to 1.23
* Mon Sep 20 2021 Neal Gompa <ngompa@fedoraproject.org> - 1.22-1
- Update to 1.22
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue May 04 2021 Kalev Lember <klember@redhat.com> - 1.21-1
- Update to 1.21
- Switch to meson build system
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.20-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Sat Feb 29 2020 Jonas Ådahl <jadahl@redhat.com> - 1.20-1
- Update to 1.20
* Fri Jan 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.18-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Mon Jul 29 2019 Olivier Fourdan <ofourdan@redhat.com> - 1.18-1
- Update to 1.18
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Sun Feb 03 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.17-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Wed Nov 21 2018 Kalev Lember <klember@redhat.com> - 1.17-1
- Update to 1.17
* Tue Jul 31 2018 Kalev Lember <klember@redhat.com> - 1.16-1
- Update to 1.16
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Jul 05 2018 Adam Jackson <ajax@redhat.com> - 1.15-1
- Update to 1.15
* Tue May 08 2018 Kalev Lember <klember@redhat.com> - 1.14-1
- Update to 1.14
* Thu Feb 15 2018 Kalev Lember <klember@redhat.com> - 1.13-1
- Update to 1.13
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Dec 07 2017 Kalev Lember <klember@redhat.com> - 1.12-1
- Update to 1.12
* Wed Nov 15 2017 Kalev Lember <klember@redhat.com> - 1.11-1
- Update to 1.11
* Mon Jul 31 2017 Kalev Lember <klember@redhat.com> - 1.10-1
- Update to 1.10
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Wed Jul 19 2017 Kalev Lember <klember@redhat.com> - 1.9-1
- Update to 1.9
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Aug 16 2016 Kalev Lember <klember@redhat.com> - 1.7-1
- Update to 1.7
* Fri Aug 12 2016 Kalev Lember <klember@redhat.com> - 1.6-1
- Update to 1.6
* Tue Jul 26 2016 Kalev Lember <klember@redhat.com> - 1.5-1
- Update to 1.5
* Tue May 24 2016 Kalev Lember <klember@redhat.com> - 1.4-1
- Update to 1.4
* Mon Apr 11 2016 Kalev Lember <klember@redhat.com> - 1.3-1
- Update to 1.3
* Mon Mar 07 2016 Kalev Lember <klember@redhat.com> - 1.2-1
- Update to 1.2
* Thu Feb 18 2016 Kalev Lember <klember@redhat.com> - 1.1-1
- Update to 1.1
* Fri Feb 05 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Dec 05 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0-2
- Fix description
* Thu Nov 26 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0-1
- Update to released 1.0
- Move XMLs to devel pkg
- Drop non-interesting part of description
* Sun Nov 22 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 0.1.0-0.gitf828a43
- Initial package