Revert "Move all external code to lib/external."

This reverts commit 9effec0c4e.
This commit is contained in:
Duncan Overbruck 2021-02-04 22:42:57 +01:00
parent 93410bee7f
commit 51b39002e5
No known key found for this signature in database
GPG Key ID: 335C1D17EC3D6E35
44 changed files with 32 additions and 32 deletions

View File

@ -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 * Copyright (c) 1983, 1990, 1991, 1993
* The Regents of the University of California. All rights reserved. * The Regents of the University of California. All rights reserved.
@ -57,7 +57,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 * Copyright (c) 2000-2004 Dag-Erling Coïdan Smørgrav
* All rights reserved. * All rights reserved.
@ -86,7 +86,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * 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 <Todd.Miller@courtesan.com> * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
* *
@ -103,7 +103,7 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * 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 <joerg@NetBSD.org>. * Copyright (c) 2007, 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
* All rights reserved. * All rights reserved.
@ -133,7 +133,7 @@
* SUCH DAMAGE. * 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. * Copyright (c) 1997, 1998, 1999, 2002, 2003 The NetBSD Foundation, Inc.
* All rights reserved. * All rights reserved.

24
configure vendored
View File

@ -192,10 +192,10 @@ fi
[ -z "$DEBUG" ] && DEBUG=yes [ -z "$DEBUG" ] && DEBUG=yes
echo "CC = $CC" >>$CONFIG_MK echo "CC = $CC" >>$CONFIG_MK
echo "CFLAGS += -O2" >>$CONFIG_MK echo "CFLAGS = -O2" >>$CONFIG_MK
echo "LDFLAGS += -L\$(TOPDIR)/lib" >>$CONFIG_MK echo "LDFLAGS = -L\$(TOPDIR)/lib" >>$CONFIG_MK
echo "CFLAGS += -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK echo "CPPFLAGS = -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK
echo "CPPFLAGS += -DXBPS_SYSCONF_PATH=\\\"${ETCDIR}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_SYSCONF_PATH=\\\"${ETCDIR}\\\"" >>$CONFIG_MK
echo "CPPFLAGS += -DXBPS_SYSDEFCONF_PATH=\\\"${SHAREDIR}/xbps.d\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_SYSDEFCONF_PATH=\\\"${SHAREDIR}/xbps.d\\\"" >>$CONFIG_MK
echo "CPPFLAGS += -DXBPS_VERSION=\\\"${VERSION}\\\"" >>$CONFIG_MK echo "CPPFLAGS += -DXBPS_VERSION=\\\"${VERSION}\\\"" >>$CONFIG_MK
@ -369,13 +369,13 @@ if [ "$CC" = "tcc" ]; then
fi fi
# libfetch # libfetch
echo "CFLAGS += -I\$(TOPDIR)/lib/external/fetch" >>$CONFIG_MK echo "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK
echo "LDFLAGS += -lssl" >>$CONFIG_MK echo "LDFLAGS += -lssl" >>$CONFIG_MK
echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a" >>$CONFIG_MK echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a" >>$CONFIG_MK
# proplib # proplib
echo "CFLAGS += -I\$(TOPDIR)/lib/external/portableproplib" >>$CONFIG_MK echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib" >>$CONFIG_MK
echo "CFLAGS += -I\$(TOPDIR)/lib/external/portableproplib/prop" >>$CONFIG_MK echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib/prop" >>$CONFIG_MK
echo "CFLAGS += -pthread" >>$CONFIG_MK echo "CFLAGS += -pthread" >>$CONFIG_MK
# #
@ -433,7 +433,7 @@ fi
if test -n "$HAVE_VASPRINTF"; then if test -n "$HAVE_VASPRINTF"; then
echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK echo "CPPFLAGS += -DHAVE_VASPRINTF" >> $CONFIG_MK
else else
echo "COMPAT_OBJS+= external/vasprintf.o" >>$CONFIG_MK echo "COMPAT_OBJS+= compat/vasprintf.o" >>$CONFIG_MK
fi fi
# #
@ -456,7 +456,7 @@ if $XCC _$func.c -o _$func 2>/dev/null; then
echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK echo "CPPFLAGS += -DHAVE_STRCASESTR" >>$CONFIG_MK
else else
echo no. echo no.
echo "COMPAT_OBJS += external/strcasestr.o" >>$CONFIG_MK echo "COMPAT_OBJS += compat/strcasestr.o" >>$CONFIG_MK
fi fi
rm -f _$func _$func.c 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 echo "CPPFLAGS += -DHAVE_STRLCPY" >> $CONFIG_MK
else else
echo no. echo no.
echo "COMPAT_OBJS += external/strlcpy.o" >>$CONFIG_MK echo "COMPAT_OBJS += compat/strlcpy.o" >>$CONFIG_MK
fi fi
rm -f _$func.c _$func 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 echo "CPPFLAGS += -DHAVE_STRLCAT" >>$CONFIG_MK
else else
echo no. echo no.
echo "COMPAT_OBJS += external/strlcat.o" >>$CONFIG_MK echo "COMPAT_OBJS += compat/strlcat.o" >>$CONFIG_MK
fi fi
rm -f _$func.c _$func 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 echo "CPPFLAGS+= -DHAVE_HUMANIZE_NUMBER" >>$CONFIG_MK
else else
echo no. echo no.
echo "COMPAT_OBJS+= external/humanize_number.o" >>$CONFIG_MK echo "COMPAT_OBJS+= compat/humanize_number.o" >>$CONFIG_MK
fi fi
rm -f _$func.c _$func 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 echo "CPPFLAGS += -DHAVE_RBTREE" >>$CONFIG_MK
else else
echo no. echo no.
echo "LIBPROP_OBJS += external/portableproplib/rb.o" >>$CONFIG_MK echo "LIBPROP_OBJS += portableproplib/rb.o" >>$CONFIG_MK
fi fi
rm -f _$func.c _$func rm -f _$func.c _$func

View File

@ -9,24 +9,24 @@ LIBXBPS_SHLIB = libxbps.so.$(LIBXBPS_MAJOR).$(LIBXBPS_MINOR).$(LIBXBPS_MICRO)
LDFLAGS += $(LIBXBPS_LDFLAGS) -shared -Wl,-soname,libxbps.so.$(LIBXBPS_MAJOR) LDFLAGS += $(LIBXBPS_LDFLAGS) -shared -Wl,-soname,libxbps.so.$(LIBXBPS_MAJOR)
# portableproplib # portableproplib
LIBPROP_OBJS += external/portableproplib/prop_array.o external/portableproplib/prop_bool.o LIBPROP_OBJS += portableproplib/prop_array.o portableproplib/prop_bool.o
LIBPROP_OBJS += external/portableproplib/prop_dictionary.o external/portableproplib/prop_ingest.o LIBPROP_OBJS += portableproplib/prop_dictionary.o portableproplib/prop_ingest.o
LIBPROP_OBJS += external/portableproplib/prop_object.o LIBPROP_OBJS += portableproplib/prop_object.o
LIBPROP_OBJS += external/portableproplib/prop_stack.o external/portableproplib/prop_string.o LIBPROP_OBJS += portableproplib/prop_stack.o portableproplib/prop_string.o
LIBPROP_OBJS += external/portableproplib/prop_array_util.o external/portableproplib/prop_number.o LIBPROP_OBJS += portableproplib/prop_array_util.o portableproplib/prop_number.o
LIBPROP_OBJS += external/portableproplib/prop_dictionary_util.o external/portableproplib/prop_zlib.o LIBPROP_OBJS += portableproplib/prop_dictionary_util.o portableproplib/prop_zlib.o
LIBPROP_OBJS += external/portableproplib/prop_data.o LIBPROP_OBJS += portableproplib/prop_data.o
LIBPROP_CFLAGS = -Wno-unused-parameter -fvisibility=hidden LIBPROP_CFLAGS = -Wno-unused-parameter -fvisibility=hidden
# libfetch # libfetch
LIBFETCH_OBJS = external/fetch/common.o external/fetch/fetch.o external/fetch/file.o LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o
LIBFETCH_OBJS += external/fetch/ftp.o external/fetch/http.o LIBFETCH_OBJS += fetch/ftp.o fetch/http.o
LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DINET6 -DWITH_SSL LIBFETCH_CPPFLAGS = -DFTP_COMBINE_CWDS -DINET6 -DWITH_SSL
ifdef HAVE_VISIBILITY ifdef HAVE_VISIBILITY
LIBFETCH_CFLAGS= -fvisibility=hidden LIBFETCH_CFLAGS= -fvisibility=hidden
endif endif
LIBFETCH_INCS = external/fetch/common.h LIBFETCH_INCS = fetch/common.h
LIBFETCH_GEN = external/fetch/ftperr.h external/fetch/httperr.h LIBFETCH_GEN = fetch/ftperr.h fetch/httperr.h
# External code used by libxbps # External code used by libxbps
EXTOBJS = external/dewey.o external/fexec.o external/mkpath.o EXTOBJS = external/dewey.o external/fexec.o external/mkpath.o
@ -54,13 +54,13 @@ OBJS += $(EXTOBJS) $(COMPAT_OBJS)
.PHONY: all .PHONY: all
all: libxbps.so libxbps.a all: libxbps.so libxbps.a
external/fetch/ftperr.h: external/fetch/ftp.errors fetch/ftperr.h: fetch/ftp.errors
@printf " [GEN]\t\t$@\n" @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" @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) $(LIBFETCH_OBJS): %.o: %.c $(LIBFETCH_INCS) $(LIBFETCH_GEN)
@printf " [CC]\t\t$@\n" @printf " [CC]\t\t$@\n"