From mboxrd@z Thu Jan 1 00:00:00 1970 From: taylanbayirli@gmail.com (Taylan Ulrich =?utf-8?Q?Bay=C4=B1rl=C4=B1?= =?utf-8?Q?=2FKammer?=) Subject: [PATCH] gnu: Add s2tc. Date: Wed, 11 Mar 2015 22:46:10 +0100 Message-ID: <87y4n36wd9.fsf@taylan.uni.cx> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35988) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVoSE-0006Se-Pe for guix-devel@gnu.org; Wed, 11 Mar 2015 17:46:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVoSD-0006de-Ic for guix-devel@gnu.org; Wed, 11 Mar 2015 17:46:14 -0400 Received: from mail-we0-x232.google.com ([2a00:1450:400c:c03::232]:43015) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVoSD-0006dI-BD for guix-devel@gnu.org; Wed, 11 Mar 2015 17:46:13 -0400 Received: by wevl61 with SMTP id l61so12204960wev.10 for ; Wed, 11 Mar 2015 14:46:12 -0700 (PDT) Received: from taylan.uni.cx (p200300514A43E9710213E8FFFEED36FB.dip0.t-ipconnect.de. [2003:51:4a43:e971:213:e8ff:feed:36fb]) by mx.google.com with ESMTPSA id dj5sm7158197wjb.28.2015.03.11.14.46.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Mar 2015 14:46:11 -0700 (PDT) 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/plain This adds s2tc as an input to mesa, and uses a mesa-without-s2tc package as an input to s2tc to solve a cyclic dependency. The resulting s2tc package does *not* link to any libraries in the mesa-without-s2tc package (it's not a requisite as per "guix gc -R"), so this should be safe, as in the user won't end up with two different libGL images in memory. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-gnu-Add-s2tc.patch Content-Description: patch >From 9b23215a9ab474c2f03c6ae2c888672beb4b4f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?= Date: Wed, 11 Mar 2015 21:49:24 +0100 Subject: [PATCH] gnu: Add s2tc. * gnu/packages/gl.scm (s2tc): New variable. (mesa): Add input s2tc. (mesa-without-s2tc): New variable. --- gnu/packages/gl.scm | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gl.scm b/gnu/packages/gl.scm index 7d549d3..ba5f8a4 100644 --- a/gnu/packages/gl.scm +++ b/gnu/packages/gl.scm @@ -21,11 +21,13 @@ (define-module (gnu packages gl) #:use-module (ice-9 match) + #:use-module (guix build utils) #:use-module ((guix licenses) #:prefix l:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system gnu) #:use-module (guix packages) + #:use-module (gnu packages autotools) #:use-module (gnu packages bison) #:use-module (gnu packages flex) #:use-module (gnu packages pkg-config) @@ -123,6 +125,38 @@ rendering modes are: Bitmaps, Anti-aliased pixmaps, Texture maps, Outlines, Polygon meshes, and Extruded polygon meshes") (license l:x11))) +(define-public s2tc + (package + (name "s2tc") + (version "1.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/divVerent/s2tc/archive/v" version ".tar.gz")) + (sha256 + (base32 "0ibfdib277fhbqvxzan0bmglwnsl1y1rw2g8skvz82l1sfmmn752")))) + (build-system gnu-build-system) + (native-inputs + `(("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (inputs + `(("mesa" ,mesa-without-s2tc))) + (arguments + '(#:phases + (alist-cons-after + 'unpack 'autogen + (lambda _ + (zero? (system* "sh" "autogen.sh"))) + %standard-phases))) + (home-page "https://github.com/divVerent/s2tc") + (synopsis "S3 Text Compression implementation") + (description + "S2TC is a patent-free S3TC compatible implementation and provides +texture compression to Mesa.") + (license l:expat))) + (define-public mesa (package (name "mesa") @@ -153,7 +187,8 @@ Polygon meshes, and Extruded polygon meshes") ("libxml2" ,libxml2) ;; TODO: Add 'libva' ;; TODO: Add 'libxml2-python' for OpenGL ES 1.1 and 2.0 support - ("makedepend" ,makedepend))) + ("makedepend" ,makedepend) + ("s2tc" ,s2tc))) (native-inputs `(("pkg-config" ,pkg-config) ("gettext" ,gnu-gettext) @@ -196,6 +231,12 @@ allows Mesa to be used in many different environments ranging from software emulation to complete hardware acceleration for modern GPUs.") (license l:x11))) +(define-public mesa-without-s2tc + (package + (inherit mesa) + (name "mesa-without-s2tc") + (inputs (alist-delete "s2tc" (package-inputs mesa))))) + (define-public glew (package (name "glew") -- 2.2.1 --=-=-=--