diff options
author | Tijl Coosemans <tijl@FreeBSD.org> | 2014-05-19 13:40:12 +0000 |
---|---|---|
committer | Tijl Coosemans <tijl@FreeBSD.org> | 2014-05-19 13:40:12 +0000 |
commit | d40d27aa648b358e3ff1d132b3924486625f0b3a (patch) | |
tree | f8decfe1ab9af2ba88c4f26d8a2650331055f807 /editors/abiword | |
parent | 6b99b03a8e9781762ff1d805090ec1dfaf4c595e (diff) | |
download | freebsd-ports-d40d27aa648b358e3ff1d132b3924486625f0b3a.zip |
Add some substitutions to ensure that plugins are linked with libabiword
from the work or stage directory instead of a previously installed library.
In pseudo code:
s,PLUGIN_LIBS="$PLUGIN_LIBS -Lsrc -labiword",
PLUGIN_LIBS="src/libabiword.la $PLUGIN_LIBS",
s,foo_LIBS="$foo_LIBS $PLUGIN_LIBS",
foo_LIBS="$PLUGIN_LIBS $foo_LIBS",
The initial value of PLUGIN_LIBS may contain -L/usr/local/lib so it would
have to come after -Lsrc, but -Lsrc is not correct when libtool relinks
plugins during staging so use src/libabiword.la and let libtool figure out
what flags are needed. Secondly, switch around foo_LIBS and PLUGIN_LIBS
because foo_LIBS may contain -L/usr/local/lib.
Diffstat (limited to 'editors/abiword')
-rw-r--r-- | editors/abiword/Makefile | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/editors/abiword/Makefile b/editors/abiword/Makefile index 574396b0d389..8e26a7569cde 100644 --- a/editors/abiword/Makefile +++ b/editors/abiword/Makefile @@ -183,6 +183,21 @@ post-patch: @${REINPLACE_CMD} -e 's|glib/.*\.h>|glib.h>|g' \ ${WRKSRC}/goffice-bits/goffice/app/goffice-app.h \ ${WRKSRC}/src/af/util/xp/ut_go_file.h - @${REINPLACE_CMD} -e 's|" == "|" = "|g' ${WRKSRC}/configure +# The following substitutions ensure that plugins are linked with libabiword +# from the work or stage directory instead of a previously installed library. +# In pseudo code: +# s,PLUGIN_LIBS="$PLUGIN_LIBS -Lsrc -labiword", +# PLUGIN_LIBS="src/libabiword.la $PLUGIN_LIBS", +# s,foo_LIBS="$foo_LIBS $PLUGIN_LIBS", +# foo_LIBS="$PLUGIN_LIBS $foo_LIBS", +# The initial value of PLUGIN_LIBS may contain -L/usr/local/lib so it would +# have to come after -Lsrc, but -Lsrc is not correct when libtool relinks +# plugins during staging so use src/libabiword.la and let libtool figure out +# what flags are needed. Secondly, switch around foo_LIBS and PLUGIN_LIBS +# because foo_LIBS may contain -L/usr/local/lib. + @${REINPLACE_CMD} \ + -e "s,\$$PLUGIN_LIBS \"'-L\$${top_builddir}/src'\" -labiword-\$$ABIWORD_SERIES,\\\\\$${top_builddir}/src/libabiword-\$$ABIWORD_SERIES.la \$$PLUGIN_LIBS," \ + -e "/_LIBS=/s,\"\\(.*\\)\"\\('\$${PLUGIN_LIBS}.*'\\),\\2\" \\1\"," \ + -e 's|" == "|" = "|g' ${WRKSRC}/configure .include <bsd.port.mk> |