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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.7 - (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.6: +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-r2.ebuild,v 1.6 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 # 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 cd "${S}"/scripts
40 sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
41 die "unable to add MAKEOPTS"
42 sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
43 || die "unable to set CHOST"
44 cd "${S}"/qcad/src
45 sed -i -e "s:FULLASSISTANTPATH:${QTDIR}/bin:" qc_applicationwindow.cpp \
46 || die "sed failed on assistant path"
47 sed -i -e "s:QCADDOCPATH:/usr/share/doc/${PF}:" \
48 qc_applicationwindow.cpp || die "sed failed on manual path"
49
50 }
51
52 src_compile() {
53 ### borrowed from kde.eclass #
54 #
55 # fix the sandbox errors "can't writ to .kde or .qt" problems.
56 # this is a fake homedir that is writeable under the sandbox, so that the build process
57 # can do anything it wants with it.
58 REALHOME="$HOME"
59 mkdir -p "${T}"/fakehome/.kde
60 mkdir -p "${T}"fakehome/.qt
61 export HOME="${T}/fakehome"
62 # things that should access the real homedir
63 [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
64 cd scripts
65 sh build_qcad.sh || die "build failed"
66 if ! test -f "${S}"/qcad/qcad; then
67 die "no binary created, build failed"
68 fi
69 }
70
71 src_install () {
72 cd qcad
73 mv qcad qcad.bin
74 dobin qcad.bin
75 echo -e "#!/bin/sh\ncd /usr/share/${P}\nqcad.bin \"\$@\"" > qcad
76 chmod ugo+rx qcad
77 dobin qcad
78 dodir /usr/share/${P}
79 cp -pPR patterns examples fonts qm "${D}"/usr/share/${P}
80 cd ..
81 dodoc README
82 if use doc; then
83 insinto /usr/share/doc/${PF}/
84 cd "${WORKDIR}"
85 cp -pPR qcaddoc.adp cad "${D}"usr/share/doc/${PF}
86 fi
87 make_desktop_entry ${PN} ${PN} ${PN} Office
88 }

  ViewVC Help
Powered by ViewVC 1.1.20