From e5c85ab1e532bf1fff32f154794d8435454e19dc Mon Sep 17 00:00:00 2001
From: Guilhem Saurel <guilhem.saurel@laas.fr>
Date: Wed, 27 May 2020 12:48:22 +0200
Subject: [PATCH] [wip/py-qt-pythonqt] Initial import

---
 Makefile                        |  1 +
 py-qt-pythonqt/DESCR            |  1 +
 py-qt-pythonqt/Makefile         | 52 +++++++++++++++++++++++++++++++++
 py-qt-pythonqt/PLIST            | 33 +++++++++++++++++++++
 py-qt-pythonqt/depend.mk        | 30 +++++++++++++++++++
 py-qt-pythonqt/distinfo         |  4 +++
 py-qt-pythonqt/patches/patch-aa | 12 ++++++++
 7 files changed, 133 insertions(+)
 create mode 100644 py-qt-pythonqt/DESCR
 create mode 100644 py-qt-pythonqt/Makefile
 create mode 100644 py-qt-pythonqt/PLIST
 create mode 100644 py-qt-pythonqt/depend.mk
 create mode 100644 py-qt-pythonqt/distinfo
 create mode 100644 py-qt-pythonqt/patches/patch-aa

diff --git a/Makefile b/Makefile
index f05c8d74..04656710 100644
--- a/Makefile
+++ b/Makefile
@@ -99,6 +99,7 @@ SUBDIR+=	py-prf-ros-controllers
 SUBDIR+=	py-pycddlib
 SUBDIR+=	py-qpoases
 SUBDIR+=	py-qt-gepetto-pythonqt
+SUBDIR+=	py-qt-pythonqt
 SUBDIR+=	py-ros-baxter-common
 SUBDIR+=	py-roscontrol-sot
 SUBDIR+=	py-scs
diff --git a/py-qt-pythonqt/DESCR b/py-qt-pythonqt/DESCR
new file mode 100644
index 00000000..e6b873fd
--- /dev/null
+++ b/py-qt-pythonqt/DESCR
@@ -0,0 +1 @@
+PythonQt is a dynamic Python binding for Qt. It offers an easy way to embed the Python scripting language into your Qt applications.
diff --git a/py-qt-pythonqt/Makefile b/py-qt-pythonqt/Makefile
new file mode 100644
index 00000000..f897235d
--- /dev/null
+++ b/py-qt-pythonqt/Makefile
@@ -0,0 +1,52 @@
+# robotpkg Makefile for:	wip/py38-qt5-PythonQt
+# Created:			Guilhem Saurel on Wed, 27 May 2020
+#
+
+ORG=			mevislab
+NAME=			PythonQt
+VERSION=		3.2
+
+DISTNAME=		${NAME}${VERSION}
+PKGNAME=		${PKGTAG.python-}${PKGTAG.qt-}${NAME}-${VERSION}
+
+HOMEPAGE=		${MASTER_SITE_GITHUB:=${ORG}/${NAME}}
+MASTER_SITES=		${MASTER_SITE_OPENROBOTS:=${NAME}/}
+MASTER_REPOSITORY=	git ${HOMEPAGE}.git
+EXTRACT_SUFX=		.zip
+
+CATEGORIES=		wip
+COMMENT=		Dynamic Python binding for Qt Applications
+LICENSE=		gnu-lgpl-v2.1
+MAINTAINER=		guilhem.saurel@laas.fr
+
+QMAKE_ARGS+=		QT_MAJOR_VERSION=${QT_SELECT}
+QMAKE_ARGS+=		CONFIG+=release
+
+SUBST_CLASSES+=		py-ver
+SUBST_STAGE.py-ver=	pre-configure
+SUBST_MESSAGE.py-ver=	fix python version
+SUBST_FILES.py-ver=	build/python.prf
+SUBST_SED.py-ver=	-e 's/PYTHON_VERSION=2.7/PYTHON_VERSION=${PYTHON_VERSION}/'
+
+PYTHON_SELF_CONFLICT=	yes
+
+do-install:
+	${RUN}cd ${WRKSRC};							\
+	${MKDIR} ${DESTDIR}${PREFIX}/{lib,include/${NAME}/gui};			\
+	${MKDIR} ${DESTDIR}${PREFIX}/include/${NAME}/extensions/${NAME}_QtAll;	\
+	${INSTALL_LIB} lib/*.so							\
+		${DESTDIR}${PREFIX}/lib/;					\
+	${INSTALL_DATA} src/*.h							\
+		${DESTDIR}${PREFIX}/include/${NAME}/;				\
+	${INSTALL_DATA} src/gui/*.h						\
+		${DESTDIR}${PREFIX}/include/${NAME}/gui/;			\
+	${INSTALL_DATA} extensions/${NAME}_QtAll/*.h				\
+		${DESTDIR}${PREFIX}/include/${NAME}/extensions/${NAME}_QtAll/
+
+include ../../pkgtools/install-sh/depend.mk
+include ../../mk/sysdep/python.mk
+include ../../mk/sysdep/qmake.mk
+include ../../mk/sysdep/qt.mk
+include ../../mk/language/c.mk
+include ../../mk/language/c++.mk
+include ../../mk/robotpkg.mk
diff --git a/py-qt-pythonqt/PLIST b/py-qt-pythonqt/PLIST
new file mode 100644
index 00000000..fec539de
--- /dev/null
+++ b/py-qt-pythonqt/PLIST
@@ -0,0 +1,33 @@
+@comment Wed May 27 11:49:50 CEST 2020
+include/PythonQt/PythonQt.h
+include/PythonQt/PythonQtBoolResult.h
+include/PythonQt/PythonQtClassInfo.h
+include/PythonQt/PythonQtClassWrapper.h
+include/PythonQt/PythonQtConversion.h
+include/PythonQt/PythonQtCppWrapperFactory.h
+include/PythonQt/PythonQtDoc.h
+include/PythonQt/PythonQtImportFileInterface.h
+include/PythonQt/PythonQtImporter.h
+include/PythonQt/PythonQtInstanceWrapper.h
+include/PythonQt/PythonQtMethodInfo.h
+include/PythonQt/PythonQtMisc.h
+include/PythonQt/PythonQtObjectPtr.h
+include/PythonQt/PythonQtProperty.h
+include/PythonQt/PythonQtPythonInclude.h
+include/PythonQt/PythonQtQFileImporter.h
+include/PythonQt/PythonQtSignal.h
+include/PythonQt/PythonQtSignalReceiver.h
+include/PythonQt/PythonQtSlot.h
+include/PythonQt/PythonQtSlotDecorator.h
+include/PythonQt/PythonQtStdDecorators.h
+include/PythonQt/PythonQtStdIn.h
+include/PythonQt/PythonQtStdOut.h
+include/PythonQt/PythonQtSystem.h
+include/PythonQt/PythonQtUtils.h
+include/PythonQt/PythonQtVariants.h
+include/PythonQt/extensions/PythonQt_QtAll/PythonQt_QtAll.h
+include/PythonQt/extensions/PythonQt_QtAll/moc_predefs.h
+include/PythonQt/gui/PythonQtScriptingConsole.h
+include/PythonQt/moc_predefs.h
+lib/libPythonQt-Qt5-Python${PYTHON_VERSION}.so
+lib/libPythonQt_QtAll-Qt5-Python${PYTHON_VERSION}.so
diff --git a/py-qt-pythonqt/depend.mk b/py-qt-pythonqt/depend.mk
new file mode 100644
index 00000000..c1d3c5bc
--- /dev/null
+++ b/py-qt-pythonqt/depend.mk
@@ -0,0 +1,30 @@
+# robotpkg depend.mk for:	wip/py38-qt5-PythonQt
+# Created:			Guilhem Saurel on Wed, 27 May 2020
+#
+
+DEPEND_DEPTH:=			${DEPEND_DEPTH}+
+PY_QT_PYTHONQT_DEPEND_MK:=	${PY_QT_PYTHONQT_DEPEND_MK}+
+
+ifeq (+,$(DEPEND_DEPTH))
+DEPEND_PKG+=			py-qt-pythonqt
+endif
+
+ifeq (+,$(PY_QT_PYTHONQT_DEPEND_MK)) # ------------------------------------------
+
+PREFER.py-qt-pythonqt?=		robotpkg
+
+SYSTEM_SEARCH.py-qt-pythonqt=				\
+  'include/PythonQt/PythonQt.h'				\
+  'lib/libPythonQt-Qt5-Python${PYTHON_VERSION}.so'
+
+DEPEND_USE+=			py-qt-pythonqt
+
+DEPEND_ABI.py-qt-pythonqt?=	${PKGTAG.python}-${PKGTAG.qt}-PythonQt>=3.2
+DEPEND_DIR.py-qt-pythonqt?=	../../wip/py-qt-pythonqt
+
+include ../../mk/sysdep/python.mk
+include ../../mk/sysdep/qt.mk
+
+endif # PY_QT_PYTHONQT_DEPEND_MK ------------------------------------------------
+
+DEPEND_DEPTH:=		${DEPEND_DEPTH:+=}
diff --git a/py-qt-pythonqt/distinfo b/py-qt-pythonqt/distinfo
new file mode 100644
index 00000000..a9d62794
--- /dev/null
+++ b/py-qt-pythonqt/distinfo
@@ -0,0 +1,4 @@
+SHA1 (PythonQt3.2.zip) = b85f2cf9a4e546a46dc416bb0e86759983384543
+RMD160 (PythonQt3.2.zip) = fa86fc32d86d5464d0bc940e28a740e87bf036eb
+Size (PythonQt3.2.zip) = 4539058 bytes
+SHA1 (patch-aa) = 8f3a509645cf97519f8ef96536e49f8e08494a72
diff --git a/py-qt-pythonqt/patches/patch-aa b/py-qt-pythonqt/patches/patch-aa
new file mode 100644
index 00000000..6cf78464
--- /dev/null
+++ b/py-qt-pythonqt/patches/patch-aa
@@ -0,0 +1,12 @@
+--- build/python.prf.orig	2020-05-27 11:28:54.244112165 +0200
++++ build/python.prf	2020-05-27 11:29:17.937347840 +0200
+@@ -36,6 +36,8 @@
+   # on linux, python-config is used to autodetect Python.
+   # make sure that you have installed a matching python-dev package.
+   
+-  unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)
++  system(python$${PYTHON_VERSION}-config --embed --libs) {
++    unix:LIBS += $$system(python$${PYTHON_VERSION}-config --embed --libs)
++  } else: unix:LIBS += $$system(python$${PYTHON_VERSION}-config --libs)  
+   unix:QMAKE_CXXFLAGS += $$system(python$${PYTHON_VERSION}-config --includes)
+ }
-- 
GitLab