View | Details | Raw Unified
Collapse All | Expand All

(-) /usr/portage/dev-util/gambas/gambas-2.7.0.ebuild (-26 / +65 lines)
 Lines 2-8    Link Here 
# 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}"
 Lines 14-23    Link Here 
SLOT="2"
SLOT="2"
KEYWORDS="~x86"
KEYWORDS="~amd64 ~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 debug firebird gtk kde mysql odbc opengl pcre pdf postgres qt3 sdl smtp sqlite sqlite3 svg v4l xml zlib"
DEPEND=""
DEPEND="sys-devel/libtool"
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 )
 Lines 50-82    Link Here 
	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}/' \
	gb.qt/src/Makefile.am \
	gb.qt/src/ext/Makefile.am \
	gb.qt/src/opengl/Makefile.am \
	|| die "sed qt_ldflags-patch failed"
	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"
	# gb.qt needs this patch because it does not use GB_COMPONENT_PKG_CONFIG
	epatch "${FILESDIR}/${PN}-2.7.0-r1-gb.qt-QT_LDFLAGS.patch"
	
	# help does not appear to need libtool
	epatch "${FILESDIR}/${PN}-2.7.0-r1-help-GB_INIT_SHORT.patch"
	# libtool compatibility
	epatch "${FILESDIR}/${PN}-2.7.0-r1-remove-libltdl-from-main.patch"
	epatch "${FILESDIR}/${PN}-2.7.0-r1-libtool-and-FLAGS.patch"
	ebegin "Applying sed remove-libtool-patch"
	# remove embedded libtool.m4 file
	sed -i -e '/[-][*][-]Autoconf[-][*][-]$/,/^dnl\ Like\ AC_CHECK_HEADER,\ but/d' \
	acinclude.m4 \
	|| die "sed remove-libtool-patch failed"
	eend 0
	ebegin "Remove provided libtool/libltdl"
	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
	eautoreconf || die "eautoreconf failed"
	eautoreconf || die "eautoreconf failed"
}
}
 Lines 112-126    Link Here 
		--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
 Lines 128-134    Link Here 
	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 \
	$(use_enable 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"
 Lines 139-149    Link Here 
	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" \
		|| die "make_desktop_entry failed"
		insinto /usr/share/icons/hicolor/128x128/apps
		newins comp/src/gb.report/new-logo.png gambas2.png \
		|| die "newins failed"
	fi
	
	insinto /usr/share/icons/hicolor/64x64/mimetypes
	doins app/mime/application-x-gambasscript.png main/mime/application-x-gambas.png \
	|| die "doins failed"
	insinto /usr/share/mime/application
	doins app/mime/application-x-gambasscript.xml main/mime/application-x-gambas.xml \
	|| die "doins failed"
}
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
}
}