summaryrefslogtreecommitdiff
blob: bea8fcc8dac77b66059dde4308a83a44e0687de5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/dev-libs/excelformat/excelformat-100112.ebuild,v 1.2 2010/06/30 13:50:54 jlec Exp $

EAPI="3"

inherit eutils multilib toolchain-funcs

DESCRIPTION="Library for reading, writing, and editing of XLS (BIFF8 format) files"
HOMEPAGE="http://www.codeproject.com/KB/office/ExcelFormat.aspx"
SRC_URI="mirror://gentoo/${P}.zip"

SLOT="0"
KEYWORDS="~amd64 ~x86"
LICENSE="CPOL"
IUSE=""

RDEPEND=""
DEPEND="${RDEPEND}
app-arch/unzip"

S="${WORKDIR}"

src_prepare() {
	edos2unix *
	epatch "${FILESDIR}"/${PV}-gcc.patch
}

src_compile() {
	local cmd
	for i in *.cpp; do
		cmd="$(tc-getCXX) ${CXXFLAGS} -trigraphs -c $i"
		einfo ${cmd}
		${cmd} || die
	done
	cmd="$(tc-getCXX) ${LDFLAGS} -Wl,-soname,libExcelFormat.so.0 -o libExcelFormat.so.0.0.0 `ls *.o`"
	einfo ${cmd}
	${cmd} || die
	cmd="$(tc-getAR) cru libExcelFormat.a `ls *.o`"
	einfo ${cmd}
	${cmd} || die
	cmd="$(tc-getRANLIB) libExcelFormat.a"
	einfo ${cmd}
	${cmd} || die
}

src_install() {
	insinto /usr/include/
	doins BasicExcel.hpp ExcelFormat.h || die
	dolib.so libExcelFormat.so.0.0.0 || die
	dosym libExcelFormat.so.0.0.0 /usr/$(get_libdir)/libExcelFormat.so || die
	dolib.a libExcelFormat.a || die
}