From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Gesthuizen Subject: Fix for teeworlds Date: Mon, 2 Jul 2018 17:24:34 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kUWoGO41jfYLtdErBpmzX8iy8Fi3vRKRG" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fa0h9-0006fV-BQ for guix-devel@gnu.org; Mon, 02 Jul 2018 11:24:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fa0h5-00068f-Be for guix-devel@gnu.org; Mon, 02 Jul 2018 11:24:51 -0400 Received: from sonic311-31.consmr.mail.ir2.yahoo.com ([77.238.176.163]:42177) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fa0h4-00067u-UK for guix-devel@gnu.org; Mon, 02 Jul 2018 11:24:47 -0400 Received: from p5B221830.dip0.t-ipconnect.de (EHLO [192.168.178.27]) ([91.34.24.48]) by smtp405.mail.ir2.yahoo.com (Oath Hermes SMTP Server) with ESMTPA ID 098576cf62005a14bb92ea9c20a3c59a for ; Mon, 02 Jul 2018 15:24:39 +0000 (UTC) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kUWoGO41jfYLtdErBpmzX8iy8Fi3vRKRG Content-Type: multipart/mixed; boundary="wfVscPu37WTNTigWSsWve790eRSRyiJAK"; protected-headers="v1" From: Tim Gesthuizen To: guix-devel@gnu.org Message-ID: Subject: Fix for teeworlds --wfVscPu37WTNTigWSsWve790eRSRyiJAK Content-Type: multipart/mixed; boundary="------------696ACDBD3FCBCA2C855900AD" Content-Language: en-US This is a multi-part message in MIME format. --------------696ACDBD3FCBCA2C855900AD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, I am using GNU Guix now for a little while and since I started using it teeworlds did not build. So I invested some time and quickly found out that the package definition= is simply missing a dependency (pkg-config) to build. You find a script which I used to create my working build as well as a patch for guix which I have not verified to=C2=A0 be working attache= d. It would be very nice if someone could investigate whether the patch is ok and commit it. Thanks, Tim Gesthuizen --------------696ACDBD3FCBCA2C855900AD Content-Type: text/x-scheme; name="my-teeworlds.scm" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="my-teeworlds.scm" (use-modules ((guix licenses) #:prefix license:) (guix utils) (guix packages) =20 (guix download) (gnu packages) (gnu packages gl) (gnu packages sdl) (gnu packages audio) (gnu packages build-tools) (gnu packages python) (gnu packages fontutils) (gnu packages compression) (gnu packages pkg-config) (guix build-system gnu)) (package (name "my-teeworlds") (version "0.6.4") (source (origin (method url-fetch) (uri (string-append "https://github.com/teeworlds/teeworlds/" "archive/" version "-release.tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1mqhp6xjl75l49050cid36wxyjn1qr0vjx1c709dfg1lkvmgs6l3")) (modules '((guix build utils))) (snippet '(begin (for-each delete-file-recursively '("src/engine/external/wavpack/" "src/engine/external/zlib/")) #t)) (patches (search-patches "teeworlds-use-latest-wavpack.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests included #:phases (modify-phases %standard-phases (replace 'configure (lambda* (#:key outputs #:allow-other-keys) ;; Embed path to assets. (substitute* "src/engine/shared/storage.cpp" (("#define DATA_DIR.*") (string-append "#define DATA_DIR \"" (assoc-ref outputs "out") "/share/teeworlds/data" "\""))) ;; Bam expects all files to have a recent time stamp. (for-each (lambda (file) (utime file 1 1)) (find-files ".")) ;; Do not use bundled libraries. (substitute* "bam.lua" (("if config.zlib.value =3D=3D 1 then") "if true then") (("wavpack =3D .*") "wavpack =3D {} settings.link.libs:Add(\"wavpack\")\n")) (substitute* "src/engine/client/sound.cpp" (("#include ") "#include ")) #t)) (replace 'build (lambda _ (zero? (system* "bam" "-a" "-v" "release")))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) (bin (string-append out "/bin")) (data (string-append out "/share/teeworlds/data"))) (mkdir-p bin) (mkdir-p data) (for-each (lambda (file) (install-file file bin)) '("teeworlds" "teeworlds_srv")) (copy-recursively "data" data) #t)))))) ;; FIXME: teeworlds bundles the sources of "pnglite", a two-file PNG ;; library without a build system. (inputs `(("freetype" ,freetype) ("glu" ,glu) ("mesa" ,mesa) ("sdl-union" ,(sdl-union (list sdl sdl-mixer sdl-image))) ("wavpack" ,wavpack) ("zlib" ,zlib))) (native-inputs `(("bam" ,bam) ("python" ,python-2) ("pkg-config" ,pkg-config))) (home-page "https://www.teeworlds.com") (synopsis "2D retro multiplayer shooter game") (description "Teeworlds is an online multiplayer game. Battle with up t= o 16 players in a variety of game modes, including Team Deathmatch and Capt= ure The Flag. You can even design your own maps!") (license license:bsd-3)) --------------696ACDBD3FCBCA2C855900AD Content-Type: text/x-patch; name="0001-Fixes-missing-pkg-config-dependency-for-teeworlds.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename*0="0001-Fixes-missing-pkg-config-dependency-for-teeworlds.patch" =46rom ec193500a2644ddf7db17b2302ebae54342228f3 Mon Sep 17 00:00:00 2001 From: Tim Gesthuizen Date: Mon, 2 Jul 2018 17:10:50 +0200 Subject: [PATCH] Fixes missing pkg-config dependency for teeworlds teeworlds uses bam as a build system which relies on pkg-config for finding libraries like freetype. Therefore pkg-config is needed to build this package. Signed-off-by: Tim Gesthuizen --- gnu/packages/games.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 0796e4800..ecca036be 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -3880,7 +3880,8 @@ settings.link.libs:Add(\"wavpack\")\n")) ("zlib" ,zlib))) (native-inputs `(("bam" ,bam) - ("python" ,python-2))) + ("python" ,python-2) + ("pkg-config" ,pkg-config))) (home-page "https://www.teeworlds.com") (synopsis "2D retro multiplayer shooter game") (description "Teeworlds is an online multiplayer game. Battle with = up to --=20 2.18.0 --------------696ACDBD3FCBCA2C855900AD-- --wfVscPu37WTNTigWSsWve790eRSRyiJAK-- --kUWoGO41jfYLtdErBpmzX8iy8Fi3vRKRG Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEKUiC5+8BRKEri5fa0uWPaa77GdUFAls6Q7YACgkQ0uWPaa77 GdVMxwf/cm7yWwAy+D98M87ZAwgHaZTVofZy2KqMTpvQHNytCW+GF4HfES0Bqq0w N3FAOcDlg05bj35Wmr1Hdih00w9X25dSv6taWy8UmmWxlz90LNPHHrATmR2M46kn STEj9TDZDysKTgvhR85mndzoCSQ94jH7FGaUJDZFsqH63tQuG57ckDS7zxFgKKea VHIerOMRkCxQwDMwQ+u0k+qNlPu23/DMVKwsCevIyefB4aNKzvh2eHHIyA7lyXuv ptv3LIiqaTC2kWdP2KPtRXokxeOvE9jX9r8tBqdPZhyuxc6rPdUyTR4ytNcAcnxn EESoWGzlVvzzvBDgWPvr4PJKJPvy+w== =EIGT -----END PGP SIGNATURE----- --kUWoGO41jfYLtdErBpmzX8iy8Fi3vRKRG--