Make ports using libtool treat elftoolchain's strip the same as GNU strip

Any strip on any FreeBSD version should be able to handle stripping requested
by libtool

PR:		198611
Reviewed by:	emaste
Exp-run:	self
This commit is contained in:
Antoine Brodin 2015-06-08 05:59:13 +00:00
parent 9d006776f5
commit f0d0f3d8e0
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=388831
14 changed files with 3 additions and 55 deletions

View file

@ -33,6 +33,7 @@ patch-libtool:
-e '/gcc_ver=\\`/s/gcc /$$CC /' \
-e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/' \
-e '/objformat=/s/echo aout/echo elf/' \
-e '/STRIP -V/s/"GNU strip"/"strip"/' \
-e "/freebsd-elf\\*)/,/;;/ { \
/deplibs_check_method=/s/=.*/=pass_all/; \
/library_names_spec=.*\\.so/ \

View file

@ -18,8 +18,4 @@ GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
USE_LDCONFIG= yes
post-patch:
@${REINPLACE_CMD} -e \
's|"GNU strip"|"strip"|' ${WRKSRC}/configure
.include <bsd.port.mk>

View file

@ -9,12 +9,3 @@
ac_ext=cpp
ac_cpp='$CXXCPP $CPPFLAGS'
ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -11215,7 +11215,7 @@ striplib=
old_striplib=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+if test -n "$STRIP" && $STRIP -V 2>&1 | $EGREP "GNU|elftoolchain" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5

View file

@ -1,13 +0,0 @@
--- configure.orig 2015-04-28 11:17:21 UTC
+++ configure
@@ -14090,8 +14090,8 @@ striplib=
old_striplib=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null ||
+ test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }

View file

@ -37,7 +37,6 @@ post-patch:
@${REINPLACE_CMD} -e \
'/optimization_flags/s|CXXFLAGS=|#CXXFLAGS=| ; \
/optimization_flags/s|CFLAGS=|#CFLAGS=| ; \
s|"GNU strip"|"strip"| ; \
s|el_GR|el| ; \
s|ja_JP|ja| ; \
s|no_NO|no| ; \

View file

@ -93,8 +93,7 @@ YELP_RUN_DEPENDS= yelp:${PORTSDIR}/x11/yelp
post-patch:
@${REINPLACE_CMD} -e \
's|"GNU strip"|"strip"| ; \
s|-Wl,--as-needed|| ; \
's|-Wl,--as-needed|| ; \
/^[[:blank:]]zlib/d ; \
/webkit2gtk/s|-4.0|-3.0|' ${WRKSRC}/configure

View file

@ -1,14 +1,5 @@
--- configure.orig
+++ configure
@@ -12199,7 +12199,7 @@
old_striplib=
{ $as_echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5
$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "strip" >/dev/null; then
test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
test -z "$striplib" && striplib="$STRIP --strip-unneeded"
{ $as_echo "$as_me:$LINENO: result: yes" >&5
@@ -18418,10 +18418,10 @@
if test x$FLTK_CONFIG != xno ; then
if test x$STATIC_FLTK != xtrue ; then

View file

@ -33,7 +33,6 @@ post-patch:
@${REINPLACE_CMD} -e \
'/optimization_flags/s|CXXFLAGS=|#CXXFLAGS=| ; \
/optimization_flags/s|CFLAGS=|#CFLAGS=| ; \
s|"GNU strip"|"strip"| ; \
/DATADIRNAME/s|lib|share| ; \
s|<tr1/|<| ; \
s|::tr1||' \

View file

@ -34,8 +34,6 @@ CPPFLAGS+= -D_GLIBCXX_USE_C99
.endif
post-patch:
@${REINPLACE_CMD} -e \
's|"GNU strip"|"strip"|' ${WRKSRC}/configure
@${REINPLACE_CMD} -e \
's|%%DATADIR%%|${DATADIR}|' ${WRKSRC}/src/yacasmain.cpp
# Can't use USES=shebangfix here, cause the path appears several

View file

@ -36,8 +36,4 @@ OPENGL_LIB_DEPENDS= libgtkglextmm-x11-1.2.so:${PORTSDIR}/x11-toolkits/gtkglextmm
OPENGL_USE= gl=glu
OPENGL_CONFIGURE_ENABLE=gl
post-patch:
@${REINPLACE_CMD} -e \
's|"GNU strip"|"strip"|' ${WRKSRC}/configure
.include <bsd.port.mk>

View file

@ -26,8 +26,7 @@ PORTSCOUT= skipv:1.0.x
post-patch:
@${REINPLACE_CMD} -e \
's|"GNU strip"|"strip"| ; \
s| -ansi||' ${WRKSRC}/configure
's| -ansi||' ${WRKSRC}/configure
@${FIND} ${WRKSRC} -name "Makefile.in" | ${XARGS} ${REINPLACE_CMD} -e \
's| -pedantic|| ; \
s| -pipe||'

View file

@ -25,10 +25,6 @@ PORTDOCS= AUTHORS ChangeLog README
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e 's,GREP "GNU strip",EGREP "GNU|elftoolchain",' \
${WRKSRC}/configure
post-install:
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}

View file

@ -48,8 +48,6 @@ UNIQUE_LIB_DEPENDS= libunique-1.0.so:${PORTSDIR}/x11-toolkits/unique
UNIQUE_CONFIGURE_WITH= unique
post-patch:
@${REINPLACE_CMD} -e \
's|"GNU strip"|"strip"|' ${WRKSRC}/configure
@${REINPLACE_CMD} -e \
's|thumbnailer \\|thumbnailer| ; \
s|devel-docs$$||' ${WRKSRC}/Makefile.in

View file

@ -27,8 +27,6 @@ CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
post-patch:
@${REINPLACE_CMD} -e 's,GREP "GNU strip",EGREP "GNU|elftoolchain",' \
${WRKSRC}/configure
@${REINPLACE_CMD} -e \
'/^install-data-am/s|:.*|:|' ${WRKSRC}/scripts/Makefile.in