# Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: $ inherit eutils wxwidgets DESCRIPTION="Electronic schematic diagrams and printed circuit board creation." HOMEPAGE="http://www.lis.inpg.fr/realise_au_lis/kicad/" SRC_URI="ftp://iut-tice.ujf-grenoble.fr/cao/sources/kicad-sources-2006-03-21.zip ftp://iut-tice.ujf-grenoble.fr/cao/kicad-2006-03-21-RC2.tgz ftp://iut-tice.ujf-grenoble.fr/cao/doc_components-2006-03-07.zip" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="unicode" DEPEND=">=x11-libs/wxGTK-2.6 media-gfx/wings" S=${WORKDIR}/kicad-dev src_unpack() { unpack ${A} || die "Unpack failed" epatch ${FILESDIR}/kicad-20060321.patch # Note for future versions. # This is how the above patch was generated (in this order) : # sed -i -e "s/make -k -f/make -f/" ${S}/makefile.gtk # sed -i -e "s/gl,png,jpeg,zlib/core,base,net,html,gl/" ${S}/libs.linux # sed -i -e "s/png,jpeg,zlib/core,base,net,html,xrc/" ${S}/libs.linux # sed -i -e "s/-Wall -O2/-Wall/" ${S}/*/makefile.* # sed -i -e "s/LD = gcc/LD = c++/" ${S}/*/makefile.* # sed -i -e "s/gcc/gcc \$(CFLAGS)/" ${S}/*/makefile.* # sed -i -e "s/gcc/gcc \$(CFLAGS)/" ${S}/*/*/makefile.* # Tell wxwidgets.eclass the version we need. We pick the latest on the system. export WX_GTK_VER=$(`ls /usr/bin/wx-config* | sort | tail -n 1` --release) if [[ $(usev unicode) ]]; then need-wxwidgets unicode else need-wxwidgets gtk2 fi sed -i -e "s:wx-config:${WX_CONFIG}:" ${S}/libs.* sed -i -e "s:wx-config:${WX_CONFIG}:" ${S}/*/makefile.* } src_compile() { emake -f makefile.gtk || die "make failed" } src_install() { # kicad doesn't use the autotools yet exeinto /usr/lib/${P}/linux doexe eeschema/eeschema doexe pcbnew/pcbnew doexe cvpcb/cvpcb doexe kicad/kicad doexe gerbview/gerbview exeinto /usr/lib/${P}/linux/plugins doexe eeschema/plugins/netlist_form_pads-pcb # kicad requires everything to be in the same place make_wrapper kicad "/usr/lib/${P}/linux/kicad" cp -a ${WORKDIR}/kicad/library ${D}/usr/lib/${P}/ cp -a ${WORKDIR}/kicad/modules ${D}/usr/lib/${P}/ cp -a ${WORKDIR}/kicad/demos ${D}/usr/lib/${P}/ cp -a ${WORKDIR}/kicad/internat ${D}/usr/lib/${P}/ cp -a ${WORKDIR}/kicad/help ${D}/usr/lib/${P}/ cp -a ${WORKDIR}/kicad/template ${D}/usr/lib/${P}/ cp -a ${WORKDIR}/doc ${D}/usr/lib/${P}/library cd ${WORKDIR}/kicad dodoc author.txt copyright.txt news.txt contrib.txt version.txt }