Ticket #47196: 0005-lparse-Make-configure-respect-CXXFLAGS-and-LDFLAGS.patch

File 0005-lparse-Make-configure-respect-CXXFLAGS-and-LDFLAGS.patch, 2.1 KB (added by larryv (Lawrence Velázquez), 10 years ago)

Make configure respect CXXFLAGS and LDFLAGS

  • dports/science/lparse/Portfile

    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 \ 
    2929                    sha256  886d29723f7188296e48584a4a32b8f111414acb7ca8490af28ef6b7f1717298
    3030
    3131patchfiles          fix-bison-version-detection.patch \
     32                    respect-flags.patch \
    3233                    fix-recursive-make.patch \
    3334                    avoid-namespace-collisions.patch
    3435
     36# Match default value from configure.
     37configure.optflags  -O3
    3538# this configure argument is only used for installing
    3639configure.pre_args  --prefix=${destroot}${prefix}/bin
    3740configure.args      CC='${configure.cxx}'
  • new file dports/science/lparse/files/respect-flags.patch

    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
    - +  
     1Yes, I'm setting the CFLAGS makefile variable to $CXXFLAGS. This build
     2system likes to pretend that it's using a C compiler, for some reason.
     3
     4Index: 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;