/[gentoo-x86]/dev-python/qscintilla/qscintilla-2.1.ebuild
Gentoo

Contents of /dev-python/qscintilla/qscintilla-2.1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Fri Sep 7 13:25:05 2007 UTC (7 years, 2 months ago) by hawking
Branch: MAIN
version bump
(Portage version: 2.1.3.7)

1 # Copyright 1999-2007 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-python/qscintilla/qscintilla-1.7.ebuild,v 1.1 2006/11/14 13:48:15 caleb Exp $
4
5 inherit eutils toolchain-funcs python
6
7 SCINTILLA_VER="1.73"
8 MY_P="${PN/qs/QS}-${SCINTILLA_VER}-gpl-${PV}"
9 S=${WORKDIR}/${MY_P}
10
11 DESCRIPTION="QScintilla is a port to Qt of Neil Hodgson's Scintilla C++ editor class."
12 HOMEPAGE="http://www.riverbankcomputing.co.uk/qscintilla/"
13 SRC_URI="http://www.riverbankcomputing.com/Downloads/QScintilla2/${MY_P}.tar.gz"
14 #SRC_URI="mirror://gentoo/${MY_P}.tar.gz"
15
16 SLOT="0"
17 LICENSE="GPL-2"
18 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd"
19 IUSE="qt4 python doc examples debug"
20
21 RDEPEND="qt4? ( =x11-libs/qt-4* )
22 !qt4? ( =x11-libs/qt-3* )
23 python? ( dev-lang/python
24 qt4? ( dev-python/PyQt4 )
25 !qt4? ( dev-python/PyQt )
26 )"
27
28 src_unpack() {
29 unpack ${A}
30
31 if use qt4; then
32 cd ${S}/Qt4
33 sed -i -e "s:DESTDIR = \$(QTDIR)/lib:DESTDIR = lib:" qscintilla.pro
34 sed -i -e "s:DESTDIR = \$\$\[QT_INSTALL_LIBS\]:DESTDIR = lib:" qscintilla.pro
35 echo -e "\nQMAKE_CFLAGS_RELEASE=${CFLAGS} -w\nQMAKE_CXXFLAGS_RELEASE=${CXXFLAGS} -w\nQMAKE_LFLAGS_RELEASE=${LDFLAGS}" >> qscintilla.pro
36 /usr/bin/qmake -o Makefile qscintilla.pro
37
38 cd ${S}/designer-Qt4
39 epatch ${FILESDIR}/${P}-qt4.patch
40
41 echo -e "\nQMAKE_CFLAGS_RELEASE=${CFLAGS} -w\nQMAKE_CXXFLAGS_RELEASE=${CXXFLAGS} -w\nQMAKE_LFLAGS_RELEASE=${LDFLAGS}" >> designer.pro
42 /usr/bin/qmake -o Makefile designer.pro
43 else
44 cd ${S}/Qt3
45 sed -i -e "s:DESTDIR = \$(QTDIR)/lib:DESTDIR = lib:" qscintilla.pro
46 sed -i -e "s:DESTDIR = \$\$\[QT_INSTALL_LIBS\]:DESTDIR = lib:" qscintilla.pro
47 echo -e "\nQMAKE_CFLAGS_RELEASE=${CFLAGS} -w\nQMAKE_CXXFLAGS_RELEASE=${CXXFLAGS} -w\nQMAKE_LFLAGS_RELEASE=${LDFLAGS}" >> qscintilla.pro
48 ${QTDIR}/bin/qmake -o Makefile qscintilla.pro
49
50 cd ${S}/designer-Qt3
51 epatch ${FILESDIR}/${P}-qt.patch
52
53 sed -i -e "s:DESTDIR = \$(QTDIR)/plugins/designer:DESTDIR = .:" designer.pro
54 echo -e "\nQMAKE_CFLAGS_RELEASE=${CFLAGS} -w\nQMAKE_CXXFLAGS_RELEASE=${CXXFLAGS} -w\nQMAKE_LFLAGS_RELEASE=${LDFLAGS}" >> designer.pro
55 ${QTDIR}/bin/qmake -o Makefile designer.pro
56 fi
57 }
58
59 src_compile() {
60 if use qt4; then
61 cd ${S}/Qt4
62 else
63 cd ${S}/Qt3
64 fi
65 make all staticlib CC="$(tc-getCC)" CXX="$(tc-getCXX)" LINK="$(tc-getCXX)" || die "make failed"
66
67 if use qt4; then
68 cd ${S}/designer-Qt4
69 make DESTDIR=${D}/usr/lib/qt4/plugins/designer || die "make failed"
70 dodir /usr/lib/qt4/plugins/designer
71 if use python; then
72 cd ${S}/Python
73 python_version
74 einfo "Creating bindings for python-${PYVER} ..."
75 local myconf="-d \
76 /usr/$(get_libdir)/python${PYVER}/site-packages/PyQt4 \
77 -v /usr/share/sip \
78 -p 4 \
79 -n ../Qt4 \
80 -o ../Qt4/lib"
81 use debug && myconf="${myconf} -u"
82 ${python} configure.py ${myconf}
83 emake || die "emake failed"
84 fi
85 else
86 cd ${S}/designer-Qt3
87 make DESTDIR=${D}/${QTDIR}/plugins/designer || die "make failed"
88 dodir ${QTDIR}/plugins/designer
89 if use python; then
90 cd ${S}/Python
91 python_version
92 einfo "Creating bindings for python-${PYVER} ..."
93 local myconf="-d \
94 /usr/$(get_libdir)/python${PYVER}/site-packages/ \
95 -v /usr/share/sip \
96 -p 3 \
97 -n ../Qt3 \
98 -o ../Qt3/lib"
99 use debug && myconf="${myconf} -u"
100 ${python} configure.py ${myconf}
101 emake || die "emake failed"
102 fi
103 fi
104 make
105 }
106
107 src_install() {
108 dodoc ChangeLog LICENSE NEWS README*
109 dodir /usr/{include,$(get_libdir),share/qscintilla/translations}
110 if use qt4; then
111 cd ${S}/Qt4
112 else
113 cd ${S}/Qt3
114 fi
115 cp -r Qsci "${D}/usr/include"
116 #cp qextscintilla*.h "${D}/usr/include"
117 cp qscintilla*.qm "${D}/usr/share/qscintilla/translations"
118 cp lib/libqscintilla2.a* "${D}/usr/$(get_libdir)"
119 cp -d lib/libqscintilla2.so.* "${D}/usr/$(get_libdir)"
120 if use qt4; then
121 dodir /usr/share/qt4/translations/
122 for I in $(ls -1 qscintilla*.qm) ; do
123 dosym "/usr/share/qscintilla/translations/${I}" "/usr/share/qt4/translations/${I}"
124 done
125 else
126 dodir ${QTDIR}/translations/
127 for I in $(ls -1 qscintilla*.qm) ; do
128 dosym "/usr/share/qscintilla/translations/${I}" "${QTDIR}/translations/${I}"
129 done
130 fi
131 if use doc ; then
132 dohtml ${S}/doc/html/*
133 insinto /usr/share/doc/${PF}/Scintilla
134 doins ${S}/doc/Scintilla/*
135 fi
136 if use qt4; then
137 insinto /usr/lib/qt4/plugins/
138 insopts -m0755
139 doins ${S}/designer-Qt4/libqscintillaplugin.so
140 else
141 insinto ${QTDIR}/plugins/designer
142 insopts -m0755
143 doins ${S}/designer-Qt3/libqscintillaplugin.so
144 fi
145 if use python; then
146 cd ${S}/Python
147 make DESTDIR=${D} install || die "install failed"
148 fi
149 }

  ViewVC Help
Powered by ViewVC 1.1.20