Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Import of recipes and patches from knap-build

  • Loading branch information...
commit 13704b34137e3fd8e082ec5edc2cb2d00bd3d51a 0 parents
@luislavena luislavena authored
6 c-ares/c-ares-1.7.5.knapfile
@@ -0,0 +1,6 @@
+recipe "c-ares", "1.7.5" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.gz",
+ :md5 => "800875fc23cd8e1924d8af9172ed33e7"
+end
31 libcurl/libcurl-7.24.0.knapfile
@@ -0,0 +1,31 @@
+recipe "libcurl", "7.24.0" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/curl-#{version}.tar.bz2",
+ :md5 => "f912221d75eb8d8fe08900eaf011b023"
+
+ depends_on "c-ares"
+ depends_on "openssl"
+ depends_on "zlib"
+
+ before :configure do
+ options.configure_args << "--enable-ares"
+ options.configure_args << "--enable-ssl"
+ options.configure_args << "--enable-zlib"
+ end
+
+ before :compile do
+ # only libcurl is required
+ options.make_args << "-C lib"
+ end
+
+ action :install do
+ # we only need libs, headers and docs
+ %w(lib include docs).each do |dir|
+ run "make -f #{options.makefile} -C #{dir} install"
+ end
+
+ # also install pkg-config information
+ run "make -f #{options.makefile} install-pkgconfigDATA"
+ end
+end
42 libffi/0001-Includes-should-go-in-includedir-not-libdir.patch
@@ -0,0 +1,42 @@
+From b1184c2c41de4efc26866e6fb93cb9c694f14f8f Mon Sep 17 00:00:00 2001
+From: Luis Lavena <luislavena@gmail.com>
+Date: Sat, 3 Jul 2010 12:48:20 -0300
+Subject: [PATCH] Includes should go in includedir, not libdir.
+
+This patch corrects the installation of ffi.h and ffitarget.h
+to properly put in $(includedir) instead of $(libdir)
+
+It also avoids prepending package name and version to it, causing
+issues by development tools trying to find it.
+---
+ include/Makefile.am | 2 +-
+ include/Makefile.in | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/include/Makefile.am b/include/Makefile.am
+index fd28024..15301d6 100644
+--- a/include/Makefile.am
++++ b/include/Makefile.am
+@@ -5,5 +5,5 @@ AUTOMAKE_OPTIONS=foreign
+ DISTCLEANFILES=ffitarget.h
+ EXTRA_DIST=ffi.h.in ffi_common.h
+
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
++includesdir = $(includedir)
+ nodist_includes_HEADERS = ffi.h ffitarget.h
+diff --git a/include/Makefile.in b/include/Makefile.in
+index f370697..c62d6c4 100644
+--- a/include/Makefile.in
++++ b/include/Makefile.in
+@@ -204,7 +204,7 @@ top_srcdir = @top_srcdir@
+ AUTOMAKE_OPTIONS = foreign
+ DISTCLEANFILES = ffitarget.h
+ EXTRA_DIST = ffi.h.in ffi_common.h
+-includesdir = $(libdir)/@PACKAGE_NAME@-@PACKAGE_VERSION@/include
++includesdir = $(includedir)
+ nodist_includes_HEADERS = ffi.h ffitarget.h
+ all: all-am
+
+--
+1.7.1.msysgit.0
+
18 libffi/0002-build-shared-library-for-x86_64-mingw-configure-ac.diff
@@ -0,0 +1,18 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -182,6 +182,15 @@
+
+ x86_64-*-cygwin* | x86_64-*-mingw*)
+ TARGET=X86_WIN64; TARGETDIR=x86
++ # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
++ # We must also check with_cross_host to decide if this is a native
++ # or cross-build and select where to install dlls appropriately.
++ if test -n "$with_cross_host" &&
++ test x"$with_cross_host" != x"no"; then
++ AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
++ else
++ AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
++ fi
+ ;;
+
+ x86_64-*-*)
18 libffi/0002-build-shared-library-for-x86_64-mingw-configure.diff
@@ -0,0 +1,18 @@
+--- a/configure
++++ b/configure
+@@ -13164,6 +13164,15 @@
+
+ x86_64-*-cygwin* | x86_64-*-mingw*)
+ TARGET=X86_WIN64; TARGETDIR=x86
++ # All mingw/cygwin/win32 builds require -no-undefined for sharedlib.
++ # We must also check with_cross_host to decide if this is a native
++ # or cross-build and select where to install dlls appropriately.
++ if test -n "$with_cross_host" &&
++ test x"$with_cross_host" != x"no"; then
++ AM_LTLDFLAGS='-no-undefined -bindir "$(toolexeclibdir)"';
++ else
++ AM_LTLDFLAGS='-no-undefined -bindir "$(bindir)"';
++ fi
+ ;;
+
+ x86_64-*-*)
7 libffi/libffi-3.0.10.knapfile
@@ -0,0 +1,7 @@
+recipe "libffi", "3.0.10" do
+ use :autotools
+ use :patch
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.gz",
+ :md5 => "79390673f5d07a8fb342bc09b5055b6f"
+end
6 libiconv/libiconv-1.14.knapfile
@@ -0,0 +1,6 @@
+recipe "libiconv", "1.14" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.gz",
+ :md5 => "e34509b1623cec449dfeb73d7ce9c6c6"
+end
27 libyaml/0001-Proper-mingw-YAML_DECLARE-definition.patch
@@ -0,0 +1,27 @@
+From 37a8ce4e439887f7856ad70ca71e2fe6820e37fd Mon Sep 17 00:00:00 2001
+From: Bosko Ivanisevic <bosko.ivanisevic@gmail.com>
+Date: Wed, 6 Jul 2011 09:22:29 +0200
+Subject: [PATCH] Proper mingw YAML_DECLARE definition
+
+---
+ include/yaml.h | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/include/yaml.h b/include/yaml.h
+index 400cae1..c6e8b71 100644
+--- a/include/yaml.h
++++ b/include/yaml.h
+@@ -26,7 +26,9 @@ extern "C" {
+
+ /** The public API declaration. */
+
+-#ifdef _WIN32
++#if defined(__MINGW32__)
++# define YAML_DECLARE(type) type
++#elif defined(_WIN32)
+ # if defined(YAML_DECLARE_STATIC)
+ # define YAML_DECLARE(type) type
+ # elif defined(YAML_DECLARE_EXPORT)
+--
+1.7.0.2.msysgit.0
+
7 libyaml/libyaml-0.1.4.knapfile
@@ -0,0 +1,7 @@
+recipe "libyaml", "0.1.4" do
+ use :autotools
+ use :patch
+
+ fetch "http://distfiles.openknapsack.org/#{name}/yaml-#{version}.tar.gz",
+ :md5 => "36c852831d02cf90508c29852361d01b"
+end
37 openssl/openssl-1.0.0g.knapfile
@@ -0,0 +1,37 @@
+recipe "openssl", "1.0.0g" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.gz",
+ :md5 => "07ecbe4324f140d157478637d6beccf1"
+
+ depends_on "zlib"
+
+ before :extract do
+ # ignore symlink errors from package
+ if platform.mingw?
+ options.ignore_extract_errors = true
+ end
+ end
+
+ action :configure do
+ cmd = ["perl"]
+ if platform.posix?
+ cmd << "config"
+ else
+ cmd << "Configure"
+ end
+
+ if platform.mingw?
+ if platform.x64?
+ cmd << "mingw64"
+ else
+ cmd << "mingw"
+ end
+ end
+
+ cmd << "zlib-dynamic shared"
+ cmd << "--prefix=#{install_path}"
+
+ run cmd.join(" ")
+ end
+end
6 ragel/ragel-6.7.knapfile
@@ -0,0 +1,6 @@
+recipe "ragel", "6.7" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.gz",
+ :md5 => "f4423e0d8a6538dd4e61498fcfad3cec"
+end
12 sqlite/sqlite-3.7.10.knapfile
@@ -0,0 +1,12 @@
+recipe "sqlite", "3.7.10" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-autoconf-3071000.tar.gz",
+ :md5 => "9ed2ca93577b58cfa0d01f64b9312ab9"
+
+ before :configure do
+ cflags = "-O2 -DSQLITE_ENABLE_COLUMN_METADATA"
+ cflags << " -fPIC" if platform.x64? && !platform.mingw?
+ options.configure_args << "CFLAGS='#{cflags}'"
+ end
+end
38 zlib/zlib-1.2.5.knapfile
@@ -0,0 +1,38 @@
+recipe "zlib", "1.2.5" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.bz2",
+ :md5 => "be1e89810e66150f5b0327984d8625a0"
+
+ action :configure do
+ if platform.mingw?
+ # win32/Makefile.gcc needs to be adjusted
+ options.makefile = "win32/Makefile.gcc"
+ work_makefile = work_path(options.makefile)
+ mk = File.read work_makefile
+ File.open work_makefile, "wb" do |f|
+ f.puts "BINARY_PATH = #{install_path('bin')}"
+ f.puts "INCLUDE_PATH = #{install_path('include')}"
+ f.puts "LIBRARY_PATH = #{install_path('lib')}"
+
+ # TODO: change PREFIX if cross-compiling
+ unless platform.native?
+ mg.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{platform.host}-")
+ end
+
+ # enable shared object
+ mk.sub!(/^SHARED_MODE\s*=\d*$/, "SHARED_MODE = 1")
+
+ # ensure IMPLIB is libz.dll.a
+ # (so linking with -lz will prefer shared instead of static)
+ mk.sub!(/^IMPLIB\s*=.*$/, "IMPLIB = libz.dll.a")
+
+ # write the original Makefile content
+ f.puts mk
+ end
+ else
+ # run will chdir into work_path prior executing the command
+ run "sh configure --prefix=#{install_path}"
+ end
+ end
+end
34 zlib/zlib-1.2.6.knapfile
@@ -0,0 +1,34 @@
+recipe "zlib", "1.2.6" do
+ use :autotools
+
+ fetch "http://distfiles.openknapsack.org/#{name}/#{name}-#{version}.tar.bz2",
+ :md5 => "dc2cfa0d2313ca77224b4d932b2911e9"
+
+ action :configure do
+ if platform.mingw?
+ # win32/Makefile.gcc needs to be adjusted
+ options.makefile = "win32/Makefile.gcc"
+ work_makefile = work_path(options.makefile)
+ mk = File.read work_makefile
+ File.open work_makefile, "wb" do |f|
+ f.puts "BINARY_PATH = #{install_path('bin')}"
+ f.puts "INCLUDE_PATH = #{install_path('include')}"
+ f.puts "LIBRARY_PATH = #{install_path('lib')}"
+
+ # TODO: change PREFIX if cross-compiling
+ unless platform.native?
+ mg.sub!(/^PREFIX\s*=\s*$/, "PREFIX = #{platform.host}-")
+ end
+
+ # enable shared object
+ mk.sub!(/^SHARED_MODE\s*=\d*$/, "SHARED_MODE = 1")
+
+ # write the original Makefile content
+ f.puts mk
+ end
+ else
+ # run will chdir into work_path prior executing the command
+ run "sh configure --prefix=#{install_path}"
+ end
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.