Skip to content

Commit

Permalink
Applying patches for Closes libgeos#742
Browse files Browse the repository at this point in the history
* 01-geos-config.patch
  * Description: Fix library paths.
  * Author: Francesco Paolo Lovergine <[email protected]>
* 02-ruby2.patch
  * Description: Update include and libraries paths for Ruby 2.x.
  * Fix linking with libruby.
  * Author: Bas Couwenberg <[email protected]>
* 03-disable-docygen-html-timestamp.patch
  * Description: Disable HTML timestamps in Doxygen to allow reproducible builds.
  * https://wiki.debian.org/ReproducibleBuilds/
  * Author: Bas Couwenberg <[email protected]>
  • Loading branch information
cvvergara committed Jun 14, 2018
1 parent 9eb8152 commit 5ac4db2
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 12 deletions.
6 changes: 6 additions & 0 deletions doc/Doxyfile.in
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,12 @@ HTML_FOOTER =

HTML_STYLESHEET =

# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
# page will contain the date and time when the page was generated. Setting
# this to NO can help when comparing the output of multiple runs.

HTML_TIMESTAMP = NO

# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
# files or namespaces will be aligned in HTML using tables. If set to
# NO a bullet list will be used.
Expand Down
26 changes: 18 additions & 8 deletions macros/ruby.m4
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## ------------------------
## ------------------------
## Ruby file handling
## From Charlie Savage
## ------------------------
Expand All @@ -12,9 +12,9 @@

AC_DEFUN([AC_RUBY_DEVEL],
[
dnl Find a Ruby interpreter
dnl Find a Ruby interpreter
AC_PATH_PROG([RUBY],[ruby])
if test -z "$RUBY" ; then
AC_MSG_ERROR([Could not find ruby interpreter.])
RUBY=''
Expand All @@ -25,39 +25,49 @@ AC_DEFUN([AC_RUBY_DEVEL],
dnl Get Ruby bin directory
RUBY_BIN_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["bindir"]] || Config::CONFIG[["bindir"]]'`
dnl Get Ruby site arch
dnl Get Ruby site arch
RUBY_SITE_ARCH=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["sitearch"]] || Config::CONFIG[["sitearch"]]'`
dnl Get Ruby include directory
RUBY_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyhdrdir"]] || Config::CONFIG[["archdir"]]'`
dnl Get Ruby config.h include directory
RUBY_ARCH_INCLUDE_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["rubyarchhdrdir"]] || Config::CONFIG[["archdir"]]'`
dnl Get Ruby lib directory
RUBY_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["libdir"]] || Config::CONFIG[["libdir"]]'`
dnl Get Ruby arch lib directory
RUBY_ARCH_LIB_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["archlibdir"]] || Config::CONFIG[["archlibdir"]]'`
dnl Get Ruby extensions directory
RUBY_EXTENSION_DIR=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["sitearchdir"]] || Config::CONFIG[["sitearchdir"]]'`
dnl Get Ruby shared library name, this does not include the lib prefix or extension name
RUBY_SO_NAME=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["RUBY_SO_NAME"]] || Config::CONFIG[["RUBY_SO_NAME"]]'`
dnl Get Ruby shared libary name
RUBY_SHARED_LIB=`$RUBY -rrbconfig -e 'puts RbConfig::CONFIG[["LIBRUBY"]] || Config::CONFIG[["LIBRUBY"]]'`
AC_MSG_NOTICE([Ruby executable is '$RUBY'])
AC_MSG_NOTICE([Ruby version is '$RUBY_VERSION'])
AC_MSG_NOTICE([Ruby bin directory is '$RUBY_BIN_DIR'])
AC_MSG_NOTICE([Ruby site arch is '$RUBY_SITE_ARCH'])
AC_MSG_NOTICE([Ruby include directory is '$RUBY_INCLUDE_DIR'])
AC_MSG_NOTICE([Ruby config.h include directory is '$RUBY_ARCH_INCLUDE_DIR'])
AC_MSG_NOTICE([Ruby library directory is '$RUBY_LIB_DIR'])
AC_MSG_NOTICE([Ruby architecture library directory is '$RUBY_ARCH_LIB_DIR'])
AC_MSG_NOTICE([Ruby extension directory is '$RUBY_EXTENSION_DIR'])
AC_MSG_NOTICE([Ruby library is '$RUBY_SO_NAME'])
AC_MSG_NOTICE([Ruby import library is '$RUBY_SHARED_LIB'])
AC_SUBST([RUBY_VERSION])
AC_SUBST([RUBY_BIN_DIR])
AC_SUBST([RUBY_SITE_ARCH])
AC_SUBST([RUBY_INCLUDE_DIR])
AC_SUBST([RUBY_ARCH_INCLUDE_DIR])
AC_SUBST([RUBY_LIB_DIR])
AC_SUBST([RUBY_ARCH_LIB_DIR])
AC_SUBST([RUBY_EXTENSION_DIR])
AC_SUBST([RUBY_SO_NAME])
AC_SUBST([RUBY_SHARED_LIB])
Expand Down
6 changes: 3 additions & 3 deletions swig/ruby/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ BUILT_SOURCES = geos_wrap.cxx
rubyextensiondirdir = $(RUBY_EXTENSION_DIR)

# Setup includes
AM_CPPFLAGS = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH)
AM_CPPFLAGS = -I$(RUBY_INCLUDE_DIR) -I$(RUBY_INCLUDE_DIR)/$(RUBY_SITE_ARCH) -I$(RUBY_ARCH_INCLUDE_DIR)

# Build Ruby module as shared library
rubyextensiondir_LTLIBRARIES = geos.la
geos_la_SOURCES = geos_wrap.cxx
geos_la_LIBADD = $(top_builddir)/capi/libgeos_c.la $(RUBY_SO_NAME)
geos_la_LIBADD = $(top_builddir)/capi/libgeos_c.la -l$(RUBY_SO_NAME)

# Only need to grab the capi header files
geos_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(top_builddir)/capi

# Specify -module and -avoid-version so we can create a file called geos.dll/so which is what Ruby wants
geos_la_LDFLAGS = -no-undefined -module -avoid-version -L$(RUBY_LIB_DIR)
geos_la_LDFLAGS = -no-undefined -module -avoid-version -L$(RUBY_LIB_DIR) -L$(RUBY_ARCH_LIB_DIR)

if ENABLE_SWIG

Expand Down
2 changes: 1 addition & 1 deletion tools/geos-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ case $1 in
--libs)
# TODO: make an alias for --clibs
# see http://trac.osgeo.org/geos/ticket/497
echo -L${libdir} -lgeos
echo -L${libdir} -lgeos-@VERSION@
;;
--clibs)
echo -L${libdir} -lgeos_c
Expand Down

0 comments on commit 5ac4db2

Please sign in to comment.