diff options
author | Fabian Groffen <grobian@gentoo.org> | 2011-11-07 18:57:09 +0000 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2011-11-07 18:57:09 +0000 |
commit | 72d0713680f34c32dc3aeed597f7d01e88e6c250 (patch) | |
tree | 4df4199108df2ae7e9905d10536e9c636d5ea65d /dev-libs | |
parent | keyword ~x86-fbsd (diff) | |
download | gentoo-2-72d0713680f34c32dc3aeed597f7d01e88e6c250.tar.gz gentoo-2-72d0713680f34c32dc3aeed597f7d01e88e6c250.tar.bz2 gentoo-2-72d0713680f34c32dc3aeed597f7d01e88e6c250.zip |
Patch Makefile and ebuild for Mach-O (dylib) support and keyword ~x86-macos and ~x64-macos
(Portage version: 2.2.01.19572-prefix/cvs/Darwin i386)
Diffstat (limited to 'dev-libs')
-rw-r--r-- | dev-libs/tinyxml/ChangeLog | 9 | ||||
-rw-r--r-- | dev-libs/tinyxml/files/Makefile-3 | 44 | ||||
-rw-r--r-- | dev-libs/tinyxml/tinyxml-2.6.2-r1.ebuild | 53 |
3 files changed, 105 insertions, 1 deletions
diff --git a/dev-libs/tinyxml/ChangeLog b/dev-libs/tinyxml/ChangeLog index 03eef1da25ea..d3d732ea54f2 100644 --- a/dev-libs/tinyxml/ChangeLog +++ b/dev-libs/tinyxml/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-libs/tinyxml # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/ChangeLog,v 1.16 2011/10/28 08:48:30 chainsaw Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/ChangeLog,v 1.17 2011/11/07 18:57:09 grobian Exp $ + +*tinyxml-2.6.2-r1 (07 Nov 2011) + + 07 Nov 2011; Fabian Groffen <grobian@gentoo.org> +tinyxml-2.6.2-r1.ebuild, + +files/Makefile-3: + Patch Makefile and ebuild for Mach-O (dylib) support and keyword ~x86-macos + and ~x64-macos 28 Oct 2011; Tony Vroon <chainsaw@gentoo.org> tinyxml-2.6.2.ebuild: Marked stable on AMD64 based on arch testing by Agostino "ago" Sarubbo & Ian diff --git a/dev-libs/tinyxml/files/Makefile-3 b/dev-libs/tinyxml/files/Makefile-3 new file mode 100644 index 000000000000..40ad4fe7e9ce --- /dev/null +++ b/dev-libs/tinyxml/files/Makefile-3 @@ -0,0 +1,44 @@ +AR ?= ar +CXX ?= g++ +CXXFLAGS += -Wall +RANLIB ?= ranlib +LIBDIR ?= /usr/lib + +name = libtinyxml +major = @MAJOR_V@ +minor = @MINOR_V@ +version = $(major).$(minor) + +src = tinyxml.cpp tinyxmlparser.cpp tinyxmlerror.cpp tinystr.cpp +lo = $(addsuffix .lo,$(basename ${src})) +o = $(addsuffix .o,$(basename ${src})) + +lib = so +ifeq ($(shell uname),Darwin) + lib = dylib +endif + +all: $(name).a $(name).$(lib) + +%.o: %.cpp + $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) $< -o $@ + +$(name).a: $(o) + $(AR) rc $(name).a $(o) + $(RANLIB) $(name).a + +%.lo: %.cpp + $(CXX) -c $(CXXFLAGS) $(CPPFLAGS) -fPIC $< -o $@ + +$(name).so: $(lo) + $(CXX) $(LDFLAGS) -fPIC -shared $(lo) -Wl,-soname,$(name).so.$(major) -o $(name).so.$(version) + ln -s $(name).so.$(version) $(name).so.$(major) + ln -s $(name).so.$(version) $(name).so + +$(name).dylib: $(lo) + $(CXX) $(LDFLAGS) -fPIC -dynamiclib $(lo) -install_name $(LIBDIR)/$(name).$(major).dylib -o $(name).$(version).dylib + ln -s $(name).$(version).dylib $(name).$(major).dylib + ln -s $(name).$(version).dylib $(name).dylib + +clean: + -rm -f *.o *.lo *.so* *.a diff --git a/dev-libs/tinyxml/tinyxml-2.6.2-r1.ebuild b/dev-libs/tinyxml/tinyxml-2.6.2-r1.ebuild new file mode 100644 index 000000000000..d7a079bbf21a --- /dev/null +++ b/dev-libs/tinyxml/tinyxml-2.6.2-r1.ebuild @@ -0,0 +1,53 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-libs/tinyxml/tinyxml-2.6.2-r1.ebuild,v 1.1 2011/11/07 18:57:09 grobian Exp $ + +EAPI=4 +inherit flag-o-matic toolchain-funcs eutils multilib + +DESCRIPTION="a simple, small, C++ XML parser that can be easily integrating into other programs" +HOMEPAGE="http://www.grinninglizard.com/tinyxml/index.html" +SRC_URI="mirror://sourceforge/${PN}/${PN}_${PV//./_}.tar.gz" + +LICENSE="ZLIB" +SLOT="0" +KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86 ~x64-macos ~x86-macos" +IUSE="debug doc static-libs +stl" + +RDEPEND="" +DEPEND="doc? ( app-doc/doxygen )" + +S="${WORKDIR}/${PN}" + +src_prepare() { + local major_v minor_v + major_v=$(echo ${PV} | cut -d \. -f 1) + minor_v=$(echo ${PV} | cut -d \. -f 2-3) + + sed -e "s:@MAJOR_V@:$major_v:" \ + -e "s:@MINOR_V@:$minor_v:" \ + "${FILESDIR}"/Makefile-3 > Makefile || die + + epatch "${FILESDIR}"/${PN}-2.6.1-entity.patch + + use debug && append-cppflags -DDEBUG + use stl && append-cppflags -DTIXML_USE_STL + + tc-export AR CXX RANLIB + + [[ ${CHOST} == *-darwin* ]] && export LIBDIR="${EPREFIX}"/usr/$(get_libdir) +} + +src_install() { + dolib.so *$(get_libname)* + use static-libs && dolib.a *.a + + insinto /usr/include + doins *.h + + dodoc {changes,readme}.txt + + if use doc; then + dohtml -r docs/* + fi +} |