Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Do not build static binaries on linux due to conflicts between libcrypto and libbsd on sha512
Baptiste Daroussin committed 7 years ago
commit e3450b270117bf7a8290415ac84d810956e47482
parent f1612e2b323941a2d5b7a32a201b7b1e77036405
2 files changed +14 -6
modified auto.def
@@ -49,6 +49,8 @@ if {[string match *-linux* [get-define host]]} {
			user-error "Unable to find libbsd"
		}
	}
+
} else {
+
	define-feature static
}

if {![opt-bool with-libarchive.pc]} {
modified src/Makefile.autosetup
@@ -80,19 +80,25 @@ STATIC_LDFLAGS= $(LIBPKGFLAT) $(LIBS) $(OTHER_LIBS)

include $(MK)/prog.mk

-
all: pkg-static
+
@if HAVE_STATIC
+
all: ${STATIC_FILE}
+
install: install-static
+

+
pkg-static: $(OBJS) $(top_builddir)/libpkg/libpkg_flat.a
+
	$(CC) -o $@ $(OBJS) -static $(LDFLAGS) $(STATIC_LDFLAGS)
+

+
install-static: pkg-static
+
	install -d -m 755 $(DESTDIR)$(sbindir)
+
	install -s -m 755 pkg-static $(DESTDIR)$(sbindir)/pkg-static
+
@endif

${OBJS}: $(top_builddir)/pkg_config.h

$(PROG): $(top_builddir)/libpkg/libpkg_flat.a

-
pkg-static: $(OBJS) $(top_builddir)/libpkg/libpkg_flat.a
-
	$(CC) -o $@ $(OBJS) -static $(LDFLAGS) $(STATIC_LDFLAGS)
-

-
install: $(PROG) pkg-static
+
install: $(PROG)
	install -d -m 755 $(DESTDIR)$(sbindir)
	install -s -m 755 pkg $(DESTDIR)$(sbindir)/pkg
-
	install -s -m 755 pkg-static $(DESTDIR)$(sbindir)/pkg-static
	install -m 644 pkg.conf.sample $(DESTDIR)$(etcdir)

clean: clean-pkg-static