Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

move linker flags from freetype-config/pkg-config up to the front to

match the placement of C flags.
  • Loading branch information...
commit a8395b428cc3caf4fab0867b359134adfe3a24d1 1 parent ed28c9c
Tony Cook authored

Showing 1 changed file with 11 additions and 4 deletions. Show diff stats Hide diff stats

  1. +11 4 Makefile.PL
15 Makefile.PL
@@ -111,18 +111,25 @@ if ($MANUAL) {
111 111 gifcheck();
112 112
113 113 my $lib_cflags = '';
  114 +my $lib_lflags = '';
114 115 my $F_LIBS = '';
115 116 my $F_OBJECT = '';
116 117 for my $frmkey (sort { $formats{$a}{order} <=> $formats{$b}{order} } keys %formats) {
117 118 my $frm = $formats{$frmkey};
118 119 push @defines, [ $frm->{def}, 1, "$frmkey available" ];
119   - $F_LIBS .= ' ' .$frm->{libfiles};
120 120 $F_OBJECT .= ' ' .$frm->{objfiles};
121 121 if ($frm->{cflags}) {
122 122 $lib_cflags .= ' ' .$frm->{cflags};
123 123 ++$definc{$_} for map { /^-I(.*)$/ ? ($1) : () }
124 124 grep /^-I./, split ' ', $frm->{cflags};
125 125 }
  126 + if ($frm->{lflags}) {
  127 + $lib_lflags .= ' ' . $frm->{lflags};
  128 + }
  129 + else {
  130 + $F_LIBS .= ' ' .$frm->{libfiles};
  131 + }
  132 +
126 133 }
127 134
128 135 unless ($noexif) {
@@ -156,7 +163,7 @@ $Recommends{Imager} =
156 163 my %opts=(
157 164 'NAME' => 'Imager',
158 165 'VERSION_FROM' => 'Imager.pm',
159   - 'LIBS' => "$LFLAGS -lm $OSLIBS $F_LIBS",
  166 + 'LIBS' => "$LFLAGS -lm $lib_lflags $OSLIBS $F_LIBS",
160 167 'DEFINE' => "$OSDEF $CFLAGS",
161 168 'INC' => "$lib_cflags $DFLAGS $F_INC",
162 169 'OBJECT' => join(' ', @objs, $F_OBJECT),
@@ -712,7 +719,7 @@ sub freetype2_probe {
712 719 map "-I$_", reverse @incdirs);
713 720 }
714 721 $frm->{cflags} = $cflags;
715   - $frm->{libfiles} = $lflags;
  722 + $frm->{lflags} = $lflags;
716 723
717 724 printf "%10s: configured via freetype-config\n", $frmkey;
718 725
@@ -743,7 +750,7 @@ sub png_probe {
743 750 chomp $cflags;
744 751 chomp $lflags;
745 752 $frm->{cflags} = $cflags;
746   - $frm->{libfiles} = $lflags;
  753 + $frm->{lflags} = $lflags;
747 754
748 755 printf "%10s: configured via `pkg-config $config ...`\n", $frmkey;
749 756

0 comments on commit a8395b4

Please sign in to comment.
Something went wrong with that request. Please try again.