From owner-freebsd-ports@FreeBSD.ORG Tue Sep 12 14:42:51 2006 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3EE5E16A403; Tue, 12 Sep 2006 14:42:51 +0000 (UTC) (envelope-from rea@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2BADF43D4C; Tue, 12 Sep 2006 14:42:49 +0000 (GMT) (envelope-from rea@codelabs.ru) DomainKey-Signature: a=rsa-sha1; q=dns; c=simple; s=one; d=codelabs.ru; h=Received:Date:From:To:Cc:Message-ID:MIME-Version:Content-Type:Content-Disposition:Sender:X-Spam-Status:Subject; b=ADLZV0o55T2etUktCkT7MPYR66+g9vgFw1p6G57XNnXNrKTrycNcDihNgKnpCjWoum2ltJBWf4htYJtv3pqykuzKGFeXRg9gTlC+go1zueqKTiNwvWHh+aRJyTkwHmGYY8ihR4X3VJFGASeQutgB0jfVsmIxCObTPtXpF1ZgRM8=; Received: from codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by pobox.codelabs.ru with esmtpsa (TLSv1:AES256-SHA:256) id 1GN9TE-000Czj-Sa (envelope-from ); Tue, 12 Sep 2006 18:42:42 +0400 Date: Tue, 12 Sep 2006 18:42:35 +0400 From: Eygene Ryabinkin To: ports@freebsd.org Message-ID: <20060912144235.GE1221@codelabs.ru> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="UFHRwCdBEJvubb2X" Content-Disposition: inline Sender: rea@codelabs.ru X-Spam-Status: No, score=-3.5 required=4.0 tests=ALL_TRUSTED,AWL,BAYES_00, DK_POLICY_SIGNALL Cc: glewis@FreeBSD.org Subject: Modified patchfile for archivers/rpm4 to understand python 2.4 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Sep 2006 14:42:51 -0000 --UFHRwCdBEJvubb2X Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Good day! I've modified files/patch-configure to take into account the existence of python 2.4. Port correctly builds on the 6.1-STABLE and produces no warning during deinstallation even if it was compiled with WITH_PYTHON knob. Without the patch and with python-2.4 in the system port was not recognizing such new version of python and did not build python bindings. -- Eygene --UFHRwCdBEJvubb2X Content-Type: text/plain; charset=koi8-r Content-Disposition: attachment; filename=patch-configure --- configure.orig Thu Feb 14 02:03:27 2002 +++ configure Tue Sep 12 10:54:53 2006 @@ -186,6 +186,8 @@ ac_help="$ac_help --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib" ac_help="$ac_help + --with-popt-prefix=DIR search for popt in DIR/include and DIR/lib" +ac_help="$ac_help --disable-nls do not use Native Language Support" ac_help="$ac_help --with-included-gettext use the GNU gettext library included here" @@ -7381,6 +7383,8 @@ # AC_DEFINE(HAVE_GZSEEK) #fi +WITH_POPT_INCLUDE=$ac_default_prefix/include +WITH_POPT_LIB=-L$ac_default_prefix/lib -lpopt @@ -8335,6 +8339,47 @@ DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb" else echo "$ac_t""no" 1>&6 +echo $ac_n "checking for db_create in -ldb3""... $ac_c" 1>&6 +echo "configure:8188: checking for db_create in -ldb3" >&5 +ac_lib_var=`echo db3'_'db_create | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-ldb3 $libthread $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + DBLIBSRCS="$DBLIBSRCS db3.c"; libdb3="-ldb3" +else + echo "$ac_t""no" 1>&6 +fi + + fi @@ -8659,6 +8704,100 @@ fi +# Check whether --with-popt-prefix or --without-popt-prefix was given. +if test "${with_popt_prefix+set}" = set; then + withval="$with_popt_prefix" + + for dir in `echo "$withval" | tr : ' '`; do + if test -d $dir/include; then + CPPFLAGS="$CPPFLAGS -I$dir/include"; + WITH_POPT_INCLUDE="-I$dir/include"; + fi + if test -d $dir/lib; then + LDFLAGS="$LDFLAGS -L$dir/lib"; + WITH_POPT_LIB="-L$dir/lib -lpopt"; + fi + done +fi + +echo $ac_n "checking for popt.h""... $ac_c" 1>&6 +echo "configure:8724: checking for popt.h" >&5 +ac_lib_var=`echo popt'_'h | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="${WITH_POPT_INCLUDE} $CPPFLAGS" +cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + +int main() { +return 0; } +EOF +if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +CPPFLAGS="$ac_save_CPPFLAGS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + echo "configure: error: sorry rpm requires popt.h" 1>&2; exit 1; +fi + +echo $ac_n "checking for poptGetOptArg in -lpopt""... $ac_c" 1>&6 +echo "configure:8724: checking for poptGetOptArg in -lpopt" >&5 +ac_lib_var=`echo popt'_'poptGetOptArg | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="${WITH_POPT_LIB} $LIBS" +cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ + +int main() { +const char *foo = poptGetNextOpt(NULL); +return 0; } +EOF +if { (eval echo configure:8505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 + echo "configure: error: sorry rpm requires libpopt" 1>&2; exit 1; +fi for ac_func in personality @@ -12512,6 +12651,68 @@ WITH_PYTHON_VERSION= if test $withval = auto ; then + echo $ac_n "checking for python 2.4""... $ac_c" 1>&6 +echo "configure:12517: checking for python 2.4" >&5 + if test "$cross_compiling" = yes; then + withval=yes +else + cat > conftest.$ac_ext < +main() { + exit(strncmp("2.4", PY_VERSION, 3)); +} +EOF +if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + withval=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + withval=no +fi +rm -fr conftest* +fi + + echo "$ac_t""$withval" 1>&6 + if test $withval = yes ; then + WITH_PYTHON_VERSION="2.4" + else + + echo $ac_n "checking for python 2.3""... $ac_c" 1>&6 +echo "configure:12517: checking for python 2.3" >&5 + if test "$cross_compiling" = yes; then + withval=yes +else + cat > conftest.$ac_ext < +main() { + exit(strncmp("2.3", PY_VERSION, 3)); +} +EOF +if { (eval echo configure:12530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +then + withval=yes +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + withval=no +fi +rm -fr conftest* +fi + + echo "$ac_t""$withval" 1>&6 + if test $withval = yes ; then + WITH_PYTHON_VERSION="2.3" + else + echo $ac_n "checking for python 2.2""... $ac_c" 1>&6 echo "configure:12517: checking for python 2.2" >&5 if test "$cross_compiling" = yes; then @@ -12577,6 +12778,10 @@ fi +fi + +fi + if test -n "$WITH_PYTHON_VERSION" ; then WITH_PYTHON_SUBDIR=python WITH_PYTHON_SUBPACKAGE=1 @@ -13130,21 +13335,7 @@ echo "$ac_t""$ROOT_GROUP" 1>&6 - -if test "x$varprefix" = "x"; then - # For /usr and /usr/local, we want the 'var' directory to go - # in /var and /var/local respectively. For everything else, - # just put the 'var' directory in prefix/var. - case $prefix in - /usr | /usr/local ) - varprefix=`echo $prefix | sed 's/usr/var/'` ;; - NONE) - varprefix=`echo $ac_default_prefix | sed 's/usr/var/'` ;; - *) - varprefix=$prefix/var ;; - esac -fi - +varprefix=/var if test "x$tmpdir" = "x"; then if test -d $varprefix/tmp; then @@ -13349,7 +13540,7 @@ -subdirs="popt beecrypt zlib $WITH_DB_SUBDIR" +subdirs="beecrypt $WITH_DB_SUBDIR" trap '' 1 2 15 @@ -13578,6 +13769,8 @@ s%@WITH_ZLIB_SUBDIR@%$WITH_ZLIB_SUBDIR%g s%@WITH_ZLIB_INCLUDE@%$WITH_ZLIB_INCLUDE%g s%@WITH_ZLIB_LIB@%$WITH_ZLIB_LIB%g +s%@WITH_POPT_INCLUDE@%$WITH_POPT_INCLUDE%g +s%@WITH_POPT_LIB@%$WITH_POPT_LIB%g s%@WITH_DB_SUBDIR@%$WITH_DB_SUBDIR%g s%@WITH_INTERNAL_DB@%$WITH_INTERNAL_DB%g s%@DBLIBSRCS@%$DBLIBSRCS%g @@ -13889,7 +14082,6 @@ ;; esac done - echo timestamp > popt/stamp-h.in echo timestamp > beecrypt/stamp-h.in echo timestamp > stamp-h.in @@ -13925,7 +14117,7 @@ esac done - for ac_config_dir in popt beecrypt zlib $WITH_DB_SUBDIR; do + for ac_config_dir in beecrypt $WITH_DB_SUBDIR; do # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. --UFHRwCdBEJvubb2X--