<commit_before># ex:ts=4
#
# Insert some license text here at some point soon.
#

# the 'main' target is provided by this package
# main is a magic target and should not be replaced

package provide portdepends 1.0
package require portutil 1.0

register com.apple.depends.fetch target depends_main always
register com.apple.depends.fetch provides depends_fetch

register com.apple.depends.build target depends_main always
register com.apple.depends.build provides depends_build

register com.apple.depends.run target depends_main always
register com.apple.depends.run provides depends_run

register com.apple.depends.extract target depends_main always
register com.apple.depends.extract provides depends_extract

register com.apple.depends.lib target depends_main always
register com.apple.depends.lib provides depends_lib

# define options
options depends_fetch depends_build depends_run depends_extract depends_lib

# depends_resolve
# XXX - Architecture specific
# XXX - Rely on information from internal defines in cctools/dyld:
# define DEFAULT_FALLBACK_FRAMEWORK_PATH
# /Library/Frameworks:/Library/Frameworks:/Network/Library/Frameworks:/System/Library/Frameworks
# define DEFAULT_FALLBACK_LIBRARY_PATH /lib:/usr/local/lib:/lib:/usr/lib
# Environment variables DYLD_FRAMEWORK_PATH, DYLD_LIBRARY_PATH,
# DYLD_FALLBACK_FRAMEWORK_PATH, and DYLD_FALLBACK_LIBRARY_PATH take precedence

proc depends_main {id} {
    if {[regexp .*\..*\.depends\.(.*) $id match name] != 1} {
	return 0
    }
    set name depends_$name
    global $name env sysportpath
    if {![info exists $name]} {
	return 0
    }
    upvar #0 $name upname
    foreach depspec $upname {
	if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9\.$^\?\+\(\)\|\\]+):([A-Za-z\./0-9]+)} "$depspec" match deppath depregex portname] == 1} {
	    switch -exact -- $deppath {
		lib {
		    if {[info exists env(DYLD_FRAMEWORK_PATH)]} {
			lappend search_path $env(DYLD_FRAMEWORK_PATH)
		    } else {
			lappend search_path /Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks
		    }
		    if {[info exists env(DYLD_FALLBACK_FRAMEWORK_PATH)]} {
			lappend search_path $env(DYLD_FALLBACK_FRAMEWORK_PATH)
		    }
		    if {[info exists env(DYLD_LIBRARY_PATH)]} {
			lappend search_path $env(DYLD_LIBRARY_PATH)
		    } else {
			lappend search_path /lib /usr/local/lib /lib /usr/lib
		    }
		    if {[info exists env(DYLD_FALLBACK_LIBRARY_PATH)]} {
			lappend search_path $env(DYLD_LIBRARY_PATH)
		    }
		    regsub {\.} $depregex {\.} depregex
		    set depregex \^$depregex.*\\.dylib\$
		}
		bin {
		    set search_path [split $env(PATH) :]
		    set depregex \^$depregex\$
		}
		default {
		    set search_path [split $deppath :]
		}
	    }
	}
    }
    foreach path $search_path {
	if {![file isdirectory $path]} {
		continue
	}
	foreach filename [readdir $path] {
		if {[regexp $depregex $filename] == 1} {
			ui_debug "Found Dependency: path: $path filename: $filename regex: $depregex"
			return 0
		}
	}
    }
    ui_debug "Building $portname"
    dportbuild $sysportpath/software/$portname build
    return 0
}<commit_msg>Dependencies should be installed by default<commit_after># ex:ts=4
#
# Insert some license text here at some point soon.
#

# the 'main' target is provided by this package
# main is a magic target and should not be replaced

package provide portdepends 1.0
package require portutil 1.0

register com.apple.depends.fetch target depends_main always
register com.apple.depends.fetch provides depends_fetch

register com.apple.depends.build target depends_main always
register com.apple.depends.build provides depends_build

register com.apple.depends.run target depends_main always
register com.apple.depends.run provides depends_run

register com.apple.depends.extract target depends_main always
register com.apple.depends.extract provides depends_extract

register com.apple.depends.lib target depends_main always
register com.apple.depends.lib provides depends_lib

# define options
options depends_fetch depends_build depends_run depends_extract depends_lib

# depends_resolve
# XXX - Architecture specific
# XXX - Rely on information from internal defines in cctools/dyld:
# define DEFAULT_FALLBACK_FRAMEWORK_PATH
# /Library/Frameworks:/Library/Frameworks:/Network/Library/Frameworks:/System/Library/Frameworks
# define DEFAULT_FALLBACK_LIBRARY_PATH /lib:/usr/local/lib:/lib:/usr/lib
# Environment variables DYLD_FRAMEWORK_PATH, DYLD_LIBRARY_PATH,
# DYLD_FALLBACK_FRAMEWORK_PATH, and DYLD_FALLBACK_LIBRARY_PATH take precedence

proc depends_main {id} {
    if {[regexp .*\..*\.depends\.(.*) $id match name] != 1} {
	return 0
    }
    set name depends_$name
    global $name env sysportpath
    if {![info exists $name]} {
	return 0
    }
    upvar #0 $name upname
    foreach depspec $upname {
	if {[regexp {([A-Za-z\./0-9]+):([A-Za-z0-9\.$^\?\+\(\)\|\\]+):([A-Za-z\./0-9]+)} "$depspec" match deppath depregex portname] == 1} {
	    switch -exact -- $deppath {
		lib {
		    if {[info exists env(DYLD_FRAMEWORK_PATH)]} {
			lappend search_path $env(DYLD_FRAMEWORK_PATH)
		    } else {
			lappend search_path /Library/Frameworks /Library/Frameworks /Network/Library/Frameworks /System/Library/Frameworks
		    }
		    if {[info exists env(DYLD_FALLBACK_FRAMEWORK_PATH)]} {
			lappend search_path $env(DYLD_FALLBACK_FRAMEWORK_PATH)
		    }
		    if {[info exists env(DYLD_LIBRARY_PATH)]} {
			lappend search_path $env(DYLD_LIBRARY_PATH)
		    } else {
			lappend search_path /lib /usr/local/lib /lib /usr/lib
		    }
		    if {[info exists env(DYLD_FALLBACK_LIBRARY_PATH)]} {
			lappend search_path $env(DYLD_LIBRARY_PATH)
		    }
		    regsub {\.} $depregex {\.} depregex
		    set depregex \^$depregex.*\\.dylib\$
		}
		bin {
		    set search_path [split $env(PATH) :]
		    set depregex \^$depregex\$
		}
		default {
		    set search_path [split $deppath :]
		}
	    }
	}
    }
    foreach path $search_path {
	if {![file isdirectory $path]} {
		continue
	}
	foreach filename [readdir $path] {
		if {[regexp $depregex $filename] == 1} {
			ui_debug "Found Dependency: path: $path filename: $filename regex: $depregex"
			return 0
		}
	}
    }
    ui_debug "Building $portname"
    dportbuild $sysportpath/software/$portname install
    return 0
}
{'fraction_non_alphanumeric': 0.10880663688576898, 'fraction_numerical': 0.006062539885130823, 'mean_word_length': 3.749242424242424, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '787283', 'n_tokens_mistral': 2291, 'n_tokens_neox': 2070, 'n_words': 525}