From unknown Tue Jun 17 01:43:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51996] [PATCH] gnu: Add xfoil. Resent-From: Foo Chuan Wei Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 20 Nov 2021 08:14:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51996 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51996@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.163739603423349 (code B ref -1); Sat, 20 Nov 2021 08:14:02 +0000 Received: (at submit) by debbugs.gnu.org; 20 Nov 2021 08:13:54 +0000 Received: from localhost ([127.0.0.1]:41578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moLVL-00064M-5B for submit@debbugs.gnu.org; Sat, 20 Nov 2021 03:13:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:32820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moLVH-00064D-Cs for submit@debbugs.gnu.org; Sat, 20 Nov 2021 03:13:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moLVH-00023b-8d for guix-patches@gnu.org; Sat, 20 Nov 2021 03:13:43 -0500 Received: from [2a01:111:f400:feab::80b] (port=53206 helo=APC01-SG2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moLVE-00086e-HV for guix-patches@gnu.org; Sat, 20 Nov 2021 03:13:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=igUxCs4Xbwcc8jOK+LarIH5zKH6YfDKeZD9GT7+ewe1YyXlVYfgq/pvWu8rz2/UpYIbS3/exBhhAG+9ZQP5yqWnuNpnnKiQKLY9CGC0fmZIBKLplXqflg3ZA7gUck1kuSC6jv3s4nc10lyDRahjB2yCVDlQn6zlyaSRz8/28/nglD3kiriGgW95HlltpSib3f173AFlxcIM9aW5aswviUwtJKz40tWb5mcghJ+ykIwA7Oq4KRv/1ilVNMRxKRhHvPmF3IBLUzgjfvVgj/XrQMhTIQkGQpEXP7BZGEA2MaauGMgLwwKA0YNyufuXXMXEeSAKY7USBhiL0nFYnXzZ61g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OziheuPCKnyM5nlMw+I4U7XRfpmUrXGfjr2VhywGvnc=; b=DygwdqxqlIz8zJZB5GoVDXbvvhBTHhBSA5LLsy9dpZ6U9SzBVo2QsRUg7ZcjCVRW4SXlNV0v76SXkJH2DxrZyfYMkXYiT2iKbKpPIQAw7WFzsNItkLudajioTGmKthW+Z6WnZHZRZTCfC2Sz27yZ3SD+NjiU8uIyQfTsctDLPqL5oPNFiTOCvIoZe6zrB5XVYsbJaiwjOqEjcBkaPJGhTyJvKB/UDXPPdNloyaoxAdr9mZSTSsH2Z1yslntsV7KtFmIhcSsf7RGaIRLjZNRmNYY2TLmpULfrpdlg1JkuYI1JSuj1XucNZzj4UJak+aTgtL2cA1OcJC4BvH4kco7qZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OziheuPCKnyM5nlMw+I4U7XRfpmUrXGfjr2VhywGvnc=; b=uMeZ6w+c7fp5PV1OYqMLkuU6tWCcTEhpezhgWGiMIfZBRow3cqQLf1N+ys9jRj5o5/ZV1ctJxXF0vYhCGmBTCjRGCJKtM2SRpU0cBCDnH5C10K0Nj7hrTl3GzRtzdfASo7c4E95pXRLLwmf15b/szD+6TAzNrIsTbQmnoUTTrfGkQhsPa0roNO5G7VXZWKKI+kmpoqmfdZczStZmuCqudSrdDmkpNVtlC0njOjAb9nxkrnqUxdJRdMLTbh1Xh+BOBqzEFcXKH6roKjV3pozOJnQh0Fj2Fq9upSSMDEwV20tw7O244njBIA2lM0RPRknUf/PD25WfNMtEHdyVSu5gcQ== Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com (2603:1096:803:1c::21) by PSBPR01MB3766.apcprd01.prod.exchangelabs.com (2603:1096:301:e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21; Sat, 20 Nov 2021 08:08:30 +0000 Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com ([fe80::258d:e124:fd3a:40ee]) by PU1PR01MB2155.apcprd01.prod.exchangelabs.com ([fe80::258d:e124:fd3a:40ee%7]) with mapi id 15.20.4713.024; Sat, 20 Nov 2021 08:08:28 +0000 Date: Sat, 20 Nov 2021 07:54:47 +0000 From: Foo Chuan Wei Message-ID: Mail-Followup-To: guix-patches@gnu.org Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-TMN: [xHFc66+k3pT5KI9wrbqnGj874C91jbQK] X-ClientProxiedBy: HK2PR04CA0059.apcprd04.prod.outlook.com (2603:1096:202:14::27) To PU1PR01MB2155.apcprd01.prod.exchangelabs.com (2603:1096:803:1c::21) X-Microsoft-Original-Message-ID: <20211120075447.2gowe5ln52mjwf5x@main> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from main (61.6.253.166) by HK2PR04CA0059.apcprd04.prod.outlook.com (2603:1096:202:14::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Sat, 20 Nov 2021 08:08:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73b749db-f988-40d9-9082-08d9abfceec2 X-MS-TrafficTypeDiagnostic: PSBPR01MB3766: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SaENnN+RU3eblCwIaFvoWfnlFMxUwYrav8kDlC0bTfBUpikn4SE0c5ttEotDzHD0OqF152IE/ALYnJ3l0GIvCwSctxm68Z6jzi1mfVgOSyT8lkjvv30XrzAf4x/+KP103bkshW75wgYPRNPgl1AxZaQ2pb5riAFoP3v1BG3DAv5V91qawdEND46MgXX2g1CsnoW97v8hUT+nNKRY2ORV0iIi3epzEpzuJ9qpqp0QKyRet4+zHP7VYbocejKSXS95zjnhQ1vlHHLDtsNlIdNrmHJ5+Tqjl5LxqecvawUG0s6XRvn8D/q/mUxHFhEKrYDT+e3xPNURrVSZ4nzP+b1JPDeWmLmz4bywVSQNicTmA3lLY71hrXaAKuo+X5cQAOMHKTMsif6iTl0EtrhSqdWx+FgK3yVMJJc1xSsF4HgexPeM5y9Q+S7c9FxEHAhruQUAlXdXuG0txWjUp9G8Q6rGLGhFWSBer1Nn7Fq0v+2Z4zctd2rOLhf7/rSxd5G1gVMLr1A0susVr3p17Yo0JuCdXnVG5uPiG2Gj+vb9mM9vfh4I0XPJGen6yf8fL6ZPOA0uWaQGtFm7y/LnGCmcyx7mvnPUGwkNnpQScZF0E8+E7FLtT3kGxmFKbojmduuBjUuO9sBXZ1d1Swv71cd1Q8cE5rh2mwIqS4eS4S4M8vHcmJI= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AQ7VQbpP5z/CgjyaILOz5XNPLsIXSQgtUnWfTS7C6v0oyaX7G+AcP0J+2FOePSEJCH7cXcNzV58t0QazZT0JXq794kipI6fogskIPi8GUAVECH/dV6q096GasXdHU9ntG39tqC49d+g5I+MnyeX8sDeHeb+Uq3jow5xAVF3ZYDbDmxhnbbEE7PiUX1B5fO+5H1cYa0fy49XCG1CPtXSGny1SvcQP5NeSwErLd53D7Jj4F6YjGret9REbETbInAHWYImBNGV1c77Z59ODVxBohAnfArzQJxume0YL0bxYjDBJdnMaJC4ZEU8sB4uT8hIloo6JgEgkewipZ3A3WLXkObCZx6/weXkQYF/2pCXYa9Gw+67xzDn/KPde6nzUBxi2bJBN6dD9YUUS1dJKph4CoJvpVBaWKDq8GioJ12JVkOij3rlVBTwClCYSzoGyivt3TVjF3SG1qBeFzKEtmnJ0v4pqgbJ52nvPWpNerVs9Fyvwj7C6z3asaDMjAJtkqFxvHeU6WTmyUjHjx8zUPeJ0H+8S7lAQlMKmExLCCEQ/pYw12r8oLdxjq9DGFZM1YM7jhOISz3UVmhN/pj5Efrt2O2Vq5FFzpX/jL8NEe165HCRi17OnL3CCqqAhhO7s1g1B6HVMFDoINdHzUeTs0sqa9h/1g/FB31KObBddf891vbUhPX1egxZnkVJpboBIuwpp X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-5c337.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 73b749db-f988-40d9-9082-08d9abfceec2 X-MS-Exchange-CrossTenant-AuthSource: PU1PR01MB2155.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2021 08:08:28.1569 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSBPR01MB3766 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:111:f400:feab::80b (failed) Received-SPF: pass client-ip=2a01:111:f400:feab::80b; envelope-from=chuanwei.foo@hotmail.com; helo=APC01-SG2-obe.outbound.protection.outlook.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URI_DOTEDU=1.997 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/engineering.scm (xfoil): New variable. --- gnu/packages/engineering.scm | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 50f265f085..d933dffe6e 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2021 Gerd Heber ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Ivan Gankevich +;;; Copyright © 2021 Foo Chuan Wei ;;; ;;; This file is part of GNU Guix. ;;; @@ -2847,6 +2848,102 @@ hot-patching the machine code of the standard C library in the memory of a process.") (license license:bsd-2)))) +(define-public xfoil + (package + (name "xfoil") + (version "6.99") + (source + (origin + (method url-fetch) + (uri (string-append "https://web.mit.edu/drela/Public/web/xfoil/xfoil" + version ".tgz")) + (sha256 + (base32 + "0h5y5v0qlyvi4qc943x394npz4779i8f52iksxshxkjj7xj500jw")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'edit-files + (lambda* (#:key outputs #:allow-other-keys) + ;; The instructions in orrs/README say that orrs/bin/osmap.f + ;; should be edited, but that file is never used by XFOIL. + ;; Instead, it is osrc/osmap.f that is used. + (substitute* "osrc/osmap.f" + (("^[ ]{6}DATA OSFILE / '/var/local/codes/orrs/osmap.dat' /") + (let ((replacement (string-append (make-string 6 #\space) + "DATA OSFILE / '" + (assoc-ref outputs "out") + "/share/xfoil/osmap.dat' /"))) + ;; In fixed form Fortran, lines cannot exceed 72 columns. + ;; The Guix store path exceeds this limit. + (string-append + (substring replacement 0 72) "\n" + (make-string 5 #\space) "&" (substring replacement 72))))) + (substitute* "orrs/bin/Makefile_DP" + (("^FC = ifort") + "FC = gfortran") + (("^FLG = -O -r8") + "FLG = -O2 -fdefault-real-8")) + (substitute* "plotlib/Makefile" + (("^include ./config.make") + "include ./config.make.gfortranDP")) + (substitute* "bin/Makefile_gfortran" + (("^BINDIR = /home/codes/bin/") + (string-append "BINDIR = " (assoc-ref outputs "out") "/bin")) + (("^CC = cc") + "CC = gcc") + (("^CFLAGS = -O -DUNDERSCORE") + "CFLAGS = -O2 -DUNDERSCORE") + (("^FFLAGS = -O \\$\\(CHK\\) \\$\\(DBL\\)") + "FFLAGS = -O2 $(CHK) $(DBL)") + (("^FFLOPT = -O \\$\\(CHK\\) \\$\\(DBL\\)") + "FFLOPT = -O2 $(CHK) $(DBL)") + ;; Separate the build stage from the install stage. + (("\\$\\(INSTALLCMD\\) xfoil \\$\\(BINDIR\\)") "") + (("\\$\\(INSTALLCMD\\) pxplot \\$\\(BINDIR\\)") "") + (("\\$\\(INSTALLCMD\\) pplot \\$\\(BINDIR\\)") "")))) + (replace 'build + (lambda _ + (invoke "make" "-C" "orrs/bin" "-f" "Makefile_DP" "osgen") + (with-directory-excursion "orrs" + (invoke "bin/osgen" "osmaps_ns.lst")) + (invoke "make" "-C" "plotlib") + (invoke "make" "-C" "bin" "-f" "Makefile_gfortran"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin-dir (string-append out "/bin")) + (data-dir (string-append out "/share/xfoil")) + (doc-dir (string-append out "/share/doc/xfoil"))) + (mkdir-p bin-dir) + (invoke "make" "-C" "bin" "-f" "Makefile_gfortran" "install") + (mkdir-p data-dir) + (install-file "orrs/osmap.dat" data-dir) + (mkdir-p doc-dir) + (install-file "xfoil_doc.txt" doc-dir))))) + #:tests? #f)) + (native-inputs + `(("gfortran" ,gfortran) + ("libx11" ,libx11))) + (home-page "https://web.mit.edu/drela/Public/web/xfoil/") + (synopsis "Program for the design and analysis of subsonic airfoils") + (description + "XFOIL is an interactive program for the design and analysis of subsonic +isolated airfoils. It consists of a collection of menu-driven routines which +perform various useful functions such as: +@itemize +@item Viscous (or inviscid) analysis of an existing airfoil +@item Airfoil design and redesign by interactive modification of surface speed + distributions +@item Airfoil redesign by interactive modification of geometric parameters +@item Blending of airfoils +@item Writing and reading of airfoil coordinates and polar save files +@item Plotting of geometry, pressure distributions, and multiple polars +@end itemize") + (license license:gpl2+))) + (define-public libigl (package (name "libigl") base-commit: 70a88dac11d3cb47c1058ed65d3970fe27517c77 -- 2.25.1 From unknown Tue Jun 17 01:43:40 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#51996] [PATCH v2] gnu: Add xfoil. References: In-Reply-To: Resent-From: Foo Chuan Wei Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 21 Nov 2021 10:42:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51996 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51996@debbugs.gnu.org Received: via spool by 51996-submit@debbugs.gnu.org id=B51996.163749126311584 (code B ref 51996); Sun, 21 Nov 2021 10:42:01 +0000 Received: (at 51996) by debbugs.gnu.org; 21 Nov 2021 10:41:03 +0000 Received: from localhost ([127.0.0.1]:44311 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mokHO-00030m-Q2 for submit@debbugs.gnu.org; Sun, 21 Nov 2021 05:41:03 -0500 Received: from mail-oln040092255028.outbound.protection.outlook.com ([40.92.255.28]:3776 helo=APC01-HK2-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mokHN-00030A-Al for 51996@debbugs.gnu.org; Sun, 21 Nov 2021 05:41:02 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SRwVnCH3H5eGp5VzGd8mu9RRSEhqMKSbsJ9nqjkMCTblnhqmy6bBO266mGnwZm9X+5W/Uhdlur1BF8stmKMte1lF+sLwV4rHDfT2e5lGhAy6B7C8UGpo6n9tuuEJAUfvvVUuLTAwB1U3XZqutwAE3ZdKkvYw8wGjVfzGPTlz1bo6ZokmVv8grqxdzG6zF7wzhYGJPXNfNZN6YQTJ9DI6GjnkUHB6wpWM5RGZW95YtrOSWnHWwZolX8KxEDuHH7XX5bvma/2Be8OnCTEC9hfm03lpd7XzwAHku7jv7+j/NgF9jtHDkto43RjLDug0JZTdGDlmOubYWTtAtI7wRxhYsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eg9fDUqk8rbGIW6xcpYV7c1Jnz67E6+qaQ8m1qi7aCs=; b=cAY6QVTVjH0UKaMEfuMPfh4ejtLcajjBVXL0pqRennpTAGm+etkEnh9Iiy9QfQBKvXi/vIefn5vx0fX4Qm2WpldD038+O6To36h87ZqejL/zdBe7WjjiBdCMqbLDj66Dg4KDxDtEPivTNyZgkJif/+Jwjb4V+1eg4LFauNzjvBE8pYImKpcnOIdQtfpOGwkTzUbBnVtLfiaH9Vmayr6RjD0ruq8mqMqFANA2FkL+j7Ri75UuZqyBiA7SGbiCXKc0cFzfy52PT1QRbU+0/tv+cuxLwQYjlxqrHKxSUVihVMfS0YZrw38ye2x2oj6RQZ21PlKCQDe1DI1vWi1fFj4LJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eg9fDUqk8rbGIW6xcpYV7c1Jnz67E6+qaQ8m1qi7aCs=; b=P/PPHoINkG5UakIT0Du9qYKq4nKymtYCORYHkjYPPKKi8yqIjc1ooPCQ/X6awKkJYZGzXkrq4Uw6RhVnfKHIrK75JmHWKy8w8MmzHUso9vg5BtcS1gJPQE70ZTy8ruNdpyKy30myEKt5ZLp3mbC7r4AHhXB3l8uiBkl6Y1ADX+uMbOABwHEEocwJQwNqaP7Qt1mK96QzvCOPxYk8zl1Wt1dUb0mUtgOpqtAOVX2wZeIHxqKnSEnIByQluJxzP5w+v6jJJkwP0c9MKbNATZmqOkTuCnwuXRwXvQwEbZFeQvUphT7bufmdH+GU24Gc3wPM/3T/2dpkj+NluKqlcYgv2A== Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com (2603:1096:803:1c::21) by PS2PR01MB2279.apcprd01.prod.exchangelabs.com (2603:1096:300:3c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21; Sun, 21 Nov 2021 10:40:53 +0000 Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com ([fe80::258d:e124:fd3a:40ee]) by PU1PR01MB2155.apcprd01.prod.exchangelabs.com ([fe80::258d:e124:fd3a:40ee%7]) with mapi id 15.20.4713.024; Sun, 21 Nov 2021 10:40:53 +0000 Date: Sun, 21 Nov 2021 10:40:50 +0000 From: Foo Chuan Wei Message-ID: Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-TMN: [4l5/8UVoiyQDUypC+PHxyur4IQaalDsGRTUfQVqXbak=] X-ClientProxiedBy: HK2PR03CA0045.apcprd03.prod.outlook.com (2603:1096:202:17::15) To PU1PR01MB2155.apcprd01.prod.exchangelabs.com (2603:1096:803:1c::21) X-Microsoft-Original-Message-ID: <20211121104050.metx4w3olpjsfqbs@main> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from main (118.103.255.110) by HK2PR03CA0045.apcprd03.prod.outlook.com (2603:1096:202:17::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.11 via Frontend Transport; Sun, 21 Nov 2021 10:40:53 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51255121-d6c2-4469-62c2-08d9acdb6480 X-MS-TrafficTypeDiagnostic: PS2PR01MB2279: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: xDp48HgX4wyALEwavX8JxT6Gh6RseGw9/NC8gCp3yJD+IyeEpWtSNdnuSrCVfI7R3QRRcZ66Q+MyjSzXH4UHAqRj+SziSaqFwIn0XYB3ti9T0/q0Vc032CsBf1R9ZxvAJR5JX8ieg9pd5kKsrgc+rq7srjuhmVchOGYf7fIxg+GSzyLMwRG+sZm0ndvsjsWnxZDUZuI+mKukpdz3ROJByd7N7uJE5LIkh3KZEeMRchenEgVh0JFZ65zWPyK8OwanfnwhtXmpCLb7a0wPfIgvpFJ0N6v5mkFgQ/bKyxqERpcfMFMaek3uLQf4fyG56VNb3BGKwYiL4hM8H5rP3bePiXygVZHRVUHoKf0CLWVDZub6p5Y1kpxqvZHLlLuNYhgx1Pdtz32UW04THBTeJ1frGvCTYC+GaZsqL2hDqqm6x2HsSA/sLi50p+U4Wtyw/4v6wub01SY32IYem+vr0TsSptAcWKKFdVs3LKe3C2Nb253cp1nIRhq5/hJ5ZOFYHGVjGEtKbx0QMGMM0lPAP6vE6hb6h6un3jDGejBhKTRGK9GjjsqXpfYc2LAWLSlFKEOWbthLZmhbYYCtioua520G9rxDGXFxj4Egys3lyxqC2Wa2N04fJj429KQz6jc7kNPVvK4cIEMX63xCjoruvxw5ig== X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Rl/0EqXNTUiXgtGLx9zLnEzXWRYiyodmHxNWu+iuFzivdQsSAxiaoDiP95r5zah5KAf7zPIuq72oDkgJ8l0CjmC7JkHeznCCqm4zknI+IA1zN0ArojdkzqZPgL7SXv9olvsZghHhVL9V/ofEQN4DW/TOW64CZh0KVSzbBoLaGB97o49PaLLblHiaTEuR9ga+mgUUb3AfZhQTkhJvyYG313KtY959mcnmvgmx3S6RG0RhzbdDKSln9dvKwcm1mn8y9dlpSuHItXNagwPHPIOXl3l1ziDWelWOzAjD9OwoX0+v9dNJz+PHWX4AwljAkW7RVzk7+oM/ttAaSl87K413iimOeHHgARLkGrMqnu4MBJz4kPRqwRVpJdhhejnorotJlH+hflZxHn9oIXuJSi+ICH8S/a1G8G0bU9/MtRCoVz+HG/8EiwShTsKZLQPsDu77Y1hrK46UQlTLd+5PLiHUgF9HIp+Fzlmsa6RLxQHRsFuBLlkS71X7G3Bsdmw+ETzY8NwPOsShjnC+MP0ag3wkwNnBUp441vsORDs2qw8nsNyZ9HZIOKFZRRZeKjbALuRd5fuF8lJW8kFLQTfmWsAnDApioUbBSs2bh73e0YvkxnFwFJhPYzT+UICNsS+dytkBNlumQCf00dgUTQb/vLqRmNY1JyOko57G+7BT3iG+ET/N3FgEHHT5SsLHFWe5EkUovP26BgY666Imri6hgLr0IA== X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-5c337.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 51255121-d6c2-4469-62c2-08d9acdb6480 X-MS-Exchange-CrossTenant-AuthSource: PU1PR01MB2155.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2021 10:40:53.5515 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PS2PR01MB2279 X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: * gnu/packages/engineering.scm (xfoil): New variable. --- Changes relative to PATCH v1: * Move libx11 from native-inputs to inputs. gnu/packages/engineering.scm | 98 ++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [40.92.255.28 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [40.92.255.28 listed in wl.mailspike.net] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (chuanwei.foo[at]hotmail.com) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.3 URI_DOTEDU Has .edu URI X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) * gnu/packages/engineering.scm (xfoil): New variable. --- Changes relative to PATCH v1: * Move libx11 from native-inputs to inputs. gnu/packages/engineering.scm | 98 ++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 50f265f085..fdbbf2edf7 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2021 Gerd Heber ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Ivan Gankevich +;;; Copyright © 2021 Foo Chuan Wei ;;; ;;; This file is part of GNU Guix. ;;; @@ -2847,6 +2848,103 @@ hot-patching the machine code of the standard C library in the memory of a process.") (license license:bsd-2)))) +(define-public xfoil + (package + (name "xfoil") + (version "6.99") + (source + (origin + (method url-fetch) + (uri (string-append "https://web.mit.edu/drela/Public/web/xfoil/xfoil" + version ".tgz")) + (sha256 + (base32 + "0h5y5v0qlyvi4qc943x394npz4779i8f52iksxshxkjj7xj500jw")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'edit-files + (lambda* (#:key outputs #:allow-other-keys) + ;; The instructions in orrs/README say that orrs/bin/osmap.f + ;; should be edited, but that file is never used by XFOIL. + ;; Instead, it is osrc/osmap.f that is used. + (substitute* "osrc/osmap.f" + (("^[ ]{6}DATA OSFILE / '/var/local/codes/orrs/osmap.dat' /") + (let ((replacement (string-append (make-string 6 #\space) + "DATA OSFILE / '" + (assoc-ref outputs "out") + "/share/xfoil/osmap.dat' /"))) + ;; In fixed form Fortran, lines cannot exceed 72 columns. + ;; The Guix store path exceeds this limit. + (string-append + (substring replacement 0 72) "\n" + (make-string 5 #\space) "&" (substring replacement 72))))) + (substitute* "orrs/bin/Makefile_DP" + (("^FC = ifort") + "FC = gfortran") + (("^FLG = -O -r8") + "FLG = -O2 -fdefault-real-8")) + (substitute* "plotlib/Makefile" + (("^include ./config.make") + "include ./config.make.gfortranDP")) + (substitute* "bin/Makefile_gfortran" + (("^BINDIR = /home/codes/bin/") + (string-append "BINDIR = " (assoc-ref outputs "out") "/bin")) + (("^CC = cc") + "CC = gcc") + (("^CFLAGS = -O -DUNDERSCORE") + "CFLAGS = -O2 -DUNDERSCORE") + (("^FFLAGS = -O \\$\\(CHK\\) \\$\\(DBL\\)") + "FFLAGS = -O2 $(CHK) $(DBL)") + (("^FFLOPT = -O \\$\\(CHK\\) \\$\\(DBL\\)") + "FFLOPT = -O2 $(CHK) $(DBL)") + ;; Separate the build stage from the install stage. + (("\\$\\(INSTALLCMD\\) xfoil \\$\\(BINDIR\\)") "") + (("\\$\\(INSTALLCMD\\) pxplot \\$\\(BINDIR\\)") "") + (("\\$\\(INSTALLCMD\\) pplot \\$\\(BINDIR\\)") "")))) + (replace 'build + (lambda _ + (invoke "make" "-C" "orrs/bin" "-f" "Makefile_DP" "osgen") + (with-directory-excursion "orrs" + (invoke "bin/osgen" "osmaps_ns.lst")) + (invoke "make" "-C" "plotlib") + (invoke "make" "-C" "bin" "-f" "Makefile_gfortran"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin-dir (string-append out "/bin")) + (data-dir (string-append out "/share/xfoil")) + (doc-dir (string-append out "/share/doc/xfoil"))) + (mkdir-p bin-dir) + (invoke "make" "-C" "bin" "-f" "Makefile_gfortran" "install") + (mkdir-p data-dir) + (install-file "orrs/osmap.dat" data-dir) + (mkdir-p doc-dir) + (install-file "xfoil_doc.txt" doc-dir))))) + #:tests? #f)) + (inputs + `(("libx11" ,libx11))) + (native-inputs + `(("gfortran" ,gfortran))) + (home-page "https://web.mit.edu/drela/Public/web/xfoil/") + (synopsis "Program for the design and analysis of subsonic airfoils") + (description + "XFOIL is an interactive program for the design and analysis of subsonic +isolated airfoils. It consists of a collection of menu-driven routines which +perform various useful functions such as: +@itemize +@item Viscous (or inviscid) analysis of an existing airfoil +@item Airfoil design and redesign by interactive modification of surface speed + distributions +@item Airfoil redesign by interactive modification of geometric parameters +@item Blending of airfoils +@item Writing and reading of airfoil coordinates and polar save files +@item Plotting of geometry, pressure distributions, and multiple polars +@end itemize") + (license license:gpl2+))) + (define-public libigl (package (name "libigl") base-commit: 9bfbba8af5b7efb952292c8b7d5e9ee57300c2bc -- 2.25.1 From unknown Tue Jun 17 01:43:40 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Foo Chuan Wei Subject: bug#51996: closed (Re: bug#51996: [PATCH] gnu: Add xfoil.) Message-ID: References: <87mtkxohtb.fsf_-_@gnu.org> X-Gnu-PR-Message: they-closed 51996 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 51996@debbugs.gnu.org Date: Sat, 18 Dec 2021 19:05:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1639854302-31256-1" This is a multi-part message in MIME format... ------------=_1639854302-31256-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #51996: [PATCH] gnu: Add xfoil. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 51996@debbugs.gnu.org. --=20 51996: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D51996 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1639854302-31256-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 51996-done) by debbugs.gnu.org; 18 Dec 2021 19:04:57 +0000 Received: from localhost ([127.0.0.1]:43844 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myf0r-00087p-0M for submit@debbugs.gnu.org; Sat, 18 Dec 2021 14:04:57 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60670) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myf0p-00087b-JO for 51996-done@debbugs.gnu.org; Sat, 18 Dec 2021 14:04:55 -0500 Received: from [2001:470:142:3::e] (port=36402 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myf0k-0003yM-CC; Sat, 18 Dec 2021 14:04:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=Skb8x85ddwP3pDnmNxXDsDJ+DGnPzL3Y8jv/6XqAxcM=; b=nuz9bYOe8j1Z7uUbgrTO uvbptVYcfjrTvg4VkvW9dH0uuwzRzlQq0Id+fursEWrdnPsJC9adsijv6O++r4jgMyfxHc76DkMAw R20x60ax6KFRYrUHDbyo3jsBlc/YFXYFpriW/kH1sdSFHUqGYN0j45PBS4RqsMAj/Bi0O0fPzmii1 3WaGZRUqx+Y/cnD6UXIlmkxSuZPIR4/sGpzi4GoW1uDKwmvVYbAfOC67aKs6NPLcQ6SD+ZIb9Iwzh iehdAKdieAs4e5nqHrnvB26ysk7gUtE9ryh+gkCl0PhAs/CYFP5RJmj6JSgMmFtwYzACHiiVdXpWZ kd8RXg1eQZQp3g==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:56032 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myf0k-0006oA-C3; Sat, 18 Dec 2021 14:04:50 -0500 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Foo Chuan Wei Subject: Re: bug#51996: [PATCH] gnu: Add xfoil. References: Date: Sat, 18 Dec 2021 20:04:48 +0100 In-Reply-To: (Foo Chuan Wei's message of "Sun, 21 Nov 2021 10:40:50 +0000") Message-ID: <87mtkxohtb.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 51996-done Cc: 51996-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Foo Chuan Wei skribis: > * gnu/packages/engineering.scm (xfoil): New variable. Applied with the changes below. Thanks! Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 42f5544a54..e0fe0f354f 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -2961,6 +2961,10 @@ (define-public xfoil (with-directory-excursion "orrs" (invoke "bin/osgen" "osmaps_ns.lst")) (invoke "make" "-C" "plotlib") + (substitute* "bin/Makefile_gfortran" + (("^FFLAGS =(.*)$" _ suffix) + (string-append "FFLAGS = -fallow-argument-mismatch " + suffix "\n"))) (invoke "make" "-C" "bin" "-f" "Makefile_gfortran"))) (replace 'install (lambda* (#:key outputs #:allow-other-keys) @@ -2976,9 +2980,9 @@ (define-public xfoil (install-file "xfoil_doc.txt" doc-dir))))) #:tests? #f)) (inputs - `(("libx11" ,libx11))) + (list libx11)) (native-inputs - `(("gfortran" ,gfortran))) + (list gfortran)) (home-page "https://web.mit.edu/drela/Public/web/xfoil/") (synopsis "Program for the design and analysis of subsonic airfoils") (description --=-=-=-- ------------=_1639854302-31256-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 20 Nov 2021 08:13:54 +0000 Received: from localhost ([127.0.0.1]:41578 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moLVL-00064M-5B for submit@debbugs.gnu.org; Sat, 20 Nov 2021 03:13:54 -0500 Received: from lists.gnu.org ([209.51.188.17]:32820) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1moLVH-00064D-Cs for submit@debbugs.gnu.org; Sat, 20 Nov 2021 03:13:45 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57112) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moLVH-00023b-8d for guix-patches@gnu.org; Sat, 20 Nov 2021 03:13:43 -0500 Received: from [2a01:111:f400:feab::80b] (port=53206 helo=APC01-SG2-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1moLVE-00086e-HV for guix-patches@gnu.org; Sat, 20 Nov 2021 03:13:43 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=igUxCs4Xbwcc8jOK+LarIH5zKH6YfDKeZD9GT7+ewe1YyXlVYfgq/pvWu8rz2/UpYIbS3/exBhhAG+9ZQP5yqWnuNpnnKiQKLY9CGC0fmZIBKLplXqflg3ZA7gUck1kuSC6jv3s4nc10lyDRahjB2yCVDlQn6zlyaSRz8/28/nglD3kiriGgW95HlltpSib3f173AFlxcIM9aW5aswviUwtJKz40tWb5mcghJ+ykIwA7Oq4KRv/1ilVNMRxKRhHvPmF3IBLUzgjfvVgj/XrQMhTIQkGQpEXP7BZGEA2MaauGMgLwwKA0YNyufuXXMXEeSAKY7USBhiL0nFYnXzZ61g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=OziheuPCKnyM5nlMw+I4U7XRfpmUrXGfjr2VhywGvnc=; b=DygwdqxqlIz8zJZB5GoVDXbvvhBTHhBSA5LLsy9dpZ6U9SzBVo2QsRUg7ZcjCVRW4SXlNV0v76SXkJH2DxrZyfYMkXYiT2iKbKpPIQAw7WFzsNItkLudajioTGmKthW+Z6WnZHZRZTCfC2Sz27yZ3SD+NjiU8uIyQfTsctDLPqL5oPNFiTOCvIoZe6zrB5XVYsbJaiwjOqEjcBkaPJGhTyJvKB/UDXPPdNloyaoxAdr9mZSTSsH2Z1yslntsV7KtFmIhcSsf7RGaIRLjZNRmNYY2TLmpULfrpdlg1JkuYI1JSuj1XucNZzj4UJak+aTgtL2cA1OcJC4BvH4kco7qZg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=OziheuPCKnyM5nlMw+I4U7XRfpmUrXGfjr2VhywGvnc=; b=uMeZ6w+c7fp5PV1OYqMLkuU6tWCcTEhpezhgWGiMIfZBRow3cqQLf1N+ys9jRj5o5/ZV1ctJxXF0vYhCGmBTCjRGCJKtM2SRpU0cBCDnH5C10K0Nj7hrTl3GzRtzdfASo7c4E95pXRLLwmf15b/szD+6TAzNrIsTbQmnoUTTrfGkQhsPa0roNO5G7VXZWKKI+kmpoqmfdZczStZmuCqudSrdDmkpNVtlC0njOjAb9nxkrnqUxdJRdMLTbh1Xh+BOBqzEFcXKH6roKjV3pozOJnQh0Fj2Fq9upSSMDEwV20tw7O244njBIA2lM0RPRknUf/PD25WfNMtEHdyVSu5gcQ== Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com (2603:1096:803:1c::21) by PSBPR01MB3766.apcprd01.prod.exchangelabs.com (2603:1096:301:e::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.21; Sat, 20 Nov 2021 08:08:30 +0000 Received: from PU1PR01MB2155.apcprd01.prod.exchangelabs.com ([fe80::258d:e124:fd3a:40ee]) by PU1PR01MB2155.apcprd01.prod.exchangelabs.com ([fe80::258d:e124:fd3a:40ee%7]) with mapi id 15.20.4713.024; Sat, 20 Nov 2021 08:08:28 +0000 Date: Sat, 20 Nov 2021 07:54:47 +0000 From: Foo Chuan Wei To: guix-patches@gnu.org Subject: [PATCH] gnu: Add xfoil. Message-ID: Mail-Followup-To: guix-patches@gnu.org Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit X-TMN: [xHFc66+k3pT5KI9wrbqnGj874C91jbQK] X-ClientProxiedBy: HK2PR04CA0059.apcprd04.prod.outlook.com (2603:1096:202:14::27) To PU1PR01MB2155.apcprd01.prod.exchangelabs.com (2603:1096:803:1c::21) X-Microsoft-Original-Message-ID: <20211120075447.2gowe5ln52mjwf5x@main> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from main (61.6.253.166) by HK2PR04CA0059.apcprd04.prod.outlook.com (2603:1096:202:14::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.19 via Frontend Transport; Sat, 20 Nov 2021 08:08:27 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 73b749db-f988-40d9-9082-08d9abfceec2 X-MS-TrafficTypeDiagnostic: PSBPR01MB3766: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SaENnN+RU3eblCwIaFvoWfnlFMxUwYrav8kDlC0bTfBUpikn4SE0c5ttEotDzHD0OqF152IE/ALYnJ3l0GIvCwSctxm68Z6jzi1mfVgOSyT8lkjvv30XrzAf4x/+KP103bkshW75wgYPRNPgl1AxZaQ2pb5riAFoP3v1BG3DAv5V91qawdEND46MgXX2g1CsnoW97v8hUT+nNKRY2ORV0iIi3epzEpzuJ9qpqp0QKyRet4+zHP7VYbocejKSXS95zjnhQ1vlHHLDtsNlIdNrmHJ5+Tqjl5LxqecvawUG0s6XRvn8D/q/mUxHFhEKrYDT+e3xPNURrVSZ4nzP+b1JPDeWmLmz4bywVSQNicTmA3lLY71hrXaAKuo+X5cQAOMHKTMsif6iTl0EtrhSqdWx+FgK3yVMJJc1xSsF4HgexPeM5y9Q+S7c9FxEHAhruQUAlXdXuG0txWjUp9G8Q6rGLGhFWSBer1Nn7Fq0v+2Z4zctd2rOLhf7/rSxd5G1gVMLr1A0susVr3p17Yo0JuCdXnVG5uPiG2Gj+vb9mM9vfh4I0XPJGen6yf8fL6ZPOA0uWaQGtFm7y/LnGCmcyx7mvnPUGwkNnpQScZF0E8+E7FLtT3kGxmFKbojmduuBjUuO9sBXZ1d1Swv71cd1Q8cE5rh2mwIqS4eS4S4M8vHcmJI= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: AQ7VQbpP5z/CgjyaILOz5XNPLsIXSQgtUnWfTS7C6v0oyaX7G+AcP0J+2FOePSEJCH7cXcNzV58t0QazZT0JXq794kipI6fogskIPi8GUAVECH/dV6q096GasXdHU9ntG39tqC49d+g5I+MnyeX8sDeHeb+Uq3jow5xAVF3ZYDbDmxhnbbEE7PiUX1B5fO+5H1cYa0fy49XCG1CPtXSGny1SvcQP5NeSwErLd53D7Jj4F6YjGret9REbETbInAHWYImBNGV1c77Z59ODVxBohAnfArzQJxume0YL0bxYjDBJdnMaJC4ZEU8sB4uT8hIloo6JgEgkewipZ3A3WLXkObCZx6/weXkQYF/2pCXYa9Gw+67xzDn/KPde6nzUBxi2bJBN6dD9YUUS1dJKph4CoJvpVBaWKDq8GioJ12JVkOij3rlVBTwClCYSzoGyivt3TVjF3SG1qBeFzKEtmnJ0v4pqgbJ52nvPWpNerVs9Fyvwj7C6z3asaDMjAJtkqFxvHeU6WTmyUjHjx8zUPeJ0H+8S7lAQlMKmExLCCEQ/pYw12r8oLdxjq9DGFZM1YM7jhOISz3UVmhN/pj5Efrt2O2Vq5FFzpX/jL8NEe165HCRi17OnL3CCqqAhhO7s1g1B6HVMFDoINdHzUeTs0sqa9h/1g/FB31KObBddf891vbUhPX1egxZnkVJpboBIuwpp X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-5c337.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 73b749db-f988-40d9-9082-08d9abfceec2 X-MS-Exchange-CrossTenant-AuthSource: PU1PR01MB2155.apcprd01.prod.exchangelabs.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Nov 2021 08:08:28.1569 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PSBPR01MB3766 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a01:111:f400:feab::80b (failed) Received-SPF: pass client-ip=2a01:111:f400:feab::80b; envelope-from=chuanwei.foo@hotmail.com; helo=APC01-SG2-obe.outbound.protection.outlook.com X-Spam_score_int: 7 X-Spam_score: 0.7 X-Spam_bar: / X-Spam_report: (0.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.001, RDNS_NONE=0.793, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URI_DOTEDU=1.997 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) * gnu/packages/engineering.scm (xfoil): New variable. --- gnu/packages/engineering.scm | 97 ++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index 50f265f085..d933dffe6e 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -25,6 +25,7 @@ ;;; Copyright © 2021 Gerd Heber ;;; Copyright © 2021 Guillaume Le Vaillant ;;; Copyright © 2021 Ivan Gankevich +;;; Copyright © 2021 Foo Chuan Wei ;;; ;;; This file is part of GNU Guix. ;;; @@ -2847,6 +2848,102 @@ hot-patching the machine code of the standard C library in the memory of a process.") (license license:bsd-2)))) +(define-public xfoil + (package + (name "xfoil") + (version "6.99") + (source + (origin + (method url-fetch) + (uri (string-append "https://web.mit.edu/drela/Public/web/xfoil/xfoil" + version ".tgz")) + (sha256 + (base32 + "0h5y5v0qlyvi4qc943x394npz4779i8f52iksxshxkjj7xj500jw")))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-after 'unpack 'edit-files + (lambda* (#:key outputs #:allow-other-keys) + ;; The instructions in orrs/README say that orrs/bin/osmap.f + ;; should be edited, but that file is never used by XFOIL. + ;; Instead, it is osrc/osmap.f that is used. + (substitute* "osrc/osmap.f" + (("^[ ]{6}DATA OSFILE / '/var/local/codes/orrs/osmap.dat' /") + (let ((replacement (string-append (make-string 6 #\space) + "DATA OSFILE / '" + (assoc-ref outputs "out") + "/share/xfoil/osmap.dat' /"))) + ;; In fixed form Fortran, lines cannot exceed 72 columns. + ;; The Guix store path exceeds this limit. + (string-append + (substring replacement 0 72) "\n" + (make-string 5 #\space) "&" (substring replacement 72))))) + (substitute* "orrs/bin/Makefile_DP" + (("^FC = ifort") + "FC = gfortran") + (("^FLG = -O -r8") + "FLG = -O2 -fdefault-real-8")) + (substitute* "plotlib/Makefile" + (("^include ./config.make") + "include ./config.make.gfortranDP")) + (substitute* "bin/Makefile_gfortran" + (("^BINDIR = /home/codes/bin/") + (string-append "BINDIR = " (assoc-ref outputs "out") "/bin")) + (("^CC = cc") + "CC = gcc") + (("^CFLAGS = -O -DUNDERSCORE") + "CFLAGS = -O2 -DUNDERSCORE") + (("^FFLAGS = -O \\$\\(CHK\\) \\$\\(DBL\\)") + "FFLAGS = -O2 $(CHK) $(DBL)") + (("^FFLOPT = -O \\$\\(CHK\\) \\$\\(DBL\\)") + "FFLOPT = -O2 $(CHK) $(DBL)") + ;; Separate the build stage from the install stage. + (("\\$\\(INSTALLCMD\\) xfoil \\$\\(BINDIR\\)") "") + (("\\$\\(INSTALLCMD\\) pxplot \\$\\(BINDIR\\)") "") + (("\\$\\(INSTALLCMD\\) pplot \\$\\(BINDIR\\)") "")))) + (replace 'build + (lambda _ + (invoke "make" "-C" "orrs/bin" "-f" "Makefile_DP" "osgen") + (with-directory-excursion "orrs" + (invoke "bin/osgen" "osmaps_ns.lst")) + (invoke "make" "-C" "plotlib") + (invoke "make" "-C" "bin" "-f" "Makefile_gfortran"))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin-dir (string-append out "/bin")) + (data-dir (string-append out "/share/xfoil")) + (doc-dir (string-append out "/share/doc/xfoil"))) + (mkdir-p bin-dir) + (invoke "make" "-C" "bin" "-f" "Makefile_gfortran" "install") + (mkdir-p data-dir) + (install-file "orrs/osmap.dat" data-dir) + (mkdir-p doc-dir) + (install-file "xfoil_doc.txt" doc-dir))))) + #:tests? #f)) + (native-inputs + `(("gfortran" ,gfortran) + ("libx11" ,libx11))) + (home-page "https://web.mit.edu/drela/Public/web/xfoil/") + (synopsis "Program for the design and analysis of subsonic airfoils") + (description + "XFOIL is an interactive program for the design and analysis of subsonic +isolated airfoils. It consists of a collection of menu-driven routines which +perform various useful functions such as: +@itemize +@item Viscous (or inviscid) analysis of an existing airfoil +@item Airfoil design and redesign by interactive modification of surface speed + distributions +@item Airfoil redesign by interactive modification of geometric parameters +@item Blending of airfoils +@item Writing and reading of airfoil coordinates and polar save files +@item Plotting of geometry, pressure distributions, and multiple polars +@end itemize") + (license license:gpl2+))) + (define-public libigl (package (name "libigl") base-commit: 70a88dac11d3cb47c1058ed65d3970fe27517c77 -- 2.25.1 ------------=_1639854302-31256-1--