vcpkg/ports/libcap/configure

51 lines
1.0 KiB
Plaintext
Raw Normal View History

[libsystemd] add new port (#31150) * add libsystemd, libcap, libxcrypt * baseline libsystemd, libcap, libxcrypt * versions tree libsystemd, libcap, libxcrypt * licenses for libsystemd, libcap, libxcrypt in vcpkg.json * update tree for libsystemd, libcap, libxcrypt * allow restricted header libxcrypt * tree allow restricted header libxcrypt * remove message Warning * use targets exist during configure, instead of configure_file variable to search for zstd * update git-tree * add quotes to full paths and remove messages in portfiles * update git-tree * remove extra spaces * update git-tree * remove extra line * update git tree * do configure hack differently and remove cross compile patch and override compiler during build_make * update git tree * try either gcc or clang for libcap and specify log file root for each build command * update git-tree * libcap use host dependency of self * libcap update git tree * libsystemd is LGPL2.1 * update libsystemd git-tree * change from find_package to find_dependency in unofficial cmake export of libsystemd * update libsystemd git-tree * update libxcrypt * update git tree libxcrypt * patch pkgconfig file of libsystemd * update libsystemd git-tree * update libsystemd to 254 * update git-tree libsystemd * * Copy of cap_names.h checked in for cross compilation * Decouple cap_names.h from libcap.* make targets * Use vcpkg_cmake_get_vars instead of ENV{CC} etc. * Remove unnecessary self dependency of libcap * Update libcap to 1.2.69 * Update git-tree * cleanup old versions from version jsons
2023-09-21 00:56:16 +08:00
#!/bin/sh
set -e
linkage=shared
prefix=
for OPTION; do
case "${OPTION}" in
--prefix=*)
prefix="${OPTION#--prefix=}"
;;
--enable-static)
linkage=static
;;
esac
done
cat > Makefile.vcpkg <<END_MAKEFILE ;
BUILD_OPTIONS = \
"AR=$AR" \
"BUILD_CC=$CC_FOR_BUILD" \
"CC=$CC" \
"RANLIB=$RANLIB" \
"lib=lib" \
"prefix=$prefix"
ifeq ($linkage,shared)
libs := libcap.so libpsx.so
BUILD_OPTIONS += SHARED=yes
else
libs := libcap.a libpsx.a
BUILD_OPTIONS += SHARED=no
endif
all: libcap/cap_names.h
\$(MAKE) -C libcap pcs \$(libs) \$(BUILD_OPTIONS)
libcap/cap_names.h:
\$(MAKE) -C libcap cap_names.h \$(BUILD_OPTIONS)
install: install-cap_names
\$(MAKE) -C libcap install-$linkage \$(BUILD_OPTIONS)
install-cap_names:
mkdir -p -m 0755 "\$(DESTDIR)$prefix/include/sys/libcap-private"
install -m 0644 libcap/cap_names.h "\$(DESTDIR)$prefix/include/sys/libcap-private"
install -m 0644 libcap/cap_names.list.h "\$(DESTDIR)$prefix/include/sys/libcap-private"
END_MAKEFILE