git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Patch for Makefile - LIBMD_SHA1: -lmd on FreeBSD

From
ESEd Schouten <ed@fxq.nl>
Date
Jul 10, 2007, 13:19 UTC
Message-ID
<20070710131906.GC55449@hoeg.nl>
Hello,

Once in a while I send in some patches to the FreeBSD folks for the devel/git port. I just wrote a patch for Git that makes it possible to link it against the FreeBSD Message Digest library (libmd), removing the dependency on OpenSSL.

The patch adds the switch LIBMD_SHA1. When set, it just uses sha.h and -lmd. I've also added proper documentation to the top of the Makefile.

Yours,
-- 
 Ed Schouten <ed@fxq.nl>
 WWW: http://g-rave.nl/


--- Makefile	2007-07-10 15:16:03.000000000 +0200
+++ Makefile	2007-07-10 15:17:31.000000000 +0200
@@ -55,6 +55,9 @@
 # specify your own (or DarwinPort's) include directories and
 # library directories by defining CFLAGS and LDFLAGS appropriately.
 #
+# Define LIBMD_SHA1 environment variable when running make to make use
+# of FreeBSD's libmd SHA1 routines.
+#
 # Define PPC_SHA1 environment variable when running make to make use of
 # a bundled SHA1 routine optimized for PowerPC.
 #
@@ -637,6 +640,10 @@
 	BASIC_CFLAGS += -DOLD_ICONV
 endif
 
+ifdef LIBMD_SHA1
+	SHA1_HEADER = "sha.h"
+	EXTLIBS += -lmd
+else
 ifdef PPC_SHA1
 	SHA1_HEADER = "ppc/sha1.h"
 	LIB_OBJS += ppc/sha1.o ppc/sha1ppc.o
@@ -654,6 +661,7 @@
 endif
 endif
 endif
+endif
 ifdef NO_PERL_MAKEMAKER
 	export NO_PERL_MAKEMAKER
 endif
Message 1 of 1 in “Patch for Makefile - LIBMD_SHA1: -lmd on FreeBSD”
  1. Ed SchoutenJul 10, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.