diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/silgraphite')
3 files changed, 62 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/silgraphite/default.nix b/nixpkgs/pkgs/development/libraries/silgraphite/default.nix new file mode 100644 index 000000000000..06cf75876162 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/silgraphite/default.nix @@ -0,0 +1,22 @@ +{ stdenv, fetchurl, pkg-config, freetype, libXft, pango, fontconfig }: + +stdenv.mkDerivation rec { + version = "2.3.1"; + name = "silgraphite-2.3.1"; + + src = fetchurl { + url = "mirror://sourceforge/silgraphite/silgraphite/${version}/${name}.tar.gz"; + sha256 = "9b07c6e91108b1fa87411af4a57e25522784cfea0deb79b34ced608444f2ed65"; + }; + + nativeBuildInputs = [ pkg-config ]; + buildInputs = [ freetype libXft pango fontconfig]; + + NIX_CFLAGS_COMPILE = "-I${freetype.dev}/include/freetype2"; + + meta = { + description = "An advanced font engine"; + maintainers = [ lib.maintainers.raskin ]; + platforms = lib.platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix b/nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix new file mode 100644 index 000000000000..166d0f2911d6 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/silgraphite/graphite2.nix @@ -0,0 +1,27 @@ +{ lib, stdenv, fetchurl, pkg-config, freetype, cmake, python }: + +stdenv.mkDerivation rec { + version = "1.3.14"; + pname = "graphite2"; + + src = fetchurl { + url = "https://github.com/silnrsi/graphite/releases/download/" + + "${version}/graphite2-${version}.tgz"; + sha256 = "1790ajyhk0ax8xxamnrk176gc9gvhadzy78qia4rd8jzm89ir7gr"; + }; + + nativeBuildInputs = [ pkg-config cmake ]; + buildInputs = [ freetype ]; + + patches = lib.optionals stdenv.isDarwin [ ./macosx.patch ]; + + checkInputs = [ python ]; + doCheck = false; # fails, probably missing something + + meta = with lib; { + description = "An advanced font engine"; + maintainers = [ maintainers.raskin ]; + platforms = platforms.unix; + license = licenses.lgpl21; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch b/nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch new file mode 100644 index 000000000000..7929c1967c82 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/silgraphite/macosx.patch @@ -0,0 +1,13 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -102,7 +102,8 @@ set_target_properties(graphite2 PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}" + VERSION ${GRAPHITE_VERSION} + LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT} + LT_VERSION_REVISION ${GRAPHITE_API_REVISION} +- LT_VERSION_AGE ${GRAPHITE_API_AGE}) ++ LT_VERSION_AGE ${GRAPHITE_API_AGE} ++ INSTALL_NAME_DIR ${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}) + + if (${CMAKE_BUILD_TYPE} STREQUAL "ClangASN") + set(GRAPHITE_LINK_FLAGS "-fsanitize=address") + |