Changeset 3937


Ignore:
Timestamp:
Nov 13, 2003, 3:17:55 PM (17 years ago)
Author:
fkr
Message:

Bug:
Submitted by:
Reviewed by:
Approved by:
Obtained from:

enable --with-dports-dir.
Attention: this changes the default behavior upon installation, since it will
configure $PREFIX/$portconfigdir/sources.conf (commonly /etc/ports/sources.conf)
If you don't re-install (and remove your old sources.conf prior to that), this won't affect you.
(and it should not, since you most likely have a already configured sources.conf).
By default, it will add the dports-tree from your checked out copy from which you install
to sources.conf.

Location:
trunk/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r3640 r3937  
    66# OD_PATH_DPORTSDIR(DEFAULT_DPORTSDIR)
    77#---------------------------------------
    8 # AC_DEFUN([OD_PATH_DPORTSDIR],[
    9 #       dnl For ease of reading, run after gcc has been found/configured
    10 #       AC_REQUIRE([AC_PROG_CC])
    11 
    12 #       AC_ARG_WITH(dports-dir, [AC_HELP_STRING([--with-dports-dir=DIR], [Specify alternate dports directory])], [ dportsdir="$withval" ] )
    13 
    14 
    15 #       AC_MSG_CHECKING([for dports tree])
    16        
    17 #       if test "x$dportsdir" != "x" ; then
    18 #         if test -d "$dportsdir" -a -e "$dportsdir/PortIndex" ; then
    19 #               :
    20 #         else
    21 #               AC_MSG_ERROR([$dportsdir not a valid dports tree])
    22 #         fi
    23 #       else
    24 #               dnl If the user didn't give a path, look for default
    25 #               if test "x$1" != "x" ; then
    26 #                 if test -d "$1" -a -e "$1/PortIndex" ; then
    27 #                       dportsdir=$1
    28 #                 fi
    29 #               fi
    30 #       fi
    31 
    32 #       if test "x$dportsdir" != "x" ; then
    33 #               AC_MSG_RESULT($dportsdir)
    34 #               DPORTSDIR="$dportsdir"
    35 #               AC_SUBST(DPORTSDIR)
    36 #       else
    37 #               AC_MSG_WARN([No dports tree found])
    38 #       fi
    39 
    40 #         ])
     8 AC_DEFUN([OD_PATH_DPORTSDIR],[
     9        dnl For ease of reading, run after gcc has been found/configured
     10        AC_REQUIRE([AC_PROG_CC])
     11
     12        AC_ARG_WITH(dports-dir, [AC_HELP_STRING([--with-dports-dir=DIR], [Specify alternate dports directory])], [ dportsdir="$withval" ] )
     13
     14
     15        AC_MSG_CHECKING([for dports tree])
     16        if test "x$dportsdir" != "x" ; then
     17          if test -d "$dportsdir" -a -e "$dportsdir/PortIndex" ; then
     18                :
     19          else
     20                AC_MSG_ERROR([$dportsdir not a valid dports tree])
     21          fi
     22        else
     23                dnl If the user didn't give a path, look for default
     24                if test "x$1" != "x" ; then
     25                  if test -d "$1" -a -e "$1/PortIndex" ; then
     26                        dportsdir=$1
     27                  fi
     28                fi
     29        fi
     30
     31        if test "x$dportsdir" != "x" ; then
     32                AC_MSG_RESULT($dportsdir)
     33                DPORTSDIR="$dportsdir"
     34                AC_SUBST(DPORTSDIR)
     35        else
     36                AC_MSG_WARN([No dports tree found])
     37        fi
     38
     39         ])
    4140
    4241
  • trunk/base/configure.ac

    r3676 r3937  
    1818OD_LIB_MD5
    1919
     20# set default dports-directory
     21DPORTS_DIR_DEFAULT=`pwd | sed -e "s/base/dports/"`
     22
    2023# Check for paths
    2124AC_PREFIX_DEFAULT(/opt/local)
     25OD_PATH_DPORTSDIR([$DPORTS_DIR_DEFAULT])
    2226OD_PATH_PORTCONFIGDIR([/etc/ports], [$prefix])
    2327
  • trunk/base/doc/Makefile

    r3751 r3937  
    2121                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 ports.conf ${DESTDIR}${portconfigdir}; \
    2222        fi
    23 
     23       
    2424        $(SILENT)if test ! -e ${DESTDIR}${portconfigdir}/sources.conf ; then \
    2525                set -x; \
    2626                $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 sources.conf ${DESTDIR}${portconfigdir}; \
     27                echo "file://${dportsdir}" >> ${DESTDIR}${portconfigdir}/sources.conf; \
    2728        fi
    2829        $(INSTALL) -o ${DSTUSR} -g ${DSTGRP} -m 644 prefix.mtree ${DESTDIR}${portconfigdir}
Note: See TracChangeset for help on using the changeset viewer.