|
|
# Distributed under the terms of the GNU General Public License v2 | # Distributed under the terms of the GNU General Public License v2 |
# $Header: /var/cvsroot/gentoo-x86/dev-util/gambas/gambas-2.7.0.ebuild,v 1.1 2008/06/26 23:32:09 darkside Exp $ | # $Header: /var/cvsroot/gentoo-x86/dev-util/gambas/gambas-2.7.0.ebuild,v 1.1 2008/06/26 23:32:09 darkside Exp $ |
| |
inherit autotools eutils qt3 |
inherit autotools eutils qt3 fdo-mime |
| |
MY_P="${PN}2-${PV}" | MY_P="${PN}2-${PV}" |
| |
|
|
KEYWORDS="~x86" | KEYWORDS="~x86" |
IUSE="bzip2 corba curl firebird gtk kde mysql odbc opengl pcre pdf postgres qt3 sdl smtp sqlite sqlite3 svg v4l xml zlib" | IUSE="bzip2 corba curl firebird gtk kde mysql odbc opengl pcre pdf postgres qt3 sdl smtp sqlite sqlite3 svg v4l xml zlib" |
| |
DEPEND="" |
DEPEND=">=sys-devel/libtool-2.2.4" |
RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 ) | RDEPEND="bzip2? ( >=app-arch/bzip2-1.0.5 ) |
corba? ( >=net-misc/omniORB-4.1.0 ) | corba? ( >=net-misc/omniORB-4.1.0 ) |
curl? ( >=net-misc/curl-7.15.5-r1 ) | curl? ( >=net-misc/curl-7.15.5-r1 ) |
|
|
if ( !( use gtk ) ); then | if ( !( use gtk ) ); then |
use svg && die "SVG support depends on GTK being enabled" | use svg && die "SVG support depends on GTK being enabled" |
fi | fi |
|
|
ewarn |
|
ewarn "Your CFLAGS and LDFLAGS from make.conf are not handled correctly" |
|
ewarn "They are currently ignored and replaced with internal values" |
|
ewarn |
|
|
|
### v4l linux kernel support check needed? |
|
} | } |
| |
src_unpack() { | src_unpack() { |
unpack ${A} | unpack ${A} |
cd "${S}" | cd "${S}" |
| |
|
ebegin "Applying sed no-automagic-patch" |
sed -i -e 's/gb_enable_\$1=yes/gb_enable_\$1=no/' \ | sed -i -e 's/gb_enable_\$1=yes/gb_enable_\$1=no/' \ |
acinclude.m4 \ | acinclude.m4 \ |
|| die "sed no-automagic-patch failed" | || die "sed no-automagic-patch failed" |
|
eend 0 |
| |
sed -i -e 's/@QT_LDFLAGS@/\${QT_LDFLAGS}/' \ |
ebegin "Applying sed qt_ldflags-upstream-should-fix-patch" |
|
sed -i -e 's/@QT_LDFLAGS@//' \ |
gb.qt/src/Makefile.am \ | gb.qt/src/Makefile.am \ |
gb.qt/src/ext/Makefile.am \ | gb.qt/src/ext/Makefile.am \ |
gb.qt/src/opengl/Makefile.am \ | gb.qt/src/opengl/Makefile.am \ |
|| die "sed qt_ldflags-patch failed" |
|| die "sed qt_ldflags-upstream-should-fix-patch-1 failed" |
|
sed -i -e 's/@QTOPENGL_LDFLAGS@//' \ |
|
gb.qt/src/opengl/Makefile.am \ |
|
|| die "sed qt_ldflags-upstream-should-fix-patch-2 failed" |
|
eend 0 |
| |
epatch "${FILESDIR}/${PN}-2.5.0-gcc-libffi-path.patch" | epatch "${FILESDIR}/${PN}-2.5.0-gcc-libffi-path.patch" |
epatch "${FILESDIR}/${PN}-2.5.0-sdl.patch" | epatch "${FILESDIR}/${PN}-2.5.0-sdl.patch" |
epatch "${FILESDIR}/${PN}-2.7.0-help-path.patch" |
|
epatch "${FILESDIR}/${PN}-2.5.0-mimetype-registration.patch" | epatch "${FILESDIR}/${PN}-2.5.0-mimetype-registration.patch" |
|
epatch "${FILESDIR}/${PN}-2.7.0-help-path.patch" |
|
|
|
ebegin "Applying sed remove-libtool-patch" |
|
sed -i -e '/[-][*][-]Autoconf[-][*][-]$/,/^dnl\ Like\ AC_CHECK_HEADER,\ but/d' \ |
|
acinclude.m4 \ |
|
|| die "sed remove-libtool-patch-1 failed" |
|
sed -i -e 's/libltdl\ //' \ |
|
main/Makefile.am \ |
|
|| die "sed remove-libtool-patch-2 failed" |
|
sed -i -e '/AC_CONFIG_SUBDIRS[(]libltdl[)]/d' \ |
|
main/configure.ac \ |
|
|| die "sed remove-libtool-patch-3 failed" |
|
rm -R ./main/libltdl \ |
|
&& rm config.guess config.sub install-sh ltmain.sh \ |
|
&& rm */config.guess */config.sub */install-sh */ltmain.sh \ |
|
|| die "removing libtool failed" |
|
eend 0 |
|
|
|
ebegin "Applying sed libtool-deprecated-patch" |
|
sed -i -e '/AC_PROG_LIBTOOL/d' \ |
|
*/configure.ac \ |
|
|| die "sed libtool-deprecated-patch failed" |
|
eend 0 |
|
|
|
epatch "${FILESDIR}/${PN}-2.7.0-r1-libtool-2.2-and-FLAGS.patch" |
| |
eautoreconf || die "eautoreconf failed" | eautoreconf || die "eautoreconf failed" |
} | } |
|
|
--enable-crypt | --enable-crypt |
$(use_enable opengl) | $(use_enable opengl) |
$(use_enable corba) | $(use_enable corba) |
--enable-image |
$(use_enable qt3 image)" |
--enable-desktop" |
if (use qt3 || use gtk); then |
|
myconf="${myconf} |
|
--enable-desktop" |
|
fi |
| |
myconf_main="--enable-intl | myconf_main="--enable-intl |
--enable-conv | --enable-conv |
--enable-ffi | --enable-ffi |
--enable-preloading" | --enable-preloading" |
| |
if (use qt); then |
if (use qt3); then |
myconf_qt="$(use_enable opengl qtopengl) | myconf_qt="$(use_enable opengl qtopengl) |
--enable-qt-translation " | --enable-qt-translation " |
fi | fi |
|
|
myconf_xml="$(use_enable xml xslt)" | myconf_xml="$(use_enable xml xslt)" |
| |
econf ${myconf} ${myconf_main} ${myconf_qt} ${myconf_xml} \ | econf ${myconf} ${myconf_main} ${myconf_qt} ${myconf_xml} \ |
--enable-optimization --disable-debug --disable-profiling \ |
--disable-debug --disable-profiling \ |
--docdir=/usr/share/doc/${PF} --htmldir=/usr/share/doc/${PF}/html \ | --docdir=/usr/share/doc/${PF} --htmldir=/usr/share/doc/${PF}/html \ |
|| die "econf failed" | || die "econf failed" |
| |
|
|
emake DESTDIR="${D}" install -j1 || die "emake install failed" | emake DESTDIR="${D}" install -j1 || die "emake install failed" |
| |
dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed" | dodoc AUTHORS ChangeLog NEWS README || die "dodoc failed" |
|
|
|
if (use qt3 || use gtk); then |
|
make_desktop_entry "gambas2" "Gambas" "/usr/share/icons/hicolor/128x128/apps/gambas2.png" "Development" |
|
insinto /usr/share/icons/hicolor/128x128/apps |
|
newins comp/src/gb.report/new-logo.png gambas2.png |
|
fi |
|
|
|
insinto /usr/share/icons/hicolor/64x64/mimetypes |
|
doins app/mime/application-x-gambasscript.png main/mime/application-x-gambas.png |
|
|
|
insinto /usr/share/mime/application |
|
doins app/mime/application-x-gambasscript.xml main/mime/application-x-gambas.xml |
|
} |
|
|
|
my_fdo_update() { |
|
fdo-mime_desktop_database_update |
|
fdo-mime_mime_database_update |
} | } |
| |
pkg_postinst() { | pkg_postinst() { |
ewarn |
my_fdo_update |
ewarn "This ebuild currently does not create menu items and does not handle Gambas" |
} |
ewarn "mime installation correctly" |
|
ewarn |
pkg_postrm() { |
|
my_fdo_update |
} | } |