[pyferret] 04/110: 2nd cut
Alastair McKinstry
mckinstry at moszumanska.debian.org
Fri Jul 28 08:41:41 UTC 2017
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository pyferret.
commit 98e55155d23c5fc622969ee75bb5114998994da2
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Tue Nov 18 09:34:53 2014 +0000
2nd cut
---
debian/changelog | 4 +-
debian/ef_utility/platform_specific.mk.debian | 42 +++++++
debian/platform_specific.mk.debian | 158 ++++++++++++++------------
debian/rules | 10 +-
debian/site_specific.mk.in | 61 ++++++++++
5 files changed, 195 insertions(+), 80 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index b7483a9..93600b1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,5 @@
-pyferret (1.0.2-1) UNRELEASED; urgency=low
+pyferret (1.0.2-1) UNRELEASED; urgency=medium
* Initial release. (Closes: #XXXXXX)
- -- Alastair McKinstry <mckinstry at debian.org> Mon, 10 Nov 2014 18:31:10 +0000
+ -- Alastair McKinstry <mckinstry at debian.org> Tue, 18 Nov 2014 09:35:16 +0000
diff --git a/debian/ef_utility/platform_specific.mk.debian b/debian/ef_utility/platform_specific.mk.debian
new file mode 100644
index 0000000..fcd3639
--- /dev/null
+++ b/debian/ef_utility/platform_specific.mk.debian
@@ -0,0 +1,42 @@
+#
+# platform_specific_includes.mk.intel-mac
+#
+# This file is included in the External Function Makefiles and defines
+# platform specific macros
+# ACM 2/2001 debug flags
+
+# this assumes INSTALL_FER_DIR and PYTHON_EXE has already been defined
+# in site_specific.mk
+
+INCLUDES = -I. -I../ef_utility -I../ef_utility/ferret_cmn
+
+CCSHFLAG =
+CC = gcc
+CFLAGS = -fPIC -Ddouble_p -DHAVE_STDDEF_H -DHAVE_UNISTD_H \
+ -O $(INCLUDES)
+
+FC = gfortran
+F77 = gfortran
+F77SHFLAG =
+FFLAGS = -fPIC -Ddouble_p -DHAVE_STDDEF_H -DHAVE_UNISTD_H \
+ -fno-second-underscore -fno-backslash -fdollar-ok \
+ -ffixed-line-length-132 -fdefault-real-8 -fdefault-double-8 \
+ -O $(INCLUDES)
+
+RANLIB = /usr/bin/ranlib
+
+LD = gfortran
+LD_DYN_FLAGS = -fPIC -shared -Wl,-bundle
+SYSLIBS = -L$(INSTALL_FER_DIR)/lib64/$(PYTHON_EXE)/site-packages/pyferret \
+ -L$(INSTALL_FER_DIR)/lib/$(PYTHON_EXE)/site-packages/pyferret -lpyferret
+
+CPP = /lib/cpp
+CPP_FLAGS = -P -traditional $(INCLUDES)
+CFLAGS_DEBUG = -O0 -g
+FFLAGS_DEBUG = -O0 -g
+
+# Directly compile the .F source files to the .o object files
+# since gfortran can handle the C compiler directives in Fortran code
+%.o : %.F
+ $(FC) $(FFLAGS) -c $*.F -o $*.o
+
diff --git a/debian/platform_specific.mk.debian b/debian/platform_specific.mk.debian
index 348d6b4..1d2f9c9 100644
--- a/debian/platform_specific.mk.debian
+++ b/debian/platform_specific.mk.debian
@@ -1,86 +1,96 @@
#
-# platform_specific.mk.debian
+# platform_specific.mk.i386-linux
+#
+# This file is included in Makefiles under the
+# fer, fmt, and ppl directories and defines platform specific macros
#
-# This file is included in other Makefiles and defines
-# platform specific macros
-
-PLATFORM = $(shell uname -s -r)
-GUI_INCLUDES =
-GKS_INCLUDES =-I/usr/include/xgks
-INCLUDES = \
- -I../../fmt/cmn \
- -I../../fer/common \
- -I/$(NETCDF4_DIR)/include \
- -I/usr/include \
- -I/usr/include/X11 \
- -I../../ppl/include\
- -I/usr/include/xgks
-FINCLUDES = -I../../ppl/tmap_inc \
- -I../../fmt/cmn \
- -I../../ppl/include \
- -I../../fer/common \
- -I../../external_functions/ef_utility
+#
+# DIR_PREFIX, HDF5_DIR, and NETCDF4_DIR are from site_specific.mk
+# which should have been included prior to this include.
+#
-CC = gcc
-CXX = c++
-FC = gfortran
-F77 = gfortran
-RANLIB = /usr/bin/ranlib
-CPP = /lib/cpp
-LD = gcc
-LDFLAGS = -v --verbose -fpic -export-dynamic
-LD_DYN_FLAGS = -v -fpic -shared
+#
+# Directories for the libraries
+#
+ifeq ($(strip $(CAIRO_DIR)),)
+ CAIRO_LIBDIR =
+# This is only for code in Pango that did use the proper cairo extension
+ CAIRO_INCLUDE = -I/usr/include/cairo
+else
+ CAIRO_LIBDIR = $(CAIRO_DIR)/lib
+# The second include is only for code in Pango that did use the proper cairo include
+ CAIRO_INCLUDE = -I$(CAIRO_DIR)/include -I$(CAIRO_DIR)/include/cairo
+endif
-CPP_FLAGS = $(INCLUDES) \
- -Dunix -Dgfortran \
- -DNO_OPEN_SHARED \
- -DNO_OPEN_RECORDTYPE \
- -DX_REFRESH -Dreclen_in_bytes \
- -DNO_OPEN_READONLY -DMANDATORY_FORMAT_WIDTHS\
- -DNO_OPEN_CARRIAGECONTROL -Dxgks -DSTAR_1_SUPPORTED \
- -DFULL_GUI_VERSION -DX_REFRESH \
- -DXT_CODE -DLINUX -DNO_PASSED_CONCAT \
- -Dcrptd_cat_argument \
- -DG77_SIGNAL -DG77 \
- -DNEED_IAND -DINTERNAL_READ_FORMAT_BUG \
- -DNO_PREPEND_STRING -DNO_DOUBLE_ESCAPE_SLASH \
- -Ddouble_p
+ifeq ($(strip $(HDF5_DIR)),)
+ HDF5_LIBDIR =
+else
+ HDF5_LIBDIR = $(HDF5_DIR)/lib
+endif
-# Flags for compiling all C code
-# -DusingDODSf2cUnderscore needed if using netcdf library...
-# also consider -ffloat-store.
-CFLAGS = $(CPP_FLAGS) -fPIC \
- -Dlint -D_SSIZE_T -DVOID_SIGHANDLER -D_POSIX_VERSION -DLINUX \
- -DFULL_GUI_VERSION -DX_REFRESH -DXT_CODE -Dsun4
+ NETCDF4_LIBDIR = $(NETCDF4_DIR)/lib
-# Flags for compiling the PlotPlus FORTRAN code (ppl subdirectory)
-PPLUS_FFLAGS = $(CPP_FLAGS) \
- -fno-automatic -fno-second-underscore \
- -fdollar-ok -ffixed-line-length-132 $(FINCLUDES)
-# Flags for compiling non-PlotPlus FORTRAN code
-FFLAGS = $(CPP_FLAGS) -fPIC \
- -fno-automatic -fno-second-underscore \
- -fdollar-ok -ffixed-line-length-132 -ffpe-trap=overflow \
- -fdefault-real-8 -fdefault-double-8 $(FINCLUDES)
+#
+# Local defines
+#
+ MYINCLUDES = -I$(PYTHONINCDIR) \
+ -I$(DIR_PREFIX)/fer/common \
+ -I$(DIR_PREFIX)/fer/grdel \
+ -I$(DIR_PREFIX)/fer/cferbind \
+ -I$(DIR_PREFIX)/fmt/cmn \
+ -I$(DIR_PREFIX)/ppl/include \
+ -I$(DIR_PREFIX)/ppl/tmap_inc \
+ -I$(DIR_PREFIX)/pyfermod \
+ -I$(DIR_PREFIX)/external_functions/ef_utility \
+ $(CAIRO_INCLUDE) \
+ -I/usr/include/pango-1.0 \
+ -I/usr/include/glib-2.0 \
+ -I/usr/lib/$(BUILDARCH)/glib-2.0/include \
+ -I$(NETCDF4_DIR)/include
-# Add hardening
-CFLAGS += `dpkg-buildflags --get CFLAGS`
-CPPFLAGS += `dpkg-buildflags --get CPPFLAGS`
-FFLAGS += `dpkg-buildflags --get FFLAGS`
+ MYDEFINES = -Dcrptd_cat_argument \
+ -Ddouble_p \
+ -Dgfortran \
+ -Dreclen_in_bytes \
+ -Dunix \
+ -Dxgks \
+ -DG77_SIGNAL \
+ -DG77 \
+ -DINTERNAL_READ_FORMAT_BUG \
+ -DLINUX \
+ -DMANDATORY_FORMAT_WIDTHS \
+ -DNEED_IAND \
+ -DNO_DOUBLE_ESCAPE_SLASH \
+ -DNO_OPEN_CARRIAGECONTROL \
+ -DNO_OPEN_READONLY \
+ -DNO_OPEN_RECORDTYPE \
+ -DNO_OPEN_SHARED \
+ -DNO_PASSED_CONCAT \
+ -DNO_PREPEND_STRING \
+ -DSTAR_1_SUPPORTED \
+ -DVOID_SIGHANDLER \
+ -DX_REFRESH \
+ -DXT_CODE
-# PROF_FLAGS = -pg
+ CPP = $(shell which cpp)
+ CC = $(shell which gcc)
+ FC = $(shell which gfortran)
+ F77 = $(shell which gfortran)
+ RANLIB = $(shell which ranlib)
-GKSLIB = -lxgks
-SYSLIB = -lX11 -lm -ldl
-CDFLIB = -lnetcdff -lnetcdf -lgfortran
-TERMCAPLIB =
-READLINELIB = -lreadline
+ CPP_FLAGS = $(MYINCLUDES) $(MYDEFINES) -fPIC -Dlint -D_SSIZE_T -D_POSIX_VERSION -Dsun4
+ CFLAGS = $(MYINCLUDES) $(MYDEFINES) -fPIC -Dlint -D_SSIZE_T -D_POSIX_VERSION -Dsun4
+ FFLAGS = $(MYINCLUDES) $(MYDEFINES) -fPIC -fno-automatic -fdollar-ok \
+ -ffixed-line-length-132 -fno-second-underscore -fno-backslash \
+ -fimplicit-none -fdefault-real-8 -fdefault-double-8
+ PPLUS_FFLAGS = $(MYINCLUDES) $(MYDEFINES) -fPIC -fno-automatic -fdollar-ok \
+ -ffixed-line-length-132 -fno-second-underscore -fno-backslash
-LINUX_OBJS = special/linux_routines.o \
- dat/*.o \
- ../fmt/src/x*.o \
- ../ppl/plot/ppldata.o
+# LD and LD_DYN_FLAGS only used for generating ferret_ef_mem_subsc.so
+ LD = $(shell which gfortran)
+ LD_DYN_FLAGS = -fPIC -shared -rdynamic -Xlinker --no-undefined \
+ -L $(DIR_PREFIX)/pyferret_install/lib/$(PYTHON_EXE)/site-packages/pyferret
## cancel the default rule for .f -> .o to prevent objects from being built
## from .f files that are out-of-date with respect to their corresponding .F file
@@ -90,7 +100,7 @@ LINUX_OBJS = special/linux_routines.o \
#%.o : %.F
# rm -f $*.f
# $(CPP) -P -traditional $(CPP_FLAGS) $(<F) | sed -e 's/de /de /g' | sed -e 's/de /de /g' > $*.f
-# $(F77) $(FFLAGS) -c $*.f
+# $(F77) $(FFLAGS) -c $*.f
# Directly compile the .F source files to the .o object files
# since gfortran can handle the C compiler directives in Fortran code
@@ -98,5 +108,5 @@ LINUX_OBJS = special/linux_routines.o \
$(FC) $(FFLAGS) -c $*.F -o $*.o
#
-# End of platform_specific_includes.mk.debian
+# End of platform_specific.mk.i386-linux
#
diff --git a/debian/rules b/debian/rules
index 7c4fa88..14d127b 100755
--- a/debian/rules
+++ b/debian/rules
@@ -14,12 +14,14 @@ INSTALLDIR:=$(CURDIR)/debian/tmp
override_dh_auto_build:
sed -e 's%@ARCH@%${ARCH}%' \
- -e 's%@LIBDIR@%${LIBDIR}%' \
- -e 's%@INSTALLDIR@%${INSTALLDIR}%' \
- < debian/site_specific.mk.in > site_specific.mk
+ -e 's%@LIBDIR@%${LIBDIR}%' \
+ -e 's%@CURDIR@%${CURDIR}%' \
+ -e 's%@INSTALLDIR@%${INSTALLDIR}%' \
+ < debian/site_specific.mk.in > site_specific.mk
cp debian/platform_specific.mk.debian .
+ cp debian/ef_utility/platform_specific.mk.debian external_functions/ef_utility/platform_specific.mk.debian
#cp site_specific.mk platform_specific.mk.debian external_functions/ef_utility
- $(MAKE) -C fer HOSTTYPE=debian update pymod_optimized
+ $(MAKE) -C fer HOSTTYPE=debian all
#override_dh_install:
# dh_installdirs
diff --git a/debian/site_specific.mk.in b/debian/site_specific.mk.in
new file mode 100644
index 0000000..fce020a
--- /dev/null
+++ b/debian/site_specific.mk.in
@@ -0,0 +1,61 @@
+## Site-dependent definitions included in Makefiles
+## Also verify the values in external_functions/ef_utility/site_specific.mk
+
+## Full path name of the directory containing this file (the ferret root directory).
+## Do not use $(shell pwd) since this is included in Makefiles in other directories.
+DIR_PREFIX = @CURDIR@
+
+## Machine type for which to build Ferret/PyFerret
+## x86_64-linux for 64-bit RHEL
+## x86_64-linux-gnu for 64-bit Ubuntu and many "free" Linux systems
+## i386-linux for 32-bit RHEL
+## i386-linux-gnu for 32-bit Ubuntu and many "free" Linux systems
+## i386-apple-darwin for MacOS
+BUILDTYPE = $(HOSTTYPE)
+BUILDARCH = @ARCH@
+
+## Python 2.x executable to invoke for build and install.
+PYTHON_EXE = python2.7
+## The assignment of PYTHONINCDIR should not need any modifications
+PYTHONINCDIR := /usr/include/$(PYTHON_EXE)
+
+## Installation directory for built Ferret. Using the "install"
+## Makefile target circumvents the need to create the fer_*.tar.gz
+## files just for creating a Ferret installation.
+INSTALL_FER_DIR = $(FER_DIR)
+
+## Java home directory - this may be predefined
+## from your shell environment. If JAVA_HOME is defined,
+## $(JAVA_HOME)/bin/javac and $(JAVA_HOME)/bin/jar is
+## called to build threddsBrowser.jar; otherwise, it just
+## uses javac and jar (from the path).
+
+# PyFerret version number - do not change this
+PYFERRET_VERSION = 1.0.2
+
+## Installation directory for built Ferret. Using the "install"
+## Makefile target circumvents the need to create the fer_*.tar.gz
+## files just for creating a Ferret installation.
+INSTALL_FER_DIR = @INSTALLDIR@
+
+FER_LOCAL_EXTFCNS = $(INSTALL_FER_DIR)/@LIBDIR@/ferret-vis/external-functions
+
+## Installation directory for HDF5 static libraries
+## (contains include and lib or lib64 subdirectories)
+#HDF5_DIR = @LIBDIR@/hdf5/serial
+
+## Installation directory for NetCDF static libraries
+## (contains include and lib or lib64 subdirectories)
+#NETCDF4_DIR = /usr
+
+## Installation directory for readline static libraries
+## (contains include and lib or lib64 subdirectories)
+#READLINE_DIR = /usr
+
+## Installation directory for Cairo-1.8.8 static libraries
+## (contains include and lib or lib64 subdirectories) for RHEL5.
+## Do not give a location on other systems. For these systems
+## the system-wide shared-object Cairo libraries which are also
+## used by Qt4 must be used.
+# CAIRO_DIR =
+#CAIRO_DIR = @LIBDIR@
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/pyferret.git
More information about the debian-science-commits
mailing list