summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-06-21 23:31:33 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-06-21 23:31:33 +0300
commit6094493bdbd0b193660daa6610ae48c267e5a710 (patch)
tree9fb586d3cd5613e4fcbd4739718911d83ae92d85
parenta0b016be2e2f120c5b2ef408289f10665c1deb56 (diff)
downloadruby-6094493bdbd0b193660daa6610ae48c267e5a710.tar.gz
Support Dyson multiarch (x86_64-illumos)
-rw-r--r--debian/patches/dyson.patch71
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules6
3 files changed, 75 insertions, 3 deletions
diff --git a/debian/patches/dyson.patch b/debian/patches/dyson.patch
new file mode 100644
index 0000000..54ccff2
--- /dev/null
+++ b/debian/patches/dyson.patch
@@ -0,0 +1,71 @@
+Index: ruby2.3-2.3.3/configure.in
+===================================================================
+--- ruby2.3-2.3.3.orig/configure.in
++++ ruby2.3-2.3.3/configure.in
+@@ -3104,7 +3104,7 @@ if test "$rb_cv_binary_elf" = yes; then
+ fi
+
+ AS_CASE(["$target_os"],
+-[linux* | gnu* | k*bsd*-gnu | bsdi* | kopensolaris*-gnu | nacl], [
++[linux* | gnu* | k*bsd*-gnu | bsdi* | solaris* | nacl], [
+ if test "$rb_cv_binary_elf" = no; then
+ with_dln_a_out=yes
+ else
+@@ -3168,22 +3168,6 @@ if test "$with_dln_a_out" != yes; then
+ RPATHFLAG=' +b %1$-s'
+ fi
+ rb_cv_dlopen=yes],
+- [solaris*], [ if test "$GCC" = yes; then
+- : ${LDSHARED='$(CC) -shared'}
+- if test "$rb_cv_prog_gnu_ld" = yes; then
+- LDFLAGS="$LDFLAGS -Wl,-E"
+- fi
+- else
+- : ${LDSHARED='$(CC) -G'}
+- fi
+- if test "$ac_cv_sizeof_voidp" = 8; then
+- : ${LIBPATHENV=LD_LIBRARY_PATH_64}
+- : ${PRELOADENV=LD_PRELOAD_64}
+- else
+- : ${LIBPATHENV=LD_LIBRARY_PATH_32}
+- : ${PRELOADENV=LD_PRELOAD_32}
+- fi
+- rb_cv_dlopen=yes],
+ [sunos*], [ : ${LDSHARED='$(LD) -assert nodefinitions'}
+ rb_cv_dlopen=yes],
+ [irix*], [ : ${LDSHARED='$(LD) -shared'}
+@@ -3199,7 +3183,7 @@ if test "$with_dln_a_out" != yes; then
+ [bsdi3*], [ AS_CASE(["$CC"],
+ [*shlicc*], [ : ${LDSHARED='$(CC) -r'}
+ rb_cv_dlopen=yes])],
+- [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | kopensolaris*-gnu | haiku*], [
++ [linux* | gnu* | k*bsd*-gnu | netbsd* | bsdi* | solaris* | haiku*], [
+ : ${LDSHARED='$(CC) -shared'}
+ if test "$rb_cv_binary_elf" = yes; then
+ LDFLAGS="$LDFLAGS -Wl,-export-dynamic"
+@@ -3481,7 +3465,7 @@ else
+ fi
+
+ AS_CASE(["$target_os"],
+- [linux* | gnu* | k*bsd*-gnu | kopensolaris*-gnu], [
++ [linux* | gnu* | k*bsd*-gnu | solaris*], [
+ STRIP="$STRIP -S -x"],
+ [darwin*], [
+ STRIP="$STRIP -A -n"])
+@@ -3685,7 +3669,7 @@ AS_CASE("$enable_shared", [yes], [
+ [sunos4*], [
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
+ ],
+- [linux* | gnu* | k*bsd*-gnu | atheos* | kopensolaris*-gnu | haiku*], [
++ [linux* | gnu* | k*bsd*-gnu | atheos* | solaris* | haiku*], [
+ LIBRUBY_DLDFLAGS='-Wl,-soname,lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR)'" $LDFLAGS $LDFLAGS_OPTDIR"
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR).$(MINOR) lib$(RUBY_SO_NAME).so'
+ if test "$load_relative" = yes; then
+@@ -4303,6 +4287,7 @@ if test "${universal_binary-no}" = yes ;
+ else
+ arch="${target_cpu}-${target_os}"
+ AS_CASE(["$arch"], [le32-nacl], [arch="pnacl"])
++ AS_CASE(["$target_os"],[solaris*],[arch="$target_cpu-illumos"])
+ AC_DEFINE_UNQUOTED(RUBY_PLATFORM, "$arch")
+ fi
+
diff --git a/debian/patches/series b/debian/patches/series
index 7bb8252..af970e4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
debian-changes
+dyson.patch
diff --git a/debian/rules b/debian/rules
index b0783d8..ae5c14a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,8 @@
#!/usr/bin/make -f
# -*- makefile -*-
+include /usr/share/dpkg/architecture.mk
+
export DH_VERBOSE=1
export DEBIAN_DISABLE_RUBYGEMS_INTEGRATION = 1
@@ -10,8 +12,6 @@ export DH_OPTIONS
TESTOPTS += -v
export TESTOPTS
-DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
-
export SOURCE := $(shell dpkg-parsechangelog -SSource)
export RUBY_VERSION := $(patsubst ruby%,%,$(SOURCE))
export RUBY_API_VERSION := $(RUBY_VERSION).0
@@ -20,7 +20,7 @@ export RUBY_API_VERSION := $(RUBY_VERSION).0
baseruby=$(shell test -x /usr/bin/ruby && echo /usr/bin/ruby || echo /usr/bin/ruby1.8)
configure_options += --enable-multiarch
-configure_options += --target=$(DEB_HOST_MULTIARCH)
+configure_options += --target=$(DEB_HOST_GNU_TYPE)
configure_options += --program-suffix=$(RUBY_VERSION)
configure_options += --with-soname=ruby-$(RUBY_VERSION)
configure_options += --enable-shared