Merge branch 'ubuntu1604' into 'master'

Build packages for Ubuntu 16.04

Fixes #1230 

Related to #1224

See merge request !758
This commit is contained in:
Marin Jankovski 2016-04-25 10:20:43 +00:00
commit 8a4ce1f5f4
3 changed files with 220 additions and 0 deletions

View File

@ -35,6 +35,14 @@ Ubuntu 14.04:
- ubuntu1404
except:
- branches
Ubuntu 16.04:
stage: package
script:
<<: *tag_build
tags:
- ubuntu1604
except:
- branches
Debian 7:
stage: package
script:
@ -82,6 +90,14 @@ Ubuntu 14.04 branch:
- ubuntu1404
except:
- tags
Ubuntu 16.04 branch:
stage: package
script:
<<: *branch_build
tags:
- ubuntu1604
except:
- tags
Debian 7 branch:
stage: package
script:

View File

@ -0,0 +1,46 @@
https://bugs.gentoo.org/545114
extracted from the upstream change (which had many unrelated commits in one)
From 97bb4678dc03e753290b39bbff30ba2825df9517 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
Date: Sun, 7 Dec 2014 03:10:09 +0000
Subject: [PATCH] ncurses 5.9 - patch 20141206
+ modify MKlib_gen.sh to work around change in development version of
gcc introduced here:
https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
https://gcc.gnu.org/ml/gcc-patches/2014-07/msg00236.html
(reports by Marcus Shawcroft, Maohui Lei).
diff --git a/ncurses/base/MKlib_gen.sh b/ncurses/base/MKlib_gen.sh
index d8cc3c9..b91398c 100755
--- a/ncurses/base/MKlib_gen.sh
+++ b/ncurses/base/MKlib_gen.sh
@@ -474,11 +474,22 @@ sed -n -f $ED1 \
-e 's/gen_$//' \
-e 's/ / /g' >>$TMP
+cat >$ED1 <<EOF
+s/ / /g
+s/^ //
+s/ $//
+s/P_NCURSES_BOOL/NCURSES_BOOL/g
+EOF
+
+# A patch discussed here:
+# https://gcc.gnu.org/ml/gcc-patches/2014-06/msg02185.html
+# introduces spurious #line markers. Work around that by ignoring the system's
+# attempt to define "bool" and using our own symbol here.
+sed -e 's/bool/P_NCURSES_BOOL/g' $TMP > $ED2
+cat $ED2 >$TMP
+
$preprocessor $TMP 2>/dev/null \
-| sed \
- -e 's/ / /g' \
- -e 's/^ //' \
- -e 's/_Bool/NCURSES_BOOL/g' \
+| sed -f $ED1 \
| $AWK -f $AW2 \
| sed -f $ED3 \
| sed \

158
config/software/ncurses.rb Normal file
View File

@ -0,0 +1,158 @@
#
# Copyright 2012-2014 Chef Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name "ncurses"
default_version "5.9"
dependency "libtool" if aix?
dependency "patch" if solaris2?
version("5.9") { source md5: "8cb9c412e5f2d96bc6f459aa8c6282a1", url: "http://ftp.gnu.org/gnu/ncurses/ncurses-5.9.tar.gz" }
version("5.9-20150530") { source md5: "bb2cbe1d788d3ab0138fc2734e446b43", url: "ftp://invisible-island.net/ncurses/current/ncurses-5.9-20150530.tgz" }
version("6.0-20150613") { source md5: "0c6a0389d004c78f4a995bc61884a563", url: "ftp://invisible-island.net/ncurses/current/ncurses-6.0-20150613.tgz" }
version("6.0-20150810") { source md5: "78bfcb4634a87b4cda390956586f8f1f", url: "ftp://invisible-island.net/ncurses/current/ncurses-6.0-20150810.tgz" }
relative_path "ncurses-#{version}"
########################################################################
#
# wide-character support:
# Ruby 1.9 optimistically builds against libncursesw for UTF-8
# support. In order to prevent Ruby from linking against a
# package-installed version of ncursesw, we build wide-character
# support into ncurses with the "--enable-widec" configure parameter.
# To support other applications and libraries that still try to link
# against libncurses, we also have to create non-wide libraries.
#
# The methods below are adapted from:
# http://www.linuxfromscratch.org/lfs/view/development/chapter06/ncurses.html
#
########################################################################
build do
env = with_standard_compiler_flags(with_embedded_path)
env.delete('CPPFLAGS')
if smartos?
# SmartOS is Illumos Kernel, plus NetBSD userland with a GNU toolchain.
# These patches are taken from NetBSD pkgsrc and provide GCC 4.7.0
# compatibility:
# http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/ncurses/patches/
patch source: "patch-aa", plevel: 0
patch source: "patch-ab", plevel: 0
patch source: "patch-ac", plevel: 0
patch source: "patch-ad", plevel: 0
patch source: "patch-cxx_cursesf.h", plevel: 0
patch source: "patch-cxx_cursesm.h", plevel: 0
# Opscode patches - <someara@opscode.com>
# The configure script from the pristine tarball detects xopen_source_extended incorrectly.
# Manually working around a false positive.
patch source: "ncurses-5.9-solaris-xopen_source_extended-detection.patch", plevel: 0
end
# AIX's old version of patch doesn't like the patches here
unless aix?
if version == "5.9"
# Patch to add support for GCC 5, doesn't break previous versions
patch source: "ncurses-5.9-gcc-5.patch", plevel: 1, env: env
end
end
if mac_os_x? ||
# Clang became the default compiler in FreeBSD 10+
(freebsd? && ohai['os_version'].to_i >= 1000024)
# References:
# https://github.com/Homebrew/homebrew-dupes/issues/43
# http://invisible-island.net/ncurses/NEWS.html#t20110409
#
# Patches ncurses for clang compiler. Changes have been accepted into
# upstream, but occurred shortly after the 5.9 release. We should be able
# to remove this after upgrading to any release created after June 2012
patch source: "ncurses-clang.patch"
end
if openbsd?
patch source: "patch-ncurses_tinfo_lib__baudrate.c", plevel: 0
end
if version == "5.9" && ppc64le?
patch source: "v5.9.ppc64le-configure.patch", plevel: 1
end
configure_command = [
"./configure",
"--prefix=#{install_dir}/embedded",
"--enable-overwrite",
"--with-shared",
"--with-termlib",
"--without-ada",
"--without-cxx-binding",
"--without-debug",
"--without-manpages",
]
if aix?
# AIX kinda needs 5.9-20140621 or later
# because of a naming snafu in shared library naming.
# see http://invisible-island.net/ncurses/NEWS.html#t20140621
# let libtool deal with library silliness
configure_command << "--with-libtool=\"#{install_dir}/embedded/bin/libtool\""
# stick with just the shared libs on AIX
configure_command << "--without-normal"
# ncurses's ./configure incorrectly
# "figures out" ARFLAGS if you try
# to set them yourself
env.delete('ARFLAGS')
# use gnu install from the coreutils IBM rpm package
env['INSTALL'] = "/opt/freeware/bin/install"
end
# only Solaris 10 sh has a problem with
# parens enclosed case statement conditions the configure script
configure_command.unshift "bash" if solaris2?
command configure_command.join(" "), env: env
# unfortunately, libtool may try to link to libtinfo
# before it has been assembled; so we have to build in serial
make "libs", env: env if aix?
make "-j #{workers}", env: env
make "-j #{workers} install", env: env
# Build non-wide-character libraries
make "distclean", env: env
configure_command << "--enable-widec"
command configure_command.join(" "), env: env
make "libs", env: env if aix?
make "-j #{workers}", env: env
# Installing the non-wide libraries will also install the non-wide
# binaries, which doesn't happen to be a problem since we don't
# utilize the ncurses binaries in private-chef (or oss chef)
make "-j #{workers} install", env: env
# Ensure embedded ncurses wins in the LD search path
if smartos?
link "#{install_dir}/embedded/lib/libcurses.so", "#{install_dir}/embedded/lib/libcurses.so.1"
end
end