Marc Espie [2017-11-09, 00:40:28]:
> On Wed, Nov 08, 2017 at 07:38:37PM +0100, Steven Mestdagh wrote:
> > hi,
> > 
> > As I mentioned previously, there is a quoting issue in libgfortran.la:
> > dependency_libs=' '/usr/local/lib'/libquadmath.la -lm'
> > should be:
> > dependency_libs='/usr/local/lib/libquadmath.la -lm'
> > 
> > We would need this to be correct to link with libgfortran via libtool.
> > This diff is a quick fix for libgfortran.la.  OK?
> > 
> > 
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
> > retrieving revision 1.51
> > diff -u -p -u -r1.51 Makefile
> > --- Makefile        21 Aug 2017 19:25:52 -0000      1.51
> > +++ Makefile        8 Nov 2017 18:36:06 -0000
> > @@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = ${GCC49_ARCHS}
> >  DPB_PROPERTIES = parallel
> >  
> >  V = 4.9.4
> > -REVISION = 6
> > +REVISION = 7
> >  FULL_VERSION = $V
> >  FULL_PKGVERSION = $V
> >  
> > @@ -247,6 +247,7 @@ post-install:
> >     chown -R ${SHAREOWN}:${SHAREGRP} ${PREFIX}/lib/gcc/*/$V/adalib
> >  .endif
> >  .if ${BUILD_PACKAGES:M-f95}
> > +   perl -pi -e "if (/^dependency_libs/) { 
> > s,'${TRUEPREFIX}/lib',${TRUEPREFIX}/lib,; }" ${PREFIX}/lib/libgfortran.la
> >     ln -sf ${TRUEPREFIX}/bin/egfortran ${PREFIX}/bin/gfortran
> >     ln -sf ${TRUEPREFIX}/bin/${CONFIG}-egfortran 
> > ${PREFIX}/bin/${CONFIG}-gfortran
> >  .endif
> 
> Can you have a look at a not so quick fix ? I mean such a bogus thing
> is generated from somewhere in the port.
> 

comparing to what the more recent gnu libtool port is doing, i suggest the
fix below.  this has the same effect of stripping the single quotes around
libdir's value for use in dependency_libs.

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/4.9/Makefile,v
retrieving revision 1.51
diff -u -p -u -r1.51 Makefile
--- Makefile    21 Aug 2017 19:25:52 -0000      1.51
+++ Makefile    10 Nov 2017 19:13:26 -0000
@@ -4,7 +4,7 @@ ONLY_FOR_ARCHS = ${GCC49_ARCHS}
 DPB_PROPERTIES = parallel
 
 V = 4.9.4
-REVISION = 6
+REVISION = 7
 FULL_VERSION = $V
 FULL_PKGVERSION = $V
 
Index: patches/patch-ltmain_sh
===================================================================
RCS file: patches/patch-ltmain_sh
diff -N patches/patch-ltmain_sh
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-ltmain_sh     10 Nov 2017 19:13:26 -0000
@@ -0,0 +1,14 @@
+$OpenBSD$
+
+Index: ltmain.sh
+--- ltmain.sh.orig
++++ ltmain.sh
+@@ -8268,7 +8268,7 @@ EOF
+             *.la)
+               func_basename "$deplib"
+               name="$func_basename_result"
+-              libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
++              eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+               test -z "$libdir" && \
+                 func_fatal_error "\`$deplib' is not a valid libtool archive"
+               newdependency_libs="$newdependency_libs $libdir/$name"

Reply via email to