From 62c2fcbb154fbf5e899f90f492fb124158a1030c Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Sat, 4 Jun 2016 13:10:55 -0500 Subject: Add plugin file to compile some libraries with Qt 5 only (instead of using Qt 4). --- plugins/qt5-deps/overrides.mk | 60 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 plugins/qt5-deps/overrides.mk diff --git a/plugins/qt5-deps/overrides.mk b/plugins/qt5-deps/overrides.mk new file mode 100644 index 0000000..403f1b3 --- /dev/null +++ b/plugins/qt5-deps/overrides.mk @@ -0,0 +1,60 @@ +# This file is part of MXE. +# See index.html for further information. + +poppler_DEPS := gcc cairo curl freetype glib jpeg lcms libpng qtbase tiff zlib + +define poppler_BUILD + # Note: Specifying LIBS explicitly is necessary for configure to properly + # pick up libtiff (otherwise linking a minimal test program fails not + # because libtiff is not found, but because some references are + # undefined) + cd '$(1)' \ + && PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ + ./configure \ + --host='$(TARGET)' \ + --build="`config.guess`" \ + --prefix='$(PREFIX)/$(TARGET)' \ + --disable-silent-rules \ + --disable-shared \ + --enable-static \ + --enable-xpdf-headers \ + --enable-poppler-qt5 \ + --enable-zlib \ + --enable-cms=lcms2 \ + --enable-libcurl \ + --enable-libtiff \ + --enable-libjpeg \ + --enable-libpng \ + --enable-poppler-glib \ + --enable-poppler-cpp \ + --enable-cairo-output \ + --enable-splash-output \ + --enable-compile-warnings=yes \ + --enable-introspection=auto \ + --disable-libopenjpeg \ + --disable-gtk-test \ + --disable-utils \ + --disable-gtk-doc \ + --disable-gtk-doc-html \ + --disable-gtk-doc-pdf \ + --with-font-configuration=win32 \ + PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))='$(PREFIX)/$(TARGET)/qt/lib/pkgconfig' \ + CXXFLAGS=-D_WIN32_WINNT=0x0500 \ + LIBTIFF_LIBS="`'$(TARGET)-pkg-config' libtiff-4 --libs`" + PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ + $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + + # Test program + '$(TARGET)-g++' \ + -W -Wall -Werror -ansi -pedantic \ + '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-poppler.exe' \ + `'$(TARGET)-pkg-config' poppler poppler-cpp --cflags --libs` +endef + +poppler_BUILD_SHARED = + +openscenegraph_DEPS := gcc boost curl dcmtk freetype gdal giflib gstreamer \ + gta jasper jpeg libpng openal openexr openthreads poppler \ + qtbase tiff zlib + -- cgit v0.12 From 3b3af3e8b952eb3aafa14f70e6f69a5121f25f20 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Sun, 5 Jun 2016 17:35:41 -0500 Subject: Simplify overrides, and add shared build support to poppler. --- plugins/qt5-deps/overrides.mk | 59 ++----------------------------------------- src/openscenegraph.mk | 5 +++- src/poppler.mk | 15 +++++------ 3 files changed, 12 insertions(+), 67 deletions(-) diff --git a/plugins/qt5-deps/overrides.mk b/plugins/qt5-deps/overrides.mk index 403f1b3..c437086 100644 --- a/plugins/qt5-deps/overrides.mk +++ b/plugins/qt5-deps/overrides.mk @@ -1,60 +1,5 @@ # This file is part of MXE. # See index.html for further information. -poppler_DEPS := gcc cairo curl freetype glib jpeg lcms libpng qtbase tiff zlib - -define poppler_BUILD - # Note: Specifying LIBS explicitly is necessary for configure to properly - # pick up libtiff (otherwise linking a minimal test program fails not - # because libtiff is not found, but because some references are - # undefined) - cd '$(1)' \ - && PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ - ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ - --disable-silent-rules \ - --disable-shared \ - --enable-static \ - --enable-xpdf-headers \ - --enable-poppler-qt5 \ - --enable-zlib \ - --enable-cms=lcms2 \ - --enable-libcurl \ - --enable-libtiff \ - --enable-libjpeg \ - --enable-libpng \ - --enable-poppler-glib \ - --enable-poppler-cpp \ - --enable-cairo-output \ - --enable-splash-output \ - --enable-compile-warnings=yes \ - --enable-introspection=auto \ - --disable-libopenjpeg \ - --disable-gtk-test \ - --disable-utils \ - --disable-gtk-doc \ - --disable-gtk-doc-html \ - --disable-gtk-doc-pdf \ - --with-font-configuration=win32 \ - PKG_CONFIG_PATH_$(subst .,_,$(subst -,_,$(TARGET)))='$(PREFIX)/$(TARGET)/qt/lib/pkgconfig' \ - CXXFLAGS=-D_WIN32_WINNT=0x0500 \ - LIBTIFF_LIBS="`'$(TARGET)-pkg-config' libtiff-4 --libs`" - PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - - # Test program - '$(TARGET)-g++' \ - -W -Wall -Werror -ansi -pedantic \ - '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-poppler.exe' \ - `'$(TARGET)-pkg-config' poppler poppler-cpp --cflags --libs` -endef - -poppler_BUILD_SHARED = - -openscenegraph_DEPS := gcc boost curl dcmtk freetype gdal giflib gstreamer \ - gta jasper jpeg libpng openal openexr openthreads poppler \ - qtbase tiff zlib - +poppler_DEPS := $(filter-out qt ,$(poppler_DEPS)) qtbase +openscenegraph_DEPS := $(filter-out qt ,$(openscenegraph_DEPS)) qtbase diff --git a/src/openscenegraph.mk b/src/openscenegraph.mk index de3fda2..0ebb2e2 100644 --- a/src/openscenegraph.mk +++ b/src/openscenegraph.mk @@ -32,6 +32,9 @@ define $(PKG)_BUILD -DBUILD_OSG_APPLICATIONS=OFF \ -DPOPPLER_HAS_CAIRO_EXITCODE=0 \ -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \ - -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 + -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \ + $(if $(filter qtbase,$(PKG)_DEPS), \ + -DDESIRED_QT_VERSION=4, \ + -DDESIRED_QT_VERSION=5) $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 endef diff --git a/src/poppler.mk b/src/poppler.mk index e569d84..305b40f 100644 --- a/src/poppler.mk +++ b/src/poppler.mk @@ -24,14 +24,14 @@ define $(PKG)_BUILD cd '$(1)' \ && PATH='$(PREFIX)/$(TARGET)/qt/bin:$(PATH)' \ ./configure \ - --host='$(TARGET)' \ - --build="`config.guess`" \ - --prefix='$(PREFIX)/$(TARGET)' \ + $(MXE_CONFIGURE_OPTS) \ --disable-silent-rules \ - --disable-shared \ - --enable-static \ --enable-xpdf-headers \ - --enable-poppler-qt4 \ + $(if $(filter qtbase,$(PKG)_DEPS), \ + --enable-poppler-qt4 \ + --disable-poppler-qt5, \ + --disable-poppler-qt4 \ + --enable-poppler-qt5) \ --enable-zlib \ --enable-cms=lcms2 \ --enable-libcurl \ @@ -64,6 +64,3 @@ define $(PKG)_BUILD '$(2).cxx' -o '$(PREFIX)/$(TARGET)/bin/test-poppler.exe' \ `'$(TARGET)-pkg-config' poppler poppler-cpp --cflags --libs` endef - -$(PKG)_BUILD_SHARED = - -- cgit v0.12 From 8b3b780330bc194ace5eabb2d68ade22b37925e1 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Mon, 6 Jun 2016 19:07:46 -0500 Subject: Modify patch to openscenegraph to require finding qt5 or qt4. --- src/openscenegraph-1-fixes.patch | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/openscenegraph-1-fixes.patch b/src/openscenegraph-1-fixes.patch index a372c1d..057e636 100644 --- a/src/openscenegraph-1-fixes.patch +++ b/src/openscenegraph-1-fixes.patch @@ -182,3 +182,26 @@ index 1111111..2222222 100644 IF(GSTREAMER_FOUND AND GLIB_FOUND) ADD_SUBDIRECTORY(gstreamer) ENDIF() + +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Saikrishna Arcot +Date: Mon, 6 Jun 2016 19:06:00 -0500 +Subject: [PATCH] Require the presence of either qt5 or qt4. + + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 1111111..2222222 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -712,9 +712,9 @@ IF(OSG_USE_QT AND NOT ANDROID) + + IF (DESIRED_QT_VERSION) + IF (DESIRED_QT_VERSION MATCHES 5) +- FIND_PACKAGE(Qt5Widgets) ++ FIND_PACKAGE(Qt5Widgets REQUIRED) + ELSEIF (DESIRED_QT_VERSION MATCHES 4) +- FIND_PACKAGE(Qt4) ++ FIND_PACKAGE(Qt4 REQUIRED) + ELSE() + FIND_PACKAGE(Qt3) + ENDIF() -- cgit v0.12 From 4a2dfcebb211c82523612e14f25acfde55b7c7c3 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Tue, 7 Jun 2016 17:34:26 -0500 Subject: Get value of variable instead of using the variable name itself. --- src/openscenegraph.mk | 2 +- src/poppler.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openscenegraph.mk b/src/openscenegraph.mk index 0ebb2e2..2f31a8e 100644 --- a/src/openscenegraph.mk +++ b/src/openscenegraph.mk @@ -33,7 +33,7 @@ define $(PKG)_BUILD -DPOPPLER_HAS_CAIRO_EXITCODE=0 \ -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \ -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \ - $(if $(filter qtbase,$(PKG)_DEPS), \ + $(if $(filter qtbase,$($(PKG)_DEPS)), \ -DDESIRED_QT_VERSION=4, \ -DDESIRED_QT_VERSION=5) $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 diff --git a/src/poppler.mk b/src/poppler.mk index 305b40f..1a5dbca 100644 --- a/src/poppler.mk +++ b/src/poppler.mk @@ -27,7 +27,7 @@ define $(PKG)_BUILD $(MXE_CONFIGURE_OPTS) \ --disable-silent-rules \ --enable-xpdf-headers \ - $(if $(filter qtbase,$(PKG)_DEPS), \ + $(if $(filter qtbase,$($(PKG)_DEPS)), \ --enable-poppler-qt4 \ --disable-poppler-qt5, \ --disable-poppler-qt4 \ -- cgit v0.12 From a3c8d4b5eb194efe7c8d060923d0cbad51e80ebc Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Wed, 8 Jun 2016 08:41:52 -0500 Subject: Another fix to the makefiles. --- src/openscenegraph.mk | 4 ++-- src/poppler.mk | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openscenegraph.mk b/src/openscenegraph.mk index 2f31a8e..325df09 100644 --- a/src/openscenegraph.mk +++ b/src/openscenegraph.mk @@ -34,7 +34,7 @@ define $(PKG)_BUILD -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \ -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \ $(if $(filter qtbase,$($(PKG)_DEPS)), \ - -DDESIRED_QT_VERSION=4, \ - -DDESIRED_QT_VERSION=5) + -DDESIRED_QT_VERSION=5, \ + -DDESIRED_QT_VERSION=4) $(MAKE) -C '$(1).build' -j '$(JOBS)' install VERBOSE=1 endef diff --git a/src/poppler.mk b/src/poppler.mk index 1a5dbca..ef79922 100644 --- a/src/poppler.mk +++ b/src/poppler.mk @@ -28,8 +28,8 @@ define $(PKG)_BUILD --disable-silent-rules \ --enable-xpdf-headers \ $(if $(filter qtbase,$($(PKG)_DEPS)), \ - --enable-poppler-qt4 \ - --disable-poppler-qt5, \ + --enable-poppler-qt5 \ + --disable-poppler-qt4, \ --disable-poppler-qt4 \ --enable-poppler-qt5) \ --enable-zlib \ -- cgit v0.12 From 8e58fb9363c910757c299163cc9fd019a73b47bf Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Thu, 9 Jun 2016 07:40:36 -0500 Subject: Fix Poppler makefile...again. --- src/poppler.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/poppler.mk b/src/poppler.mk index ef79922..35fe2ff 100644 --- a/src/poppler.mk +++ b/src/poppler.mk @@ -30,8 +30,8 @@ define $(PKG)_BUILD $(if $(filter qtbase,$($(PKG)_DEPS)), \ --enable-poppler-qt5 \ --disable-poppler-qt4, \ - --disable-poppler-qt4 \ - --enable-poppler-qt5) \ + --disable-poppler-qt5 \ + --enable-poppler-qt4) \ --enable-zlib \ --enable-cms=lcms2 \ --enable-libcurl \ -- cgit v0.12 From 5b52ff4bc16bdc2e88f7e85338a7cfbffe918b43 Mon Sep 17 00:00:00 2001 From: Saikrishna Arcot Date: Thu, 9 Jun 2016 08:44:19 -0500 Subject: Fix openthreads compilation. --- src/openthreads.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openthreads.mk b/src/openthreads.mk index f314463..c6f2d57 100644 --- a/src/openthreads.mk +++ b/src/openthreads.mk @@ -20,6 +20,7 @@ define $(PKG)_BUILD -DDYNAMIC_OPENTHREADS=$(CMAKE_SHARED_BOOL) \ -DCMAKE_VERBOSE_MAKEFILE=TRUE \ -DOSG_USE_QT=FALSE \ + -DPOPPLER_HAS_CAIRO_EXITCODE=0 \ -D_OPENTHREADS_ATOMIC_USE_GCC_BUILTINS_EXITCODE=1 \ -D_OPENTHREADS_ATOMIC_USE_WIN32_INTERLOCKED=1 \ '$(1)' -- cgit v0.12