Skip to content

Commit

Permalink
[poppler] Fix poppler/paraview name clash (#35472)
Browse files Browse the repository at this point in the history
Cherry-picked from #35437:
Add a test port which covers non-default features of `gdal`. 
Fix duplicate symbol definition in poppler and paraview found by the
test-port.
(#35437 (comment).
paraview using vtk using gdal using poppler.)
Disallow cascaded failure of gdal.

---------

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
  • Loading branch information
dg0yt and BillyONeal authored Mar 6, 2024
1 parent 5bf6c06 commit 187b695
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 3 deletions.
1 change: 1 addition & 0 deletions ports/poppler/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ vcpkg_from_gitlab(
HEAD_REF master
PATCHES
export-unofficial-poppler.patch
private-namespace.patch
)
file(REMOVE "${SOURCE_PATH}/cmake/Modules/FindFontconfig.cmake")

Expand Down
50 changes: 50 additions & 0 deletions ports/poppler/private-namespace.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
diff --git a/poppler/Gfx.h b/poppler/Gfx.h
index 81a620b..ecfb449 100644
--- a/poppler/Gfx.h
+++ b/poppler/Gfx.h
@@ -48,7 +48,10 @@ class PDFDoc;
class XRef;
class Array;
class Stream;
+namespace poppler_private {
class Parser;
+}
+using namespace poppler_private;
class Dict;
class Function;
class OutputDev;
diff --git a/poppler/Parser.h b/poppler/Parser.h
index b379b67..c3d85bd 100644
--- a/poppler/Parser.h
+++ b/poppler/Parser.h
@@ -33,6 +33,7 @@
// Parser
//------------------------------------------------------------------------

+namespace poppler_private {
class POPPLER_PRIVATE_EXPORT Parser
{
public:
@@ -72,5 +73,7 @@ private:
void shift(int objNum = -1);
void shift(const char *cmdA, int objNum);
};
+}
+using namespace poppler_private;

#endif
diff --git a/poppler/XRef.h b/poppler/XRef.h
index e2b2ca8..7d6acbb 100644
--- a/poppler/XRef.h
+++ b/poppler/XRef.h
@@ -46,7 +46,10 @@

class Dict;
class Stream;
+namespace poppler_private {
class Parser;
+}
+using namespace poppler_private;
class ObjectStream;

//------------------------------------------------------------------------
1 change: 1 addition & 0 deletions ports/poppler/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "poppler",
"version": "24.2.0",
"port-version": 1,
"description": "A PDF rendering library",
"homepage": "https://poppler.freedesktop.org/",
"license": "GPL-2.0-or-later",
Expand Down
5 changes: 3 additions & 2 deletions scripts/test_ports/vcpkg-ci-gdal/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vcpkg-ci-gdal",
"version-date": "2023-12-21",
"version-date": "2023-12-28",
"description": "Port to force features of certain ports within CI",
"homepage": "https://github.com/microsoft/vcpkg",
"license": "MIT",
Expand All @@ -22,7 +22,8 @@
"name": "gdal",
"features": [
"cfitsio",
"kea"
"kea",
"poppler"
],
"platform": "native"
},
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6842,7 +6842,7 @@
},
"poppler": {
"baseline": "24.2.0",
"port-version": 0
"port-version": 1
},
"popsift": {
"baseline": "0.9",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/poppler.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "eac143745483dbf2b73b22a965413aa7dd2aa7ec",
"version": "24.2.0",
"port-version": 1
},
{
"git-tree": "4035b8dd08a68fca8ad6cfbcc4c4a4ec0eb4e04f",
"version": "24.2.0",
Expand Down

0 comments on commit 187b695

Please sign in to comment.