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

Contents of /sci-misc/qcad/qcad-2.0.3.1-r1.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-r1.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 epatch ${FILESDIR}/manual.patch
32 cd ${S}/scripts
33 sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
34 die "unable to add MAKEOPTS"
35 sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
36 || die "unable to set CHOST"
37 cd ${S}/qcad/src
38 sed -i -e "s:FULLASSISTANTPATH:${QTDIR}/bin:" qc_applicationwindow.cpp \
39 || die "sed failed on assistant path"
40 sed -i -e "s:QCADDOCPATH:/usr/share/doc/${PF}/html:" \
41 qc_applicationwindow.cpp || die "sed failed on manual path"
42
43 cd ${S}
44
45 # This patch allows compilation with gcc-3.4
46 epatch ${FILESDIR}/${P}-gcc34.patch
47 }
48
49
50 src_compile() {
51 ### borrowed from kde.eclass #
52 #
53 # fix the sandbox errors "can't writ to .kde or .qt" problems.
54 # this is a fake homedir that is writeable under the sandbox, so that the build process
55 # can do anything it wants with it.
56 REALHOME="$HOME"
57 mkdir -p $T/fakehome/.kde
58 mkdir -p $T/fakehome/.qt
59 export HOME="$T/fakehome"
60 # things that should access the real homedir
61 [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
62 cd scripts
63 sh build_qcad.sh || die "build failed"
64 if ! test -f ${S}/qcad/qcad; then
65 die "no binary created, build failed"
66 fi
67 }
68
69 src_install () {
70 cd qcad
71 mv qcad qcad.bin
72 dobin qcad.bin
73 echo -e "#!/bin/sh\ncd /usr/share/${P}\nqcad.bin" > qcad
74 chmod ugo+rx qcad
75 dobin qcad
76 dodir /usr/share/${P}
77 cp -a patterns examples fonts scripts qm ${D}/usr/share/${P}
78 cd ..
79 dodoc README
80 dohtml -r qcad/doc/.
81 insinto /usr/share/doc/${PF}/html
82 doins qcad/doc/qcaddoc.adp
83 }
84
85 pkg_postinst () {
86 if ! has_version "sci-misc/qcad-parts"; then
87 einfo
88 einfo "The QCad parts library is available as a seperate package."
89 einfo "emerge sci-misc/qcad-parts to get it."
90 einfo
91 fi
92 }

  ViewVC Help
Powered by ViewVC 1.1.20