summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/ogdi')
-rw-r--r--sci-libs/ogdi/Manifest2
-rw-r--r--sci-libs/ogdi/files/ogdi-3.1.4-fpic.patch177
-rw-r--r--sci-libs/ogdi/files/ogdi-3.1.5-fpic.patch177
-rw-r--r--sci-libs/ogdi/files/ogdi-3.1.6-fpic.patch38
-rw-r--r--sci-libs/ogdi/files/ogdi-3.1.6-unbundle-libs.patch13
-rw-r--r--sci-libs/ogdi/files/ogdi-3.2.0_beta2-64b.patch11
-rw-r--r--sci-libs/ogdi/files/ogdi-3.2.0_beta2-endianess.patch18
-rw-r--r--sci-libs/ogdi/files/ogdi-3.2.0_beta2-proj480.patch297
-rw-r--r--sci-libs/ogdi/files/ogdi-3.2.0_beta2-subdirs.patch24
-rw-r--r--sci-libs/ogdi/metadata.xml8
-rw-r--r--sci-libs/ogdi/ogdi-3.1.5-r1.ebuild49
-rw-r--r--sci-libs/ogdi/ogdi-3.2.0_beta2.ebuild67
12 files changed, 881 insertions, 0 deletions
diff --git a/sci-libs/ogdi/Manifest b/sci-libs/ogdi/Manifest
new file mode 100644
index 000000000000..99cb22375b35
--- /dev/null
+++ b/sci-libs/ogdi/Manifest
@@ -0,0 +1,2 @@
+DIST ogdi-3.1.5.tar.gz 913902 SHA256 f9d65312d03ac0b1ba0a0dd05885c41a3995fccfe9cab8d7012300546da3e44b
+DIST ogdi-3.2.0.beta2.tar.gz 956839 SHA256 cf4d39528b1b30c2ddb855884efa402d3f9c79363424b6221ec804aedc20a25a SHA512 2159dfd010be9da63cf009beee7f6571cd13c4f08d1a69a5d945dd64878347b28455eb5376f184e2d91fa4a3bd409446ccbd706aa9000d3d7d2ac4b6e30ced93 WHIRLPOOL 7f04f1b35a8c41cb58c1a6d6d73ca9d2e097eaaf93e6b50ceeee35f2b5f50c3c978ec8ea7b8a5c1b5b00e8dd201d7851b2383a922a147a7481c2ac35e4f23ac6
diff --git a/sci-libs/ogdi/files/ogdi-3.1.4-fpic.patch b/sci-libs/ogdi/files/ogdi-3.1.4-fpic.patch
new file mode 100644
index 000000000000..33fb56103193
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.1.4-fpic.patch
@@ -0,0 +1,177 @@
+Only in ogdi-3.1.5.orig: bin
+Only in ogdi-3.1.5.orig/config: Linux.mak
+Only in ogdi-3.1.5.orig: config.cache
+Only in ogdi-3.1.5.orig: config.log
+Only in ogdi-3.1.5.orig: config.status
+Only in ogdi-3.1.5.orig/external/expat: OBJ.Linux
+diff -ur ogdi-3.1.5/external/expat/makefile ogdi-3.1.5.orig/external/expat/makefile
+--- ogdi-3.1.5/external/expat/makefile 2001-08-27 14:11:10.000000000 +0000
++++ ogdi-3.1.5.orig/external/expat/makefile 2005-08-01 18:57:49.020052368 +0000
+@@ -36,7 +36,7 @@
+ # Compilation flags
+ #
+ INCLUDES = $(CURRENT_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) \
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC \
+ -DVERSION=\"expat_1.95.1\" -DPACKAGE="expat"
+
+ ifeq ($(BIG_ENDIAN),1)
+Only in ogdi-3.1.5.orig/external/zlib: OBJ.Linux
+diff -ur ogdi-3.1.5/external/zlib/makefile ogdi-3.1.5.orig/external/zlib/makefile
+--- ogdi-3.1.5/external/zlib/makefile 2001-04-19 05:26:46.000000000 +0000
++++ ogdi-3.1.5.orig/external/zlib/makefile 2005-08-01 18:58:47.984088472 +0000
+@@ -46,7 +46,7 @@
+ # Compilation flags
+ #
+ INCLUDES = $(CURRENT_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ #
+ # Primary target
+Only in ogdi-3.1.5.orig/lib: Linux
+Only in ogdi-3.1.5.orig/ogdi/c-api: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/c-api/makefile ogdi-3.1.5.orig/ogdi/c-api/makefile
+--- ogdi-3.1.5/ogdi/c-api/makefile 2001-04-19 05:29:31.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/c-api/makefile 2005-08-01 18:53:51.936094608 +0000
+@@ -23,7 +23,7 @@
+ $(GRASS_INCLUDE) $(ZLIB_INCLUDE) $(PROJ_INCLUDE) \
+ $(EXPAT_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(RPC_LINKLIB) $(ZLIB_LINKLIB) $(EXPAT_LINKLIB) $(WIN_LINKLIB) \
+ $(PROJ_STATICLIB) $(MATH_LINKLIB)
+Only in ogdi-3.1.5.orig/ogdi/datum_driver/canada: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/datum_driver/canada/makefile ogdi-3.1.5.orig/ogdi/datum_driver/canada/makefile
+--- ogdi-3.1.5/ogdi/datum_driver/canada/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/datum_driver/canada/makefile 2005-08-01 19:03:00.932634448 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = nadconv.c dtcanada.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS=
+
+Only in ogdi-3.1.5.orig/ogdi/datum_driver/usa: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/datum_driver/usa/makefile ogdi-3.1.5.orig/ogdi/datum_driver/usa/makefile
+--- ogdi-3.1.5/ogdi/datum_driver/usa/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/datum_driver/usa/makefile 2005-08-01 19:03:24.883993288 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = dtusa.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(PROJ_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/adrg: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/adrg/makefile ogdi-3.1.5.orig/ogdi/driver/adrg/makefile
+--- ogdi-3.1.5/ogdi/driver/adrg/makefile 2001-06-22 16:37:50.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/adrg/makefile 2005-08-01 19:06:07.422283712 +0000
+@@ -18,7 +18,7 @@
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(GLUTIL_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/dted: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/dted/makefile ogdi-3.1.5.orig/ogdi/driver/dted/makefile
+--- ogdi-3.1.5/ogdi/driver/dted/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/dted/makefile 2005-08-01 19:06:31.460629328 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = dted.c utils.c object.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(GLUTIL_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/network: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/network/makefile ogdi-3.1.5.orig/ogdi/driver/network/makefile
+--- ogdi-3.1.5/ogdi/driver/network/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/network/makefile 2005-08-01 19:06:52.242470008 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = remote.c ecs_clnt.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(GRASS_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(RPC_LINKLIB) $(WIN_LINKLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/rpf: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/rpf/makefile ogdi-3.1.5.orig/ogdi/driver/rpf/makefile
+--- ogdi-3.1.5/ogdi/driver/rpf/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/rpf/makefile 2005-08-01 19:07:39.956216416 +0000
+@@ -19,7 +19,7 @@
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) \
+ $(GRASS_INCLUDE) $(PROJ_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(VPF_STATICLIB) $(GLUTIL_STATICLIB) $(WIN_LINKLIB) $(MATH_LINKLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/skeleton: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/skeleton/makefile ogdi-3.1.5.orig/ogdi/driver/skeleton/makefile
+--- ogdi-3.1.5/ogdi/driver/skeleton/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/skeleton/makefile 2005-08-01 19:07:15.500934184 +0000
+@@ -18,7 +18,7 @@
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(GLUTIL_INCLUDE) $(PROJ_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(MACHINE) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(MACHINE) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(GLUTIL_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/vrf: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/vrf/makefile ogdi-3.1.5.orig/ogdi/driver/vrf/makefile
+--- ogdi-3.1.5/ogdi/driver/vrf/makefile 2001-06-20 21:49:31.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/vrf/makefile 2005-08-01 19:08:03.541630888 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = vrf.c utils.c feature.c object.c open.c swq.c vrfswq.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(VPF_INCLUDE) $(PROJ_INCLUDE) $(GLUTIL_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(WIN_LINKLIB) $(VPF_STATICLIB) $(MATH_LINKLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/gltpd: OBJ.Linux
+Only in ogdi-3.1.5.orig/ogdi/glutil: OBJ.Linux
+Only in ogdi-3.1.5.orig/proj: OBJ.Linux
+diff -ur ogdi-3.1.5/proj/makefile ogdi-3.1.5.orig/proj/makefile
+--- ogdi-3.1.5/proj/makefile 2001-04-09 16:20:08.000000000 +0000
++++ ogdi-3.1.5.orig/proj/makefile 2005-08-01 19:01:03.573475752 +0000
+@@ -42,7 +42,7 @@
+
+ INCLUDES = $(CURRENT_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ include $(TOPDIR)/config/common.mak
+
+Only in ogdi-3.1.5.orig/vpflib: OBJ.Linux
+diff -ur ogdi-3.1.5/vpflib/makefile ogdi-3.1.5.orig/vpflib/makefile
+--- ogdi-3.1.5/vpflib/makefile 2001-02-20 04:25:20.000000000 +0000
++++ ogdi-3.1.5.orig/vpflib/makefile 2005-08-01 19:09:48.072739744 +0000
+@@ -31,7 +31,7 @@
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(VPF_INCLUDE)
+
+ CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) $(UNIX_DEFINE) \
+- -DSYS_BIG_ENDIAN=$(BIG_ENDIAN)
++ -DSYS_BIG_ENDIAN=$(BIG_ENDIAN) -fPIC -DPIC
+
+ include $(TOPDIR)/config/common.mak
+
diff --git a/sci-libs/ogdi/files/ogdi-3.1.5-fpic.patch b/sci-libs/ogdi/files/ogdi-3.1.5-fpic.patch
new file mode 100644
index 000000000000..33fb56103193
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.1.5-fpic.patch
@@ -0,0 +1,177 @@
+Only in ogdi-3.1.5.orig: bin
+Only in ogdi-3.1.5.orig/config: Linux.mak
+Only in ogdi-3.1.5.orig: config.cache
+Only in ogdi-3.1.5.orig: config.log
+Only in ogdi-3.1.5.orig: config.status
+Only in ogdi-3.1.5.orig/external/expat: OBJ.Linux
+diff -ur ogdi-3.1.5/external/expat/makefile ogdi-3.1.5.orig/external/expat/makefile
+--- ogdi-3.1.5/external/expat/makefile 2001-08-27 14:11:10.000000000 +0000
++++ ogdi-3.1.5.orig/external/expat/makefile 2005-08-01 18:57:49.020052368 +0000
+@@ -36,7 +36,7 @@
+ # Compilation flags
+ #
+ INCLUDES = $(CURRENT_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) \
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC \
+ -DVERSION=\"expat_1.95.1\" -DPACKAGE="expat"
+
+ ifeq ($(BIG_ENDIAN),1)
+Only in ogdi-3.1.5.orig/external/zlib: OBJ.Linux
+diff -ur ogdi-3.1.5/external/zlib/makefile ogdi-3.1.5.orig/external/zlib/makefile
+--- ogdi-3.1.5/external/zlib/makefile 2001-04-19 05:26:46.000000000 +0000
++++ ogdi-3.1.5.orig/external/zlib/makefile 2005-08-01 18:58:47.984088472 +0000
+@@ -46,7 +46,7 @@
+ # Compilation flags
+ #
+ INCLUDES = $(CURRENT_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ #
+ # Primary target
+Only in ogdi-3.1.5.orig/lib: Linux
+Only in ogdi-3.1.5.orig/ogdi/c-api: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/c-api/makefile ogdi-3.1.5.orig/ogdi/c-api/makefile
+--- ogdi-3.1.5/ogdi/c-api/makefile 2001-04-19 05:29:31.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/c-api/makefile 2005-08-01 18:53:51.936094608 +0000
+@@ -23,7 +23,7 @@
+ $(GRASS_INCLUDE) $(ZLIB_INCLUDE) $(PROJ_INCLUDE) \
+ $(EXPAT_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(RPC_LINKLIB) $(ZLIB_LINKLIB) $(EXPAT_LINKLIB) $(WIN_LINKLIB) \
+ $(PROJ_STATICLIB) $(MATH_LINKLIB)
+Only in ogdi-3.1.5.orig/ogdi/datum_driver/canada: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/datum_driver/canada/makefile ogdi-3.1.5.orig/ogdi/datum_driver/canada/makefile
+--- ogdi-3.1.5/ogdi/datum_driver/canada/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/datum_driver/canada/makefile 2005-08-01 19:03:00.932634448 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = nadconv.c dtcanada.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS=
+
+Only in ogdi-3.1.5.orig/ogdi/datum_driver/usa: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/datum_driver/usa/makefile ogdi-3.1.5.orig/ogdi/datum_driver/usa/makefile
+--- ogdi-3.1.5/ogdi/datum_driver/usa/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/datum_driver/usa/makefile 2005-08-01 19:03:24.883993288 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = dtusa.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(PROJ_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/adrg: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/adrg/makefile ogdi-3.1.5.orig/ogdi/driver/adrg/makefile
+--- ogdi-3.1.5/ogdi/driver/adrg/makefile 2001-06-22 16:37:50.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/adrg/makefile 2005-08-01 19:06:07.422283712 +0000
+@@ -18,7 +18,7 @@
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(GLUTIL_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/dted: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/dted/makefile ogdi-3.1.5.orig/ogdi/driver/dted/makefile
+--- ogdi-3.1.5/ogdi/driver/dted/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/dted/makefile 2005-08-01 19:06:31.460629328 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = dted.c utils.c object.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(GLUTIL_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/network: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/network/makefile ogdi-3.1.5.orig/ogdi/driver/network/makefile
+--- ogdi-3.1.5/ogdi/driver/network/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/network/makefile 2005-08-01 19:06:52.242470008 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = remote.c ecs_clnt.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(GRASS_INCLUDE) $(PROJ_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(RPC_LINKLIB) $(WIN_LINKLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/rpf: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/rpf/makefile ogdi-3.1.5.orig/ogdi/driver/rpf/makefile
+--- ogdi-3.1.5/ogdi/driver/rpf/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/rpf/makefile 2005-08-01 19:07:39.956216416 +0000
+@@ -19,7 +19,7 @@
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) \
+ $(GRASS_INCLUDE) $(PROJ_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(VPF_STATICLIB) $(GLUTIL_STATICLIB) $(WIN_LINKLIB) $(MATH_LINKLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/skeleton: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/skeleton/makefile ogdi-3.1.5.orig/ogdi/driver/skeleton/makefile
+--- ogdi-3.1.5/ogdi/driver/skeleton/makefile 2001-02-19 04:12:21.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/skeleton/makefile 2005-08-01 19:07:15.500934184 +0000
+@@ -18,7 +18,7 @@
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(GLUTIL_INCLUDE) $(PROJ_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(MACHINE) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(MACHINE) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(GLUTIL_STATICLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/driver/vrf: OBJ.Linux
+diff -ur ogdi-3.1.5/ogdi/driver/vrf/makefile ogdi-3.1.5.orig/ogdi/driver/vrf/makefile
+--- ogdi-3.1.5/ogdi/driver/vrf/makefile 2001-06-20 21:49:31.000000000 +0000
++++ ogdi-3.1.5.orig/ogdi/driver/vrf/makefile 2005-08-01 19:08:03.541630888 +0000
+@@ -17,7 +17,7 @@
+ SOURCES = vrf.c utils.c feature.c object.c open.c swq.c vrfswq.c
+
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(OGDI_INCLUDE) $(VPF_INCLUDE) $(PROJ_INCLUDE) $(GLUTIL_INCLUDE)
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ LINK_LIBS= $(OGDI_LINKLIB) $(WIN_LINKLIB) $(VPF_STATICLIB) $(MATH_LINKLIB)
+
+Only in ogdi-3.1.5.orig/ogdi/gltpd: OBJ.Linux
+Only in ogdi-3.1.5.orig/ogdi/glutil: OBJ.Linux
+Only in ogdi-3.1.5.orig/proj: OBJ.Linux
+diff -ur ogdi-3.1.5/proj/makefile ogdi-3.1.5.orig/proj/makefile
+--- ogdi-3.1.5/proj/makefile 2001-04-09 16:20:08.000000000 +0000
++++ ogdi-3.1.5.orig/proj/makefile 2005-08-01 19:01:03.573475752 +0000
+@@ -42,7 +42,7 @@
+
+ INCLUDES = $(CURRENT_INCLUDE)
+
+-CFLAGS = $(INCLUDES) $(COMMON_CFLAGS)
++CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) -fPIC -DPIC
+
+ include $(TOPDIR)/config/common.mak
+
+Only in ogdi-3.1.5.orig/vpflib: OBJ.Linux
+diff -ur ogdi-3.1.5/vpflib/makefile ogdi-3.1.5.orig/vpflib/makefile
+--- ogdi-3.1.5/vpflib/makefile 2001-02-20 04:25:20.000000000 +0000
++++ ogdi-3.1.5.orig/vpflib/makefile 2005-08-01 19:09:48.072739744 +0000
+@@ -31,7 +31,7 @@
+ INCLUDES = $(CURRENT_INCLUDE) $(GENERAL_INCLUDE) $(VPF_INCLUDE)
+
+ CFLAGS = $(INCLUDES) $(COMMON_CFLAGS) $(UNIX_DEFINE) \
+- -DSYS_BIG_ENDIAN=$(BIG_ENDIAN)
++ -DSYS_BIG_ENDIAN=$(BIG_ENDIAN) -fPIC -DPIC
+
+ include $(TOPDIR)/config/common.mak
+
diff --git a/sci-libs/ogdi/files/ogdi-3.1.6-fpic.patch b/sci-libs/ogdi/files/ogdi-3.1.6-fpic.patch
new file mode 100644
index 000000000000..f6fbc85e5ae9
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.1.6-fpic.patch
@@ -0,0 +1,38 @@
+diff --git a/config/generic.mak.in b/config/generic.mak.in
+index 1cb74f5..2e9cabe 100644
+--- a/config/generic.mak.in
++++ b/config/generic.mak.in
+@@ -35,16 +35,16 @@ AR = ar cr
+ # Compilation and linking flags
+ #
+ SHLIB_CFLAGS = @C_PIC@
+-COMMON_CFLAGS = $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1
++COMMON_CFLAGS = $(OPTIMIZATION) @CFLAGS@ @C_WFLAGS@ -DUNIX=1 @C_PIC@
+
+-SHLIB_LDFLAGS = -shared
+-COMMON_LDFLAGS = $(OPTIMIZATION)
++SHLIB_LDFLAGS = -shared -Wl,-soname,$(LIB_PREFIX)$(TOBEGEN).$(SHLIB_EXT).$(OGDI_MAJOR)
++COMMON_LDFLAGS = $(OPTIMIZATION) $(LDFLAGS)
+
+ RPC_INCLUDES = @RPC_INCLUDES@
+
+ UCB_STATICLIB =
+
+-TCL_INCLUDE = -I/usr/include/tcl8.3
++TCL_INCLUDE = -I${prefix}/include
+ TCL_LINKLIB =
+
+ #
+diff --git a/config/unix.mak b/config/unix.mak
+index e3af578..927b0fc 100644
+--- a/config/unix.mak
++++ b/config/unix.mak
+@@ -55,7 +55,7 @@ LINK_SW = -L
+ ifeq ($(CFG),debug)
+ OPTIMIZATION = -g
+ else
+-OPTIMIZATION = -O
++OPTIMIZATION =
+ endif
+
+ #
diff --git a/sci-libs/ogdi/files/ogdi-3.1.6-unbundle-libs.patch b/sci-libs/ogdi/files/ogdi-3.1.6-unbundle-libs.patch
new file mode 100644
index 000000000000..df96ddfeda76
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.1.6-unbundle-libs.patch
@@ -0,0 +1,13 @@
+diff --git a/makefile b/makefile
+index 8c62a03..3ecb0f0 100644
+--- a/makefile
++++ b/makefile
+@@ -17,7 +17,7 @@ include $(TOPDIR)/config/common.mak
+ #
+ # Sub-directories that need to be built
+ #
+-subdirs = external vpflib ogdi contrib
++subdirs = vpflib ogdi contrib
+
+ ifneq ($(PROJ_SETTING),external)
+ subdirs := proj $(subdirs)
diff --git a/sci-libs/ogdi/files/ogdi-3.2.0_beta2-64b.patch b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-64b.patch
new file mode 100644
index 000000000000..16c40b2ff435
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-64b.patch
@@ -0,0 +1,11 @@
+--- ogdi.old/ogdi/driver/vrf/feature.c 2007/05/09 20:46:28 1.16
++++ ogdi/ogdi/driver/vrf/feature.c 2009/05/08 04:15:50 1.17
+@@ -1347,7 +1350,7 @@
+ short int temp4;
+ int temp5;
+ date_type temp6;
+- long count;
++ int32 count;
+
+ if (returnString != NULL) {
+ free(returnString);
diff --git a/sci-libs/ogdi/files/ogdi-3.2.0_beta2-endianess.patch b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-endianess.patch
new file mode 100644
index 000000000000..75c85fbb29b5
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-endianess.patch
@@ -0,0 +1,18 @@
+diff -urNad ogdi-dfsg~/vpflib/include/machine.h ogdi-dfsg/vpflib/include/machine.h
+--- ogdi-dfsg~/vpflib/include/machine.h 2007-03-27 17:35:24.000000000 +0200
++++ ogdi-dfsg/vpflib/include/machine.h 2007-03-27 17:41:16.000000000 +0200
+@@ -15,10 +15,11 @@
+ long output;
+ } xBYTE_ORDER;
+
+-#if SYS_BIG_ENDIAN == 1
+-#define MACHINE_BYTE_ORDER MOST_SIGNIFICANT
+-#else
++#include <endian.h>
++#if __BYTE_ORDER == __LITTLE_ENDIAN
+ #define MACHINE_BYTE_ORDER LEAST_SIGNIFICANT
++#elif __BYTE_ORDER == __BIG_ENDIAN
++#define MACHINE_BYTE_ORDER MOST_SIGNIFICANT
+ #endif
+
+ #ifdef _WINDOWS
diff --git a/sci-libs/ogdi/files/ogdi-3.2.0_beta2-proj480.patch b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-proj480.patch
new file mode 100644
index 000000000000..9380f91ffd3d
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-proj480.patch
@@ -0,0 +1,297 @@
+Index: ogdi-dfsg/configure
+===================================================================
+--- ogdi-dfsg.orig/configure
++++ ogdi-dfsg/configure
+@@ -3939,7 +3939,7 @@
+ fi
+
+
+-for ac_header in projects.h
++for ac_header in proj_api.h
+ do
+ as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+@@ -4085,8 +4085,8 @@
+ { (exit 1); exit 1; }; }
+ fi
+ if test "$ac_cv_header_projects_h" = no ; then
+- { { echo "$as_me:$LINENO: error: Unable to find external PROJ.4 projects.h file, give path or use default internal library." >&5
+-echo "$as_me: error: Unable to find external PROJ.4 projects.h file, give path or use default internal library." >&2;}
++ { { echo "$as_me:$LINENO: error: Unable to find external PROJ.4 proj_api.h file, give path or use default internal library." >&5
++echo "$as_me: error: Unable to find external PROJ.4 proj_api.h file, give path or use default internal library." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+@@ -4095,12 +4095,12 @@
+
+ elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
+
+- if test -r $with_proj/include/projects.h ; then
+- echo "checking for $with_proj/include/projects.h ... found"
++ if test -r $with_proj/include/proj_api.h ; then
++ echo "checking for $with_proj/include/proj_api.h ... found"
+ PROJ_INCLUDE=-I$with_proj/include
+ else
+- { { echo "$as_me:$LINENO: error: Unable to find $with_proj/include/projects.h" >&5
+-echo "$as_me: error: Unable to find $with_proj/include/projects.h" >&2;}
++ { { echo "$as_me:$LINENO: error: Unable to find $with_proj/include/proj_api.h" >&5
++echo "$as_me: error: Unable to find $with_proj/include/proj_api.h" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+
+Index: ogdi-dfsg/configure.in
+===================================================================
+--- ogdi-dfsg.orig/configure.in
++++ ogdi-dfsg/configure.in
+@@ -81,13 +81,13 @@
+ if test "$with_proj" = "yes" ; then
+
+ AC_CHECK_LIB(proj,pj_init,PROJ_SETTING=external,PROJ_SETTING=missing,)
+- AC_CHECK_HEADERS(projects.h)
++ AC_CHECK_HEADERS(proj_api.h)
+
+ if test $PROJ_SETTING = missing ; then
+ AC_MSG_ERROR([Unable to find external PROJ.4 library, give path or use default internal library.])
+ fi
+ if test "$ac_cv_header_projects_h" = no ; then
+- AC_MSG_ERROR([Unable to find external PROJ.4 projects.h file, give path or use default internal library.])
++ AC_MSG_ERROR([Unable to find external PROJ.4 proj_api.h file, give path or use default internal library.])
+ fi
+
+ PROJ_SETTING=external
+@@ -95,11 +95,11 @@
+
+ elif test "$with_proj" != "no" -a "$with_proj" != "" ; then
+
+- if test -r $with_proj/include/projects.h ; then
+- echo "checking for $with_proj/include/projects.h ... found"
++ if test -r $with_proj/include/projapi.h ; then
++ echo "checking for $with_proj/include/proj_api.h ... found"
+ PROJ_INCLUDE=-I$with_proj/include
+ else
+- AC_MSG_ERROR([Unable to find $with_proj/include/projects.h])
++ AC_MSG_ERROR([Unable to find $with_proj/include/proj_api.h])
+ fi
+
+ if test -r $with_proj/lib/libproj.so ; then
+Index: ogdi-dfsg/ogdi/c-api/client.c
+===================================================================
+--- ogdi-dfsg.orig/ogdi/c-api/client.c
++++ ogdi-dfsg/ogdi/c-api/client.c
+@@ -1576,7 +1576,7 @@
+ char *error_message;
+ ecs_CtlPoints *cpts;
+ ecs_Result *res;
+- PJ *tempproj;
++ projPJ tempproj;
+
+ if (multiblock != 0) {
+ res = &cln_dummy_result;
+@@ -1598,7 +1598,7 @@
+ /* Check if the projection is valid */
+
+ if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
+- tempproj = (PJ *) cln_ProjInit(projection);
++ tempproj = (projPJ) cln_ProjInit(projection);
+ if(tempproj == NULL) {
+ res = &cln_dummy_result;
+ ecs_SetError(res,1,"This projection string is invalid");
+@@ -1775,7 +1775,7 @@
+ ecs_Result *res;
+ register ecs_Client *cln;
+ char *server_proj;
+- PJ *oldtarget,*oldsource;
++ projPJ oldtarget,oldsource;
+ ecs_Region oldreg;
+ int oldisprojequal;
+ int oldisTargetLL;
+@@ -1874,7 +1874,7 @@
+
+ if (strncmp(projection,PROJ_LONGLAT,13) != 0) {
+ cln->isTargetLL = FALSE;
+- cln->target = (PJ *) cln_ProjInit(projection);
++ cln->target = (projPJ) cln_ProjInit(projection);
+ if(cln->target == NULL) {
+ goto setprojerror;
+ }
+@@ -1920,7 +1920,7 @@
+
+ if (strncmp(server_proj,PROJ_LONGLAT,13) != 0) {
+ cln->isSourceLL = FALSE;
+- cln->source = (PJ *) cln_ProjInit(server_proj);
++ cln->source = (projPJ) cln_ProjInit(server_proj);
+ if(cln->source == NULL) {
+ goto setprojerror;
+ }
+@@ -2328,13 +2328,13 @@
+ * char *d: Projection name
+ *
+ * OUT
+- * return PJ *: New projection structure. If NULL, the operation
++ * return projPJ: New projection structure. If NULL, the operation
+ * is a failure.
+ *
+ *----------------------------------------------------------------------
+ */
+
+-PJ *cln_ProjInit(d)
++projPJ cln_ProjInit(d)
+ char *d;
+ {
+ int i,n;
+@@ -2343,7 +2343,7 @@
+ char *l;
+ int longueur;
+ char *c;
+- PJ *retour;
++ projPJ retour;
+
+ if ((c = (char *) malloc(strlen(d)+3)) == NULL) {
+ return NULL;
+@@ -2378,7 +2378,7 @@
+ n++;
+ }
+
+- retour = (PJ *) pj_init(n, (char **) tableau);
++ retour = (projPJ) pj_init(n, (char **) tableau);
+ free(c);
+ free(tableau);
+
+Index: ogdi-dfsg/ogdi/c-api/ecsgeo.c
+===================================================================
+--- ogdi-dfsg.orig/ogdi/c-api/ecsgeo.c
++++ ogdi-dfsg/ogdi/c-api/ecsgeo.c
+@@ -310,7 +310,7 @@
+ char *projection;
+ double X1,Y1,X2,Y2;
+ {
+- PJ *proj;
++ projPJ proj;
+ char **argv;
+ int argc;
+ double lon1,lat1,lon2,lat2;
+Index: ogdi-dfsg/ogdi/datum_driver/usa/dtusa.c
+===================================================================
+--- ogdi-dfsg.orig/ogdi/datum_driver/usa/dtusa.c
++++ ogdi-dfsg/ogdi/datum_driver/usa/dtusa.c
+@@ -26,7 +26,12 @@
+ ********************************************************************/
+
+ #include "ecs.h"
+-#include "projects.h"
++#include "proj_api.h"
++
++/* Definition from Proj.4 */
++projUV nad_cvt(projUV, int, struct CTABLE *);
++struct CTABLE *nad_init(projCtx ctx, char *);
++void nad_free(struct CTABLE *);
+
+ typedef struct {
+ struct CTABLE *dtptr;
+@@ -124,7 +129,7 @@
+ strcat(pathfile,"/");
+ strcat(pathfile,table);
+
+- ptr->dtptr = nad_init(pathfile);
++ ptr->dtptr = nad_init(pj_get_default_ctx(), pathfile);
+ if (ptr->dtptr == NULL) {
+ ptr->count--;
+ return FALSE;
+Index: ogdi-dfsg/ogdi/include/ecs_util.h
+===================================================================
+--- ogdi-dfsg.orig/ogdi/include/ecs_util.h
++++ ogdi-dfsg/ogdi/include/ecs_util.h
+@@ -105,12 +105,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+
+-#include "projects.h"
+-
+-/* Ensure we are compatible with PROJ.4.4.x and PROJ.4.3.x */
+-#ifndef USE_PROJUV
+-# define projUV UV
+-#endif
++#include "proj_api.h"
+
+ #include "ecs.h"
+
+@@ -1054,8 +1049,8 @@
+ ecs_Family currentSelectionFamily: Current layer selection type
+ char *tclprocname: attribute callback procedure for tcl
+ char *target_proj: Projection descriptor
+- PJ *target: target (c interface) projection descriptors
+- PJ *source: source (driver) projection descriptors
++ projPJ target: target (c interface) projection descriptors
++ projPJ source: source (driver) projection descriptors
+ ecs_Datum targetdatum: target datum information
+ ecs_Datum sourcedatum: source datum information
+ void *dthandle: Handle to the datum driver
+@@ -1092,8 +1088,8 @@
+ ecs_Family currentSelectionFamily; /* Current layer selection type */
+ char *tclprocname; /* attribute callback procedure for tcl */
+ char *target_proj;
+- PJ *target; /* source and target projection descriptors */
+- PJ *source;
++ projPJ target; /* source and target projection descriptors */
++ projPJ source;
+ int isSourceLL; /* flags to avoid unnecessary computation */
+ int isTargetLL;
+ int isProjEqual;
+@@ -1165,7 +1161,7 @@
+
+ /* Projection conversion functions */
+
+-PJ *cln_ProjInit _ANSI_ARGS_((char *d));
++projPJ cln_ProjInit _ANSI_ARGS_((char *d));
+ int cln_CompareProjections _ANSI_ARGS_((int ClientID));
+ int cln_UpdateMaxRegion _ANSI_ARGS_((int ClientID, double x, double y, ecs_Region *gr, int sens, int first));
+ int cln_ConvRegion _ANSI_ARGS_((int ClientID, ecs_Region *gr, int sens));
+Index: ogdi-dfsg/contrib/ogdi_import/ogdi_import.c
+===================================================================
+--- ogdi-dfsg.orig/contrib/ogdi_import/ogdi_import.c
++++ ogdi-dfsg/contrib/ogdi_import/ogdi_import.c
+@@ -63,12 +63,7 @@
+ #include "ecs.h"
+ #include "shapefil.h"
+ #include <assert.h>
+-#include "projects.h"
+-
+-#ifndef PJ_VERSION
+-#define projPJ PJ*
+-#define projUV UV
+-#endif
++#include "proj_api.h"
+
+ static int ClientID = -1;
+ static int bNoDict = FALSE;
+Index: ogdi-dfsg/contrib/ogdi_info/ogdi_info.c
+===================================================================
+--- ogdi-dfsg.orig/contrib/ogdi_info/ogdi_info.c
++++ ogdi-dfsg/contrib/ogdi_info/ogdi_info.c
+@@ -63,7 +63,7 @@
+ */
+
+ #include "ecs.h"
+-#include "projects.h"
++#include "proj_api.h"
+
+ static int ClientID = -1;
+ static int bNoDict = FALSE;
+@@ -214,7 +214,7 @@
+ /* DumpGlobalRegion() */
+ /************************************************************************/
+
+-static int DumpGlobalRegion( ecs_Region * region, PJ * proj_defn )
++static int DumpGlobalRegion( ecs_Region * region, projPJ proj_defn )
+
+ {
+ ecs_Result *result;
+@@ -398,7 +398,7 @@
+
+ {
+ ecs_Result *result;
+- PJ *proj_defn = NULL;
++ projPJ proj_defn = NULL;
+
+ /* -------------------------------------------------------------------- */
+ /* Close old client if there is one active. */
diff --git a/sci-libs/ogdi/files/ogdi-3.2.0_beta2-subdirs.patch b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-subdirs.patch
new file mode 100644
index 000000000000..c98390c440de
--- /dev/null
+++ b/sci-libs/ogdi/files/ogdi-3.2.0_beta2-subdirs.patch
@@ -0,0 +1,24 @@
+diff -urN ogdi-3.2.0.beta2.old/makefile ogdi-3.2.0.beta2/makefile
+--- ogdi-3.2.0.beta2.old/makefile 2011-06-17 12:45:53.171219473 +0200
++++ ogdi-3.2.0.beta2/makefile 2011-06-17 12:46:34.013708870 +0200
+@@ -17,7 +17,7 @@
+ #
+ # Sub-directories that need to be built
+ #
+-subdirs = external vpflib ogdi contrib
++subdirs = vpflib ogdi contrib
+
+ ifneq ($(PROJ_SETTING),external)
+ subdirs := proj $(subdirs)
+diff -urN ogdi-3.2.0.beta2.old/ogdi/makefile ogdi-3.2.0.beta2/ogdi/makefile
+--- ogdi-3.2.0.beta2.old/ogdi/makefile 2011-06-17 12:45:53.174219434 +0200
++++ ogdi-3.2.0.beta2/ogdi/makefile 2011-06-17 12:47:38.814898744 +0200
+@@ -15,7 +15,7 @@
+ #
+ # Sub-directories that need to be built
+ #
+-subdirs = include c-api glutil attr_driver datum_driver driver gltpd examples
++subdirs = include c-api glutil attr_driver datum_driver driver gltpd
+
+ #
+ # Default target to build everything in all sub-directories
diff --git a/sci-libs/ogdi/metadata.xml b/sci-libs/ogdi/metadata.xml
new file mode 100644
index 000000000000..9a53e0e5b56d
--- /dev/null
+++ b/sci-libs/ogdi/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sci</herd>
+ <upstream>
+ <remote-id type="sourceforge">ogdi</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sci-libs/ogdi/ogdi-3.1.5-r1.ebuild b/sci-libs/ogdi/ogdi-3.1.5-r1.ebuild
new file mode 100644
index 000000000000..fd0858352e21
--- /dev/null
+++ b/sci-libs/ogdi/ogdi-3.1.5-r1.ebuild
@@ -0,0 +1,49 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit toolchain-funcs eutils
+
+DESCRIPTION="Open Geographical Datastore Interface, a GIS support library"
+HOMEPAGE="http://ogdi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ogdi/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+DEPEND="
+ <sci-libs/proj-4.8.0
+ sys-libs/zlib
+ dev-libs/expat"
+RDEPEND="${DEPEND}"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${P}-fpic.patch
+}
+
+src_compile() {
+ export TOPDIR="${S}"
+ export TARGET=`uname`
+ export CFG="release"
+ export LD_LIBRARY_PATH=$TOPDIR/bin/${TARGET}
+
+ econf --with-projlib="-L/usr/$(get_libdir) -lproj" \
+ --with-zlib --with-expat
+
+ # bug #299239
+ emake -j1 || die "make failed"
+}
+
+src_install() {
+ mv "${S}"/bin/Linux/*.so "${S}"/lib/Linux/. || die "lib move failed"
+ dobin "${S}"/bin/Linux/*
+ insinto /usr/include
+ doins ogdi/include/ecs.h ogdi/include/ecs_util.h
+ dolib.so lib/Linux/*.so
+ dosym libogdi31.so /usr/$(get_libdir)/libogdi.so || die "symlink failed"
+ dodoc ChangeLog NEWS README VERSION
+}
diff --git a/sci-libs/ogdi/ogdi-3.2.0_beta2.ebuild b/sci-libs/ogdi/ogdi-3.2.0_beta2.ebuild
new file mode 100644
index 000000000000..c7273ec0dc22
--- /dev/null
+++ b/sci-libs/ogdi/ogdi-3.2.0_beta2.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+MY_P=${P/_/.}
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Open Geographical Datastore Interface, a GIS support library"
+HOMEPAGE="http://ogdi.sourceforge.net/"
+SRC_URI="mirror://sourceforge/ogdi/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="alpha amd64 ~arm ppc ppc64 x86 ~amd64-linux ~x86-linux"
+IUSE="static-libs"
+
+DEPEND="
+ dev-libs/expat
+ >=sci-libs/proj-4.8.0
+ sys-libs/zlib
+"
+RDEPEND="${DEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+src_prepare() {
+ rm -rf external
+ epatch \
+ "${FILESDIR}"/${P}-subdirs.patch \
+ "${FILESDIR}"/${P}-endianess.patch \
+ "${FILESDIR}"/${P}-64b.patch \
+ "${FILESDIR}"/${P}-proj480.patch \
+ "${FILESDIR}"/${PN}-3.1.6-fpic.patch
+ sed 's:O2:O9:g' -i configure || die
+}
+
+src_configure() {
+ export TOPDIR="${S}"
+ export TARGET=$(uname)
+ export CFG="release"
+ export LD_LIBRARY_PATH=$TOPDIR/bin/${TARGET}
+
+ econf \
+ --with-projlib="-L${EPREFIX}/usr/$(get_libdir) -lproj" \
+ --with-zlib --with-expat
+}
+
+src_compile() {
+ # bug #299239
+ emake -j1 \
+ CC="$(tc-getCC)" \
+ LD="$(tc-getCC)" \
+ SHLIB_LD="$(tc-getCC)"
+}
+
+src_install() {
+ mv "${S}"/bin/${TARGET}/*.so* "${S}"/lib/Linux/. || die "lib move failed"
+ dobin "${S}"/bin/${TARGET}/*
+ insinto /usr/include
+ doins ogdi/include/ecs.h ogdi/include/ecs_util.h
+ dolib.so lib/${TARGET}/lib*
+ use static-libs && dolib.a lib/${TARGET}/static/*.a
+# dosym libogdi31.so /usr/$(get_libdir)/libogdi.so || die "symlink failed"
+ dodoc ChangeLog NEWS README
+}