Hi all, Cgit in ports seems to be a ligtweight web interface to Git. However, to run its binary from ports in a chroot requires to copy a bunch of libraries in the chroot (or ???Premature end of script headers: /cgi-bin/cgit.cgi??? will ensue; `ldd /var/www/cgi-bin/cgit.cgi` is your friend), which I'd rather not.
The attached patch to the Makefile fixes this by adding a static flavour to the port. I have it running on my 5.1 server at the moment, without shared libs, and it seems to behave fine, but I haven't tested it thoroughly yet. There might be a mistake in the way I handled the MODULES variable (it's unconditionally set), which might result in the -static package to have a spurious dependency. I'm happy to be corrected on that (: Hope this helps! -- Olivier Mehani <shtrom-open...@ssji.net> PGP fingerprint: 4435 CF6A 7C8D DD9B E2DE F5F9 F012 A6E2 98C6 6655
Index: Makefile =================================================================== @@ -23,8 +23,17 @@ USE_GMAKE = yes +FLAVORS= static +FLAVOR?= + MODULES = converters/libiconv +.if ${FLAVOR:L} == "static" +CFLAGS += -static +LDFLAGS += -static +MAKEFLAGS += CFLAGS+=-static LDFLAGS+=-static +.else WANTLIB += c crypto pthread z +.endif PREFIX = /var/www MAKE_FLAGS += V=1 NEEDS_LIBICONV=1 LDFLAGS+=-L${LOCALBASE}/lib