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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.12 - (show annotations) (download)
Fri Sep 26 13:18:25 2008 UTC (12 years, 2 months ago) by markusle
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
Version bump and cleanup (fixes bug #117288).
(Portage version: 2.2_rc9/cvs/Linux 2.6.26-SENTINEL-2 i686)

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-r1.ebuild,v 1.11 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="x86 ppc amd64"
20
21 DEPEND=">=sys-apps/sed-4"
22 need-qt 3.3
23
24 src_unpack() {
25 unpack ${A}
26 # mv doc ${S}/qcad/
27 cd "${S}"
28 echo >> defs.pro "DEFINES += _REENTRANT QT_THREAD_SUPPORT"
29 echo >> defs.pro "CONFIG += thread release"
30 echo >> defs.pro "QMAKE_CFLAGS_RELEASE += ${CFLAGS}"
31 echo >> defs.pro "QMAKE_CXXFLAGS_RELEASE += ${CXXFLAGS}"
32 for file in */Makefile scripts/build_qcad.sh; do
33 sed -i -e 's~qmake~${QTDIR}/bin/qmake~g' $file || \
34 die "unable to correct path to qmake in $file"
35 done
36 epatch "${FILESDIR}"/${MY_P}-gentoo.patch
37 epatch "${FILESDIR}"/manual.patch-r1
38 cd "${S}"/scripts
39 sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
40 die "unable to add MAKEOPTS"
41 sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
42 || die "unable to set CHOST"
43 cd "${S}"/qcad/src
44 sed -i -e "s:FULLASSISTANTPATH:${QTDIR}/bin:" qc_applicationwindow.cpp \
45 || die "sed failed on assistant path"
46 sed -i -e "s:QCADDOCPATH:/usr/share/doc/${PF}:" \
47 qc_applicationwindow.cpp || die "sed failed on manual path"
48
49 }
50
51 src_compile() {
52 ### borrowed from kde.eclass #
53 #
54 # fix the sandbox errors "can't writ to .kde or .qt" problems.
55 # this is a fake homedir that is writeable under the sandbox, so that the build process
56 # can do anything it wants with it.
57 REALHOME="$HOME"
58 mkdir -p "$T"/fakehome/.kde
59 mkdir -p "$T"/fakehome/.qt
60 export HOME="$T/fakehome"
61 # things that should access the real homedir
62 [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
63 cd scripts
64 sh build_qcad.sh || die "build failed"
65 if ! test -f "${S}"/qcad/qcad; then
66 die "no binary created, build failed"
67 fi
68 }
69
70 src_install () {
71 cd qcad
72 mv qcad qcad.bin
73 dobin qcad.bin
74 echo -e "#!/bin/sh\ncd /usr/share/${P}\nqcad.bin" > qcad
75 chmod ugo+rx qcad
76 dobin qcad
77 dodir /usr/share/${P}
78 cp -pPR patterns examples fonts qm "${D}"/usr/share/${P}
79 cd ..
80 dodoc README
81 if use doc; then
82 insinto /usr/share/doc/${PF}/
83 cd "${WORKDIR}"
84 cp -pPR qcaddoc.adp cad "${D}"usr/share/doc/${PF}
85 fi
86 make_desktop_entry ${PN} ${PN} ${PN} Office
87 }

  ViewVC Help
Powered by ViewVC 1.1.20