diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/allegro')
4 files changed, 104 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/allegro/5.nix b/nixpkgs/pkgs/development/libraries/allegro/5.nix new file mode 100644 index 000000000000..5cd6584f18fe --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/allegro/5.nix @@ -0,0 +1,44 @@ +{ lib, stdenv, fetchFromGitHub, fetchpatch, texinfo, libXext, xorgproto, libX11 +, libXpm, libXt, libXcursor, alsa-lib, cmake, zlib, libpng, libvorbis +, libXxf86dga, libXxf86misc +, libXxf86vm, openal, libGLU, libGL, libjpeg, flac +, libXi, libXfixes, freetype, libopus, libtheora +, physfs, enet, pkg-config, gtk2, pcre, libpulseaudio, libpthreadstubs +, libXdmcp +}: + +stdenv.mkDerivation rec { + pname = "allegro"; + version = "5.2.7.0"; + + src = fetchFromGitHub { + owner = "liballeg"; + repo = "allegro5"; + rev = version; + sha256 = "sha256-JdnzEW+qAhAljR+WfmgE3P9xeR2HvjS64tFgCC0tNA0="; + }; + + buildInputs = [ + texinfo libXext xorgproto libX11 libXpm libXt libXcursor + alsa-lib cmake zlib libpng libvorbis libXxf86dga libXxf86misc + libXxf86vm openal libGLU libGL + libjpeg flac + libXi libXfixes + enet libtheora freetype physfs libopus pkg-config gtk2 pcre libXdmcp + libpulseaudio libpthreadstubs + ]; + + postPatch = '' + sed -e 's@/XInput2.h@/XI2.h@g' -i CMakeLists.txt "src/"*.c + ''; + + cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ]; + + meta = with lib; { + description = "A game programming library"; + homepage = "https://liballeg.org/"; + license = licenses.zlib; + maintainers = [ maintainers.raskin ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/allegro/default.nix b/nixpkgs/pkgs/development/libraries/allegro/default.nix new file mode 100644 index 000000000000..6abf632806a4 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/allegro/default.nix @@ -0,0 +1,37 @@ +{ lib, stdenv, fetchurl, texinfo6_5, libXext, xorgproto, libX11 +, libXpm, libXt, libXcursor, alsa-lib, cmake, zlib, libpng, libvorbis +, libXxf86dga, libXxf86misc +, libXxf86vm, openal, libGLU, libGL }: + +stdenv.mkDerivation rec { + pname = "allegro"; + version="4.4.3.1"; + + src = fetchurl { + url = "https://github.com/liballeg/allegro5/releases/download/${version}/${pname}-${version}.tar.gz"; + sha256 = "1m6lz35nk07dli26kkwz3wa50jsrxs1kb6w1nj14a911l34xn6gc"; + }; + + patches = [ + ./nix-unstable-sandbox-fix.patch + ./encoding.patch + ]; + + buildInputs = [ + texinfo6_5 libXext xorgproto libX11 libXpm libXt libXcursor + alsa-lib cmake zlib libpng libvorbis libXxf86dga libXxf86misc + libXxf86vm openal libGLU libGL + ]; + + hardeningDisable = [ "format" ]; + + cmakeFlags = [ "-DCMAKE_SKIP_RPATH=ON" ]; + + meta = with lib; { + description = "A game programming library"; + homepage = "https://liballeg.org/"; + license = licenses.free; # giftware + maintainers = [ maintainers.raskin ]; + platforms = platforms.linux; + }; +} diff --git a/nixpkgs/pkgs/development/libraries/allegro/encoding.patch b/nixpkgs/pkgs/development/libraries/allegro/encoding.patch new file mode 100644 index 000000000000..1dca94752801 --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/allegro/encoding.patch @@ -0,0 +1,10 @@ +--- allegro-4.4.3/docs/src/allegro._tx.orig 2019-02-02 20:28:46.000000000 +0100 ++++ allegro-4.4.3/docs/src/allegro._tx 2019-11-04 11:12:39.352699777 +0100 +@@ -23,6 +23,7 @@ + @man_shortdesc_force1=allegro + @man_shortdesc_force2=Allegro game programming library. + @$\input texinfo ++@$@documentencoding ISO-8859-1 + @$@setfilename allegro.inf + @$@settitle Allegro Manual + @$@setchapternewpage odd \ No newline at end of file diff --git a/nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch b/nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch new file mode 100644 index 000000000000..a227cea1ce7b --- /dev/null +++ b/nixpkgs/pkgs/development/libraries/allegro/nix-unstable-sandbox-fix.patch @@ -0,0 +1,13 @@ +diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt +index 32ed053..73ba87f 100644 +--- a/docs/CMakeLists.txt ++++ b/docs/CMakeLists.txt +@@ -72,7 +72,7 @@ foreach(page ${DOC_SRCS}) + string(REPLACE "._tx" "" basename ${basename}) + + set(page ${CMAKE_CURRENT_SOURCE_DIR}/${page}) +- if(${page} MATCHES "/build/") ++ if(${page} MATCHES ".+/build/") + set(txt_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.txt) + set(html_out ${CMAKE_CURRENT_BINARY_DIR}/build/${basename}.html) + else() |