diff options
author | RSzibele <RSzibele@server.fake> | 2012-12-31 11:13:55 +0100 |
---|---|---|
committer | RSzibele <RSzibele@server.fake> | 2012-12-31 11:13:55 +0100 |
commit | e66e926121e01d592e2c6d2197d8de2d80c0afd9 (patch) | |
tree | be790ae8d32937d3a4902195e158cdf372071cfc /pkgs/development/libraries/tinyxml/2.6.2.nix | |
parent | 60de7967da5ab22c503ad5a3a582f091ded0ea5d (diff) | |
download | nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.tar nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.tar.gz nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.tar.bz2 nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.tar.lz nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.tar.xz nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.tar.zst nixpkgs-e66e926121e01d592e2c6d2197d8de2d80c0afd9.zip |
Added TinyXML-2.6.2.
Diffstat (limited to 'pkgs/development/libraries/tinyxml/2.6.2.nix')
-rw-r--r-- | pkgs/development/libraries/tinyxml/2.6.2.nix | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/pkgs/development/libraries/tinyxml/2.6.2.nix b/pkgs/development/libraries/tinyxml/2.6.2.nix new file mode 100644 index 00000000000..8770859817c --- /dev/null +++ b/pkgs/development/libraries/tinyxml/2.6.2.nix @@ -0,0 +1,61 @@ +{ stdenv, fetchurl, unzip }: + +let + version = "2.6.2"; +in stdenv.mkDerivation { + name = "tinyxml-${version}"; + + src = fetchurl { + url = "mirror://sourceforge/project/tinyxml/tinyxml/${version}/tinyxml_2_6_2.zip"; + sha256 = "04nmw6im2d1xp12yir8va93xns5iz816pwi25n9cql3g3i8bjsxc"; + }; + + patches = [ + # add pkgconfig file + ./2.6.2-add-pkgconfig.patch + + # http://sourceforge.net/tracker/index.php?func=detail&aid=3031828&group_id=13559&atid=313559 + ./2.6.2-entity.patch + ]; + + buildInputs = [ unzip ]; + buildPhase = '' + # build xmltest + make + + # build the lib as a shared library + g++ -Wall -O2 -shared -fpic tinyxml.cpp \ + tinyxmlerror.cpp tinyxmlparser.cpp \ + tinystr.cpp -o libtinyxml.so + ''; + + doCheck = true; + checkPhase = '' + ./xmltest + result=$? + if [[ $result != 0 ]] ; then + exit $result + fi + ''; + + installPhase = '' + mkdir -pv $out/include/ + mkdir -pv $out/lib/pkgconfig/ + mkdir -pv $out/share/doc/tinyxml/ + + cp -v libtinyxml.so $out/lib/ + cp -v *.h $out/include/ + + substituteInPlace tinyxml.pc --replace "@out@" "$out" + substituteInPlace tinyxml.pc --replace "@version@" "${version}" + cp -v tinyxml.pc $out/lib/pkgconfig/ + + cp -v docs/* $out/share/doc/tinyxml/ + ''; + + meta = { + description = "TinyXML is a simple, small, C++ XML parser that can be easily integrating into other programs."; + homepage = "http://www.grinninglizard.com/tinyxml/index.html"; + license = "free-non-copyleft"; + }; +} |