build shared lib, bump PKGREV

This commit is contained in:
drochner 2011-03-10 09:52:24 +00:00
parent c781f1bd98
commit 17f4165529
11 changed files with 168 additions and 16 deletions

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.13 2010/11/24 01:09:48 agc Exp $
# $NetBSD: Makefile,v 1.14 2011/03/10 09:52:24 drochner Exp $
#
DISTNAME= ltm-0.42.0
PKGREVISION= 1
CATEGORIES= math
MASTER_SITES= http://libtom.org/files/
EXTRACT_SUFX= .tar.bz2
@ -15,7 +16,8 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/libtommath-0.42.0
MAKE_FILE= makefile
USE_LIBTOOL= yes
MAKE_FILE= makefile.shared
BUILD_TARGET= default
USE_TOOLS+= gmake
@ -25,7 +27,8 @@ do-install:
${INSTALL_DATA} ${WRKSRC}/tommath.h ${DESTDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/tommath_class.h ${DESTDIR}${PREFIX}/include
${INSTALL_DATA} ${WRKSRC}/tommath_superclass.h ${DESTDIR}${PREFIX}/include
${INSTALL_LIB} ${WRKSRC}/libtommath.a ${DESTDIR}${PREFIX}/lib
${LIBTOOL} --mode=install ${INSTALL_LIB} ${WRKSRC}/libtommath.la \
${DESTDIR}${PREFIX}/lib
${INSTALL_DATA} ${WRKSRC}/bn.pdf ${DESTDIR}${PREFIX}/share/doc/ltm
${INSTALL_DATA} ${WRKSRC}/poster.pdf ${DESTDIR}${PREFIX}/share/doc/ltm
${INSTALL_DATA} ${WRKSRC}/tommath.pdf ${DESTDIR}${PREFIX}/share/doc/ltm

View file

@ -1,8 +1,8 @@
@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:05:45 joerg Exp $
@comment $NetBSD: PLIST,v 1.4 2011/03/10 09:52:24 drochner Exp $
include/tommath.h
include/tommath_class.h
include/tommath_superclass.h
lib/libtommath.a
lib/libtommath.la
share/doc/ltm/bn.pdf
share/doc/ltm/poster.pdf
share/doc/ltm/tommath.pdf

View file

@ -1,4 +1,4 @@
# $NetBSD: buildlink3.mk,v 1.7 2009/03/20 19:24:57 joerg Exp $
# $NetBSD: buildlink3.mk,v 1.8 2011/03/10 09:52:24 drochner Exp $
BUILDLINK_TREE+= ltm
@ -8,7 +8,6 @@ LTM_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ltm+= ltm>=0.30
BUILDLINK_ABI_DEPENDS.ltm?= ltm>=0.30nb1
BUILDLINK_PKGSRCDIR.ltm?= ../../math/ltm
BUILDLINK_DEPMETHOD.ltm?= build
.endif # LTM_BUILDLINK3_MK
BUILDLINK_TREE+= -ltm

View file

@ -1,5 +1,6 @@
$NetBSD: distinfo,v 1.4 2010/11/24 01:09:48 agc Exp $
$NetBSD: distinfo,v 1.5 2011/03/10 09:52:24 drochner Exp $
SHA1 (ltm-0.42.0.tar.bz2) = 9b192701cf62b85e9bd65fbb4d622d04cfa5ee0d
RMD160 (ltm-0.42.0.tar.bz2) = 9994d60d7e847a066715d8c644ce9b125932bf92
Size (ltm-0.42.0.tar.bz2) = 1968961 bytes
SHA1 (patch-aa) = 97729991d4c6541d726c0fb1b565794388816ba1

39
math/ltm/patches/patch-aa Normal file
View file

@ -0,0 +1,39 @@
$NetBSD: patch-aa,v 1.1 2011/03/10 09:52:25 drochner Exp $
--- makefile.shared.orig 2010-07-23 14:27:20.000000000 +0000
+++ makefile.shared
@@ -3,7 +3,7 @@
#Tom St Denis
VERSION=0:41
-CC = libtool --mode=compile --tag=CC gcc
+#CC = libtool --mode=compile --tag=CC gcc
CFLAGS += -I./ -Wall -W -Wshadow -Wsign-compare
@@ -48,8 +48,8 @@ HEADERS=tommath.h tommath_class.h tommat
#INCPATH-The directory to install the header files for libtommath.
#DATAPATH-The directory to install the pdf docs.
DESTDIR=
-LIBPATH=/usr/lib
-INCPATH=/usr/include
+LIBPATH=${PREFIX}/lib
+INCPATH=${PREFIX}/include
DATAPATH=/usr/share/doc/libtommath/pdf
OBJECTS=bncore.o bn_mp_init.o bn_mp_clear.o bn_mp_exch.o bn_mp_grow.o bn_mp_shrink.o \
@@ -82,8 +82,12 @@ bn_mp_to_signed_bin_n.o bn_mp_to_unsigne
objs: $(OBJECTS)
-$(LIBNAME): $(OBJECTS)
- libtool --mode=link gcc *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
+.SUFFIXES: .lo
+.c.lo:
+ ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} $< -o $@
+
+$(LIBNAME): $(OBJECTS:.o=.lo)
+ libtool --mode=link ${CC} *.lo -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBNAME)
install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)

View file

@ -1,7 +1,8 @@
# $NetBSD: Makefile,v 1.1.1.1 2010/11/27 06:11:57 agc Exp $
# $NetBSD: Makefile,v 1.2 2011/03/10 10:02:34 drochner Exp $
DISTNAME= crypt-1.17
PKGNAME= libtom${DISTNAME}
PKGREVISION= 1
CATEGORIES= security
MASTER_SITES= http://libtom.org/files/
EXTRACT_SUFX= .tar.bz2
@ -15,7 +16,9 @@ PKG_INSTALLATION_TYPES= overwrite pkgviews
PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/${PKGNAME_NOREV}
MAKE_FILE= makefile.unix
USE_LIBTOOL= yes
USE_TOOLS+= gmake
MAKE_FILE= makefile.shared
MAKE_ENV+= CFLAGS_OPTS="-DUSE_LTM -DLTM_DESC"
BUILD_TARGET= default

View file

@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.1.1.1 2010/11/27 06:11:57 agc Exp $
@comment $NetBSD: PLIST,v 1.2 2011/03/10 10:02:34 drochner Exp $
include/tomcrypt.h
include/tomcrypt_argchk.h
include/tomcrypt_cfg.h
@ -13,5 +13,6 @@ include/tomcrypt_pk.h
include/tomcrypt_pkcs.h
include/tomcrypt_prng.h
include/tomcrypt_test.h
lib/libtomcrypt.a
lib/libtomcrypt.la
lib/libtomcrypt_prof.la
share/doc/libtomcrypt/crypt.pdf

View file

@ -1,12 +1,10 @@
# $NetBSD: buildlink3.mk,v 1.1.1.1 2010/11/27 06:11:57 agc Exp $
# $NetBSD: buildlink3.mk,v 1.2 2011/03/10 10:02:34 drochner Exp $
BUILDLINK_TREE+= libtomcrypt
.if !defined(LIBTOMCRYPT_BUILDLINK3_MK)
LIBTOMCRYPT_BUILDLINK3_MK:=
BUILDLINK_DEPMETHOD.libtomcrypt?= build
BUILDLINK_API_DEPENDS.libtomcrypt+= libtomcrypt>=1.17
BUILDLINK_PKGSRCDIR.libtomcrypt?= ../../security/libtomcrypt

View file

@ -1,6 +1,8 @@
$NetBSD: distinfo,v 1.1.1.1 2010/11/27 06:11:57 agc Exp $
$NetBSD: distinfo,v 1.2 2011/03/10 10:02:34 drochner Exp $
SHA1 (crypt-1.17.tar.bz2) = 9c746822c84e4276e432b64964f94d1d5ddd13ad
RMD160 (crypt-1.17.tar.bz2) = 742d72d82fea2e6a9865d8c682c10cbaba69ea2f
Size (crypt-1.17.tar.bz2) = 1599215 bytes
SHA1 (patch-aa) = a2385cf0543a19b1555d4370a10c012c5141b48a
SHA1 (patch-ab) = 364a6939c2bdec98413aab50465d5a42293af6db
SHA1 (patch-ac) = 871a713512b20199b502876d2523e8bf619c5e85

View file

@ -0,0 +1,81 @@
$NetBSD: patch-ab,v 1.1 2011/03/10 10:02:34 drochner Exp $
--- makefile.shared.orig 2007-05-12 14:46:25.000000000 +0000
+++ makefile.shared
@@ -9,7 +9,7 @@
VERSION=0:117
# Compiler and Linker Names
-CC=libtool --mode=compile --tag=CC gcc
+#CC=libtool --mode=compile --tag=CC gcc
# ranlib tools
ifndef RANLIB
@@ -75,13 +75,13 @@ ifndef DESTDIR
DESTDIR=
endif
ifndef LIBPATH
- LIBPATH=/usr/lib
+ LIBPATH=${PREFIX}/lib
endif
ifndef INCPATH
- INCPATH=/usr/include
+ INCPATH=${PREFIX}/include
endif
ifndef DATAPATH
- DATAPATH=/usr/share/doc/libtomcrypt/pdf
+ DATAPATH=${PREFIX}/share/doc/libtomcrypt/
endif
#Who do we install as?
@@ -230,33 +230,38 @@ TIMINGS=demos/timing.o
default:library
#ciphers come in two flavours... enc+dec and enc
-src/ciphers/aes/aes_enc.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
- $(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.o
+src/ciphers/aes/aes_enc.lo: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
+ ${LIBTOOL} --mode=compile $(CC) $(CFLAGS) -DENCRYPT_ONLY -c src/ciphers/aes/aes.c -o src/ciphers/aes/aes_enc.lo
#These are the rules to make certain object files.
-src/ciphers/aes/aes.o: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
-src/ciphers/twofish/twofish.o: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c
-src/hashes/whirl/whirl.o: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c
-src/hashes/sha2/sha512.o: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c
-src/hashes/sha2/sha256.o: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
+src/ciphers/aes/aes.lo: src/ciphers/aes/aes.c src/ciphers/aes/aes_tab.c
+src/ciphers/twofish/twofish.lo: src/ciphers/twofish/twofish.c src/ciphers/twofish/twofish_tab.c
+src/hashes/whirl/whirl.lo: src/hashes/whirl/whirl.c src/hashes/whirl/whirltab.c
+src/hashes/sha2/sha512.lo: src/hashes/sha2/sha512.c src/hashes/sha2/sha384.c
+src/hashes/sha2/sha256.lo: src/hashes/sha2/sha256.c src/hashes/sha2/sha224.c
#This rule makes the libtomcrypt library.
library: $(LIBNAME)
+.SUFFIXES: .lo
+.c.lo:
+ ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} $< -o $@
+
testprof/$(LIBTEST):
cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) make -f makefile.shared
objs: $(OBJECTS)
-$(LIBNAME): $(OBJECTS) testprof/$(LIBTEST)
- libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
+$(LIBNAME): $(OBJECTS:.o=.lo) testprof/$(LIBTEST)
+ libtool --silent --mode=link ${CC} $(CFLAGS) `find . -type f | grep "[.]lo" | grep "src/" | xargs` $(EXTRALIBS) -o $(LIBNAME) -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBNAME)
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(LIBPATH)
+ ${BSD_INSTALL_LIB_DIR} $(DESTDIR)$(LIBPATH)
cd testprof ; CFLAGS="$(CFLAGS)" GROUP=$(GROUP) USER=$(USER) VERSION=$(VERSION) LIBPATH=$(LIBPATH) LIBTEST=$(LIBTEST) LIBTEST_S=$(LIBTEST_S) DESTDIR=$(DESTDIR) make -f makefile.shared install
libtool --silent --mode=install install -c libtomcrypt.la $(DESTDIR)$(LIBPATH)/libtomcrypt.la
- install -d -g $(GROUP) -o $(USER) $(DESTDIR)$(INCPATH)
- install -g $(GROUP) -o $(USER) $(HEADERS) $(DESTDIR)$(INCPATH)
+ ${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(INCPATH)
+ ${BSD_INSTALL_DATA} $(HEADERS) $(DESTDIR)$(INCPATH)
+ ${BSD_INSTALL_DATA} doc/crypt.pdf $(DESTDIR)$(DATAPATH)
#This rule makes the hash program included with libtomcrypt
hashsum: library

View file

@ -0,0 +1,25 @@
$NetBSD: patch-ac,v 1.1 2011/03/10 10:02:34 drochner Exp $
--- testprof/makefile.shared.orig 2007-05-12 14:46:25.000000000 +0000
+++ testprof/makefile.shared
@@ -1,4 +1,4 @@
-CC=libtool --mode=compile gcc
+#CC=libtool --mode=compile gcc
CFLAGS += -I../src/headers -I./ -Wall -W
@@ -17,8 +17,12 @@ endif
default: $(LIBTEST)
-$(LIBTEST): $(OBJECTS)
- libtool --silent --mode=link gcc $(CFLAGS) `find . -type f | grep "[.]lo" | xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
+.SUFFIXES: .lo
+.c.lo:
+ ${LIBTOOL} --mode=compile ${CC} -c ${CFLAGS} $< -o $@
+
+$(LIBTEST): $(OBJECTS:.o=.lo)
+ libtool --silent --mode=link ${CC} $(CFLAGS) `find . -type f | grep "[.]lo" | xargs` -o $@ -rpath $(LIBPATH) -version-info $(VERSION)
install: $(LIBTEST)
libtool --silent --mode=install install -c $(LIBTEST) $(DESTDIR)$(LIBPATH)/$(LIBTEST)