/[gentoo-x86]/sci-misc/qcad/qcad-2.0.4.0-r3.ebuild
Gentoo

Contents of /sci-misc/qcad/qcad-2.0.4.0-r3.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.13 - (show annotations) (download)
Mon Dec 8 20:06:51 2008 UTC (11 years, 11 months ago) by bicatali
Branch: MAIN
CVS Tags: HEAD
Changes since 1.12: +1 -1 lines
FILE REMOVED
Removed old versions
(Portage version: 2.2_rc17/cvs/Linux 2.6.25-gentoo-r7 x86_64)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-misc/qcad/qcad-2.0.4.0-r3.ebuild,v 1.12 2007/12/31 19:24:55 je_fro Exp $
4
5 inherit kde-functions eutils
6
7 MY_PV=${PV}-1
8 MY_P=${P}-1.src
9 S=${WORKDIR}/${MY_P}
10 DESCRIPTION="A 2D CAD package based upon Qt."
11 SRC_URI="http://www.ribbonsoft.com/archives/qcad/${MY_P}.tar.gz
12 doc? ( mirror://gentoo/qcad-manual-200404.tar.bz2
13 http://dev.gentoo.org/~phosphan/qcad-manual-200404.tar.bz2 )"
14 HOMEPAGE="http://www.ribbonsoft.com/qcad.html"
15
16 LICENSE="GPL-2"
17 SLOT="0"
18 IUSE="doc"
19 KEYWORDS="amd64 hppa ppc ppc64 x86"
20
21 DEPEND=">=sys-apps/sed-4"
22 need-qt 3.3
23
24 src_unpack() {
25 unpack ${A}
26 # Bug 112864 - fix dir unpack bug
27 touch "${WORKDIR}"
28 cd "${S}"
29 echo >> defs.pro "DEFINES += _REENTRANT QT_THREAD_SUPPORT"
30 echo >> defs.pro "CONFIG += thread release"
31 echo >> defs.pro "QMAKE_CFLAGS_RELEASE += ${CFLAGS}"
32 echo >> defs.pro "QMAKE_CXXFLAGS_RELEASE += ${CXXFLAGS}"
33 for file in */Makefile scripts/build_qcad.sh; do
34 sed -i -e 's~qmake~${QTDIR}/bin/qmake~g' $file || \
35 die "unable to correct path to qmake in $file"
36 done
37 epatch "${FILESDIR}"/${MY_P}-gentoo.patch
38 epatch "${FILESDIR}"/manual.patch-r1
39 epatch "${FILESDIR}"/${MY_P}-intptr.patch
40 cd "${S}"/scripts
41 sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
42 die "unable to add MAKEOPTS"
43 sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
44 || die "unable to set CHOST"
45 cd "${S}"/qcad/src
46 sed -i -e "s:FULLASSISTANTPATH:${QTDIR}/bin:" qc_applicationwindow.cpp \
47 || die "sed failed on assistant path"
48 sed -i -e "s:QCADDOCPATH:/usr/share/doc/${PF}:" \
49 qc_applicationwindow.cpp || die "sed failed on manual path"
50
51 }
52
53 src_compile() {
54 ### borrowed from kde.eclass #
55 #
56 # fix the sandbox errors "can't writ to .kde or .qt" problems.
57 # this is a fake homedir that is writeable under the sandbox, so that the build process
58 # can do anything it wants with it.
59 REALHOME="$HOME"
60 mkdir -p "${T}"/fakehome/.kde
61 mkdir -p "${T}"/fakehome/.qt
62 export HOME="$T/fakehome"
63 # things that should access the real homedir
64 [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
65 cd scripts
66 sh build_qcad.sh || die "build failed"
67 if ! test -f "${S}"/qcad/qcad; then
68 die "no binary created, build failed"
69 fi
70 }
71
72 src_install () {
73 cd qcad
74 dobin qcad
75 dodir /usr/share/${P}
76 cp -pPR patterns examples fonts qm "${D}"/usr/share/${P}
77 cd ..
78 dodoc README
79 if use doc; then
80 insinto /usr/share/doc/${PF}/
81 cd "${WORKDIR}"
82 cp -pPR qcaddoc.adp cad "${D}"usr/share/doc/${PF}
83 fi
84 make_desktop_entry ${PN} ${PN} ${PN} Office
85 }

  ViewVC Help
Powered by ViewVC 1.1.20