From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH 1/4] gnu: Add ppp. Date: Mon, 16 Nov 2015 16:56:27 -0500 Message-ID: <87a8qd1ud0.fsf@netris.org> References: <1447653973-3839-1-git-send-email-iyzsong@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyRlQ-00086Z-RQ for guix-devel@gnu.org; Mon, 16 Nov 2015 16:56:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZyRlM-0001Lq-IL for guix-devel@gnu.org; Mon, 16 Nov 2015 16:56:40 -0500 Received: from world.peace.net ([50.252.239.5]:51783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZyRlM-0001Lm-Em for guix-devel@gnu.org; Mon, 16 Nov 2015 16:56:36 -0500 In-Reply-To: <1447653973-3839-1-git-send-email-iyzsong@gmail.com> (=?utf-8?B?IuWui+aWh+atpiIncw==?= message of "Mon, 16 Nov 2015 14:06:10 +0800") 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: =?utf-8?B?5a6L5paH5q2m?= Cc: guix-devel@gnu.org =E5=AE=8B=E6=96=87=E6=AD=A6 writes: > * gnu/packages/samba.scm (ppp): New variable. > --- > gnu/packages/samba.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 42 insertions(+) > > diff --git a/gnu/packages/samba.scm b/gnu/packages/samba.scm > index d7223bc..8d86249 100644 > --- a/gnu/packages/samba.scm > +++ b/gnu/packages/samba.scm > @@ -23,6 +23,7 @@ > #:use-module (guix build-system gnu) > #:use-module (guix licenses) > #:use-module (gnu packages acl) > + #:use-module (gnu packages admin) > #:use-module (gnu packages popt) > #:use-module (gnu packages openldap) > #:use-module (gnu packages readline) > @@ -196,3 +197,44 @@ Desktops into Active Directory environments using th= e winbind daemon.") > "Talloc is a hierarchical, reference counted memory pool system with > destructors. It is the core memory allocator used in Samba.") > (license gpl3+))) ;; The bundled "replace" library uses LGPL3. > + > +(define-public ppp > + (package > + (name "ppp") > + (version "2.4.7") > + (source (origin > + (method url-fetch) > + (uri (string-append "https://www.samba.org/ftp/ppp/ppp-" > + version ".tar.gz")) > + (sha256 > + (base32 > + "0c7vrjxl52pdwi4ckrvfjr08b31lfpgwf3pp0cqy76a77vfs7q02"))= )) > + (build-system gnu-build-system) > + (arguments > + '(#:tests? #f ; no check target > + #:phases > + (modify-phases %standard-phases > + (replace 'configure > + (lambda _ > + (setenv "CC" "gcc") How about #:make-flags '("CC=3Dgcc") instead? That's what I did in: http://git.savannah.gnu.org/cgit/guix.git/commit/?h=3Dwip-network-manager&i= d=3Dd83bc88067404d4005d6e84724901e34e3d218c9 > + (substitute* "pppd/Makefile.linux" > + (("/usr/include/crypt\\.h") > + (string-append (assoc-ref %build-inputs "libc") > + "/include/crypt.h")) > + (("/usr/include/pcap-bpf.h") > + (string-append (assoc-ref %build-inputs "libpcap") > + "/include/pcap-bpf.h"))) > + (zero? (system* "./configure" > + (string-append "--prefix=3D" %output)))))))) Also, instead of replacing the 'configure' phase, how about patching Makefile.linux in a new phase? Our default 'configure' phase now does things like passing --build to ensure a deterministic build triplet, whereas on systems like ARM the guessed triplet depends on the build machine. So, it would be good to use the default 'configure' phase when possible. > + (inputs > + `(("libpcap" ,libpcap))) > + (synopsis "Implementation of the Point-to-Point Protocol") > + (home-page "https://ppp.samba.org/") > + (description > + "The Point-to-Point Protocol (PPP) provides a standard way to estab= lish > +a network connection over a serial link. At present, this package suppo= rts IP > +and IPV6 and the protocols layered above them, such as TCP and UDP.") > + ;; pppd, pppstats and pppdump are under BSD-style notices. > + ;; some of the pppd plugins are GPL'd. > + ;; chat is public domain. > + (license (list bsd-3 bsd-4 gpl2+ public-domain)))) Otherwise looks good to me! Thanks, Mark