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

Contents of /sci-misc/qcad/qcad-2.0.4.0.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.4.0.ebuild,v 1.3 2005/01/10 07:27:36 phosphan 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 # mirror://gentoo/qcaddoc-${MY_PV}.tar.bz2"
13 HOMEPAGE="http://www.ribbonsoft.com/qcad.html"
14
15 LICENSE="GPL-2"
16 SLOT="0"
17 IUSE=""
18 KEYWORDS="x86 ~ppc amd64"
19
20 need-qt 3.3
21
22 DEPEND="${DEPEND}
23 >=sys-apps/sed-4"
24
25 src_unpack() {
26 unpack ${A}
27 # mv doc ${S}/qcad/
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 epatch ${FILESDIR}/${MY_P}-gentoo.patch
34 epatch ${FILESDIR}/manual.patch-r1
35 cd ${S}/scripts
36 sed -i -e 's/^make/make ${MAKEOPTS}/' build_qcad.sh || \
37 die "unable to add MAKEOPTS"
38 sed -i -e 's/^\.\/configure/.\/configure --host=${CHOST}/' build_qcad.sh \
39 || die "unable to set CHOST"
40 cd ${S}/qcad/src
41 sed -i -e "s:FULLASSISTANTPATH:${QTDIR}/bin:" qc_applicationwindow.cpp \
42 || die "sed failed on assistant path"
43 sed -i -e "s:QCADDOCPATH:/usr/share/doc/${PF}/html:" \
44 qc_applicationwindow.cpp || die "sed failed on manual path"
45
46 }
47
48
49 src_compile() {
50 ### borrowed from kde.eclass #
51 #
52 # fix the sandbox errors "can't writ to .kde or .qt" problems.
53 # this is a fake homedir that is writeable under the sandbox, so that the build process
54 # can do anything it wants with it.
55 REALHOME="$HOME"
56 mkdir -p $T/fakehome/.kde
57 mkdir -p $T/fakehome/.qt
58 export HOME="$T/fakehome"
59 # things that should access the real homedir
60 [ -d "$REALHOME/.ccache" ] && ln -sf "$REALHOME/.ccache" "$HOME/"
61 cd scripts
62 sh build_qcad.sh || die "build failed"
63 if ! test -f ${S}/qcad/qcad; then
64 die "no binary created, build failed"
65 fi
66 }
67
68 src_install () {
69 cd qcad
70 mv qcad qcad.bin
71 dobin qcad.bin
72 echo -e "#!/bin/sh\ncd /usr/share/${P}\nqcad.bin" > qcad
73 chmod ugo+rx qcad
74 dobin qcad
75 dodir /usr/share/${P}
76 cp -a patterns examples fonts scripts qm ${D}/usr/share/${P}
77 cd ..
78 dodoc README
79 # currently no help available
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 einfo "help was removed from the community edition - see"
93 einfo "https://sourceforge.net/tracker/?func=detail&atid=417068&aid=1037631&group_id=36417"
94 einfo "for details"
95 }

  ViewVC Help
Powered by ViewVC 1.1.20