diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/podofo')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix | 67 | ||||
-rw-r--r-- | nixpkgs/pkgs/development/libraries/podofo/default.nix | 37 |
2 files changed, 104 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix b/nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix new file mode 100644 index 000000000000..dbbd5c86b96d --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/podofo/0.10.x.nix @@ -0,0 +1,67 @@ +{ lib +, stdenv +, fetchFromGitHub +, cmake +, expat +, fontconfig +, freetype +, libidn +, libjpeg +, libpng +, libtiff +, libxml2 +, lua5 +, openssl +, pkg-config +, zlib +}: + +stdenv.mkDerivation (finalAttrs: { + pname = "podofo"; + version = "0.10.2"; + + src = fetchFromGitHub { + owner = "podofo"; + repo = "podofo"; + rev = finalAttrs.version; + hash = "sha256-BHTfidLn738f9kVIgzRTR4vY6fx5JPPtYNKvD7klyGw="; + }; + + outputs = [ "out" "dev" "lib" ]; + + nativeBuildInputs = [ + cmake + pkg-config + ]; + + buildInputs = [ + expat + fontconfig + freetype + libidn + libjpeg + libpng + libtiff + libxml2 + lua5 + openssl + zlib + ]; + + cmakeFlags = [ + "-DPODOFO_BUILD_STATIC=${if stdenv.hostPlatform.isStatic then "ON" else "OFF"}" + "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" + ]; + + postInstall = '' + moveToOutput lib "$lib" + ''; + + meta = { + homepage = "https://github.com/podofo/podofo"; + description = "A library to work with the PDF file format"; + platforms = lib.platforms.all; + license = with lib.licenses; [ gpl2Plus lgpl2Plus ]; + maintainers = []; + }; +}) diff --git a/nixpkgs/pkgs/development/libraries/podofo/default.nix b/nixpkgs/pkgs/development/libraries/podofo/default.nix new file mode 100644 index 000000000000..1243763421c0 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/podofo/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchurl, cmake, zlib, freetype, libjpeg, libtiff, fontconfig +, openssl, libpng, lua5, pkg-config, libidn, expat +}: + +stdenv.mkDerivation rec { + version = "0.9.8"; + pname = "podofo"; + + src = fetchurl { + url = "mirror://sourceforge/podofo/${pname}-${version}.tar.gz"; + sha256 = "sha256-XeYH4V8ZK4rZBzgwB1nYjeoPXM3OO/AASKDJMrxkUVQ="; + }; + + outputs = [ "out" "dev" "lib" ]; + + nativeBuildInputs = [ cmake pkg-config ]; + + buildInputs = [ zlib freetype libjpeg libtiff fontconfig openssl libpng + libidn expat lua5 ]; + + cmakeFlags = [ + "-DPODOFO_BUILD_SHARED=ON" + "-DPODOFO_BUILD_STATIC=OFF" + "-DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON" + ]; + + postInstall = '' + moveToOutput lib "$lib" + ''; + + meta = with lib; { + homepage = "https://podofo.sourceforge.net"; + description = "A library to work with the PDF file format"; + platforms = platforms.all; + license = with licenses; [ gpl2Plus lgpl2Plus ]; + }; +} |