Compare commits

...

25 Commits

Author SHA1 Message Date
a2626355ac fix printf when used with --regex
strip parentheses when parsing softdeps
2023-12-02 14:46:00 +00:00
bfb5cde112 be more selective when applying forceRebuild 2023-09-15 04:22:01 -04:00
d2951b0897 use a common style to show missing or already-installed ports (FS#1843)
i3-softdeps.md: slight rewording
2023-09-14 20:12:16 -04:00
1287e9920d respect -fr (forceRebuild) even if built package is newer than Pkgfile 2023-09-14 20:11:52 -04:00
a073423a89 updated ChangeLog 2023-09-04 19:10:31 -04:00
284b9e5e21 add support for rmlog_on_uninst 2023-09-04 15:13:04 -04:00
4c821419fb refresh the man-page examples 2023-09-01 16:03:14 -04:00
e97879074b i3-softdeps.md: minor revisions 2023-08-26 17:24:39 -04:00
449c0e0553 i3 softdeps test: updated
i3-softdeps.md: fix markup
2023-08-25 10:52:05 -04:00
5ee692a858 upload a discussion of the i3 softdeps test 2023-08-25 10:00:19 -04:00
91632a574d prune unreachable code paths
revise man-page discussion of --install-root
2023-08-24 10:48:09 -04:00
1c3bcde003 upload results of the i3 softdeps test 2023-08-22 20:30:10 -04:00
4b069aa3d6 revise the softdeps calculation 2023-08-22 09:12:05 -04:00
e67aa2cbd3 consolidate the tests in calcDependencies() 2023-08-21 07:52:08 -04:00
507afd9766 report pre- and post-install scripts in test mode 2023-06-23 15:28:05 -04:00
68239f077b support more format codes in the argument to 'dup'
expand man-page to explain some asymmetries
2023-06-23 11:46:46 -04:00
06b1599c8c man-page: add a few references and another example
correct misspellings and inaccuracies

fix formatting
2023-06-21 21:16:32 -04:00
7c1126f0b0 man-page: fix indentation and formatting
document the interaction between --install-root and 'runscripts yes'
2023-06-20 16:55:36 -04:00
b5aa185537 cache the pkgmk.conf settings to avoid repeated disk reads (FS#595) 2023-06-08 11:42:58 -04:00
3a53676253 fix several compile warnings (-Wreorder, unused parameter) 2023-06-08 07:04:48 -04:00
7dc024e103 switch from autotools to meson; update docs 2023-06-02 16:05:42 -04:00
6e4a4d8daa respect --install-root when running pre- and post-install scripts 2023-06-02 15:56:31 -04:00
f2c0f370d4 cut down on duplicate code; fix FS#1930; expand man-page examples 2023-06-02 15:53:29 -04:00
8ac36484c5 expand the prt-get man-page with more examples
add more details to the prt-cache man-page
2023-03-13 14:37:34 -04:00
5d2b5e0ac0 fix FS#1910; merge Alan's patch for the --group flag; update shell completions
remove some anachronisms from the aliases file
2023-03-13 14:36:00 -04:00
54 changed files with 2404 additions and 12236 deletions

View File

@ -1 +1,2 @@
Johannes Winkelmann, jw@tks6.net
John McQuah, jmq@rawtext.club

View File

@ -1,7 +1,39 @@
* 31.08.2023 John McQuah
- allow deletion of build log when a package is removed (feature requested
by samsep10l)
- man-page updates
- demonstrate how to troubleshoot a failed depinst due to omitted softdeps
- discuss the rmlog_on_uninst feature
* 29.05.2023 John McQuah
- eliminate code duplication in printDepTree
- respect the user's choice of --install-root when running pre- and
post-install scripts
- update man-page with an example of core-only sysup
- switch from autotools to meson
* 19.03.2023 John McQuah
- switch between install and update on a port-by-port basis, whichever is needed
- allow dependency injection during sysup (controllable via --nodeps)
- check whether a built package already exists before calling pkgmk
- consolidate printDependent and printDepTree
- consolidate sysup, printQuickDiff, and printDiff
- let the argParser recognize some synonyms for old commands
- assign meanings to --nodeps and --depsort for other subroutines
* 10.03.2023 John McQuah
- make it possible to consider optional dependencies when updating
- bump version of the cache file format, to warn users about the
'Packager' field being replaced by 'Optional'
- make it possible for the dependency resolver to consider optionals
* 27.02.2022 Alexandr Savca, Tim Biermann
- fix segfault in prt-cache
* 5.19.5 16.10.2020 Matt Housh, Juergen Daubert
- add a regex fix for listinst
- move aliases file to /etc
* 5.19.2 01.03.2019 James Buren
- fix misc compiler warnings
- fix FS#1646, caused by wrong use of close() instead of fclose()
* 5.16 26.06.2008 Johannes Winkelmann
- don't loop forever when version= contains unsupported $() tokens

8
FAQ
View File

@ -1,8 +0,0 @@
Q: Why are there no wildcards for install/update/grpinst
A: Because you don't want it (dependencies)
Q: Why is there no prt-get depinst?
A:
Q: Why is there no GUI or shared lib for/of prt-get?
A:

View File

@ -1,6 +1,7 @@
Installing prt-get
------------------
Installing prt-get is just a matter of
./configure
make
make install
meson setup bld --prefix=/usr
cd bld && meson compile
meson install

View File

@ -1,7 +0,0 @@
AUTOMAKE_OPTIONS = foreign
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in
SUBDIRS = src doc misc
EXTRA_DIST = CREDITS FAQ LICENSE

View File

@ -1,723 +0,0 @@
# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = .
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure AUTHORS ChangeLog INSTALL TODO depcomp \
install-sh missing mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
html-recursive info-recursive install-data-recursive \
install-dvi-recursive install-exec-recursive \
install-html-recursive install-info-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
$(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
cscope distdir dist dist-all distcheck
ETAGS = etags
CTAGS = ctags
CSCOPE = cscope
DIST_SUBDIRS = $(SUBDIRS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
DIST_TARGETS = dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
AUTOMAKE_OPTIONS = foreign
MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in
SUBDIRS = src doc misc
EXTRA_DIST = CREDITS FAQ LICENSE
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
&& exit 0; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --foreign Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
echo ' $(SHELL) ./config.status'; \
$(SHELL) ./config.status;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
$(top_srcdir)/configure: $(am__configure_deps)
$(am__cd) $(srcdir) && $(AUTOCONF)
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
config.h: stamp-h1
@if test ! -f $@; then rm -f stamp-h1; else :; fi
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
cd $(top_builddir) && $(SHELL) ./config.status config.h
$(srcdir)/config.h.in: $(am__configure_deps)
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
rm -f stamp-h1
touch $@
distclean-hdr:
-rm -f config.h stamp-h1
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
tags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
done
ctags-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
done
cscopelist-recursive:
list='$(SUBDIRS)'; for subdir in $$list; do \
test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
done
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
include_option=--etags-include; \
empty_fix=.; \
else \
include_option=--include; \
empty_fix=; \
fi; \
list='$(SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test ! -f $$subdir/TAGS || \
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
fi; \
done; \
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist-recursive cscopelist
cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
distdir: $(DISTFILES)
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
am__remove_distdir=: \
am__skip_length_check=: \
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
$(am__post_remove_distdir)
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
dist-tarZ: distdir
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
dist-shar: distdir
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
$(am__post_remove_distdir)
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
chmod -R a-w $(distdir); chmod u+w $(distdir)
mkdir $(distdir)/_build
mkdir $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
&& chmod -R a-w "$$dc_install_base" \
&& ({ \
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
check: check-recursive
all-am: Makefile config.h
installdirs: installdirs-recursive
installdirs-am:
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-recursive
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
-test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
clean: clean-recursive
clean-am: clean-generic mostlyclean-am
distclean: distclean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -f Makefile
distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
dvi: dvi-recursive
dvi-am:
html: html-recursive
html-am:
info: info-recursive
info-am:
install-data-am:
install-dvi: install-dvi-recursive
install-dvi-am:
install-exec-am:
install-html: install-html-recursive
install-html-am:
install-info: install-info-recursive
install-info-am:
install-man:
install-pdf: install-pdf-recursive
install-pdf-am:
install-ps: install-ps-recursive
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-recursive
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
-rm -rf $(top_srcdir)/autom4te.cache
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-recursive
mostlyclean-am: mostlyclean-generic
pdf: pdf-recursive
pdf-am:
ps: ps-recursive
ps-am:
uninstall-am:
.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \
cscopelist-recursive ctags-recursive install-am install-strip \
tags-recursive
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-cscope \
clean-generic cscope cscopelist cscopelist-recursive ctags \
ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-lzip \
dist-shar dist-tarZ dist-xz dist-zip distcheck distclean \
distclean-generic distclean-hdr distclean-tags distcleancheck \
distdir distuninstallcheck dvi dvi-am html html-am info \
info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-pdf install-pdf-am install-ps \
install-ps-am install-strip installcheck installcheck-am \
installdirs installdirs-am maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

15
README
View File

@ -9,6 +9,7 @@ ports from crux (http://crux.nu). It offers some simplification over
pure pkgmk, but might hide some interesting details about the install
process.
Installing:
-----------
Download an iso of the latest CRUX release for a precompiled package.
@ -23,18 +24,20 @@ found _first_ will be used.
Feel free to file a bug report on the Gitea issue tracker:
https://git.crux.nu:82/farkuhar/prt-get/issues/
more information
----------------
See the man pages for prt-get(8), prt-get.conf(5) and prt-cache for more
More information:
-----------------
See the man pages for prt-get(8), prt-get.conf(5) and prt-cache(8) for more
information. The CRUX homepage also offers a (somewhat dated) User Manual
and Quick Start guide:
https://crux.nu/doc/prt-get%20-%20User%20Manual.html
https://crux.nu/doc/prt-get%20-%20Quick%20start.html
"it must be user error" (thinkgeek)
-----------------------------------
port directories may only contain ports, or else prt-get can fail (which
means that nothing is installed, your system takes no harm). The reason
Port directories may only contain ports, or else prt-get can fail (which
means that nothing is installed, your system suffers no harm). The reason
for this is because the additional checking slows down the application
too much
too much.

2
TODO
View File

@ -1,5 +1,5 @@
- add --rebuild-set to dependent
- allow dependency injection for sysup, with previews
- allow dependency injection for sysup (done), with previews (?)
- prefer toolchain (patch in trac)
- logging: check for non-root owned symlinks
- logging: reject relative logfile names

984
aclocal.m4 vendored
View File

@ -1,984 +0,0 @@
# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
# Copyright (C) 2002-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
# generated from the m4 files accompanying Automake X.Y.
# (This private macro should not be called outside this file.)
AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.12.2], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
# _AM_AUTOCONF_VERSION(VERSION)
# -----------------------------
# aclocal traces this macro to find the Autoconf version.
# This is a private macro too. Using m4_define simplifies
# the logic in aclocal, which can simply ignore this definition.
m4_define([_AM_AUTOCONF_VERSION], [])
# AM_SET_CURRENT_AUTOMAKE_VERSION
# -------------------------------
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.12.2])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
#
# Of course, Automake must honor this variable whenever it calls a
# tool from the auxiliary directory. The problem is that $srcdir (and
# therefore $ac_aux_dir as well) can be either absolute or relative,
# depending on how configure is run. This is pretty annoying, since
# it makes $ac_aux_dir quite unusable in subdirectories: in the top
# source directory, any form will work fine, but in subdirectories a
# relative path needs to be adjusted first.
#
# $ac_aux_dir/missing
# fails when called from a subdirectory if $ac_aux_dir is relative
# $top_srcdir/$ac_aux_dir/missing
# fails if $ac_aux_dir is absolute,
# fails when called from a subdirectory in a VPATH build with
# a relative $ac_aux_dir
#
# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
# are both prefixed by $srcdir. In an in-source build this is usually
# harmless because $srcdir is '.', but things will broke when you
# start a VPATH build or use an absolute $srcdir.
#
# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
# and then we would define $MISSING as
# MISSING="\${SHELL} $am_aux_dir/missing"
# This will work as long as MISSING is not called from configure, because
# unfortunately $(top_srcdir) has no meaning in configure.
# However there are other variables, like CC, which are often used in
# configure, and could therefore not use this "fixed" $ac_aux_dir.
#
# Another solution, used here, is to always expand $ac_aux_dir to an
# absolute PATH. The drawback is that using absolute paths prevent a
# configured tree to be moved without reconfiguration.
AC_DEFUN([AM_AUX_DIR_EXPAND],
[dnl Rely on autoconf to set up CDPATH properly.
AC_PREREQ([2.50])dnl
# expand $ac_aux_dir to an absolute path
am_aux_dir=`cd $ac_aux_dir && pwd`
])
# AM_CONDITIONAL -*- Autoconf -*-
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 10
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
AC_DEFUN([AM_CONDITIONAL],
[AC_PREREQ([2.52])dnl
m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
AC_SUBST([$1_TRUE])dnl
AC_SUBST([$1_FALSE])dnl
_AM_SUBST_NOTMAKE([$1_TRUE])dnl
_AM_SUBST_NOTMAKE([$1_FALSE])dnl
m4_define([_AM_COND_VALUE_$1], [$2])dnl
if $2; then
$1_TRUE=
$1_FALSE='#'
else
$1_TRUE='#'
$1_FALSE=
fi
AC_CONFIG_COMMANDS_PRE(
[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
AC_MSG_ERROR([[conditional "$1" was never defined.
Usually this means the macro was only invoked conditionally.]])
fi])])
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 17
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
# will think it sees a *use*, and therefore will trigger all it's
# C support machinery. Also note that it means that autoscan, seeing
# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
# _AM_DEPENDENCIES(NAME)
# ----------------------
# See how the compiler implements dependency checking.
# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
# We try a few techniques and use that to set a single cache variable.
#
# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
# dependency, and given that the user is not expected to run this macro,
# just rely on AC_PROG_CC.
AC_DEFUN([_AM_DEPENDENCIES],
[AC_REQUIRE([AM_SET_DEPDIR])dnl
AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
AC_REQUIRE([AM_MAKE_INCLUDE])dnl
AC_REQUIRE([AM_DEP_TRACK])dnl
m4_if([$1], [CC], [depcc="$CC" am_compiler_list=],
[$1], [CXX], [depcc="$CXX" am_compiler_list=],
[$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
[$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
[$1], [UPC], [depcc="$UPC" am_compiler_list=],
[$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
[depcc="$$1" am_compiler_list=])
AC_CACHE_CHECK([dependency style of $depcc],
[am_cv_$1_dependencies_compiler_type],
[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
# We make a subdir and do the tests there. Otherwise we can end up
# making bogus files that we don't know about and never remove. For
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named 'D' -- because '-MD' means "put the output
# in D".
rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
cp "$am_depcomp" conftest.dir
cd conftest.dir
# We will build objects and dependencies in a subdirectory because
# it helps to detect inapplicable dependency modes. For instance
# both Tru64's cc and ICC support -MD to output dependencies as a
# side effect of compilation, but ICC will put the dependencies in
# the current directory while Tru64 will put them in the object
# directory.
mkdir sub
am_cv_$1_dependencies_compiler_type=none
if test "$am_compiler_list" = ""; then
am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
fi
am__universal=false
m4_case([$1], [CC],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac],
[CXX],
[case " $depcc " in #(
*\ -arch\ *\ -arch\ *) am__universal=true ;;
esac])
for depmode in $am_compiler_list; do
# Setup a source with many dependencies, because some compilers
# like to wrap large dependency lists on column 80 (with \), and
# we should not choose a depcomp mode which is confused by this.
#
# We need to recreate these files for each test, as the compiler may
# overwrite some of them when testing with obscure command lines.
# This happens at least with the AIX C compiler.
: > sub/conftest.c
for i in 1 2 3 4 5 6; do
echo '#include "conftst'$i'.h"' >> sub/conftest.c
# Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
# Solaris 10 /bin/sh.
echo '/* dummy */' > sub/conftst$i.h
done
echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
# We check with '-c' and '-o' for the sake of the "dashmstdout"
# mode. It turns out that the SunPro C++ compiler does not properly
# handle '-M -o', and we need to detect this. Also, some Intel
# versions had trouble with output in subdirs.
am__obj=sub/conftest.${OBJEXT-o}
am__minus_obj="-o $am__obj"
case $depmode in
gcc)
# This depmode causes a compiler race in universal mode.
test "$am__universal" = false || continue
;;
nosideeffect)
# After this tag, mechanisms are not by side-effect, so they'll
# only be used when explicitly requested.
if test "x$enable_dependency_tracking" = xyes; then
continue
else
break
fi
;;
msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok '-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
am__obj=conftest.${OBJEXT-o}
am__minus_obj=
;;
none) break ;;
esac
if depmode=$depmode \
source=sub/conftest.c object=$am__obj \
depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
$SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
>/dev/null 2>conftest.err &&
grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
# icc doesn't choke on unknown options, it will just issue warnings
# or remarks (even with -Werror). So we grep stderr for any message
# that says an option was ignored or not supported.
# When given -MP, icc 7.0 and 7.1 complain thusly:
# icc: Command line warning: ignoring option '-M'; no argument required
# The diagnosis changed in icc 8.0:
# icc: Command line remark: option '-MP' not supported
if (grep 'ignoring option' conftest.err ||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
am_cv_$1_dependencies_compiler_type=$depmode
break
fi
fi
done
cd ..
rm -rf conftest.dir
else
am_cv_$1_dependencies_compiler_type=none
fi
])
AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
AM_CONDITIONAL([am__fastdep$1], [
test "x$enable_dependency_tracking" != xno \
&& test "$am_cv_$1_dependencies_compiler_type" = gcc3])
])
# AM_SET_DEPDIR
# -------------
# Choose a directory name for dependency files.
# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
AC_DEFUN([AM_SET_DEPDIR],
[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
])
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
[AC_ARG_ENABLE([dependency-tracking], [dnl
AS_HELP_STRING(
[--enable-dependency-tracking],
[do not reject slow dependency extractors])
AS_HELP_STRING(
[--disable-dependency-tracking],
[speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
AC_SUBST([am__nodep])dnl
_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
[{
# Autoconf 2.62 quotes --file arguments for eval, but not when files
# are listed without --file. Let's play safe and only enable the eval
# if we detect the quoting.
case $CONFIG_FILES in
*\'*) eval set x "$CONFIG_FILES" ;;
*) set x $CONFIG_FILES ;;
esac
shift
for mf
do
# Strip MF so we end up with the name of the file.
mf=`echo "$mf" | sed -e 's/:.*$//'`
# Check whether this is an Automake generated Makefile or not.
# We used to match only the files named 'Makefile.in', but
# some people rename them; so instead we look at the file content.
# Grep'ing the first line is not enough: some people post-process
# each Makefile.in and add a new line on top of each file to say so.
# Grep'ing the whole file is not good either: AIX grep has a line
# limit of 2048, but all sed's we know have understand at least 4000.
if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
dirpart=`AS_DIRNAME("$mf")`
else
continue
fi
# Extract the definition of DEPDIR, am__include, and am__quote
# from the Makefile without running 'make'.
DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
test -z "$DEPDIR" && continue
am__include=`sed -n 's/^am__include = //p' < "$mf"`
test -z "am__include" && continue
am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
# Find all dependency output files, they are included files with
# $(DEPDIR) in their names. We invoke sed twice because it is the
# simplest approach to changing $(DEPDIR) to its actual value in the
# expansion.
for file in `sed -n "
s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
# Make sure the directory exists.
test -f "$dirpart/$file" && continue
fdir=`AS_DIRNAME(["$file"])`
AS_MKDIR_P([$dirpart/$fdir])
# echo "creating $dirpart/$file"
echo '# dummy' > "$dirpart/$file"
done
done
}
])# _AM_OUTPUT_DEPENDENCY_COMMANDS
# AM_OUTPUT_DEPENDENCY_COMMANDS
# -----------------------------
# This macro should only be invoked once -- use via AC_REQUIRE.
#
# This code is only required when automatic dependency tracking
# is enabled. FIXME. This creates each '.P' file that we will
# need in order to bootstrap the dependency handling code.
AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
[AC_CONFIG_COMMANDS([depfiles],
[test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
[AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
])
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
# Do all the work for Automake. -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 19
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
# AM_INIT_AUTOMAKE([OPTIONS])
# -----------------------------------------------
# The call with PACKAGE and VERSION arguments is the old style
# call (pre autoconf-2.50), which is being phased out. PACKAGE
# and VERSION should now be passed to AC_INIT and removed from
# the call to AM_INIT_AUTOMAKE.
# We support both call styles for the transition. After
# the next Automake release, Autoconf can make the AC_INIT
# arguments mandatory, and then we can depend on a new Autoconf
# release and drop the old call support.
AC_DEFUN([AM_INIT_AUTOMAKE],
[AC_PREREQ([2.62])dnl
dnl Autoconf wants to disallow AM_ names. We explicitly allow
dnl the ones we care about.
m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
AC_REQUIRE([AC_PROG_INSTALL])dnl
if test "`cd $srcdir && pwd`" != "`pwd`"; then
# Use -I$(srcdir) only when $(srcdir) != ., so that make's output
# is not polluted with repeated "-I."
AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
# test to see if srcdir already configured
if test -f $srcdir/config.status; then
AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
fi
fi
# test whether we have cygpath
if test -z "$CYGPATH_W"; then
if (cygpath --version) >/dev/null 2>/dev/null; then
CYGPATH_W='cygpath -w'
else
CYGPATH_W=echo
fi
fi
AC_SUBST([CYGPATH_W])
# Define the identity of the package.
dnl Distinguish between old-style and new-style calls.
m4_ifval([$2],
[AC_DIAGNOSE([obsolete],
[$0: two- and three-arguments forms are deprecated. For more info, see:
http://www.gnu.org/software/automake/manual/automake.html#Modernize-AM_INIT_AUTOMAKE-invocation])
m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
AC_SUBST([PACKAGE], [$1])dnl
AC_SUBST([VERSION], [$2])],
[_AM_SET_OPTIONS([$1])dnl
dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
m4_if(
m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
[ok:ok],,
[m4_fatal([AC_INIT should be called with package and version arguments])])dnl
AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
_AM_IF_OPTION([no-define],,
[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
# Some tools Automake needs.
AC_REQUIRE([AM_SANITY_CHECK])dnl
AC_REQUIRE([AC_ARG_PROGRAM])dnl
AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
AM_MISSING_PROG([AUTOCONF], [autoconf])
AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
AM_MISSING_PROG([AUTOHEADER], [autoheader])
AM_MISSING_PROG([MAKEINFO], [makeinfo])
AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
AC_REQUIRE([AC_PROG_MKDIR_P])dnl
# For better backward compatibility. To be removed once Automake 1.9.x
# dies out for good. For more background, see:
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
AC_REQUIRE([AC_PROG_AWK])dnl
AC_REQUIRE([AC_PROG_MAKE_SET])dnl
AC_REQUIRE([AM_SET_LEADING_DOT])dnl
_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
[_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
[_AM_PROG_TAR([v7])])])
_AM_IF_OPTION([no-dependencies],,
[AC_PROVIDE_IFELSE([AC_PROG_CC],
[_AM_DEPENDENCIES([CC])],
[m4_define([AC_PROG_CC],
m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_CXX],
[_AM_DEPENDENCIES([CXX])],
[m4_define([AC_PROG_CXX],
m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
AC_PROVIDE_IFELSE([AC_PROG_OBJC],
[_AM_DEPENDENCIES([OBJC])],
[m4_define([AC_PROG_OBJC],
m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
dnl Support for Objective C++ was only introduced in Autoconf 2.65,
dnl but we still cater to Autoconf 2.62.
m4_ifdef([AC_PROG_OBJCXX],
[AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
[_AM_DEPENDENCIES([OBJCXX])],
[m4_define([AC_PROG_OBJCXX],
m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])])dnl
])
_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
dnl The 'parallel-tests' driver may need to know about EXEEXT, so add the
dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
AC_CONFIG_COMMANDS_PRE(dnl
[m4_provide_if([_AM_COMPILER_EXEEXT],
[AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
])
dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
dnl mangled by Autoconf and run in a shell conditional statement.
m4_define([_AC_COMPILER_EXEEXT],
m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
# When config.status generates a header, we must update the stamp-h file.
# This file resides in the same directory as the config header
# that is generated. The stamp files are numbered to have different names.
# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
# loop where config.status creates the headers, so we can generate
# our stamp files there.
AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
[# Compute $1's index in $config_headers.
_am_arg=$1
_am_stamp_count=1
for _am_header in $config_headers :; do
case $_am_header in
$_am_arg | $_am_arg:* )
break ;;
* )
_am_stamp_count=`expr $_am_stamp_count + 1` ;;
esac
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 8
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
AC_DEFUN([AM_PROG_INSTALL_SH],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
if test x"${install_sh}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
*)
install_sh="\${SHELL} $am_aux_dir/install-sh"
esac
fi
AC_SUBST([install_sh])])
# Copyright (C) 2003-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
[rm -rf .tst 2>/dev/null
mkdir .tst 2>/dev/null
if test -d .tst; then
am__leading_dot=.
else
am__leading_dot=_
fi
rmdir .tst 2>/dev/null
AC_SUBST([am__leading_dot])])
# Check to see how 'make' treats includes. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 5
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
AC_DEFUN([AM_MAKE_INCLUDE],
[am_make=${MAKE-make}
cat > confinc << 'END'
am__doit:
@echo this is the am__doit target
.PHONY: am__doit
END
# If we don't find an include directive, just comment out the code.
AC_MSG_CHECKING([for style of include used by $am_make])
am__include="#"
am__quote=
_am_result=none
# First try GNU make style include.
echo "include confinc" > confmf
# Ignore all kinds of additional output from 'make'.
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=include
am__quote=
_am_result=GNU
;;
esac
# Now try BSD make style include.
if test "$am__include" = "#"; then
echo '.include "confinc"' > confmf
case `$am_make -s -f confmf 2> /dev/null` in #(
*the\ am__doit\ target*)
am__include=.include
am__quote="\""
_am_result=BSD
;;
esac
fi
AC_SUBST([am__include])
AC_SUBST([am__quote])
AC_MSG_RESULT([$_am_result])
rm -f confinc confmf
])
# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
# Copyright (C) 1997-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 7
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
[AC_REQUIRE([AM_MISSING_HAS_RUN])
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
# If it does, set am_missing_run to use it, otherwise, to nothing.
AC_DEFUN([AM_MISSING_HAS_RUN],
[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
AC_REQUIRE_AUX_FILE([missing])dnl
if test x"${MISSING+set}" != xset; then
case $am_aux_dir in
*\ * | *\ *)
MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
*)
MISSING="\${SHELL} $am_aux_dir/missing" ;;
esac
fi
# Use eval to expand $SHELL
if eval "$MISSING --run true"; then
am_missing_run="$MISSING --run "
else
am_missing_run=
AC_MSG_WARN(['missing' script is too old or missing])
fi
])
# Helper functions for option handling. -*- Autoconf -*-
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 6
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
# _AM_SET_OPTIONS(OPTIONS)
# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
# -------------------------------------------
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
AC_DEFUN([_AM_IF_OPTION],
[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
# Check to make sure that the build environment is sane. -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 9
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
[AC_MSG_CHECKING([whether build environment is sane])
# Reject unsafe characters in $srcdir or the absolute working directory
# name. Accept space and tab only in the latter.
am_lf='
'
case `pwd` in
*[[\\\"\#\$\&\'\`$am_lf]]*)
AC_MSG_ERROR([unsafe absolute working directory name]);;
esac
case $srcdir in
*[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
esac
# Do 'set' in a subshell so we don't clobber the current shell's
# arguments. Must try -L first in case configure is actually a
# symlink; some systems play weird games with the mod time of symlinks
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
am_has_slept=no
for am_try in 1 2; do
echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
# If neither matched, then we have a broken ls. This can happen
# if, for instance, CONFIG_SHELL is bash and it inherits a
# broken ls alias from the environment. This has actually
# happened. Such a system could not be considered "sane".
AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
alias in your environment])
fi
if test "$[2]" = conftest.file || test $am_try -eq 2; then
break
fi
# Just in case.
sleep 1
am_has_slept=yes
done
test "$[2]" = conftest.file
)
then
# Ok.
:
else
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
AC_MSG_RESULT([yes])
# If we didn't sleep, we still need to ensure time stamps of config.status and
# generated files are strictly newer.
am_sleep_pid=
if grep 'slept: no' conftest.file >/dev/null 2>&1; then
( sleep 1 ) &
am_sleep_pid=$!
fi
AC_CONFIG_COMMANDS_PRE(
[AC_MSG_CHECKING([that generated files are newer than configure])
if test -n "$am_sleep_pid"; then
# Hide warnings about reused PIDs.
wait $am_sleep_pid 2>/dev/null
fi
AC_MSG_RESULT([done])])
rm -f conftest.file
])
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 2
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor 'install' (even GNU) is that you can't
# specify the program used to strip binaries. This is especially
# annoying in cross-compiling environments, where the build's strip
# is unlikely to handle the host's binaries.
# Fortunately install-sh will honor a STRIPPROG variable, so we
# always use install-sh in "make install-strip", and initialize
# STRIPPROG with the value of the STRIP variable (set by the user).
AC_DEFUN([AM_PROG_INSTALL_STRIP],
[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
# Installed binaries are usually stripped using 'strip' when the user
# run "make install-strip". However 'strip' might not be the right
# tool to use in cross-compilation environments, therefore Automake
# will honor the 'STRIP' environment variable to overrule this program.
dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
if test "$cross_compiling" != no; then
AC_CHECK_TOOL([STRIP], [strip], :)
fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
# Copyright (C) 2006-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
# This macro is traced by Automake.
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
# Copyright (C) 2004-2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# serial 3
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
# FORMAT should be one of 'v7', 'ustar', or 'pax'.
#
# Substitute a variable $(am__tar) that is a command
# writing to stdout a FORMAT-tarball containing the directory
# $tardir.
# tardir=directory && $(am__tar) > result.tar
#
# Substitute a variable $(am__untar) that extract such
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
[# Always define AMTAR for backward compatibility. Yes, it's still used
# in the wild :-( We should find a proper way to deprecate it ...
AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
[am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
# Loop over all known methods to create a tar archive until one works.
_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
_am_tools=${am_cv_prog_tar_$1-$_am_tools}
# Do not fold the above two line into one, because Tru64 sh and
# Solaris sh will not grok spaces in the rhs of '-'.
for _am_tool in $_am_tools
do
case $_am_tool in
gnutar)
for _am_tar in tar gnutar gtar;
do
AM_RUN_LOG([$_am_tar --version]) && break
done
am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
am__untar="$_am_tar -xf -"
;;
plaintar)
# Must skip GNU tar: if it does not support --format= it doesn't create
# ustar tarball either.
(tar --version) >/dev/null 2>&1 && continue
am__tar='tar chf - "$$tardir"'
am__tar_='tar chf - "$tardir"'
am__untar='tar xf -'
;;
pax)
am__tar='pax -L -x $1 -w "$$tardir"'
am__tar_='pax -L -x $1 -w "$tardir"'
am__untar='pax -r'
;;
cpio)
am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
am__untar='cpio -i -H $1 -d'
;;
none)
am__tar=false
am__tar_=false
am__untar=false
;;
esac
# If the value was cached, stop now. We just wanted to have am__tar
# and am__untar set.
test -n "${am_cv_prog_tar_$1}" && break
# tar/untar a dummy directory, and stop if the command works
rm -rf conftest.dir
mkdir conftest.dir
echo GrepMe > conftest.dir/file
AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
rm -rf conftest.dir
if test -s conftest.tar; then
AM_RUN_LOG([$am__untar <conftest.tar])
grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
fi
done
rm -rf conftest.dir
AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
AC_MSG_RESULT([$am_cv_prog_tar_$1])])
AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR

View File

@ -1,87 +0,0 @@
/* config.h.in. Generated from configure.in by autoheader. */
/* Define to 1 if you have the <dirent.h> header file. */
#undef HAVE_DIRENT_H
/* Define to 1 if you have the <fcntl.h> header file. */
#undef HAVE_FCNTL_H
/* Define to 1 if you have the <fnmatch.h> header file. */
#undef HAVE_FNMATCH_H
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
#undef HAVE_NDIR_H
/* Define to 1 if you have the <regex.h> header file. */
#undef HAVE_REGEX_H
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
/* Define to 1 if you have the <stdio.h> header file. */
#undef HAVE_STDIO_H
/* Define to 1 if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
/* Define to 1 if you have the <strings.h> header file. */
#undef HAVE_STRINGS_H
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_DIR_H
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
*/
#undef HAVE_SYS_NDIR_H
/* Define to 1 if you have the <sys/stat.h> header file. */
#undef HAVE_SYS_STAT_H
/* Define to 1 if you have the <sys/types.h> header file. */
#undef HAVE_SYS_TYPES_H
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Name of package */
#undef PACKAGE
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
/* Version number of package */
#undef VERSION
/* Define to empty if `const' does not conform to ANSI C. */
#undef const

6139
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,42 +0,0 @@
# Process this file with autoconf to produce a configure script.
AC_INIT
AC_CONFIG_SRCDIR([src/prtget.cpp])
AM_INIT_AUTOMAKE(prt-get,5.19.5)
dnl Determine default prefix
test x$prefix = "xNONE" && prefix="$ac_default_prefix"
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_PREFIX_DEFAULT(/usr)
# Checks for libraries.
# Checks for header files.
AC_HEADER_DIRENT
AC_CHECK_HEADERS(unistd.h stdio.h sys/types.h sys/stat.h fnmatch.h \
dirent.h fcntl.h signal.h regex.h)
CFLAGS="$CFLAGS $X_CFLAGS"
CXXFLAGS="$CXXFLAGS $X_CFLAGS"
LIBS="$LIBS $X_LIBS"
LDFLAGS="$LDFLAGS $LIBS $X_PRE_LIBS"
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
# I hate you autotools
sysconfdir="/etc"
localstatedir="/var"
# Checks for library functions.
AM_CONFIG_HEADER(config.h)
AC_CONFIG_FILES([Makefile
src/Makefile
doc/Makefile
misc/Makefile])
AC_OUTPUT

423
depcomp
View File

@ -1,423 +0,0 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
# Copyright 1999, 2000 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# `libtool' can also be set to `yes' or `no'.
if test -z "$depfile"; then
base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
dir=`echo "$object" | sed 's,/.*$,/,'`
if test "$dir" = "$object"; then
dir=
fi
# FIXME: should be _deps on DOS.
depfile="$dir.deps/$base"
fi
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
"$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say).
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
## The second -e expression handles DOS-style file names with drive letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the `deleted header file' problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
tr ' ' '
' < "$tmpdepfile" |
## Some versions of gcc put a space before the `:'. On the theory
## that the space means something, we add a space to the output as
## well.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like `#:fec' to the end of the
# dependency line.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
tr '
' ' ' >> $depfile
echo >> $depfile
# The second pass generates a dummy entry for each header file.
tr ' ' '
' < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> $depfile
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. This file always lives in the current directory.
# Also, the AIX compiler puts `$object:' at the start of each line;
# $object doesn't have directory information.
stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
tmpdepfile="$stripped.u"
outname="$stripped.o"
if test "$libtool" = yes; then
"$@" -Wc,-M
else
"$@" -M
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile"
exit $stat
fi
if test -f "$tmpdepfile"; then
# Each line is of the form `foo.o: dependent.h'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
else
# The sourcefile does not contain any dependencies, so just
# store a dummy comment line, to avoid errors with the Makefile
# "include basename.Plo" scheme.
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in `foo.d' instead, so we check for that too.
# Subdirectories are respected.
dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
test "x$dir" = "x$object" && dir=
base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
if test "$libtool" = yes; then
tmpdepfile1="$dir.libs/$base.lo.d"
tmpdepfile2="$dir.libs/$base.d"
"$@" -Wc,-MD
else
tmpdepfile1="$dir$base.o.d"
tmpdepfile2="$dir$base.d"
"$@" -MD
fi
stat=$?
if test $stat -eq 0; then :
else
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
if test -f "$tmpdepfile1"; then
tmpdepfile="$tmpdepfile1"
else
tmpdepfile="$tmpdepfile2"
fi
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
# That's a space and a tab in the [].
sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
else
echo "#dummy" > "$depfile"
fi
rm -f "$tmpdepfile"
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'. We will use -o /dev/null later,
# however we can't do the remplacement now because
# `-o $object' might simply not be used
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
"$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
tr ' ' '
' < "$tmpdepfile" | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# X makedepend
shift
cleared=no
for arg in "$@"; do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
-*)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix="`echo $object | sed 's/^.*\././'`"
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
sed '1,2d' "$tmpdepfile" | tr ' ' '
' | \
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test $1 != '--mode=compile'; do
shift
done
shift
fi
# Remove `-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E |
sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the proprocessed file to stdout, regardless of -o,
# because we must use -o when running libtool.
"$@" || exit $?
IFS=" "
for arg
do
case "$arg" in
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
echo " " >> "$depfile"
. "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0

View File

@ -1,10 +0,0 @@
man_MANS = prt-get.8 prt-cache.8 prt-get.conf.5
clean-local:
rm -rf *.log *.aux *.toc *.dvi *.idx *.pdf api
apidoc:
doxygen
EXTRA_DIST = $(man_MANS) coding

View File

@ -1,492 +0,0 @@
# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = doc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
man5dir = $(mandir)/man5
am__installdirs = "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"
man8dir = $(mandir)/man8
NROFF = nroff
MANS = $(man_MANS)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
man_MANS = prt-get.8 prt-cache.8 prt-get.conf.5
EXTRA_DIST = $(man_MANS) coding
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu doc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-man5: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man5dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.5[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \
done; }
uninstall-man5:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man5dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.5[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir)
install-man8: $(man_MANS)
@$(NORMAL_INSTALL)
@list1=''; \
list2='$(man_MANS)'; \
test -n "$(man8dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
| sed -n '/\.8[a-z]*$$/p'; \
fi; \
} | while read p; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \
done; }
uninstall-man8:
@$(NORMAL_UNINSTALL)
@list=''; test -n "$(man8dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \
sed -n '/\.8[a-z]*$$/p'; \
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@list='$(MANS)'; if test -n "$$list"; then \
list=`for p in $$list; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
if test -n "$$list" && \
grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
echo "error: found man pages containing the 'missing help2man' replacement text:" >&2; \
grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
echo " typically 'make maintainer-clean' will remove them" >&2; \
exit 1; \
else :; fi; \
else :; fi
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(MANS)
installdirs:
for dir in "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man8dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic clean-local mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am: install-man
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am:
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man: install-man5 install-man8
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-man
uninstall-man: uninstall-man5 uninstall-man8
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic clean-local \
distclean distclean-generic distdir dvi dvi-am html html-am \
info info-am install install-am install-data install-data-am \
install-dvi install-dvi-am install-exec install-exec-am \
install-html install-html-am install-info install-info-am \
install-man install-man5 install-man8 install-pdf \
install-pdf-am install-ps install-ps-am install-strip \
installcheck installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am uninstall uninstall-am uninstall-man \
uninstall-man5 uninstall-man8
clean-local:
rm -rf *.log *.aux *.toc *.dvi *.idx *.pdf api
apidoc:
doxygen
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

110
doc/i3-softdeps.md Normal file
View File

@ -0,0 +1,110 @@
# Followup on installing i3 with the softdeps-aware fork of prt-get
## (Was: Re: [prt-get nicetohave](https://lists.crux.nu/pipermail/crux/2023-August/007375.html))
## 2023-08-25
The "Optional" metadata field stirred up some controversy when first
proposed. At the time, it was preferred to write Pkgfiles whose build()
functions contain no branching logic to customize the build for the host
machine. Maintainers would even try to suppress the branching logic hidden
inside the autotools ./configure script using command-line switches to
hard-code the desired defaults [1]. Peer pressure eventually wore away at
the resistance to this new metadata field, so it is now in widespread use
despite there being no official mandate for contributors to test their ports
under all possible configurations. Whenever a port can adapt to a variety of
use-cases, maintainers try to document that versatility in the "Optional"
field. But our package management tools remain unable to use that data! At
present, it requires a human reading the Pkgfile, for the data in the "Optional"
field to affect the order in which ports are built. Thankfully, sorting with
optional dependencies taken into account is now possible in prt-get itself,
either with the
[softdeps](https://git.crux.nu:82/farkuhar/prt-get/src/branch/softdeps) or the
[mixed-upinst](https://git.crux.nu:82/farkuhar/prt-get/src/branch/mixed-upinst)
branch of the fork by farkuhar.
Respecting the limitations of a prt-get that only knows about hard dependencies
would entail following the old practice and hard-coding the configure options
in each port. This example of letting our tools dictate how we work (rather
than updating the tools to fit a new workflow) would encourage a portdb more
like the AUR, with a seemingly endless variety of dups that all have
their own particular combination of configure options. Thankfully the
unwieldiness of this prospect was enough to deter maintainers from clinging to
an outmoded interpretation of KISS [3], and they adopted the new norm of
"fluid Pkgfiles" (FS#1576) even as prt-get remained unable to incorporate this
fluidity in its operations.
As recently as November 2021, users of CRUX could still have noticed a remnant
of the historical preference for non-fluid Pkgfiles, illustrated by the
coexisting pair harfbuzz and harfbuzz-icu. These ports differed from each other
only in the configuration option that enables linking to icu. A port that
depends on the icu-linked harfbuzz would list harfbuzz-icu among its
dependencies, while a port that did not require such linking would only
list harfbuzz.
Such dups in the portdb, all using the same upstream tarball, inevitably
have overlapping footprints, and it becomes impossible to avoid filesystem
collisions if a user running `prt-get depinst foo` triggers an attempt to
pkgadd a variant of an already-installed port. Once the set of installed
ports is sufficiently diverse, maintaining prt-get.aliases so as to avoid
such collisions becomes an impossible task.
Nix (and GoboLinux even earlier) solves the overlapping footprint problem
by giving each package its own separate directory in the filesystem. This
solution arguably fits quite well with the historical CRUX preference for
rigid Pkgfiles, offering a one-to-one correspondence between a repository
of non-fluid ports, and the filesystem where built packages are unpacked.
But CRUX was reluctant to impose an additional layer of complexity on top
of the Filesystem Hierarchy Standard, and so the Nix and GoboLinux solution
never gained serious consideration in the CRUX community.
As the last vestige of a historical preference for non-fluid ports,
harfbuzz and harfbuzz-icu persisted alongside each other until surprisingly
recently, only getting merged into one fluid port with commit
b2e30dbf8c96e03f4fe4b39b1e5ffbecd8372787. This merge allowed users to
simplify prt-get.aliases, removing `harfbuzz-icu: harfbuzz` (if they had
ever added such an entry to avoid filesystem collisions).
Equipping prt-get with softdeps awareness is just letting our tools evolve
to match the trend toward fluid Pkgfiles. If the new prt-get capabilities
are deemed to violate the CRUX Mantra [2], then the same criticism can be
leveled against fluid Pkgfiles. Such criticisms were in fact expressed
(by Anton most stridently, and by Tilman and Juergen in a gentler tone)
during the discussions of USE flags and "prt-get nicetohave" [3,4]. But the
resistance to fluid Pkgfiles has diminished over the years, to such an extent
that nobody has seriously proposed crafting the dependency graph so that
`prt-get depinst i3` is impossible to fail [5], say by making i3 depend on a
duplicate port libxkbcommon-x11 (which would differ from libxkbcommon only by
hard-coding the meson option "-D enable-x11" and by listing xkeyboard-config
as a hard dependency --- similar to how harfbuzz-icu differed from harfbuzz).
A duplicate port of libxkbcommon is indeed a KISS solution, with prt-get in its
present state. That nobody bothered to propose such a dup is a clear indication
that we are not going back to non-fluid Pkgfiles anytime soon. So either our
Pkgfiles have irrevocably become "just a bit" more complex (and therefore no
longer "simple"), or they are in fact the simplest way to accommodate the modern
software landscape. In the latter case, a KISS objection to the corresponding
logic in prt-get is hypocritical. In the former case, it could be argued that two
wrongs do not make a right, and the trend away from KISS Pkgfiles does not
justify making prt-get "just a bit" more complex. But then we would have an
awkward mismatch between the capabilities of prt-get, and the ports that it
has to handle. This mismatch is only a slight annoyance at present (the
experienced users that make up the CRUX target audience can usually diagnose
the problem themselves if they encounter a build failure like [5]), but before the
software landscape becomes even more convoluted and such build failures harder
to avoid, we should have the discussion on adding new logic to prt-get.
[1] It should be noted that the autotools ./configure script (or its
meson or cmake counterpart) might not actually expose all compile-time
options via command-line switches. Hence some testing of the host
environment is unavoidable, unless the port maintainer performs substantial
downstream patching of the source tree.
[2] We do not want to prepare for all necessities and build a complex system
which in 90% of all cases is overkill ... making something "just a bit"
more complex is not "simple" anymore. (https://crux.nu/Main/Mantra)
[3] https://lists.crux.nu/pipermail/crux-devel/2006-August/001912.html
[4] https://lists.crux.nu/pipermail/crux-devel/2008-May/003366.html
[5] The possibility of this command failing was first noted by jaeger in
https://libera.irclog.whitequark.org/crux/2023-08-21 (16:36)

291
doc/i3-softdeps.test Normal file
View File

@ -0,0 +1,291 @@
Thanks to hestia and jaeger for inspiring this hacking session (2023-08-22).
(Update 2023-08-25): see i3-softdeps.md in this directory for more
discussion on the merits of adding new prt-get features.
In light of the recent changes to libxkbcommon, jaeger made the observation
that `prt-get depinst i3` on a core-only system hits an error, as
libxkbcommon will be built without x11 support. To establish a reference point
for subsequent experiments, here is the list of targets that would be selected
by the latest official release of prt-get (5.19.6), in response to the
recommended way of installing a desired port.
All commands were performed on a pkg-cleaned installation of CRUX 3.7, leaving
the ports at whatever outdated version they had when this particular system was
last in daily use.
In[0]: prt-get depinst --test i3
Out[0]:
*** prt-get: test mode
-- Packages installed
fribidi
xorg-util-macros
xorg-libpixman
libev
libpng
libxml2
xorg-xtrans
libxkbcommon
libxslt
xorg-xcb-proto
yajl
xorg-xorgproto
freetype
glib
xorg-libice
xorg-libxau
xorg-libxdmcp
fontconfig
gobject-introspection
xorg-libsm
xorg-libxcb
xorg-libx11
xorg-xcb-util
xorg-xcb-util-renderutil
xorg-xcb-util-keysyms
xorg-xcb-util-wm
xorg-libxext
xorg-libxrender
xorg-libxt
xorg-libxkbfile
xorg-xcb-util-image
xorg-xcb-util-xrm
cairo
startup-notification
xorg-xkbcomp
xorg-xcb-util-cursor
harfbuzz
xkeyboard-config
xorg-libxft
pango
i3
-- installed packages with README files:
fontconfig
prt-get: installed successfully
*** prt-get: test mode end
As seen in the output above, at the time of building libxkbcommon, there are
only 7 non-core ports installed, none of which is xkeyboard-config,
so the flag '-D enable-x11=false' gets passed to the meson setup command for
libxkbcommon. Thus the necessary linking to x11 libs does not happen, and i3
cannot compile successfully.
Suppose we try to fix this omission in the most natural way: append
xkeyboard-config at the end of i3's dependency list.
sed -i '/^# Depends on/s/$/ xkeyboard-config/' /usr/ports/opt/i3/Pkgfile
Even this change is not enough! prt-get is not aware of the optional
dependency relationship between libxkbcommon and xkeyboard-config, and so
cannot insist that libxkbcommon comes later in the list of targets. jw
came to a similar conclusion 15 years ago (footnote 1).
Let's see whether farkuhar's softdeps-aware fork can do any better on this
task. The naive approach, prt-get depinst --softdeps i3, still doesn't work
because it will not automagically make two passes through the dependency tree
(the first pass to assemble a minimal installation set, and the second pass to
insert edges in the digraph based on optional dependency relationships among
the targets found). Instead, you have to manually ask for two traversals of the
dependency tree using a command substitution.
In[1]: prt-get isinst $(prt-get quickdep i3) | awk '/not installed/ {print $2}' \
| xargs prt-get depinst --test --softdeps
(Note that it's also necessary to filter out the already-installed ports before
passing the quickdep output to `prt-get depinst` because this branch still
makes a distinction between install and update transactions.)
Out[1]:
*** prt-get: test mode
-- Packages installed
fribidi
xorg-util-macros
xorg-libpixman
libev
xorg-xtrans
libpng
libxml2
fontconfig
libxslt
xorg-xcb-proto
yajl
xorg-xorgproto
glib [post: deferred]
xorg-libxau
xorg-libxdmcp
xorg-libice
xorg-libxcb
xorg-libsm
xorg-libx11
xorg-xcb-util
xorg-xcb-util-renderutil
xorg-xcb-util-keysyms
xorg-xcb-util-wm
xorg-libxkbfile
xorg-libxext
xorg-libxrender
xorg-libxt
xorg-xcb-util-image
xorg-xcb-util-xrm
xorg-xkbcomp
cairo
startup-notification
xorg-xcb-util-cursor
xkeyboard-config
gobject-introspection
libxkbcommon
harfbuzz
freetype
xorg-libxft
pango
i3
-- installed packages with README files:
/usr/ports/opt/fontconfig
prt-get: installed successfully
*** prt-get: test mode end
This output looks more likely to succeed. Note that libxkbcommon would be built
AFTER its optional dependency xkeyboard-config, because when xkeyboard-config
appears among the depinst targets, that dependency relationship gets
incorporated into the sorting algorithm.
The mixed-upinst branch of farkuhar's prt-get goes further. Not only do you
get the feature of respecting optional dependencies, you can also do the
command substitution without the awk filter, and the appropriate mode
(install or update) will be selected for each target.
In[2]: prt-get depinst --softdeps --test $(prt-get quickdep i3)
Out[2]:
*** prt-get: test mode
-- Successful packages
fribidi
xz
zlib
ncurses
expat
libffi
libnghttp2
openssl
libuv
lzlib
rhash
xorg-util-macros
libpcre2
xorg-libpixman
libev
libpng
elfutils
libxml2
readline
fontconfig
xorg-xtrans
file
curl
libxslt
sqlite3
libarchive
util-linux
python3
cmake
python3-setuptools
xorg-xcb-proto
yajl
meson
xorg-xorgproto
glib [post: deferred]
xorg-libxau
xorg-libxdmcp
xorg-libice
xorg-libxcb
xorg-libsm
xorg-libx11
xorg-xcb-util
xorg-xcb-util-renderutil
xorg-xcb-util-keysyms
xorg-xcb-util-wm
xorg-libxkbfile
xorg-libxext
xorg-libxrender
xorg-libxt
xorg-xcb-util-image
xorg-xcb-util-xrm
xorg-xkbcomp
cairo
startup-notification
xorg-xcb-util-cursor
xkeyboard-config
gobject-introspection
libxkbcommon
harfbuzz
freetype
xorg-libxft
pango
i3
-- Successful packages with README files:
fontconfig
prt-get: install successful.
*** prt-get: test mode end
The output of the last command reveals why we recommend performing a sysup
before installing new ports. Because dependencies in core are not listed unless
they are dynamically linked in, some of the out-of-date core ports on my test
system would get updated later, possibly leading to breakage (e.g, if the
desired port is relying on a new or backward-incompatible feature in one of
the foundational pieces of the toolchain).
Footnotes:
1. https://lists.crux.nu/pipermail/crux-devel/2008-May/003375.html
2. The more intuitive version of the above commands, `prt-get depinst
--test --softdeps i3`, currently does NOT consider the dependency
relationship "libxkbcommon optionally depends on xkeyboard-config", because
the latter port is neither currently installed, nor listed explicitly as an
install target. This safeguard is meant to allow the operation to proceed
after a SINGLE pass through the deptree, without pulling in ALL the ports
listed as "Optional:" . In future we might consider letting the more
intuitive command automatically make TWO passes through the deptree:
first to pick up all the hard dependencies, and then to insert edges in the
digraph that encode the optional dependencies among these targets. But such
"automagic side-effects" (two traversals versus one) are typically frowned
upon in CRUX, so for now we are happy to employ the command substitution
$(prt-get quickdep i3) thereby communicating to prt-get our intention for
two traversals of the deptree.
3. The result of trial 2 would be identical to that of
`prt-get install --softdeps $(prt-get quickdep i3)` using the
mixed-upinst branch, because 'install' on this branch behaves the same
as 'depinst'. In https://lists.crux.nu/pipermail/crux/2008-June/001784.html
jw describes this change as "prt-get no more silently assumes that the user
didn't want a particular dependency".
farkuhar's mixed-upinst branch still gives you the option to override this
dependency-resolution-by-default; you just have to enter 'install --nodeps'
instead of simply 'install'.
4. Some maintainers prefer to do a filesystem check to determine whether a
needed dependency was linked to one of its optional libraries, and then
exit early with a message alerting the user to rebuild one of the packages
in the dependency tree. See contrib/libreoffice for an example. This
preference is arguably more aligned with CRUX's stance against excessively
"holding the user's hand". The softdeps feature is not intended to supplant
the user's thinking, but rather to give convenient access to a more versatile
topological sorting algorithm than the one coded in the official prt-get. The
toposort algorithm used in the above experiments remains true to the style
of jw's original code, but you can see another working implementation in
farkuhar's Perl rewrite
https://git.sdf.org/jmq/Documentation/src/branch/master/scripts/prt-auf .

1
doc/meson.build Normal file
View File

@ -0,0 +1 @@
install_man(['prt-cache.8', 'prt-get.8', 'prt-get.conf.5'])

View File

@ -14,7 +14,7 @@ prt\-cache is a synonym for
.B prt\-get --cache.
It's perfectly the same as calling prt\-get --cache, just shorter. See
.B man prt-get(8)
for details on how to use prt-get
for details on how to use prt-get.
.PP
Even though there are almost restrictions on using prt-cache over prt-get,
@ -38,7 +38,11 @@ ports tree),
and
.B prt-cache update
will use the version from the ports tree anyway, so there's no real
risk.
risk. On the other hand,
.B prt-cache depinst
will use the outdated cache for dependency resolution, which might be a problem
if the maintainer of your desired port has added dependencies since the last
time you generated the cache.
.PP
If you're using prt-cache, make sure to regenerate the cache by calling
@ -48,9 +52,39 @@ each time you make changes to the ports tree!
.PP
To create a cache, just invoke
.B prt-get cache.
Make sure you have the right permissions to do this
Make sure you have the right permissions to do this.
.SH "CACHE FORMAT"
.PP
The cache is a flat-text file, typically found at /var/lib/pkg/prt-get.cache.
The first line records the cache format identifier, to prevent prt-cache from
performing an operation using an incompatible cache format. The rest of the
file consists of 13 lines per port: name, absolute path to the repository,
version, release, description, dependencies, URL, optional dependencies,
maintainer, readme, pre-install, post-install, and a blank (separator) line. If
multiple ports with the same name appear among the active collections (as
reported by \fBprt\-get dup\fP), only the first port will be listed in the
cache.
.PP
Suppose you want to create a dependency map, like the one used by the setup
program when installing from a CRUX ISO. One way to do so is to run \fBprt\-get
cache\fP, and then process the resulting file with \fBawk(1)\fP:
.B
tail -n +2 /var/lib/pkg/prt-get.cache | awk '((NR-1) % 13 < 2) { printf("%s : ",$0) } (NR %13 == 6) { gsub(/,/," ",$0); printf("%s\\n",$0) }' | awk -F: '/ \\/usr\\/ports\\/(core|opt|xorg) / { printf("%-25s : %s\\n",$1,$3) }' | tee -a setup.dependencies
.PP
A slight variation will also extract all the optional dependencies of each
port, in case you want to mimic Gentoo USE flags by editing the resulting file
and referring to it in a wrapper script, as illustrated by the ffmpeg example
in the \fBprt\-get\fP(8) man-page.
.B
tail -n +2 /var/lib/pkg/prt-get.cache | awk '((NR-1) % 13 == 0) { printf("%s : ",$0) } (NR %13 == 8) { gsub(/,/," ",$0); printf("%s\\n",$0) }' | sudo tee -a /etc/prt-get.softdeps
.SH "AUTHORS"
Johannes Winkelmann <jw@tks6.net>
Johannes Winkelmann <jw@tks6.net>, John McQuah <jmcquah@disroot.org>
.SH "SEE ALSO"
prt-get(8), pkgmk(8) pkgadd(8), ports(8)

View File

@ -1,7 +1,8 @@
.\" man page for prt-get
.\" Johannes Winkelmann, jw@tks6.net
.\" original work by Johannes Winkelmann, jw at tks6 dot net
.\"
.\" my first man page, so forgive me for the errors :-)
.\" extended in 2013 by Alan Mizrahi, alan at mizrahi dot com dot ve
.\" and in 2023 by John McQuah, jmcquah at disroot dot org
.\"
.\" .PU
.TH "prt-get" "8" "" "" ""
@ -13,10 +14,10 @@ pkgutils from CRUX (see http://www.crux.nu)
.B prt\-get command [options] <arguments>
.br
.SH "DESCRIPTION"
prt\-get is a package management tool which provides additional
functionality to crux' package management system. It works with the
prt-get is a package management tool which provides additional
functionality to the CRUX package management system. It works with the
local ports tree and is therefore fully compatible with ports(8) and
pkgmk(8)/pkgadd(8). It offers the following features:
pkgmk(8)/pkgadd(8)/pkgrm(8). It offers the following features:
.PP
.TP
@ -41,103 +42,108 @@ search within the ports
.PP
What prt\-get basically does is installing and upgrading packages, using
pkgmk and pkgadd. Additionally, you don't have be in the port's
directory to call prt\-get. prt\-get will search for the respective port
itself in a list of directories specified in /etc/prt\-get.conf. This
What prt-get basically does is build, install/upgrade, and remove packages,
using pkgmk, pkgadd, and pkgrm. Additionally, you don't have be in the port's
directory to call prt-get. prt-get will search for the respective port
itself in a list of directories specified in /etc/prt-get.conf. This
allows you to just install or update a package, without caring where
it actually is located on your file system.
.PP
prt\-get also offers some features like searching ports by name,
showing information about ports (without installing them of course)
and can list the dependencies listed in the Pkgfile, and provide a
complete dependency list for a port. Note that dependencies are no
requirement for crux packages and therefore not always accurate. There's
a possiblity to use an external dependency map to get dependency
listings for ports which don't provide them in their Pkgfile.
prt-get also lets you search for ports by name,
find information about ports (without installing them of course),
or print the dependencies of a port (as a space- or newline-separated list,
or a formatted tree). Note that dependencies are no
requirement for crux packages and therefore not always accurate.
.PP
prt\-get has a test mode so you can see what effect an install/update
operation would have. Use the \-\-test switch for this (see also:
OPTIONS)
prt-get has a test mode so you can see what effect an install/update
operation would have. Use the --test switch for this (more details in
the \fBOPTIONS\fP section below).
.SH "RETURN VALUE"
prt\-get returns 0 on success and a non-zero value otherwise (exact
prt-get returns 0 on success and a non-zero value otherwise (exact
value -> meaning mapping to be determined...)
.SH "COMMANDS"
prt\-get uses so called commands, which always have to be the first
prt-get uses so-called commands, which always have to be the first
non-option argument passed. This is very similar to
.B cvs(1).
[command] can be one of the following:
.TP
.B install [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
install all packages in the listed order. Note that you can do this
from any directory
.B install [\-\-margs] [\-\-aargs] [\-\-log] [\-\-nodeps] [\-\-softdeps] <package1> [<package2> ...]
Install or update the packages given on the command line. Note that you can do
this from any directory. Pass the --nodeps flag to prevent \fBprt\-get\fP from
resolving dependencies and injecting any needed packages into the list of targets.
Pass the --softdeps flag if you want the dependency resolver to also consider
the "Optional" relationships among the packages given on the command line.
.TP
.B depinst [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
install all packages in the listed order including their dependencies.
Note that outdated packages won't be updated.
.B depinst [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
Basically a synonym for install (without the --nodeps flag).
.TP
.B grpinst [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
install all packages in the listed order, but stop if installation of
one package fails. This can be used to install packages where package2
depends on package1
.TP
.B update [\-\-margs] [\-\-aargs] [\-\-log] <package1> [<package2> ...]
update all packages listed in this order
.B update [\-\-margs] [\-\-aargs] [\-\-log] [\-\-softdeps] <package1> [<package2> ...]
Basically a synonym for install. Earlier versions of \fBprt\-get\fP did not
adjust the \fBpkgadd(8)\fP arguments on a package-by-package basis, but
applied "install mode" or "update mode" to the entire transaction. This
version of \fBprt\-get\fP interprets the install command less rigidly, and tries
to sync all affected ports with their repository versions unless instructed
otherwise (using \fBprt\-get lock\fP, the --prefer-higher option, or the
prt-get.aliases file).
.TP
.B remove <package1> [<package2> ...]
remove packages listed in this order
Remove packages listed in this order
.TP
.B sysup [\-\-nodeps]
Update all installed packages which are outdated. Sorts by dependencies
by default. If you don't want prt-get to resolve the dependencies, use
the --nodeps switch. Also see the
.B lock
and
.B unlock
commands to keep the currently installed versions, even if there are
changes in the ports tree. If you want to update only diffs which have
a lower version installed than the one in the ports tree, use the
--prefer-higher option.
.B sysup [\-\-softdeps] [\-\-nodeps] [\-\-prefer\-higher] [\-\-strict\-diff]
Update all installed packages which are outdated. Sorts by hard dependencies
by default. Passing the --softdeps switch tells \fBprt\-get\fP to also consider
optional dependencies when sorting. Passing the --nodeps switch tells prt-get
not to sort by dependencies at all.
.B Note:
If a port has acquired new dependencies since its last successful build,
those new dependencies \fIwill\fP be injected into the transaction. An elegant
description of this new behaviour is "prt-get no more silently assumes that
the user didn't want a particular dependency" [1]. You can still disable the
automatic dependency injection by passing the --nodeps switch. Other
ways to fine-tune the selection of ports that are included in a \fBsysup\fP are the
commands \fBlock\fP and \fBunlock\fP, the prt-get.aliases file, and the
mutually exclusive switches --prefer-higher, --strict-diff (documented below).
[1] https://lists.crux.nu/pipermail/crux/2008-June/001784.html
.TP
.B lock <package1> [<package2>...]
Do not update these packages in a
Exclude these packages from being updated in a
.B sysup
operation
operation.
.TP
.B unlock <package1> [<package2>...]
Remove lock from these packages
.TP
.B listlocked [-v|-vv]
.B listlocked [\-v|\-vv]
List names of packages which are locked. As always,
.B -v
.B \-v
will additionally show the version, and
.B -vv
.B \-vv
also includes the description from the Pkgfile. Note that the
.B -vv
.B \-vv
switch will slow down the operation remarkably.
.TP
.B diff [--all] [<package1> <package2> ...]
show differences between installed packages and ports in the ports
tree. If arguments are given, shows only differences for these
packages, otherwise all differences are shown. It's also possible to use
shell like
.B diff [\-\-all] [\-\-prefer\-higher] [<package1> <package2> ...]
Show differences between installed packages and ports in the ports
tree. Package names passed as argument will truncate the output to
show only those packages. It's also possible to use shell-like
.B wildcards
for the diff command. Make sure you escape where needed. Locked
packages are only displayed if you use the --all switch. If you want
@ -145,40 +151,39 @@ to see only diffs which have a lower version installed than the one in
the ports tree, use the --prefer-higher option.
.TP
.B quickdiff
prints a simple list of packages which have a different version in the
ports tree than what is installed. This is meant as an input for
.B prt\-get update,
so you can update all ports on your system with one simple command. If you want
to see only diffs which have a lower version installed than the one in
the ports tree, use the --prefer-higher option.
.B quickdiff [\-\-prefer\-higher]
Print a simple list of packages which have a different version in the
ports tree than what is installed. The output is sorted alphabetically,
but you can generate a (larger) list sorted by dependencies using
.B prt\-get quickdep $(prt\-get quickdiff).
If you want to see only diffs which have a lower version installed than
the one in the ports tree, use the --prefer-higher option.
.TP
.B search [\-v|\-vv] [--path] [--regex]<expr>
.B search [\-v|\-vv] [\-\-path] [\-\-regex] <expr>
Search the ports tree for
.B expr
in their name
.TP
.B dsearch [\-v|\-vv] [--path] [--regex]<expr>
Search the ports tree for
.B dsearch [\-v|\-vv] [\-\-path] [\-\-regex] <expr>
Search the ports tree (both name and description) for the pattern
.B expr
in both name and description. The search in the description is not case
sensitive. Note that this requires prt\-get to read every Pkgfile, which
makes it rather slow; if you like this, consider using the cache
functionality, so you only have to spend this time once after updating
the ports tree has been updated.
(which can be a shell-like wildcard pattern or a regexp). The search in
the description is not case sensitive. Note that this requires prt-get
to read every Pkgfile, which makes it rather slow; if you like searching
by description, consider using the cache functionality, so you only have to
read every Pkgfile when the ports tree is updated.
.TP
.B fsearch [--full] [--regex] <pattern>
.B fsearch [\-\-full] [\-\-regex] <pattern>
Search the ports tree for
.B pattern
as file name in their footprint. When called without '--full', strips
the directories from the file names before matching; this behaviour
will change in prt-get 0.6, where full path search will be
default. Pattern can be a shell-like wildcard pattern (e.g prt-get
fsearch "*.h") or regexps.
the directories from the file names before matching. Pattern can be a
shell-like wildcard pattern (e.g. prt-get fsearch "*.h") or a regular
expression (e.g. prt-get fsearch --regex 'liblz(o2|ma).*')
.TP
.B info <port>
@ -193,118 +198,156 @@ Print the path of a port
Print the port's README file if it exists; if set, uses $PAGER
.TP
.B depends <package1> [<package2> ...]
print a recursive list of dependencies to install the packages passed
as argument. It shows a list with ports which are found, plus a list
of ports which are missing
.B depends [\-\-softdeps] <package1> [<package2> ...]
Print a recursive list of dependencies needed to install the packages passed
as argument. It shows a list of the dependencies that were found in the
ports tree, plus a list of the dependencies that could not be found. Pass
the --softdeps flag if you want the sorting algorithm to consider
optional dependencies too.
.TP
.B quickdep <package1> [<package2> ...]
print a simple list of recursive dependencies for all the ports passed
as argument in a simple format to be used by
.B prt\-get install
to make an install including dependencies
.B Does not display dependencies which are not in the ports tree
.B quickdep [\-\-softdeps] <package1> [<package2> ...]
Same output as \fBdepends\fP, but separated by spaces rather than newlines, and
stripped of any dependencies that could not be found in the ports tree.
Useful in case the list of dependencies is too large to fit on one screen, or
if you don't want to filter out manually the ports that are invalid targets for
installation. For example, instead of
.B prt\-get depinst xorg-server
you might micromanage the process as follows:
.B for i in $(prt\-get quickdep xorg-server); do prt\-get install \-fr \-\-nodeps $i; done
which ensures that the latest version of each dependency is built.
Note: It might be useful to run
.B prt\-get depends <package1> | grep \(dq\-\- missing packages\(dq
as a first step, in order to ensure that your ports tree has everything needed
for successful builds.
.TP
.B dependent <package>
print a list of package which depend on
.B package.
.B deptree [\-\-softdeps] <package>
Print a tree of the dependencies of the package
.B <package>.
Pass the --softdeps flag to also show the installed packages that might have been
eagerly linked when
.B <package>
or its dependencies were compiled.
Subtrees already shown are marked with '-->' to save some space. In
order to show them all, add the --all switch.
.SH ""
.TP
.B dependent [\-\-recursive] [\-\-softdeps] [\-\-all] <package>
Print a list of ports whose "Depends on:" line contains
.B <package>
(or its dependents, if --recursive is passed). Use the --softdeps flag to also
search the "Optional:" lines for \fB<package>\fP .
Usually shows dependent packages which are installed. To see all dependencies,
add the --all switch; use --recursive to get a recursive list (without
duplication), and --tree to get a nicely indented one
By default, output is restricted to ports that are installed. To see all the
dependencies, add the --all switch. Use --tree to get a nicely indented list.
.TP
.B deptree <package>
print a tree of the dependencies of the package
.B package.
Subtrees already shown are marked with '-->' to save some space, in
order to show them all, add the --all switch
.TP
.B dup [-v] [format]
.B dup [\-v] [format]
List ports which can be found in multiple directories configured in
.B /etc/prt-get.conf
Use the verbose switch to simulate the output of version 5.12 and older (likely
to go away in the future). The format string can be used to create user
specified formats. The following symbols are currently replaced:
\fB/etc/prt\-get.conf\fP.
Use the \fB\-v\fP switch to see a verbose report, which will show for each
dup the port that takes precedence, and the port that is hidden (including
full path and version info). The verbose switch is basically an alias for a
particular combination of the recognized format symbols, namely
.B '* %n\en %p1 %v1 precedes over\en %p2 %v2\en'.
You can customize the output by passing a different format string, whose
symbols will be replaced as follows.
.TP
\ \ \ \(bu
%n \-> name of the port
%n -> name of the port
.TP
\ \ \ \(bu
%p1 \-> Full path (including name) to port taking precendence
%p1 -> full path (including name) to port taking precedence
.TP
\ \ \ \(bu
%p2 \-> Full path (including name) to port being hidden
%p2 -> full path (including name) to port being hidden
.TP
\ \ \ \(bu
%v1 \-> Version of port taking precendence
%v1 -> version of port taking precedence
.TP
\ \ \ \(bu
%v2 \-> Version of port being hidden
%v2 -> version of port being hidden
.TP
.B list [\-v|\-vv] [filter] [--path] [--regex]
\ \ \ \(bu
%M1 -> maintainer of port taking precedence
.TP
\ \ \ \(bu
%M2 -> maintainer of port being hidden
.TP
\ \ \ \(bu
%u1 -> URL of port taking precedence
.TP
\ \ \ \(bu
%u2 -> URL of port being hidden
.TP
.B list [\-v|\-vv] [\-\-path] [\-\-regex] [filter]
List ports available in the ports tree. It's basically the same as
.B ports \-l
but looks in all directories specified in
.B /etc/prt\-get.conf.
It's also possible to use
shell like
It's also possible to use shell-like
.B wildcards
for the list command. Make sure you escape where needed
.TP
.B printf <format string1> [\-\-sort=<format string2>] [\-\-filter=<filter>]
Print formated port list format string can contain variables, which
Print formatted port list. Format string can contain variables, which
are replaced like this:
.TP
\ \ \ \(bu
%n \-> name
%n -> name
.TP
\ \ \ \(bu
%p \-> path
%p -> path
.TP
\ \ \ \(bu
%v \-> version
%v -> version
.TP
\ \ \ \(bu
%r \-> release
%r -> release
.TP
\ \ \ \(bu
%d \-> description
%d -> description
.TP
\ \ \ \(bu
%e \-> dependencies
%e -> dependencies
.TP
\ \ \ \(bu
%u \-> URL
%P -> optional dependencies
.TP
\ \ \ \(bu
%P -> Packager
%u -> URL
.TP
\ \ \ \(bu
%M -> Maintainer
%M -> maintainer
.TP
\ \ \ \(bu
%R -> Readme ("yes"/"no")
%R -> readme ("yes"/"no")
.TP
\ \ \ \(bu
@ -320,67 +363,77 @@ are replaced like this:
.TP
\ \ \ \(bu
%i \-> "no" if not installed, "yes" if it's installed and
%i -> "no" if not installed, "yes" if it's installed and
up to date and "diff" if it's installed and a new version is in the
ports tree.
Use "\\n" and "\\t" to format your output (no additional format specified
suported). The optional format string2 can contain the same variables
Use "\en" and "\et" to format your output (no additional format codes
supported). The optional format string2 can contain the same variables
as format string1 and is used to sort the output. You can specify a
.B wildcard filter
to filter by package name.
.TP
.B listinst [\-v|\-vv] [filter] [--regex] [--depsort]
.B listinst [\-v|\-vv] [\-\-regex] [\-\-depsort] [filter]
List installed ports. It's basically the same as
.B pkginfo \-i,
but omits version when called without verbose (\-v, \-vv) switch. Plus
it is notably faster in my tests. \-v adds version information, \-vv
but omits version when called without verbose (-v, -vv) switch. Plus
it is notably faster in my tests. -v adds version information, -vv
adds version and description.
.B Warning:
\-vv will slow down the process because it requires prt\-get to scan
-vv will slow down the process because it requires prt-get to scan
both the ports database and the ports tree.
It's also possible to use shell like
It's also possible to use shell-like
.B wildcards
for the listinst command. Make sure you escape where needed. Finally, by
default it's sorted alphabetically; use the \-\-depsort switch to sort by
dependencies
for the listinst command. Make sure you escape where needed. By default
it's sorted alphabetically; use the --depsort switch to sort by
dependencies.
.TP
.B listorphans [\-v|\-vv]
List installed ports which have no dependent packages
.B listorphans [\-v|\-vv|\-\-softdeps]
List installed ports which do not appear in the "Depends on:" line of
any other port currently installed. Pass the --softdeps flag to also exclude
ports that are listed as optional dependencies of currently-installed ports.
Output appears alphabetically separated by newlines, making it suitable for
process substitution as shown in the
.B EXAMPLES
section below. Note that some core ports might be runtime
dependencies despite their absence in the "Depends on:" line;
see \fBPkgfile(5)\fP for an explanation of this practice.
.TP
.B isinst <package>
Check whether a package is installed. The same as
.B pkginfo \-i|grep ^package
.TP
.B isinst <package1> [<package2> ...]
Check whether each package given on the command line is installed. Output in
the case of multiple arguments is separated by newlines, suitable for
processing by awk or grep. Similar to
.B pkginfo \-i|grep \-E '^(package1|package2|...)'
but does not print the version information. This command has a return value of
0 if all packages given as argument are installed, otherwise a return value
greater than 0.
.TP
.B current <package>
Prints out the version of the currently installed package
.B current <package1> [<package2> ...]
Shows the currently-installed version of <package>, or a message
that <package> is not installed.
.TP
.B ls [--path] <package>
Prints out a listing of the port's directory
.B ls [\-\-path] <package>
Print out a listing of the port's directory
.TP
.B cat <package> [<file>]
Prints out the file to stdout. If <file> is not specified, 'Pkgfile' is used. If set, uses $PAGER
Print to stdout (or $PAGER, if set) the contents of <file> in the port's
directory. If <file> is not specified, 'Pkgfile' is used.
.TP
.B edit <package> <file>
.B edit <package> [<file>]
Edit the file using the editor specified in the $EDITOR environment variable.
If <file> is not specified, 'Pkgfile' is used
If <file> is not specified, 'Pkgfile' is used.
.TP
.B help
Shows a help screen
Show a help screen
.TP
.B dumpconfig
@ -388,60 +441,82 @@ Dump the configuration to the current terminal
.TP
.B version
Shows the current version of prt\-get
Show the current version of prt-get
.TP
.B cache
create a cache file from the ports tree to be used by prt\-get using the
\-\-cache option. Remember to run prt\-get cache each time you update the
ports tree
Create a cache file from the ports tree to be used by prt-get using the
--cache option. Remember to run prt-get cache each time you update the
ports tree.
.SH "OPTIONS"
The following options are primarily useful for install/update transactions.
.TP
.B -f, -i
.B \-g, \-\-group
Stop install or update operation if one package fails (patch by Alan Mizrahi)
.TP
.B \-f, \-fi
Force install; Implies 'pkgadd -f'; same as --aargs=-f
.TP
.B -fr
.B \-fr
Force rebuild, Implies 'pkgmk -f'; same as --margs=-f
.TP
.B -um
Update md5sum, implies 'pkgmk -um'; same as --margs=-um
.TP
.B -im
Ignore md5sum, implies 'pkgmk -im'; same as --margs=-im
.TP
.B -us
.B \-us
Update signature, implies 'pkgmk -us'; same as --margs=-us
.TP
.B -is
.B \-is
Ignore signature, implies 'pkgmk -is'; same as --margs=-is
.TP
.B -uf
.B \-uf
Update footprint, implies 'pkgmk -uf'; same as --margs=-uf
.TP
.B -if
.B \-if
Ignore footprint, implies 'pkgmk -if'; same as --margs=-if
.TP
.B -ns
.B \-ns
No stripping, implies 'pkgmk -ns'; same as --margs=-ns
.TP
.B -kw
.B \-kw
Keep working directory, implies 'pkgmk -kw'; same as --margs=-kw
.TP
.B --ignore=<package1,package2,...>
Don't install those packages, even if they're listed as dependency
.TP
.B \-\-margs="...", e.g. \-\-margs="\-im"
additional arguments to be passed to pkgmk;
note that \-d is already passed to pkgmk anyway
.TP
.B \-\-aargs="...", e.g. \-\-aargs="\-f"
additional arguments to be passed to pkgadd
.TP
.B \-\-rargs="..."
arguments to be passed to pkgrm; currently not used, implemented for
future uses and consistency reasons
.TP
.B \-\-ignore=<package1,package2,...>
Don't install these packages, even if they're listed as dependencies
.TP
.B \-\-nodeps
Leave the list of requested packages as-is, without sorting by dependencies
or injecting missing dependencies.
.TP
.B \-\-softdeps
Consider optional dependencies when determining the order in which to build
the packages passed as arguments (in \fBinstall\fP or \fBsysup\fP operations).
Also affects the output of \fBdeptree\fP, \fBdependent\fP, and \fBlistorphans\fP.
.TP
.B \-\-cache
@ -449,20 +524,70 @@ Use cache file for this command
.TP
.B \-\-test
Dry run, don't actually install anything, mostly interesting for
.B prt\-get install, prt\-get grpinst, prt\-get update, prt\-get sysup
Dry run, don't actually install anything. Mostly interesting for
.B prt\-get install, prt\-get update, prt\-get sysup
.TP
.B \-\-pre-install
.B \-\-pre\-install
Execute pre-install script if it's there
.TP
.B \-\-post-install
.B \-\-post\-install
Execute post-install script if it's there
.TP
.B \-\-install-scripts
Execute pre-install and post-install script if they're there
.B \-\-install\-scripts
Execute pre-install and post-install script if they're there.
The options --pre-install, --post-install, and --install-scripts offer a
convenient way to temporarily override the prt-get.conf directive 'runscripts
no', which was the historical default. Starting with CRUX 3.7, prt-get.conf is
being shipped with 'runscripts yes'. To override this default at the command
line, you have to pass the more cumbersome option --config-set=\(dqrunscripts
no\(dq, or point prt-get to an alternative configuration file using
--config=<file>. (see below for the documentation of these options)
.TP
.B \-\-install\-root=<dir>
Use <dir> as root directory for your installation; allows you to install
the requested packages onto a different directory than '/'. In daily usage,
this option is not required; it's primarily interesting if you're developing
an independent installation.
Pre- and post-install scripts will not be executed if the requested
root directory lacks a copy of the ports tree. So if you're maintaining an
installation mounted somewhere different than '/', it's not enough to put
the line 'runscripts yes' in your prt-get.conf; you also have to ensure that the
pre- and post-install scripts can be found in the same location relative to <dir>.
The setting for --install-root determines which package database is used for
reading/writing (so <dir>/var/lib/pkg/db must exist), and where the pkg.tar.?z
archives get unpacked, but the relevant prt-get.conf and ports tree are those
on the parent filesystem. Therefore it is not necessary for <dir> to contain
its own copy of the ports tree (unless 'runscripts yes' is desired, as
explained above). But each \fBpkgmk(8)\fP process will take place on the parent
filesystem, inspecting \fIthe parent filesystem\fP's environment for
information about installed ports and available shared libraries. The
\fBpkgmk(8)\fP process might therefore draw the wrong conclusions about what
functionality should be enabled for an installation to <dir>. If the parent
filesystem is more richly populated than <dir>, with respect to installed
packages, then the built package might exhibit breakage when \fBpkgadd\fP
unpacks it into <dir>.
When setting --install-root=<dir>, install or update commands might behave
unexpectedly if <dir>/etc/pkgadd.conf exists and is different from
/etc/pkgadd.conf . In order to preserve the \fBpkgadd.conf(5)\fP settings from
host system, append the option --aargs='-c /etc/pkgadd.conf' to your \fBprt\-get
install\fP command, or just copy the desired directives into
<dir>/etc/pkgadd.conf .
.TP
.B \-\-log
Write build output to log file. Basically a convenient alias for
\fB\-\-config\-set=\(dqwritelog enabled\(dq\fP. Note that there is no similar
alias allowing you to temporarily override the configuration directive
\(dqwritelog enabled\(dq; you have to resort to \fB\-\-config\-set=\(dqwritelog
disabled\(dq\fP if that is your intention.
.TP
.B \-\-no-std-config
@ -480,100 +605,192 @@ Append <string> to configuration
.B \-\-config-set=<string>
Set <string> in configuration, overriding configuration file
.TP
.B \-\-config=<file>
Use <file> to read configuration directives, rather than /etc/prt-get.conf.
.SH ""
The following options are primarily useful for non-install (information-seeking)
transactions, although some of them affect the behaviour of install/upgrade
transactions as well.
.TP
.B \-v, \-vv
verbose and more verbose, relevant for
.B prt\-get search, prt\-get list
verbose shows version of a port, more verbose shows version and
description (if available)
(verbosity level) Show version of a port (-v), or show both version
and description (-vv). Passing more than one of these options is equivalent
to -vv.
.TP
.B \-\-path
Show path info; used in 'search', 'dsearch', 'list' and 'depends'
Show path info for the ports found by a search or a dependency calculation
.TP
.B \-\-regex
Interpret filter and search pattern as regular expression
.TP
.B \-\-margs="...", e.g. \-\-margs="\-im"
arguments to be passed to pkgmk, relevant for
.B prt\-get install, prt\-get grpinst, prt\-get update
note that \-d is already passed to pkgmk anyway
.TP
.B \-\-aargs="...", e.g. \-\-aargs="\-f"
arguments to be passed to pkgadd, relevant for
.B prt\-get install, prt\-get grpinst, prt\-get update
.TP
.B \-\-rargs="..."
arguments to be passed to pkgrm; currently not used, implemented for
future uses and consistency reasons
.TP
.B \-\-prefer-higher, -ph
.B \-\-prefer\-higher, \-ph
Make prt-get parse the version strings and prefer the higher version,
even if the one found in the ports tree is lower. Will influence diff,
quickdiff and sysup.
even if the one found in the ports tree is lower. Also used during
a sysup operation.
.TP
.B \-\-strict-diff, -sd
Override the 'preferhigher' configuration option
.B \-\-strict\-diff, \-sd
Override the 'preferhigher' configuration option. Equivalent to
.B \-\-config\-set=\(dqpreferhigher no\(dq
.TP
.B \-\-config=<file>
Use alternative configuration file to read ports directories from
.TP
.B \-\-install-root=<dir>
Use <dir> as root directory for your installation; allows to install to
a different directory than '/'. In daily usage, this option is not
required; helpful if you're developing an independent installation.
.TP
.B \-\-log
Write build output to log file
.SH "CONFIGURATION"
.TP
See man prt\-get.conf(5)
See man prt-get.conf(5)
.SH "EXAMPLES"
.TP
.B prt\-get install irssi
download, build and install irssi, with one simple command
Download, build and install irssi (and any of its missing dependencies), with
one simple command
.TP
.B prt\-get install indent mplayer
install indent and mplayer
.B prt\-get install --nodeps jasper
Install jasper, without trying to resolve dependencies.
.TP
.B prt\-get update --softdeps webkitgtk
Get the latest version of webkitgtk, rebuilding any of its outdated dependencies
(hard and soft) in the optimal order.
.TP
.B prt\-get update openssh
update your current version of openssh :\-)
.B prt\-get update -fr openssh
Update your current version of openssh, forcing a rebuild even if no version
difference is detected.
Useful if there was a major soversion change in one of its dependencies,
and \fBrevdep openssh\fP indicates a broken package. :-)
.TP
.B MISSLIBS=$(revdep \-vvv mpv | awk \-v FS=: '/(missing library)/ {print $3}'); [ \-n \(dq${MISSLIBS[@]}\(dq ] && for i in ${MISSLIBS[@]}; do prt\-get fsearch $i; done
(adapted from a script by ppetrov^) Check for the presence of the runtime libraries needed by mpv.
If any are absent, search the footprints to determine which ports provide the missing libraries.
.TP
.B prt\-get isinst $(ls /usr/pkgmk/packages/*.tar.gz | sed 's/.*\e///; s/#.*//;') | awk '/not installed/ { print $2 }'
Determine whether there are any packages (in a shared output directory) that
have since been uninstalled, or were never installed after a successful run
of \fBpkgmk\fP.
.TP
.B prt\-get printf '%i:%p:%n\en' | awk \-v FS=: '/^diff:\e/usr\e/ports\e/core/ { print $3 }' | xargs prt\-get update
Basically a \fBsysup\fP operation, but restricted to the core collection.
Because core ports are often omitted from the dependency line if they aren't
dynamically linked in, the \fBsysup\fP sorting algorithm might not put them
at the front of the queue. Run this command before a regular \fBsysup\fP in
order to ensure that core ports are updated first.
.TP
.B prt\-get isinst $(prt\-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk \-v FS=\(dq \(dq '/not installed/ {print $2}'
Show all the optional dependencies of ffmpeg that are not currently installed.
.TP
.B prt\-get isinst $(prt\-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}') | awk \-v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg
Extension of the above. Installs ffmpeg and all its optional dependencies, in
the order that guarantees a maximal feature set. The --group flag tells
\fBprt\-get\fP to abort the operation if any port fails to build, so as not to
spend any resources on ffmpeg until all of its optional dependencies are in
place.
.TP
.B prt\-get isinst $(if grep \-qE '^ffmpeg:' /etc/prt\-get.softdeps 2>/dev/null; then grep \-E '^ffmpeg:' /etc/prt\-get.softdeps | cut \-d: \-f2 | tr ',' ' '; else prt-get info ffmpeg | awk \-v FS=: '/^Optional/ {gsub(/,/,\(dq \(dq,$2); print $2}'; fi) | awk \-v FS=\(dq \(dq '/not installed/ {print $2}' | xargs prt\-get depinst \-\-group \-\-softdeps ffmpeg
Extension of the above (addressing a use case envisioned by ivandi). The
user can create the file /etc/prt-get.softdeps containing a line like
.B ffmpeg: x264 x265
and then the above command will perform a depinst --group operation to
ensure that at least x264 and x265 (but not necessarily any of the other
optional dependencies) are present before trying to build ffmpeg. In the
absence of such a .softdeps config, the operation reverts to the behaviour
of the preceding example (maximal feature set). Implementing Gentoo USE
flags with such an awkward one-liner might draw criticism from advocates of
the KISS principle.
.TP
.B prt\-get info kdelibs
show info about kdelibs
.B prt\-get search \-\-regex '^(m|n|p)c.*'
Return a list of all ports whose names start with "mc", "nc", or "pc"
.TP
.B prt\-get dsearch irc
Return a list of all ports having "irc" in their name or description
.TP
.B comm -13 <(ls /usr/ports/core) <(prt-get listorphans)
(based on comments from Romster and jue) Filter out the core ports from the list of orphans, in
shells (like bash) that support process substitution
.TP
.B comm -13 <(cat ~/.keepers <(ls /usr/ports/core) | sort) <(prt\-get listorphans) | xargs prt\-get remove
(system-hosing extension of the above) A one-liner inspired by \fBpkg\-clean\fP
and \fBpkgfoster\fP, but without the safeguard of interactivity.
\fBDo not try this on a mission-critical system.\fP
.TP
.B prt\-get isinst $(prt\-get quickdep $(prt\-get quickdiff)) | awk '/not installed/ {print $2}'
(adapted from a comment by Fun) After updating your ports tree, print out a
list of dependencies that were not needed the last time you built your
currently-installed ports, but are needed now by the newer versions of
these ports. The output of this command is sorted by dependencies, therefore
suitable for piping to \fBxargs prt\-get install\fP.
.TP
.B prt\-get search icq
Search all ports containing 'icq' in their name
.B comm \-13 <(prt\-get depends firefox\-bin |tail \-n +2 |sort) <(prt\-get depends firefox |tail \-n +2 |sort)
Find the build-time dependencies of firefox. Runtime dependencies would
also appear in the list generated by the first process substitution, and
\fBcomm \-13\fP will suppress what the two lists have in common.
.TP
.B prt\-get grpinst \-\-test `prt\-get quickdep kdenetwork`
Show what would happen if you installed all packages needed for
kdenetwork (test mode). Remove \-\-test to install kdenetwork and all
it's dependencies. Remember that grpinst stops installing when one
installing of one package fails
.TP
.B prt\-get isinst $(prt\-get quickdep i3) | awk '/not installed/ { print $2 }' | xargs prt\-get depinst \-\-softdeps \-\-test
(inspired by a troubleshooting session with hestia) Assemble a set of install
targets needed to build the i3 window manager; sort the list, respecting both
hard and soft dependencies; then print how the installation would proceed. The
awk filter in the middle is needed to prevent the command from failing with the
error message "already installed".
.TP
.B prt\-get update `prt\-get quickdiff`
Update all packages where a different version is in the ports tree
.TP
.B prt\-get printf \(dq%p\et%u\en\(dq | grep myrepo | cut \-f 2
Print the upstream URL for each port in the collection \(dqmyrepo\(dq,
perhaps as the first step in keeping your personal overlay up to date.
.TP
.B for u in $(prt\-get printf \(dq%M:%p/%n\en\(dq | grep \-i ^unmaintained | cut \-d: \-f2); do cd ${u%/*}; printf \(dq||%s ||\(dq ${u##*/}; git log ${u##*/} | head \-n 5 | awk '/^Date/ { $0=gensub(/^Date:\es+/,"","g"); printf(\(dq %s ||\en\(dq,$0); }'; cd \- >/dev/null; done
Generate a table of unmaintained ports and the dates of their most recent
commit, in PmWiki syntax (left-justified port names, centered dates).
Requires that your repositories are synchronized using the \fBgit(1)\fP driver.
Subsequent sorting by date may be done using \fBsort(1)\fP with the flags
-k, -M, and -n (the appropriate key defs will depend on your locale).
.TP
.B for L in /var/log/pkgbuild/*.log; do P=${L%__*}; P=${P##*/}; VR=${L##*__}; VR=${VR%.log}; if ! prt\-get isinst $P >/dev/null; then mv $L /var/log/uninstalled/; elif [ \(dq$(prt\-get current $P)\(dq != \(dq$VR\(dq ]; then mv $L /var/log/oldbuild/; fi; done
(based on a feature request by samsep10l) a command you can put into a script
called by root's crontab, in order to mimic Slackware's tidy directory listings
(the main logdir only contains build logs of the latest installed packages;
other logs are moved to a separate directory). This particular command relies
on declaring \(dqlogfile /var/log/pkgbuild/%n__%v-%r.log\(dq and \(dqwritelog
enabled\(dq in \fBprt\-get.conf(5)\fP. Logs saved with a different filename
pattern will require slight adjustments to the command.
.TP
.B prt\-get listinst \-\-depsort | xargs prt\-get install \-\-install\-root=/mnt
Sort the list of installed packages by dependencies, and then install all
those packages onto a backup filesystem (mounted at /mnt). If you have a
customized pkgadd.conf that you want applied to this operation, either copy
it to /mnt/etc where pkgadd will be looking for it, or pass the additional
option \-\-aargs=\(dq\-c /etc/pkgadd.conf\(dq to the install command.
.TP
.B prt\-get list \-\-path \-\-regex '^xorg.*' | grep \-v \(dq/usr/ports/xorg\(dq
Show the ports whose names begin with xorg, but which appear outside the
xorg port collection.
(At the time of writing, this command returned at least two font ports.)
.SH "AUTHORS"
Johannes Winkelmann <jw@tks6.net>
Johannes Winkelmann <jw@tks6.net>, and others cited inline
.SH "SEE ALSO"
prt\-get.conf(5), prt\-cache(8), pkgmk(8) pkgadd(8), ports(8)
prt-get.conf(5), prt-cache(8), Pkgfile(5), pkgmk(8), pkgadd(8), ports(8)

View File

@ -20,7 +20,7 @@ It might look like this:
# prt-get.conf
# root directories
prtdir /usr/ports/base
prtdir /usr/ports/core
prtdir /usr/ports/opt
prtdir /usr/ports/contrib
@ -39,23 +39,11 @@ logfile /tmp/log/%n.log
# show compact readme information
readme compact
# execute pre- and post-installs scripts (default no)
runscripts yes
# don't prefer higher versions (default no)
preferhigher yes
# use regexps for searching (default no)
useregex yes
# consider soft dependencies when sorting the update/sysup targets
softdeps no
.fi
.LP
There are a few values to be configured: the location where to look
for the ports, the location of the cache file, some log options and
This example configures a few values: the location where to look
for the ports, the location of the cache file, some log options, and
how to notify the user about README files.
If you don't specify the
@ -63,22 +51,25 @@ cache file, the default location is
.B /var/lib/pkg/prt-get.cache
.LP
Every line can contain one configuration option. The format of the lines
Every line can contain one configuration option. The format of each line
is
.B <key> <value>.
The valid keys are
.B prtdir
and
.B cachefile.
The keys that accept arbitrary strings as their value are
.B prtdir,
.B cachefile,
.B logfile,
and the
.B *command
keys (see below). Every other key must be given a value from a predetermined
set (e.g., yes|no).
The value for
.B prtdir
is a directory, the value for
is a directory; the value for
.B cachefile
is a file to be used as cache
is the file to be used as cache.
.nf
<portname1>:<dependency1> <dependency2>
<portname2>:<dependency1>
.SH Boolean keys
.B runscripts
if set to yes, execute pre- and post-install scripts
@ -91,66 +82,89 @@ influence diff, quickdiff and sysup
.B useregex
if set to yes, prt-get will interpret search and filter patterns in
list, listinst, printf, search, dsearch and fsearch as regular
expressions. This will be the default in prt-get 0.6.
expressions.
.B softdeps
if set to yes, during an update operation prt-get will perform a greedy search
of the dependency graph, visiting any \fBinstalled\fP optional dependency of
the ports specified on the command line and recursing until either a leaf node is
found (port that doesn't depend on anything else) or a cycle is created. If a
cycle is \fBnot\fP created by following a soft dependency, then this dependency
relationship is added to the list of edges, and topological sort of the
resulting graph can proceed as usual. The default is \fBsoftdeps no\fP, which
means prt-get will only consider hard dependencies when walking the directed
graph.
the ports specified on the command line and recursing until either a leaf
node is found (port that doesn't depend on anything else) or a cycle is
created. If a cycle is \fBnot\fP created by following a soft dependency,
then this dependency relationship is added to the list of edges, and
topological sort of the resulting graph can proceed as usual. The default is
\fBsoftdeps no\fP, which means prt-get will only consider hard dependencies
when walking the directed graph.
.LP
.B makecommand
.B addcommand
.B removecommand
.SH Overriding default commands
.B makecommand,
.B addcommand,
.B removecommand,
and
.B runscriptcommand
can be used to use an alternate command instead of 'pkgmk' for the
makecommand,'pkgadd' for the addcommand, 'pkgrm' for the
removecommand and 'sh' for the command which is used to run the pre- and
post-install scripts. These are expert options which shouldn't be used
in general; when used the wrong way, they can completely break prt-get's
original functionality.
can be given to override the defaults ('pkgmk' for the makecommand, 'pkgadd'
for the addcommand, 'pkgrm' for the removecommand and 'sh' for the
interpreter of pre- and post-install scripts). These are expert options
which should not be used in general; when used the wrong way, they can
completely break prt-get's original functionality.
.SH Keys that control logging
.LP
The log options are
.B writelog
which can be set to 'enabled' or 'disabled'
.B logmode
which can be set to 'append' or 'overwrite'
.B rmlog_on_success
which can be set to 'yes' or 'no'; when set to yes, log files of
successful builds will be removed
.B logfile
which represent the file path. All occurances of %n in logfile are
replaced with the port name and all occurances of %p are
replaced with the port's path, e.g. for port gcc in base, %p would be
.B /usr/base
and %n
a template for the path where logs get saved. All occurences of %n in
logfile are replaced with the port name and all occurences of %p are
replaced with the port's path, e.g. for port gcc in core, %p would be
.B /usr/ports/core
and %n would be
.B gcc.
This allows you to have separate log files per port.
Separate log files for each version and release can be achieved using
the placeholders %v and %r, respectively. But if you want to enable
\fBrmlog_on_uninst\fP, it is best to avoid %p, %v, and %r when
specifying \fBlogfile\fP (as explained below).
.B rmlog_on_uninst
can be set to 'yes' or 'no'; when set to yes, uninstalling a package
will also try to delete its build log. Replacements in the template
\fBlogfile\fP will be made using the \fIcurrent values\fP from the
database of installed packages, and from the active repositories. If
log files exist with different values of %p, %v, or %r than what the
database and repositories provide, then the pattern substitutions will
fail to match the names of those logs, and this feature will be a no-op.
For example, suppose you specify the logfile pattern
\(dq%p/.buildlogs/%n__%v-%r.log\(dq, and you have a package installed
on your system through many versions, or after it has been moved from
opt to contrib. Uninstalling that package would leave behind all the
build logs except the latest. This pattern is also fragile with respect
to repository purges; if one of your installed ports is dropped from
the official repos, then either \(dq%p\(dq will expand to the path of
your personal overlay (you did make a copy, right?), or it will not
expand at all! See the EXAMPLES section of \fBprt\-get(8)\fP for
alternative ways to tidy up your directory of build logs.
.LP
If the readme option is set to something different than 'disabled',
prt-get will notify the user if she/he installs a port with a README
file. The option to configure this is called
.B readme
which can be set to 'verbose' (print separate information about README
files), 'compact' (integrate in result output) or 'disabled' (no information about README files). See
.B prt-get(8)
can be set to 'disabled', to suppress the notification after installing
a port with a README file; 'compact', to collect all the READMEs
into one post-transaction output; or 'verbose', to print separate
information about each port with a README file. See
.B prt\-get(8)
and especially the readme command how to read those README files using
prt-get
prt-get.
.LP
The order of the prtdir options is important, as if a port is in multiple
The order of the prtdir options is important: if a port is in multiple
directories, prt-get will use the one found first (directories listed
first have precedence)
first have precedence).
.LP
If you want to restrict the ports used from one prtdir, you can
@ -158,13 +172,13 @@ append a comma separated list of ports to be used after the path,
using a colon (':') character to separate the two components
.B path:package1, package2,...
Note that this slows down prt-get a lot if you list a lot of packages.
If you become aware of speed problems due to this, create a separate
ports directory instead and use symlinks for the ports you want to use
If you become aware of speed problems due to this feature, create a separate
ports directory instead and fill it with symlinks to the ports you want.
.LP
You can write comments after a '#' character. If you have '#'
characters in you pathes, there's no way to escape them (as there is no
way to escape ':' characters). Complain to the author if this is a
characters in your paths, there's no way to escape them (likewise there is
no way to escape ':' characters). Complain to the author if this is a
problem :-)

View File

@ -1,276 +0,0 @@
#!/bin/sh
#
# install - install a program, script, or datafile
# This comes from X11R5 (mit/util/scripts/install.sh).
#
# Copyright 1991 by the Massachusetts Institute of Technology
#
# Permission to use, copy, modify, distribute, and sell this software and its
# documentation for any purpose is hereby granted without fee, provided that
# the above copyright notice appear in all copies and that both that
# copyright notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in advertising or
# publicity pertaining to distribution of the software without specific,
# written prior permission. M.I.T. makes no representations about the
# suitability of this software for any purpose. It is provided "as is"
# without express or implied warranty.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# `make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch. It can only install one file at a time, a restriction
# shared with many OS's install programs.
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit="${DOITPROG-}"
# put in absolute paths if you don't have them in your path; or use env. vars.
mvprog="${MVPROG-mv}"
cpprog="${CPPROG-cp}"
chmodprog="${CHMODPROG-chmod}"
chownprog="${CHOWNPROG-chown}"
chgrpprog="${CHGRPPROG-chgrp}"
stripprog="${STRIPPROG-strip}"
rmprog="${RMPROG-rm}"
mkdirprog="${MKDIRPROG-mkdir}"
transformbasename=""
transform_arg=""
instcmd="$mvprog"
chmodcmd="$chmodprog 0755"
chowncmd=""
chgrpcmd=""
stripcmd=""
rmcmd="$rmprog -f"
mvcmd="$mvprog"
src=""
dst=""
dir_arg=""
while [ x"$1" != x ]; do
case $1 in
-c) instcmd=$cpprog
shift
continue;;
-d) dir_arg=true
shift
continue;;
-m) chmodcmd="$chmodprog $2"
shift
shift
continue;;
-o) chowncmd="$chownprog $2"
shift
shift
continue;;
-g) chgrpcmd="$chgrpprog $2"
shift
shift
continue;;
-s) stripcmd=$stripprog
shift
continue;;
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
shift
continue;;
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
shift
continue;;
*) if [ x"$src" = x ]
then
src=$1
else
# this colon is to work around a 386BSD /bin/sh bug
:
dst=$1
fi
shift
continue;;
esac
done
if [ x"$src" = x ]
then
echo "$0: no input file specified" >&2
exit 1
else
:
fi
if [ x"$dir_arg" != x ]; then
dst=$src
src=""
if [ -d "$dst" ]; then
instcmd=:
chmodcmd=""
else
instcmd=$mkdirprog
fi
else
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if [ -f "$src" ] || [ -d "$src" ]
then
:
else
echo "$0: $src does not exist" >&2
exit 1
fi
if [ x"$dst" = x ]
then
echo "$0: no destination specified" >&2
exit 1
else
:
fi
# If destination is a directory, append the input filename; if your system
# does not like double slashes in filenames, you may need to add some logic
if [ -d "$dst" ]
then
dst=$dst/`basename "$src"`
else
:
fi
fi
## this sed command emulates the dirname command
dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
# Make sure that the destination directory exists.
# this part is taken from Noah Friedman's mkinstalldirs script
# Skip lots of stat calls in the usual case.
if [ ! -d "$dstdir" ]; then
defaultIFS='
'
IFS="${IFS-$defaultIFS}"
oIFS=$IFS
# Some sh's can't handle IFS=/ for some reason.
IFS='%'
set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
IFS=$oIFS
pathcomp=''
while [ $# -ne 0 ] ; do
pathcomp=$pathcomp$1
shift
if [ ! -d "$pathcomp" ] ;
then
$mkdirprog "$pathcomp"
else
:
fi
pathcomp=$pathcomp/
done
fi
if [ x"$dir_arg" != x ]
then
$doit $instcmd "$dst" &&
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
else
# If we're going to rename the final executable, determine the name now.
if [ x"$transformarg" = x ]
then
dstfile=`basename "$dst"`
else
dstfile=`basename "$dst" $transformbasename |
sed $transformarg`$transformbasename
fi
# don't allow the sed command to completely eliminate the filename
if [ x"$dstfile" = x ]
then
dstfile=`basename "$dst"`
else
:
fi
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/#inst.$$#
rmtmp=$dstdir/#rm.$$#
# Trap to clean up temp files at exit.
trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
trap '(exit $?); exit' 1 2 13 15
# Move or copy the file name to the temp name
$doit $instcmd "$src" "$dsttmp" &&
# and set any options; do chmod last to preserve setuid bits
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $instcmd $src $dsttmp" command.
if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
# Now remove or move aside any old file at destination location. We try this
# two ways since rm can't unlink itself on some systems and the destination
# file might be busy for other reasons. In this case, the final cleanup
# might fail but the new file should still install successfully.
{
if [ -f "$dstdir/$dstfile" ]
then
$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
{
echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
(exit 1); exit
}
else
:
fi
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
fi &&
# The final little trick to "correctly" pass the exit status to the exit trap.
{
(exit 0); exit
}

14
meson.build Normal file
View File

@ -0,0 +1,14 @@
project('prt-get', 'cpp',
version : '5.19.7',
default_options : ['warning_level=3', 'cpp_std=c++14'])
myconf = configuration_data()
myconf.set_quoted('VERSION', meson.project_version())
myconf.set_quoted('SYSCONFDIR','/etc')
myconf.set_quoted('LOCALSTATEDIR','/var')
configure_file(output : 'config.h',
configuration : myconf)
myconf_dir = include_directories('.')
subdir('src')
subdir('doc')

View File

@ -1,4 +0,0 @@
EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf
sysconf_DATA = prt-get.conf

View File

@ -1,403 +0,0 @@
# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
subdir = misc
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
SOURCES =
DIST_SOURCES =
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
am__install_max = 40
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__uninstall_files_from_dir = { \
test -z "$$files" \
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
am__installdirs = "$(DESTDIR)$(sysconfdir)"
DATA = $(sysconf_DATA)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
EXTRA_DIST = prt-get_complete prt-get.aliases prt-get.deplist prt-get.conf
sysconf_DATA = prt-get.conf
all: all-am
.SUFFIXES:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu misc/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu misc/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-sysconfDATA: $(sysconf_DATA)
@$(NORMAL_INSTALL)
@list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sysconfdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(sysconfdir)" || exit $$?; \
done
uninstall-sysconfDATA:
@$(NORMAL_UNINSTALL)
@list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
dir='$(DESTDIR)$(sysconfdir)'; $(am__uninstall_files_from_dir)
tags: TAGS
TAGS:
ctags: CTAGS
CTAGS:
cscope cscopelist:
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(DATA)
installdirs:
for dir in "$(DESTDIR)$(sysconfdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-generic mostlyclean-am
distclean: distclean-am
-rm -f Makefile
distclean-am: clean-am distclean-generic
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-sysconfDATA
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-sysconfDATA
.MAKE: install-am install-strip
.PHONY: all all-am check check-am clean clean-generic distclean \
distclean-generic distdir dvi dvi-am html html-am info info-am \
install install-am install-data install-data-am install-dvi \
install-dvi-am install-exec install-exec-am install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip install-sysconfDATA installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
uninstall-am uninstall-sysconfDATA
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

9
misc/meson.build Normal file
View File

@ -0,0 +1,9 @@
install_data(['prt-get.conf', 'prt-get.aliases'],
install_dir : '/etc',
install_mode : 'rw-r--r--')
install_data(['prt-get_complete','prt-get_complete_zsh'],
install_dir : get_option('prefix') / 'share',
install_mode : 'rw-r--r--',
rename : ['bash_completion/completions/prt-get',
'zsh/site-functions/_prt-get'])

View File

@ -1,6 +1,3 @@
j2sdk: j2re
lesstif: openmotif
postfix: sendmail
exim: sendmail
qmail: sendmail
masqmail: sendmail
rust-bin: rust

View File

@ -1,6 +1,8 @@
# prt-get(8), prt-cache(8) completion by Johannes Winkelmann, jw@tks6.net
# problems: options ending on = should not add a space afterwards
#
# 12.03.2023: add the flag --softdeps
# 28.08.2013: use 'install --group' instead of 'grpinst' (patch by Alan)
# 07.07.2002: use prt-get listinst (from 0.3.1pre1) instead of pkginfo
# 06.07.2002: first version
@ -14,7 +16,7 @@ _prt-get()
if [ $COMP_CWORD -eq 1 ]; then
COMPREPLY=( $( compgen -W ' \
install depinst update grpinst help \
install depinst update help \
version readme list info path \
search dsearch fsearch printf cache \
dependent sysup current lock unlock \
@ -27,7 +29,7 @@ _prt-get()
if [ $COMP_CWORD '>' 1 ]; then
if [[ "$cur" != -* ]]; then
case ${COMP_WORDS[1]} in
"install" | "depinst" | "grpinst" | "path" | "dependent" | \
"install" | "depinst" | "path" | "dependent" | \
"depends" | "quickdep" | "info" | "readme" | \
"ls" | "isinst" | "deptree" )
if [ -f /var/lib/pkg/prt-get.cache ]; then
@ -65,12 +67,12 @@ _prt-get()
esac
else
case ${COMP_WORDS[1]} in
"install" | "update" | "groupinst")
"install" | "update" | "depinst" )
COMPREPLY=( $( compgen -W '--config= --cache \
--pre-install \
--post-install \
--install-scripts \
--log --test \
--log --test --group \
--config \
--config-append= \
--config-prepend= \
@ -78,7 +80,15 @@ _prt-get()
--aargs= --margs= \
--rargs= \
--install-root=' \
-- $cur ) )
-- $cur ) )
;;
"depends" | "quickdep" | "deptree" | "listorphans" )
COMPREPLY=( $( compgen -W '--softdeps' -- $cur ) )
;;
"dependent" )
COMPREPLY=( $( compgen -W '--softdeps \
--recursive \
--tree' -- $cur ) )
;;
"list" | "search" | "dsearch" )
COMPREPLY=( $( compgen -W '-v -vv --cache \

300
misc/prt-get_complete_zsh Normal file
View File

@ -0,0 +1,300 @@
#compdef prt-get prt-cache
_commands=(
help:'show this help'
version:'show the current version'
list:'show a list of available ports'
printf:'print formatted list of available ports'
listinst:'show a list of installed ports'
listorphans:'list of ports with no packages depending on them'
info:'show info about a port'
path:'show path of a port'
readme:'show a port'"'"'s readme file (if it exists)'
dup:'find duplicate ports'
isinst:'print whether ports are installed'
current:'print installed version of port'
diff:'list outdated packages (or check args for change)'
quickdiff:'same as diff but simple format'
depends:'show dependencies for these ports'
quickdep:'same as depends but simple format'
deptree:'show dependencies tree for <port>'
dependent:'show installed packages which depend on '"'"'port'"'"''
search:'show port names containing '"'"'expr'"'"''
dsearch:'show ports containing '"'"'expr'"'"' in the name or description'
fsearch:'show file names in footprints matching '"'"'pattern'"'"''
install:'install ports'
update:'update ports'
depinst:'install ports and their dependencies'
remove:'remove ports'
sysup:'update all outdated ports'
lock:'lock current version of packages'
unlock:'unlock packages'
listlocked:'list locked packages'
ls:'print a listing of the port'"'"'s directory'
cat:'print out '"'"'port/file'"'"''
edit:'edit '"'"'port/file'"'"''
)
# Options Information
_infooptions=(
"--depsort[Sort by dependencies]"
)
# Options for Differences / Check for updates
_diffoptions=(
"--all[display locked ports too]"
"--prefer-higher[prefer higher installed versions over lower ports]"
"--strict-diff[override prefer higher configuration setting]"
)
# Options for Dependencies
_depoptions=(
"--all[list all dependent packages, not only installed]"
"--recursive[print recursive listing]"
"--tree[print recursive tree listing]"
"--softdeps[consider optional dependencies too]"
)
# Options for Install, Update and Removal
_installoptions=(
"-f[force installation]"
"-fi[force installation]"
"-fr[force rebuild]"
"-uf[update footprint]"
"-if[ignore footprint]"
"-um[update md5sum]"
"-im[ignore md5sum]"
"-us[update signature]"
"-is[ignore signature]"
"--margs=[pass 'string' to pkgmk]"
"--aargs=[pass 'string' to pkgadd]"
"--rargs=[pass 'string' to pkgrm]"
"--group[stop if any package fails to build]"
"--test[test mode]"
"--log[write log file]"
"--ignore=[Don't install/update those packages]:ignored packages:_allports"
"--pre-install[execute pre-install script]"
"--post-install[execute post-install script]"
"--install-scripts[execute pre-install and post-install script]"
)
# Options for System Update
_sysupoptions=(
"--nodeps[don't sort by dependencies]"
"--softdeps[consider optional dependencies when sorting]"
"--group[stop if any package fails to build]"
"--test[test mode]"
"--log[write log file]"
"--prefer-higher[prefer higher installed versions over lower ones in ports tree]"
"--strict-diff[override prefer higher configuration setting]"
)
_printfoptions=(
'%n[name]'
'%p[path]'
'%v[version]'
'%r[release]'
'%d[description]'
'%e[dependencies]'
'%P[optional dependencies]'
'%u[URL]'
'%M[Maintainer]'
'%R[Readme]'
'%E[pre-install script]'
'%O[post-install script]'
'%l[is locked]'
'%i[installed]'
)
# Options for General Options
_options=(
"-v[Show version in listing]"
"-vv[Show version and decription in listing]"
"--path[Print path to port if appropriate (search, list, depends)]"
"--cache[Use a cache file]"
"--config=[Use alternative configuration file]:file:_files"
"--install-root=[Use alternative install root directory]:directory:_directories"
"--no-std-config[Don't parse default configuration file]"
"--config-prepend=[Prepend '..' to configuration]:directory:_directories"
"--config-append=[Append '..' to configuration]:directory:_directories"
"--config-set=[Set configuration data '..', overriding config file]:data"
)
# Port list generators
_allports() {
local -a list
list=(${(f)"$(prt-get list 2>/dev/null)"})
_describe 'ports' list
}
_installedports() {
local -a list
list=(${(f)"$(prt-get listinst 2>/dev/null)"})
_describe 'installedports' list
}
_notinstalledports() {
local -a installed_ports all_ports not_installed_ports
installed_ports=(${(f)"$(prt-cache listinst 2>/dev/null)"})
all_ports=(${(f)"$(prt-cache list 2>/dev/null)"})
not_installed_ports=(${all_ports:|installed_ports})
_describe 'notinstalledports' not_installed_ports
}
_lockedports() {
local -a list
list=(${(f)"$(prt-cache listlocked 2>/dev/null)"})
_describe 'lockedports' list
}
_unlockedports() {
local -a installed locked list
installed=("${(f)$(prt-cache listinst)}")
locked=("${(f)$(prt-cache listlocked)}")
list=("${(f)$(echo ${installed[@]} ${locked[@]} | tr ' ' '\n' | sort | uniq -u)}")
_describe 'unlockedports' list
}
_outdatedports() {
local -a list
list=(${(f)"$(prt-cache quickdiff | tr ' ' '\n' | sort)"})
_describe 'outdatedports' list
}
# TODO: print files from <port> that exist inside the directory
# valid file for cat and edit
_validfiles() {
local -a list
list=(
"Pkgfile"
".signature"
".footprint"
"README"
"README.md"
)
_describe 'validfiles' list
}
# Main completion function
_arguments \
"${_options[@]}" \
":command:->command" \
"*::options:->options"
# Command completion
case $state in
command)
_describe 'commands' _commands
;;
options)
case $words[1] in
help | version | listorphans)
# No options for help | version command
;;
list)
_description list list '<filter>, e.g. *xorg*'
;;
listinst)
# TODO [<filter>]
_arguments -C \
"${_infooptions[@]}"
;;
printf)
# TODO <format>
# TODO [--sort=<format string2>] [--filter=<filter>]
local msg=(
'format string'
'[--sort=format_string2] [--filter=filter_string]'
''
'Supported format specifiers:'
'%n - name'
'%p - path'
'%v - version'
'%r - release'
'%d - description'
'%e - dependencies'
'%P - optional dependencies'
'%u - URL'
'%M - Maintainer'
'%R - Readme (yes/no)'
'%E - pre-install script (yes/no)'
'%O - post-install script (yes/no)'
'%l - is locked (yes/no)'
'%i - installed (no/yes/diff)'
)
;;
info | path | readme | ls)
_arguments \
":port:_allports"
;;
current)
_arguments -S \
":installedports:_installedports"
;;
cat | edit)
_arguments -C \
":port:_allports" \
":validfiles:_validfiles" \
;;
diff)
_arguments -S \
"*:outdatedports:_outdatedports" \
"${_diffoptions[@]}"
;;
quickdiff)
# No Options for quickdiff
;;
depends | quickdep | isinst)
_arguments -S \
":port:_allports" \
;;
dependent)
_arguments \
":port:_allports" \
"${_depoptions[@]}"
;;
deptree)
_arguments \
":port:_allports"
;;
dup | listlocked)
# No arguments for dup and listlocked commands
;;
search | dsearch)
# TODO <expr>
;;
fsearch)
# TODO <pattern>
;;
update | remove)
# TODO: highlight ports that have an update available?
# TODO: this completes only outdated once, if available,
# then show installedports..
_arguments -S \
":outdatedports:_outdatedports" \
"*:installedports:_installedports" \
"${_installoptions[@]}"
;;
install | depinst)
_arguments -S \
"*:notinstalledports:_notinstalledports" \
"${_installoptions[@]}"
;;
sysup)
_arguments -S \
"${_sysupoptions[@]}"
;;
lock)
_arguments -S \
"*:unlockedports:_unlockedports"
;;
unlock)
_arguments -S \
"*:lockedports:_lockedports"
;;
*)
;;
esac
;;
esac

336
missing
View File

@ -1,336 +0,0 @@
#! /bin/sh
# Common stub for a few missing GNU programs while installing.
# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
# 02111-1307, USA.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
if test $# -eq 0; then
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
fi
run=:
# In the cases where this matters, `missing' is being run in the
# srcdir already.
if test -f configure.ac; then
configure_ac=configure.ac
else
configure_ac=configure.in
fi
case "$1" in
--run)
# Try to run requested program, and just exit if it succeeds.
run=
shift
"$@" && exit 0
;;
esac
# If it does not exist, or fails to run (possibly an outdated version),
# try to emulate it.
case "$1" in
-h|--h|--he|--hel|--help)
echo "\
$0 [OPTION]... PROGRAM [ARGUMENT]...
Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
error status if there is no known handling for PROGRAM.
Options:
-h, --help display this help and exit
-v, --version output version information and exit
--run try to run the given command, and emulate it if it fails
Supported PROGRAM values:
aclocal touch file \`aclocal.m4'
autoconf touch file \`configure'
autoheader touch file \`config.h.in'
automake touch all \`Makefile.in' files
bison create \`y.tab.[ch]', if possible, from existing .[ch]
flex create \`lex.yy.c', if possible, from existing .c
help2man touch the output file
lex create \`lex.yy.c', if possible, from existing .c
makeinfo touch the output file
tar try tar, gnutar, gtar, then tar without non-portable flags
yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
;;
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
echo "missing 0.4 - GNU automake"
;;
-*)
echo 1>&2 "$0: Unknown \`$1' option"
echo 1>&2 "Try \`$0 --help' for more information"
exit 1
;;
aclocal*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acinclude.m4' or \`${configure_ac}'. You might want
to install the \`Automake' and \`Perl' packages. Grab them from
any GNU archive site."
touch aclocal.m4
;;
autoconf)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`${configure_ac}'. You might want to install the
\`Autoconf' and \`GNU m4' packages. Grab them from any GNU
archive site."
touch configure
;;
autoheader)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`acconfig.h' or \`${configure_ac}'. You might want
to install the \`Autoconf' and \`GNU m4' packages. Grab them
from any GNU archive site."
files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
test -z "$files" && files="config.h"
touch_files=
for f in $files; do
case "$f" in
*:*) touch_files="$touch_files "`echo "$f" |
sed -e 's/^[^:]*://' -e 's/:.*//'`;;
*) touch_files="$touch_files $f.in";;
esac
done
touch $touch_files
;;
automake*)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
You might want to install the \`Automake' and \`Perl' packages.
Grab them from any GNU archive site."
find . -type f -name Makefile.am -print |
sed 's/\.am$/.in/' |
while read f; do touch "$f"; done
;;
autom4te)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them.
You can get \`$1Help2man' as part of \`Autoconf' from any GNU
archive site."
file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
if test -f "$file"; then
touch $file
else
test -z "$file" || exec >$file
echo "#! /bin/sh"
echo "# Created by GNU Automake missing as a replacement of"
echo "# $ $@"
echo "exit 0"
chmod +x $file
exit 1
fi
;;
bison|yacc)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.y' file. You may need the \`Bison' package
in order for those modifications to take effect. You can get
\`Bison' from any GNU archive site."
rm -f y.tab.c y.tab.h
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.y)
SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.c
fi
SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" y.tab.h
fi
;;
esac
fi
if [ ! -f y.tab.h ]; then
echo >y.tab.h
fi
if [ ! -f y.tab.c ]; then
echo 'main() { return 0; }' >y.tab.c
fi
;;
lex|flex)
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.l' file. You may need the \`Flex' package
in order for those modifications to take effect. You can get
\`Flex' from any GNU archive site."
rm -f lex.yy.c
if [ $# -ne 1 ]; then
eval LASTARG="\${$#}"
case "$LASTARG" in
*.l)
SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
if [ -f "$SRCFILE" ]; then
cp "$SRCFILE" lex.yy.c
fi
;;
esac
fi
if [ ! -f lex.yy.c ]; then
echo 'main() { return 0; }' >lex.yy.c
fi
;;
help2man)
if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
# We have it, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a dependency of a manual page. You may need the
\`Help2man' package in order for those modifications to take
effect. You can get \`Help2man' from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
fi
if [ -f "$file" ]; then
touch $file
else
test -z "$file" || exec >$file
echo ".ab help2man is required to generate this page"
exit 1
fi
;;
makeinfo)
if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
# We have makeinfo, but it failed.
exit 1
fi
echo 1>&2 "\
WARNING: \`$1' is missing on your system. You should only need it if
you modified a \`.texi' or \`.texinfo' file, or any other file
indirectly affecting the aspect of the manual. The spurious
call might also be the consequence of using a buggy \`make' (AIX,
DU, IRIX). You might want to install the \`Texinfo' package or
the \`GNU make' package. Grab either from any GNU archive site."
file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
if test -z "$file"; then
file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
fi
touch $file
;;
tar)
shift
if test -n "$run"; then
echo 1>&2 "ERROR: \`tar' requires --run"
exit 1
fi
# We have already tried tar in the generic part.
# Look for gnutar/gtar before invocation to avoid ugly error
# messages.
if (gnutar --version > /dev/null 2>&1); then
gnutar "$@" && exit 0
fi
if (gtar --version > /dev/null 2>&1); then
gtar "$@" && exit 0
fi
firstarg="$1"
if shift; then
case "$firstarg" in
*o*)
firstarg=`echo "$firstarg" | sed s/o//`
tar "$firstarg" "$@" && exit 0
;;
esac
case "$firstarg" in
*h*)
firstarg=`echo "$firstarg" | sed s/h//`
tar "$firstarg" "$@" && exit 0
;;
esac
fi
echo 1>&2 "\
WARNING: I can't seem to be able to run \`tar' with the given arguments.
You may want to install GNU tar or Free paxutils, or check the
command line arguments."
exit 1
;;
*)
echo 1>&2 "\
WARNING: \`$1' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the \`README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing \`$1' program."
exit 1
;;
esac
exit 0

View File

@ -1,111 +0,0 @@
#! /bin/sh
# mkinstalldirs --- make directory hierarchy
# Author: Noah Friedman <friedman@prep.ai.mit.edu>
# Created: 1993-05-16
# Public domain
errstatus=0
dirmode=""
usage="\
Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
# process command line arguments
while test $# -gt 0 ; do
case $1 in
-h | --help | --h*) # -h for help
echo "$usage" 1>&2
exit 0
;;
-m) # -m PERM arg
shift
test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
dirmode=$1
shift
;;
--) # stop option processing
shift
break
;;
-*) # unknown option
echo "$usage" 1>&2
exit 1
;;
*) # first non-opt arg
break
;;
esac
done
for file
do
if test -d "$file"; then
shift
else
break
fi
done
case $# in
0) exit 0 ;;
esac
case $dirmode in
'')
if mkdir -p -- . 2>/dev/null; then
echo "mkdir -p -- $*"
exec mkdir -p -- "$@"
fi
;;
*)
if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
echo "mkdir -m $dirmode -p -- $*"
exec mkdir -m "$dirmode" -p -- "$@"
fi
;;
esac
for file
do
set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
shift
pathcomp=
for d
do
pathcomp="$pathcomp$d"
case $pathcomp in
-*) pathcomp=./$pathcomp ;;
esac
if test ! -d "$pathcomp"; then
echo "mkdir $pathcomp"
mkdir "$pathcomp" || lasterr=$?
if test ! -d "$pathcomp"; then
errstatus=$lasterr
else
if test ! -z "$dirmode"; then
echo "chmod $dirmode $pathcomp"
lasterr=""
chmod "$dirmode" "$pathcomp" || lasterr=$?
if test ! -z "$lasterr"; then
errstatus=$lasterr
fi
fi
fi
fi
pathcomp="$pathcomp/"
done
done
exit $errstatus
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# End:
# mkinstalldirs ends here

View File

@ -1,29 +0,0 @@
# Makefile.am for prt-get by Johannes Winkelmann
install-exec-local: install-binPROGRAMS
(cd $(DESTDIR)$(bindir); ln -sf prt-get prt-cache)
bin_PROGRAMS=prt-get
prt_get_SOURCES= argparser.cpp argparser.h\
depresolver.cpp depresolver.h \
installtransaction.cpp installtransaction.h \
main.cpp \
package.cpp package.h \
pkgdb.cpp pkgdb.h \
prtget.cpp prtget.h \
repository.cpp repository.h \
stringhelper.cpp stringhelper.h \
process.cpp process.h \
configuration.cpp configuration.h \
signaldispatcher.cpp signaldispatcher.h \
lockfile.cpp lockfile.h \
file.cpp file.h \
locker.cpp locker.h \
versioncomparator.cpp versioncomparator.h \
datafileparser.cpp datafileparser.h \
pg_regex.cpp pg_regex.h
AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \
-DLOCALSTATEDIR=\"$(localstatedir)\"

View File

@ -1,552 +0,0 @@
# Makefile.in generated by automake 1.12.2 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
@SET_MAKE@
# Makefile.am for prt-get by Johannes Winkelmann
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = prt-get$(EXEEXT)
subdir = src
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(top_srcdir)/depcomp $(top_srcdir)/mkinstalldirs
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/configure.in
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
am__installdirs = "$(DESTDIR)$(bindir)"
PROGRAMS = $(bin_PROGRAMS)
am_prt_get_OBJECTS = argparser.$(OBJEXT) depresolver.$(OBJEXT) \
installtransaction.$(OBJEXT) main.$(OBJEXT) package.$(OBJEXT) \
pkgdb.$(OBJEXT) prtget.$(OBJEXT) repository.$(OBJEXT) \
stringhelper.$(OBJEXT) process.$(OBJEXT) \
configuration.$(OBJEXT) signaldispatcher.$(OBJEXT) \
lockfile.$(OBJEXT) file.$(OBJEXT) locker.$(OBJEXT) \
versioncomparator.$(OBJEXT) datafileparser.$(OBJEXT) \
pg_regex.$(OBJEXT)
prt_get_OBJECTS = $(am_prt_get_OBJECTS)
prt_get_LDADD = $(LDADD)
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
am__mv = mv -f
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
CXXLD = $(CXX)
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
-o $@
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
SOURCES = $(prt_get_SOURCES)
DIST_SOURCES = $(prt_get_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@
AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
CPP = @CPP@
CPPFLAGS = @CPPFLAGS@
CXX = @CXX@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
EGREP = @EGREP@
EXEEXT = @EXEEXT@
GREP = @GREP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAKEINFO = @MAKEINFO@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
abs_builddir = @abs_builddir@
abs_srcdir = @abs_srcdir@
abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
am__include = @am__include@
am__leading_dot = @am__leading_dot@
am__quote = @am__quote@
am__tar = @am__tar@
am__untar = @am__untar@
bindir = @bindir@
build_alias = @build_alias@
builddir = @builddir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host_alias = @host_alias@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
srcdir = @srcdir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
prt_get_SOURCES = argparser.cpp argparser.h\
depresolver.cpp depresolver.h \
installtransaction.cpp installtransaction.h \
main.cpp \
package.cpp package.h \
pkgdb.cpp pkgdb.h \
prtget.cpp prtget.h \
repository.cpp repository.h \
stringhelper.cpp stringhelper.h \
process.cpp process.h \
configuration.cpp configuration.h \
signaldispatcher.cpp signaldispatcher.h \
lockfile.cpp lockfile.h \
file.cpp file.h \
locker.cpp locker.h \
versioncomparator.cpp versioncomparator.h \
datafileparser.cpp datafileparser.h \
pg_regex.cpp pg_regex.h
AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" \
-DLOCALSTATEDIR=\"$(localstatedir)\"
all: all-am
.SUFFIXES:
.SUFFIXES: .cpp .o .obj
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
&& { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) --gnu src/Makefile
.PRECIOUS: Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
@case '$?' in \
*config.status*) \
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
esac;
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: $(am__configure_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
install-binPROGRAMS: $(bin_PROGRAMS)
@$(NORMAL_INSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p; \
then echo "$$p"; echo "$$p"; else :; fi; \
done | \
sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
} \
; done
uninstall-binPROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' `; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(bindir)" && rm -f $$files
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
prt-get$(EXEEXT): $(prt_get_OBJECTS) $(prt_get_DEPENDENCIES) $(EXTRA_prt_get_DEPENDENCIES)
@rm -f prt-get$(EXEEXT)
$(CXXLINK) $(prt_get_OBJECTS) $(prt_get_LDADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
distclean-compile:
-rm -f *.tab.c
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/argparser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/datafileparser.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/depresolver.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/file.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/installtransaction.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/locker.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lockfile.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/package.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pg_regex.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pkgdb.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/process.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/prtget.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/repository.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signaldispatcher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stringhelper.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/versioncomparator.Po@am__quote@
.cpp.o:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
.cpp.obj:
@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
@am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
mkid -fID $$unique
tags: TAGS
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
set x; \
here=`pwd`; \
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
shift; \
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
ctags: CTAGS
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
$(TAGS_FILES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
unique=`for i in $$list; do \
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | \
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in files) print i; }; }'`; \
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
cscopelist: $(HEADERS) $(SOURCES) $(LISP)
list='$(SOURCES) $(HEADERS) $(LISP)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
for file in $$dist_files; do \
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
if test -d $$d/$$file; then \
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
check-am: all-am
check: check-am
all-am: Makefile $(PROGRAMS)
installdirs:
for dir in "$(DESTDIR)$(bindir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
installcheck: installcheck-am
install-strip:
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
mostlyclean-generic:
clean-generic:
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
distclean-am: clean-am distclean-compile distclean-generic \
distclean-tags
dvi: dvi-am
dvi-am:
html: html-am
html-am:
info: info-am
info-am:
install-data-am:
install-dvi: install-dvi-am
install-dvi-am:
install-exec-am: install-binPROGRAMS install-exec-local
install-html: install-html-am
install-html-am:
install-info: install-info-am
install-info-am:
install-man:
install-pdf: install-pdf-am
install-pdf-am:
install-ps: install-ps-am
install-ps-am:
installcheck-am:
maintainer-clean: maintainer-clean-am
-rm -rf ./$(DEPDIR)
-rm -f Makefile
maintainer-clean-am: distclean-am maintainer-clean-generic
mostlyclean: mostlyclean-am
mostlyclean-am: mostlyclean-compile mostlyclean-generic
pdf: pdf-am
pdf-am:
ps: ps-am
ps-am:
uninstall-am: uninstall-binPROGRAMS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
clean-generic cscopelist ctags distclean distclean-compile \
distclean-generic distclean-tags distdir dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
install-data install-data-am install-dvi install-dvi-am \
install-exec install-exec-am install-exec-local install-html \
install-html-am install-info install-info-am install-man \
install-pdf install-pdf-am install-ps install-ps-am \
install-strip installcheck installcheck-am installdirs \
maintainer-clean maintainer-clean-generic mostlyclean \
mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
tags uninstall uninstall-am uninstall-binPROGRAMS
install-exec-local: install-binPROGRAMS
(cd $(DESTDIR)$(bindir); ln -sf prt-get prt-cache)
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:

View File

@ -20,7 +20,6 @@ using namespace std;
*/
ArgParser::ArgParser( int argc, char** argv )
: m_isCommandGiven( false ),
m_isForced( false ),
m_isTest( false ),
m_isAlternateConfigGiven( false ),
m_useCache( false ),
@ -28,25 +27,28 @@ ArgParser::ArgParser( int argc, char** argv )
m_hasFilter( false ),
m_noStdConfig( false ),
m_writeLog( false ),
m_nodeps( false ),
m_depSort( true ),
m_softdeps( false ),
m_revdep(false),
m_all( false ),
m_printPath( false ),
m_execPreInstall( false ),
m_execPostInstall( false ),
m_preferHigher( false ),
m_strictDiff( false ),
m_sysup( false ),
m_group( false ),
m_useRegex(false),
m_fullPath(false),
m_quick(false),
m_recursive(false),
m_printTree(false),
m_depSort(false),
m_alternateConfigFile( "" ),
m_pkgmkArgs( "" ),
m_pkgaddArgs( "" ),
m_pkgrmArgs( "" ),
m_sortArgs( "" ),
m_filter( "" ),
m_sortArgs( "" ),
m_commandName( "" ),
m_unknownOption( "" ),
m_installRoot( "" ),
@ -80,7 +82,7 @@ bool ArgParser::isCommandGiven() const
/*!
\return a list of arguments not processed by ArgParser
*/
const list<char*>& ArgParser::otherArgs() const
const list<string>& ArgParser::otherArgs() const
{
return m_otherArgs;
}
@ -103,7 +105,6 @@ const string& ArgParser::pkgmkArgs() const
return m_pkgmkArgs;
}
/*!
\return addtional arguments to pkgadd
*/
@ -112,7 +113,6 @@ const string& ArgParser::pkgaddArgs() const
return m_pkgaddArgs;
}
/*!
\return the name of the alternative configuration file
*/
@ -121,37 +121,34 @@ const string& ArgParser::alternateConfigFile() const
return m_alternateConfigFile;
}
/*!
parse the arguments
\return true on success
*/
bool ArgParser::parse()
{
const int commandCount = 35;
string commands[commandCount] = { "list", "search", "dsearch",
"info",
"depends", "install", "depinst",
"help", "isinst", "dup", "update",
"quickdep", "diff", "quickdiff",
"grpinst", "version", "cache",
"path", "listinst", "printf", "readme",
"dependent", "sysup", "current",
"fsearch", "lock", "unlock",
"listlocked", "cat", "ls", "edit",
"remove", "deptree", "dumpconfig",
"listorphans" };
bool ArgParser::parse() {
const int commandCount = 28;
string commands[commandCount] = { "help", "info", "version",
"search", "dsearch", "fsearch",
"cache", "install", "remove",
"current", "isinst", "diff",
"path", "printf", "readme",
"list", "listinst", "listorphans",
"lock", "unlock", "listlocked",
"cat", "ls", "edit", "dumpconfig",
"dup", "depends", "deptree"
};
Type commandID[commandCount] = { HELP, INFO, SHOW_VERSION,
SEARCH, DSEARCH, FSEARCH,
CREATE_CACHE, INSTALL, REMOVE,
CURRENT, ISINST, DIFF,
PATH, PRINTF, README,
LIST, LISTINST, LISTORPHANS,
LOCK, UNLOCK, LISTLOCKED,
CAT, LS, EDIT, DUMPCONFIG,
DUP, DEPENDS, DEPTREE
};
Type commandID[commandCount] = { LIST, SEARCH, DSEARCH, INFO,
DEPENDS, INSTALL, DEPINST,
HELP, ISINST, DUP, UPDATE,
QUICKDEP, DIFF, QUICKDIFF,
GRPINST, SHOW_VERSION, CREATE_CACHE,
PATH, LISTINST, PRINTF, README,
DEPENDENT, SYSUP, CURRENT,
FSEARCH, LOCK, UNLOCK, LISTLOCKED,
CAT, LS, EDIT, REMOVE, DEPTREE,
DUMPCONFIG, LISTORPHANS };
if ( m_argc < 2 ) {
return false;
}
@ -171,72 +168,42 @@ bool ArgParser::parse()
for ( int i = 1; i < m_argc; ++i ) {
if ( m_argv[i][0] == '-' ) {
string s = m_argv[i];
if ( s == "-v" ) {
m_verbose += 1;
} else if ( s == "-vv" ) {
m_verbose += 2;
} else if ( s == "--force" ) {
m_isForced = true;
} else if ( s == "--test" ) {
m_isTest = true;
} else if ( s == "--cache" ) {
m_useCache = true;
} else if ( s == "--nodeps" ) {
m_nodeps = true;
} else if ( s == "--softdeps" ) {
m_softdeps = true;
} else if ( s == "--all" ) {
m_all = true;
} else if ( s == "--path" ) {
m_printPath = true;
} else if ( s == "--log" ) {
m_writeLog = true;
} else if ( s == "--pre-install" ) {
m_execPreInstall = true;
} else if ( s == "--post-install" ) {
if ( s == "-v" ) { m_verbose += 1;
} else if ( s == "-vv" ) { m_verbose += 2;
} else if ( s == "--test" ) { m_isTest = true;
} else if ( s == "--cache" ) { m_useCache = true;
} else if ( s == "--depsort" ) { m_depSort = true;
} else if ( s == "--nodeps" ) { m_depSort = false;
} else if ( s == "--softdeps" ) { m_softdeps = true;
} else if ( s == "--all" ) { m_all = true;
} else if ( s == "--path" ) { m_printPath = true;
} else if ( s == "--log" ) { m_writeLog = true;
} else if ( s == "--pre-install" ) { m_execPreInstall = true;
} else if ( s == "--post-install" ) { m_execPostInstall = true;
} else if ( s == "--install-scripts" ) { m_execPreInstall = true;
m_execPostInstall = true;
} else if ( s == "--install-scripts" ) {
m_execPreInstall = true;
m_execPostInstall = true;
} else if ( s == "--no-std-config" ) {
m_noStdConfig = true;
} else if ( s == "--no-std-config" ) { m_noStdConfig = true;
} else if ( s == "--prefer-higher" || s == "-ph" ) {
m_preferHigher = true;
} else if ( s == "--strict-diff" || s == "-sd" ) {
m_strictDiff = true;
} else if ( s == "--regex" ) {
m_useRegex = true;
} else if ( s == "--full" ) {
m_fullPath = true;
} else if ( s == "--recursive" ) {
m_recursive = true;
} else if ( s == "--tree" ) {
m_printTree = true;
} else if ( s == "--depsort" ) {
m_depSort = true;
} else if ( s == "-f" ) {
m_pkgaddArgs += " " + s;
} else if ( s == "-fr" ) {
m_pkgmkArgs += " -f";
} else if ( s == "-if" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-uf" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-im" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-um" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-is" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-us" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-kw" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-ns" ) {
m_pkgmkArgs += " " + s;
} else if ( s == "-fi" ) {
m_pkgaddArgs += " -f";
} else if ( s == "--group" || s == "-g" ) { m_group = true;
} else if ( s == "--quick" || s == "-Q" ) { m_quick = true;
} else if ( s == "--regex" ) { m_useRegex = true;
} else if ( s == "--full" ) { m_fullPath = true;
} else if ( s == "--recursive" || s == "-R" ) { m_recursive = true;
} else if ( s == "--tree" || s == "-T" ) { m_printTree = true;
} else if ( s == "-f" ) { m_pkgaddArgs += " " + s;
} else if ( s == "-fi" ) { m_pkgaddArgs += " -f";
} else if ( s == "-fr" ) { m_pkgmkArgs += " -f";
} else if ( s == "-if" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-uf" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-im" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-um" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-is" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-us" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-kw" ) { m_pkgmkArgs += " " + s;
} else if ( s == "-ns" ) { m_pkgmkArgs += " " + s;
}
// substrings
@ -246,11 +213,11 @@ bool ArgParser::parse()
m_pkgaddArgs += " " + s.substr( 8 );
} else if ( s.substr( 0, 8 ) == "--rargs=" ) {
m_pkgrmArgs = s.substr( 8 );
} else if ( s.substr( 0, 7 ) == "--sort=" ) {
m_sortArgs = s.substr( 7 );
} else if ( s.substr( 0, 9 ) == "--filter=" ) {
m_filter = s.substr( 9 );
m_hasFilter = true;
} else if ( s.substr( 0, 7 ) == "--sort=" ) {
m_sortArgs = s.substr( 7 );
} else if ( s.substr( 0, 9 ) == "--config=" ) {
m_alternateConfigFile = s.substr( 9 );
m_isAlternateConfigGiven = true;
@ -273,14 +240,45 @@ bool ArgParser::parse()
} else {
if (!m_isCommandGiven) {
string s = m_argv[i];
m_commandName = s;
for ( int i = 0; i < commandCount; ++i ) {
if ( s == commands[i] ) {
m_isCommandGiven = true;
m_commandType = commandID[i];
break;
}
}
if ( s == "grpinst") {
m_isCommandGiven = true;
m_commandType = INSTALL;
m_group = true;
cout << "Warning: grpinst is obsolescent";
cout << "; using install --group" << endl;
} else if (s == "depinst") {
m_isCommandGiven = true;
m_commandType = INSTALL;
m_depSort = true;
} else if (s == "update") {
m_isCommandGiven = true;
m_commandType = INSTALL;
} else if (s == "sysup") {
m_isCommandGiven = true;
m_commandType = DIFF;
m_sysup = true;
} else if (s == "quickdiff") {
m_isCommandGiven = true;
m_commandType = DIFF;
m_quick = true;
} else if (s == "quickdep") {
m_isCommandGiven = true;
m_commandType = DEPENDS;
m_quick = true;
} else if (s == "dependent") {
m_isCommandGiven = true;
m_commandType = DEPTREE;
m_revdep = true;
} else {
for ( int i = 0; i < commandCount; ++i ) {
if ( s == commands[i] ) {
m_isCommandGiven = true;
m_commandName = s;
m_commandType = commandID[i];
break;
}
}
}
// first argument must be command
if ( !m_isCommandGiven ) {
return false;
@ -291,21 +289,9 @@ bool ArgParser::parse()
}
}
return m_isCommandGiven;
}
/*!
\return true whether --force has been specified
*/
bool ArgParser::isForced() const
{
return m_isForced;
}
/*!
\return true whether --test has been specified
*/
@ -314,7 +300,6 @@ bool ArgParser::isTest() const
return m_isTest;
}
/*!
\return the level of verbose: -v -> 1, -vv -> 2
*/
@ -323,7 +308,6 @@ int ArgParser::verbose() const
return m_verbose;
}
/*!
\return whether --cache has been specified
*/
@ -332,7 +316,6 @@ bool ArgParser::useCache() const
return m_useCache;
}
/*!
\return whether prt-get was called as 'prt-cache' or not
*/
@ -349,14 +332,6 @@ bool ArgParser::writeLog() const
return m_writeLog;
}
/*!
\return the --sort="..." string
*/
const string& ArgParser::sortArgs() const
{
return m_sortArgs;
}
/*!
\return whether there was a --filter argument
*/
@ -365,7 +340,6 @@ bool ArgParser::hasFilter() const
return m_hasFilter;
}
/*!
\return whether there was a --no-std-config argument
*/
@ -374,7 +348,6 @@ bool ArgParser::noStdConfig() const
return m_noStdConfig;
}
/*!
\return the --filter="..." string
*/
@ -384,16 +357,18 @@ const string& ArgParser::filter() const
}
/*!
\return whether there was a --nodeps argument
\return the --sort="..." string
*/
bool ArgParser::nodeps() const
const string& ArgParser::sortArgs() const
{
return m_nodeps;
return m_sortArgs;
}
bool ArgParser::depSort() const
{
return m_depSort;
}
/*!
\return whether there was a --softdeps argument
*/
bool ArgParser::followSoftdeps() const
{
return m_softdeps;
@ -412,6 +387,16 @@ bool ArgParser::printPath() const
return m_printPath;
}
bool ArgParser::revdep() const
{
return m_revdep;
}
bool ArgParser::quick() const
{
return m_quick;
}
bool ArgParser::recursive() const
{
return m_recursive;
@ -419,12 +404,7 @@ bool ArgParser::recursive() const
bool ArgParser::printTree() const
{
return m_printTree;
}
bool ArgParser::depSort() const
{
return m_depSort;
return (m_printTree || m_commandName == "deptree");
}
const string& ArgParser::commandName() const
@ -473,6 +453,16 @@ bool ArgParser::strictDiff() const
return m_strictDiff;
}
bool ArgParser::sysup() const
{
return m_sysup;
}
bool ArgParser::group() const
{
return m_group;
}
bool ArgParser::useRegex() const
{
return m_useRegex;
@ -483,7 +473,6 @@ bool ArgParser::fullPath() const
return m_fullPath;
}
const string& ArgParser::ignore() const
{
return m_ignore;

View File

@ -14,6 +14,7 @@
#include <list>
#include <string>
#include <iostream>
using namespace std;
/*!
@ -30,17 +31,17 @@ public:
bool parse();
/*! Command type */
enum Type { HELP, LIST, SEARCH, DSEARCH, INSTALL, DEPINST,
INFO, DEPENDS, ISINST, DUP, UPDATE,
QUICKDEP, DIFF, GRPINST, GRPUPDATE,
QUICKDIFF, SHOW_VERSION, CREATE_CACHE, PATH,
LISTINST, PRINTF, README, DEPENDENT, SYSUP,
CURRENT, FSEARCH, LOCK, UNLOCK, LISTLOCKED,
CAT, LS, EDIT, REMOVE,
DEPTREE, DUMPCONFIG, LISTORPHANS };
enum Type { HELP, INFO, SHOW_VERSION,
SEARCH, DSEARCH, FSEARCH,
CREATE_CACHE, INSTALL, REMOVE,
CURRENT, ISINST, DIFF,
PATH, PRINTF, README,
LIST, LISTINST, LISTORPHANS,
LOCK, UNLOCK, LISTLOCKED,
CAT, LS, EDIT, DUMPCONFIG,
DUP, DEPENDS, DEPTREE };
bool isCommandGiven() const;
bool isForced() const;
bool isTest() const;
bool isAlternateConfigGiven() const;
bool useCache() const;
@ -48,26 +49,29 @@ public:
bool writeLog() const;
bool hasFilter() const;
bool noStdConfig() const;
bool nodeps() const;
bool depSort() const;
bool followSoftdeps() const;
bool all() const;
bool printPath() const;
bool execPreInstall() const;
bool execPostInstall() const;
bool preferHigher() const;
bool strictDiff() const;
bool sysup() const;
bool group() const;
bool useRegex() const;
bool fullPath() const;
bool revdep() const;
bool quick() const;
bool recursive() const;
bool printTree() const;
bool depSort() const;
bool followSoftdeps() const;
const string& alternateConfigFile() const;
const string& pkgmkArgs() const;
const string& pkgaddArgs() const;
const string& pkgrmArgs() const;
const string& sortArgs() const;
const string& filter() const;
const string& sortArgs() const;
const string& installRoot() const;
const string& ignore() const;
@ -77,7 +81,7 @@ public:
const string& commandName() const;
const string& unknownOption() const;
const list<char*>& otherArgs() const;
const list<string>& otherArgs() const;
int verbose() const;
@ -89,7 +93,6 @@ public:
private:
bool m_isCommandGiven;
bool m_isForced;
bool m_isTest;
bool m_isAlternateConfigGiven;
bool m_useCache;
@ -99,8 +102,9 @@ private:
bool m_writeLog;
bool m_nodeps;
bool m_depSort;
bool m_softdeps;
bool m_revdep;
bool m_all;
bool m_printPath;
@ -109,20 +113,21 @@ private:
bool m_execPostInstall;
bool m_preferHigher;
bool m_strictDiff;
bool m_sysup;
bool m_group;
bool m_useRegex;
bool m_fullPath;
bool m_quick;
bool m_recursive;
bool m_printTree;
bool m_depSort;
string m_alternateConfigFile;
string m_pkgmkArgs;
string m_pkgaddArgs;
string m_pkgrmArgs;
string m_sortArgs;
string m_filter;
string m_sortArgs;
string m_commandName;
string m_unknownOption;
string m_installRoot;
@ -135,7 +140,7 @@ private:
int m_verbose;
list<char*> m_otherArgs;
list<string> m_otherArgs;
list< pair<char*, ConfigArgType> > m_configData;
};

View File

@ -30,13 +30,15 @@ Configuration::Configuration( const std::string& configFile,
m_writeLog( false ),
m_appendLog( false ),
m_removeLogOnSuccess( false ),
m_removeLogOnUninst( false ),
m_readmeMode( VERBOSE_README ),
m_runScripts( false ),
m_preferHigher( false ),
m_useRegex( false ),
m_followSoftdeps( false ),
m_makeCommand( "" ), m_addCommand( "" ),
m_removeCommand( "" ), m_runscriptCommand( "" )
m_removeCommand( "" ), m_runscriptCommand( "" ),
m_compressionMode( "" ), m_packageDir( "" )
{
}
@ -84,11 +86,35 @@ bool Configuration::removeLogOnSuccess() const
return m_removeLogOnSuccess;
}
bool Configuration::removeLogOnUninst() const
{
return m_removeLogOnUninst;
}
string Configuration::logFilePattern() const
{
return m_logFilePattern;
}
string Configuration::packageDir() const
{
string value = "";
char line[256];
string cmd = "eval " + m_packageDir + " && echo \"$PKGMK_PACKAGE_DIR\"";
FILE* p = popen(cmd.c_str(), "r");
if (p) {
fgets(line, 256, p);
value = StringHelper::stripWhiteSpace(line);
pclose(p);
}
return value;
}
string Configuration::compressionMode() const
{
return ( m_compressionMode == "" ) ? "gz" : m_compressionMode;
}
const list< pair<string, string> >& Configuration::rootList() const
{
@ -150,10 +176,10 @@ void Configuration::parseLine(const string& line, bool prepend)
} else if ( startsWithNoCase( s, "writelog" ) ) {
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
if ( s == "enabled" ) {
// it's already set to false, so we can just enable it.
// like this, the command line switch works as well
m_writeLog = true;
}
} else if ( s == "disabled" ) {
m_writeLog = false;
}
} else if ( startsWithNoCase( s, "logfile" ) ) {
s = stripWhiteSpace( s.replace( 0, 7, "" ) );
m_logFilePattern = s;
@ -166,7 +192,16 @@ void Configuration::parseLine(const string& line, bool prepend)
s = stripWhiteSpace( s.replace( 0, 16, "" ) );
if ( s == "yes" ) {
m_removeLogOnSuccess = true;
}
} else if ( s == "no" ) {
m_removeLogOnSuccess = false;
}
} else if ( startsWithNoCase( s, "rmlog_on_uninst" ) ) {
s = stripWhiteSpace( s.replace( 0, 15, "" ) );
if ( s == "yes" ) {
m_removeLogOnUninst = true;
} else if ( s == "no" ) {
m_removeLogOnUninst = false;
}
} else if ( startsWithNoCase( s, "readme" ) ) {
s = stripWhiteSpace( s.replace( 0, 6, "" ) );
if ( s == "compact" ) {
@ -178,23 +213,28 @@ void Configuration::parseLine(const string& line, bool prepend)
s = stripWhiteSpace( s.replace( 0, 10, "" ) );
if ( s == "yes" ) {
m_runScripts = true;
} else if ( s == "no" ) {
m_runScripts = false;
}
} else if ( startsWithNoCase( s, "preferhigher" ) ) {
s = stripWhiteSpace( s.replace( 0, 12, "" ) );
if ( s == "yes" ) {
m_preferHigher = true;
}
} else if ( s == "no" ) {
m_preferHigher = false;
}
} else if ( startsWithNoCase( s, "useregex" ) ) {
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
if ( s == "yes" ) {
m_useRegex = true;
}
} else if ( s == "no" ) {
m_useRegex = false;
}
} else if ( startsWithNoCase( s, "softdeps" ) ) {
s = stripWhiteSpace( s.replace( 0, 8, "" ) );
if ( s == "yes" ) {
m_followSoftdeps = true;
}
if ( s == "no" ) {
} else if ( s == "no" ) {
m_followSoftdeps = false;
}
} else if ( startsWithNoCase( s, "makecommand" ) ) {
@ -208,6 +248,32 @@ void Configuration::parseLine(const string& line, bool prepend)
}
}
bool Configuration::parsePkgmkConf(int readOrder)
{
string fileName = (readOrder == 1) ? "/etc/pkgmk.conf" : "/usr/bin/pkgmk";
FILE* fp = fopen(fileName.c_str(), "r");
if (!fp)
return false;
string s;
char line[256];
while (fgets(line, 256, fp)) {
s = StringHelper::stripWhiteSpace(getValueBefore(line,'#'));
if ( StringHelper::startsWith(s, "PKGMK_COMPRESSION_MODE=") &&
(readOrder==1 || m_compressionMode == "") ) {
m_compressionMode = s.substr(23);
StringHelper::replaceAll(m_compressionMode,"\"","");
StringHelper::replaceAll(m_compressionMode,"'","");
} else if ( StringHelper::startsWith(s, "PKGMK_PACKAGE_DIR=") &&
(readOrder==1 || m_packageDir == "" ) ) {
m_packageDir = s;
}
}
fclose(fp);
return ( m_compressionMode != "" && m_packageDir != "" );
}
bool Configuration::runScripts() const
{
return m_runScripts;
@ -245,6 +311,6 @@ bool Configuration::useRegex() const
bool Configuration::followSoftdeps() const
{
return m_followSoftdeps;
return ( m_followSoftdeps || m_parser->followSoftdeps() );
}

View File

@ -30,6 +30,7 @@ public:
bool writeLog() const;
bool appendLog() const;
bool removeLogOnSuccess() const;
bool removeLogOnUninst() const;
std::string logFilePattern() const;
const std::list< std::pair<std::string, std::string> >& rootList() const;
@ -45,6 +46,8 @@ public:
bool useRegex() const;
bool followSoftdeps() const;
bool parsePkgmkConf(int readOrder);
void addConfig(const std::string& line,
bool configSet,
bool configPrepend);
@ -54,6 +57,9 @@ public:
std::string removeCommand() const;
std::string runscriptCommand() const;
std::string compressionMode() const;
std::string packageDir() const;
private:
std::string m_configFile;
const ArgParser* m_parser;
@ -67,6 +73,7 @@ private:
bool m_writeLog;
bool m_appendLog;
bool m_removeLogOnSuccess;
bool m_removeLogOnUninst;
ReadmeMode m_readmeMode;
@ -80,6 +87,8 @@ private:
std::string m_removeCommand;
std::string m_runscriptCommand;
std::string m_compressionMode;
std::string m_packageDir;
void parseLine(const std::string& line, bool prepend=false);
};

View File

@ -27,6 +27,7 @@ using namespace std;
#include "pkgdb.h"
#include "stringhelper.h"
#include "argparser.h"
#include "versioncomparator.h"
#include "process.h"
#include "configuration.h"
@ -71,38 +72,6 @@ InstallTransaction::InstallTransaction( const list<string>& names,
}
/*!
Create a nice InstallTransaction
\param names a list of port names to be installed
\param repo the repository to look for packages
\param pkgDB the pkgDB with already installed packages
*/
InstallTransaction::InstallTransaction( const list<char*>& names,
const Repository* repo,
PkgDB* pkgDB,
const Configuration* config )
: m_pkgDB( pkgDB ),
m_resolver(),
m_repo( repo ),
m_depCalced( false ),
m_installedPackages(),
m_alreadyInstalledPackages(),
m_ignoredPackages(),
m_depNameList(),
m_depList(),
m_missingPackages(),
m_installErrors(),
m_config( config )
{
list<char*>::const_iterator it = names.begin();
for ( ; it != names.end(); ++it ) {
m_packages.push_back( make_pair( *it, m_repo->getPackage( *it ) ) );
}
}
/*!
Create a nice InstallTransaction
\param names a list of port names to be installed
@ -142,18 +111,17 @@ InstallTransaction::installError() const
/*!
install (commit) a transaction
\param parser the argument parser
\param update whether this is an update operation
\param group whether this is a group transaction (stops transaction on error)
\return returns an InstallResult telling whether installation worked
*/
InstallTransaction::InstallResult
InstallTransaction::install( const ArgParser* parser,
bool update, bool group )
InstallTransaction::install( const ArgParser* parser )
{
if ( m_packages.empty() ) {
return NO_PACKAGE_GIVEN;
}
bool update;
const string forceRebuild = "-fr";
list<string> ignoredPackages;
StringHelper::split(parser->ignore(), ',', ignoredPackages);
@ -170,40 +138,69 @@ InstallTransaction::install( const ArgParser* parser,
if ( package == NULL ) {
m_missingPackages.push_back( make_pair( it->first, string("") ) );
if ( group ) {
if ( parser->group() ) {
return PACKAGE_NOT_FOUND;
}
continue;
}
// consider aliases here, but don't show them specifically
if ( !update && m_pkgDB->isInstalled( package->name(), true ) ) {
// ignore
m_alreadyInstalledPackages.push_back( package->name() );
continue;
}
// Set the update flag if the package is installed and out of date,
// or if the user has forced a rebuild.
// Proceed to the next target if package is installed and up to date,
// or is provided by an alias.
if ( m_pkgDB->isInstalled( it->first, false ) ) {
VersionComparator::COMP_RESULT
rpDiff = VersionComparator::compareVersions(
m_repo->getPackageVersion( package->name() ),
m_pkgDB->getPackageVersion( package->name() ) );
if ( rpDiff == VersionComparator::EQUAL &&
parser->pkgmkArgs().find(forceRebuild) == string::npos ) {
m_alreadyInstalledPackages.push_back( package->name() );
continue;
} else if ( (! m_config->preferHigher()) || parser->strictDiff()
|| rpDiff == VersionComparator::GREATER
|| ( parser->pkgmkArgs().find(forceRebuild)
!= string::npos && find(parser->otherArgs().begin(),
parser->otherArgs().end(), it->first)
!= parser->otherArgs().end() ) ) {
update = true;
} else {
continue;
}
} else if ( m_pkgDB->isInstalled( it->first, true ) ) {
continue;
}
InstallTransaction::InstallResult result;
InstallInfo info( package->hasReadme() );
if ( parser->isTest() ||
(result = installPackage( package, parser, update, info )) == SUCCESS) {
if ( parser->isTest() ) {
info.preState = ( package->hasPreInstall() &&
(parser->execPreInstall() || m_config->runScripts())
) ? DEFERRED : NONEXISTENT;
info.postState = ( package->hasPostInstall() &&
(parser->execPostInstall() || m_config->runScripts())
) ? DEFERRED : NONEXISTENT;
m_installedPackages.push_back( make_pair( package->path() + "/" + package->name(), info));
continue;
}
if ((result = installPackage( package, parser, update, info )) == SUCCESS) {
m_installedPackages.push_back( make_pair( package->name(), info));
m_installedPackages.push_back( make_pair( package->path() + "/" + package->name(), info));
} else {
// log failures are critical
// log failures and pkgdest errors are critical,
// don't proceed to the next install target if encountered
if ( result == LOG_DIR_FAILURE ||
result == LOG_FILE_FAILURE ||
result == NO_LOG_FILE ||
result == CANT_LOCK_LOG_FILE ||
// or pkgdest
result == PKGDEST_ERROR ) {
return result;
}
m_installErrors.push_back( make_pair(package->name(), info) );
if ( group ) {
m_installErrors.push_back( make_pair(package->path() + "/" + package->name(), info) );
if ( parser->group() ) {
return PKGMK_FAILURE;
}
}
@ -224,8 +221,7 @@ InstallTransaction::installPackage( const Package* package,
const ArgParser* parser,
bool update,
InstallTransaction::InstallInfo& info )
const
{
const {
InstallTransaction::InstallResult result = SUCCESS;
#ifdef USE_LOCKING
@ -241,7 +237,7 @@ InstallTransaction::installPackage( const Package* package,
commandName = "prt-cache";
}
// - initial information about the package to be build
// - initial information about the package to be built
string message;
message = commandName + ": ";
if (update) {
@ -299,20 +295,25 @@ InstallTransaction::installPackage( const Package* package,
write( fdlog, timestamp.c_str(), timestamp.length());
}
string pkgdir = package->path() + "/" + package->name();
chdir( pkgdir.c_str() );
string portdir = package->path() + "/" + package->name();
chdir( portdir.c_str() );
string runscriptCommand = "sh";
string runscriptCommand = "/bin/sh";
if (m_config->runscriptCommand() != "") {
runscriptCommand = m_config->runscriptCommand();
}
if (parser->installRoot() != "") {
runscriptCommand = "chroot " + parser->installRoot() + " "
+ runscriptCommand;
}
// -- pre-install
struct stat statData;
struct stat statData; struct stat fstatData;
if ((parser->execPreInstall() || m_config->runScripts()) &&
stat((pkgdir + "/" + "pre-install").c_str(), &statData) == 0) {
stat((parser->installRoot() + portdir + "/pre-install").c_str(),
&statData) == 0) {
Process preProc( runscriptCommand,
pkgdir + "/" + "pre-install",
portdir + "/pre-install",
fdlog );
if (preProc.executeShell()) {
info.preState = FAILED;
@ -322,22 +323,39 @@ InstallTransaction::installPackage( const Package* package,
}
// -- build
string pkgdest = m_config->packageDir();
string builtPkg = package->name() + "#" + package->version() + "-" +
package->release() + ".pkg.tar." + m_config->compressionMode();
string builtPkgPath = ( pkgdest != "" ) ? pkgdest + "/" + builtPkg :
portdir + "/" + builtPkg ;
string cmd = PKGMK_DEFAULT_COMMAND;
if (m_config->makeCommand() != "") {
cmd = m_config->makeCommand();
}
// skip the build if a package exists newer than Pkgfile
// (e.g., created by running pkgmk manually)
if ( stat(builtPkgPath.c_str(), &statData) +
stat((portdir + "/Pkgfile").c_str(), &fstatData) == 0) {
time_t pkgMtime = statData.st_mtime;
time_t pfMtime = fstatData.st_mtime;
if ( ( difftime(pkgMtime,pfMtime) > 0 ) and
(parser->pkgmkArgs().find(" -f") == string::npos) ) {
cmd = "/bin/true"; }
}
string args = "-d " + parser->pkgmkArgs();
if ( parser->pkgmkArgs().find(" -f") != string::npos &&
find( parser->otherArgs().begin(), parser->otherArgs().end(),
package->name() ) == parser->otherArgs().end() ) {
StringHelper::replaceAll(args," -f","");
}
Process makeProc( cmd, args, fdlog );
if ( makeProc.executeShell() ) {
result = PKGMK_FAILURE;
} else {
// -- update
string pkgdest = getPkgmkPackageDir();
if ( pkgdest != "" ) {
// TODO: don't manipulate pkgdir
pkgdir = pkgdest;
string message = "prt-get: Using PKGMK_PACKAGE_DIR: " + pkgdir;
string message = ( pkgdest == "" ) ? "" :
commandName + ": Using PKGMK_PACKAGE_DIR " + pkgdest;
if (parser->verbose() > 0) {
cout << message << endl;
}
@ -345,94 +363,79 @@ InstallTransaction::installPackage( const Package* package,
write( fdlog, message.c_str(), message.length() );
write( fdlog, "\n", 1 );
}
}
}
// the following chdir is a noop if usePkgDest() returns false
if ( chdir( pkgdir.c_str() ) != 0 ) {
result = PKGDEST_ERROR;
// no need to chdir if we provide absolute paths to pkgadd
cmd = PKGADD_DEFAULT_COMMAND;
if (m_config->addCommand() != "") {
cmd = m_config->addCommand();
}
args = "";
if (parser->installRoot() != "") {
args = "-r " + parser->installRoot() + " ";
}
if ( update ) {
args += "-u ";
}
if ( !parser->pkgaddArgs().empty() ) {
args += parser->pkgaddArgs() + " ";
}
args += builtPkgPath;
// - inform the user about what's happening
string fullCommand = commandName + ": " + cmd + args;
string summary;
if (update) {
string from = m_pkgDB->getPackageVersion(package->name());
string to = m_repo->getPackageVersion(package->name());
if (from == to) {
summary = commandName + ": " + "reinstalling " +
package->name() + " " + to;
} else {
cmd = PKGADD_DEFAULT_COMMAND;
if (m_config->addCommand() != "") {
cmd = m_config->addCommand();
}
summary = commandName + ": " + "updating " +
package->name() + " from " + from + " to " + to;
}
} else {
summary = commandName + ": " + "installing " + package->name() +
" " + package->version() + "-" + package->release();
}
args = "";
if (parser->installRoot() != "") {
args = "-r " + parser->installRoot() + " ";
}
// - print and log
cout << summary << endl;
if (parser->verbose() > 0) {
cout << fullCommand << endl;
}
if ( m_config->writeLog() ) {
time_t endTime;
time(&endTime);
timestamp = ctime(&endTime);
timestamp = commandName + ": build done " + timestamp;
write( fdlog, summary.c_str(), summary.length() );
write( fdlog, "\n", 1 );
write( fdlog, fullCommand.c_str(), fullCommand.length() );
write( fdlog, "\n", 1 );
write( fdlog, timestamp.c_str(), timestamp.length());
write( fdlog, "\n", 1 );
}
if ( update ) {
args += "-u ";
}
if ( !parser->pkgaddArgs().empty() ) {
args += parser->pkgaddArgs() + " ";
}
args +=
package->name() + "#" +
package->version() + "-" +
package->release() + ".pkg.tar." + getPkgmkCompressionMode();
// - inform the user about what's happening
string fullCommand = commandName + ": " + cmd + " " + args;
string summary;
if (update) {
string from = m_pkgDB->getPackageVersion(package->name());
string to = package->version() + "-" + package->release();
if (from == to) {
summary = commandName + ": " + "reinstalling " +
package->name() + " " + to;
Process installProc( cmd, args, fdlog );
if ( installProc.executeShell() ) {
result = PKGADD_FAILURE;
} else {
// exec post install
if ((parser->execPostInstall() || m_config->runScripts() ) &&
stat((parser->installRoot() + portdir + "/post-install").c_str(),
&statData) == 0) {
Process postProc( runscriptCommand,
portdir + "/post-install", fdlog );
if (postProc.executeShell()) {
info.postState = FAILED;
} else {
summary = commandName + ": " + "updating " +
package->name() + " from " + from + " to " + to;
info.postState = EXEC_SUCCESS;
}
} else {
summary = commandName + ": " + "installing " +
package->name() + " " +
package->version() + "-" + package->release();
}
// - print and log
cout << summary << endl;
if (parser->verbose() > 0) {
cout << fullCommand << endl;
}
if ( m_config->writeLog() ) {
time_t endTime;
time(&endTime);
timestamp = ctime(&endTime);
timestamp = commandName + ": build done " + timestamp;
write( fdlog, summary.c_str(), summary.length() );
write( fdlog, "\n", 1 );
write( fdlog, fullCommand.c_str(), fullCommand.length() );
write( fdlog, "\n", 1 );
write( fdlog, timestamp.c_str(), timestamp.length());
write( fdlog, "\n", 1 );
}
Process installProc( cmd, args, fdlog );
if ( installProc.executeShell() ) {
result = PKGADD_FAILURE;
} else {
// exec post install
if ((parser->execPostInstall() || m_config->runScripts() ) &&
stat((package->path() + "/" + package->name() +
"/" + "post-install").c_str(), &statData)
== 0) {
// Work around the pkgdir variable change
Process postProc( runscriptCommand,
package->path() + "/" + package->name()+
"/" + "post-install",
fdlog );
if (postProc.executeShell()) {
info.postState = FAILED;
} else {
info.postState = EXEC_SUCCESS;
}
}
}
}
}
@ -467,9 +470,7 @@ bool InstallTransaction::calculateDependencies()
return false;
}
vector<string> treeWalk;
list< pair<string, const Package*> >::const_iterator it =
m_packages.begin();
list<pair<string, const Package*>>::const_iterator it = m_packages.begin();
for ( ; it != m_packages.end(); ++it ) {
const Package* package = it->second;
if ( package ) {
@ -513,7 +514,7 @@ void InstallTransaction::checkDependencies( bool greedy,
if ( index == -1 ) {
index = m_depList.size();
if (( not greedy ) or ( m_pkgDB->isInstalled(package->name(),false) )) {
if ( ( not greedy ) or (isRequired( package->name() )) ) {
m_depList.push_back( package->name() );
}
}
@ -542,42 +543,32 @@ void InstallTransaction::checkDependencies( bool greedy,
list<string>::iterator it = deps.begin();
for ( ; it != deps.end(); ++it ) {
string dep = *it;
if ( !dep.empty() ) {
string::size_type pos = dep.find_last_of( '/' );
if ( pos != string::npos && (pos+1) < dep.length() ) {
dep = dep.substr( pos + 1 );
}
const Package* p = m_repo->getPackage( dep );
if ( p ) {
checkDependencies( greedy, p, index );
} else {
m_missingPackages.
push_back( make_pair( dep, package->name() ) );
}
if ( dep.empty() ) { continue; }
const Package* p = m_repo->getPackage( dep );
if ( p ) {
checkDependencies( greedy, p, index );
} else {
m_missingPackages.
push_back( make_pair( dep, package->name() ) );
}
}
}
if ( (m_config->followSoftdeps()) and (!package->optionals().empty()) ) {
list<string> softDeps;
split( package->optionals(), ',', softDeps );
list<string>::iterator it = softDeps.begin();
for ( ; it != softDeps.end(); ++it ) {
list<string> optionals;
split( package->optionals(), ',', optionals );
list<string>::iterator it = optionals.begin();
for ( ; it != optionals.end(); ++it ) {
string softdep = *it;
if ( !softdep.empty() ) {
string::size_type pos = softdep.find_last_of( '/' );
if ( pos != string::npos && (pos+1) < softdep.length() ) {
softdep = softdep.substr( pos + 1 );
if ( softdep.empty() ) { continue; }
if ( isRequired(softdep) ) {
const Package* p = m_repo->getPackage( softdep );
if ( p ) {
checkDependencies( true, p, index );
} else {
m_missingPackages.
push_back( make_pair( softdep, package->name() ) );
}
if ( m_pkgDB->isInstalled(softdep, true) ) {
const Package* p = m_repo->getPackage( softdep );
if ( p ) {
checkDependencies( true, p, index );
} else {
m_missingPackages.
push_back( make_pair( softdep, package->name() ) );
}
}
}
}
}
}
}
@ -586,6 +577,17 @@ void InstallTransaction::checkDependencies( bool greedy,
treeWalk.pop_back();
}
/*!
Method to determine whether a soft dependency should be part of the transaction
*/
bool InstallTransaction::isRequired(const string &pname) {
if ( m_pkgDB->isInstalled(pname) ) { return true; }
list<pair<string, const Package*>>::iterator it = m_packages.begin();
for ( ; it != m_packages.end(); ++it ) {
if ( pname == it->first ) { return true; }
}
return false;
}
/*!
This method returns a list of packages which should be installed to
@ -638,11 +640,11 @@ InstallTransaction::installedPackages() const
/*!
calculate dependendencies for this package
*/
InstallTransaction::InstallResult
InstallTransaction::calcDependencies( )
bool InstallTransaction::calcDependencies( )
{
if ( m_packages.empty() ) {
return NO_PACKAGE_GIVEN;
cout << "No packages given for this transaction" << endl;
return false;
}
bool validPackages = false;
@ -655,75 +657,19 @@ InstallTransaction::calcDependencies( )
m_missingPackages.push_back( make_pair( it->first, string("") ) );
}
}
if ( !validPackages ) {
return PACKAGE_NOT_FOUND;
}
if (!validPackages) {
cout << "No valid packages for this transaction" << endl;
return false;
}
if ( !calculateDependencies() ) {
return CYCLIC_DEPEND;
cout << "Cyclic dependencies detected" << endl;
return false;
}
return SUCCESS;
}
/*
* getPkgDest assumes that you're in the build directory already
*/
string InstallTransaction::getPkgmkSetting(const string& setting)
{
string value = "";
value = getPkgmkSettingFromFile(setting, "/etc/pkgmk.conf");
if (value.size() == 0) {
value = getPkgmkSettingFromFile(setting, "/usr/bin/pkgmk");
}
return value;
}
string InstallTransaction::getPkgmkSettingFromFile(const string& setting, const string& fileName)
{
FILE* fp = fopen(fileName.c_str(), "r");
if (!fp)
return "";
string candidate;
string s;
char line[256];
while (fgets(line, 256, fp)) {
s = StringHelper::stripWhiteSpace(line);
if (StringHelper::startsWith(s, setting + "=")) {
candidate = s;
}
}
fclose(fp);
string value = "";
if (candidate.length() > 0) {
string cmd = "eval " + candidate + " && echo $" + setting;
FILE* p = popen(cmd.c_str(), "r");
if (p) {
fgets(line, 256, p);
value = StringHelper::stripWhiteSpace(line);
fclose(p);
}
}
return value;
return true;
}
const list<string>& InstallTransaction::ignoredPackages() const
{
return m_ignoredPackages;
}
string InstallTransaction::getPkgmkPackageDir()
{
return getPkgmkSetting("PKGMK_PACKAGE_DIR");
}
string InstallTransaction::getPkgmkCompressionMode()
{
string value = getPkgmkSetting("PKGMK_COMPRESSION_MODE");
return value.size() ? value : "gz";
}

View File

@ -33,10 +33,6 @@ class Configuration;
class InstallTransaction
{
public:
InstallTransaction( const list<char*>& names,
const Repository* repo,
PkgDB* pkgDB,
const Configuration* config );
InstallTransaction( const list<string>& names,
const Repository* repo,
PkgDB* pkgDB,
@ -54,12 +50,10 @@ public:
/*! Result of an installation */
enum InstallResult {
SUCCESS, /*!< yeah, success */
NO_PACKAGE_GIVEN, /*!< no package give to install */
NO_PACKAGE_GIVEN, /*!< no package given to install */
PACKAGE_NOT_FOUND, /*!< package not found */
PKGMK_EXEC_ERROR, /*!< can't execute pkgmk */
PKGMK_FAILURE, /*!< error while pkgmk */
PKGADD_EXEC_ERROR, /*!< can't execute pkgadd */
PKGDEST_ERROR, /*!< can't change to PKGDEST */
PKGDEST_ERROR, /*!< can't change to PKGDEST */
PKGADD_FAILURE, /*!< error while pkgadd */
CYCLIC_DEPEND, /*!< cyclic dependencies found */
LOG_DIR_FAILURE, /*!< couldn't create log directory */
@ -71,6 +65,7 @@ public:
enum State {
EXEC_SUCCESS,
FAILED,
DEFERRED,
NONEXISTENT
};
struct InstallInfo {
@ -84,23 +79,17 @@ public:
bool hasReadme;
};
InstallResult install( const ArgParser* parser,
bool update,
bool group );
InstallResult calcDependencies();
InstallResult install( const ArgParser* parser );
bool calcDependencies();
const list< pair<string, InstallInfo> >& installedPackages() const;
const list<string>& alreadyInstalledPackages() const;
const list<string>& ignoredPackages() const;
const list<string>& dependencies() const;
const list< pair<string,string> >& missing() const;
const list< pair<string, InstallInfo> >& installError() const;
static string getPkgmkPackageDir();
static string getPkgmkCompressionMode();
private:
bool calculateDependencies();
void checkDependencies( bool greedy, const Package* package, int depends=-1 );
@ -109,10 +98,7 @@ private:
const ArgParser* parser,
bool update,
InstallInfo& info ) const;
static string getPkgmkSetting(const string& setting);
static string getPkgmkSettingFromFile(const string& setting,
const string& fileName);
bool isRequired(const string &pname);
PkgDB* m_pkgDB;
DepResolver m_resolver;
@ -127,21 +113,20 @@ private:
// packages< pair<name, hasReadme> > installed by this transaction
list< pair<string, InstallInfo> > m_installedPackages;
// packages which were requested to be installed which where already
// packages requested to be installed, but already present
list<string> m_alreadyInstalledPackages;
// packages which are required by the transaction, but ignored by
// the user
// packages required by the transaction, but ignored by the user
list<string> m_ignoredPackages;
list<string> m_depNameList;
vector<string> m_depList;
vector<string> treeWalk;
// packages requested to be installed not found in the ports tree
// packages requested to be installed, but not found in the ports tree
list< pair<string, string> > m_missingPackages;
// packages where build/installed failed
// packages where build/install failed
list< pair<string, InstallInfo> > m_installErrors;
/// prt-get itself

View File

@ -57,17 +57,13 @@ int main( int argc, char** argv )
ArgParser::Type command = argParser.commandType();
switch ( command )
{
switch ( command ) {
case ArgParser::HELP:
prtGet.printUsage();
break;
case ArgParser::SHOW_VERSION:
prtGet.printVersion();
break;
case ArgParser::LIST:
prtGet.listPackages();
break;
case ArgParser::DUP:
prtGet.listShadowed();
break;
@ -84,28 +80,16 @@ int main( int argc, char** argv )
prtGet.isInstalled();
break;
case ArgParser::INSTALL:
prtGet.install();
break;
case ArgParser::DEPINST:
prtGet.install(false, true, true);
break;
case ArgParser::GRPINST:
prtGet.install( false, true );
prtGet.install( argParser.depSort() );
break;
case ArgParser::DEPENDS:
prtGet.printDepends();
break;
case ArgParser::QUICKDEP:
prtGet.printDepends( true );
break;
case ArgParser::UPDATE:
prtGet.install( true );
prtGet.printDepends( argParser.quick() );
break;
case ArgParser::DEPTREE:
prtGet.printDepTree();
break;
case ArgParser::DIFF:
prtGet.printDiff();
break;
case ArgParser::QUICKDIFF:
prtGet.printQuickDiff();
prtGet.printDiff( argParser.quick() );
break;
case ArgParser::CREATE_CACHE:
prtGet.createCache();
@ -113,36 +97,36 @@ int main( int argc, char** argv )
case ArgParser::PATH:
prtGet.printPath();
break;
case ArgParser::LISTINST:
prtGet.listInstalled();
break;
case ArgParser::PRINTF:
prtGet.printf();
break;
case ArgParser::README:
prtGet.readme();
break;
case ArgParser::DEPENDENT:
prtGet.printDependent();
break;
case ArgParser::SYSUP:
prtGet.sysup();
break;
case ArgParser::CURRENT:
prtGet.current();
break;
case ArgParser::FSEARCH:
prtGet.fsearch();
break;
case ArgParser::LIST:
prtGet.listPackages();
break;
case ArgParser::LISTINST:
prtGet.listInstalled();
break;
case ArgParser::LISTORPHANS:
prtGet.listOrphans();
break;
case ArgParser::LISTLOCKED:
prtGet.listLocked();
break;
case ArgParser::LOCK:
prtGet.setLock( true );
break;
case ArgParser::UNLOCK:
prtGet.setLock( false );
break;
case ArgParser::LISTLOCKED:
prtGet.listLocked();
break;
case ArgParser::CAT:
prtGet.cat();
break;
@ -155,15 +139,9 @@ int main( int argc, char** argv )
case ArgParser::REMOVE:
prtGet.remove();
break;
case ArgParser::DEPTREE:
prtGet.printDependTree();
break;
case ArgParser::DUMPCONFIG:
prtGet.dumpConfig();
break;
case ArgParser::LISTORPHANS:
prtGet.listOrphans();
break;
default:
cerr << "unknown command" << endl;
break;

25
src/meson.build Normal file
View File

@ -0,0 +1,25 @@
executable('prt-get',
'argparser.cpp',
'lockfile.cpp',
'process.cpp',
'pkgdb.cpp',
'installtransaction.cpp',
'package.cpp',
'versioncomparator.cpp',
'main.cpp',
'locker.cpp',
'repository.cpp',
'configuration.cpp',
'datafileparser.cpp',
'depresolver.cpp',
'pg_regex.cpp',
'stringhelper.cpp',
'prtget.cpp',
'file.cpp',
'signaldispatcher.cpp',
include_directories : myconf_dir,
install : true)
install_symlink('prt-cache',
install_dir : get_option('prefix') / 'bin',
pointing_to : 'prt-get')

View File

@ -124,7 +124,7 @@ const string& Package::maintainer() const
}
/*! \return whether or not this package has a readme file */
const bool Package::hasReadme() const
bool Package::hasReadme() const
{
load();
return m_data->hasReadme;
@ -137,12 +137,12 @@ string Package::versionReleaseString() const
return m_data->versionReleaseString;
}
const bool Package::hasPreInstall() const
bool Package::hasPreInstall() const
{
return m_data->hasPreInstall;
}
const bool Package::hasPostInstall() const
bool Package::hasPostInstall() const
{
return m_data->hasPostInstall;
}
@ -213,50 +213,17 @@ void Package::load() const
StringHelper::replaceAll( softdeps, " ", "," );
StringHelper::replaceAll( softdeps, ",,", "," );
StringHelper::replaceAll( softdeps, "(", "" );
StringHelper::replaceAll( softdeps, ")", "" );
// TODO: decide which one to use
#if 0
// remove commented out packages
list<string> softDepList = StringHelper::split( softdeps, ',' );
list<string>::iterator it = deps.begin();
for ( ; it != softDepList.end(); ++it ) {
if ( (*it)[0] == '#' ) {
cerr << "Commented dep: " << *it << endl;
} else {
if ( it != softDepsList.begin() ) {
m_data->optionals += ",";
}
m_data->optionals += *it;
}
}
#else
m_data->optionals = softdeps;
#endif
} else if ( startsWithNoCase( line, "dep" ) ) {
string depends = stripWhiteSpace( getValue( line, ':' ) );
StringHelper::replaceAll( depends, " ", "," );
StringHelper::replaceAll( depends, ",,", "," );
// TODO: decide which one to use
#if 0
// remove commented out packages
list<string> deps = StringHelper::split( depends, ',' );
list<string>::iterator it = deps.begin();
for ( ; it != deps.end(); ++it ) {
if ( (*it)[0] == '#' ) {
cerr << "Commented dep: " << *it << endl;
} else {
if ( it != deps.begin() ) {
m_data->depends += ",";
}
m_data->depends += *it;
}
}
#else
m_data->depends = depends;
#endif
}
}
}
@ -345,11 +312,9 @@ void Package::expandShellCommands(std::string& input,
pos = 0;
while ((pos = input.find(startTag[i], pos)) != string::npos) {
if (unameBuf.release) {
input = replaceAll(input,
startTag[i] + "uname -r" + endTag[i],
unameBuf.release);
}
input = replaceAll(input,
startTag[i] + "uname -r" + endTag[i],
unameBuf.release);
dpos = input.find(startTag[i] + "date");
if (dpos != string::npos) {

View File

@ -52,9 +52,9 @@ public:
const std::string& url() const;
const std::string& optionals() const;
const std::string& maintainer() const;
const bool hasReadme() const;
const bool hasPreInstall() const;
const bool hasPostInstall() const;
bool hasReadme() const;
bool hasPreInstall() const;
bool hasPostInstall() const;
std::string versionReleaseString() const;

View File

@ -20,6 +20,7 @@ using namespace std;
#include <fnmatch.h>
#include "config.h"
#include "pkgdb.h"
#include "datafileparser.h"
#include "stringhelper.h"

View File

@ -32,6 +32,7 @@ public:
bool useAlias = false,
bool* isAlias = 0,
string* aliasOrignalName = 0 ) const;
bool isOutdated( const std::string& name ) const;
std::string getPackageVersion( const std::string& name ) const;

View File

@ -68,9 +68,9 @@ int Process::execute()
int status = 0;
if ( m_fdlog > 0 ) {
status = execLog(argc, argv);
status = execLog(argv);
} else {
status = exec(argc, argv);
status = exec(argv);
}
delete [] argv;
@ -78,7 +78,7 @@ int Process::execute()
}
int Process::execLog(const int argc, char** argv)
int Process::execLog(char** argv)
{
int status = 0;
int fdpipe[2];
@ -123,7 +123,7 @@ int Process::execLog(const int argc, char** argv)
}
int Process::exec(const int argc, char** argv)
int Process::exec(char** argv)
{
int status = 0;
pid_t pid = fork();

View File

@ -32,8 +32,8 @@ public:
private:
int exec(const int argc, char** argv);
int execLog(const int argc, char** argv);
int exec(char** argv);
int execLog(char** argv);
int execShell(const char* shell);
int execShellLog(const char* shell);

File diff suppressed because it is too large Load Diff

View File

@ -55,23 +55,25 @@ public:
void listPackages();
void listShadowed();
void listInstalled();
void listOrphans();
void listLocked();
void setLock( bool lock );
void searchPackages( bool searchDesc=false );
void fsearch();
void printInfo();
void isInstalled();
bool isOutdated();
void current();
void readme();
void install( bool update=false,
bool group=false,
bool dependencies=false );
void sysup();
void current();
void install( bool dependencies=false );
void remove();
void printDepends( bool simpleListing=false );
void printDependTree();
void printDependent();
void printDiff();
void printQuickDiff();
void listOrphans();
void printDiff( bool simpleListing=false );
void printDepTree();
void createCache();
@ -81,30 +83,18 @@ public:
void cat();
void ls();
void edit();
void remove();
void setLock( bool lock );
void listLocked();
void fsearch();
void dumpConfig();
int returnValue() const;
SignalHandler::HandlerResult handleSignal( int signal );
SignalHandler::HandlerResult handleSignal();
protected:
void printDepsLevel(int indent, const Package* package, bool greedy);
void printDepsLevel(int level, const Package* package, bool greedy);
void printDependent(const std::string& dep, int level);
void executeTransaction( InstallTransaction& transaction,
bool update, bool group );
void evaluateResult( InstallTransaction& transaction,
bool update,
void executeTransaction( InstallTransaction& transaction );
void evaluateResult( InstallTransaction& transaction,
bool interrupted=false );
void reportPrePost(const InstallTransaction::InstallInfo& info);
@ -123,7 +113,6 @@ protected:
const string& version2,
bool locked);
Repository* m_repo;
PkgDB* m_pkgDB;
Configuration* m_config;

View File

@ -30,7 +30,7 @@ using namespace std;
using namespace StringHelper;
const string Repository::CACHE_VERSION = "V5";
const string Repository::CACHE_VERSION = "V5.1";
/*!
Create a repository
@ -86,12 +86,26 @@ const Package* Repository::getPackage( const string& name ) const
return it->second;
}
/*!
\param name the package name to be matched
\return the version-release in the repository
*/
std::string Repository::getPackageVersion( const string& name ) const
{
map<string, Package*>::const_iterator it = m_packageMap.find( name );
if ( it == m_packageMap.end() ) {
return "0";
}
const Package* p = it->second;
string result = p->version()+"-"+p->release();
return result;
}
/*!
Search packages for a match of \a pattern in name, and description of
Search packages for a match of \a pattern in name, or in description if
\a searchDesc is true.
\note Name searches can often done without opening the Pkgfiles, but not
description search. Therefore, the later is much slower
\note Name searches can often be done without opening the Pkgfiles, but not
description search. Therefore, the latter is much slower
\param pattern the pattern to be found
\param searchDesc whether descriptions should be searched as well
@ -188,11 +202,10 @@ void Repository::initFromFS( const list< pair<string, string> >& rootList,
// TODO: think about whether it would be faster (more
// efficient) to put all packages into a map, and the iterate
// over the list of allowed packages and copy them
// over. depending in the efficiency of find(), this might be
// faster
// TODO: think about whether it would be faster (more efficient)
// to put all packages into a map, and then iterate
// over the list of allowed packages and copy them over.
// Depending on the efficiency of find(), this might be faster.
d = opendir( path.c_str() );
while ( ( de = readdir( d ) ) != NULL ) {
name = de->d_name;
@ -390,6 +403,37 @@ bool Repository::createOutputDir( const string& path )
return true;
}
/*
look for any port mentioning \a pattern as a dependency or soft dependency.
searchOptionals=false (the default) only searches the "Depends on:" line.
The output will need to be trimmed afterward, because in this namespace we
can't check whether the matching ports are installed.
*/
void Repository::getDependentPackages( const string& pattern,
list<Package*>& target,
bool searchOptionals ) const {
map<string, Package*>::const_iterator im = m_packageMap.begin();
for ( ; im != m_packageMap.end(); ++im ) {
Package* q = im->second; string s;
if (searchOptionals) {
s = toLowerCase(q->optionals());
} else {
s = toLowerCase(q->dependencies());
}
if ( s.find( pattern ) != string::npos ) {
list<string> tokens;
split( s, ',', tokens );
list<string>::iterator ik = find( tokens.begin(),
tokens.end(), pattern );
if ( ik != tokens.end() ) {
target.push_back( q );
}
}
}
}
/*!
Search packages for a match of \a pattern in name. The name can

View File

@ -19,6 +19,7 @@
using namespace std;
#include "package.h"
#include "stringhelper.h"
/*!
\class Repository
@ -33,6 +34,7 @@ public:
~Repository();
const Package* getPackage( const string& name ) const;
std::string getPackageVersion( const string& name ) const;
const map<string, Package*>& packages() const;
const list<pair<Package*, Package*> >& shadowedPackages() const;
@ -40,6 +42,10 @@ public:
list<Package*>& target,
bool searchDesc ) const;
void getDependentPackages( const string& pattern,
list<Package*>& target,
bool searchOptionals ) const;
void getMatchingPackages( const string& pattern,
list<Package*>& target ) const;

View File

@ -36,7 +36,7 @@ void SignalDispatcher::dispatch( int signalNumber )
map<int, SignalHandler*>::iterator it =
SignalDispatcher::instance()->m_signalHandlers.find( signalNumber );
if ( it != SignalDispatcher::instance()->m_signalHandlers.end() ) {
it->second->handleSignal( signalNumber );
it->second->handleSignal();
} else {
cerr << "prt-get: caught signal " << signalNumber << endl;
}

View File

@ -28,7 +28,7 @@ public:
EXIT, /*!< signal handled, exit now */
CONTINUE /*!< signal handled, don't exit */
};
virtual HandlerResult handleSignal( int signalNumber ) = 0;
virtual HandlerResult handleSignal() = 0;
};
/*!

View File

@ -155,5 +155,4 @@ string replaceAll( string& in,
return in;
}
}; // Namespace