Gentoo Archives: gentoo-commits

From: Justin Lecher <jlec@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sci:master commit in: dev-python/pythonqt/, dev-python/pythonqt/files/
Date: Tue, 03 Dec 2013 14:53:07
Message-Id: 1386055545.054c35bd6ec9b6ae596a543840b811e49d9eecb8.jlec@gentoo
1 commit: 054c35bd6ec9b6ae596a543840b811e49d9eecb8
2 Author: Christophe Paccolat <chr.paccolat <AT> mycable <DOT> ch>
3 AuthorDate: Mon Dec 3 13:21:05 2012 +0000
4 Commit: Justin Lecher <jlec <AT> gentoo <DOT> org>
5 CommitDate: Tue Dec 3 07:25:45 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/sci.git;a=commit;h=054c35bd
7
8 dev-python/pythonqt: New package
9
10 Dependency for sci-misc/elmer-gui
11
12 ---
13 .../pythonqt/files/pythonqt-2.1-lib_location.patch | 22 +++++++
14 .../files/pythonqt-9999-lib_location.patch | 20 ++++++
15 dev-python/pythonqt/pythonqt-1.1.ebuild | 75 ++++++++++++++++++++++
16 dev-python/pythonqt/pythonqt-2.1.ebuild | 27 ++++++++
17 dev-python/pythonqt/pythonqt-9999.ebuild | 24 +++++++
18 5 files changed, 168 insertions(+)
19
20 diff --git a/dev-python/pythonqt/files/pythonqt-2.1-lib_location.patch b/dev-python/pythonqt/files/pythonqt-2.1-lib_location.patch
21 new file mode 100644
22 index 0000000..41d4dbf
23 --- /dev/null
24 +++ b/dev-python/pythonqt/files/pythonqt-2.1-lib_location.patch
25 @@ -0,0 +1,22 @@
26 +--- PythonQt2.1_Qt4.8/CMakeLists.txt.auto-diff-temp 2012-11-30 16:38:06.374358937 +0100
27 ++++ PythonQt2.1_Qt4.8/CMakeLists.txt 2012-11-30 16:39:37.421438916 +0100
28 +@@ -215,7 +215,7 @@
29 + # See http://blog.onesadcookie.com/2008/01/installname-magic.html
30 + #
31 + set_target_properties(PythonQt PROPERTIES
32 +- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
33 ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib64"
34 + )
35 +
36 + target_link_libraries(PythonQt
37 +@@ -228,8 +228,8 @@
38 +
39 + install(TARGETS PythonQt
40 + RUNTIME DESTINATION bin
41 +- LIBRARY DESTINATION lib
42 +- ARCHIVE DESTINATION lib)
43 ++ LIBRARY DESTINATION lib64
44 ++ ARCHIVE DESTINATION lib64)
45 + install(FILES ${headers} DESTINATION include/PythonQt)
46 +
47 + MESSAGE(STATUS "<<< Gentoo configuration >>>
48
49 diff --git a/dev-python/pythonqt/files/pythonqt-9999-lib_location.patch b/dev-python/pythonqt/files/pythonqt-9999-lib_location.patch
50 new file mode 100644
51 index 0000000..5f810c5
52 --- /dev/null
53 +++ b/dev-python/pythonqt/files/pythonqt-9999-lib_location.patch
54 @@ -0,0 +1,20 @@
55 +--- pythonqt-9999/CMakeLists.txt.auto-diff-temp 2012-11-30 17:02:28.754418411 +0100
56 ++++ pythonqt-9999/CMakeLists.txt 2012-11-30 17:02:58.158429034 +0100
57 +@@ -215,7 +215,7 @@
58 + # See http://blog.onesadcookie.com/2008/01/installname-magic.html
59 + #
60 + set_target_properties(PythonQt PROPERTIES
61 +- INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
62 ++ INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib64"
63 + )
64 +
65 + target_link_libraries(PythonQt
66 +@@ -228,6 +228,6 @@
67 +
68 + install(TARGETS PythonQt
69 + RUNTIME DESTINATION bin
70 +- LIBRARY DESTINATION lib
71 +- ARCHIVE DESTINATION lib)
72 ++ LIBRARY DESTINATION lib64
73 ++ ARCHIVE DESTINATION lib64)
74 + install(FILES ${headers} DESTINATION include/PythonQt)
75
76 diff --git a/dev-python/pythonqt/pythonqt-1.1.ebuild b/dev-python/pythonqt/pythonqt-1.1.ebuild
77 new file mode 100644
78 index 0000000..90f52ab
79 --- /dev/null
80 +++ b/dev-python/pythonqt/pythonqt-1.1.ebuild
81 @@ -0,0 +1,75 @@
82 +# Copyright 1999-2012 Gentoo Foundation
83 +# Distributed under the terms of the GNU General Public License v2
84 +# $Header: $
85 +
86 +EAPI="4"
87 +
88 +inherit qt4-r2 python
89 +
90 +MY_PN="PythonQt"
91 +MY_P=${MY_PN}-${PV}
92 +
93 +DESCRIPTION="A dynamic Python binding for the Qt framework."
94 +HOMEPAGE="http://pythonqt.sourceforge.net/"
95 +SRC_URI="mirror://sourceforge/project/${PN}/${PN}/${MY_PN}%20${PV}/${MY_P}.zip"
96 +
97 +LICENSE="LGPL-2.1"
98 +SLOT="0"
99 +KEYWORDS="~x86 ~amd64"
100 +IUSE="examples extensions test"
101 +
102 +DEPEND="dev-lang/python
103 + x11-libs/qt-core
104 + x11-libs/qt-gui"
105 +RDEPEND="${DEPEND}"
106 +
107 +S="${WORKDIR}/${MY_P}"
108 +
109 +src_prepare(){
110 + sed -i \
111 + -e "s|unix:LIBS +=.*|unix:LIBS += $(python_get_library -l)|" \
112 + -e "s|unix:QMAKE_CXXFLAGS +=.*|unix:QMAKE_CXXFLAGS += -I$(python_get_includedir)|" \
113 + build/python.prf || die
114 +
115 + # Don't build examples and tests
116 + sed -i \
117 + -e 's/examples//' \
118 + -e 's/tests//' \
119 + ${MY_PN}.pro || die
120 +
121 + if use !extensions; then
122 + sed -i 's/extensions//' ${MY_PN}.pro || die
123 + fi
124 +}
125 +
126 +src_configure() {
127 + eqmake4 "${S}" ./${MY_PN}.pro
128 +}
129 +
130 +src_install(){
131 + dodir /usr/include/${MY_PN}/{gui,wrapper}
132 +
133 + insinto /usr/include/${MY_PN}
134 + doins src/*.h
135 +
136 + insinto /usr/include/${MY_PN}/gui
137 + doins src/gui/*.h
138 +
139 + if use extensions; then
140 + insinto /usr/include/${MY_PN}/gui
141 + doins extensions/PythonQtGui/*.h
142 + fi
143 +
144 + insinto /usr/include/${MY_PN}/wrapper
145 + doins src/wrapper/*.h
146 +
147 + dolib.so lib/*.so*
148 +
149 + dodoc CHANGELOG.txt COPYING README
150 + dohtml doxygen/html/*
151 +
152 + if use examples; then
153 + insinto /usr/share/doc/${PF}/examples
154 + doins -r examples/*
155 + fi
156 +}
157
158 diff --git a/dev-python/pythonqt/pythonqt-2.1.ebuild b/dev-python/pythonqt/pythonqt-2.1.ebuild
159 new file mode 100644
160 index 0000000..34b9934
161 --- /dev/null
162 +++ b/dev-python/pythonqt/pythonqt-2.1.ebuild
163 @@ -0,0 +1,27 @@
164 +# Copyright 1999-2012 Gentoo Foundation
165 +# Distributed under the terms of the GNU General Public License v2
166 +# $Header: $
167 +
168 +EAPI="4"
169 +
170 +inherit cmake-utils
171 +
172 +DESCRIPTION="A dynamic Python binding for the Qt framework."
173 +HOMEPAGE="http://pythonqt.sourceforge.net/"
174 +SRC_URI="mirror://sourceforge/pythonqt/pythonqt/PythonQt-2.1/PythonQt2.1_Qt4.8.zip"
175 +
176 +LICENSE="LGPL-2.1"
177 +SLOT="0"
178 +KEYWORDS="~x86 ~amd64"
179 +IUSE=""
180 +
181 +DEPEND=""
182 +RDEPEND="${DEPEND}"
183 +
184 +S="${WORKDIR}/PythonQt${PV}_Qt4.8"
185 +CMAKE_BUILD_DIR="${S}"
186 +
187 +src_prepare()
188 +{
189 + use amd64 && epatch "${FILESDIR}/${P}-lib_location.patch"
190 +}
191
192 diff --git a/dev-python/pythonqt/pythonqt-9999.ebuild b/dev-python/pythonqt/pythonqt-9999.ebuild
193 new file mode 100644
194 index 0000000..d7d6bfd
195 --- /dev/null
196 +++ b/dev-python/pythonqt/pythonqt-9999.ebuild
197 @@ -0,0 +1,24 @@
198 +# Copyright 1999-2012 Gentoo Foundation
199 +# Distributed under the terms of the GNU General Public License v2
200 +# $Header: $
201 +
202 +EAPI="4"
203 +
204 +inherit cmake-utils subversion
205 +
206 +DESCRIPTION="A dynamic Python binding for the Qt framework."
207 +HOMEPAGE="http://pythonqt.sourceforge.net/"
208 +ESVN_REPO_URI="https://pythonqt.svn.sourceforge.net/svnroot/pythonqt/trunk"
209 +
210 +LICENSE="LGPL-2.1"
211 +SLOT="0"
212 +KEYWORDS=""
213 +IUSE=""
214 +
215 +DEPEND=""
216 +RDEPEND="${DEPEND}"
217 +
218 +src_prepare()
219 +{
220 + use amd64 && epatch "${FILESDIR}/${P}-lib_location.patch"
221 +}