Gentoo Archives: gentoo-commits

From: Keri Harris <keri@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/qu-prolog/files/, dev-lang/qu-prolog/
Date: Sat, 27 Jan 2018 13:15:01
Message-Id: 1517058876.e50021b642670b3ef723e1f086c96983c69f0841.keri@gentoo
1 commit: e50021b642670b3ef723e1f086c96983c69f0841
2 Author: Keri Harris <keri <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 27 13:13:55 2018 +0000
4 Commit: Keri Harris <keri <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 27 13:14:36 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e50021b6
7
8 dev-lang/qu-prolog: port to QT5
9
10 Package-Manager: Portage-2.3.13, Repoman-2.3.3
11
12 dev-lang/qu-prolog/files/qu-prolog-10.0-qt5.patch | 35 ++++++++
13 dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild | 101 ++++++++++++++++++++++
14 2 files changed, 136 insertions(+)
15
16 diff --git a/dev-lang/qu-prolog/files/qu-prolog-10.0-qt5.patch b/dev-lang/qu-prolog/files/qu-prolog-10.0-qt5.patch
17 new file mode 100644
18 index 00000000000..d82e78cada1
19 --- /dev/null
20 +++ b/dev-lang/qu-prolog/files/qu-prolog-10.0-qt5.patch
21 @@ -0,0 +1,35 @@
22 +diff -ur qp10.0.orig/src/xqp/term.cc qp10.0/src/xqp/term.cc
23 +--- qp10.0.orig/src/xqp/term.cc 2008-07-09 07:32:37.000000000 +0200
24 ++++ qp10.0/src/xqp/term.cc 2018-01-27 14:06:54.101545854 +0100
25 +@@ -38,7 +38,7 @@
26 +
27 + bool graphic_char(QChar c)
28 + {
29 +- switch (c.toAscii())
30 ++ switch (c.toLatin1())
31 + {
32 + case '-':
33 + case '/':
34 +diff -ur qp10.0.orig/src/xqp/xqp.cc qp10.0/src/xqp/xqp.cc
35 +--- qp10.0.orig/src/xqp/xqp.cc 2011-07-14 01:08:42.000000000 +0200
36 ++++ qp10.0/src/xqp/xqp.cc 2018-01-27 14:07:53.902543353 +0100
37 +@@ -167,7 +167,7 @@
38 +
39 + void Xqp::send_cmd_to_qp(QString cmd)
40 + {
41 +- write(qp_stdin, cmd.toAscii(), cmd.length());
42 ++ write(qp_stdin, cmd.toLatin1(), cmd.length());
43 + }
44 +
45 +
46 +diff -ur qp10.0.orig/src/xqp/xqp.pro qp10.0/src/xqp/xqp.pro
47 +--- qp10.0.orig/src/xqp/xqp.pro 2008-07-09 07:32:37.000000000 +0200
48 ++++ qp10.0/src/xqp/xqp.pro 2018-01-27 14:01:24.764559627 +0100
49 +@@ -4,6 +4,7 @@
50 +
51 + TEMPLATE = app
52 + INCLUDEPATH += .
53 ++QT += widgets
54 +
55 + # Input
56 + HEADERS += interact.h qpconfig.h qthelp.h term.h xqp.h xqpqueries.h
57
58 diff --git a/dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild b/dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild
59 new file mode 100644
60 index 00000000000..bb5af2782e1
61 --- /dev/null
62 +++ b/dev-lang/qu-prolog/qu-prolog-10.0-r1.ebuild
63 @@ -0,0 +1,101 @@
64 +# Copyright 1999-2018 Gentoo Foundation
65 +# Distributed under the terms of the GNU General Public License v2
66 +
67 +EAPI=5
68 +
69 +inherit eutils multilib qmake-utils
70 +
71 +MY_P=qp${PV}
72 +
73 +DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
74 +HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
75 +SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
76 +
77 +LICENSE="Apache-2.0 GPL-2+"
78 +SLOT="0"
79 +KEYWORDS="~amd64 ~ppc ~x86"
80 +IUSE="debug doc examples pedro qt5 readline threads"
81 +
82 +RDEPEND="
83 + !dev-util/mpatch
84 + !dev-util/rej
85 + !games-rpg/kqlives
86 + qt5? (
87 + dev-qt/qtwidgets:5
88 + dev-qt/qtgui:5
89 + )
90 + pedro? ( net-misc/pedro )
91 + readline? ( app-misc/rlwrap )"
92 +DEPEND="${RDEPEND}
93 + dev-lang/perl"
94 +
95 +S="${WORKDIR}"/${MY_P}
96 +
97 +src_prepare() {
98 + epatch "${FILESDIR}"/${P}-configure.patch
99 + epatch "${FILESDIR}"/${P}-associated-item.patch
100 + epatch "${FILESDIR}"/${P}-gcc6.patch
101 + epatch "${FILESDIR}"/${P}-qt5.patch
102 +}
103 +
104 +src_configure() {
105 + econf \
106 + --libdir=/usr/$(get_libdir) \
107 + $(use_enable debug) \
108 + $(use_enable threads multiple-threads)
109 +
110 + if use qt5; then
111 + cd "${S}"/src/xqp || die
112 + eqmake5 xqp.pro
113 + fi
114 +}
115 +
116 +src_compile() {
117 + emake OPTIMISATION="${CXXFLAGS}"
118 +
119 + if use qt5; then
120 + cd "${S}"/src/xqp || die
121 + emake
122 + fi
123 +}
124 +
125 +src_install() {
126 + sed \
127 + -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
128 + -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
129 +
130 + dobin bin/{qc,qecat,qp,kq}
131 +
132 + use qt5 && dobin src/xqp/xqp
133 +
134 + into /usr/$(get_libdir)/${PN}
135 + dobin bin/{qa,qc1.qup,qdeal,qem,qg,ql,qppp}
136 +
137 + insinto /usr/$(get_libdir)/${PN}/bin
138 + doins bin/rl_commands
139 + doins bin/{qc1.qup,qecat,qg,qp}.qx
140 +
141 + insinto /usr/$(get_libdir)/${PN}/library
142 + doins prolog/library/*.qo
143 +
144 + insinto /usr/$(get_libdir)/${PN}/compiler
145 + doins prolog/compiler/*.qo
146 +
147 + doman doc/man/man1/*.1
148 +
149 + dodoc README
150 +
151 + if use doc ; then
152 + docinto reference-manual
153 + dodoc doc/manual/*.html
154 + docinto user-guide
155 + dodoc doc/user/main.pdf
156 + fi
157 +
158 + if use examples ; then
159 + insinto /usr/share/doc/${PF}/examples
160 + doins examples/*.ql
161 + docinto examples
162 + newdoc examples/README README.examples
163 + fi
164 +}