void-packages/srcpkgs/eboard/patches/configure.patch

58 lines
1.1 KiB
Diff
Raw Normal View History

2017-01-05 22:23:16 +01:00
--- configure.orig 2017-01-05 01:07:49.029440284 +0100
+++ configure 2017-01-08 19:42:47.704475698 +0100
@@ -7,7 +7,7 @@
my $version = "1.1.1";
my $cxx = "g++";
my @cxxflags = ("-O6");
-my @ldflags = ("-lpthread");
+my @ldflags = ("-ldl", "-lpthread");
my @libs = ();
my $configh = "config.h";
my $configmake = "config.make";
@@ -16,6 +16,7 @@
my $manprefix = '';
#my $dgt = 1;
+
# ------------
sub usage;
@@ -640,7 +641,20 @@
# print CONFIGH "#define WITH_DGT_BOARD 1\n";
# }
#}
+ #
+@envcxxflags = split(/ /, $ENV{CXXFLAGS});
+for (@envcxxflags) {
+ if ($_ ne "") {
+ push @cxxflags, "$_";
+}
+}
+@envldflags = split(/ /, $ENV{LDFLAGS});
+for (@envldflags) {
+ if ($_ ne "") {
+ push @ldflags, "$_";
+}
+}
# end
@@ -649,7 +663,7 @@
}
if ($manprefix eq '') {
- $manprefix = "$prefix/man";
+ $manprefix = "$prefix/share/man";
}
print CONFIGH "#define DATADIR \"$dataprefix\"\n";
@@ -666,7 +680,6 @@
close CONFIGH;
print "wrote $configh\n";
-print CONFIGMAKE "CXX = $cxx\n";
print CONFIGMAKE "CXXFLAGS = @cxxflags\n";
print CONFIGMAKE "LDFLAGS = @ldflags\n";