[137354] branches/gsoc15-dependency/base/src/macports1.0
ijackson at macports.org
ijackson at macports.org
Wed Jun 10 00:37:51 PDT 2015
Revision: 137354
https://trac.macports.org/changeset/137354
Author: ijackson at macports.org
Date: 2015-06-10 00:37:51 -0700 (Wed, 10 Jun 2015)
Log Message:
-----------
WIP: Add macports_libsolv.tcl to support libsolv SAT-SOLVER
This file will handle the libsolv procs.
As macports.tcl is already huge, move libsolv related
proc to new file named macports_libsolv.tcl and provide
package for using in macports.tcl
Modified Paths:
--------------
branches/gsoc15-dependency/base/src/macports1.0/macports.tcl
Added Paths:
-----------
branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl
Modified: branches/gsoc15-dependency/base/src/macports1.0/macports.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports.tcl 2015-06-10 07:34:39 UTC (rev 137353)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports.tcl 2015-06-10 07:37:51 UTC (rev 137354)
@@ -39,6 +39,7 @@
package require diagnose 1.0
package require reclaim 1.0
package require Tclx
+package require macports_libsolv 1.0
namespace eval macports {
namespace export bootstrap_options user_options portinterp_options open_mports ui_priorities port_phases
Added: branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl
===================================================================
--- branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl (rev 0)
+++ branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl 2015-06-10 07:37:51 UTC (rev 137354)
@@ -0,0 +1,60 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
+# macports_libsolv.tcl
+# $Id$
+#
+# Copyright (c) 2015 Jackson Isaac <ijackson at macports.org>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+# 3. Neither the name of The MacPorts Project nor the names of its contributors
+# may be used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+package provide macports_libsolv 1.0
+
+# Load solv.dylib, bindings for libsolv
+load solv.dylib
+
+## Testing solv.dylib
+puts $solv::Job_SOLVER_SOLVABLE
+
+namespace eval macports::libsolv {
+ proc create_pool {} {
+ global macports::sources
+ set pool [solv::Pool]
+
+ foreach source $sources {
+ set source [lindex $source 0]
+
+ if {[catch {set fd [open [macports::getindex $source] r]} result]} {
+ ui_warn "Can't open index file for source: $source"
+ } else {
+ # pool::add_repo($fd)
+ }
+ }
+ }
+
+ proc search {pattern} {
+
+ }
+}
Property changes on: branches/gsoc15-dependency/base/src/macports1.0/macports_libsolv.tcl
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20150610/619acb4d/attachment.html>
More information about the macports-changes
mailing list