summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /dev-lang/qu-prolog
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'dev-lang/qu-prolog')
-rw-r--r--dev-lang/qu-prolog/Manifest2
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch40
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch34
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch33
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch32
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch34
-rw-r--r--dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch32
-rw-r--r--dev-lang/qu-prolog/metadata.xml8
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild96
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.1.ebuild103
-rw-r--r--dev-lang/qu-prolog/qu-prolog-9.5.ebuild94
11 files changed, 508 insertions, 0 deletions
diff --git a/dev-lang/qu-prolog/Manifest b/dev-lang/qu-prolog/Manifest
new file mode 100644
index 000000000000..66dca89eac8f
--- /dev/null
+++ b/dev-lang/qu-prolog/Manifest
@@ -0,0 +1,2 @@
+DIST qp9.1.tar.gz 1460679 SHA256 1f3052f2700d537b33207943a3ade48b2b3aa5cd01cafc0475bcf26c645bc9af SHA512 44590be9d1ecec97fa6c82b657e9ecc3778f833644055ee87c9a6a36996663d139ffd7b583d72f8ac317648e0f22ccbc2a1da9c3a5eabd23381c668e5d073cbb WHIRLPOOL 37ec4e25c2284b267f72c016b4ea1e542d735c9da5f6532d1f6b439af2b91422ddc251d31e1a17b6366ee6af0e754acdbf8a0c44ef03f46a2515f14b1259b732
+DIST qp9.5.tar.gz 1537445 SHA256 7e4b9883fad00b16c919620033da48482b2eccc875b37f8170d674ce9f72aee2 SHA512 7a79090a6e3f0263e38cf5e5724a5c35c63c8cca2842fa8c07f9ff84011ef7ac9a22b195713aeb626a787c9391c612f3fea0ff38c084634a2f62258feb3eb6e2 WHIRLPOOL 3f589998f3480925fa3ad3c54f1f0ba4122cfa12c48d9bf1269e92a0fdf52d1823cd8dae8851e36d2c97ec2f869da10ff6ee7f2663b752d1d396e1b5a95ca982
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch
new file mode 100644
index 000000000000..1fde09843e66
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-cerr-ptr.patch
@@ -0,0 +1,40 @@
+diff -ur qp9.1.orig/src/gc.cc qp9.1/src/gc.cc
+--- qp9.1.orig/src/gc.cc 2011-08-23 11:17:44.000000000 +1200
++++ qp9.1/src/gc.cc 2011-11-20 07:14:14.000000000 +1300
+@@ -152,7 +152,7 @@
+ {
+ cerr << size << endl;
+ heapobject* ptr = reinterpret_cast<heapobject*>(term);
+- cerr << hex << (u_int)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
++ cerr << hex << (wordptr)(ptr) << " : " << *ptr << " " << *(ptr+1) << dec << endl;
+ return false;
+ }
+ return true;
+diff -ur qp9.1.orig/src/objects.h qp9.1/src/objects.h
+--- qp9.1.orig/src/objects.h 2011-08-23 11:17:44.000000000 +1200
++++ qp9.1/src/objects.h 2011-11-20 07:14:14.000000000 +1300
+@@ -1242,18 +1242,12 @@
+ << this->getName() << "\" ";
+
+ #ifndef WIN32
+- switch (hasAssociatedItem())
+- {
+- case AssociatedNone:
+- std::cerr << "(no info)";
+- break;
+- case AssociatedInteger:
+- std::cerr << "int: " << getAssociatedInteger();
+- break;
+- case AssociatedAtom:
+- std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
+- break;
+- }
++ if (hasAssociatedInteger())
++ std::cerr << "int: " << getAssociatedInteger();
++ else if (hasAssociatedAtom())
++ std::cerr << "atom: [" << std::hex << (wordptr) getAssociatedAtom() << std::dec << "]";
++ else
++ std::cerr << "(no info)";
+ #endif
+ }
+ #endif
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch
new file mode 100644
index 000000000000..f53eb067b1fd
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-cflags.patch
@@ -0,0 +1,34 @@
+diff -ur qp9.1.orig/Makefile.in qp9.1/Makefile.in
+--- qp9.1.orig/Makefile.in 2011-08-23 11:17:54.000000000 +1200
++++ qp9.1/Makefile.in 2012-01-14 12:57:16.000000000 +1300
+@@ -23,7 +23,7 @@
+
+ export PROLOG = prolog
+
+-
++export CXX=@CXX@
+
+ .PHONY: all
+ all: objects
+diff -ur qp9.1.orig/src/Makefile.in qp9.1/src/Makefile.in
+--- qp9.1.orig/src/Makefile.in 2011-08-23 11:17:54.000000000 +1200
++++ qp9.1/src/Makefile.in 2012-01-14 12:48:33.000000000 +1300
+@@ -40,7 +40,7 @@
+
+ #export DEBUGGING=
+
+-export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
++#export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+ export QACXXFLAGS = -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+
+ .PHONY: all
+@@ -79,6 +79,9 @@
+
+ # Targets
+
++.cc.o:
++ $(CXX) $(CXXFLAGS) @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized -c $<
++
+ .PHONY: commands
+ commands: $(GENERATED) $(LIBRARIES) $(BIG_LIBRARY)
+ @$(MAKE) $(ALL_COMMANDS)
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch
new file mode 100644
index 000000000000..82d5bc7f7ebb
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-gcc.patch
@@ -0,0 +1,33 @@
+diff -ur qp9.1.orig/src/pile.h qp9.1/src/pile.h
+--- qp9.1.orig/src/pile.h 2011-08-23 01:17:44.000000000 +0200
++++ qp9.1/src/pile.h 2013-01-09 12:07:44.000000000 +0100
+@@ -75,7 +75,7 @@
+ //
+ // Push a StoredType onto the pile.
+ //
+- void push(const StoredType s){ pushElement(s); }
++ void push(const StoredType s){ this->pushElement(s); }
+
+ //
+ // Pop a StoredType off the pile.
+@@ -85,7 +85,7 @@
+ //
+ // Pop n entries of StoredType off the pile.
+ //
+- void popNEntries(word32 n) { setTopOfStack(this->getTopOfStack() - n); }
++ void popNEntries(word32 n) { this->setTopOfStack(this->getTopOfStack() - n); }
+
+ //
+ // Check whether the pile is empty or not.
+diff -ur qp9.1.orig/src/system_support.cc qp9.1/src/system_support.cc
+--- qp9.1.orig/src/system_support.cc 2011-08-23 01:17:44.000000000 +0200
++++ qp9.1/src/system_support.cc 2013-01-09 12:07:16.000000000 +0100
+@@ -61,6 +61,8 @@
+ #include <iostream>
+ #ifdef WIN32
+ #include <direct.h>
++#else
++#include <unistd.h>
+ #endif //WIN32
+
+ using namespace std;
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch b/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch
new file mode 100644
index 000000000000..4a1aa23607ac
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.1-portage.patch
@@ -0,0 +1,32 @@
+diff -ur qp9.1.orig/bin/qc.in qp9.1/bin/qc.in
+--- qp9.1.orig/bin/qc.in 2011-08-23 11:17:28.000000000 +1200
++++ qp9.1/bin/qc.in 2011-11-20 07:16:18.000000000 +1300
+@@ -27,13 +27,13 @@
+
+ ##############################
+
+-preprocess='@QPHOME@/bin/qppp'
+-expand='@QPHOME@/bin/qg'
+-qpcompile='@QPHOME@/bin/qc1'
++preprocess='qppp'
++expand='qg'
++qpcompile='qc1'
+ compversion='qup'
+-assemble='@QPHOME@/bin/qa'
+-link='@QPHOME@/bin/ql'
+-execute='@QPHOME@/bin/qem'
++assemble='qa'
++link='ql'
++execute='qem'
+ libqofiles="@QPHOME@/prolog/compiler/*.qo @QPHOME@/prolog/library/*.qo"
+
+ ##############################
+diff -ur qp9.1.orig/prolog/Makefile.in qp9.1/prolog/Makefile.in
+--- qp9.1.orig/prolog/Makefile.in 2006-04-06 16:01:45.000000000 +1200
++++ qp9.1/prolog/Makefile.in 2011-11-20 07:16:18.000000000 +1300
+@@ -1,3 +1,5 @@
++PATH:=$(PATH):@QPHOME@/bin
++
+ .DEFAULT:
+ @$(MAKE) -C compiler $@
+ @$(MAKE) -C library $@
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch b/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch
new file mode 100644
index 000000000000..5bcce94d9b6b
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.5-cflags.patch
@@ -0,0 +1,34 @@
+diff -ur qp9.5.orig/Makefile.in qp9.5/Makefile.in
+--- qp9.5.orig/Makefile.in 2014-11-17 06:46:22.000000000 +0100
++++ qp9.5/Makefile.in 2015-05-03 11:29:52.000000000 +0200
+@@ -23,7 +23,7 @@
+
+ export PROLOG = prolog
+
+-
++export CXX=@CXX@
+
+ .PHONY: all
+ all: objects
+diff -ur qp9.5.orig/src/Makefile.in qp9.5/src/Makefile.in
+--- qp9.5.orig/src/Makefile.in 2014-11-17 06:46:22.000000000 +0100
++++ qp9.5/src/Makefile.in 2015-05-03 11:29:52.000000000 +0200
+@@ -40,7 +40,7 @@
+
+ #export DEBUGGING=
+
+-export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
++#export CXXFLAGS = @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 $(OPTIMISATION) @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+ export QACXXFLAGS = -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized
+
+ .PHONY: all
+@@ -79,6 +79,9 @@
+
+ # Targets
+
++.cc.o:
++ $(CXX) $(CXXFLAGS) @GCC_ALIAS_FLAG@ -Wall -D_GNU_SOURCE=1 @DEBUGGING@ @GCCINCLUDES@ -Wno-uninitialized -c $<
++
+ .PHONY: commands
+ commands: $(GENERATED) $(LIBRARIES) $(BIG_LIBRARY)
+ @$(MAKE) $(ALL_COMMANDS)
diff --git a/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch b/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch
new file mode 100644
index 000000000000..55dc08ffe474
--- /dev/null
+++ b/dev-lang/qu-prolog/files/qu-prolog-9.5-portage.patch
@@ -0,0 +1,32 @@
+diff -ur qp9.5.orig/bin/qc.in qp9.5/bin/qc.in
+--- qp9.5.orig/bin/qc.in 2014-11-17 06:45:59.000000000 +0100
++++ qp9.5/bin/qc.in 2015-05-03 11:31:54.000000000 +0200
+@@ -27,13 +27,13 @@
+
+ ##############################
+
+-preprocess='@QPHOME@/bin/qppp'
+-expand='@QPHOME@/bin/qg'
+-qpcompile='@QPHOME@/bin/qc1'
++preprocess='qppp'
++expand='qg'
++qpcompile='qc1'
+ compversion='qup'
+-assemble='@QPHOME@/bin/qa'
+-link='@QPHOME@/bin/ql'
+-execute='@QPHOME@/bin/qem'
++assemble='qa'
++link='ql'
++execute='qem'
+ libqofiles="@QPHOME@/prolog/compiler/*.qo @QPHOME@/prolog/library/*.qo"
+
+ ##############################
+diff -ur qp9.5.orig/prolog/Makefile.in qp9.5/prolog/Makefile.in
+--- qp9.5.orig/prolog/Makefile.in 2006-04-06 06:01:45.000000000 +0200
++++ qp9.5/prolog/Makefile.in 2015-05-03 11:31:54.000000000 +0200
+@@ -1,3 +1,5 @@
++PATH:=$(PATH):@QPHOME@/bin
++
+ .DEFAULT:
+ @$(MAKE) -C compiler $@
+ @$(MAKE) -C library $@
diff --git a/dev-lang/qu-prolog/metadata.xml b/dev-lang/qu-prolog/metadata.xml
new file mode 100644
index 000000000000..9708914df07f
--- /dev/null
+++ b/dev-lang/qu-prolog/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>prolog</herd>
+ <use>
+ <flag name="pedro">Pedro subscription/notification communications system</flag>
+ </use>
+</pkgmetadata>
diff --git a/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild b/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild
new file mode 100644
index 000000000000..64aa5fa1f18d
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.1-r1.ebuild
@@ -0,0 +1,96 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-cerr-ptr.patch \
+ "${FILESDIR}"/${P}-gcc.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qa,qdeal,qem,ql,qc,qc1.qup,qecat,qg,qp,qppp,kq}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.1.ebuild b/dev-lang/qu-prolog/qu-prolog-9.1.ebuild
new file mode 100644
index 000000000000..8fe6db88cccc
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.1.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=2
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="amd64 ppc x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch \
+ "${FILESDIR}"/${P}-cerr-ptr.patch \
+ "${FILESDIR}"/${P}-gcc.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake || die "emake failed"
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake || die "emake xqp failed"
+ fi
+}
+
+src_install() {
+ sed -i -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/qa bin/qdeal bin/qem bin/ql || die
+ dobin bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp bin/qppp || die
+ dobin bin/kq || die
+
+ if use qt4; then
+ dobin src/xqp/xqp || die
+ fi
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/qc1.qup.qx \
+ bin/qecat.qx \
+ bin/qg.qx \
+ bin/qp.qx || die
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo || die
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo || die
+
+ doman doc/man/man1/*.1 || die
+
+ dodoc README || die
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html || die
+ docinto user-guide
+ dodoc doc/user/main.pdf || die
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql || die
+ docinto examples
+ dodoc examples/README || die
+ fi
+}
diff --git a/dev-lang/qu-prolog/qu-prolog-9.5.ebuild b/dev-lang/qu-prolog/qu-prolog-9.5.ebuild
new file mode 100644
index 000000000000..9434322dd8a4
--- /dev/null
+++ b/dev-lang/qu-prolog/qu-prolog-9.5.ebuild
@@ -0,0 +1,94 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils multilib qmake-utils
+
+MY_P=qp${PV}
+
+DESCRIPTION="Extended Prolog supporting quantifiers, object-variables and substitutions"
+HOMEPAGE="http://www.itee.uq.edu.au/~pjr/HomePages/QuPrologHome.html"
+SRC_URI="http://www.itee.uq.edu.au/~pjr/HomePages/QPFiles/${MY_P}.tar.gz"
+
+LICENSE="Qu-Prolog GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE="debug doc examples pedro qt4 readline threads"
+
+RDEPEND="
+ !dev-util/mpatch
+ !dev-util/rej
+ qt4? ( dev-qt/qtgui:4 )
+ pedro? ( net-misc/pedro )
+ readline? ( app-misc/rlwrap )"
+DEPEND="${RDEPEND}
+ dev-lang/perl"
+
+S="${WORKDIR}"/${MY_P}
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}"/${P}-portage.patch \
+ "${FILESDIR}"/${P}-cflags.patch
+}
+
+src_configure() {
+ econf \
+ --libdir=/usr/$(get_libdir) \
+ $(use_enable debug) \
+ $(use_enable threads multiple-threads)
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ eqmake4 xqp.pro
+ fi
+}
+
+src_compile() {
+ emake
+
+ if use qt4; then
+ cd "${S}"/src/xqp || die
+ emake
+ fi
+}
+
+src_install() {
+ sed \
+ -e "s|${S}|/usr/$(get_libdir)/qu-prolog|g" \
+ -i bin/qc bin/qc1.qup bin/qecat bin/qg bin/qp || die
+
+ dobin bin/{qa,qdeal,qem,ql,qc,qc1.qup,qecat,qg,qp,qppp,kq}
+
+ use qt4 && dobin src/xqp/xqp
+
+ insinto /usr/$(get_libdir)/${PN}/bin
+ doins bin/rl_commands
+ doins bin/{qc1.qup,qecat,qg,qp}.qx
+
+ insinto /usr/$(get_libdir)/${PN}/library
+ doins prolog/library/*.qo
+
+ insinto /usr/$(get_libdir)/${PN}/compiler
+ doins prolog/compiler/*.qo
+
+ doman doc/man/man1/*.1
+
+ dodoc README
+
+ if use doc ; then
+ docinto reference-manual
+ dodoc doc/manual/*.html
+ docinto user-guide
+ dodoc doc/user/main.pdf
+ fi
+
+ if use examples ; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.ql
+ docinto examples
+ newdoc examples/README README.examples
+ fi
+}