aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/libcap/configure
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/libcap/configure
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/libcap/configure')
-rwxr-xr-xvcpkg/ports/libcap/configure51
1 files changed, 51 insertions, 0 deletions
diff --git a/vcpkg/ports/libcap/configure b/vcpkg/ports/libcap/configure
new file mode 100755
index 0000000..a4749cd
--- /dev/null
+++ b/vcpkg/ports/libcap/configure
@@ -0,0 +1,51 @@
+#!/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" \
+ "CC=$CC" \
+ "OBJCOPY=$OBJCOPY" \
+ "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