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

Contents of /sci-misc/qcad/qcad-2.0.3.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jun 26 03:19:08 2005 UTC (15 years, 5 months ago) by ribosome
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Removed obsolete versions.
(Portage version: 2.0.51.19)

1 # Copyright 1999-2005 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.3.1.ebuild,v 1.3 2005/01/10 07:27:36 phosphan Exp $
4
5 inherit kde-functions eutils
6
7 MY_P=${P}-1.src
8 S=${WORKDIR}/${MY_P}
9 DESCRIPTION="A 2D CAD package based upon Qt."
10 SRC_URI="http://www.ribbonsoft.com/archives/qcad/${MY_P}.tar.gz"
11 HOMEPAGE="http://www.ribbonsoft.com/qcad.html"
12
13 LICENSE="GPL-2"
14 SLOT="0"
15 IUSE=""
16 KEYWORDS="x86 ppc"
17
18 need-qt 3.3
19
20 DEPEND="${DEPEND}
21 >=sys-apps/sed-4"
22
23 src_unpack() {
24 unpack ${A}
25 cd ${S}
26 echo >> defs.pro "DEFINES += _REENTRANT QT_THREAD_SUPPORT"
27 echo >> defs.pro "CONFIG += thread release"
28 echo >> defs.pro "QMAKE_CFLAGS_RELEASE += ${CFLAGS}"
29 echo >> defs.pro "QMAKE_CXXFLAGS_RELEASE += ${CXXFLAGS}"
30 epatch ${FILESDIR}/${MY_P}-gentoo.patch
31 cd ${S}/scripts
32 sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
33 die "unable to add MAKEOPTS"
34 sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
35 || die "unable to set CHOST"
36 }
37
38
39 src_compile() {
40 ### borrowed from kde.eclass #
41 #
42 # fix the sandbox errors "can't writ to .kde or .qt" problems.
43 # this is a fake homedir that is writeable under the sandbox, so that the build process
44 # can do anything it wants with it.
45 REALHOME="$HOME"
46 mkdir -p $T/fakehome/.kde
47 mkdir -p $T/fakehome/.qt
48 export HOME="$T/fakehome"
49 # things that should access the real homedir
50 [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
51 cd scripts
52 sh build_qcad.sh || die "build failed"
53 if ! test -f ${S}/qcad/qcad; then
54 die "no binary created, build failed"
55 fi
56 }
57
58 src_install () {
59 cd qcad
60 mv qcad qcad.bin
61 dobin qcad.bin
62 echo -e "#!/bin/sh\ncd /usr/share/${P}\nqcad.bin" > qcad
63 chmod ugo+rx qcad
64 dobin qcad
65 dodir /usr/share/${P}
66 cp -a patterns examples fonts scripts qm ${D}/usr/share/${P}
67 cd ..
68 dodoc README
69 dohtml -r qcad/doc
70 }
71
72 pkg_postinst () {
73 if ! has_version "sci-misc/qcad-parts"; then
74 einfo
75 einfo "The QCad parts library is available as a seperate package."
76 einfo "emerge sci-misc/qcad-parts to get it."
77 einfo
78 fi
79 }

  ViewVC Help
Powered by ViewVC 1.1.20