[139298] branches/gsoc15-dependency/base

ijackson at macports.org ijackson at macports.org
Tue Aug 11 07:50:31 PDT 2015


Revision: 139298
          https://trac.macports.org/changeset/139298
Author:   ijackson at macports.org
Date:     2015-08-11 07:50:31 -0700 (Tue, 11 Aug 2015)
Log Message:
-----------
Add libsolv tarball to MacPorts' codebase under vendor/

Convert libsolv build from cmake to autoconf and add generated
tarball under vendor/. Update configure and vendor/Makefile
to build and install libsolv library. Users will not have to
externally build and install libsolv. It will be handled by
the MacPorts autoconf.

Modified Paths:
--------------
    branches/gsoc15-dependency/base/configure
    branches/gsoc15-dependency/base/configure.ac
    branches/gsoc15-dependency/base/vendor/Makefile.in

Added Paths:
-----------
    branches/gsoc15-dependency/base/vendor/libsolv.tar.gz

Modified: branches/gsoc15-dependency/base/configure
===================================================================
--- branches/gsoc15-dependency/base/configure	2015-08-11 14:27:36 UTC (rev 139297)
+++ branches/gsoc15-dependency/base/configure	2015-08-11 14:50:31 UTC (rev 139298)
@@ -643,6 +643,8 @@
 TCL_SRC_DIR
 TCL_BIN_DIR
 TCL_VERSION
+VENDOR_LIBSOLV_INSTALL
+VENDOR_LIBSOLV_SUBDIR
 VENDOR_TCLLIB_INSTALL
 VENDOR_TCLLIB_SUBDIR
 VENDOR_TCLX_INSTALL
@@ -11295,6 +11297,419 @@
 
 
 
+## Libsolv package
+#  Libsolv is required to support libsolv SAT Solver for
+#  dependency calculation.
+
+			# Extract the first word of "gzip", so it can be a program name with args.
+set dummy gzip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_GZIP_BIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GZIP_BIN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GZIP_BIN="$GZIP_BIN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GZIP_BIN="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+GZIP_BIN=$ac_cv_path_GZIP_BIN
+if test -n "$GZIP_BIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP_BIN" >&5
+$as_echo "$GZIP_BIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	# Extract the first word of "bzip2", so it can be a program name with args.
+set dummy bzip2; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_path_BZIP2_BIN+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $BZIP2_BIN in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_BZIP2_BIN="$BZIP2_BIN" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_BZIP2_BIN="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+BZIP2_BIN=$ac_cv_path_BZIP2_BIN
+if test -n "$BZIP2_BIN"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BZIP2_BIN" >&5
+$as_echo "$BZIP2_BIN" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+	mp_tarball="vendor/libsolv.tar.gz"
+	ac_dir=vendor/libsolv
+
+	mp_popdir=$(pwd)
+	if ! test -d "$ac_dir"; then
+		mp_tarball_vendordir="$(dirname "$mp_tarball")"
+		as_dir="$mp_tarball_vendordir"; as_fn_mkdir_p
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: === extracting $mp_tarball" >&5
+$as_echo "$as_me: === extracting $mp_tarball" >&6;}
+		mp_tarball_extract_cmd=
+		case "$mp_tarball" in
+			*.tar.gz | *.tgz)
+				if test "x$GZIP_BIN" = "x"; then
+					as_fn_error $? "gzip not found" "$LINENO" 5
+				fi
+				mp_tarball_extract_cmd="$GZIP_BIN"
+				;;
+			*.tar.bz2 | *.tbz2)
+				if test "x$BZIP2_BIN" = "x"; then
+					as_fn_error $? "bzip2 not found" "$LINENO" 5
+				fi
+				mp_tarball_extract_cmd="$BZIP2_BIN"
+				;;
+			*)
+				as_fn_error $? "Don't know how to extract tarball $mp_tarball" "$LINENO" 5
+				;;
+		esac
+		(cd "$mp_tarball_vendordir"; umask 0022; "$mp_tarball_extract_cmd" -d < "$ac_abs_confdir/$mp_tarball" | tar xf - || as_fn_error $? "failed to extract $mp_tarball" "$LINENO" 5)
+	fi
+	if ! test -d "$ac_dir"; then
+		as_fn_error $? "tarball $mp_tarball did not extract to $ac_dir" "$LINENO" 5
+	fi
+
+	as_dir="$ac_dir"; as_fn_mkdir_p
+	ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+	cd "$ac_dir"
+
+	if test "$no_recursion" != yes || test ! -f "$ac_srcdir/config.status"; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+		if test -f "$ac_srcdir/configure"; then
+			mp_sub_configure_args=
+			mp_sub_configure_keys=
+			# Compile a list of keys that have been given to the MP_CONFIG_TARBALL
+			# macro; we want to skip copying those parameters from the original
+			# configure invocation.
+			for mp_arg in --prefix=${macports_libexec_dir}; do
+				case $mp_arg in
+					--*=* | -*=*)
+							mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+								case $mp_arg_key in
+		*\'*)
+			mp_arg_key=$($as_echo "$mp_arg_key" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg_key="'$mp_arg_key'"
+	as_fn_append mp_sub_configure_keys " $mp_arg_key"
+
+					;;
+				esac
+						case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+	as_fn_append mp_sub_configure_args " $mp_arg"
+
+			done
+			# Walk the list of arguments given to the original configure script;
+			# filter out a few common ones we likely would not want to pass along,
+			# add --disable-option-checking and filter those already given as
+			# argument to MP_CONFIG_TARBALL.
+			# Most of this code is adapted from _AC_OUTPUT_SUBDIRS in
+			# $prefix/share/autoconf/autoconf/status.m4.
+			mp_prev=
+			eval "set x $ac_configure_args"
+			shift
+			for mp_arg; do
+				if test -n "$mp_prev"; then
+					mp_prev=
+					continue
+				fi
+				case $mp_arg in
+					  -cache-file \
+					| --cache-file \
+					| --cache-fil \
+					| --cache-fi \
+					| --cache-f \
+					| --cache- \
+					| --cache \
+					| --cach \
+					| --cac \
+					| --ca \
+					| --c)
+						mp_prev=cache_file
+					;;
+					  -cache-file=* \
+					| --cache-file=* \
+					| --cache-fil=* \
+					| --cache-fi=* \
+					| --cache-f=* \
+					| --cache-=* \
+					| --cache=* \
+					| --cach=* \
+					| --cac=* \
+					| --ca=* \
+					| --c=*)
+						# ignore --cache-file
+					;;
+					  --config-cache \
+					| -C)
+						# ignore -C
+					;;
+					  -srcdir \
+					| --srcdir \
+					| -srcdi \
+					| -srcd \
+					| -src \
+					| -sr)
+						mp_prev=srcdir
+					;;
+					  -srcdir=* \
+					| --srcdir=* \
+					| --srcdi=* \
+					| --srcd=* \
+					| --src=* \
+					| --sr=*)
+						# ignore --srcdir
+					;;
+					  -prefix \
+					| --prefix \
+					| --prefi \
+					| --pref \
+					| --pre \
+					| --pr \
+					| --p)
+						mp_prev=prefix
+					;;
+					  -prefix=* \
+					| --prefix=* \
+					| --prefi=* \
+					| --pref=* \
+					| --pre=* \
+					| --pr=* \
+					| --p=*)
+						# ignore --prefix
+					;;
+					--disable-option-checking)
+						# ignore --disable-option-checking
+					;;
+					--*=* | -*=*)
+							mp_arg_key=$($as_echo "$mp_arg" | sed -E 's/^--?([^=]+)=.*$/\1/')
+							mp_list_contains_present=
+	eval "mp_list_contains_list=\"$mp_sub_configure_keys\""
+	for mp_list_contains_entry in $mp_list_contains_list; do
+		test -z "$mp_list_contains_entry" && continue
+		if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+			mp_list_contains_present=1
+			break
+		fi
+	done
+	if test "x$mp_list_contains_present" = "x"; then
+		:
+		else
+									case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+	as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+	fi
+
+					;;
+					*)
+						# always pass positional arguments
+								case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+	as_fn_append mp_sub_configure_args " $mp_arg"
+
+					;;
+				esac
+			done
+
+			# Now prepend some arguments that should always be present unless
+			# overriden, such as --prefix, --silent, --disable-option-checking,
+			# --cache-file, --srcdir
+			# Pass --prefix unless already given
+			mp_arg_key=prefix
+				mp_list_contains_present=
+	eval "mp_list_contains_list=\"$mp_sub_configure_args\""
+	for mp_list_contains_entry in $mp_list_contains_list; do
+		test -z "$mp_list_contains_entry" && continue
+		if test "x$mp_arg_key" = "x$mp_list_contains_entry"; then
+			mp_list_contains_present=1
+			break
+		fi
+	done
+	if test "x$mp_list_contains_present" = "x"; then
+		:
+		else
+				mp_arg="--prefix=$prefix"
+						case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+			mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+	fi
+
+
+			# Pass --silent
+			if test "$silent" = yes; then
+				mp_arg="--silent"
+						case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+			mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+			fi
+
+			# Always prepend --disable-option-checking to silence warnings, since
+			# different subdirs can have different --enable and --with options.
+			mp_arg="--disable-option-checking"
+					case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+			mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+			# Make the cache file name correct relative to the subdirectory.
+			case $cache_file in
+				[\\/]* | ?:[\\/]* )
+					mp_sub_cache_file=$cache_file
+				;;
+				*) # Relative name.
+					mp_sub_cache_file=$ac_top_build_prefix$cache_file
+				;;
+			esac
+			mp_arg="--cache-file=$mp_sub_cache_file"
+					case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+			mp_fn_var_prepend mp_sub_configure_args "$mp_arg "
+
+
+
+			mp_arg="--srcdir=$ac_srcdir"
+					case $mp_arg in
+		*\'*)
+			mp_arg=$($as_echo "$mp_arg" | sed "s/'/'\\\\\\\\''/g")
+		;;
+	esac
+	mp_arg="'$mp_arg'"
+	as_fn_append mp_sub_configure_args " $mp_arg"
+
+
+			{ $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&5
+$as_echo "$as_me: running $SHELL $ac_srcdir/configure $mp_sub_configure_args in $ac_dir" >&6;}
+			eval "\$SHELL \$ac_srcdir/configure $mp_sub_configure_args" || as_fn_error $? "configure failed for $ac_dir" "$LINENO" 5
+		else
+			as_fn_error $? "no configure script found in $ac_dir" "$LINENO" 5
+		fi
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&5
+$as_echo "$as_me: === finished configuring in $ac_dir ($mp_popdir/$ac_dir)" >&6;}
+	fi
+	cd "$mp_popdir"
+
+VENDOR_LIBSOLV_SUBDIR=libsolv
+VENDOR_LIBSOLV_INSTALL="install"
+
+
+
 # Load tclConfig.sh from our private install of Tcl
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
 $as_echo_n "checking for Tcl configuration... " >&6; }

Modified: branches/gsoc15-dependency/base/configure.ac
===================================================================
--- branches/gsoc15-dependency/base/configure.ac	2015-08-11 14:27:36 UTC (rev 139297)
+++ branches/gsoc15-dependency/base/configure.ac	2015-08-11 14:50:31 UTC (rev 139298)
@@ -367,6 +367,15 @@
 AC_SUBST(VENDOR_TCLLIB_SUBDIR)
 AC_SUBST(VENDOR_TCLLIB_INSTALL)
 
+## Libsolv package
+#  Libsolv is required to support libsolv SAT Solver for
+#  dependency calculation.
+MP_CONFIG_TARBALL([vendor/libsolv.tar.gz], [vendor/libsolv], [--prefix=${macports_libexec_dir}], [--with-tcl=@VENDOR_TCL_SUBDIR@])
+VENDOR_LIBSOLV_SUBDIR=libsolv
+VENDOR_LIBSOLV_INSTALL="install"
+AC_SUBST(VENDOR_LIBSOLV_SUBDIR)
+AC_SUBST(VENDOR_LIBSOLV_INSTALL)
+
 # Load tclConfig.sh from our private install of Tcl
 AC_MSG_CHECKING([for Tcl configuration])
 TCL_BIN_DIR=`(cd vendor/tcl${tcl_version}/unix; pwd)`

Modified: branches/gsoc15-dependency/base/vendor/Makefile.in
===================================================================
--- branches/gsoc15-dependency/base/vendor/Makefile.in	2015-08-11 14:27:36 UTC (rev 139297)
+++ branches/gsoc15-dependency/base/vendor/Makefile.in	2015-08-11 14:50:31 UTC (rev 139298)
@@ -10,12 +10,15 @@
 TCLLIB_SUBDIR=		@VENDOR_TCLLIB_SUBDIR@
 TCLLIB_TARGETS= 	@VENDOR_TCLLIB_INSTALL@
 
+LIBSOLV_SUBDIR=		@VENDOR_LIBSOLV_SUBDIR@
+LIBSOLV_TARGETS=	@VENDOR_LIBSOLV_INSTALL@
+
 DESTROOT=   		@abs_top_builddir@/vendor/vendor-destroot
 
 .PHONY: all clean distclean install destroot test
-.PHONY: destroot-tcl destroot-tcllthread destroot-tclx destroot-tcllib
-.PHONY: install-tcl install-tcllthread install-tclx install-tcllib
-.PHONY: %-tcl %-tcllthread %-tclx %-tcllib
+.PHONY: destroot-tcl destroot-tcllthread destroot-tclx destroot-tcllib destroot-libsolv
+.PHONY: install-tcl install-tcllthread install-tclx install-tcllib install-libsolv
+.PHONY: %-tcl %-tcllthread %-tclx %-tcllib %-libsolv
 
 # for make all, run destroot (where destroot will depend on all of each
 # subpackage)
@@ -43,7 +46,11 @@
 	@echo ===\> making $(@:%-tcllib=%) in ${DIRPRFX}@VENDOR_TCLLIB_SUBDIR@
 	@umask 0022; $(MAKE) -C @VENDOR_TCLLIB_SUBDIR@ $(@:%-tcllib=%)
 
-destroot: destroot-tcl destroot-tclthread destroot-tclx destroot-tcllib
+%-libsolv:
+	@echo ===\> making $(@:%-libsolv=%) in ${DIRPRFX}@VENDOR_LIBSOLV_SUBDIR@
+	@umask 0022; $(MAKE) -C @VENDOR_LIBSOLV_SUBDIR@ $(@:%-libsolv=%)
+
+destroot: destroot-tcl destroot-tclthread destroot-tclx destroot-tcllib destroot-libsolv
 destroot-tcl: all-tcl
 	@echo ===\> staging to destroot in ${DIRPRFX}@VENDOR_TCL_SUBDIR@
 	@umask 0022; $(MAKE) -C @VENDOR_TCL_SUBDIR@ DESTDIR=${DESTROOT} @VENDOR_TCL_INSTALL@
@@ -60,7 +67,11 @@
 	@echo ===\> staging to destroot in ${DIRPRFX}@VENDOR_TCLLIB_SUBDIR@
 	@umask 0022; $(MAKE) -C @VENDOR_TCLLIB_SUBDIR@ DESTDIR=${DESTROOT} @VENDOR_TCLLIB_INSTALL@
 
-install: install-tcl install-tclthread install-tclx install-tcllib
+destroot-libsolv: all-libsolv
+	@echo ===\> staging to destroot in ${DIRPRFX}@VENDOR_LIBSOLV_SUBDIR@
+	@umask 0022; $(MAKE) -C @VENDOR_LIBSOLV_SUBDIR@ DESTDIR=${DESTROOT} @VENDOR_LIBSOLV_INSTALL@
+
+install: install-tcl install-tclthread install-tclx install-tcllib install-libsolv
 install-tcl:
 	@echo ===\> making $(@:%-tcl=%) in ${DIRPRFX}@VENDOR_TCL_SUBDIR@
 	@umask 0022; $(MAKE) -C @VENDOR_TCL_SUBDIR@ @VENDOR_TCL_INSTALL@
@@ -77,12 +88,16 @@
 	@echo ===\> making $(@:%-tcllib=%) in ${DIRPRFX}@VENDOR_TCLLIB_SUBDIR@
 	@umask 0022; $(MAKE) -C @VENDOR_TCLLIB_SUBDIR@ @VENDOR_TCLLIB_INSTALL@
 
+install-libsolv:
+	@echo ===\> making $(@:%-libsolv=%) in ${DIRPRFX}@VENDOR_LIBSOLV_SUBDIR@
+	@umask 0022; $(MAKE) -C @VENDOR_LIBSOLV_SUBDIR@ @VENDOR_LIBSOLV_INSTALL@
+
 test:
 
-clean: clean-tcl clean-tcllib clean-tclx clean-tclthread
+clean: clean-tcl clean-tcllib clean-tclx clean-tclthread clean-libsolv
 	rm -rf ${DESTROOT}
 
 distclean:
 	rm -f Makefile
-	rm -rf $(TCL_SUBDIR:/unix=) $(TCLTHREAD_SUBDIR) $(TCLX_SUBDIR) $(TCLLIB_SUBDIR)
+	rm -rf $(TCL_SUBDIR:/unix=) $(TCLTHREAD_SUBDIR) $(TCLX_SUBDIR) $(TCLLIB_SUBDIR) $(LIBSOLV_SUBDIR)
 	rm -rf vendor-destroot

Added: branches/gsoc15-dependency/base/vendor/libsolv.tar.gz
===================================================================
(Binary files differ)


Property changes on: branches/gsoc15-dependency/base/vendor/libsolv.tar.gz
___________________________________________________________________
Added: svn:mime-type
   + application/x-gzip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150811/5776af73/attachment-0001.html>


More information about the macports-changes mailing list