/[gentoo-x86]/sci-libs/shapelib/shapelib-1.3.0-r1.ebuild
Gentoo

Contents of /sci-libs/shapelib/shapelib-1.3.0-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.11 - (show annotations) (download)
Sun Dec 23 11:29:32 2012 UTC (7 years, 11 months ago) by maekke
Branch: MAIN
CVS Tags: HEAD
Changes since 1.10: +2 -2 lines
add ~arm

(Portage version: 2.1.11.38/cvs/Linux x86_64, signed Manifest commit with key 072AD062)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sci-libs/shapelib/shapelib-1.3.0-r1.ebuild,v 1.10 2012/12/04 11:37:08 blueness Exp $
4
5 EAPI=4
6 inherit eutils toolchain-funcs multilib versionator
7
8 DESCRIPTION="Library for manipulating ESRI Shapefiles"
9 HOMEPAGE="http://shapelib.maptools.org/"
10 SRC_URI="http://download.osgeo.org/${PN}/${P}.tar.gz"
11
12 LICENSE="GPL-2 LGPL-2"
13 SLOT="0"
14 KEYWORDS="amd64 ~arm ppc ppc64 x86 ~x86-fbsd ~amd64-linux ~x86-linux"
15 IUSE="static-libs"
16
17 DEPEND=""
18 RDEPEND=""
19
20 static_to_shared() {
21 local libstatic=${1}; shift
22 local libname=$(basename ${libstatic%.a})
23 local soname=${libname}$(get_libname $(get_version_component_range 1-2))
24 local libdir=$(dirname ${libstatic})
25
26 einfo "Making ${soname} from ${libstatic}"
27 if [[ ${CHOST} == *-darwin* ]] ; then
28 ${LINK:-$(tc-getCC)} ${LDFLAGS} \
29 -dynamiclib -install_name "${EPREFIX}"/usr/lib/"${soname}" \
30 -Wl,-all_load -Wl,${libstatic} \
31 "$@" -o ${libdir}/${soname} || die "${soname} failed"
32 else
33 ${LINK:-$(tc-getCC)} ${LDFLAGS} \
34 -shared -Wl,-soname=${soname} \
35 -Wl,--whole-archive ${libstatic} -Wl,--no-whole-archive \
36 "$@" -o ${libdir}/${soname} || die "${soname} failed"
37 [[ $(get_version_component_count) -gt 1 ]] && \
38 ln -s ${soname} ${libdir}/${libname}$(get_libname $(get_major_version))
39 ln -s ${soname} ${libdir}/${libname}$(get_libname)
40 fi
41 }
42
43 src_prepare() {
44 epatch "${FILESDIR}"/${P}-respect-user.patch
45 tc-export CC AR
46 }
47
48 src_compile() {
49 emake CFLAGS="${CFLAGS} -fPIC" lib
50 static_to_shared lib*.a
51 rm *.o *.a
52 emake
53 }
54
55 src_test() {
56 emake test
57 }
58
59 src_install() {
60 dobin shp{create,dump,add} dbf{create,dump,add}
61 insinto /usr/include/libshp
62 doins shapefil.h
63 use test && dobin shptest
64 dolib.so lib*$(get_libname)*
65 dodoc ChangeLog README*
66 use static-libs && dolib.a lib*.a
67 }

  ViewVC Help
Powered by ViewVC 1.1.20