[Midnightbsd-cvs] mports [15954] trunk/Mk: add libtool extension

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Fri Feb 28 20:00:57 EST 2014


Revision: 15954
          http://svnweb.midnightbsd.org/mports/?rev=15954
Author:   laffer1
Date:     2014-02-28 20:00:56 -0500 (Fri, 28 Feb 2014)
Log Message:
-----------
add libtool extension

Modified Paths:
--------------
    trunk/Mk/bsd.mport.mk

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

Modified: trunk/Mk/bsd.mport.mk
===================================================================
--- trunk/Mk/bsd.mport.mk	2014-03-01 00:57:10 UTC (rev 15953)
+++ trunk/Mk/bsd.mport.mk	2014-03-01 01:00:56 UTC (rev 15954)
@@ -338,7 +338,7 @@
 		gcc fmake fpc gmake bison local perl5 openssl \
 		apache autotools bdb cmake display efl emacs fuse \
 		gecko gettext gnome gnustep gstreamer iconv imake \
-		kde4 ldap lua mysql ncurses ocaml openal \
+		kde4 ldap libtool lua mysql ncurses ocaml openal \
 		pgsql php python java qt ruby scons sdl sqlite tcl wx xfce
 
 .for EXT in ${_ALL_EXT:U} 

Added: trunk/Mk/extensions/libtool.mk
===================================================================
--- trunk/Mk/extensions/libtool.mk	                        (rev 0)
+++ trunk/Mk/extensions/libtool.mk	2014-03-01 01:00:56 UTC (rev 15954)
@@ -0,0 +1,49 @@
+# $MidnightBSD$
+#
+# Bring libtool scripts up to date.
+#
+# Feature:	libtool
+# Usage:	USES=libtool
+
+.if !defined(_INCLUDE_USES_LIBTOOL_MK)
+_INCLUDE_USES_LIBTOOL_MK=	yes
+_USES_POST+=	libtool
+libtool_ARGS?=
+.endif
+
+.if defined(_POSTMKINCLUDED) && !defined(_INCLUDE_USES_LIBTOOL_POST_MK)
+_INCLUDE_USES_LIBTOOL_POST_MK=	yes
+
+patch-libtool:
+	@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \)	\
+		-type f | ${XARGS} ${REINPLACE_CMD}			\
+		-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/; }"	
+
+.if ! ${libtool_ARGS:Moldver}
+	@${FIND} ${WRKDIR} \( -name configure -or -name ltconfig \)	\
+		-type f | ${XARGS} ${REINPLACE_CMD}			\
+		-e "/freebsd-elf\\*)/,/;;/ {				\
+		    /library_names_spec=.*\\.so/			\
+		    s/=.*/='\$$libname\$$release.so\$$versuffix		\
+			\$$libname\$$release.so\$$major \$$libname.so'	\
+		    soname_spec='\$$libname\$$release.so\$$major'/;	\
+		    /library_names_spec=.*shared_ext/			\
+		    s/=.*/='\$$libname\$$release\$$shared_ext\$$versuffix \
+			\$$libname\$$release\$$shared_ext\$$major	\
+			\$$libname\$$shared_ext'			\
+		    soname_spec='\$$libname\$$release\$$shared_ext\$$major'/; }"
+
+	@${FIND} ${WRKDIR} -type f -name ltmain.sh |			\
+		${XARGS} ${REINPLACE_CMD}				\
+		-e '/case $$version_type in/,+2				\
+		    s/darwin|linux|/darwin|freebsd-elf|linux|/'		\
+		-e '/freebsd-elf)/,+2 {					\
+		    /major=/s/=.*/=.$$(($$current - $$age))/;		\
+		    /versuffix=/s/=.*/="$$major.$$age.$$revision"/; }'
+.endif
+
+.endif



More information about the Midnightbsd-cvs mailing list