[106119] trunk/dports/math/msieve

michaelld at macports.org michaelld at macports.org
Wed May 15 06:45:42 PDT 2013


Revision: 106119
          https://trac.macports.org/changeset/106119
Author:   michaelld at macports.org
Date:     2013-05-15 06:45:42 -0700 (Wed, 15 May 2013)
Log Message:
-----------
msieve:
* update to 1.51;
* fix patchfile and its name for new Makefile;
* add building and installation of dylib;
* add installation of demo code.

Modified Paths:
--------------
    trunk/dports/math/msieve/Portfile

Added Paths:
-----------
    trunk/dports/math/msieve/files/patch-Makefile.diff

Removed Paths:
-------------
    trunk/dports/math/msieve/files/patch-Makefile

Modified: trunk/dports/math/msieve/Portfile
===================================================================
--- trunk/dports/math/msieve/Portfile	2013-05-15 13:01:55 UTC (rev 106118)
+++ trunk/dports/math/msieve/Portfile	2013-05-15 13:45:42 UTC (rev 106119)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:filetype=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
 PortSystem          1.0
@@ -2,3 +3,3 @@
 name                msieve
-version             1.45
+version             1.51
 categories          math
@@ -15,45 +16,39 @@
 distname            ${name}[strsed ${version} {g/\.//}]
 worksrcdir          ${name}-${version}
 
-checksums           md5     12fdbc862ca53550763b87d6f0956a87 \
-                    sha1    0059e518371f8127415ff664a30845ad60388232 \
-                    rmd160  7f0456d992a58670c345e3e8daf751b1a80025f0
+checksums           sha1    91288b1b016938a4167f83b012deaaf773f1ea99 \
+                    rmd160  cca48291f5e439b469989c4ad2631a09a3c067bb
 
 depends_lib         port:gmp
 
-patchfiles          patch-Makefile
+patchfiles          patch-Makefile.diff
 
 post-patch {
     reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/Makefile
+    reinplace "s|@PREFIX@|${prefix}|g" ${worksrcpath}/Makefile
 }
 
 use_configure       no
 
-build.args          CPPFLAGS="${configure.cppflags}" \
-                    LDFLAGS="${configure.ldflags}" \
+build.env           CFLAGS="${configure.cflags}" \
+                    CPATH="${compiler.cpath}" \
+                    LIBRARY_PATH="${compiler.library_path}" \
                     MACHINE_FLAGS="${configure.cc_archflags}"
 
-switch ${build_arch} {
-    i386 {
-        build.target x86
-    }
-    x86_64 {
-        build.target x86_64
-    }
-    default {
-        build.target generic
-    }
-}
-
 destroot {
-   xinstall -m 755 -d ${destroot}${prefix}/include/msieve \
-      ${destroot}${prefix}/share/doc/${name}
-   xinstall -m 755 ${worksrcpath}/msieve ${destroot}${prefix}/bin
-   xinstall -m 644 ${worksrcpath}/libmsieve.a ${destroot}${prefix}/lib
-   eval xinstall -m 644 [glob ${worksrcpath}/include/*] \
-      ${destroot}${prefix}/include/msieve
-   xinstall -m 644 -W ${worksrcpath} Readme Readme.qs Readme.nfs \
-      ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 755 -d ${destroot}${prefix}/include/msieve \
+        ${destroot}${prefix}/share/doc/${name} \
+        ${destroot}${prefix}/share/${name}/demo
+    xinstall -m 755 ${worksrcpath}/msieve ${destroot}${prefix}/bin
+    eval xinstall -m 644 [glob ${worksrcpath}/libmsieve.*] ${destroot}${prefix}/lib
+    ln -s ${prefix}/lib/libsieve.${version}.dylib ${destroot}${prefix}/lib/libsieve.1.dylib
+    ln -s ${prefix}/lib/libsieve.${version}.dylib ${destroot}${prefix}/lib/libsieve.dylib
+    eval xinstall -m 644 [glob ${worksrcpath}/include/*] \
+        ${destroot}${prefix}/include/msieve
+    xinstall -m 644 -W ${worksrcpath} Readme Readme.qs Readme.nfs \
+        ${destroot}${prefix}/share/doc/${name}
+    xinstall -m 644 -W ${worksrcpath} demo.c \
+        ${destroot}${prefix}/share/${name}/demo
 }
 
 livecheck.type      regex

Deleted: trunk/dports/math/msieve/files/patch-Makefile
===================================================================
--- trunk/dports/math/msieve/files/patch-Makefile	2013-05-15 13:01:55 UTC (rev 106118)
+++ trunk/dports/math/msieve/files/patch-Makefile	2013-05-15 13:45:42 UTC (rev 106119)
@@ -1,19 +0,0 @@
---- Makefile.orig	2010-04-21 22:14:46.000000000 -0500
-+++ Makefile	2010-06-02 21:25:25.000000000 -0500
-@@ -14,13 +14,13 @@
- 
- # gcc with basic optimization (-march flag could
- # get overridden by architecture-specific builds)
--CC = gcc -D_FILE_OFFSET_BITS=64
-+CC = @CC@ -D_FILE_OFFSET_BITS=64
- WARN_FLAGS = -Wall -W
--OPT_FLAGS = -O3 -fomit-frame-pointer -march=athlon-xp -DNDEBUG
-+OPT_FLAGS = -O3 -fomit-frame-pointer -DNDEBUG
- #OPT_FLAGS = -O3 -fomit-frame-pointer -march=k8 -DNDEBUG
- 
- CFLAGS = $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) \
--		-I. -Iinclude -Ignfs -Ignfs/poly -Ignfs/poly/stage1
-+		-I. -Iinclude -Ignfs -Ignfs/poly -Ignfs/poly/stage1 $(CPPFLAGS)
- 
- # tweak the compile flags
- 

Added: trunk/dports/math/msieve/files/patch-Makefile.diff
===================================================================
--- trunk/dports/math/msieve/files/patch-Makefile.diff	                        (rev 0)
+++ trunk/dports/math/msieve/files/patch-Makefile.diff	2013-05-15 13:45:42 UTC (rev 106119)
@@ -0,0 +1,151 @@
+--- Makefile.orig	2013-05-15 08:51:56.000000000 -0400
++++ Makefile	2013-05-15 09:33:55.000000000 -0400
+@@ -12,14 +12,16 @@
+ #  $Id: Makefile 823 2012-11-17 13:22:46Z jasonp_sf $
+ # --------------------------------------------------------------------
+ 
++VER = 1.51
++
+ # override from command line
+ WIN = 0
+ 
+ # gcc with basic optimization (-march flag could
+ # get overridden by architecture-specific builds)
+-CC = gcc
++CC = @CC@
+ WARN_FLAGS = -Wall -W
+-OPT_FLAGS = -O3 -fomit-frame-pointer -march=core2 \
++OPT_FLAGS = -O3 -fomit-frame-pointer \
+ 	    -D_FILE_OFFSET_BITS=64 -DNDEBUG -D_LARGEFILE64_SOURCE
+ 
+ # use := instead of = so we only run the following once
+@@ -28,14 +30,14 @@
+ 	SVN_VERSION := unknown
+ endif
+ 
+-CFLAGS = $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) \
++L_CFLAGS = $(CFLAGS) $(OPT_FLAGS) $(MACHINE_FLAGS) $(WARN_FLAGS) \
+ 	 	-DMSIEVE_SVN_VERSION="\"$(SVN_VERSION)\"" \
+ 		-I. -Iinclude -Ignfs -Ignfs/poly -Ignfs/poly/stage1
+ 
+ # tweak the compile flags
+ 
+ ifeq ($(ECM),1)
+-	CFLAGS += -DHAVE_GMP_ECM
++	L_CFLAGS += -DHAVE_GMP_ECM
+ 	LIBS += -lecm
+ endif
+ ifeq ($(WIN),1)
+@@ -44,7 +46,7 @@
+ 	LIBS += -ldl
+ endif
+ ifeq ($(LARGEBLOCKS),1)
+-	CFLAGS += -DLARGEBLOCKS
++	L_CFLAGS += -DLARGEBLOCKS
+ endif
+ ifeq ($(CUDA),1)
+ 
+@@ -57,22 +59,22 @@
+ 	CUDA_ROOT = $(shell dirname $(NVCC))/../
+ 	CUDA_LIBS = -lcuda
+ endif
+-	CFLAGS += -I"$(CUDA_ROOT)include" -Ib40c -DHAVE_CUDA
++	L_CFLAGS += -I"$(CUDA_ROOT)include" -Ib40c -DHAVE_CUDA
+ 	LIBS += $(CUDA_LIBS)
+ endif
+ ifeq ($(MPI),1)
+ 	CC = mpicc
+-	CFLAGS += -DHAVE_MPI
++	L_CFLAGS += -DHAVE_MPI
+ endif
+ ifeq ($(BOINC),1)
+ 	# fill in as appropriate
+ 	BOINC_INC_DIR = .
+ 	BOINC_LIB_DIR = .
+-	CFLAGS += -I$(BOINC_INC_DIR) -DHAVE_BOINC
++	L_CFLAGS += -I$(BOINC_INC_DIR) -DHAVE_BOINC
+ 	LIBS += -L$(BOINC_LIB_DIR) -lboinc_api -lboinc
+ endif
+ ifeq ($(NO_ZLIB),1)
+-	CFLAGS += -DNO_ZLIB
++	L_CFLAGS += -DNO_ZLIB
+ else
+ 	LIBS += -lz
+ endif
+@@ -228,29 +230,23 @@
+ 	gnfs/gnfs.c \
+ 	gnfs/relation.c
+ 
+-NFS_OBJS = $(NFS_SRCS:.c=.no)
+-
+ NFS_GPU_SRCS = \
+ 	gnfs/poly/stage1/stage1_sieve_gpu.c
+ 
+-NFS_GPU_OBJS = $(NFS_GPU_SRCS:.c=.no)
+-
+ NFS_NOGPU_SRCS = \
+ 	gnfs/poly/stage1/stage1_sieve_cpu.c
+ 
+-NFS_NOGPU_OBJS = $(NFS_NOGPU_SRCS:.c=.no)
+-
+ ifeq ($(CUDA),1)
+ 	NFS_HDR += $(NFS_GPU_HDR)
+ 	NFS_SRCS += $(NFS_GPU_SRCS)
+-	NFS_OBJS += $(NFS_GPU_OBJS)
+ else
+ 	NFS_HDR += $(NFS_NOGPU_HDR)
+ 	NFS_SRCS += $(NFS_NOGPU_SRCS)
+-	NFS_OBJS += $(NFS_NOGPU_OBJS)
+ 	GPU_OBJS =
+ endif
+ 
++NFS_OBJS = $(NFS_SRCS:.c=.no)
++
+ #---------------------------------- make targets -------------------------
+ 
+ help:
+@@ -267,8 +263,10 @@
+ 	rm -f libmsieve.a
+ 	ar r libmsieve.a $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS)
+ 	ranlib libmsieve.a
+-	$(CC) $(CFLAGS) demo.c -o msieve $(LDFLAGS) \
++	$(CC) $(L_CFLAGS) demo.c -o msieve $(LDFLAGS) \
+ 			libmsieve.a $(LIBS)
++	rm -f libmsieve.$(VER).dylib
++	$(CC) -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -install_name @PREFIX@/lib/libmsieve.$(VER).dylib -Wl,-single_module $(LDFLAGS) -compatibility_version $(VER) -current_version $(VER) -o libmsieve.$(VER).dylib $(COMMON_OBJS) $(QS_OBJS) $(NFS_OBJS) $(LIBS)
+ 
+ clean:
+ 	cd b40c && make clean WIN=$(WIN) && cd ..
+@@ -280,27 +278,27 @@
+ # common file build rules
+ 
+ %.o: %.c $(COMMON_HDR)
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(L_CFLAGS) -c -o $@ $<
+ 
+ # QS build rules
+ 
+ mpqs/sieve_core_generic_32k.qo: mpqs/sieve_core.c $(COMMON_HDR) $(QS_HDR)
+-	$(CC) $(CFLAGS) -DBLOCK_KB=32 -DHAS_SSE2 \
++	$(CC) $(L_CFLAGS) -DBLOCK_KB=32 -DHAS_SSE2 \
+ 		-DROUTINE_NAME=qs_core_sieve_generic_32k \
+ 		-c -o $@ mpqs/sieve_core.c
+ 
+ mpqs/sieve_core_generic_64k.qo: mpqs/sieve_core.c $(COMMON_HDR) $(QS_HDR)
+-	$(CC) $(CFLAGS) -DBLOCK_KB=64 -DHAS_SSE2 \
++	$(CC) $(L_CFLAGS) -DBLOCK_KB=64 -DHAS_SSE2 \
+ 		-DROUTINE_NAME=qs_core_sieve_generic_64k \
+ 		-c -o $@ mpqs/sieve_core.c
+ 
+ %.qo: %.c $(COMMON_HDR) $(QS_HDR)
+-	$(CC) $(CFLAGS) -c -o $@ $<
++	$(CC) $(L_CFLAGS) -c -o $@ $<
+ 
+ # NFS build rules
+ 
+ %.no: %.c $(COMMON_HDR) $(NFS_HDR)
+-	$(CC) $(CFLAGS) -Ignfs -c -o $@ $<
++	$(CC) $(L_CFLAGS) -Ignfs -c -o $@ $<
+ 
+ # GPU build rules
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130515/162905e0/attachment.html>


More information about the macports-changes mailing list