[Midnightbsd-cvs] mports [16448] trunk/Mk/extensions/libtool.mk: deal with la files

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Thu Aug 7 07:29:50 EDT 2014


Revision: 16448
          http://svnweb.midnightbsd.org/mports/?rev=16448
Author:   laffer1
Date:     2014-08-07 07:29:49 -0400 (Thu, 07 Aug 2014)
Log Message:
-----------
deal with la files

Modified Paths:
--------------
    trunk/Mk/extensions/libtool.mk

Modified: trunk/Mk/extensions/libtool.mk
===================================================================
--- trunk/Mk/extensions/libtool.mk	2014-08-06 02:07:30 UTC (rev 16447)
+++ trunk/Mk/extensions/libtool.mk	2014-08-07 11:29:49 UTC (rev 16448)
@@ -3,7 +3,15 @@
 # Bring libtool scripts up to date.
 #
 # Feature:	libtool
-# Usage:	USES=libtool
+# Usage:	USES=libtool or USES=libtool:args
+# Valid args:	keepla	Normally libtool libraries (*.la) are not installed.
+#			With this option they are.  This is needed as long
+#			as there are dependent ports with .la libraries that
+#			refer to .la libraries in this port.  As soon as all
+#			those dependent ports have some form of USES=libtool
+#			keepla can be removed.
+#
+# MAINTAINER:	ports at MidnightBSD.org
 
 .if !defined(_INCLUDE_USES_LIBTOOL_MK)
 _INCLUDE_USES_LIBTOOL_MK=	yes
@@ -17,12 +25,20 @@
 patch-libtool:
 	@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \)	\
 		-type f | ${XARGS} ${REINPLACE_CMD}			\
+		-e '/dragonfly\*/!s/^ *freebsd\*[ )]/dragonfly* | &/'	\
+		-e '/gcc_dir=\\`/s/gcc /$$CC /'				\
+		-e '/gcc_ver=\\`/s/gcc /$$CC /'				\
 		-e '/link_all_deplibs[0-9A-Z_]*=/s/=unknown/=no/'	\
-		-e 's,freebsd\*),freebsd\*|dragonfly\*),g'		\
 		-e '/objformat=/s/echo aout/echo elf/'			\
 		-e "/freebsd-elf\\*)/,/;;/ {				\
 		    /deplibs_check_method=/s/=.*/=pass_all/; }"	
 
+	@${FIND} ${WRKDIR} -type f -name ltmain.sh |			\
+		${XARGS} ${REINPLACE_CMD}				\
+		-e '/if.*linkmode.*prog.*mode.*!= relink/s/if.*;/if :;/'\
+		-e '/if.*linkmode.*prog.*mode.* = relink/s/||.*;/;/'	\
+		-e 's/|-p|-pg|/|-B*|-p|-pg|/'
+
 .if ! ${libtool_ARGS:Moldver}
 	@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \)	\
 		-type f | ${XARGS} ${REINPLACE_CMD}			\
@@ -46,4 +62,13 @@
 		    /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }'
 .endif
 
+patch-lafiles:
+.if ${libtool_ARGS} == keepla || ${libtool_ARGS} == oldver
+	@${FIND} ${FAKE_DESTDIR} -type f -name '*.la' |			\
+		${XARGS} ${SED} -i '' -e "/dependency_libs=/s/=.*/=''/"
+.else
+	@${FIND} ${FAKE_DESTDIR} -type f -name '*.la' |			\
+		${XARGS} ${GREP} -l 'libtool library' | ${XARGS} ${RM}
 .endif
+
+.endif



More information about the Midnightbsd-cvs mailing list