From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCHES] Add Aseprite and Allegro 4 Date: Fri, 29 Jan 2016 17:01:19 -0500 Message-ID: <87mvrojb9s.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPH6b-00017V-DM for guix-devel@gnu.org; Fri, 29 Jan 2016 17:01:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aPH6Y-0001Gh-3w for guix-devel@gnu.org; Fri, 29 Jan 2016 17:01:25 -0500 Received: from mail-qg0-x22e.google.com ([2607:f8b0:400d:c04::22e]:36188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aPH6X-0001GQ-T5 for guix-devel@gnu.org; Fri, 29 Jan 2016 17:01:22 -0500 Received: by mail-qg0-x22e.google.com with SMTP id e32so77171339qgf.3 for ; Fri, 29 Jan 2016 14:01:21 -0800 (PST) Received: from izanagi ([38.88.209.18]) by smtp.gmail.com with ESMTPSA id n8sm7482327qhc.29.2016.01.29.14.01.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Jan 2016 14:01:20 -0800 (PST) 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 Hello Guix! I found out about a really neat little pixel art editing tool called Aseprite, so I packaged it! Allegro 4 is licensed under a weird license called the "giftware" license that is *very* similar to the Expat license. But fear not, it is a free license and Allegro 4 is included in Debian and fully free distros like Trisquel. I named the Allegro 4 variable "allegro-4" instead of just "allegro" because Allegro 5 is the latest and greatest version of Allegro but I just haven't packaged it yet. TIA for review! P.S. - Have a happy FOSDEM! - Dave --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-license-Add-giftware.patch >From 15327686420a477b91d11377a1586188592ec431 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 29 Jan 2016 16:03:50 -0500 Subject: [PATCH 1/3] license: Add giftware. * guix/licenses.scm (giftware): New variable. --- guix/licenses.scm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guix/licenses.scm b/guix/licenses.scm index 1def1ac..cb23734 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -40,6 +40,7 @@ epl1.0 expat freetype + giftware gpl1 gpl1+ gpl2 gpl2+ gpl3 gpl3+ gfl1.0 fdl1.3+ @@ -201,6 +202,11 @@ at URI, which may be a file:// URI pointing the package's tree." "http://directory.fsf.org/wiki/License:Freetype" "https://www.gnu.org/licenses/license-list.html#freetype")) +(define giftware + (license "Giftware" + "http://liballeg.org/license.html" + "The Allegro 4 license")) + (define gpl1 (license "GPL 1" "https://www.gnu.org/licenses/old-licenses/gpl-1.0.html" -- 2.5.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0002-gnu-Add-allegro-4.patch >From 027f4108e5b4e982dfc72b8216e910d5f504cb30 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 29 Jan 2016 16:08:12 -0500 Subject: [PATCH 2/3] gnu: Add allegro-4. * gnu/packages/game-development.scm (allegro-4): New variable. --- gnu/packages/game-development.scm | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 0274904..71543e1 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -295,3 +295,41 @@ archive on a per-file basis.") programming language.") (home-page "https://love2d.org/") (license license:zlib))) + +(define-public allegro-4 + (package + (name "allegro") + (version "4.4.2") + (source (origin + (method url-fetch) + (uri (string-append "http://download.gna.org/allegro/allegro/" + version "/allegro-" version ".tar.gz")) + (sha256 + (base32 + "1p0ghkmpc4kwij1z9rzxfv7adnpy4ayi0ifahlns1bdzgmbyf88v")))) + (build-system cmake-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-build-system + (lambda _ + ;; Build addons as shared libraries. Trying to set ADDON_LINKAGE + ;; via a command line option doesn't work because it is + ;; unconditionally clobbered in the build script. + (substitute* '("CMakeLists.txt") + (("ADDON_LINKAGE STATIC") + "ADDON_LINKAGE SHARED")) + #t))))) + (inputs + `(("glu" ,glu) + ("libpng" ,libpng) + ("libvorbis" ,libvorbis) + ("mesa" ,mesa) + ("zlib" ,zlib))) + (synopsis "Game programming library") + (description "Allegro is a library mainly aimed at video game and +multimedia programming. It handles common, low-level tasks such as creating +windows, accepting user input, loading data, drawing images, playing sounds, +etc.") + (home-page "http://liballeg.org") + (license license:giftware))) -- 2.5.0 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0003-gnu-Add-aseprite.patch >From 0678e9501403b55f6cb3ba772070e91a9aa48127 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Fri, 29 Jan 2016 16:17:45 -0500 Subject: [PATCH 3/3] gnu: Add aseprite. * gnu/packages/game-development.scm (aseprite): New variable. --- gnu/packages/game-development.scm | 72 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 71543e1..f7ec9e8 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -24,9 +24,11 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages curl) #:use-module (gnu packages databases) #:use-module (gnu packages doxygen) #:use-module (gnu packages glib) @@ -40,6 +42,7 @@ #:use-module (gnu packages gl) #:use-module (gnu packages linux) #:use-module (gnu packages xorg) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages fontutils) #:use-module (gnu packages image) #:use-module (gnu packages audio) @@ -50,7 +53,8 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages xiph) #:use-module (gnu packages lua) - #:use-module (gnu packages mp3)) + #:use-module (gnu packages mp3) + #:use-module (gnu packages xml)) (define-public bullet (package @@ -333,3 +337,69 @@ windows, accepting user input, loading data, drawing images, playing sounds, etc.") (home-page "http://liballeg.org") (license license:giftware))) + +(define-public aseprite + (package + (name "aseprite") + (version "1.1.1") + ;; The release tarball isn't good enough because it's missing some + ;; necessary code that is only in git submodules. + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/aseprite/aseprite.git") + (commit "v1.1.1") + (recursive? #t))) + (sha256 + (base32 + "1yr0l3bc68lyrffrzxgw98zznv8yz5ldl98lyvp6s5grny4s4jyk")))) + (build-system cmake-build-system) + (arguments + '(#:configure-flags + ;; Use shared libraries instead of building bundled source. + (list "-DWITH_WEBP_SUPPORT=1" + "-DUSE_SHARED_CURL=1" + "-DUSE_SHARED_GIFLIB=1" + "-DUSE_SHARED_JPEGLIB=1" + "-DUSE_SHARED_ZLIB=1" + "-DUSE_SHARED_LIBPNG=1" + "-DUSE_SHARED_LIBLOADPNG=1" + "-DUSE_SHARED_LIBWEBP=1" + "-DUSE_SHARED_TINYXML=1" + "-DUSE_SHARED_PIXMAN=1" + "-DUSE_SHARED_FREETYPE=1" + "-DUSE_SHARED_ALLEGRO4=1" + "-DENABLE_UPDATER=0" ; no auto-updates. + (string-append "-DFREETYPE_INCLUDE_DIR=" + (assoc-ref %build-inputs "freetype") + "/include/freetype2")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-freetype-utils + (lambda _ + ;; Fix C preprocessor include directive. + (substitute* '("src/app/util/freetype_utils.cpp") + (("freetype/") "")) + #t))))) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("allegro" ,allegro-4) + ("curl" ,curl) + ("freetype" ,freetype) + ("giflib" ,giflib) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libwebp" ,libwebp) + ("libx11" ,libx11) + ("libxext" ,libxext) + ("libxxf86vm" ,libxxf86vm) + ("pixman" ,pixman) + ("tinyxml" ,tinyxml) + ("zlib" ,zlib))) + (synopsis "Animated sprite editor and pixel art tool") + (description "Aseprite is a tool for creating 2D pixel art for video +games. In addition to basic pixel editing features, Aseprite can assist in +the creation of animations, tiled graphics, texture atlases, and more.") + (home-page "http://www.aseprite.org/") + (license license:gpl2+))) -- 2.5.0 --=-=-=--