From f909d121cec573433598c88083a7533c6ad2ffc5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lawrence=20Vel=C3=A1zquez?= <larryv@macports.org>
Date: Wed, 18 Mar 2015 15:17:07 -0400
Subject: [PATCH 5/6] lparse: Make configure respect CXXFLAGS and LDFLAGS
But maintain the default optimization level of -O3.
---
dports/science/lparse/Portfile | 3 +++
dports/science/lparse/files/respect-flags.patch | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 dports/science/lparse/files/respect-flags.patch
diff --git a/dports/science/lparse/Portfile b/dports/science/lparse/Portfile
index 39b5c64..0547ac1 100644
a
|
b
|
checksums rmd160 131f6ea6235eeb7529d2564bb9ce904e5bc2358a \ |
29 | 29 | sha256 886d29723f7188296e48584a4a32b8f111414acb7ca8490af28ef6b7f1717298 |
30 | 30 | |
31 | 31 | patchfiles fix-bison-version-detection.patch \ |
| 32 | respect-flags.patch \ |
32 | 33 | fix-recursive-make.patch \ |
33 | 34 | avoid-namespace-collisions.patch |
34 | 35 | |
| 36 | # Match default value from configure. |
| 37 | configure.optflags -O3 |
35 | 38 | # this configure argument is only used for installing |
36 | 39 | configure.pre_args --prefix=${destroot}${prefix}/bin |
37 | 40 | configure.args CC='${configure.cxx}' |
diff --git a/dports/science/lparse/files/respect-flags.patch b/dports/science/lparse/files/respect-flags.patch
new file mode 100644
index 0000000..232a4c5
-
|
+
|
|
| 1 | Yes, I'm setting the CFLAGS makefile variable to $CXXFLAGS. This build |
| 2 | system likes to pretend that it's using a C compiler, for some reason. |
| 3 | |
| 4 | Index: configure |
| 5 | =================================================================== |
| 6 | --- configure.orig |
| 7 | +++ configure |
| 8 | @@ -124,8 +124,8 @@ if ($debug_makefile) { |
| 9 | print OUT "CFLAGS=-g -Wall\n"; |
| 10 | print OUT "LDFLAGS=-g -Wall\n"; |
| 11 | } else { |
| 12 | - print OUT "CFLAGS=-O3\n"; |
| 13 | - print OUT "LDFLAGS=-O3\n"; |
| 14 | + print OUT "CFLAGS=$ENV{'CXXFLAGS'}\n"; |
| 15 | + print OUT "LDFLAGS=$ENV{'LDFLAGS'}\n"; |
| 16 | } |
| 17 | |
| 18 | close OUT; |