summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-19 09:01:05 +0100
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-11-19 09:01:15 +0100
commit5555a534f787bf54db2aa145f7b7fa64891a52cd (patch)
tree2817b9a491c0c71e5dc8398aee1d4dcae4d41665 /package
parent236f8675d3607ea58763381615c854fa43f0b5f0 (diff)
qtbase: add new package, use device method like buildroot for cross-compile
Diffstat (limited to 'package')
-rw-r--r--package/Config.in1
-rw-r--r--package/qtbase/Makefile64
-rw-r--r--package/qtbase/files/qmake.conf25
-rw-r--r--package/qtbase/files/qplatformdefs.h1
-rw-r--r--package/section.lst1
5 files changed, 92 insertions, 0 deletions
diff --git a/package/Config.in b/package/Config.in
index a3ddfe633..f1d04185a 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -73,6 +73,7 @@ source package/Config.in.auto.libs.fonts
source package/Config.in.auto.libs.image
source package/Config.in.auto.libs.misc
source package/Config.in.auto.libs.net
+source package/Config.in.auto.libs.qt
source package/Config.in.auto.libs.video
endmenu
diff --git a/package/qtbase/Makefile b/package/qtbase/Makefile
new file mode 100644
index 000000000..ce054fae0
--- /dev/null
+++ b/package/qtbase/Makefile
@@ -0,0 +1,64 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= qtbase
+PKG_VERSION:= 5.7.0
+PKG_RELEASE:= 1
+PKG_HASH:= 3e7b6d123cab23a587ccbc45173296b33786faa409dba0494e4658fda3ede646
+PKG_DESCR:= qt5 base
+PKG_SECTION:= libs/qt
+PKG_DEPENDS:= zlib libressl
+PKG_BUILDDEP:= zlib libressl
+PKG_NEEDS:= c++
+PKG_URL:= https://www.qt.io/
+PKG_SITES:= http://download.qt.io/official_releases/qt/5.7/$(PKG_VERSION)/submodules/
+
+DISTFILES:= $(PKG_NAME)-opensource-src-$(PKG_VERSION).tar.xz
+WRKDIST= $(WRKDIR)/$(PKG_NAME)-opensource-src-$(PKG_VERSION)
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,QTBASE,qtbase,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+CONFIGURE_ENV:=
+CONFIG_STYLE:= minimal
+CONFIGURE_ARGS+= -v \
+ -prefix /usr \
+ -hostprefix $(STAGING_HOST_DIR) \
+ -opensource \
+ -confirm-license \
+ -no-nis \
+ -no-pch \
+ -no-cups \
+ -no-iconv \
+ -no-rpath \
+ -no-gstreamer \
+ -no-dbus \
+ -no-pulseaudio \
+ -no-alsa \
+ -no-openssl \
+ -release \
+ -shared \
+ -system-zlib \
+ -nomake tests \
+ -nomake examples \
+ -device openadk \
+ -device-option CROSS_COMPILE="$(TARGET_CROSS)" \
+ -device-option ADK_COMPILER_CFLAGS="$(TARGET_CFLAGS)" \
+ -device-option ADK_COMPILER_CXXFLAGS="$(TARGET_CXXFLAGS)" \
+ -device-option ADK_COMPILER_LDFLAGS="$(TARGET_LDFLAGS)" \
+ -no-gcc-sysroot \
+ -sysroot $(STAGING_TARGET_DIR)
+
+pre-configure:
+ $(INSTALL_DIR) $(WRKBUILD)/mkspecs/devices/linux-openadk-g++/
+ $(CP) ./files/qmake.conf $(WRKBUILD)/mkspecs/devices/linux-openadk-g++/
+ $(CP) ./files/qplatformdefs.h $(WRKBUILD)/mkspecs/devices/linux-openadk-g++/
+
+qtbase-install:
+ $(INSTALL_DIR) $(IDIR_QTBASE)/usr/lib
+ $(CP) $(STAGING_TARGET_DIR)/usr/lib/libQt5*.so* $(IDIR_QTBASE)/usr/lib
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/qtbase/files/qmake.conf b/package/qtbase/files/qmake.conf
new file mode 100644
index 000000000..2d083572a
--- /dev/null
+++ b/package/qtbase/files/qmake.conf
@@ -0,0 +1,25 @@
+# Qt5 has a mechanism to support "device" profiles, so that people can
+# specify the compiler, compiler flags and so on for a specific device.
+
+# We leverage this mechanism in the OpenADK packaging of qt5 to
+# simplify cross-compilation: we have our own "device" definition, which
+# allows us to easily pass the cross-compiler paths and flags from our
+# qt5.mk.
+
+include(../common/linux_device_pre.conf)
+
+# modifications to g++-unix.conf
+QMAKE_CC = $${CROSS_COMPILE}gcc
+QMAKE_CXX = $${CROSS_COMPILE}g++
+
+# modifications to gcc-base.conf
+QMAKE_CFLAGS += $${ADK_COMPILER_CFLAGS}
+QMAKE_CXXFLAGS += $${ADK_COMPILER_CXXFLAGS}
+QMAKE_LFLAGS = $${ADK_COMPILER_LDFLAGS}
+CONFIG += nostrip
+
+QMAKE_LIBS += -lrt -lpthread -ldl
+QMAKE_CFLAGS_ISYSTEM =
+
+include(../common/linux_device_post.conf)
+load(qt_config)
diff --git a/package/qtbase/files/qplatformdefs.h b/package/qtbase/files/qplatformdefs.h
new file mode 100644
index 000000000..99e9a2792
--- /dev/null
+++ b/package/qtbase/files/qplatformdefs.h
@@ -0,0 +1 @@
+#include "../../linux-g++/qplatformdefs.h"
diff --git a/package/section.lst b/package/section.lst
index 17b2dc696..845abff10 100644
--- a/package/section.lst
+++ b/package/section.lst
@@ -54,6 +54,7 @@ libs/fonts Font Libraries
libs/image Image Libraries
libs/misc Misc Libraries
libs/net Networking Libraries
+libs/qt QT libraries
libs/video Video Libraries
dev/lang Programming Languages
dev/perl Perl modules