diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2018-08-02 11:56:01 +0300 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2018-08-02 12:19:42 +0300 |
commit | 7b8a753672d65a0bc5f51e0063aa4c80688ef4ee (patch) | |
tree | 24c2e6df83530dcb0f4f84df4300686247065cdd /gnu/packages/games.scm | |
parent | e8d8b485d0064fec8a8aa51b3ddb612fd722389e (diff) | |
download | guix-7b8a753672d65a0bc5f51e0063aa4c80688ef4ee.tar.gz |
gnu: irrlicht: Don't use bundled libraries.
* gnu/packages/patches/irrlicht-use-system-libs.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/games.scm (irrlicht)[source]: Add patch. Remove bundled code and binaries in a snippet. [native-inputs]: Remove unzip. [inputs]: Remove glu, add bzip2, libjpeg, libpng, libx11, libxx86vm. [arguments]: Remove custom 'unpack phase, add custom 'chdir-to-source phase and adjust 'fix-build-env phase to changes.
Diffstat (limited to 'gnu/packages/games.scm')
-rw-r--r-- | gnu/packages/games.scm | 45 |
1 files changed, 32 insertions, 13 deletions
diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index c96ccede1e..5ff25e431b 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -1483,34 +1483,53 @@ are primarily in English, however some in other languages are provided.") "/" version "/irrlicht-" version ".zip")) (sha256 (base32 - "0cz4z4dwrv5ypl19ll67wl6jjpy5k6ly4vr042w4br88qq5jhazl")))) + "0cz4z4dwrv5ypl19ll67wl6jjpy5k6ly4vr042w4br88qq5jhazl")) + (patches (search-patches "irrlicht-use-system-libs.patch")) + (modules '((guix build utils))) + (snippet + '(begin + (for-each delete-file-recursively + '("bin" ; bundled compiled Windows binaries" + "source/Irrlicht/MacOSX" + "source/Irrlicht/bzip2" + "source/Irrlicht/jpeglib" + "source/Irrlicht/libpng" + "source/Irrlicht/lzma" + "source/Irrlicht/zlib")) + (delete-file "source/Irrlicht/glext.h") + (delete-file "source/Irrlicht/glxext.h") + (delete-file "source/Irrlicht/wglext.h") + #t)))) (build-system gnu-build-system) (arguments `(#:phases (modify-phases %standard-phases - (add-after 'unpack 'fix-build-env + (add-after 'unpack 'chdir-to-source + (lambda _ + ;; The actual source is buried a few directories deep. + (chdir "source/Irrlicht/") + #t)) + (add-after 'chdir-to-source 'fix-build-env (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) (substitute* "Makefile" (("INSTALL_DIR = /usr/local/lib") - (string-append "INSTALL_DIR = " out "/lib"))) + (string-append "INSTALL_DIR = " out "/lib")) + ;; Add '-fpermissive' to the CXXFLAGS + (("-Wall") "-Wall -fpermissive")) ; CImageLoaderJPG.cpp ;; The Makefile assumes these directories exist. (mkdir-p (string-append out "/lib")) (mkdir-p (string-append out "/include"))))) - (replace 'unpack - (lambda* (#:key source #:allow-other-keys) - (and (zero? (system* "unzip" source)) - ;; The actual source is buried a few directories deep. - (chdir (string-append "irrlicht-" ,version - "/source/Irrlicht/"))))) (delete 'configure)) ; no configure script #:tests? #f ; no check target #:make-flags '("CC=gcc" "sharedlib"))) - (native-inputs - `(("unzip" ,unzip))) (inputs - `(("mesa" ,mesa) - ("glu" ,glu))) + `(("bzip2" ,bzip2) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libx11" ,libx11) + ("libxxf86vm" ,libxxf86vm) + ("mesa" ,mesa))) (synopsis "3D game engine written in C++") (description "The Irrlicht Engine is a high performance realtime 3D engine written in |