From 211dc8cdd881b6a56ef40529bcaf6d5518c119c3 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 16 May 2020 01:42:26 +0200 Subject: gnu: Support cross-gccs in (gnu packages suckless). * gnu/packages/suckless.scm (blind, dmenu, spoon, slock, st, surf, sent) (xbattmon, skroll, sbm, prout, noice, human, fortify-headers, colors) (libutf, lchat, scron)[arguments]: Use ${target}-gcc when cross-compiling. --- gnu/packages/suckless.scm | 200 +++++++++++++++++++++++++++++++--------------- 1 file changed, 135 insertions(+), 65 deletions(-) (limited to 'gnu/packages/suckless.scm') diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm index bff7fc493b..2a476dc31c 100644 --- a/gnu/packages/suckless.scm +++ b/gnu/packages/suckless.scm @@ -61,10 +61,13 @@ (define-public blind "0nncvzyipvkkd7zlgzwbjygp82frzs2hvbnk71gxf671np607y94")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; no check target - #:make-flags (list - "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no check target + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script @@ -147,12 +150,16 @@ (define-public dmenu "0ia9nqr83bv6x247q30bal0v42chcj9qcjgv59xs6xj46m7iz5xk")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output) - (string-append "FREETYPEINC=" - (assoc-ref %build-inputs "freetype") - "/include/freetype2")) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output) + (string-append "FREETYPEINC=" + (assoc-ref %build-inputs "freetype") + "/include/freetype2"))) #:phases (modify-phases %standard-phases (delete 'configure)))) (inputs @@ -182,8 +189,12 @@ (define-public spoon (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)))) + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))))) (inputs `(("libx11" ,libx11) ("libxkbfile" ,libxkbfile) @@ -208,9 +219,13 @@ (define-public slock "0sif752303dg33f14k6pgwq2jp1hjyhqv6x4sy3sj281qvdljf5m")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure)))) (inputs `(("libx11" ,libx11) @@ -236,9 +251,13 @@ (define-public st (base32 "0ll5wbw1szs70wdf8zy1y2ig5mfbqw2w4ls8d64r8z3y4gdf76lk")))) (build-system gnu-build-system) (arguments - '(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -277,9 +296,13 @@ (define-public surf "07cmajyafljigy10d21kkyvv5jf3hxkx06pz3rwwk3y3c9x4rvps")))) (build-system glib-or-gtk-build-system) (arguments - '(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure) @@ -323,15 +346,18 @@ (define-public sent `(#:phases (modify-phases %standard-phases (delete 'configure)) ; no configuration #:tests? #f ; no test suite - #:make-flags (let ((pkg-config (lambda (flag) - (string-append - "$(shell pkg-config " flag " " - "xft fontconfig x11 libpng)")))) - (list - "CC=gcc" - (string-append "PREFIX=" %output) - (string-append "INCS=-I. " (pkg-config "--cflags")) - (string-append "LIBS=" (pkg-config "--libs") " -lm"))))) + #:make-flags + (let ((target ,(%current-target-system)) + (pkg-config (lambda (flag) + (string-append + "$(shell pkg-config " flag " " + "xft fontconfig x11 libpng)")))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output) + (string-append "INCS=-I. " (pkg-config "--cflags")) + (string-append "LIBS=" (pkg-config "--libs") " -lm"))))) (native-inputs `(("pkg-config" ,pkg-config))) (inputs @@ -362,9 +388,13 @@ (define-public xbattmon "1zr6y8lml9xkx0a3dbbsds2qz1bjxvskp7wsckkf8mlsqrbb3xsg")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)))) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))))) (inputs `(("libx11" ,libx11))) (home-page "https://git.2f30.org/xbattmon/") @@ -420,12 +450,16 @@ (define-public skroll "0km6bjfz4ssb1z0xwld6iiixnn7d255ax8yjs3zkdm42z8q9yl0f")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases - (delete 'configure)))) ; No configure script + (delete 'configure)))) ; no configure script (home-page "https://2f30.org/") (synopsis "Commandline utility which scrolls text") (description @@ -448,12 +482,16 @@ (define-public sbm "1nks5mkh5wn30kyjzlkjlgi31bv1wq52kbp0r6nzbyfnvfdlywik")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases - (delete 'configure)))) ; No configure script + (delete 'configure)))) ; no configure script (home-page "https://git.2f30.org/sbm/") (synopsis "Simple bandwidth monitor") (description @@ -474,12 +512,16 @@ (define-public prout "1s6c3ygg1h1fyxkh8gd7nzjk6qhnwsb4535d2k780kxnwns5fzas")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases - (delete 'configure)))) ; No configure script + (delete 'configure)))) ; no configure script (inputs `(("cups-minimal" ,cups-minimal) ("zlib" ,zlib))) @@ -507,8 +549,12 @@ (define-public noice (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script @@ -541,8 +587,12 @@ (define-public human (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script @@ -570,8 +620,12 @@ (define-public fortify-headers (build-system gnu-build-system) (arguments `(#:tests? #f ; no tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure)))) ; no configure script @@ -610,12 +664,16 @@ (define-public colors "1lckmqpgj89841splng0sszbls2ag71ggkgr1wsv9y3v6y87589z")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases - (delete 'configure)))) ; No configure script + (delete 'configure)))) ; no configure script (inputs `(("libpng" ,libpng))) (home-page "https://git.2f30.org/colors/") @@ -647,12 +705,16 @@ (define-public libutf "1ih5vjavilzggyr1j1z6w1z12c2fs5fg77cfnv7ami5ivsy3kg3d")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases - (delete 'configure)))) ; No configure script + (delete 'configure)))) ; no configure script (inputs `(("gawk" ,gawk))) (home-page "https://github.com/cls/libutf") @@ -693,8 +755,12 @@ (define-public lchat (build-system gnu-build-system) (arguments `(#:test-target "test" - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases (delete 'configure) ; no configure script @@ -737,12 +803,16 @@ (define-public scron "066fwa55kqcgfrsqgxh94sqbkxfsr691360xg4ljxr4i75d25s2a")))) (build-system gnu-build-system) (arguments - `(#:tests? #f ; No tests - #:make-flags (list "CC=gcc" - (string-append "PREFIX=" %output)) + `(#:tests? #f ; no tests + #:make-flags + (let ((target ,(%current-target-system))) + (list (string-append "CC=" (if target + (string-append target "-gcc") + "gcc")) + (string-append "PREFIX=" %output))) #:phases (modify-phases %standard-phases - (delete 'configure)))) ; No configure script + (delete 'configure)))) ; no configure script (home-page "https://git.2f30.org/scron/") (synopsis "Simple cron daemon") (description -- cgit v1.2.3