diff options
author | Cem Keylan <cem@ckyln.com> | 2021-03-13 14:08:29 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2021-03-13 14:08:29 +0300 |
commit | 0ea3661a6ba0baaa39b95e836e8f2c87e2f4c20f (patch) | |
tree | b4f26bf5b77a8818c972a36d01b29adb533a5c83 | |
parent | edf65a21574455989192e1a91453aa6f7dc90d53 (diff) | |
download | otools-1.3.1.tar.gz |
add configuration for fts, handle if it is available on system1.3.1
-rw-r--r-- | Makefile | 13 | ||||
-rw-r--r-- | README.md | 33 | ||||
-rw-r--r-- | config.mk | 8 | ||||
-rw-r--r-- | lib/libutil/ohash.h | 4 |
4 files changed, 30 insertions, 28 deletions
@@ -15,7 +15,6 @@ LIBOBJ = \ lib/libc/crypt/arc4random.o \ lib/libc/crypt/arc4random_uniform.o \ lib/libc/crypt/blowfish.o \ - lib/libc/gen/fts.o \ lib/libc/gen/getprogname.o \ lib/libc/gen/pwcache.o \ lib/libc/gen/readpassphrase.o \ @@ -48,6 +47,14 @@ LIBOBJ = \ lib/libutil/ohash.o \ lib/libutil/pidfile.o +ifeq (${FTS}, 0) +LIBOBJ += lib/libc/gen/fts.o +else +CFLAGS += -DHAVE_FTS + ifeq (${FTS}, 1) + LIBFTS = -lfts + endif +endif MAN = \ usr.bin/diff/diff.1 \ @@ -194,7 +201,7 @@ MANDOCOBJ = \ usr.bin/mandoc/tree.o BINOBJ += ${MANDOCOBJ} mandoc: ${MANDOCOBJ} ${LIB} - ${CC} ${LDFLAGS} -o $@ ${MANDOCOBJ} ${LIB} ${ZLIB} + ${CC} ${LDFLAGS} -o $@ ${MANDOCOBJ} ${LIB} ${ZLIB} ${LIBFTS} # ------------------------------------------------------------------------------ # md5 @@ -239,7 +246,7 @@ PAXOBJ = \ bin/pax/tty_subs.o BINOBJ += ${PAXOBJ} pax: ${PAXOBJ} ${LIB} - ${CC} ${LDFLAGS} -o $@ ${PAXOBJ} ${LIB} + ${CC} ${LDFLAGS} -o $@ ${PAXOBJ} ${LIB} ${LIBFTS} # ------------------------------------------------------------------------------ # patch @@ -1,5 +1,5 @@ otools ------- +====== Some OpenBSD-6.8 userland utilities meant to be included in Carbs Linux base. @@ -14,36 +14,19 @@ Currently includes the following software: - pax - signify -You can build software individually by calling 'make <program>', and the -program will be built to the root directory of the source. The Makefile -is bsdmake compatible. +You can build software individually by calling `make <program>`, and the +program will be built to the root directory of the source. The build system is +configured through `config.mk` requirements ------------ -In order to build 'mandoc', you need to either have zlib installed, or edit -config.mk to use the in-source zlib. +In order to build `mandoc`, you need to either have zlib installed, or edit +`config.mk` to use the in-source `zlib`. -In order to build 'nc', you need to have a libtls implementation. Carbs Linux -uses libtls-bearssl by default. - - -notes ------ - -If you want the manpager to have tags support (doesn't work on busybox less), -you will need to do the following: - - echo CFLAGS += -DHAVE_LESS_T >> config.mk - - -If you are unsure whether your less implementation includes tag support, run -the following: - - :> testfile - less -F -T testfile testfile && echo CFLAGS += -DHAVE_LESS_T >> config.mk - rm testfile +In order to build `nc`, you need to have a `libtls` implementation. Carbs Linux +uses `libtls-bearssl` by default. patch directory @@ -18,6 +18,10 @@ TLSLIB = -ltls -lbearssl # in-source zlib. ZLIB = -lz +# If fts is available on your system, we need to disable building it here. +# Change with 1 if you are using musl-fts, 2 if you are using glibc. +FTS=0 + CFLAGS += -Wall -Wno-pointer-sign -Wno-maybe-uninitialized \ -Wno-attributes -I${PWD}/includedir \ -D 'DEF_WEAK(n)=_Static_assert(1, "")' \ @@ -25,3 +29,7 @@ CFLAGS += -Wall -Wno-pointer-sign -Wno-maybe-uninitialized \ -idirafter ${PWD}/sys \ -idirafter ${PWD}/lib/libutil \ -idirafter ${PWD}/lib/libcrypto + +# If you are using a less implementation with tags support, uncomment +# the following. +# CFLAGS += -DHAVE_LESS_T diff --git a/lib/libutil/ohash.h b/lib/libutil/ohash.h index c5f81ec..3bc24b6 100644 --- a/lib/libutil/ohash.h +++ b/lib/libutil/ohash.h @@ -18,6 +18,10 @@ #ifndef OHASH_H #define OHASH_H +#ifdef HAVE_FTS + #include <sys/cdefs.h> +#endif + /* Open hashing support. * Open hashing was chosen because it is much lighter than other hash * techniques, and more efficient in most cases. |