aboutsummaryrefslogtreecommitdiffstats
path: root/math
diff options
context:
space:
mode:
authorthierry <thierry@FreeBSD.org>2014-10-12 16:32:24 +0800
committerthierry <thierry@FreeBSD.org>2014-10-12 16:32:24 +0800
commitaf69af5cc1126d77af7ef829910b1498eacee55a (patch)
treecbee2f94ef0a8339d52bbc3061ccaf35807be230 /math
parent370e2107ea2bcffeaf759c51f56b8416e0bfeef1 (diff)
downloadfreebsd-ports-gnome-af69af5cc1126d77af7ef829910b1498eacee55a.tar.gz
freebsd-ports-gnome-af69af5cc1126d77af7ef829910b1498eacee55a.tar.zst
freebsd-ports-gnome-af69af5cc1126d77af7ef829910b1498eacee55a.zip
Add libproj4, a cartographic projections C library.
Diffstat (limited to 'math')
-rw-r--r--math/Makefile1
-rw-r--r--math/libproj4/Makefile41
-rw-r--r--math/libproj4/distinfo4
-rw-r--r--math/libproj4/files/patch-Makefile59
-rw-r--r--math/libproj4/pkg-descr6
-rw-r--r--math/libproj4/pkg-plist6
6 files changed, 117 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index bbc3d3a90d39..863ad78917fd 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -220,6 +220,7 @@
SUBDIR += libneural
SUBDIR += libocas
SUBDIR += liborigin
+ SUBDIR += libproj4
SUBDIR += libqalculate
SUBDIR += libranlip
SUBDIR += libtommath
diff --git a/math/libproj4/Makefile b/math/libproj4/Makefile
new file mode 100644
index 000000000000..3120746fe071
--- /dev/null
+++ b/math/libproj4/Makefile
@@ -0,0 +1,41 @@
+# Created by: thierry@pompo.net
+# $FreeBSD$
+
+PORTNAME= libproj4
+DISTVERSION= 3_20081120
+CATEGORIES= math geography
+MASTER_SITES= http://home.comcast.net/~gevenden56/proj/
+DISTFILES= ${PORTNAME}.${DISTVERSION}${EXTRACT_SUFX}
+DIST_SUBDIR= ${PORTNAME}
+
+MAINTAINER= thierry@FreeBSD.org
+COMMENT= C language procedures related to cartographic processes
+
+LIB_DEPENDS= libgsl.so:${PORTSDIR}/math/gsl
+
+USES= gmake tar:bzip2
+CFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib
+ALL_TARGET= libproj4 lproj
+MAKE_JOBS_UNSAFE=yes
+USE_LDCONFIG= yes
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MDOCS}
+DISTFILES+= manual.pdf
+EXTRACT_ONLY= ${PORTNAME}.${DISTVERSION}${EXTRACT_SUFX}
+.endif
+
+pre-configure:
+ ${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|' ${WRKSRC}/${MAKEFILE}
+
+post-install:
+.if ${PORT_OPTIONS:MDOCS}
+ ${MKDIR} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${_DISTDIR}/manual.pdf ${STAGEDIR}${DOCSDIR}
+.endif
+
+.include <bsd.port.mk>
diff --git a/math/libproj4/distinfo b/math/libproj4/distinfo
new file mode 100644
index 000000000000..d32998beba29
--- /dev/null
+++ b/math/libproj4/distinfo
@@ -0,0 +1,4 @@
+SHA256 (libproj4/libproj4.3_20081120.tar.bz2) = 5948cbc825ddc481f4dbcb6a33389fa7838a9a499148c9e4cc560644d3e9d2b1
+SIZE (libproj4/libproj4.3_20081120.tar.bz2) = 73360
+SHA256 (libproj4/manual.pdf) = 35ba85a86ed87effd3303c41066ff565dc3c0a53f941e6aa1d7d9c8cfe6cfbd6
+SIZE (libproj4/manual.pdf) = 2292932
diff --git a/math/libproj4/files/patch-Makefile b/math/libproj4/files/patch-Makefile
new file mode 100644
index 000000000000..bcc08ade2578
--- /dev/null
+++ b/math/libproj4/files/patch-Makefile
@@ -0,0 +1,59 @@
+--- Makefile.orig 2008-11-20 18:40:28.000000000 +0100
++++ Makefile 2014-10-11 18:03:23.000000000 +0200
+@@ -31,7 +31,7 @@
+
+ #prefix = /usr/local
+ #prefix = /usr
+-prefix = $(HOME)
++prefix = $(PREFIX)
+
+ # edit to reflect directory where system defaults and inits are located
+ LIB = $(prefix)/lib
+@@ -45,7 +45,7 @@
+ THREADS=1
+
+ # select local compiler to use
+-CC = gcc
++#CC = gcc
+
+ # normally set on runline when debugging or testing file
+ T =
+@@ -134,18 +134,20 @@
+ thrf = -DPROJ_HAVE_THREADS=1
+ endif
+
+-CFLAGS = -g -O -I./ $(gslf) $(thrf)
++CFLAGS+= -fPIC -I./ $(gslf) $(thrf)
+ #CFLAGS = -g -I./ $(gslf) $(thrf)
+
+-LDFLAGS = -L./ -lproj4 $(gsll) $(thrl) -lm
++LDFLAGS+= -L./ -lproj4 $(gsll) $(thrl) -lm
+
+ lproj: lproj.o $T $L
+- $(CC) -o lproj -I./ lproj.o $T -L./ -lproj4 $(gsll) $(thrl) -lm
++ $(CC) -o lproj -I./ lproj.o $T -L./ -lproj4 $(LDFLAGS)
+
+ lproj.o: lib_proj.h
+
+ libproj4: $(RLIB)
+ if [ -f /usr/bin/ranlib -o -f /bin/ranlib ] ; then ranlib $L ; fi
++ $(CC) -shared $(LDFLAGS) -o libproj4.so.0 *.o
++ ln -sf libproj4.so.0 libproj4.so
+
+ $(RLIB): lib_proj.h
+
+@@ -154,9 +156,11 @@
+ all: libproj4
+
+ install:
+- install -D libproj4.a $(LIB)/libproj4.a
+- install -D lproj $(BIN)/lproj
+- install -D lib_proj.h $(INC)/lib_proj.h
++ install libproj4.a $(DESTDIR)$(LIB)/libproj4.a
++ install libproj4.so $(DESTDIR)$(LIB)/libproj4.so
++ install libproj4.so.0 $(DESTDIR)$(LIB)/libproj4.so.0
++ install -s lproj $(DESTDIR)$(BIN)/lproj
++ install lib_proj.h $(DESTDIR)$(INC)/lib_proj.h
+
+ clean:
+ /bin/rm -f core *.o
diff --git a/math/libproj4/pkg-descr b/math/libproj4/pkg-descr
new file mode 100644
index 000000000000..63282539503f
--- /dev/null
+++ b/math/libproj4/pkg-descr
@@ -0,0 +1,6 @@
+The general purpose of this library is to provide C language procedures related
+to cartographic processes. Procedures for each of the processes will be strictly
+categorized and although they may share common subfunctions they will not
+intersect in scope.
+
+WWW: http://home.comcast.net/~gevenden56/proj/
diff --git a/math/libproj4/pkg-plist b/math/libproj4/pkg-plist
new file mode 100644
index 000000000000..b750f401a3d8
--- /dev/null
+++ b/math/libproj4/pkg-plist
@@ -0,0 +1,6 @@
+bin/lproj
+include/lib_proj.h
+lib/libproj4.a
+lib/libproj4.so
+lib/libproj4.so.0
+%%PORTDOCS%%%%DOCSDIR%%/manual.pdf