svn commit: r484101 - in head/science/voro++: . files
Jason W. Bacon
jwb at FreeBSD.org
Sun Nov 4 15:52:45 UTC 2018
Author: jwb
Date: Sun Nov 4 15:52:42 2018
New Revision: 484101
URL: https://svnweb.freebsd.org/changeset/ports/484101
Log:
science/voro++: Add shared library
Consolidated build changes into patch files.
Kept static lib as well as some dependencies may specify it explicitly
(this is common in scientific software for better or worse) and the library
is very small.
PR: 232876
Reported by: yuri
Approved by: jrm (mentor, implicit)
Added:
head/science/voro++/files/
head/science/voro++/files/patch-Makefile (contents, props changed)
head/science/voro++/files/patch-config.mk (contents, props changed)
head/science/voro++/files/patch-src_Makefile (contents, props changed)
Modified:
head/science/voro++/Makefile
head/science/voro++/pkg-descr
head/science/voro++/pkg-plist
Modified: head/science/voro++/Makefile
==============================================================================
--- head/science/voro++/Makefile Sun Nov 4 15:05:47 2018 (r484100)
+++ head/science/voro++/Makefile Sun Nov 4 15:52:42 2018 (r484101)
@@ -1,7 +1,8 @@
# $FreeBSD$
PORTNAME= voro++
-PORTVERSION= 0.4.6
+DISTVERSION= 0.4.6
+PORTREVISION= 1
CATEGORIES= science
MASTER_SITES= http://math.lbl.gov/voro++/download/dir/
@@ -12,18 +13,11 @@ LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= gmake
+USE_LDCONFIG= yes
-post-patch:
- ${REINPLACE_CMD} \
- -e 's|CXX=|CXX?=|g' \
- -e 's|CFLAGS=|CFLAGS?=|g' \
- -e 's|PREFIX=.*|PREFIX?=|g' \
- ${WRKSRC}/config.mk
- ${REINPLACE_CMD} \
- -e 's|$$(PREFIX)|$$(DESTDIR)$$(PREFIX)|g' \
- ${WRKSRC}/Makefile
+CFLAGS+= -fPIC
post-install:
- ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/voro++
+ @${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/voro++
.include <bsd.port.mk>
Added: head/science/voro++/files/patch-Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/science/voro++/files/patch-Makefile Sun Nov 4 15:52:42 2018 (r484101)
@@ -0,0 +1,101 @@
+--- Makefile.orig 2013-10-17 17:54:13 UTC
++++ Makefile
+@@ -12,7 +12,7 @@ include config.mk
+ # Build all of the executable files
+ all:
+ $(MAKE) -C src
+- $(MAKE) -C examples
++ #$(MAKE) -C examples
+
+ # Build the help files (with Doxygen)
+ help:
+@@ -26,47 +26,48 @@ clean:
+ # Install the executable, man page, and shared library
+ install:
+ $(MAKE) -C src
+- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/bin
+- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/lib
+- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/man
+- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/man/man1
+- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/include
+- $(INSTALL) -d $(IFLAGS_EXEC) $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS_EXEC) src/voro++ $(PREFIX)/bin
+- $(INSTALL) $(IFLAGS) man/voro++.1 $(PREFIX)/man/man1
+- $(INSTALL) $(IFLAGS) src/libvoro++.a $(PREFIX)/lib
+- $(INSTALL) $(IFLAGS) src/voro++.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/c_loops.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/cell.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/common.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/config.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/container.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/container_prd.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/rad_option.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/pre_container.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/unitcell.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/v_base.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/v_compute.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/wall.hh $(PREFIX)/include/voro++
+- $(INSTALL) $(IFLAGS) src/worklist.hh $(PREFIX)/include/voro++
++ $(INSTALL) -d $(IFLAGS_EXEC) $(DESTDIR)$(PREFIX)/bin
++ $(INSTALL) -d $(IFLAGS_EXEC) $(DESTDIR)$(PREFIX)/lib
++ $(INSTALL) -d $(IFLAGS_EXEC) $(DESTDIR)$(PREFIX)/man
++ $(INSTALL) -d $(IFLAGS_EXEC) $(DESTDIR)$(PREFIX)/man/man1
++ $(INSTALL) -d $(IFLAGS_EXEC) $(DESTDIR)$(PREFIX)/include
++ $(INSTALL) -d $(IFLAGS_EXEC) $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS_EXEC) src/voro++ $(DESTDIR)$(PREFIX)/bin
++ $(INSTALL) $(IFLAGS) man/voro++.1 $(DESTDIR)$(PREFIX)/man/man1
++ $(INSTALL) $(IFLAGS) src/libvoro++.a $(DESTDIR)$(PREFIX)/lib
++ $(INSTALL) $(IFLAGS) src/libvoro++.so $(DESTDIR)$(PREFIX)/lib
++ $(INSTALL) $(IFLAGS) src/voro++.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/c_loops.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/cell.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/common.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/config.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/container.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/container_prd.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/rad_option.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/pre_container.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/unitcell.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/v_base.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/v_compute.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/wall.hh $(DESTDIR)$(PREFIX)/include/voro++
++ $(INSTALL) $(IFLAGS) src/worklist.hh $(DESTDIR)$(PREFIX)/include/voro++
+
+ # Uninstall the executable, man page, and shared library
+ uninstall:
+- rm -f $(PREFIX)/bin/voro++
+- rm -f $(PREFIX)/man/man1/voro++.1
+- rm -f $(PREFIX)/lib/libvoro++.a
+- rm -f $(PREFIX)/include/voro++/voro++.hh
+- rm -f $(PREFIX)/include/voro++/c_loops.hh
+- rm -f $(PREFIX)/include/voro++/cell.hh
+- rm -f $(PREFIX)/include/voro++/common.hh
+- rm -f $(PREFIX)/include/voro++/config.hh
+- rm -f $(PREFIX)/include/voro++/container.hh
+- rm -f $(PREFIX)/include/voro++/container_prd.hh
+- rm -f $(PREFIX)/include/voro++/pre_container.hh
+- rm -f $(PREFIX)/include/voro++/rad_option.hh
+- rm -f $(PREFIX)/include/voro++/unitcell.hh
+- rm -f $(PREFIX)/include/voro++/v_base.hh
+- rm -f $(PREFIX)/include/voro++/v_compute.hh
+- rm -f $(PREFIX)/include/voro++/wall.hh
+- rm -f $(PREFIX)/include/voro++/worklist.hh
+- rmdir $(PREFIX)/include/voro++
++ rm -f $(DESTDIR)$(PREFIX)/bin/voro++
++ rm -f $(DESTDIR)$(PREFIX)/man/man1/voro++.1
++ rm -f $(DESTDIR)$(PREFIX)/lib/libvoro++.a
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/voro++.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/c_loops.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/cell.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/common.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/config.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/container.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/container_prd.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/pre_container.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/rad_option.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/unitcell.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/v_base.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/v_compute.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/wall.hh
++ rm -f $(DESTDIR)$(PREFIX)/include/voro++/worklist.hh
++ rmdir $(DESTDIR)$(PREFIX)/include/voro++
Added: head/science/voro++/files/patch-config.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/science/voro++/files/patch-config.mk Sun Nov 4 15:52:42 2018 (r484101)
@@ -0,0 +1,27 @@
+--- config.mk.orig 2013-10-17 17:54:13 UTC
++++ config.mk
+@@ -8,20 +8,20 @@
+ # the Makefiles.
+
+ # C++ compiler
+-CXX=g++
++CXX?=g++
+
+ # Flags for the C++ compiler
+-CFLAGS=-Wall -ansi -pedantic -O3
++CFLAGS?=-Wall -ansi -pedantic -O3
+
+ # Relative include and library paths for compilation of the examples
+ E_INC=-I../../src
+ E_LIB=-L../../src
+
+ # Installation directory
+-PREFIX=/usr/local
++PREFIX?=/usr/local
+
+ # Install command
+-INSTALL=install
++INSTALL?=install
+
+ # Flags for install command for executable
+ IFLAGS_EXEC=-m 0755
Added: head/science/voro++/files/patch-src_Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/science/voro++/files/patch-src_Makefile Sun Nov 4 15:52:42 2018 (r484101)
@@ -0,0 +1,24 @@
+--- src/Makefile.orig 2013-10-17 17:54:13 UTC
++++ src/Makefile
+@@ -13,7 +13,7 @@ objs=cell.o common.o container.o unitcel
+ src=$(patsubst %.o,%.cc,$(objs))
+
+ # Makefile rules
+-all: libvoro++.a voro++
++all: libvoro++.a libvoro++.so voro++
+
+ depend:
+ $(CXX) -MM $(src) >Makefile.dep
+@@ -24,7 +24,11 @@ libvoro++.a: $(objs)
+ rm -f libvoro++.a
+ ar rs libvoro++.a $^
+
+-voro++: libvoro++.a cmd_line.cc
++libvoro++.so: $(objs)
++ rm -f libvoro++.so
++ $(CXX) -shared $(LDFLAGS) -o libvoro++.so -Wl,-soname,libvoro++.so $^
++
++voro++: libvoro++.so cmd_line.cc
+ $(CXX) $(CFLAGS) -L. -o voro++ cmd_line.cc -lvoro++
+
+ %.o: %.cc
Modified: head/science/voro++/pkg-descr
==============================================================================
--- head/science/voro++/pkg-descr Sun Nov 4 15:05:47 2018 (r484100)
+++ head/science/voro++/pkg-descr Sun Nov 4 15:52:42 2018 (r484101)
@@ -1,9 +1,9 @@
Voro++ is a software library for carrying out three-dimensional computations
-of the Voronoi tessellation. A distinguishing feature of the Voro++ library
-is that it carries out cell-based calculations, computing the Voronoi cell
-for each particle individually. It is particularly well-suited for
-applications that rely on cell-based statistics, where features of Voronoi
-cells (eg. volume, centroid, number of faces) can be used to analyze a
-system of particles.
+of the Voronoi tessellation. A distinguishing feature of the Voro++ library is
+that it carries out cell-based calculations, computing the Voronoi cell for
+each particle individually. It is particularly well-suited for applications
+that rely on cell-based statistics, where features of Voronoi cells (eg.
+volume, centroid, number of faces) can be used to analyze a system of
+particles.
WWW: http://math.lbl.gov/voro++/
Modified: head/science/voro++/pkg-plist
==============================================================================
--- head/science/voro++/pkg-plist Sun Nov 4 15:05:47 2018 (r484100)
+++ head/science/voro++/pkg-plist Sun Nov 4 15:52:42 2018 (r484101)
@@ -14,4 +14,5 @@ include/voro++/voro++.hh
include/voro++/wall.hh
include/voro++/worklist.hh
lib/libvoro++.a
+lib/libvoro++.so
man/man1/voro++.1.gz
More information about the svn-ports-all
mailing list