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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.20