aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdonay Felipe Nogueira <adfeno@openmailbox.org>2016-10-17 10:47:21 -0200
committerMarius Bakke <mbakke@fastmail.com>2016-10-17 15:20:11 +0100
commit8a666bc5cb3c50b4b881290c7776c3f681a734bc (patch)
treedaadf6f361be5c90d5dada294de5889b1c21557d
parentdd04f56a2b25f6d32891bccd22a1315504257718 (diff)
downloadpatches-8a666bc5cb3c50b4b881290c7776c3f681a734bc.tar
patches-8a666bc5cb3c50b4b881290c7776c3f681a734bc.tar.gz
gnu: artanis: Remove implied $(DESTDIR) usage.
* gnu/packages/patches/artanis-fix-Makefile.in.patch: New file. * gnu/local.mk (dist_patch_DATA): Register patch. * gnu/packages/guile.scm (artanis)[source]: Use patch. [arguments]: Remove DESTDIR from #:make-flags. Signed-off-by: Marius Bakke <mbakke@fastmail.com>
-rw-r--r--gnu/local.mk2
-rw-r--r--gnu/packages/guile.scm7
-rw-r--r--gnu/packages/patches/artanis-fix-Makefile.in.patch70
3 files changed, 76 insertions, 3 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 27872ce52a..9079b42916 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -5,6 +5,7 @@
# Copyright © 2013, 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
# Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
# Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
+# Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
#
# This file is part of GNU Guix.
#
@@ -454,6 +455,7 @@ dist_patch_DATA = \
%D%/packages/patches/antiword-CVE-2014-8123.patch \
%D%/packages/patches/apr-skip-getservbyname-test.patch \
%D%/packages/patches/arb-ldconfig.patch \
+ %D%/packages/patches/artanis-fix-Makefile.in.patch \
%D%/packages/patches/ath9k-htc-firmware-binutils.patch \
%D%/packages/patches/ath9k-htc-firmware-gcc.patch \
%D%/packages/patches/ath9k-htc-firmware-objcopy.patch \
diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm
index 7361f1f8ed..43071e6968 100644
--- a/gnu/packages/guile.scm
+++ b/gnu/packages/guile.scm
@@ -7,6 +7,7 @@
;;; Copyright © 2016 Erik Edrosa <erik.edrosa@gmail.com>
;;; Copyright © 2016 Eraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Alex Kost <alezost@gmail.com>
+;;; Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -305,7 +306,8 @@ applicable."
version ".tar.gz"))
(sha256
(base32
- "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))))
+ "19m3ak12cqk8js9d2mdg11kh4fjsq8frfpd10qw75h0zpr5cywpp"))
+ (patches (search-patches "artanis-fix-Makefile.in.patch"))))
(build-system gnu-build-system)
;; TODO: Add guile-dbi and guile-dbd optional dependencies.
(inputs `(("guile" ,guile-2.0)))
@@ -319,8 +321,7 @@ applicable."
(dir (string-append out "/share/guile/site/2.0")))
;; Don't use (%site-dir) for site paths.
(list (string-append "MOD_PATH=" dir)
- (string-append "MOD_COMPILED_PATH=" dir)
- (string-append "DESTDIR=" out)))
+ (string-append "MOD_COMPILED_PATH=" dir)))
#:test-target "test"
#:phases
(modify-phases %standard-phases
diff --git a/gnu/packages/patches/artanis-fix-Makefile.in.patch b/gnu/packages/patches/artanis-fix-Makefile.in.patch
new file mode 100644
index 0000000000..7e4800d364
--- /dev/null
+++ b/gnu/packages/patches/artanis-fix-Makefile.in.patch
@@ -0,0 +1,70 @@
+Applies until an Artanis release comes with the following patches
+applied:
+* <https://savannah.gnu.org/patch/?func=detailitem&item_id=9130>
+* <https://savannah.gnu.org/patch/?func=detailitem&item_id=9131>
+diff -ru artanis-0.1.2/Makefile.in artanis-0.1.2.1/Makefile.in
+--- artanis-0.1.2/Makefile.in 2016-02-10 12:35:18.800490571 -0200
++++ artanis-0.1.2.1/Makefile.in 2016-10-15 19:44:35.140907367 -0300
+@@ -19,9 +19,18 @@
+ MOD_OBJ := $(OBJ)/artanis
+ BIN := bin
+ TEMP_LIB_PATH := $(OBJ)
+-MOD_PATH := $(shell guile -c "(display (%site-dir))")
+ MOD_COMPILED_PATH := $(shell guile -c "(display (%site-ccache-dir))")
++
++ifdef DESTDIR
++INFO_DIR := $(DESTDIR)/share/info/
++MOD_PATH := $(DESTDIR)/$(shell guile -c "(display (%site-dir))")
+ MOD_TARGET_PATH := $(DESTDIR)/$(MOD_COMPILED_PATH)
++else
++INFO_DIR := $(PREFIX)/share/info/
++MOD_PATH := $(shell guile -c "(display (%site-dir))")
++MOD_TARGET_PATH := $(MOD_COMPILED_PATH)
++endif
++
+ GUILE_CFLAGS := -Wunsupported-warning -Wunbound-variable -Warity-mismatch -Wduplicate-case-datum -Wbad-case-datum -Wformat
+ GUILEC := GUILE_LOAD_COMPILED_PATH=$(TEMP_LIB_PATH) guild compile $(GUILE_CFLAGS)
+ ARTANIS_ETC := $(SRC)/etc/artanis
+@@ -36,7 +45,6 @@
+ GENDOCS :=$(BUILD_AUX)/gendocs.sh
+ CHK_TEXINFO := $(BUILD_AUX)/check_texinfo.scm
+ CP := cp -frd -P
+-INFO_DIR := $(PREFIX)/share/info/
+ TARBALL_NAME := artanis-$(VERSION)
+ TMP_DIR := $(shell mktemp -d)
+ ANN_GEN := $(BUILD_AUX)/announce-gen
+@@ -124,18 +132,29 @@
+ -rm -f config.{h,log}
+
+ install: $(ALL_TARGETS)
+- mkdir -p $(DESTDIR)/$(MOD_PATH)
+- $(CP) $(MOD) $(DESTDIR)/$(MOD_PATH)/
++ mkdir -p $(MOD_PATH)
++ $(CP) $(MOD) $(MOD_PATH)/
+ mkdir -p $(MOD_TARGET_PATH)/
+ $(CP) $(MOD_OBJ) $(MOD_TARGET_PATH)/
++
++ifdef DESTDIR
+ $(CP) $(ARTANIS_ETC) $(DESTDIR)/etc/
+ $(CP) $(ARTANIS_PAGES) $(DESTDIR)/etc/artanis/
+- mkdir -p $(DESTDIR)/$(PREFIX)/bin/
+- $(CP) $(BIN)/art $(DESTDIR)/$(PREFIX)/bin/
++ mkdir -p $(DESTDIR)/bin/
++ $(CP) $(BIN)/art $(DESTDIR)/bin/
+ mkdir -p $(DESTDIR)/etc/bash_completion.d/
+ $(CP) $(CMDCOMP) $(DESTDIR)/etc/bash_completion.d/
++else
++ $(CP) $(ARTANIS_ETC) $(PREFIX)/etc/
++ $(CP) $(ARTANIS_PAGES) $(PREFIX)/etc/artanis/
++ mkdir -p $(PREFIX)/bin/
++ $(CP) $(BIN)/art $(PREFIX)/bin/
++ mkdir -p $(PREFIX)/etc/bash_completion.d/
++ $(CP) $(CMDCOMP) $(PREFIX)/etc/bash_completion.d/
++endif
++
+ if [ -e /etc/bash.bashrc ]; then source /etc/bash.bashrc; fi
+- if [ -e artanis.info ]; then mkdir -p $(DESTDIR)/$(INFO_DIR); $(CP) artanis.info $(DESTDIR)/$(INFO_DIR)/; fi
++ if [ -e artanis.info ]; then mkdir -p $(INFO_DIR); $(CP) artanis.info $(INFO_DIR)/; fi
+
+ distclean: distclean-mk clean clean-config clean-tarball
+ -rm -f $(BIN)/art