Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Import of recipes and patches from knap-build

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

0 notes on commit 13704b3

Please sign in to comment.
Something went wrong with that request. Please try again.