[64540] trunk/dports/editors/vim

raimue at macports.org raimue at macports.org
Mon Mar 8 06:31:45 PST 2010


Revision: 64540
          http://trac.macports.org/changeset/64540
Author:   raimue at macports.org
Date:     2010-03-08 06:31:43 -0800 (Mon, 08 Mar 2010)
Log Message:
-----------
editors/vim:
 * Patch the configure script adding a --with-developer-dir option
 * Ensure that autoconf update is only run once with use_autoconf
Fixes #20653

Modified Paths:
--------------
    trunk/dports/editors/vim/Portfile

Added Paths:
-----------
    trunk/dports/editors/vim/files/patch-developer-dir.diff

Modified: trunk/dports/editors/vim/Portfile
===================================================================
--- trunk/dports/editors/vim/Portfile	2010-03-08 13:54:08 UTC (rev 64539)
+++ trunk/dports/editors/vim/Portfile	2010-03-08 14:31:43 UTC (rev 64540)
@@ -6,7 +6,7 @@
 set vim_version     7.2
 set vim_patchlevel  350
 version             ${vim_version}.${vim_patchlevel}
-revision            3
+revision            5
 categories          editors
 maintainers         raimue
 description         Vi \"workalike\" with many additional features
@@ -46,13 +46,22 @@
                     port:libiconv \
                     port:ctags
 
+patchfiles          patch-developer-dir.diff
+
+# Regenerate configure script for patch-developer-dir.diff
+use_autoconf yes
+autoconf.cmd cd ${worksrcpath}/src && make autoconf
+# Overwriting autoconf.cmd removes dependency, add it again
+depends_build-append port:autoconf
+
 configure.args      --enable-gui=no \
                     --without-x \
                     --disable-gpm \
                     --disable-nls \
                     --mandir=${prefix}/share/man \
                     --with-tlib=ncurses \
-                    --enable-multibyte
+                    --enable-multibyte \
+                    --with-developer-dir=${developer_dir}
 
 extract.only        [suffix ${name}-${vim_version}]
 post-extract {
@@ -135,20 +144,14 @@
     patchfiles-append       patch-python.diff
     depends_lib-append      port:python25
 
-    depends_build-append    bin:autoconf:autoconf
-    pre-configure {
-        system "cd ${worksrcpath}/src && make autoconf"
-    }
+    use_autoconf yes
 }
 variant python26 conflicts python25 description {Enable Python scripting} {
     configure.args-append   --enable-pythoninterp --with-python=${prefix}/bin/python2.6
     patchfiles-append       patch-python.diff
     depends_lib-append      port:python26
 
-    depends_build-append    bin:autoconf:autoconf
-    pre-configure {
-        system "cd ${worksrcpath}/src && make autoconf"
-    }
+    use_autoconf yes
 }
 variant ruby description {Enable Ruby scripting} {
     configure.args-append   --enable-rubyinterp

Added: trunk/dports/editors/vim/files/patch-developer-dir.diff
===================================================================
--- trunk/dports/editors/vim/files/patch-developer-dir.diff	                        (rev 0)
+++ trunk/dports/editors/vim/files/patch-developer-dir.diff	2010-03-08 14:31:43 UTC (rev 64540)
@@ -0,0 +1,55 @@
+--- src/configure.in.orig	2010-03-08 14:54:51.000000000 +0100
++++ src/configure.in	2010-03-08 14:59:40.000000000 +0100
+@@ -116,6 +116,22 @@
+ 	MACARCH="$withval"; AC_MSG_RESULT($MACARCH),
+ 	MACARCH="current"; AC_MSG_RESULT(defaulting to $MACARCH))
+ 
++  AC_MSG_CHECKING(--with-developer-dir argument)
++  AC_ARG_WITH(developer-dir, [  --with-developer-dir=PATH    use PATH as location for Xcode developer tools],
++	DEVELOPER_DIR="$withval"; AC_MSG_RESULT($DEVELOPER_DIR),
++        DEVELOPER_DIR=""; AC_MSG_RESULT(not present))
++  
++  if test "x$DEVELOPER_DIR" = "x"; then
++    AC_PATH_PROG(XCODE_SELECT, xcode-select)
++    if test "x$XCODE_SELECT" != "x"; then
++      AC_MSG_CHECKING(for developer dir using xcode-select)
++      DEVELOPER_DIR=`$XCODE_SELECT -print-path`
++      AC_MSG_RESULT([$DEVELOPER_DIR])
++    else
++      DEVELOPER_DIR=/Developer
++    fi
++  fi
++
+   if test "x$MACARCH" = "xboth"; then
+     AC_MSG_CHECKING(for 10.4 universal SDK)
+     dnl There is a terrible inconsistency (but we appear to get away with it):
+@@ -127,7 +143,7 @@
+     save_cppflags="$CPPFLAGS"
+     save_cflags="$CFLAGS"
+     save_ldflags="$LDFLAGS"
+-    CFLAGS="$CFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
++    CFLAGS="$CFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
+     AC_TRY_LINK([ ], [ ],
+ 	AC_MSG_RESULT(found, will make universal binary),
+ 
+@@ -157,9 +173,9 @@
+     dnl TODO: use -arch i386 on Intel machines
+     CPPFLAGS="$CPPFLAGS -DMACOS_X_UNIX -no-cpp-precomp"
+     if test "x$MACARCH" = "xboth"; then
+-      CPPFLAGS="$CPPFLAGS -I/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
++      CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon"
+     else
+-      CPPFLAGS="$CPPFLAGS -I/Developer/Headers/FlatCarbon"
++      CPPFLAGS="$CPPFLAGS -I$DEVELOPER_DIR/Headers/FlatCarbon"
+     fi
+ 
+     dnl If Carbon is found, assume we don't want X11
+@@ -3221,7 +3237,7 @@
+   fi
+ fi
+ if test "x$MACARCH" = "xboth"; then
+-  LDFLAGS="$LDFLAGS -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
++  LDFLAGS="$LDFLAGS -isysroot $DEVELOPER_DIR/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc"
+ fi
+ 
+ dnl gcc 3.1 changed the meaning of -MM.  The only solution appears to be to
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20100308/dc8fac7a/attachment-0001.html>


More information about the macports-changes mailing list