Skip to content
Permalink
Browse files

new port devel/libmd

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@14686 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Oct 18, 2005
1 parent ba98cb8 commit 3d94f6d7c59a6f031069a5de682c58e8c2131c6a
Showing with 133 additions and 0 deletions.
  1. +28 −0 devel/libmd/Portfile
  2. +94 −0 devel/libmd/files/patch-Makefile.in
  3. +11 −0 devel/libmd/files/patch-rmd160.h
@@ -0,0 +1,28 @@
# $Id: Portfile,v 1.1 2005/10/18 08:53:07 mww Exp $

PortSystem 1.0

name libmd
version 0.3
categories devel
platforms darwin
maintainers mww@opendarwin.org
description Libmd is a cryptographic message digest library
long_description ${description}

homepage http://www.penguin.cz/~mhi/libmd/
master_sites ftp://ftp.penguin.cz/pub/users/mhi/libmd/
checksums md5 1db1795b7e87bbda542e4c33b6ce5566
use_bzip2 yes
patchfiles patch-Makefile.in patch-rmd160.h

configure.args --host=powerpc-apple-freebsd

platform darwin 8 {
configure.env CC=/usr/bin/gcc-4.0
}

post-destroot {
set ln "ln -sf libmd.1.0.dylib"
system "cd ${destroot}${prefix}/lib && ${ln} libmd.1.dylib && ${ln} libmd.dylib"
}
@@ -0,0 +1,94 @@
--- Makefile.in 2000-05-10 15:39:03.000000000 +0200
+++ Makefile.in 2005-10-18 10:41:31.000000000 +0200
@@ -2,6 +2,7 @@
sha.c shahl.c rmd160.c rmd160hl.c
OBJ = $(SRC:.c=.o)

+PREFIX = @prefix@
CC = @CC@
CFLAGS = -O3 -fPIC -I.
RANLIB = @RANLIB@
@@ -15,10 +16,10 @@
OUTDIR=$(PWD)/..
SRCDIR=$(PWD)

-all: libmd.so.1.0 md2.3 md4.3 md5.3 libmd.a docs
+all: libmd.1.0.dylib md2.3 md4.3 md5.3 libmd.a docs

clean:
- rm -f *.o core libmd.a libmd.so* md[245]hl.c md[245].3\
+ rm -f *.o core libmd.a libmd.*dylib md[245]hl.c md[245].3\
shahl.c rmd160hl.c mddriver
(cd docs;make clean)

@@ -31,18 +32,18 @@
test: mddriver
./mddriver

-install: libmd.so.1.0 libmd.so.1 libmd.so
- mkdir -p $(BUILDROOT)/usr/include
- mkdir -p $(BUILDROOT)/usr/lib
- mkdir -p $(BUILDROOT)/usr/man/man3
- $(INSTALL) -g root -o root -m 644 md2.h md4.h md5.h sha.h rmd160.h \
- $(BUILDROOT)/usr/include
- $(INSTALL) -g root -o root -m 644 md2.3 md4.3 md5.3 \
- $(BUILDROOT)/usr/man/man3
- $(INSTALL) -g root -o root -m 755 libmd.so.1.0 $(BUILDROOT)/usr/lib
- $(INSTALL) -g root -o root -m 755 libmd.so.1 $(BUILDROOT)/usr/lib
- $(INSTALL) -g root -o root -m 755 libmd.so $(BUILDROOT)/usr/lib
- $(INSTALL) -g root -o root -m 755 libmd.a $(BUILDROOT)/usr/lib
+install: libmd.1.0.dylib libmd.1.dylib libmd.dylib
+ mkdir -p $(DESTDIR)$(PREFIX)/include
+ mkdir -p $(DESTDIR)$(PREFIX)/lib
+ mkdir -p $(DESTDIR)$(PREFIX)/share/man/man3
+ $(INSTALL) -m 644 md2.h md4.h md5.h sha.h rmd160.h \
+ $(DESTDIR)$(PREFIX)/include
+ $(INSTALL) -m 644 md2.3 md4.3 md5.3 \
+ $(DESTDIR)$(PREFIX)/share/man/man3
+ $(INSTALL) -m 755 libmd.1.0.dylib $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) -m 755 libmd.1.dylib $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) -m 755 libmd.dylib $(DESTDIR)$(PREFIX)/lib
+ $(INSTALL) -m 755 libmd.a $(DESTDIR)$(PREFIX)/lib

binary: install
@echo Creating binary .tar.bz2 in directory $(OUTDIR)/
@@ -50,15 +51,15 @@
bzip2 -9f $(OUTDIR)/libmd-$(VERS)-$(OSTYPE).tar

tarball: mrproper
- @echo Creating source .tar.bz2 in directory $(OUTDIR)/
+ @echo Creating.dyliburce .tar.bz2 in directory $(OUTDIR)/
cd .. && tar cf $(OUTDIR)/libmd-$(VERS).tar libmd-$(VERS)/
bzip2 -9f $(OUTDIR)/libmd-$(VERS).tar

-libmd.so.1:
- $(LN_S) libmd.so.1.0 libmd.so.1
+libmd.1.dylib:
+ $(LN_S) libmd.1.0.dylib libmd.1.dylib

-libmd.so:
- $(LN_S) libmd.so.1.0 libmd.so
+libmd.dylib:
+ $(LN_S) libmd.1.0.dylib libmd.dylib

md2hl.c: mdXhl.c
sed -e 's/mdX/md2/g' -e 's/MDX/MD2/g' $? > $@
@@ -87,15 +88,15 @@
sed -e 's/mdX/md5/g' -e 's/MDX/MD5/g' $? > $@
cat md5.copyright >> $@

-libmd.so.1.0: $(OBJ)
- $(CC) -shared -o libmd.so.1.0 $(OBJ)
+libmd.1.0.dylib: $(OBJ)
+ $(CC) -dynamiclib -o libmd.1.0.dylib $(OBJ) -install_name $(PREFIX)/lib/$@ -current_version $(VERS)

libmd.a: $(OBJ)
rm -f libmd.a
$(AR) rulv libmd.a $(OBJ)
$(RANLIB) libmd.a

-mddriver: mddriver.o libmd.so version.o
+mddriver: mddriver.o libmd.dylib version.o
$(CC) -fPIC -O3 -o mddriver mddriver.o version.o -L. -lmd

version.o: version.c
@@ -0,0 +1,11 @@
--- rmd160.h 1999-07-31 15:39:31.000000000 +0200
+++ rmd160.h 2005-10-18 10:34:20.000000000 +0200
@@ -31,7 +31,7 @@

__BEGIN_DECLS
void RMD160Init(RMD160_CTX *);
-void RMD160Update(RMD160_CTX *, const unsigned char *, unsigned int);
+void RMD160Update(RMD160_CTX *, const unsigned char *, size_t);
void RMD160Final(unsigned char [RMD160_HASHBYTES], RMD160_CTX *);
char * RMD160End(RMD160_CTX *, char *);
char * RMD160File(const char *, char *);

0 comments on commit 3d94f6d

Please sign in to comment.
You can’t perform that action at this time.