Move all external code to lib/external.
This commit is contained in:
parent
40d1cf0209
commit
9effec0c4e
@ -1,4 +1,4 @@
|
||||
[lib/mkpath.c, lib/compat/strcasestr.c, include/queue.h]
|
||||
[lib/external/mkpath.c, lib/external/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/fetch]
|
||||
[lib/download.c, lib/external/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/compat/strlc{at,py}.c]
|
||||
[lib/external/strlc{at,py}.c]
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
[lib/compat/vasprintf.c lib/plist_fetch.c]
|
||||
[lib/external/vasprintf.c lib/plist_fetch.c]
|
||||
/*-
|
||||
* Copyright (c) 2007, 2008, 2009 Joerg Sonnenberger <joerg@NetBSD.org>.
|
||||
* All rights reserved.
|
||||
@ -133,7 +133,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
[lib/compat/humanize_number.c, lib/external/fexec.c]
|
||||
[lib/external/humanize_number.c, lib/external/fexec.c]
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999, 2002, 2003 The NetBSD Foundation, Inc.
|
||||
* All rights reserved.
|
||||
|
24
configure
vendored
24
configure
vendored
@ -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 "CPPFLAGS = -I. -I\$(TOPDIR) -I\$(TOPDIR)/include" >>$CONFIG_MK
|
||||
echo "LDFLAGS += -L\$(TOPDIR)/lib" >>$CONFIG_MK
|
||||
echo "CFLAGS += -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 "CPPFLAGS += -I\$(TOPDIR)/lib/fetch" >>$CONFIG_MK
|
||||
echo "CFLAGS += -I\$(TOPDIR)/lib/external/fetch" >>$CONFIG_MK
|
||||
echo "LDFLAGS += -lssl" >>$CONFIG_MK
|
||||
echo "STATIC_LIBS = \$(TOPDIR)/lib/libxbps.a" >>$CONFIG_MK
|
||||
|
||||
# proplib
|
||||
echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib" >>$CONFIG_MK
|
||||
echo "CPPFLAGS += -I\$(TOPDIR)/lib/portableproplib/prop" >>$CONFIG_MK
|
||||
echo "CFLAGS += -I\$(TOPDIR)/lib/external/portableproplib" >>$CONFIG_MK
|
||||
echo "CFLAGS += -I\$(TOPDIR)/lib/external/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+= compat/vasprintf.o" >>$CONFIG_MK
|
||||
echo "COMPAT_OBJS+= external/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 += compat/strcasestr.o" >>$CONFIG_MK
|
||||
echo "COMPAT_OBJS += external/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 += compat/strlcpy.o" >>$CONFIG_MK
|
||||
echo "COMPAT_OBJS += external/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 += compat/strlcat.o" >>$CONFIG_MK
|
||||
echo "COMPAT_OBJS += external/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+= compat/humanize_number.o" >>$CONFIG_MK
|
||||
echo "COMPAT_OBJS+= external/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 += portableproplib/rb.o" >>$CONFIG_MK
|
||||
echo "LIBPROP_OBJS += external/portableproplib/rb.o" >>$CONFIG_MK
|
||||
fi
|
||||
rm -f _$func.c _$func
|
||||
|
||||
|
30
lib/Makefile
30
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 += 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_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_CFLAGS = -Wno-unused-parameter -fvisibility=hidden
|
||||
|
||||
# libfetch
|
||||
LIBFETCH_OBJS = fetch/common.o fetch/fetch.o fetch/file.o
|
||||
LIBFETCH_OBJS += fetch/ftp.o fetch/http.o
|
||||
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_CPPFLAGS = -DFTP_COMBINE_CWDS -DINET6 -DWITH_SSL
|
||||
ifdef HAVE_VISIBILITY
|
||||
LIBFETCH_CFLAGS= -fvisibility=hidden
|
||||
endif
|
||||
LIBFETCH_INCS = fetch/common.h
|
||||
LIBFETCH_GEN = fetch/ftperr.h fetch/httperr.h
|
||||
LIBFETCH_INCS = external/fetch/common.h
|
||||
LIBFETCH_GEN = external/fetch/ftperr.h external/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
|
||||
|
||||
fetch/ftperr.h: fetch/ftp.errors
|
||||
external/fetch/ftperr.h: external/fetch/ftp.errors
|
||||
@printf " [GEN]\t\t$@\n"
|
||||
${SILENT}./fetch/errlist.sh ftp_errlist FTP $< > $@
|
||||
${SILENT}./external/fetch/errlist.sh ftp_errlist FTP $< > $@
|
||||
|
||||
fetch/httperr.h: fetch/http.errors
|
||||
external/fetch/httperr.h: external/fetch/http.errors
|
||||
@printf " [GEN]\t\t$@\n"
|
||||
@./fetch/errlist.sh http_errlist HTTP $< > $@
|
||||
@./external/fetch/errlist.sh http_errlist HTTP $< > $@
|
||||
|
||||
$(LIBFETCH_OBJS): %.o: %.c $(LIBFETCH_INCS) $(LIBFETCH_GEN)
|
||||
@printf " [CC]\t\t$@\n"
|
||||
|
Loading…
Reference in New Issue
Block a user