{"thread":{"id":"8962","subject":"Patch for Makefile - LIBMD_SHA1: -lmd on FreeBSD","startedAt":"2007-07-10T13:19:06Z","lastAt":"2007-07-10T13:19:06Z","messageCount":1,"participants":["Ed Schouten"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"46937","messageId":"20070710131906.GC55449@hoeg.nl","threadId":"8962","inReplyTo":null,"subject":"Patch for Makefile - LIBMD_SHA1: -lmd on FreeBSD","fromName":"Ed Schouten","fromEmail":"ed@fxq.nl","sentAt":"2007-07-10T13:19:06Z","receivedAt":"2007-07-10T13:19:06Z","isPatch":false,"sender":{"key":"ed@fxq.nl","avatar":null},"body":"Hello,\n\nOnce in a while I send in some patches to the FreeBSD folks for the\ndevel/git port. I just wrote a patch for Git that makes it possible to\nlink it against the FreeBSD Message Digest library (libmd), removing the\ndependency on OpenSSL.\n\nThe patch adds the switch LIBMD_SHA1. When set, it just uses sha.h and\n-lmd. I've also added proper documentation to the top of the Makefile.\n\nYours,\n-- \n Ed Schouten <ed@fxq.nl>\n WWW: http://g-rave.nl/\n\n\n--- Makefile\t2007-07-10 15:16:03.000000000 +0200\n+++ Makefile\t2007-07-10 15:17:31.000000000 +0200\n@@ -55,6 +55,9 @@\n # specify your own (or DarwinPort's) include directories and\n # library directories by defining CFLAGS and LDFLAGS appropriately.\n #\n+# Define LIBMD_SHA1 environment variable when running make to make use\n+# of FreeBSD's libmd SHA1 routines.\n+#\n # Define PPC_SHA1 environment variable when running make to make use of\n # a bundled SHA1 routine optimized for PowerPC.\n #\n@@ -637,6 +640,10 @@\n \tBASIC_CFLAGS += -DOLD_ICONV\n endif\n \n+ifdef LIBMD_SHA1\n+\tSHA1_HEADER = \"sha.h\"\n+\tEXTLIBS += -lmd\n+else\n ifdef PPC_SHA1\n \tSHA1_HEADER = \"ppc/sha1.h\"\n \tLIB_OBJS += ppc/sha1.o ppc/sha1ppc.o\n@@ -654,6 +661,7 @@\n endif\n endif\n endif\n+endif\n ifdef NO_PERL_MAKEMAKER\n \texport NO_PERL_MAKEMAKER\n endif\n"}]}