# ChangeLog for app-sci/qcad
# Copyright 2002-2004 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-sci/qcad/ChangeLog,v 1.25 2004/09/21 11:19:34 kugelfang Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-sci/qcad/ChangeLog,v 1.26 2004/09/30 10:56:14 phosphan Exp $
+
+*qcad-2.0.4.0 (30 Sep 2004)
+
+ 30 Sep 2004; Patrick Kursawe <phosphan@gentoo.org> +files/manual.patch-r1,
+ +files/qcad-2.0.4.0-1.src-gentoo.patch, +files/qcad-2.0.4.0-gcc34.patch,
+ +qcad-2.0.4.0.ebuild:
+ Version bump. gcc 3.4 patch no longer necessary. Online help currently not
+ available.
21 Sep 2004; Danny van Dyk <kugelfang@gentoo.org>
+files/qcad-2.0.3.1-gcc34.patch, qcad-2.0.3.1-r1.ebuild:
-MD5 e0ba95e81903783aaefdbe9c7c21f798 ChangeLog 3633
-MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+MD5 1b8df33eaca56757734617c61b10dbb4 qcad-2.0.3.1-r1.ebuild 2564
MD5 da5b7f439ad855a2177bb9e16b7aadc4 qcad-2.0.2.0.ebuild 1563
+MD5 11700d62c8b6491c8b4d4768e6176b95 qcad-2.0.4.0.ebuild 2756
MD5 3f5bb10ad3af78c0467932587393a5be qcad-2.0.3.1.ebuild 2117
-MD5 1b8df33eaca56757734617c61b10dbb4 qcad-2.0.3.1-r1.ebuild 2564
-MD5 f6b59499dd0213d34c3d983a7fd7481c files/manual.patch 754
-MD5 5aab9950cd320093d39df3b09256dddf files/digest-qcad-2.0.2.0 71
+MD5 ddfdbda02ea4e72b38b96cd4f4c180eb ChangeLog 3928
+MD5 8c623e53daafa025137077c6b65815bd metadata.xml 156
+MD5 03a389a58ed129eda4567585a4094a33 files/qcad-2.0.3.1-1.src-gentoo.patch 2177
+MD5 2e380c8a9e9dc284ddd73ef3378d9591 files/qcad-2.0.4.0-gcc34.patch 374
+MD5 c79cda60b6383bbd7cd5c59e5975444e files/manual.patch-r1 841
+MD5 03a389a58ed129eda4567585a4094a33 files/qcad-2.0.4.0-1.src-gentoo.patch 2177
MD5 2e380c8a9e9dc284ddd73ef3378d9591 files/qcad-2.0.3.1-gcc34.patch 374
-MD5 ec141f17f0419be4c51b80ed330f4d35 files/qcad-2.0.2.0-1.src-gentoo.patch 2409
+MD5 5aab9950cd320093d39df3b09256dddf files/digest-qcad-2.0.2.0 71
MD5 48b9ef97369159a131b93e1392af5add files/digest-qcad-2.0.3.1 71
-MD5 03a389a58ed129eda4567585a4094a33 files/qcad-2.0.3.1-1.src-gentoo.patch 2177
+MD5 e7233e9c5228abc9cb54e3705bdf9707 files/digest-qcad-2.0.4.0 71
+MD5 f6b59499dd0213d34c3d983a7fd7481c files/manual.patch 754
+MD5 ec141f17f0419be4c51b80ed330f4d35 files/qcad-2.0.2.0-1.src-gentoo.patch 2409
MD5 48b9ef97369159a131b93e1392af5add files/digest-qcad-2.0.3.1-r1 71
--- /dev/null
+MD5 d99ae2855029af21f544e302a60d6840 qcad-2.0.4.0-1.src.tar.gz 3169984
--- /dev/null
+--- qcad/src/qc_applicationwindow.cpp 2004-09-14 22:13:07.000000000 +0200
++++ qcad/src/qc_applicationwindow.cpp.new 2004-09-30 10:00:04.415741888 +0200
+@@ -2765,10 +2765,10 @@
+ RS_SYSTEM->getAppDir().latin1());
+ RS_DEBUG->print("QC_ApplicationWindow::slotHelpManual(): appdir: %s",
+ RS_SYSTEM->getAppDir().latin1());
+- assistant = new QAssistantClient(RS_SYSTEM->getAppDir()+"/bin", this);
++ assistant = new QAssistantClient("FULLASSISTANTPATH", this);
+ QStringList args;
+ args << "-profile";
+- args << QDir::convertSeparators(RS_SYSTEM->getDocPath() + "/qcaddoc.adp");
++ args << QDir::convertSeparators("QCADDOCPATH/qcaddoc.adp");
+ // args << QString("doc") + QDir::separator() + QString("qcaddoc.adp");
+
+ #if QT_VERSION>=0x030200
--- /dev/null
+diff -ur qcad-2.0.1.0-1.src/qcad/Makefile qcad-2.0.1.0-1.src-gentoo/qcad/Makefile
+--- qcad-2.0.3.1-1.src/qcad/Makefile 2004-04-21 09:59:37.783127376 +0200
++++ Makefile.new 2004-04-21 10:00:52.040865017 +0200
+@@ -17,7 +17,7 @@
+ prepare:
+
+ qcad: src/Makefile src/*.h src/*.cpp ../dxflib/lib/libdxf.a ../qcadguiqt/lib/libqcadguiqt.a ../qcadlib/lib/libqcad.a
+- cd src && $(MAKE)
++ cd src && $(MAKE) $(MAKEOPTS)
+
+ src/Makefile: src/qcad.pro
+ cd src && qmake qcad.pro
+diff -ur qcad-2.0.1.0-1.src/qcadactions/Makefile qcad-2.0.1.0-1.src-gentoo/qcadactions/Makefile
+--- qcad-2.0.1.0-1.src/qcadactions/Makefile 2003-10-08 10:09:03.000000000 +1300
++++ qcad-2.0.1.0-1.src-gentoo/qcadactions/Makefile 2003-10-21 14:27:13.000000000 +1300
+@@ -29,7 +29,7 @@
+
+ ./lib/libqcadactions.a: src/Makefile
+ $(MAKE) src/Makefile
+- cd src && $(MAKE)
++ cd src && $(MAKE) $(MAKEOPTS)
+
+ src/Makefile:
+ cd src && qmake qcadactions.pro
+diff -ur qcad-2.0.1.0-1.src/qcadcmd/Makefile qcad-2.0.1.0-1.src-gentoo/qcadcmd/Makefile
+--- qcad-2.0.1.0-1.src/qcadcmd/Makefile 2003-10-08 10:09:03.000000000 +1300
++++ qcad-2.0.1.0-1.src-gentoo/qcadcmd/Makefile 2003-10-21 14:24:06.000000000 +1300
+@@ -29,7 +29,7 @@
+
+ ./lib/libqcadcmd.a: src/Makefile
+ $(MAKE) src/Makefile
+- cd src && $(MAKE)
++ cd src && $(MAKE) $(MAKEOPTS)
+
+ src/Makefile:
+ cd src && qmake qcadcmd.pro
+diff -ur qcad-2.0.1.0-1.src/qcadguiqt/Makefile qcad-2.0.1.0-1.src-gentoo/qcadguiqt/Makefile
+--- qcad-2.0.1.0-1.src/qcadguiqt/Makefile 2003-10-08 10:09:04.000000000 +1300
++++ qcad-2.0.1.0-1.src-gentoo/qcadguiqt/Makefile 2003-10-21 14:53:40.000000000 +1300
+@@ -89,7 +89,7 @@
+ done )
+
+ ./lib/libqcadguiqt.a: src/Makefile
+- cd src && $(MAKE)
++ cd src && $(MAKE) $(MAKEOPTS)
+
+ src/Makefile:
+ cd src && qmake qcadguiqt.pro
+diff -ur qcad-2.0.1.0-1.src/qcadlib/Makefile qcad-2.0.1.0-1.src-gentoo/qcadlib/Makefile
+--- qcad-2.0.1.0-1.src/qcadlib/Makefile 2003-10-08 10:09:02.000000000 +1300
++++ qcad-2.0.1.0-1.src-gentoo/qcadlib/Makefile 2003-10-21 14:23:55.000000000 +1300
+@@ -29,7 +29,7 @@
+
+ ./lib/libqcad.a: src/Makefile
+ $(MAKE) src/Makefile
+- cd src && $(MAKE)
++ cd src && $(MAKE) $(MAKEOPTS)
+
+ src/Makefile:
+ cd src && qmake qcadlib.pro
+
--- /dev/null
+--- qcadlib/src/math/rs_math.h.orig Sat Aug 21 20:00:56 2004
++++ qcadlib/src/math/rs_math.h Sat Aug 21 20:07:09 2004
+@@ -45,8 +45,9 @@
+ #include "rs_vector.h"
+
+ #ifdef __GNUC__
+-#define min(x,y) (x<y ? x : y)
+-#define max(x,y) (x>y ? x : y)
++//#define min(x,y) (x<y ? x : y)
++//#define max(x,y) (x>y ? x : y)
++using namespace std;
+ #endif
+
+ #define ARAD 57.29577951308232
--- /dev/null
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-sci/qcad/qcad-2.0.4.0.ebuild,v 1.1 2004/09/30 10:56:14 phosphan Exp $
+
+inherit kde-functions eutils
+
+MY_PV=${PV}-1
+MY_P=${P}-1.src
+S=${WORKDIR}/${MY_P}
+DESCRIPTION="A 2D CAD package based upon Qt."
+SRC_URI="http://www.ribbonsoft.com/archives/qcad/${MY_P}.tar.gz"
+# mirror://gentoo/qcaddoc-${MY_PV}.tar.bz2"
+HOMEPAGE="http://www.ribbonsoft.com/qcad.html"
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE=""
+KEYWORDS="~x86"
+
+need-qt 3.3
+
+DEPEND="${DEPEND}
+ >=sys-apps/sed-4"
+
+src_unpack() {
+ unpack ${A}
+# mv doc ${S}/qcad/
+ cd ${S}
+ echo >> defs.pro "DEFINES += _REENTRANT QT_THREAD_SUPPORT"
+ echo >> defs.pro "CONFIG += thread release"
+ echo >> defs.pro "QMAKE_CFLAGS_RELEASE += ${CFLAGS}"
+ echo >> defs.pro "QMAKE_CXXFLAGS_RELEASE += ${CXXFLAGS}"
+ epatch ${FILESDIR}/${MY_P}-gentoo.patch
+ epatch ${FILESDIR}/manual.patch-r1
+ cd ${S}/scripts
+ sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
+ die "unable to add MAKEOPTS"
+ sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
+ || die "unable to set CHOST"
+ cd ${S}/qcad/src
+ sed -i -e "s:FULLASSISTANTPATH:${QTDIR}/bin:" qc_applicationwindow.cpp \
+ || die "sed failed on assistant path"
+ sed -i -e "s:QCADDOCPATH:/usr/share/doc/${PF}/html:" \
+ qc_applicationwindow.cpp || die "sed failed on manual path"
+
+}
+
+
+src_compile() {
+ ### borrowed from kde.eclass #
+ #
+ # fix the sandbox errors "can't writ to .kde or .qt" problems.
+ # this is a fake homedir that is writeable under the sandbox, so that the build process
+ # can do anything it wants with it.
+ REALHOME="$HOME"
+ mkdir -p $T/fakehome/.kde
+ mkdir -p $T/fakehome/.qt
+ export HOME="$T/fakehome"
+ # things that should access the real homedir
+ [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
+ cd scripts
+ sh build_qcad.sh || die "build failed"
+ if ! test -f ${S}/qcad/qcad; then
+ die "no binary created, build failed"
+ fi
+}
+
+src_install () {
+ cd qcad
+ mv qcad qcad.bin
+ dobin qcad.bin
+ echo -e "#!/bin/sh\ncd /usr/share/${P}\nqcad.bin" > qcad
+ chmod ugo+rx qcad
+ dobin qcad
+ dodir /usr/share/${P}
+ cp -a patterns examples fonts scripts qm ${D}/usr/share/${P}
+ cd ..
+ dodoc README
+# currently no help available
+# dohtml -r qcad/doc/.
+# insinto /usr/share/doc/${PF}/html
+# doins qcad/doc/qcaddoc.adp
+}
+
+pkg_postinst () {
+ if ! has_version "app-sci/qcad-parts"; then
+ einfo
+ einfo "The QCad parts library is available as a seperate package."
+ einfo "emerge app-sci/qcad-parts to get it."
+ einfo
+ fi
+ einfo "help was removed from the community edition - see"
+ einfo "https://sourceforge.net/tracker/?func=detail&atid=417068&aid=1037631&group_id=36417"
+ einfo "for details"
+}