From 51b39002e5aae532884bf4c20059341e369b1958 Mon Sep 17 00:00:00 2001 From: Duncan Overbruck Date: Thu, 4 Feb 2021 22:42:57 +0100 Subject: [PATCH] Revert "Move all external code to lib/external." This reverts commit 9effec0c4e2f50342254d42458275edbe7fd0ee3. --- LICENSE.3RDPARTY | 10 +++---- configure | 24 +++++++-------- lib/Makefile | 30 +++++++++---------- lib/{external => compat}/humanize_number.c | 0 lib/{external => compat}/strcasestr.c | 0 lib/{external => compat}/strlcat.c | 0 lib/{external => compat}/strlcpy.c | 0 lib/{external => compat}/vasprintf.c | 0 lib/{external => }/fetch/common.c | 0 lib/{external => }/fetch/common.h | 0 lib/{external => }/fetch/errlist.sh | 0 lib/{external => }/fetch/fetch.c | 0 lib/{external => }/fetch/fetch.h | 0 lib/{external => }/fetch/file.c | 0 lib/{external => }/fetch/ftp.c | 0 lib/{external => }/fetch/ftp.errors | 0 lib/{external => }/fetch/http.c | 0 lib/{external => }/fetch/http.errors | 0 .../portableproplib/prop/prop_array.h | 0 .../portableproplib/prop/prop_bool.h | 0 .../portableproplib/prop/prop_data.h | 0 .../portableproplib/prop/prop_dictionary.h | 0 .../portableproplib/prop/prop_ingest.h | 0 .../portableproplib/prop/prop_number.h | 0 .../portableproplib/prop/prop_object.h | 0 .../portableproplib/prop/prop_string.h | 0 .../portableproplib/prop/proplib.h | 0 .../portableproplib/prop/rbtree.h | 0 .../portableproplib/prop_array.c | 0 .../portableproplib/prop_array_util.c | 0 .../portableproplib/prop_bool.c | 0 .../portableproplib/prop_data.c | 0 .../portableproplib/prop_dictionary.c | 0 .../portableproplib/prop_dictionary_util.c | 0 .../portableproplib/prop_ingest.c | 0 .../portableproplib/prop_number.c | 0 .../portableproplib/prop_object.c | 0 .../portableproplib/prop_object_impl.h | 0 .../portableproplib/prop_rb_impl.h | 0 .../portableproplib/prop_stack.c | 0 .../portableproplib/prop_stack.h | 0 .../portableproplib/prop_string.c | 0 .../portableproplib/prop_zlib.c | 0 lib/{external => }/portableproplib/rb.c | 0 44 files changed, 32 insertions(+), 32 deletions(-) rename lib/{external => compat}/humanize_number.c (100%) rename lib/{external => compat}/strcasestr.c (100%) rename lib/{external => compat}/strlcat.c (100%) rename lib/{external => compat}/strlcpy.c (100%) rename lib/{external => compat}/vasprintf.c (100%) rename lib/{external => }/fetch/common.c (100%) rename lib/{external => }/fetch/common.h (100%) rename lib/{external => }/fetch/errlist.sh (100%) rename lib/{external => }/fetch/fetch.c (100%) rename lib/{external => }/fetch/fetch.h (100%) rename lib/{external => }/fetch/file.c (100%) rename lib/{external => }/fetch/ftp.c (100%) rename lib/{external => }/fetch/ftp.errors (100%) rename lib/{external => }/fetch/http.c (100%) rename lib/{external => }/fetch/http.errors (100%) rename lib/{external => }/portableproplib/prop/prop_array.h (100%) rename lib/{external => }/portableproplib/prop/prop_bool.h (100%) rename lib/{external => }/portableproplib/prop/prop_data.h (100%) rename lib/{external => }/portableproplib/prop/prop_dictionary.h (100%) rename lib/{external => }/portableproplib/prop/prop_ingest.h (100%) rename lib/{external => }/portableproplib/prop/prop_number.h (100%) rename lib/{external => }/portableproplib/prop/prop_object.h (100%) rename lib/{external => }/portableproplib/prop/prop_string.h (100%) rename lib/{external => }/portableproplib/prop/proplib.h (100%) rename lib/{external => }/portableproplib/prop/rbtree.h (100%) rename lib/{external => }/portableproplib/prop_array.c (100%) rename lib/{external => }/portableproplib/prop_array_util.c (100%) rename lib/{external => }/portableproplib/prop_bool.c (100%) rename lib/{external => }/portableproplib/prop_data.c (100%) rename lib/{external => }/portableproplib/prop_dictionary.c (100%) rename lib/{external => }/portableproplib/prop_dictionary_util.c (100%) rename lib/{external => }/portableproplib/prop_ingest.c (100%) rename lib/{external => }/portableproplib/prop_number.c (100%) rename lib/{external => }/portableproplib/prop_object.c (100%) rename lib/{external => }/portableproplib/prop_object_impl.h (100%) rename lib/{external => }/portableproplib/prop_rb_impl.h (100%) rename lib/{external => }/portableproplib/prop_stack.c (100%) rename lib/{external => }/portableproplib/prop_stack.h (100%) rename lib/{external => }/portableproplib/prop_string.c (100%) rename lib/{external => }/portableproplib/prop_zlib.c (100%) rename lib/{external => }/portableproplib/rb.c (100%) diff --git a/LICENSE.3RDPARTY b/LICENSE.3RDPARTY index 6361147d..4c335830 100644 --- a/LICENSE.3RDPARTY +++ b/LICENSE.3RDPARTY @@ -1,4 +1,4 @@ -[lib/external/mkpath.c, lib/external/strcasestr.c, include/queue.h] +[lib/mkpath.c, lib/compat/strcasestr.c, include/queue.h] /* * Copyright (c) 1983, 1990, 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -57,7 +57,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[lib/download.c, lib/external/fetch] +[lib/download.c, lib/fetch] /*- * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav * All rights reserved. @@ -86,7 +86,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -[lib/external/strlc{at,py}.c] +[lib/compat/strlc{at,py}.c] /* * Copyright (c) 1998 Todd C. Miller * @@ -103,7 +103,7 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -[lib/external/vasprintf.c lib/plist_fetch.c] +[lib/compat/vasprintf.c lib/plist_fetch.c] /*- * Copyright (c) 2007, 2008, 2009 Joerg Sonnenberger . * All rights reserved. @@ -133,7 +133,7 @@ * SUCH DAMAGE. */ -[lib/external/humanize_number.c, lib/external/fexec.c] +[lib/compat/humanize_number.c, lib/external/fexec.c] /* * Copyright (c) 1997, 1998, 1999, 2002, 2003 The NetBSD Foundation, Inc. * All rights reserved. diff --git a/configure b/configure index 1a03a72c..e29e0fd3 100755 --- a/configure +++ b/configure @@ -192,10 +192,10 @@ fi [ -z "$DEBUG" ] && DEBUG=yes echo "CC = $CC" >>$CONFIG_MK -echo "CFLAGS += -O2" >>$CONFIG_MK +echo "CFLAGS = -O2" >>$CONFIG_MK -echo "LDFLAGS += -L\$(TOPDIR)/lib" >>$CONFIG_MK -echo "CFLAGS += -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK +echo "LDFLAGS = -L\$(TOPDIR)/lib" >>$CONFIG_MK +echo "CPPFLAGS = -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_SYSCONF_PATH=\\\"${ETCDIR}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_SYSDEFCONF_PATH=\\\"${SHAREDIR}/xbps.d\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_VERSION=\\\"${VERSION}\\\"" >>$CONFIG_MK @@ -369,13 +369,13 @@ if [ "$CC" = "tcc" ]; then fi # libfetch -echo "CFLAGS += -I\$(TOPDIR)/lib/external/fetch" >>$CONFIG_MK +echo "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK echo "LDFLAGS += -lssl" >>$CONFIG_MK echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a" >>$CONFIG_MK # proplib -echo "CFLAGS += -I\$(TOPDIR)/lib/external/portableproplib" >>$CONFIG_MK -echo "CFLAGS += -I\$(TOPDIR)/lib/external/portableproplib/prop" >>$CONFIG_MK +echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib" >>$CONFIG_MK +echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib/prop" >>$CONFIG_MK echo "CFLAGS += -pthread" >>$CONFIG_MK # @@ -433,7 +433,7 @@ fi if test -n "$HAVE_VASPRINTF"; then echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK else - echo "COMPAT_OBJS+= external/vasprintf.o" >>$CONFIG_MK + echo "COMPAT_OBJS+= compat/vasprintf.o" >>$CONFIG_MK fi # @@ -456,7 +456,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK else echo no. - echo "COMPAT_OBJS += external/strcasestr.o" >>$CONFIG_MK + echo "COMPAT_OBJS += compat/strcasestr.o" >>$CONFIG_MK fi rm -f _$func _$func.c @@ -479,7 +479,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_STRLCPY" >> $CONFIG_MK else echo no. - echo "COMPAT_OBJS += external/strlcpy.o" >>$CONFIG_MK + echo "COMPAT_OBJS += compat/strlcpy.o" >>$CONFIG_MK fi rm -f _$func.c _$func @@ -501,7 +501,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_STRLCAT" >>$CONFIG_MK else echo no. - echo "COMPAT_OBJS += external/strlcat.o" >>$CONFIG_MK + echo "COMPAT_OBJS += compat/strlcat.o" >>$CONFIG_MK fi rm -f _$func.c _$func @@ -544,7 +544,7 @@ if $XCC _$func.c -lutil -o _$func 2>/dev/null; then echo "CPPFLAGS+= -DHAVE_HUMANIZE_NUMBER" >>$CONFIG_MK else echo no. - echo "COMPAT_OBJS+= external/humanize_number.o" >>$CONFIG_MK + echo "COMPAT_OBJS+= compat/humanize_number.o" >>$CONFIG_MK fi rm -f _$func.c _$func @@ -565,7 +565,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then echo "CPPFLAGS += -DHAVE_RBTREE" >>$CONFIG_MK else echo no. - echo "LIBPROP_OBJS += external/portableproplib/rb.o" >>$CONFIG_MK + echo "LIBPROP_OBJS += portableproplib/rb.o" >>$CONFIG_MK fi rm -f _$func.c _$func diff --git a/lib/Makefile b/lib/Makefile index 8d52c6f4..5c10bf6f 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -9,24 +9,24 @@ LIBXBPS_SHLIB = libxbps.so.$(LIBXBPS_MAJOR).$(LIBXBPS_MINOR).$(LIBXBPS_MICRO) LDFLAGS += $(LIBXBPS_LDFLAGS) -shared -Wl,-soname,libxbps.so.$(LIBXBPS_MAJOR) # portableproplib -LIBPROP_OBJS += external/portableproplib/prop_array.o external/portableproplib/prop_bool.o -LIBPROP_OBJS += external/portableproplib/prop_dictionary.o external/portableproplib/prop_ingest.o -LIBPROP_OBJS += external/portableproplib/prop_object.o -LIBPROP_OBJS += external/portableproplib/prop_stack.o external/portableproplib/prop_string.o -LIBPROP_OBJS += external/portableproplib/prop_array_util.o external/portableproplib/prop_number.o -LIBPROP_OBJS += external/portableproplib/prop_dictionary_util.o external/portableproplib/prop_zlib.o -LIBPROP_OBJS += external/portableproplib/prop_data.o +LIBPROP_OBJS += portableproplib/prop_array.o portableproplib/prop_bool.o +LIBPROP_OBJS += portableproplib/prop_dictionary.o portableproplib/prop_ingest.o +LIBPROP_OBJS += portableproplib/prop_object.o +LIBPROP_OBJS += portableproplib/prop_stack.o portableproplib/prop_string.o +LIBPROP_OBJS += portableproplib/prop_array_util.o portableproplib/prop_number.o +LIBPROP_OBJS += portableproplib/prop_dictionary_util.o portableproplib/prop_zlib.o +LIBPROP_OBJS += portableproplib/prop_data.o LIBPROP_CFLAGS = -Wno-unused-parameter -fvisibility=hidden # libfetch -LIBFETCH_OBJS = external/fetch/common.o external/fetch/fetch.o external/fetch/file.o -LIBFETCH_OBJS += external/fetch/ftp.o external/fetch/http.o +LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o +LIBFETCH_OBJS += fetch/ftp.o fetch/http.o LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DINET6 -DWITH_SSL ifdef HAVE_VISIBILITY LIBFETCH_CFLAGS= -fvisibility=hidden endif -LIBFETCH_INCS = external/fetch/common.h -LIBFETCH_GEN = external/fetch/ftperr.h external/fetch/httperr.h +LIBFETCH_INCS = fetch/common.h +LIBFETCH_GEN = fetch/ftperr.h fetch/httperr.h # External code used by libxbps EXTOBJS = external/dewey.o external/fexec.o external/mkpath.o @@ -54,13 +54,13 @@ OBJS += $(EXTOBJS) $(COMPAT_OBJS) .PHONY: all all: libxbps.so libxbps.a -external/fetch/ftperr.h: external/fetch/ftp.errors +fetch/ftperr.h: fetch/ftp.errors @printf " [GEN]\t\t$@\n" - ${SILENT}./external/fetch/errlist.sh ftp_errlist FTP $< > $@ + ${SILENT}./fetch/errlist.sh ftp_errlist FTP $< > $@ -external/fetch/httperr.h: external/fetch/http.errors +fetch/httperr.h: fetch/http.errors @printf " [GEN]\t\t$@\n" - @./external/fetch/errlist.sh http_errlist HTTP $< > $@ + @./fetch/errlist.sh http_errlist HTTP $< > $@ $(LIBFETCH_OBJS): %.o: %.c $(LIBFETCH_INCS) $(LIBFETCH_GEN) @printf " [CC]\t\t$@\n" diff --git a/lib/external/humanize_number.c b/lib/compat/humanize_number.c similarity index 100% rename from lib/external/humanize_number.c rename to lib/compat/humanize_number.c diff --git a/lib/external/strcasestr.c b/lib/compat/strcasestr.c similarity index 100% rename from lib/external/strcasestr.c rename to lib/compat/strcasestr.c diff --git a/lib/external/strlcat.c b/lib/compat/strlcat.c similarity index 100% rename from lib/external/strlcat.c rename to lib/compat/strlcat.c diff --git a/lib/external/strlcpy.c b/lib/compat/strlcpy.c similarity index 100% rename from lib/external/strlcpy.c rename to lib/compat/strlcpy.c diff --git a/lib/external/vasprintf.c b/lib/compat/vasprintf.c similarity index 100% rename from lib/external/vasprintf.c rename to lib/compat/vasprintf.c diff --git a/lib/external/fetch/common.c b/lib/fetch/common.c similarity index 100% rename from lib/external/fetch/common.c rename to lib/fetch/common.c diff --git a/lib/external/fetch/common.h b/lib/fetch/common.h similarity index 100% rename from lib/external/fetch/common.h rename to lib/fetch/common.h diff --git a/lib/external/fetch/errlist.sh b/lib/fetch/errlist.sh similarity index 100% rename from lib/external/fetch/errlist.sh rename to lib/fetch/errlist.sh diff --git a/lib/external/fetch/fetch.c b/lib/fetch/fetch.c similarity index 100% rename from lib/external/fetch/fetch.c rename to lib/fetch/fetch.c diff --git a/lib/external/fetch/fetch.h b/lib/fetch/fetch.h similarity index 100% rename from lib/external/fetch/fetch.h rename to lib/fetch/fetch.h diff --git a/lib/external/fetch/file.c b/lib/fetch/file.c similarity index 100% rename from lib/external/fetch/file.c rename to lib/fetch/file.c diff --git a/lib/external/fetch/ftp.c b/lib/fetch/ftp.c similarity index 100% rename from lib/external/fetch/ftp.c rename to lib/fetch/ftp.c diff --git a/lib/external/fetch/ftp.errors b/lib/fetch/ftp.errors similarity index 100% rename from lib/external/fetch/ftp.errors rename to lib/fetch/ftp.errors diff --git a/lib/external/fetch/http.c b/lib/fetch/http.c similarity index 100% rename from lib/external/fetch/http.c rename to lib/fetch/http.c diff --git a/lib/external/fetch/http.errors b/lib/fetch/http.errors similarity index 100% rename from lib/external/fetch/http.errors rename to lib/fetch/http.errors diff --git a/lib/external/portableproplib/prop/prop_array.h b/lib/portableproplib/prop/prop_array.h similarity index 100% rename from lib/external/portableproplib/prop/prop_array.h rename to lib/portableproplib/prop/prop_array.h diff --git a/lib/external/portableproplib/prop/prop_bool.h b/lib/portableproplib/prop/prop_bool.h similarity index 100% rename from lib/external/portableproplib/prop/prop_bool.h rename to lib/portableproplib/prop/prop_bool.h diff --git a/lib/external/portableproplib/prop/prop_data.h b/lib/portableproplib/prop/prop_data.h similarity index 100% rename from lib/external/portableproplib/prop/prop_data.h rename to lib/portableproplib/prop/prop_data.h diff --git a/lib/external/portableproplib/prop/prop_dictionary.h b/lib/portableproplib/prop/prop_dictionary.h similarity index 100% rename from lib/external/portableproplib/prop/prop_dictionary.h rename to lib/portableproplib/prop/prop_dictionary.h diff --git a/lib/external/portableproplib/prop/prop_ingest.h b/lib/portableproplib/prop/prop_ingest.h similarity index 100% rename from lib/external/portableproplib/prop/prop_ingest.h rename to lib/portableproplib/prop/prop_ingest.h diff --git a/lib/external/portableproplib/prop/prop_number.h b/lib/portableproplib/prop/prop_number.h similarity index 100% rename from lib/external/portableproplib/prop/prop_number.h rename to lib/portableproplib/prop/prop_number.h diff --git a/lib/external/portableproplib/prop/prop_object.h b/lib/portableproplib/prop/prop_object.h similarity index 100% rename from lib/external/portableproplib/prop/prop_object.h rename to lib/portableproplib/prop/prop_object.h diff --git a/lib/external/portableproplib/prop/prop_string.h b/lib/portableproplib/prop/prop_string.h similarity index 100% rename from lib/external/portableproplib/prop/prop_string.h rename to lib/portableproplib/prop/prop_string.h diff --git a/lib/external/portableproplib/prop/proplib.h b/lib/portableproplib/prop/proplib.h similarity index 100% rename from lib/external/portableproplib/prop/proplib.h rename to lib/portableproplib/prop/proplib.h diff --git a/lib/external/portableproplib/prop/rbtree.h b/lib/portableproplib/prop/rbtree.h similarity index 100% rename from lib/external/portableproplib/prop/rbtree.h rename to lib/portableproplib/prop/rbtree.h diff --git a/lib/external/portableproplib/prop_array.c b/lib/portableproplib/prop_array.c similarity index 100% rename from lib/external/portableproplib/prop_array.c rename to lib/portableproplib/prop_array.c diff --git a/lib/external/portableproplib/prop_array_util.c b/lib/portableproplib/prop_array_util.c similarity index 100% rename from lib/external/portableproplib/prop_array_util.c rename to lib/portableproplib/prop_array_util.c diff --git a/lib/external/portableproplib/prop_bool.c b/lib/portableproplib/prop_bool.c similarity index 100% rename from lib/external/portableproplib/prop_bool.c rename to lib/portableproplib/prop_bool.c diff --git a/lib/external/portableproplib/prop_data.c b/lib/portableproplib/prop_data.c similarity index 100% rename from lib/external/portableproplib/prop_data.c rename to lib/portableproplib/prop_data.c diff --git a/lib/external/portableproplib/prop_dictionary.c b/lib/portableproplib/prop_dictionary.c similarity index 100% rename from lib/external/portableproplib/prop_dictionary.c rename to lib/portableproplib/prop_dictionary.c diff --git a/lib/external/portableproplib/prop_dictionary_util.c b/lib/portableproplib/prop_dictionary_util.c similarity index 100% rename from lib/external/portableproplib/prop_dictionary_util.c rename to lib/portableproplib/prop_dictionary_util.c diff --git a/lib/external/portableproplib/prop_ingest.c b/lib/portableproplib/prop_ingest.c similarity index 100% rename from lib/external/portableproplib/prop_ingest.c rename to lib/portableproplib/prop_ingest.c diff --git a/lib/external/portableproplib/prop_number.c b/lib/portableproplib/prop_number.c similarity index 100% rename from lib/external/portableproplib/prop_number.c rename to lib/portableproplib/prop_number.c diff --git a/lib/external/portableproplib/prop_object.c b/lib/portableproplib/prop_object.c similarity index 100% rename from lib/external/portableproplib/prop_object.c rename to lib/portableproplib/prop_object.c diff --git a/lib/external/portableproplib/prop_object_impl.h b/lib/portableproplib/prop_object_impl.h similarity index 100% rename from lib/external/portableproplib/prop_object_impl.h rename to lib/portableproplib/prop_object_impl.h diff --git a/lib/external/portableproplib/prop_rb_impl.h b/lib/portableproplib/prop_rb_impl.h similarity index 100% rename from lib/external/portableproplib/prop_rb_impl.h rename to lib/portableproplib/prop_rb_impl.h diff --git a/lib/external/portableproplib/prop_stack.c b/lib/portableproplib/prop_stack.c similarity index 100% rename from lib/external/portableproplib/prop_stack.c rename to lib/portableproplib/prop_stack.c diff --git a/lib/external/portableproplib/prop_stack.h b/lib/portableproplib/prop_stack.h similarity index 100% rename from lib/external/portableproplib/prop_stack.h rename to lib/portableproplib/prop_stack.h diff --git a/lib/external/portableproplib/prop_string.c b/lib/portableproplib/prop_string.c similarity index 100% rename from lib/external/portableproplib/prop_string.c rename to lib/portableproplib/prop_string.c diff --git a/lib/external/portableproplib/prop_zlib.c b/lib/portableproplib/prop_zlib.c similarity index 100% rename from lib/external/portableproplib/prop_zlib.c rename to lib/portableproplib/prop_zlib.c diff --git a/lib/external/portableproplib/rb.c b/lib/portableproplib/rb.c similarity index 100% rename from lib/external/portableproplib/rb.c rename to lib/portableproplib/rb.c